Verify Work — Verification Is the Terminal State
"I changed it" is not done. "It's fixed and confirmed" is done.
Lower entropy = verify every claim before accepting it.
What This Skill Is
A unified verification skill covering two modes:
- Runtime Verification — post-deploy, post-restart health probes, behavior smoke tests, and drift checks
- Subagent Verification — spawn a verifier subagent that reviews diffs, runs builds/tests, and evaluates correctness
When to Use
- Post-deploy, post-restart, post-skill-claim of "done"
- Weekly audit, pre-commit on runtime-touching code
- "Check work", "verify changes", "self-verify", "/check-work", "/check", "/verify", "/self-verify"
- Any time an agent claims completion without evidence
When NOT to Use
- Curiosity or "what if" probes (this is for confirming completion)
- When the task is still in progress (use tasks/plan tracking instead)
§1. RUNTIME VERIFICATION
The Verification Contract
Every agent that performs a mutation MUST run verification before claiming completion.
Mutation → Self-check → Health probe → Behavior smoke → REPORT
^ |
└────────────── NOT DONE until REPORT says GREEN ────────┘
Rules:
- Never stop at "I applied the fix" — stop at "I confirmed the fix works"
- If you cannot verify the result, you have not finished
- If verification fails, revert the change and diagnose, don't patch over it
- The verifier agent (Auditor) must be DIFFERENT from the mutator agent (Engineer) for critical systems
Steps
/root/apex-health.sh — federation-wide port probe (all 8 organs)
- Per-organ health probes (parallel where possible):
- arifOS:
curl -s :8088/health | python3 -m json.tool
- GEOX:
curl -s :8081/health | python3 -m json.tool
- WEALTH:
curl -s :18082/health | python3 -m json.tool
- WELL:
curl -s :18083/health | python3 -m json.tool
- A-FORGE:
curl -s :7071/health | python3 -m json.tool
- Drift check: compare git source SHA vs runtime
- One behavior smoke per touched organ
- Report: green/yellow/red per organ + 1-line summary
Verification Loop
- All green → claim done with structured receipt
- Any yellow → log cause + continue, flag in summary
- Any red → 888 HOLD, rollback via organ's deploy-local, log
{who, what, why, result}
Output Format
{
"who": "<agent_id>",
"what": "verify-runtime",
"why": "post-deploy verification",
"result": {
"organs": {"arifos": "green", "aforge": "green", ...},
"drift": "none",
"smoke_tests": {"arif_init": "pass"},
"verdict": "done"
}
}
Failure Modes
| Mode |
Action |
| Service slow to start |
30s grace, then red |
| Port collision |
Check Caddy/port registry, surface to human |
| Drift detected |
Run make deploy-local in the affected organ |
| Health endpoint missing |
Check organ's main.py / server.js for /health route |
| Smoke test fails |
Revert the change, diagnose root cause |
| Cannot verify |
Do not claim done. Escalate. |
§2. SUBAGENT VERIFICATION (/check-work)
Mode Detection
- Same-turn mode: There is a user task alongside this skill. Complete the task fully first, then proceed.
- Standalone mode: Just
/check-work. Proceed directly.
Steps
Call the task tool with:
description: must start with "[checking my work]" followed by a short label
subagent_type: "general-purpose"
run_in_background: false
prompt: copy the VERIFIER PROMPT below. If a focus area was specified, append it.
Read the subagent's result. Look for VERDICT: PASS or VERDICT: FAIL.
If PASS: summarize what the verifier confirmed and stop.
If FAIL: fix the issues, then go back to step 1. Repeat up to 3 times.
VERIFIER PROMPT
You are an expert verifier. Your job is to determine whether the work done in this session correctly and completely addresses the user's requests.
PHASE A: TRACE REVIEW (always runs)
- UNDERSTAND THE REQUEST — identify everything the user asked for as a concrete checklist
- RECONSTRUCT WHAT HAPPENED — trace actions, look for failures, missed items, incorrect answers
- VERIFY CURRENT STATE — inspect the environment yourself. Do not trust claims.
PHASE B: CODE REVIEW (runs when code is involved)
4. COLLECT THE DIFF — git diff, git diff --cached, git log --oneline -3
5. EVALUATE THE CODE — correctness, adequacy, excess, edge cases
6. BUILD AND TEST — read AGENTS.md/README for commands, run them
7. DESIGN AND RUN VERIFICATION CHECKS — write your own tests if needed
8. REVIEW THE CODE — bugs, security, regressions, test quality
VERDICT:
VERDICT: PASS — work correctly and adequately addresses requests
VERDICT: FAIL — issues need fixing (describe what, exact errors, what needs to change)
Important Principles
- Verify outcomes, not just code
- Do not accept proxy signals as proof of completion
- Do not invent issues to fill space
- Focus on whether the work addresses what the user actually asked for
- Violations of rules in repo's AGENTS.md / Claude.md are policy, not nitpicks
Output Format
## Checklist
## Action Trace
## Diff Summary / Code Scope (Phase B only)
## Evaluation
## Build & Test Results (Phase B only)
## Issues
VERDICT: PASS / FAIL
1---2name: verify-work3description: Verification-as-terminal-state doctrine + subagent verification tool. A task is done ONLY when verified. Never stop at "I changed it" — only at "it's fixed and confirmed." Runs health probes, behavior smoke tests, drift checks, and spawns verifier subagents.4---56# Verify Work — Verification Is the Terminal State78> **"I changed it" is not done. "It's fixed and confirmed" is done.**9> **Lower entropy = verify every claim before accepting it.**1011## What This Skill Is1213A unified verification skill covering two modes:14151. **Runtime Verification** — post-deploy, post-restart health probes, behavior smoke tests, and drift checks162. **Subagent Verification** — spawn a verifier subagent that reviews diffs, runs builds/tests, and evaluates correctness1718## When to Use1920- Post-deploy, post-restart, post-skill-claim of "done"21- Weekly audit, pre-commit on runtime-touching code22- "Check work", "verify changes", "self-verify", "/check-work", "/check", "/verify", "/self-verify"23- Any time an agent claims completion without evidence2425## When NOT to Use2627- Curiosity or "what if" probes (this is for confirming completion)28- When the task is still in progress (use tasks/plan tracking instead)2930## §1. RUNTIME VERIFICATION3132### The Verification Contract3334Every agent that performs a mutation MUST run verification before claiming completion.3536```37Mutation → Self-check → Health probe → Behavior smoke → REPORT38 ^ |39 └────────────── NOT DONE until REPORT says GREEN ────────┘40```4142**Rules:**431. Never stop at "I applied the fix" — stop at "I confirmed the fix works"442. If you cannot verify the result, you have not finished453. If verification fails, revert the change and diagnose, don't patch over it464. The verifier agent (Auditor) must be DIFFERENT from the mutator agent (Engineer) for critical systems4748### Steps49501. `/root/apex-health.sh` — federation-wide port probe (all 8 organs)512. Per-organ health probes (parallel where possible):52 - arifOS: `curl -s :8088/health | python3 -m json.tool`53 - GEOX: `curl -s :8081/health | python3 -m json.tool`54 - WEALTH: `curl -s :18082/health | python3 -m json.tool`55 - WELL: `curl -s :18083/health | python3 -m json.tool`56 - A-FORGE: `curl -s :7071/health | python3 -m json.tool`573. Drift check: compare git source SHA vs runtime584. One behavior smoke per touched organ595. Report: green/yellow/red per organ + 1-line summary6061### Verification Loop6263- **All green → claim done** with structured receipt64- **Any yellow** → log cause + continue, flag in summary65- **Any red** → 888 HOLD, rollback via organ's deploy-local, log `{who, what, why, result}`6667### Output Format6869```json70{71 "who": "<agent_id>",72 "what": "verify-runtime",73 "why": "post-deploy verification",74 "result": {75 "organs": {"arifos": "green", "aforge": "green", ...},76 "drift": "none",77 "smoke_tests": {"arif_init": "pass"},78 "verdict": "done"79 }80}81```8283### Failure Modes8485| Mode | Action |86|------|--------|87| Service slow to start | 30s grace, then red |88| Port collision | Check Caddy/port registry, surface to human |89| Drift detected | Run `make deploy-local` in the affected organ |90| Health endpoint missing | Check organ's main.py / server.js for `/health` route |91| Smoke test fails | Revert the change, diagnose root cause |92| Cannot verify | Do not claim done. Escalate. |9394## §2. SUBAGENT VERIFICATION (/check-work)9596### Mode Detection9798- **Same-turn mode**: There is a user task alongside this skill. **Complete the task fully first**, then proceed.99- **Standalone mode**: Just `/check-work`. Proceed directly.100101### Steps1021031. Call the `task` tool with:104 - `description`: must start with `"[checking my work]"` followed by a short label105 - `subagent_type`: `"general-purpose"`106 - `run_in_background`: `false`107 - `prompt`: copy the VERIFIER PROMPT below. If a focus area was specified, append it.1081092. Read the subagent's result. Look for `VERDICT: PASS` or `VERDICT: FAIL`.1101113. If **PASS**: summarize what the verifier confirmed and stop.1121134. If **FAIL**: fix the issues, then go back to step 1. Repeat up to 3 times.114115### VERIFIER PROMPT116117You are an expert verifier. Your job is to determine whether the work done in this session correctly and completely addresses the user's requests.118119**PHASE A: TRACE REVIEW** (always runs)1201. UNDERSTAND THE REQUEST — identify everything the user asked for as a concrete checklist1212. RECONSTRUCT WHAT HAPPENED — trace actions, look for failures, missed items, incorrect answers1223. VERIFY CURRENT STATE — inspect the environment yourself. Do not trust claims.123124**PHASE B: CODE REVIEW** (runs when code is involved)1254. COLLECT THE DIFF — `git diff`, `git diff --cached`, `git log --oneline -3`1265. EVALUATE THE CODE — correctness, adequacy, excess, edge cases1276. BUILD AND TEST — read AGENTS.md/README for commands, run them1287. DESIGN AND RUN VERIFICATION CHECKS — write your own tests if needed1298. REVIEW THE CODE — bugs, security, regressions, test quality130131**VERDICT:**132- `VERDICT: PASS` — work correctly and adequately addresses requests133- `VERDICT: FAIL` — issues need fixing (describe what, exact errors, what needs to change)134135### Important Principles136137- Verify outcomes, not just code138- Do not accept proxy signals as proof of completion139- Do not invent issues to fill space140- Focus on whether the work addresses what the user actually asked for141- Violations of rules in repo's AGENTS.md / Claude.md are policy, not nitpicks142143### Output Format144145```146## Checklist147## Action Trace148## Diff Summary / Code Scope (Phase B only)149## Evaluation150## Build & Test Results (Phase B only)151## Issues152VERDICT: PASS / FAIL153```