# Task Verify Code

> Use to review an assembled build against its plan - 'review the build', 'review before done'. Not for an unplanned change (review-code) or the done gate.

- Skill: `envoydev/task-verify-code` (Agent Skill, multi-file: 5 files)
- Install (CLI): `npx get-skill add envoydev/task-verify-code`
- Raw SKILL.md: https://api.skillmd.com/api/skills/envoydev/task-verify-code/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Productivity
- Author: envoydev (https://skillmd.com/u/envoydev)
- Updated: 2026-11-14
- Page: https://skillmd.com/skills/envoydev/task-verify-code

---


# Verify Code - review the assembled code in one chat, no dispatch

The review step, run inline. `task-design` planned it, `task-verify-plan` audited the plan, `task-implement` built it - this reviews the built code against that plan and the stack's real traps, and it does the whole review in your context: it dispatches nothing. It is the single-chat form of the `<stack>-verifier` seat; a change no plan built goes to `review-code` instead. Same review protocol as the seat; you just keep it here.

The measurements behind these rules live in `references/evidence.md` - an audit appendix, not a run-time load.

## The choice this skill is

The flow's two house reviewers, pick by whether you want dispatch:

- **This skill (inline)** - deterministic cost, zero agents, the whole review stays in one context. Best when you want a predictable spend and no fan-out. The cost: its reads and build land in THIS chat's context, so in a long session that context carries forward - the price of no dispatch.
- **The `<stack>-verifier` seat** (dispatch it exactly as the roster spells it, `alfred-code:<seat>` where the core plugin carries it) - the same protocol in an isolated subagent, so its read volume never touches your chat, on its frontmatter model unless you name one. Best when the session is already long and you want the review's noise offloaded.

Both are the house review protocol; this skill just keeps it in your chat. The code checks are `review-code`'s passes, vendored whole as `references/passes.md`: read it before step 3 and run passes 1, 2, 3, 5 and 6 there, each candidate voted by its refute pass - the steps below already carry the rest (pass 4 is step 3, pass 7 step 6, pass 8 step 3's preferences).

## When to use / not

- Reruns build + tests, checks the code against its plan, runs the app on failing inputs, traces changed contracts, returns a ranked punch-list.
- Not the plan audit - that is `task-verify-plan`, on the page before any code. This is after the build.
- Not for fixing what it finds - it flags and hands back (to `task-implement` or your own edit); a verifier authors nothing.
- Not for a change no plan built - `review-code` reviews that one. To offload this review, dispatch the `<stack>-verifier`; this one stays inline by design.
- Not the done gate on your own change - `habits-done-gate` is that gate, and this review loads it before its verdict.

**Modes.** Mode flags right after the command - `--mode-auto-run-on`, `--mode-auto-run-off`, `--mode-output-scorer-on`, `--mode-output-scorer-off` - are switches, not the request: strip them; with only flags typed, run as with no arguments. Under the hook's auto-run contract, follow it. With no hook line (hooks off, Cursor), `-on` holds for this run only: each stop takes its `(Recommended)` option, listed in the close, an unmarked one waits, nothing goes outward, no fresh-session hand-off, and the close says auto-run ended; `--mode-output-scorer-on` grades this run's output like a typed stack.

## The review - in order, all inline

Load the stack's house skill FIRST (the one your convention rules auto-attach for these file types; its router names the specialist siblings), so you check against ITS trap list, not a generic one. Dispatch nothing at any step. Before the verdict is stamped, load `habits-done-gate` (the Skill tool): a pass is claimed only on a build and suite run this session, quoted.

