Verification Before Completion
You are verifying that a task is genuinely complete before it's marked as done. The goal is to prevent the common failure mode where an agent declares success while the problem still exists.
When to Activate
-
At every task checkpoint during plan execution
-
Before marking a Linear issue as done
-
After fixing a bug (verify the fix, not just that the code compiles)
-
Before shipping — final pre-review verification
Preconditions
This skill is invoked directly by executing-plans at each task checkpoint. No independent precondition checks are needed.
Activation
After being invoked, print the activation banner (see _shared/observability.md ):
Verification Before Completion activated Trigger: Task checkpoint reached Produces: 4-level verification report
Verification Protocol
Level 1: Build Verification
Narrate: Level 1/4: Build verification...
Minimum bar — the project compiles and runs:
-
Build succeeds: Run the build command, check for zero errors
-
No type errors: Run typecheck (tsc --noEmit or equivalent)
-
Lint passes: Run the linter with zero errors (warnings OK)
If Level 1 fails, the task is NOT complete. Stop and fix.
Narrate: Level 1/4: Build verification... [PASS/FAIL]
Level 2: Test Verification
Narrate: Level 2/4: Test verification...
Tests prove the behavior works:
-
All tests pass: Run the full test suite, not just the new tests
-
New tests exist: The task's changes should have corresponding tests
-
Tests are meaningful: The tests actually verify the behavior, not just that the code runs
-
No skipped tests: describe.skip or test.todo for the current task's tests = not done
Verify tests are genuine by checking:
-
Does the test fail if you revert the implementation change?
-
Does the test cover the acceptance criteria from the issue?
-
Does the test cover edge cases mentioned in the plan?
Narrate: Level 2/4: Test verification... [PASS/FAIL]
Level 3: Acceptance Criteria
Narrate: Level 3/4: Acceptance criteria...
The issue's requirements are met:
-
Read the acceptance criteria from the Linear issue
-
Check each criterion individually: Acceptance Criteria:
-
Users can log in with email/password — VERIFIED (test: auth.test.ts:24)
-
Invalid credentials show error message — VERIFIED (test: auth.test.ts:38)
-
Rate limiting after 5 failed attempts — NOT VERIFIED (no test, no implementation found)
-
If any criterion is unmet: The task is NOT complete
Narrate: Level 3/4: Acceptance criteria... [PASS/FAIL]
Level 4: Integration Verification
Narrate: Level 4/4: Integration verification...
The changes work in context:
-
No regression: Pre-existing tests still pass
-
No side effects: Changes don't break unrelated features
-
API contracts: If you changed an interface, all consumers are updated
-
Data consistency: If you changed a schema, migrations exist and work
Verification Strategies
For Bug Fixes
-
Confirm the original reproduction steps no longer trigger the bug
-
Confirm the regression test fails on the old code and passes on the new
-
Check for related bugs that might have the same root cause
For New Features
-
Walk through the user flow end-to-end (mentally or via tests)
-
Check empty states, error states, edge cases
-
Verify the feature is discoverable and documented
For Refactors
-
Behavior is identical before and after (tests prove this)
-
Performance is not degraded (if relevant)
-
The refactored code is actually cleaner (not just different)
Narrate: Level 4/4: Integration verification... [PASS/FAIL]
Failure Handling
When verification fails:
Document what failed:
VERIFICATION FAILED Level: [1/2/3/4] Criterion: [what was being checked] Expected: [what should happen] Actual: [what happened instead]
Don't retry blindly — Analyze why it failed first. Log the decision:
Decision: [Retry approach] Reason: [root cause analysis] Alternatives: [other fix strategies considered]
Fix the root cause, then re-verify from Level 1
Max 3 retries — After 3 failures, use error recovery (see _shared/observability.md ). AskUserQuestion with options: "Retry from Level 1 with different approach / Skip this verification level / Stop and report for manual review."
Completion Report
Only after all relevant levels pass:
Verification: PASS
Build: Clean Tests: [N] passing, 0 failing, [N] new Acceptance Criteria: [N/N] met Integration: No regressions
Task is genuinely complete.
Or if issues remain:
Verification: BLOCKED
Passing: Levels 1-2 Failing: Level 3 — acceptance criterion [X] unmet Details: [what's missing and why] Recommendation: [what needs to happen next]
Task is NOT complete.
Rules
-
Never mark a task as done without running verification
-
Never trust "it should work" — run the actual commands and check the actual output
-
Tests passing is necessary but not sufficient — check acceptance criteria too
-
If there's no test suite, flag it as a risk but don't block on it
-
Verification should be fast — if it takes more than 2 minutes, the project's test/build setup needs improvement (flag this)
-
Be honest about failures — a clearly reported failure is more valuable than a false success