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-work3id: verify-work4version: 2.0.05description: >6 Verification-as-terminal-state doctrine + subagent verification tool. A task is done7 ONLY when verified. Never stop at "I changed it" — only at "it's fixed and confirmed."8 Runs health probes, behavior smoke tests, drift checks, and spawns verifier subagents.9owner: AAA10risk_tier: low11autonomy_tier: T112floor_scope: [F1, F2, F4, F7, F11]13tags: [verification, terminal-state, check-work, self-verify, health, drift, smoke-test]14capability_tier: fed-agent-subagent15ecology_state: WARM16---1718# Verify Work — Verification Is the Terminal State1920> **"I changed it" is not done. "It's fixed and confirmed" is done.**21> **Lower entropy = verify every claim before accepting it.**2223## What This Skill Is2425A unified verification skill covering two modes:26271. **Runtime Verification** — post-deploy, post-restart health probes, behavior smoke tests, and drift checks282. **Subagent Verification** — spawn a verifier subagent that reviews diffs, runs builds/tests, and evaluates correctness2930## When to Use3132- Post-deploy, post-restart, post-skill-claim of "done"33- Weekly audit, pre-commit on runtime-touching code34- "Check work", "verify changes", "self-verify", "/check-work", "/check", "/verify", "/self-verify"35- Any time an agent claims completion without evidence3637## When NOT to Use3839- Curiosity or "what if" probes (this is for confirming completion)40- When the task is still in progress (use tasks/plan tracking instead)4142## §1. RUNTIME VERIFICATION4344### The Verification Contract4546Every agent that performs a mutation MUST run verification before claiming completion.4748```49Mutation → Self-check → Health probe → Behavior smoke → REPORT50 ^ |51 └────────────── NOT DONE until REPORT says GREEN ────────┘52```5354**Rules:**551. Never stop at "I applied the fix" — stop at "I confirmed the fix works"562. If you cannot verify the result, you have not finished573. If verification fails, revert the change and diagnose, don't patch over it584. The verifier agent (Auditor) must be DIFFERENT from the mutator agent (Engineer) for critical systems5960### Steps61621. `/root/apex-health.sh` — federation-wide port probe (all 8 organs)632. Per-organ health probes (parallel where possible):64 - arifOS: `curl -s :8088/health | python3 -m json.tool`65 - GEOX: `curl -s :8081/health | python3 -m json.tool`66 - WEALTH: `curl -s :18082/health | python3 -m json.tool`67 - WELL: `curl -s :18083/health | python3 -m json.tool`68 - A-FORGE: `curl -s :7071/health | python3 -m json.tool`693. Drift check: compare git source SHA vs runtime704. One behavior smoke per touched organ715. Report: green/yellow/red per organ + 1-line summary7273### Verification Loop7475- **All green → claim done** with structured receipt76- **Any yellow** → log cause + continue, flag in summary77- **Any red** → 888 HOLD, rollback via organ's deploy-local, log `{who, what, why, result}`7879### Output Format8081```json82{83 "who": "<agent_id>",84 "what": "verify-runtime",85 "why": "post-deploy verification",86 "result": {87 "organs": {"arifos": "green", "aforge": "green", ...},88 "drift": "none",89 "smoke_tests": {"arif_init": "pass"},90 "verdict": "done"91 }92}93```9495### Failure Modes9697| Mode | Action |98|------|--------|99| Service slow to start | 30s grace, then red |100| Port collision | Check Caddy/port registry, surface to human |101| Drift detected | Run `make deploy-local` in the affected organ |102| Health endpoint missing | Check organ's main.py / server.js for `/health` route |103| Smoke test fails | Revert the change, diagnose root cause |104| Cannot verify | Do not claim done. Escalate. |105106## §2. SUBAGENT VERIFICATION (/check-work)107108### Mode Detection109110- **Same-turn mode**: There is a user task alongside this skill. **Complete the task fully first**, then proceed.111- **Standalone mode**: Just `/check-work`. Proceed directly.112113### Steps1141151. Call the `task` tool with:116 - `description`: must start with `"[checking my work]"` followed by a short label117 - `subagent_type`: `"general-purpose"`118 - `run_in_background`: `false`119 - `prompt`: copy the VERIFIER PROMPT below. If a focus area was specified, append it.1201212. Read the subagent's result. Look for `VERDICT: PASS` or `VERDICT: FAIL`.1221233. If **PASS**: summarize what the verifier confirmed and stop.1241254. If **FAIL**: fix the issues, then go back to step 1. Repeat up to 3 times.126127### VERIFIER PROMPT128129You are an expert verifier. Your job is to determine whether the work done in this session correctly and completely addresses the user's requests.130131**PHASE A: TRACE REVIEW** (always runs)1321. UNDERSTAND THE REQUEST — identify everything the user asked for as a concrete checklist1332. RECONSTRUCT WHAT HAPPENED — trace actions, look for failures, missed items, incorrect answers1343. VERIFY CURRENT STATE — inspect the environment yourself. Do not trust claims.135136**PHASE B: CODE REVIEW** (runs when code is involved)1374. COLLECT THE DIFF — `git diff`, `git diff --cached`, `git log --oneline -3`1385. EVALUATE THE CODE — correctness, adequacy, excess, edge cases1396. BUILD AND TEST — read AGENTS.md/README for commands, run them1407. DESIGN AND RUN VERIFICATION CHECKS — write your own tests if needed1418. REVIEW THE CODE — bugs, security, regressions, test quality142143**VERDICT:**144- `VERDICT: PASS` — work correctly and adequately addresses requests145- `VERDICT: FAIL` — issues need fixing (describe what, exact errors, what needs to change)146147### Important Principles148149- Verify outcomes, not just code150- Do not accept proxy signals as proof of completion151- Do not invent issues to fill space152- Focus on whether the work addresses what the user actually asked for153- Violations of rules in repo's AGENTS.md / Claude.md are policy, not nitpicks154155### Output Format156157```158## Checklist159## Action Trace160## Diff Summary / Code Scope (Phase B only)161## Evaluation162## Build & Test Results (Phase B only)163## Issues164VERDICT: PASS / FAIL165```