1. **Build + tests, rerun and quoted.** Rerun `build`, the suite and the project's format check (where it has one - the step CI runs) yourself this session - never trust a pasted or prior-run result. Quote the output.
2. **Plan conformance.** When a plan file exists, gate the code against it: every task present, nothing built outside a task's boundary, each `## Decisions` ledger entry honored (the built shape is the decided one, its why at the line), each task's `log_points` placed through the repo's logging seam (level and identifiers as the card says, nothing beyond them), each acceptance criterion DEMONSTRATED by a run in this session, never assumed from reading the diff (`habits-done-gate` - run the check, quote the output, then claim it).
3. **Stack-trap audit.** Check the diff against the loaded skills' trap lists - the data-access, lifecycle, concurrency, and boundary traps that stack actually has. A named trap the code hits is a finding. Then the user's preferences: read the `PERSONAL-CODE-`, `ARCHITECTURE-` and `PROJECT-CODE-PREFERENCES.md` that exist under `<docs-path>/preferences/` (no edit here hands them over), run `node .claude/skills/capture-preferences/scripts/preferences.js check --diff <base> --area code` and `--area architecture` - `<base>` the commit the change started from, a bare `--diff` for uncommitted work - and quote both `checked:` lines, with any `by hand:` and `note:` line; judge every id a `by hand:` line names, and every entry a `skipped:` line names, against the diff - and where no `by hand:` line follows a summary (an older script copy prints none), every entry with no `Check:` (no script there: judge each entry by hand and say so); each violation, and each judged breach of an entry with no `Check:`, is a MATERIAL finding naming the id.
4. **Run it, and check nothing existing broke.**
   - Probe error paths and edge cases the tests skipped by RUNNING the app on the new failable inputs (a malformed query param, a bad route value) - a test can pass under a test host while the live endpoint 500s.
   - The probe starts at boot: exercise at least one REAL end-to-end call through the production composition root (the app's own DI/provider config), because test hosts and TestBeds wire their own - a missing app-level provider ships behind a fully green suite whose every spec self-provides it. For a web API an in-process run through the app's real entry point IS that call - the stack's in-memory host test (on .NET a `WebApplicationFactory<Program>` test through the real `Program`; the suite's, or a scratch one) that sends the new failable inputs boots the app's own DI and middleware - quote it as the probe, unless it swaps out a service the diff touches.
   - Otherwise ONE boot attempt: when the environment refuses it (a sandbox blocking the background process, the port, `ps`/`kill`, egress), record `Live-probe: NOT RUN - environment: <what refused>` and move on - no second launch form, no Monitor retry: a refused boot does not start on the second try, and each retry is a paid turn. Never write to a database or service this run did not start to make a probe boot.
   - Read `references/live-probe.md` before the first probe run - the per-stack launch recipes, the targeted visual check when the diff touches styles or templates, and the two rules for driving a browser are that file.
   - When the probe trips a failure path, the log line the plan named for it appears - a failure the probe triggers that leaves no record is a finding.
   - And audit REMOVED behavior: follow the changed symbols' existing callers and confirm the diff did not silently drop or change a behavior they depend on - a regression no task named. The green suite is evidence the tests pass, not that the behavior is right.
   - And check the new tests can FAIL: for each new or changed test, name the assertion that pins the claimed behavior - an assertion that holds regardless (asserts on the wrong object, an always-true comparison, a missing negative case) is a finding; a real contract bug has shipped behind exactly such a vacuous pass.
5. **Wire-contract cross-consumer trace.** If the diff changed a public or wire contract (a response shape, an endpoint signature, an exported type), trace it to its consumers - including any sibling named in `<docs-path>/awareness/RELATED-PROJECTS-AWARENESS.md` when the project carries it (a standalone repo has none - the trace then stays in-repo) - and flag a break where a consumer still expects the old shape.
6. **Reuse + the working set.** With build, tests, and quality green, one focused pass, in three parts:
   - **Reuse** - did the diff rebuild something the codebase or framework already ships (a helper, a cache abstraction, the platform JSON serializer, an existing pattern in this repo) instead of calling it?
     - did the diff call a capability the project wraps directly - such as the clock, the file system, logging, settings, a process or the network - where the same file or project already routes it through an abstraction (its own, or a framework seam it chose)? Each such call is a finding, tagged `seam`, naming the abstraction and the member to use or add. Test code that fakes the seam or builds the fixed values it returns is no bypass.
   - **The seven decision-level rules** `task-design` decides against, applied to the diff: an abstraction with no trigger (an interface with a single implementation, options nobody sets, dead flexibility) or the same decision now in three places; code placed where it changes for a different reason than its neighbours; a seam where no boundary exists; a known-bad value travelling past the boundary, or a subtype that cannot stand in for its base; a method that both mutates and answers; a name the behaviour outgrew; a pattern started from rather than refactored toward.
   - **The write-time bar** the implementer builds to, on the diff: a comment that narrates the what or the change, carries a ticket id, or claims something false against the code, a why missing where a decision or workaround would baffle the next reader, a name outside the repo's vocabulary, a dead branch, a magic number, a handle never disposed.

   SOLID is the vocabulary of the finding, never its basis - name what breaks. A finding, never a block, with one exception: A same-file `seam` finding is MATERIAL and holds the receipt like a preference breach; a project-wide one MINOR. Never flag as over-build: input validation at a trust boundary, error handling that prevents data loss, a security measure, accessibility basics, anything the plan or the user explicitly asked for, or the one smallest test of non-trivial logic.

