跳到正文
meng shao· @shao__meng · X·· 18 小时前AI 评分58
AI 导读

斯坦福课程 CS146S 老师 Mihail Eric 画出软件工厂组件图,提出 Agent 就绪优先:Agent 需要任务所需工具、隔离运行环境和能自行启动验证的仓库。

正文 · 原文

斯坦福课程「CS146S: The Modern Software Developer」老师 Mihail Eric 画出软件工厂组件图:Agent 先能独立启动仓库,每次改动过同一道关,人从执行者变成按风险管理

定义管全程,编排循环里做完再发出去

图的顶层是工厂定义,用代码来管:Skills、规则和 AGENTS.md、自动化配置,约束每一个阶段。

左边是触发源:Slack、Linear、GitHub issues、定时任务和告警。

中间是编排循环:分诊、规格、实现、审查、核验,然后进入发布:拉取请求、合并、部署,再监控错误、告警和用量。规格要人批准,审查按风险分级,核验还有产品检查。实现跑在隔离沙箱里:每次 Agent 运行一台,不带生产凭证,隔离本身就是权限边界。

核验一侧是 AI 评判和打分、测试与 CI,以及实际操作环境里的检查。监控里冒出的新问题会回到分诊;还有观察用的 Agent 会给工厂定义提拉取请求,等于工厂也能改自己。

底下的度量是每个拉取请求的成本、周期时间和人工介入次数。

同一道关,失败要回写进系统

无论改动是谁或什么提出的,都要过同一道关:CI、静态分析、测试和 AI 审查,再用 AI 评判对照规格给整次运行打分。

他写最好的基准是自家历史:回放过去的拉取请求,比较不同模型和配置在成本与质量上的表现。缺陷漏过去时,要把原因记下,做成文档、技能、检查规则或工具,让缺陷率随时间下降。

Agent 跑偏,是在提示工厂该改进。人的角色从执行者转向管理者:同步做计划,异步去执行,按风险分流审查,安全、数据和支付仍由人把关。度量看每个拉取请求的成本、周期时间和人工介入次数,代码行数和 token 不在他列的指标里。

引用Mihail Eric@mihail_eric
Here are all the components of what people call a software factory. A few of the core principles: 𝗔𝗴𝗲𝗻𝘁 𝗿𝗲𝗮𝗱𝗶𝗻𝗲𝘀𝘀 𝗰𝗼𝗺𝗲𝘀 𝗳𝗶𝗿𝘀𝘁. An agent needs access to the tools a task requires, an isolated environment to run in, and a repo it can boot and verify on its own. If an agent can't start your dev environment without a human, you can't build a factory yet. 𝗘𝘃𝗲𝗿𝘆 𝗰𝗵𝗮𝗻𝗴𝗲 𝗰𝗹𝗲𝗮𝗿𝘀 𝘁𝗵𝗲 𝘀𝗮𝗺𝗲 𝗯𝗮𝗿. CI, static analysis, tests, and an AI reviewer check every change no matter who or what prompted it, and an AI judge grades each whole run against the spec. The best benchmark is your own history: replay past PRs to compare models and setups on cost versus quality. 𝗘𝘃𝗲𝗿𝘆 𝗳𝗮𝗶𝗹𝘂𝗿𝗲 𝗶𝗺𝗽𝗿𝗼𝘃𝗲𝘀 𝘁𝗵𝗲 𝘀𝘆𝘀𝘁𝗲𝗺. When a defect slips through, capture why and turn it into a doc, a skill, a lint rule, or a tool, so the defect rate falls over time. An agent going off the rails is a signal to improve the factory. The human role moves from worker to manager. Plan synchronously, execute asynchronously, and route review by risk so people still own security, data, and payments. Then measure cost per PR, cycle time, and human touches per PR, not lines of code or tokens.
在 X 查看被引用的帖子

来源:meng shao · x.com