원클릭으로
implement-spec
// Implement a design spec from specs/ — reads the spec, plans the work, implements each item with tests and docs, then commits. Use when the user says "implement spec", "build spec", or references a spec file to implement.
// Implement a design spec from specs/ — reads the spec, plans the work, implements each item with tests and docs, then commits. Use when the user says "implement spec", "build spec", or references a spec file to implement.
| name | implement-spec |
| description | Implement a design spec from specs/ — reads the spec, plans the work, implements each item with tests and docs, then commits. Use when the user says "implement spec", "build spec", or references a spec file to implement. |
| argument-hint | <spec-file> [items to focus on...] |
| user-invocable | true |
Implement the design spec at $ARGUMENTS. The first token is the spec file path
(e.g., specs/04-file-explorer.md). Remaining tokens are optional focus
instructions — if provided, implement only the specified items/sections instead
of the full spec.
$ARGUMENTS).specs/ for a
matching filename.--- fences:
title, status, track, depends_on, affects, effort, created,
updated, author, dispatched_task_id. These drive readiness checks and
completion updates below.specs/README.md to understand where this spec sits in the track
organization and dependency graph.Before writing any code, verify:
status field:
validated → ready to implement. Proceed.drafted → warn the user that the spec has not been reviewed/validated.
Ask whether to proceed anyway.vague → stop. The spec is not ready for implementation.complete → already done. Confirm with the user before re-implementing.stale → warn the user the spec may not match reality. Suggest /wf-spec-refine
first.depends_on list from frontmatter.
For each dependency path, read that spec's frontmatter and confirm its
status is complete. If any dependency is not complete, report which
ones block this spec and ask the user how to proceed.affects list from frontmatter to locate the
relevant code files. Skim the spec for file paths, function names, and API
references. If any look stale, update them (or flag to the user) before
proceeding.git status to confirm the working tree is clean.
If dirty, ask the user how to proceed.Break the spec into an ordered list of implementation tasks. For each task:
Present this plan to the user using EnterPlanMode. Group tasks into logical
commits (small, focused). Order tasks so each commit leaves the project in a
working state.
Wait for user approval before proceeding. The user may adjust scope, reorder items, or skip sections.
For each task in the approved plan:
internal/apicontract/routes.go first, then
run make api-contract to regenerate the JS route file._test.go files).ui/js/__tests__/ using vitest.After implementing each task:
make fmt and make lint — fix any issues.go vet ./...go test ./... for backend changes.make test-frontend for frontend changes.If the task adds, removes, or modifies any API route, CLI flag, env variable, data model field, or user-visible behavior:
docs/guide/.docs/internals/ if internal architecture changed.CLAUDE.md if new routes, env vars, or conventions were added.internal/handler: add file content endpoint).After each commit, mark the completed task done and show the user a brief status update: what was done, what's next.
After all tasks are implemented:
make testmake build to confirm the binary builds cleanly.After all tasks are implemented (or partially implemented if focus instructions were given), update the spec file, related specs, and the epic index:
status — set to complete (or leave at validated
and add a note if only focused items were implemented).updated date — set to today's date.dispatched_task_id — if this is a leaf spec dispatched to the
board, ensure the task ID is recorded.## Implementation notes
section at the end of the spec documenting each deviation:
specs/README.mdspecs/README.md.Not started →
**Complete**, or **In progress** (N/M tasks done)).Check whether the implementation affects other specs:
depends_on scan — grep all spec files for depends_on entries
that reference this spec's path. These are the specs that depend on this one.
If this spec is now complete, those dependents may be unblocked.depends_on and the dependency is now
satisfied, note that the dependent is unblocked.Commit all spec and index updates together as a single small commit
(e.g., specs: mark 01-sandbox-backends as complete, update README).
Report to the user:
CLAUDE.md and
the surrounding code. This project uses stdlib net/http (no framework),
vanilla JS (no framework), and per-task directory storage.Break down a spec into child specs — either design specs (non-leaf, need further iteration) or implementation tasks (leaf, ready to dispatch). Automatically determines breakdown mode from spec lifecycle state, or accepts an explicit override. Use when a spec needs decomposition.
Dispatch a validated spec to the task board. Validates prerequisites, resolves dependency wiring, creates the task, and updates the spec's dispatched_task_id atomically. Also supports undispatching (cancel + clear link). Use when a spec is ready for execution.
Report current status across all specs — what's done, in progress, blocked, and what's next. Reads reality (spec files, task files, git history) instead of relying on manually maintained status tables.
Validate all specs against the document model rules — check required frontmatter fields, valid status/track/effort values, DAG acyclicity, dispatch consistency, orphan detection, and status consistency. Use to catch structural issues across the spec tree.
Compare a completed task's implementation against its source spec. Produces a structured divergence report — which acceptance criteria were satisfied, which diverged, and what was implemented but unspecified. Appends an Outcome section to the spec. Use after a dispatched task completes.
Create a new design spec in specs/. Gathers context, explores the codebase, writes the spec with proper frontmatter, and updates specs/README.md. Use when the user says "create a spec", "write a spec", "new spec", or "/spec".