A factual claim in a finding or a fix rationale is verified before it is stated - 'unverified is never a pass' covers the review's own assertions too. 'X cannot do Y' gets a precedent check (one grep for an existing counter-example in the codebase) before it drives a fix; a value quoted from a doc or config is read from the source in the same turn, never recalled (measured: a false 'the result union can't carry this' claim shipped a worse fix plus a misleading comment for 6+ hours - a one-grep counter-example existed; a 'read from the validator' table cell was invented from memory and a user question exposed it).

## Output

**Six named fields, every run, each with a value.** A controlled measurement in one report step:
five NAMED fields were emitted 5 of 5 times, while the same step's prose condition was emitted 0 of
1 - so if it must happen every time, it is a field with a value, not a sentence about when to write
one. None of the first four was emitted in the measured review, and the user asked 'have you fixed
everything?' 76 seconds later.

```
Build:      <the command and its verdict line, quoted>
Live-probe: <the quoted probe output, or NOT RUN - <reason>>
Regression: <callers checked: N, vacuous tests: none | the test and why>
Findings:   <count by severity, or `none`>
Probe code: <deleted: <what>, or `none written`>
Next run:   <what the next pass must cover, or `nothing owed`>
```

Under auto-run, when the run marker's `skill:` line names this skill (a direct run, not a phase of another flow), delete
`<data root>/state/sessions/AUTO-RUN-<session>` once the six fields print - that is the run's close; auto-run stays on
for the session.

`none`, `none written` and `nothing owed` are answers; an omitted line is not. `NOT RUN -
environment: <what refused>` after the one boot attempt is an accepted verdict, beside the tests
that covered the path; a NOT RUN with no attempt and no in-process run is never a pass (measured:
one review reported 'sound after one fix' with build and tests quoted and no live-probe line - the
app could not boot its HTTP wiring). `Probe code:` is the
cleanup the quality-gates rule already requires with no ask, folded in here as a field because
the cross-cutting sentence lost: the check passed, the scratch probe stayed, and the USER had to
ask for the cleanup (measured). Delete it as soon as the check that needed it passes, then say so.

Then the body: a ranked punch-list, most severe first - one line per finding: `severity | the defect (file:symbol) | the fix`. If the code is sound, say so plainly and name what you checked and ran. Every finding keyed to a file + symbol so a fix lands exactly there. Nothing you could not verify is reported as unverified - unverified is never a pass. Hand the list back; this skill does not apply fixes.

An effect on a surface or device class the plan did not name - another page or screen, a browser, a phone, a platform the changed code also serves - is at least MATERIAL, under auto-run too: no planned check looked there, so the user is the one who finds it (usage audit 2026-11-03: one filed MINOR took 14% of its run in rework).

When the review is the pre-commit checkpoint (a commit is the next act) and the verdict is sound - or sound after fixes that landed and re-verified - Read `references/commit-gate-receipt.md` and write the receipt it shapes. A punch-list with unresolved BLOCKER/MATERIAL findings writes no receipt.

## Example

Reviewing the records-list export build (the `task-implement` example - three tasks: a query projection, a streamed export endpoint, an integration test) inline:

```text
Build:      dotnet test - rerun green, Passed: 22, Failed: 0 (quoted)
Live-probe: GET /export?format=bad on the live host - 500, expected 400 (quoted)
Regression: callers checked: 2, vacuous tests: none
Findings:   1 BLOCKER, 1 MATERIAL, 1 MINOR
Probe code: deleted: the scratch export-probe request file
Next run:   re-probe GET /export?format=bad once the 400 mapping lands; re-trace the web client after the contract move
plan         | all 3 tasks present, none outside its boundary, cancellation threaded per the audit
run-it       | BLOCKER | GET /export?format=bad 500s on the live host, not 400 (file:symbol) | the suite's test passes under the test host - the binder throws before the filter; map the bad-request to 400
contract     | MATERIAL | /export response shape changed; the sibling web client still reads the old array (repo:file) | freeze the contract, move the consumer in lockstep
over-build   | MINOR | a format-strategy interface with one implementation (file:symbol) | inline it (yagni)
```

Verdict: one BLOCKER to fix (live 500), one cross-consumer break to decide, one nit - handed back, nothing dispatched.

