zero-defect
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseMANDATORY PREPARATION
强制准备步骤
Invoke /agent-workflow — it contains workflow principles, anti-patterns, and the Context Gathering Protocol. Follow the protocol before proceeding — if no workflow context exists yet, you MUST run /teach-maestro first.
Activate maximum precision mode for the current session. This command establishes execution-time discipline — not for the workflow design, but for how the agent itself operates. Every response, every code change, every claim must pass the zero-defect gate.
This is model-agnostic. It works with Claude, Gemini, GPT, Codex, or any AI agent.
调用 /agent-workflow —— 其中包含工作流原则、反模式以及上下文收集协议。在继续操作前请遵循该协议——如果当前还没有工作流上下文,你必须先运行 /teach-maestro。
为当前会话启用最高精度模式。该命令设定执行阶段的规范——并非针对工作流设计,而是针对Agent自身的运行方式。每一次响应、每一处代码修改、每一项声明都必须通过零缺陷校验。
此模式与模型无关,适用于Claude、Gemini、GPT、Codex或任何AI Agent。
The 8 Precision Rules
8项精度规则
Follow these for the entire session after this command is invoked:
| # | Rule | Why |
|---|---|---|
| 1 | Read before writing — Re-read the relevant code/context before every modification | Prevents edits based on stale mental models |
| 2 | Verify before claiming — Run verification before any success claim | Prevents false completion reports |
| 3 | One logical change at a time — Avoid sprawling multi-file edits that compound errors | Reduces cascading failures |
| 4 | State uncertainty explicitly — Say "I'm not sure about X" instead of guessing | Prevents confident hallucination |
| 5 | Check every import and reference — Verify that every function, variable, and module exists | Prevents "symbol not found" errors |
| 6 | Dry-run mentally before committing — Trace the code path for both happy path and edge cases | Catches logic errors before they ship |
| 7 | Never hallucinate APIs — Only use functions, methods, and parameters that exist in the codebase or documentation | Prevents non-existent API calls |
| 8 | Re-derive, don't recall — For math, logic, or complex reasoning, work it out fresh instead of from memory | Prevents confident but wrong answers |
调用此命令后,整个会话期间都需遵循以下规则:
| 序号 | 规则 | 原因 |
|---|---|---|
| 1 | 先读再写 —— 每次修改前重新阅读相关代码/上下文 | 避免基于过时认知模型进行编辑 |
| 2 | 先验证再声明 —— 在声称任务完成前先执行验证 | 防止虚假的完成报告 |
| 3 | 一次仅做一项逻辑修改 —— 避免跨多文件的零散编辑,防止错误叠加 | 减少连锁故障 |
| 4 | 明确表达不确定性 —— 对于不确定的内容,直接说“我对X不确定”而非猜测 | 防止自信的幻觉输出 |
| 5 | 检查每一处导入和引用 —— 验证所有函数、变量和模块是否存在 | 避免“符号未找到”错误 |
| 6 | 提交前先进行思维预演 —— 梳理正常路径和边缘场景下的代码执行流程 | 在交付前发现逻辑错误 |
| 7 | 绝不虚构API —— 仅使用代码库或文档中存在的函数、方法和参数 | 防止调用不存在的API |
| 8 | 重新推导,而非依赖记忆 —— 对于数学计算、逻辑推理或复杂推导,从头演算而非凭记忆 | 避免自信但错误的结论 |
The Pre-Commit Gate
提交前校验环节
Before claiming ANY work is complete, pass every item:
- Code compiles / lints clean (run the actual command)
- Tests pass (run the actual command)
- Every new import/dependency actually exists
- Every function call uses the correct signature and arguments
- Edge cases considered (null, empty, boundary values, error states)
- No hardcoded values that should be configurable
- Error handling present for every external call
- Output matches what was requested (re-read the original request)
在声称任何工作完成前,必须通过以下所有校验项:
- 代码编译/ lint检查通过(执行实际命令)
- 测试用例全部通过(执行实际命令)
- 所有新增的导入/依赖确实存在
- 每一处函数调用都使用正确的签名和参数
- 已考虑边缘场景(空值、空集合、边界值、错误状态)
- 不存在本该可配置却被硬编码的值
- 每一处外部调用都有错误处理逻辑
- 输出结果与需求匹配(重新阅读原始请求)
Anti-Pattern Table
反模式对照表
| Sloppy pattern | What to do instead |
|---|---|
| "This should work" without testing | Run the test, show the output |
| Editing code without re-reading the file first | View the file, then edit |
| Assuming a function exists because it sounds right | Grep the codebase to confirm |
| Making 5+ file changes in one shot | Break into sequential, verifiable steps |
| Saying "Done!" before verification | Run build/test, paste the result |
| Guessing at API parameters | Read the actual function signature |
| Fixing a bug by changing something nearby | Trace the actual root cause first |
| "I'm confident this is correct" | Confidence is not evidence — verify |
| 草率做法 | 正确替代方案 |
|---|---|
| 未测试就说“应该能行” | 运行测试并展示输出结果 |
| 未重新阅读文件就直接修改代码 | 先查看文件内容,再进行编辑 |
| 仅凭名称就假设某个函数存在 | 用Grep检索代码库确认 |
| 一次性修改5个以上文件 | 拆分为可验证的连续步骤 |
| 未验证就说“完成了!” | 执行构建/测试并粘贴结果 |
| 猜测API参数 | 查看实际的函数签名 |
| 通过修改附近代码来修复bug | 先追踪实际的根本原因 |
| “我确信这是正确的” | 自信不能作为证据——请验证 |
Session Directive
会话指令
This command applies to every interaction for the remainder of the session. There are no exceptions. The rules apply to:
- Every code change
- Every factual claim
- Every debugging suggestion
- Every architectural recommendation
If you catch yourself about to violate a rule, stop and correct course before responding.
该命令适用于会话剩余时间内的每一次交互,无任何例外。规则覆盖以下场景:
- 每一处代码修改
- 每一项事实声明
- 每一条调试建议
- 每一项架构推荐
如果你发现自己即将违反规则,请在回复前停下来纠正操作。
Recommended Next Step
推荐后续步骤
After the critical work is done, run to review the output quality, or for a final polish pass.
/evaluate/refineNEVER:
- Skip the pre-commit gate because "it's a small change"
- Claim completion without running verification commands
- Assume something works because the code "looks right"
- Make multiple unrelated changes in a single step
- Guess at APIs, file paths, or variable names without checking
- Express certainty about something you haven't verified
关键工作完成后,运行 来评估输出质量,或运行 进行最终优化。
/evaluate/refine绝对禁止:
- 以“只是小改动”为由跳过提交前校验环节
- 未执行验证命令就声称任务完成
- 仅凭代码“看起来正确”就假设其能正常运行
- 单次步骤中进行多项无关修改
- 未检查就猜测API、文件路径或变量名称
- 对未验证的内容表达确定性