/mattpocock-skills:code-iterationfrom mattpocock-skills
Guides implementation through bounded passes: define, inspect, change, verify, review, record. Useful for structured, test-driven development with persistent state tracking.
Ships in mattpocock-skills. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description, though model invocation is off: only you can start it.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
Work in bounded passes: define → inspect → change → verify → review → record.
A pass is VERIFIED only for its declared scope, on the final relevant file state, with all required checks passing. Verification is not a claim that the software is bug-free, visually approved, or production-ready.
Use the project's existing iteration directory if one exists. Otherwise append pass records to:
.agent/iterations/code/<task-slug>/passes.md
Reuse the related design task slug when applicable. Allocate unique pass IDs. Keep failed and blocked records; append later results rather than rewriting history into an uninterrupted success story.
Establish scope Read repository instructions, relevant code, scripts, tests, and worktree changes. Preserve unrelated user work. Translate the request into observable acceptance criteria.
Read the related design ledger when present. Preserve active preferences; report conflicts rather than altering its decisions.
Define:
Use project-native tooling and existing package-manager conventions. Ask only about blocking ambiguity or necessary authorization.
Capture the baseline Run available relevant checks before editing. Record existing failures and environmental limitations. For a bug, reproduce it and preferably add a regression test that fails for the expected reason before applying the fix.
If baseline execution is unavailable, say so. Do not later assert that a failure was pre-existing without evidence.
Make the smallest coherent change Implement one goal-scoped change using repository conventions. Add or update behavioral tests for the changed contract, including relevant edge and failure cases. Avoid unrelated refactors, dependency upgrades, and generated-file churn.
Execute verification
Run focused tests and required formatting, lint, type, build, integration,
or runtime checks as applicable to the declared scope.
For interaction changes, include relevant browser or runtime smoke checks.
Visual acceptance remains separate and belongs to design-iteration.
Record exact commands, exit status, meaningful output, and evidence paths. Confirm that the intended tests actually ran. Exit code zero with no relevant tests discovered does not demonstrate the requested behavior.
Inspect the final diff Check for unintended changes, missing tests, debug scaffolding, accidental secrets, compatibility issues, and inconsistencies with acceptance criteria.
Any subsequent code, configuration, dependency, or test edit invalidates affected verification results. Rerun the affected checks before claiming verification.
Repair or stop When a required check fails, diagnose the cause, make a focused correction, and execute the relevant checks again. Do not repeat an unchanged failing command without a reason.
Default to at most three unsuccessful repair attempts for the same blocker. Stop earlier for missing permissions, unavailable infrastructure, unsafe side effects, or ambiguous requirements. Report the evidence and the smallest useful next action.
Close the pass and task Append the pass record after its outcome is known. When implementation is complete, run the declared final regression checks and project-prescribed checks on the final relevant file state.
A verified narrow pass does not establish task completion. Close the task only when its acceptance criteria and final required checks are satisfied.
Append a block like:
## Pass C001 — VERIFIED | FAILED | BLOCKED
- Objective and scope: <observable outcome>
- Acceptance criteria: <criteria covered by this pass>
- Changes: <files and behavioral changes>
- Baseline: <observed state; known failures; unavailable checks>
- Verification:
- Command: `<exact command>`
Result: <PASS / FAIL / NOT RUN; exit status when available>
Evidence: <relevant output or log path>
- Manual/runtime check: <actual procedure and observed result, if applicable>
- Final diff review: <performed review and findings>
- Design constraints: <relevant ledger IDs or not applicable>
- Remaining risks/blockers: <specific gaps or none>
- Next action: <next pass, requested input, or task complete>
Do not include secrets in recorded commands or output.
Where the project keeps a project graph (.project-history/graph.jsonl, via
scripts/project-graph), recording is unconditional, never optional: if no
graph exists, run project-graph init first instead of skipping the record —
but resolve WHERE the store belongs before creating one. The graph lives with
the project the work belongs to; when a repo keeps several project stores
(monorepo subprojects, a main app beside them), follow that repo's agent docs
for the canonical locations, and never init a store at a repo/workspace root
the session happened to start from when the work belongs to a project that
keeps its store elsewhere.
Start every session with project-graph head --actor code-iteration; claim any
handoff addressed here with project-graph ack <hid> --actor code-iteration,
and close it via --via-handoff <hid> on the pass's first appended node. After
each coherent pass, append an iteration node with a git-commit artifact and
the checks and pass outcome in --meta, chained with --continues-from. When
a pass surfaces a visual concern that wants its own feedback round rather than
more code changes, offer it explicitly: project-graph handoff --to design-iteration --from-node <node>. Never edit the JSONL by hand — record
only through the CLI.
Report:
Keep command proposals visibly separate from executed verification evidence.
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
iteration, test-driven-development, verification, pass-records
Generated from the plugin's indexed repository (vasyapym/vasyapym.github.io) — no native marketplace selected
npx claudepluginhub p/vasyapym-mattpocock-skills50 skills in this plugin
/ask-mattAsk which skill or flow fits your situation. A router over the skills in this repo./brainstormInspect the full diff and surrounding architecture, then propose high-leverage improvements without editing files./bug-iterationFix a reported bug — especially one that has returned after a previous fix — by reproducing it, diagnosing the root cause rather than the symptom, gating every change behind a regression test, stating exactly what was and wasn't verified, and closing with a compact pass report./claude-handoffHand the current conversation off to a fresh background agent that picks up the work immediately./codebase-designShared vocabulary for designing deep modules. Use when the user wants to design or improve a module's interface, find deepening opportunities, decide where a seam goes, make code more testable or AI-navigable, or when another skill needs the deep-module vocabulary./code-reviewReview the changes since a fixed point (commit, branch, tag, or merge-base) along two axes — Standards (does the code follow this repo's documented coding standards?) and Spec (does the code match what the originating issue/spec asked for?). Runs both reviews in parallel sub-agents and reports them side by side. Use when the user wants to review a branch, a PR, work-in-progress changes, or asks to "review since X".Other plugins' skills for the same job