원클릭으로
wf-spec-create
// 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".
// 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".
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.
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.
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.
| name | wf-spec-create |
| description | 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". |
| argument-hint | <track/name> [one-line description...] |
| user-invocable | true |
| allowed-tools | Read, Grep, Glob, Edit, Write, Agent, Bash(ls *), Bash(mkdir *), Bash(git log *), Bash(git diff *) |
Create a new design spec in specs/ following the spec document model.
$ARGUMENTS has the form: <track/name> [description...]
<track>/<name> where <track> is
one of the directories under specs/ (e.g., local, cloud, shared,
foundations) and <name> is the kebab-case spec name without .md.
Examples: local/live-serve, shared/sandbox-hooks, cloud/tenant-api.foundations — abstraction interfaces that all tracks build onlocal — desktop experience and developer workflow (single-user)cloud — cloud platform and multi-tenant deploymentshared — cross-track specs used by both local and cloudDerive the output file path: specs/<track>/<name>.md.
specs/README.md to understand the track organization, dependency
graph, and what already exists.specs/local/spec-coordination/spec-document-model.md (first 80 lines)
to review the frontmatter schema and spec conventions.affects paths. If a closely related spec exists,
warn the user and ask whether to proceed, merge, or abort.Based on the description, identify which parts of the codebase are relevant:
The goal is to ground the spec in reality — reference actual file paths, function names, and existing patterns rather than hypothetical code.
Determine which existing specs this new spec depends on:
specs/README.md for specs that produce interfaces, types, or
infrastructure this spec needs.affects lists of existing specs for overlapping code paths.depends_on entries for specs whose deliverables are prerequisites
— not merely related specs.Also identify which existing specs might depend on this new one (reverse impact). Flag these to the user but do NOT modify them.
Create the spec file at specs/<track>/<name>.md with this structure:
---
title: <Human-readable title>
status: drafted
depends_on:
- <spec paths, or empty list>
affects:
- <code paths and packages this spec will modify>
effort: <small | medium | large | xlarge>
created: <today's date, YYYY-MM-DD>
updated: <today's date, YYYY-MM-DD>
author: changkun
dispatched_task_id: null
---
# <Title>
## Overview
<2-4 sentences: what this spec delivers and why it matters. State the problem,
the user need, or the architectural gap it fills.>
## Current State
<Brief description of what exists today in the codebase that is relevant.
Reference actual file paths, types, and functions. This grounds the spec in
reality and helps readers understand the starting point.>
## Architecture
<How the solution fits into the existing system. Describe the key components,
their relationships, and where they live in the codebase. Use a diagram
(Mermaid) if the relationships are non-trivial.>
## Components
<For each major component or change:>
### <Component Name>
<What it does, where it lives, key design decisions. Reference existing
patterns in the codebase where relevant. Include:>
- File paths (existing files to modify, new files to create)
- Key types and interfaces
- Integration points with existing code
## Data Flow
<How data moves through the system for the primary use cases. Describe the
request/response path, state transitions, or processing pipeline. Skip this
section if the spec doesn't involve data flow.>
## API Surface
<New or modified API routes, CLI flags, env variables, or configuration
options. Use the existing format from CLAUDE.md. Skip this section if no
external surface changes.>
## Error Handling
<How errors are detected, reported, and recovered from. What failure modes
exist and how the system degrades. Skip this section if error handling is
trivial.>
## Testing Strategy
<What to test and how. Reference existing test patterns in the affected
packages. Identify:>
- Unit tests (per-function, per-method)
- Integration tests (cross-package, end-to-end)
- Edge cases and failure scenarios
Writing guidelines:
internal/handler/tasks.go"
is better than re-explaining a pattern./wf-spec-breakdown. Focus on architecture and
component boundaries rather than implementation details.specs/README.md.| [<name>.md](<track>/<name>.md) | Not started | <one-line deliverable> |
○ for not
started).Stage the new spec file and the updated specs/README.md. Commit with:
specs: add <name> spec for <one-line purpose>
Do NOT push unless the user explicitly asks.
Report to the user:
/wf-spec-breakdown <spec-path> design to decompose
into sub-design problems"/wf-spec-breakdown <spec-path> tasks to create
implementable tasks, or /wf-spec-implement <spec-path> to implement directly"/wf-spec-impact <spec-path> for full analysis"