用 AI 交付程式碼容易,難的是交付經測試的程式碼
Shipping with AI is easy. Shipping tested code with AI is the hard part
sisig.ai 團隊開源 agent-doctrine,這套提示詞、角色定義與技能旨在協助 AI Agent 交付經驗證的程式碼。修改前,lead 須在對話紀錄中回答 TENETS.md 的 15 條問題並提供證據,否則不開始編碼。Fast 保留 gate 和每次 diff 的審查,Rigorous 另加入計劃簡化、對抗式計劃審查及編碼前批准;安裝需 Git 和 Bun,項目採 MIT 授權。
Getting an agent to write code is solved. Getting it to write the right code, prove it works, and hand you a PR you'd actually merge is not.
For the last year we've been iterating on a set of prompts, role definitions and skills at sisig.ai to close that gap. We just open-sourced it as agent-doctrine.
The loop
Every agent on the machine follows the same steps:
scout → gate → plan → implement → review → consolidate → verify → ship
The agent you talk to is the lead. It plans and delegates, and it only hand-writes code if you tell it to.
The gate
This is the part that changed things the most for us. Before any edit, the lead answers fifteen questions from TENETS.md in the transcript, with evidence. Some examples:
- what's the smallest correct change?
- what's the blast radius?
- how will you prove it on real data?
If the agent can't answer, it isn't ready to code.
The team
-
scout: reads the codebase before planning -
implementer: one per split, each in its own worktree -
simplifier: cuts the plan down (rigorous mode) -
adv_review: tries to break the plan and every diff
Handoffs are files with a fixed shape (HANDOFFS.md), so a spec written in Claude Code can be picked up by Codex or Cursor.
Fast vs rigorous
Fast keeps the gate and a review per diff. Rigorous adds plan simplification, adversarial plan review, and your approval before code. The lead asks which one at the start.
The prose rules
We also wanted agent output that doesn't read like slop. Replies, specs, PR bodies and commit messages follow simplified technical English: active voice, 8-20 words per sentence, answer first, no "leverage" or "delve", no em dashes.
Try it
Needs Git and Bun. Back up your agent config first, because it rewrites global instructions.
git clone https://github.com/sisig-ai/agent-doctrine.git
cd agent-doctrine
bun install --frozen-lockfile
export CLAUDE_MD_DIR="$PWD"
./sync.sh apply-snapshot
Then hand your agent a spec and answer "fast or rigorous?".
It's MIT and opinionated on purpose. Fork it and rewrite TASTE.md to fit how you work.
來源:DEV Community · dev.to