--- name: implementation-verification description: Use after implementation complete to verify all tasks done, update roadmap, run full test suite, and create final report - ensures implementation completeness before finishing development branch --- # Implementation Verification ## What It Does 1. Verifies all tasks marked complete 2. Updates product roadmap 3. Runs entire test suite 4. Creates final verification report 5. Reports pass/fail with specific details **Pass = ready to finish. Fail = fix issues first.** ## The Process ### Step 1: Verify All Tasks ```bash SPEC="[provided by workflow]" cat "$SPEC/tasks.md" # Count tasks TOTAL=$(grep -c "^- \[.\]" "$SPEC/tasks.md") COMPLETE=$(grep -c "^- \[x\]" "$SPEC/tasks.md") INCOMPLETE=$(grep "^- \[ \]" "$SPEC/tasks.md") ``` **For each incomplete task:** ```bash TASK_ID=$(echo "$INCOMPLETE" | grep -o "[0-9]\.[0-9]") # Check for implementation report ls "$SPEC/implementation/" | grep -i "$TASK_ID" # Spot check code # [Search relevant files] ``` **If appears complete but not marked:** ``` Task [N.M]: [Description] Status: ⚠️ Appears complete, not marked Evidence: - Implementation report: [Yes/No] - Code changes: [Yes/No] - Files: [list] Marking complete... ``` **Update:** ```bash sed -i "s/^- \[ \] $TASK_ID/- [x] $TASK_ID/" "$SPEC/tasks.md" ``` **If truly incomplete:** ``` Task [N.M]: [Description] Status: ❌ NOT COMPLETE Evidence: - No report - No code changes - Missing: [list] Noted in verification report. ``` ### Step 2: Update Roadmap ```bash cat specs/product/roadmap.md SPEC_NAME=$(basename "$SPEC" | sed 's/^[0-9-]*//') # Find matching item grep -i "$SPEC_NAME" specs/product/roadmap.md ``` **If found:** ```bash LINE=$(grep -n "^[0-9]*\. \[ \].*$SPEC_NAME" specs/product/roadmap.md | cut -d: -f1) if [ ! -z "$LINE" ]; then sed -i "${LINE}s/\[ \]/\[x\]/" specs/product/roadmap.md fi ``` **Announce:** ``` ✅ Roadmap updated Marked complete: [Item] ``` **If not found:** ``` ℹ️ No matching roadmap item This might be: - Custom feature (not from roadmap) - Already marked complete - Named differently Skipping roadmap update. ``` ### Step 3: Run Full Test Suite **Detect test command:** ```bash if [ -f "package.json" ]; then TEST_CMD="npm test" elif [ -f "Cargo.toml" ]; then TEST_CMD="cargo test" elif [ -f "requirements.txt" ] || [ -f "pyproject.toml" ]; then TEST_CMD="pytest" elif [ -f "go.mod" ]; then TEST_CMD="go test ./..." else # Check CLAUDE.md or tech-stack.md TEST_CMD="[detect from docs]" fi # Run tests $TEST_CMD 2>&1 | tee test-output.log TEST_EXIT=$? ``` **Parse results:** ```bash PASSING=$(grep -c "PASS\|✓\|ok" test-output.log) FAILING=$(grep -c "FAIL\|✗\|not ok" test-output.log) FAILED_TESTS=$(grep -B 2 "FAIL\|✗" test-output.log) ``` ### Step 4: Create Final Report ```bash cat > "$SPEC/verification/final-verification.md" <