完成前的验证
- 作者仓库星标 0
- 作者更新于 2026年8月12日 16:53
- 作者仓库 superpowers
- 领域
- 通用
- 作者声明的智能体
- 未找到明确声明;不据此推断已兼容或已测试
- 静态检查
- 88 / 100 · 启发式扫描,不代表运行安全
- 运行环境证据
- 未执行;当前没有隔离运行测试证据
- 作者 / 版本 / 许可证
- @obra · 未声明许可证
- 上下文用量评级
- 低消耗
- 接入复杂程度
- 需简单配置
- 是否需要外部接口密钥
- 不需要
- 兼容的系统
- 未声明(默认跨平台)
- 运行环境要求
- 未检出明确要求
- 检测到的文件与系统行为
-
- 只读
- 允许写入 / 修改
- 命令执行
- 网络行为
- 仅限本地
- 安装命令数
- 无(仅作为资料)
需要注意: 未声明工具权限范围;实际权限由运行环境决定。
# Verification Before Completion
## Overview
**Core principle:** Evidence before claims, always.
**Violating the letter of this rule is violating the spirit of this rule.**
## The Iron Law
```
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
```
If you haven't run the verification command in this message, you cannot claim it passes.
## The Gate Function
```
BEFORE claiming any status or expressing satisfaction:
1. IDENTIFY: What 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?
- If NO: State actual status with evidence
- If YES: State claim WITH evidence
5. ONLY THEN: Make the claim
Skip any step = lying, not verifying
```
## Common Failures
| Claim | Requires | Not Sufficient |
|-------|----------|----------------|
| Tests pass | Test command output: 0 failures | Previous run, "should pass" |
| Linter clean | Linter output: 0 errors | Partial check, extrapolation |
| Build succeeds | Build command: exit 0 | Linter passing, logs look good |
| Bug fixed | Test original symptom: passes | Code changed, assumed fixed |
| Regression test works | Red-green cycle verified | Test passes once |
| Agent completed | VCS diff shows changes | Agent reports "success" |
| Requirements met | Line-by-line checklist | Tests passing |
## Red Flags - STOP
- Using "should", "probably", "seems to"
- Expressing satisfaction before verification ("Great!", "Perfect!", "Done!", etc.)
- About to commit/push/PR without verification
- Trusting agent success reports
- Relying on partial verification
- Thinking "just this once"
- Tired and wanting work over
- **ANY wording implying success without having run verification**
## Rationalization Prevention
| Excuse | Reality |
|--------|---------|
| "Should work now" | RUN the verification |
| "I'm confident" | Confidence ≠ evidence |
| "Just this once" | No exceptions |
| "Linter passed" | Linter ≠ compiler |
| "Agent said success" | Verify independently |
| "I'm tired" | Exhaustion ≠ excuse |
| "Partial check is enough" | Partial proves nothing |
| "Different words so rule doesn't apply" | Spirit over letter |
## Key Patterns
**Tests:**
```
✅ [Run test command] [See: 34/34 pass] "All tests pass"
❌ "Should pass now" / "Looks correct"
```
**Regression tests (TDD Red-Green):**
```
✅ Write → Run (pass) → Revert fix → Run (MUST FAIL) → Restore → Run (pass)
❌ "I've written a regression test" (without red-green verification)
```
**Build:**
```
✅ [Run build] [See: exit 0] "Build passes"
❌ "Linter passed" (linter doesn't check compilation)
```
**Requirements:**
```
✅ Re-read plan → Create checklist → Verify each → Report gaps or completion
❌ "Tests pass, phase complete"
```
**Agent delegation:**
```
✅ Agent reports success → Check VCS diff → Verify changes → Report actual state
❌ Trust agent report
```
## When To Apply
**ALWAYS before:**
- ANY variation of success/completion claims
- ANY expression of satisfaction
- ANY positive statement about work state
- Committing, PR creation, task completion
- Moving to next task
- Delegating to agents
**Rule applies to:**
- Exact phrases
- Paraphrases and synonyms
- Implications of success
- ANY communication suggesting completion/correctness
章节与文件索引
按说明文件中的顺序排列。
概述
铁律
常见故障
危险信号 - 停止
合理化预防
文件/命令 -> commit/push/PR · 34/34 · success/completion · completion/correctness
内容校验值 -> 105545c9dca4
verification-before-completion 是一条反「自我感觉良好」的纪律:不跑验证就声称完成,是不诚实而非高效。Iron Law:NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE. 如果你没在这条消息里跑过验证命令,就不能声称它过。
设计思路
作者把「完成」当成需要证据的法律陈述。"should pass"、"probably works"、"linter passed so build OK"——这些都是 rationalization,不是 evidence。所有完成宣言都必须挂在「fresh,full 命令的退出码 + 输出」上。
Gate Function
每次声称任何状态 / 表达满意之前,按这五步走:① IDENTIFY:哪条命令能证明这条主张?② RUN:完整跑那条命令(fresh、不省略);③ READ:读完整输出、检 exit code、数失败数;④ VERIFY:输出真的支持你的主张吗?不支持就如实说现状 + 证据;⑤ THEN 才能宣告。跳过任何一步 = 撒谎,不是验证。
常见声称 → 必需证据 → 不充分
Red Flags - STOP
出现这些信号停手:用 "should" / "probably" / "seems to";在验证前说 "Great!" / "Perfect!" / "Done!";准备 commit / push / PR 但没验过;信任 agent 的 success 报告;只做了局部验证;想着「这次破例」;累了想收工;任何含有「成功」语义但没跑验证的措辞。
反 Rationalization
"Should work now" → RUN the verification;"I'm confident" → confidence ≠ evidence;"Just this once" → 没有例外;"Linter passed" → linter ≠ compiler;"Agent said success" → 自己独立验;"I'm tired" → 累不是借口;"Partial check is enough" → partial proves nothing;"措辞不一样所以规则不适用" → spirit over letter。
适合谁
不适合
配套
tdd/test-driven-development(验证的 testing 部分)、systematic-debugging(修 bug 的证据流)、receiving-code-review(reviewer 反馈的同款语言纪律)、debugging-with-humility(同主旋律)、ship(落地链路里挂这条 gate)。