Summary

Portable runtime-agnostic skill that executes an existing plan or task-breakdown file. A leading mode keyword selects the behaviour: implement only the next uncompleted task, or loop through every remaining task — each task built test-first (TDD), self-reviewed via /iterative-review, tested blocking, checked off, and committed as its own commit. One task, one commit. Works in any harness (Claude Code, Cursor, OpenCode, omp, claude -p) without hook dependencies.

Unifies three former commands. /implement replaces the separate /implement-next, /implement-all, and /implement-all-safe commands — the mode is now a keyword you pass, not a different command. In ALL mode it spawns one subagent per task whenever the harness exposes a subagent-spawning tool — Claude Code's Agent (including headless claude -p), OpenCode's Task, omp's task, Cursor's Task — and falls back to an inline loop (no subagents) only when the harness exposes no subagent tool at all.

When to use

Use /implement when you have a plan file (or task-breakdown file) with one or more - [ ] tasks and want them implemented with full quality gates: TDD cycle, /iterative-review loop, a blocking test pass, a checked-off box, and a clean per-task commit.

Companion plans. The resolved file may be self-contained, or a task-breakdown file whose S#/C# scenario/contract definitions, architecture, and acceptance criteria live in a separate companion plan. It is resolved from a ## References Plan: link first (canonical, correct even if the plan was moved), falling back to the frontmatter plan: key for a sibling. A companion plan named by either mechanism but missing on disk stops the run rather than proceeding without context. The companion plan is read-only context — never checked off, staged, or committed.

Not for: creating or updating plans (that is /plan-maker) or ad-hoc code edits not driven by a plan file.

Invocation

$ARGUMENTS holds an optional leading mode keyword plus the plan-file path. The first whitespace-separated token is a mode keyword only if it is exactly next, all, or inline (case-insensitive); anything else is part of the path. Everything after the recognized keyword(s) is the path — a path containing spaces is taken verbatim.

/implement next <plan-file-path>
/implement all <plan-file-path>
/implement all inline <plan-file-path>
/implement <plan-file-path>

The four invocation shapes:

With no argument at all, it stops and asks for a plan file path.

NEXT mode — 7 steps per task:

  1. Step 1 — Show progress: Resolves $BASE (the skill directory) and the plan + companion plan, then runs bash "$BASE/scripts/plan-progress.sh" <plan-path>. Exit 0 → print the block and read NEXT_TASK_NAME; exit 1 → all tasks complete, stop; any other exit / script not found → fall back to the bundled progress-header-*.template files, compute placeholders from the plan, and continue.
  2. Step 2 — Implement (TDD): Spawns the most appropriate agent type for the task. If a companion plan was detected, the agent reads it FIRST to resolve the S#/C# the task completes. SCOPE: exactly one task, touch only what it requires. FORBIDDEN: modify the task-breakdown file or companion plan, or create commits. For code: failing tests first (red) → implement (green) → full pass. For docs/config: implement directly.
  3. Step 3 — Critical review: Runs /iterative-review on the diff plus the task spec (passing the companion plan path when present). After it returns — whatever its verdict — Step 4 follows immediately; the Review Summary is not a completion signal.
  4. Step 4 — Run tests: Runs the full suite. Because the Claude Code Bash foreground ceiling is ~120 s, a longer suite is launched with run_in_background and kept alive with the Monitor tool; harnesses without Monitor fall back to the task-relevant subset and report the partial scope in Step 7. Before every run it verifies no earlier run is still alive (no stacked pytest workers). Fix agents retry up to 3 times.
  5. Step 5 — Check off: Marks the implemented task and every completed sub-item [x] in the task-breakdown file — only what was actually implemented and verified.
  6. Step 6 — Commit: One task = one commit. Stages the implementation files AND the updated task-breakdown file; commits with a message derived from the task content. The companion plan is never committed. --no-verify / --amend / bundling are forbidden.
  7. Step 7 — Report: Emits a fixed-form report: implemented, tests, feature loss or deviation, unresolvable oscillations, and the task's checked line + full commit hash.

ALL mode — the loop:

  1. Step -1 — Pick the execution mode (subagents vs inline): Decides by capability, not harness brand or version: uses subagents whenever the harness exposes a subagent-spawning tool (Claude Code's Agent, including headless claude -p; OpenCode's Task; omp's task; Cursor's Task), and switches to the inline loop only when the harness exposes no subagent tool at all. It tells the user which mode was selected and why. Forced INLINE skips this and goes straight inline.
  2. Step 0 — Resolve the plan file (and companion plan) via the shared resolution rules.
  3. Loop body (repeats until plan-progress.sh exit 1 = all complete): (1) run plan-progress.sh and show the first two lines verbatim, unreformatted — exit 2/3 or any unexpected code halts; (2) print Launching task <NAME> at [HH:MM:SS] (inline prints Starting task …) then run the task — via the Agent tool subagent (general-purpose, background) or inline NEXT mode — under a strict scoped prompt (exactly one task; Acceptance Criteria A–F; forbid --no-verify/--amend, bundling, nested ALL loops, editing anything but this task's checkbox); (3) recovery check — verify the task is checked off and its files committed. Not checked → respawn/redo (up to 3 attempts, then stop for manual intervention); checked but uncommitted → commit only that task's files by explicit path (never git add -A) and report the violation.

Example 1 — Implement the next task only (illustrative example)

Input:

/implement next plans/FEAT-001-skill-command-script-handouts.md

Output / Result:

Progress   : [████████░░░░] 68%  (13/19 tasks, 2/6 phases)
Next task  : 3.4  **File**: `handout/cmd-implement.html`

NEXT_TASK_NAME=**File**: `handout/cmd-implement.html`
NEXT_TASK_PHASE=3
NEXT_TASK_NUMBER=4

[Step 2] Spawning implementation agent for Task 3.4…
  → Reads skills/implement/SKILL.md
  → Writes handout/cmd-implement.html with 7 sections and 2 examples

[Step 3] /iterative-review: no critical/major/moderate issues found (PASS)

[Step 4] Full test suite: 14 structural checks pass (CLEAN)

[Step 5] Plan updated: Task 3.4 marked [x]

[Step 6] Commit: feat(handout): Task 3.4 — cmd-implement.html
  → handout/cmd-implement.html (new) + plan file (task checked off)

[Step 7] Report: Task 3.4 complete. 7 sections, 2 examples.

Example 2 — ALL mode on a harness with no subagent tool (illustrative example)

Input:

/implement all plans/FEAT-004-legacy-refactor.md
(run in a harness that exposes no subagent-spawning tool)

Output / Result:

No subagent-spawning tool available in this harness.
Running the ALL loop inline (no subagents).

Progress   : [░░░░░░░░░░░░] 0%  (0/5 tasks, 0/2 phases)
Next task  : 1.1  **File**: `README.md`

Starting task 1.1 at [11:02:47]
(runs NEXT mode inline: TDD cycle, /iterative-review, tests, check-off, commit)

Task 1.1 ✅ — checked (line 18) and committed (d4e5f60). Checkpoint verified (checkbox + commit).

… (4 more iterations) …

Progress   : all tasks complete (exit 1)
All tasks complete.

Related tools