verification-before-completion
Trigger
Activate before saying "done", "fixed", "完成了", "修好了", or shipping
any code change to the user. Also activate at the end of every task
from task-planning.
Principle
A claim of completion without verification is just optimism. Every deliverable needs a concrete check that would have caught the bug.
Inputs
task_description: what was being done.artifacts: files edited, commands run, tools called.risk_class:"code" | "data" | "info" | "config"— dictates the verification depth.
Steps
- Name the check up front (before writing the code) when possible: "I'll know this is fixed when X."
- For code (
codeclass):- Compile / type-check when available (e.g.
python -m compileall). - Run the relevant test or smoke suite.
- If no suitable test exists, author ONE small targeted test.
- Verify the output / exit code matches the expectation.
- Compile / type-check when available (e.g.
- For data transformations (
dataclass):- Spot-check 2-3 representative rows before and after.
- Confirm row counts match expected, or explain the delta.
- For factual claims (
infoclass):- Re-check via an independent fresh
read_urlorweb_search. - Never declare certainty from a single source.
- Re-check via an independent fresh
- For config / runtime changes (
configclass):- Boot / health-check the affected service.
- Exercise the one path the change touches.
- Summarize: what was verified, by what command/check, with what result.
Verification
- The step that would have caught the bug actually ran.
- The exit code / test result / fresh source is cited explicitly.
- "Done" is never claimed based on "it should work" or "looks right".
Failure Signals
- "Done" with no command output or test pass reference.
- Smoke / compileall skipped because "small change".
- Verification ran against stale cached data.
- The user later reports a regression the verification step would have caught — audit and tighten the check list.
Output Format
When reporting completion, always include a short verified block:
✅ 完成:<一句话结果> 验证: - <check 1> → <result> - <check 2> → <result>
If any check failed, DO NOT declare done — go back to
systematic-debugging.


