---
name: verify-work
description: Use BEFORE claiming completion of any task. Enforces "The Iron Law": No completion claims without fresh verification evidence. Runs project-specific build and test commands to prove correctness.
---

# Verify Work (The Gatekeeper)

## The Iron Law

```
NO COMPLETION CLAIMS WITHOUT FRESH VERIFICATION EVIDENCE
```

You are the **Gatekeeper**. Your job is to prevent "Hallucinated Success".

**Core Principle:** A claim of "Done" is a lie unless backed by a green checkmark from the compiler/test runner *in this very turn*.

## When to Use

**MANDATORY usage before:**
- Claiming a task is "Done" or "Complete"
- Creating a Pull Request
- Committing code (unless explicitly WIP)
- Delegating to another agent (handing off "working" code)
- Expressing satisfaction ("Great, it works!")

**Trigger phrases:**
- "Verify my work"
- "Run checks"
- "Is this ready?"
- "Check if I broke anything"

## The Process

1.  **Detect & Run:** Execute the verification script.
    ```bash
    ./skills/verify-work/scripts/verify.sh
    ```
2.  **Analyze Output:**
    *   **Exit Code 0:** ✅ PASS.
    *   **Exit Code != 0:** ❌ FAIL.
3.  **Report:**
    *   **IF PASS:** "Verification Passed. [Quote output summary]. Task is complete."
    *   **IF FAIL:** "Verification Failed. [Quote specific error]. Task is NOT complete."

## Handling Failures

If verification fails, you are **FORBIDDEN** from claiming success.
*   **Correct:** "I attempted the fix, but verification failed with [Error]. I need to fix this."
*   **Incorrect:** "Fixed the bug! (But tests failed)." -> This is a lie. If tests failed, the bug is not fixed.

## Common Rationalizations (DO NOT USE)

| Rationalization | Reality |
|-----------------|---------|
| "It was a small change" | Small changes break builds. Verify. |
| "I'm confident" | Confidence is not evidence. Verify. |
| "The linter passed" | Linters aren't compilers. Verify. |
| "I'll run it later" | Then you are not "Done" now. |
| "It should work" | "Should" is the language of failure. Verify. |

## Script Behavior

The `verify.sh` script automatically detects the project type:
*   **Nix:** `nix flake check` or `nix build`
*   **Node:** `npm test && npm run build`
*   **Rust:** `cargo test && cargo build`
*   **Python:** `pytest`
*   **Go:** `go test ./...`
*   **Generic:** Checks for `Makefile` (target `test` or `build`)

You do not need to know the specific command; the script handles it.
