verification-before-completion

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Verification Before Completion

完工前验证

NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
无最新验证证据,不得做出任何完工声明

Core Protocol

核心协议

Evidence before claims, always. If you haven't run the verification command in this message, you cannot claim it passes.
BEFORE any completion claim:
1. IDENTIFY: What verification command proves this claim?
2. RUN: Execute the FULL command (fresh, complete)
3. READ: Full output, check exit code, count failures
4. VERIFY: Does output confirm the claim?
   - NO → State actual status with evidence
   - YES → State claim WITH evidence
5. ONLY THEN: Make the claim
永远先举证,后声明。如果你没有运行本文档中规定的验证命令,就不能宣称验证通过。
BEFORE any completion claim:
1. IDENTIFY: What verification command proves this claim?
2. RUN: Execute the FULL command (fresh, complete)
3. READ: Full output, check exit code, count failures
4. VERIFY: Does output confirm the claim?
   - NO → State actual status with evidence
   - YES → State claim WITH evidence
5. ONLY THEN: Make the claim

Command Selection

命令选择

When multiple verification options exist (mono-repo, multiple suites):
  • Run the most specific command that covers the changed code
  • When uncertain, run the broadest command (full test suite > single file)
  • Lint ≠ build ≠ test — each verifies different claims
当存在多个验证选项时(如单体仓库、多测试套件场景):
  • 运行覆盖改动代码的最具体的命令
  • 不确定时,运行覆盖范围最广的命令(全量测试套件 > 单文件测试)
  • Lint ≠ build ≠ test —— 三者分别验证不同的声明

Evidence Format

证据格式

✅ Ran: npm test
   Exit: 0
   Result: 47 passed, 0 failed
   "All tests pass."

❌ "Tests should pass now" (no command output)
✅ Ran: npm test
   Exit: 0
   Result: 47 passed, 0 failed
   "All tests pass."

❌ "Tests should pass now" (no command output)

Verification Requirements by Claim Type

按声明类型划分的验证要求

ClaimRequired EvidenceInsufficient
Tests passTest output: 0 failuresPrevious run, "should pass"
Linter cleanLinter output: 0 errorsPartial check, extrapolation
Build succeedsBuild exit code: 0Linter passing
Bug fixedOriginal symptom test passesCode changed
Regression testRed-green cycle verifiedSingle green
Agent completedVCS diff shows changesAgent "success" report
Requirements metLine-by-line checklistTests passing
声明类型所需证据无效举证
测试通过测试输出:0个失败之前的运行结果、"should pass"
Linter检查无异常Linter输出:0个错误部分检查、推断结果
构建成功构建退出码:0Linter检查通过
Bug已修复原故障复现用例测试通过代码已修改
回归测试通过红-绿流程已验证单次运行通过
Agent执行完成VCS diff显示变更Agent的"success"报告
需求已满足逐条核对的检查清单测试通过

Red Flags — STOP

危险信号 —— 立即停止

  • Words: "should", "probably", "seems to"
  • Satisfaction before verification: "Great!", "Perfect!", "Done!"
  • About to commit/push/PR without verification
  • Trusting agent success reports
  • Partial verification
  • ANY wording implying success without verification output
  • 措辞:"should"、"probably"、"seems to"
  • 验证前就表达满意:"Great!"、"Perfect!"、"Done!"
  • 未经验证就要提交/推送代码/发起PR
  • 轻信Agent的成功报告
  • 部分验证
  • 任何暗示成功但无验证输出的表述

Rationalization Prevention

避免合理化借口

ExcuseResponse
"Should work now"Run the verification
"I'm confident"Confidence ≠ evidence
"Just this once"No exceptions
"Linter passed"Linter ≠ build
"Agent said success"Verify independently
"Partial check enough"Partial proves nothing
借口回应
"Should work now"执行验证
"I'm confident"信心≠证据
"Just this once"没有例外
"Linter passed"Linter≠build
"Agent said success"独立验证
"Partial check enough"部分验证证明不了任何问题

Key Patterns

核心模式

Tests:
✅ [Run test] → [See: 34/34 pass] → "All tests pass"
❌ "Should pass now"
Regression (TDD):
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
❌ "Wrote regression test" (no red-green)
Requirements:
✅ Re-read plan → Checklist each item → Report gaps or completion
❌ "Tests pass, phase complete"
Agent delegation:
✅ Agent reports → Check VCS diff → Verify changes → Report actual state
❌ Trust agent report
测试:
✅ [Run test] → [See: 34/34 pass] → "All tests pass"
❌ "Should pass now"
回归测试(TDD):
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
❌ "Wrote regression test" (no red-green)
需求核对:
✅ Re-read plan → Checklist each item → Report gaps or completion
❌ "Tests pass, phase complete"
Agent委托任务:
✅ Agent reports → Check VCS diff → Verify changes → Report actual state
❌ Trust agent report