/agentheim:verification-before-completionfrom agentheim
Spawns a separate verifier agent with fresh context to inspect diffs against acceptance criteria before git commit. Catches plausible-but-wrong code, partial implementations, and scope drift that self-checks miss.
Ships in agentheim. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
The worker just returned RESULT: SUCCESS. Trust nothing yet. A worker self-reporting success has the strongest possible incentive to call its own work done — every cognitive bias is aligned against catching its own mistakes. This skill is the structural answer: a separate agent, fresh context, reading the diff against the acceptance criteria as if seeing the work for the first time.
LLM workers fail in three distinctive ways that internal self-checks rarely catch:
The verifier catches all three because it reads only the task spec and the diff — it has no exposure to the worker's reasoning trail and no investment in the solution.
If work ran the checks inline, it would do so in the same context that just dispatched the worker and is about to commit. That context carries momentum toward "ship it". A separately spawned agent reads only what it's handed — the task file, the BC README, the diff, the test output — and produces a verdict without that momentum. This is the load-bearing structural property; do not collapse it into a function call.
The work skill spawns verifier per skills/work/SKILL.md's Verifier Prompt Template —
the authoritative source for the exact field list, restated here only as a pointer to avoid a
second copy drifting out of sync. That template supplies: the task file's absolute path (in
doing/, on main — read-only, agentic-workflow-ghcaj), the BC name and README path, the worktree's absolute
path, the iteration number, the diff, the worker's strict SUCCESS return block, the parsed
bookkeeping blocks (readmeDelta / adrs / outcome / backlogItems — agentic-workflow-
ghcaj; there is no README/ADR diff to read, since the worker never writes those files), a
pre-resolved test command, a pre-resolved launch command, and pointers to .agentheim/knowledge/vision.md,
.agentheim/knowledge/context-map.md, and .agentheim/knowledge/decisions/ for on-demand reading.
The verifier is explicitly NOT given:
## Verifier note (iteration N) sections that
work appends on each FAIL — the verifier may read those, but only to compare a criterion's
recorded measurement/proxy against the current diff's for metric-drift detection, never to
bias re-judgment of a criterion that shows no drift.agents/verifier.md's "The checks, in order" section is the authoritative, numbered list — restated here only as a pointer to avoid a second copy drifting out of sync (the six-drift history on this exact section, agentic-workflow-s9wtc, is why this is now a pointer). In order, stopping at the first failing check: 1 acceptance criteria coverage (human-eye carve-out, ADR-0061; runtime-surface narrowing, ADR-0036) → 1b metric drift across iterations (ADR-0061) → 2 test execution, verdict from the runner only (ADR-0062) → 3 scope discipline → 4 ubiquitous language → 5 BC README sync → 6 ADRs for decisions → 6b honored related ADRs → 6c mechanize-or-drop convention enforcement (ADR-0059) → 7 no protocol/index/git tampering → 8 runtime drive (ADR-0036), final and most expensive. See agents/verifier.md for each check's full text.
The verifier returns one of three verdicts. Strict format — work parses these deterministically.
VERDICT: PASSThe diff is committable. work proceeds per the PASS bullet under "What work does with each verdict" below (agentic-workflow-ghcaj, ADR-0074) — the conductor materializes, in order, README delta(s), ADR(s) + finalizeAdrNumbering, the ## Outcome append, the real doing → done move, any new backlog items, then commits once. That sequence, not a restatement here, is canonical; in particular it never stages the worker's raw FILE_LIST directly — only the complete manifest's changed subset (ADR-0057).
VERDICT: PASS
TASK_ID: <id>
EVIDENCE: <one line per acceptance criterion, naming the test or artifact that covers it —
or "builder eye-check pending" for a `[human-eye]` criterion (ADR-0061)>
VERDICT: FAILThe diff is not committable. work rolls back the worker's claim of completion and re-dispatches.
VERDICT: FAIL
TASK_ID: <id>
REASONS:
- <one bullet per concrete defect, citing the file/line where possible>
SUGGESTED_FIX: <brief — what the next worker should do>
ITERATION_HINT: likely-fixable | task-under-specified
VERDICT: SKIPRare. The task is type: decision with an ADR-only deliverable, or the verifier determines there is nothing executable to verify and reading the artifact against the spec is what the user should do, not the verifier. work treats this as PASS but logs it differently.
VERDICT: SKIP
TASK_ID: <id>
REASON: <why verification doesn't usefully apply to this task>
work does with each verdictThe operational integration lives in skills/work/SKILL.md. In short:
main, in order — README delta(s), ADR(s) + finalizeAdrNumbering, the ## Outcome append, the real doing → done move (here, for the first time — the worker's worktree never touched the task file at all, agentic-workflow-ghcaj), any new backlog items — then commits once, and logs "Task verified and completed" to protocol.md.main (there is no worktree copy to append to or revert — the file never moved out of doing/ in the first place, post-ghcaj) as a ## Verifier note block, log "Verification failed" to protocol.md, re-dispatch a worker on the same task with the verifier note included in its prompt. Hard cap: 2 re-dispatches per task.escalated-iterN (ADR-0063) and append a ## Salvage note to the task file naming the patch's absolute path — the worktree is kept, not removed, at this point, but a later discard (a subsequent session's Phase 1 recovery or session-end reconciliation) could still lose the fix if nothing was captured first. Leave the task in doing/ with all accumulated verifier notes. Log "Verification failed — escalating to user" to protocol.md. Surface at end of batch, naming the salvaged patch's path explicitly.The re-dispatch loop has a cap because beyond two retries you're almost always looking at an under-specified task that needs refinement (the modeller's job), not another execution attempt.
The user can disable verification for a work batch by invoking work with --no-verify or by saying "skip verification this run". This is for exploratory throwaway batches. The default is always verify; the opt-out is never persistent.
work also skips verification automatically when:
RESULT: BOUNCED or RESULT: FAILED (nothing to verify)type: decision AND FILES_CHANGED == 0 AND the worker's ADRS block carries exactly one entry (the ADR travels in the block, never as a file — agentic-workflow-ghcaj) — auto-SKIP without spawning the verifier.When the worker followed test-driven-development, the verifier's first check (acceptance criteria coverage) becomes trivial — every criterion has a named test. When the worker skipped TDD, the verifier has to re-derive the test space and judge whether non-test evidence covers each criterion. Both flows are supported; TDD makes verification an order of magnitude cheaper.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub heimeshoff/agentheim --plugin agentheim10 skills in this plugin
/brainstormUse whenever the user wants to start a new project, create a vision, do a Socratic modeling or discovery session, explore a problem space from scratch, or set up an initial context map and bounded contexts. Triggers on phrases like "let's brainstorm", "start a new project", "create a vision", "I want to build X", "model this out from scratch", "help me think through", "what should the shape of this be". Produces .agentheim/knowledge/vision.md (and context-map.md if the domain is complex enough to warrant bounded contexts), and closes with an architecture foundation pass that unconditionally creates an `infrastructure/` BC (the standing home for globally-true tech concerns), emits decision tasks (globally-true → infrastructure BC, BC-local → originating BC), a walking-skeleton spike, and (when the vision implies frontend) a styleguide task. Deliberately produces no code — every output is markdown the user can review before `work` runs. Supports six switchable conversational modes (Interrogator [default], Suggestor, Challenger, Storyteller, Facilitator, Synthesizer) — see references/modes.md./inquireAnswer a question about the codebase of an Agentheim-managed project — how a feature works, where something lives, what was decided and why, or whether something is built yet — by reading the project's own structure (the index, the bounded-context READMEs, the ADRs, the task boards) and verifying against the actual source. Read-only. Invoke it directly when you want a thorough, code-grounded answer that separates what's decided from what's actually implemented./modelingUse whenever the user wants to capture an idea, bug, feature request, refinement, or change to an existing bounded context — anything from "the button should be green" to "we need a whole new subscription subsystem". Also use when the user wants to refine existing backlog items or promote refined items to ready-to-work. Triggers on phrases like "I have an idea", "let's model this", "let's do some modeling", "capture this", "add this to the backlog", "refine the auth backlog", "promote X to todo", "we should also", "what if we added", "there's a bug", "change the color of", "the domain needs to handle". Creates task markdown files in the appropriate bounded context with the right status, and can spawn deeper modeling sessions via the orchestrator. Supports six switchable conversational modes (Interrogator [default], Suggestor, Challenger, Storyteller, Facilitator, Synthesizer) during CAPTURE and REFINE — see references/modes.md./quick-captureUse whenever the user wants to dump an idea, bug, or feature into the backlog FAST — no conversation, no questions, no refinement. This is the quick-jot entry point: the user is offloading a thought and wants to keep moving, not think it through. Triggers on phrases like "capture this", "jot this down", "quick capture", "note for later", "dump this in the backlog", "just file it", "add this without discussing", "brain-dump", "stick this in <bc>", "log this idea", "don't ask, just record it", and on rapid-fire multi-idea lists ("three things: A, B, C"). Routes each idea to the best-fit bounded context, writes one backlog task per idea, and reports where each landed in a single line — then gets out of the way. If the user instead wants to think an idea through, refine it, or talk it over, that's `modeling`, not this. Quick-capture never asks clarifying questions and never writes to todo — captured tasks are deliberately raw and always need a later refinement pass./researchUse whenever the user or another skill needs external information gathered from the web — state of the art on a topic, comparison of approaches, documentation for a library, domain knowledge from outside the codebase. Triggers on phrases like "research X", "find out about", "what's the state of the art for", "look up how others do", "compare options for", "gather info on", and also triggers internally when brainstorm or model hits an "I don't know enough" wall. Produces a research report in .agentheim/knowledge/research/ that can be referenced from tasks, ADRs, and modeling sessions. Every report passes through a fresh-context `research-reviewer` agent (see `skills/research-review/SKILL.md`) that re-verifies its checkable claims against primary sources before the report is citable./research-reviewUse whenever the `research` skill is about to ship a researcher's report — between the researcher's return and the report being treated as citable knowledge. Triggers internally from `research`'s post-write gate. Spawns the `research-reviewer` agent with fresh context (no exposure to the researcher's reasoning) to re-verify the report's decision-critical checkable claims against primary sources and either PASS, FAIL with re-dispatch, or label the survivors unverified. Doctrine document; the operational steps live in `research`'s flow.Other plugins' skills for the same job