正在打开每日关注
正在打开每日关注
一套以文档、测试、审查与自动化验证为核心的 Agent 工程工作流清单。
I'm just going to dump my whole agentic setup out here, because I see too many people missing giant chunks of this and it's hurting them. Here's what I have and recommend: 0. an AGENTS.md that is a router -- it sends the agent to the right skills, docs, tools 1. a standard workflow doc/skill customized to my needs ... (grab Matt Pocock skills if you don't already have something) ... I tag this in most sessions with `@/AGENT_WORKFLOW.md` and it pulls it in. 2. self-healing docs for every system, and agents are instructed to keep them updated ... I tag the ones I know I need, or let the agent find them through AGENTS.md ... I also provide a more detailed summary in the first 7 lines of every doc, so they're easily greppable to find the right thing, and this is documented in AGENTS.md 3. agents always run the app ... the agent should always actually run the app itself, and test its work and fix issues as it goes, especially if running autonomously / asynchronously 4. end-to-end tests and instructions to write more and keep up to date, and docs on how to write tests, what to avoid, and a list of all the tests and what they test in yet another markdown doc ... write and run targeted tests during implementation, improve and commit with work 5. custom linters at precommit hooks looking for any problems you run across, with `--fix` fixing the problems automatically, OR if that's not feasible, it shells out to a cheaper LLM like Composer 2.5 or Sonnet to fix the problems -- NOT just flagging them, but actually resulting in cleaned code 6. cross-agent review at each major point: research, plan, implementation, and wrap-up. I mean codex, claude, cursor, whatever -- but it shouldn't be the same model reviewing the same code. And specific docs for agent review, what to look for, how to approach it. Also, personas -- looking at the code from different perspectives, such as maintainability, code quality, security, performance, AI smells, domains (e.g. "financial services expert" or whatever) ... and each persona also "owns" a set of system docs too and keeps them up to date 7. agent traces / worksheets that track what the agent is doing each session. if the agent fails partway through, you should be able to hand this worksheet to another agent and it could finish the job. commit this worksheet with the work so it's all connected and easy to reference later (you will reference these later!!), also have the agent apply git tags that correspond to specific worksheet names so they're easy to find 8. automatic agent feedback to you at the end of the session, added to a doc that is also committed with the work, that you periodically ingest into an interactive session and improve your workflows 9. a tools or bin folder that contains python or bash scripts that the agent has skills to make to make its job easier (for example, I have an `agent_review` bash script that lets the agent kick off agent reviews via CLI without knowing each agent's particular incantations) ... docs on how to make scripts effectively, and instructions to constantly build these out more 10. periodic agent sweeps through recent commits, looking for problems / gotchas from a higher level across commits 11. a coding conventions doc that is just for specific coding conventions you want to see in the code base, your review agents use these a lot (but a lot of this should be in linters) 12. an agent loop / night shift skill for autonomous work, that lays out how the agent is to approach this, from an orchestration standpoint 13. a task queue that is accessible to the agent (mine is just a TODOS.md, but yours might be in Linear etc, with a CLI to fetch via API) 14. a periodic false-confidence test audit skill that looks for tests that aren't actually testing what you think they're testing, and that fix those 15. visual regression tests -- take screenshots, compare via tool and with agent visual review, commit with work (git lfs useful here) or at least push into the PR 16. automatic performance benchmark tests that notice when performance degrades 17. performance profiling tools that can be used by agents for targeted benchmarking, trying new techniques, comparing outputs, and comparing profiles 18. end-of-shift full validations, including running all tests, performance, agent reviews, sweeps, everything -- when you return, it's all as pristine as it can be If you have all this, your agentic coding experience is going to be very different than dry prompting and manually guiding it toward the right thing every time.
是什么 这是一条关于 Agent 工程化的纯观点推文。Jamon Holmgren 将自己的实践整理成一套近似操作系统的工作流:由 AGENTS.md 负责路由上下文,由文档、技能和工具承载知识,再用测试、审查、性能检查与反馈机制形成闭环。它关注的不是如何写出更好的单条提示词,而是如何让 Agent 在复杂代码库中持续、可验证、可交接地工作。
核心设计 其结构可以概括为四层:上下文层维护规范、架构和测试文档;执行层通过任务队列、脚本和夜班技能推进任务;验证层覆盖运行应用、端到端测试、视觉回归和性能基准;治理层则引入跨模型审查、工作表、Git 标签、提交扫描和自动反馈。文档被视为会持续更新的系统资产,而不是一次性说明书。
关键洞察 真正的 Agent 生产力来自流程记忆与反馈速度。工作表让任务状态可转移,独立模型审查降低单一模型的盲点,自动修复和定期审计则把质量控制前移,最终将一次性对话转化为可复用的工程系统。
边界与风险 这套方案适合有持续开发、多人协作或高可靠性要求的项目。小型仓库若照搬全部机制,可能产生文档维护、截图比对、性能基准和多模型调用成本。让低价模型直接修改代码也需要严格的范围控制与测试保护,否则自动化会放大错误,并制造流程完整但结果不可靠的假象。