.claude/skills/openspec-sp-verify-before-complete/SKILL.md
完成前必须有验证证据。Proof precedes assertion. Use before reporting any task completion.
npx skillsauth add cenmiao/openspec-pro openspec-sp-verify-before-completeInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
核心规则:NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
证据先于断言。在报告完成前,必须有验证证据。
在以下情况前必须执行验证:
┌─────────────────────────────────────────────────────────┐
│ Verification Before Completion Process │
├─────────────────────────────────────────────────────────┤
│ │
│ 1. 选择验证方法 │
│ ┌─────────────────────────────────────┐ │
│ │ 根据变更内容选择: │ │
│ │ - 测试套件 → 运行测试 │ │
│ │ - 编译项目 → 确认 exit code 0 │ │
│ │ - 缺陷修复 → 测试原始症状 │ │
│ │ - 自动化代理 → 独立检查 │ │
│ └─────────────────────────────────────┘ │
│ │ │
│ ▼ │
│ 2. 执行验证 │
│ - 运行验证命令 │
│ - 读取输出结果 │
│ │
│ ▼ │
│ 3. 确认断言有证据支持 │
│ - 检查验证结果 │
│ - 确认所有断言被证实 │
│ │
│ ▼ │
│ 4. 然后才能输出 │
│ - 完成报告 │
│ - 满意度表达 │
│ - 任务转换 │
│ │
└─────────────────────────────────────────────────────────┘
# 运行测试
npm test
pytest
cargo test
验证标准:
# 编译/构建
npm run build
cargo build
go build
验证标准:
验证步骤:
验证步骤:
| 禁止 | 原因 | |------|------| | "should work" | 未验证 | | "probably fixed" | 未验证 | | "seems like it's done" | 未验证 | | "I'm confident" | 信心≠证据 |
| 使用 | 原因 | |------|------| | "Tests pass: 42/42" | 有证据 | | "Build succeeded (exit 0)" | 有证据 | | "Verified: symptom X is gone" | 有证据 |
当收到验证反馈时:
用户:这个功能完成了吗?
❌ 错误回答:
"是的,应该完成了。我很有信心。"
✅ 正确回答:
"让我验证一下。
[运行测试]
[读取输出]
验证结果:
- ✅ 测试通过:24/24
- ✅ 构建成功:exit 0
- ✅ 手动验证:功能正常工作
完成!功能已验证。"
用户:Bug 修复了吗?
❌ 错误回答:
"应该修复了,看起来没问题。"
✅ 正确回答:
"让我重现原始症状来验证。
[重现步骤]
[读取输出]
验证结果:
- ✅ 原始错误不再出现
- ✅ 回归测试通过
Bug 已修复并验证。"
在任何完成报告前,确认:
testing
Verify implementation matches change artifacts. Use when the user wants to validate that implementation is complete, correct, and coherent before archiving.
data-ai
Sync delta specs from a change to main specs. Use when the user wants to update main specs with changes from a delta spec, without archiving the change.
tools
TDD 红/绿/重构循环。铁律:先失败测试后实现。Use when implementing any new functionality.
development
子代理驱动开发 + 两阶段审查(规格合规→代码质量)。Use when implementing tasks that require high code quality.