Spec a new feature — recall architecture knowledge, create a spec document, build an implementation plan, and break into tasks.
You are speccing a new feature. This command enforces a structured planning process before any code is written.
Diagram complexity — before drawing, rate it:
- 🟢 simple — linear / ≤4 nodes → plain ASCII is fine.
- 🟡 moderate — fork-join, 5–8 nodes, or one crossing → OFFER a rendered Excalidraw (the render-diagram skill).
- 🔴 complex — bidirectional, multi-lane, >8 nodes, or cycles → render with the render-diagram skill AND show it inline via the Read tool.
git branch --show-current (regex [A-Z]+-[0-9]+); if none, use none.mark_chapter with {title: "Spec — <TICKET>", summary: "Writing the spec document"}.
If mark_chapter is unavailable (e.g. running outside Claude Code), skip silently.[ -t 1 ] && printf '\e]2;%s — Spec\007' "<TICKET>" || truemark_chapter (step 2).Parse the feature request from the arguments below. Extract:
Recall architecture knowledge. Use the Hindsight recall tool to retrieve:
Explore the existing codebase. Identify:
Write the spec document. Create a file at docs/specs/<feature-name>.md with this structure:
# Feature: <name>
## Problem Statement
[What problem does this solve?]
## Proposed Solution
[High-level description of the approach]
## Architecture Impact
- **Domain layer**: [changes needed]
- **Application layer**: [changes needed]
- **Infrastructure layer**: [changes needed]
## Technical Design
[Detailed technical approach, including data models, API changes, etc.]
## Constraints & Decisions
- [recalled hard rules that apply]
- [architectural decisions that constrain the approach]
## Acceptance Criteria
- [ ] AC1: [observable behavior]
- [ ] AC2: [observable behavior]
- [ ] AC3: [edge case behavior]
## Non-goals
Explicitly out of scope:
- [thing we are NOT building]
- [thing we are NOT refactoring]
## Edge Cases
- [edge case 1]
- [edge case 2]
## Testing Strategy
[How will this be tested?]
## Implementation Plan
1. [step 1]
2. [step 2]
...Add architecture diagrams (REQUIRED for any non-trivial feature — this is the devflow default). Generate BOTH a technical and an ELI5 diagram via /devflow:render-diagram in its ELI5 mode, which emits two sources next to the spec in docs/specs/: <feature-name>-architecture.excalidraw (technical) and <feature-name>-architecture-eli5.excalidraw (plain-language, dual-labeled). Render both (.png + .svg alongside each). Then:
## Architecture Impact, the ELI5 one in a short ## Diagram (plain language) section:

Every non-trivial spec ships a rendered technical diagram AND an ELI5 diagram by default. Skip ONLY when the feature is genuinely trivial / non-architectural, or the render-diagram skill / its deps are unavailable — and when skipping, say so explicitly rather than silently omitting.
Break into tasks. Convert the implementation plan into discrete, ordered tasks:
Present the spec to the user for review. Ask:
Retain the architectural decisions from this spec using the Hindsight retain tool, so they're available in future sessions.
Hand off to the planning phase. Invoke devflow:phase-handoff with arguments:
--phase spec--next-phase planThe handoff skill commits the spec doc to the branch (durable across worktree removal; the local .devflow/state/<branch>/spec.md frozen-state file is NOT committed), gates on a one-click AskUserQuestion, then spawns a new Claude Desktop session via mcp__ccd_session__spawn_task titled [<TICKET>] [MR#<N>] Plan (visible in the sidebar). That spawned session starts cold in a fresh throwaway worktree (NOT on the feature branch — spawn_task always forks off the default branch); its initial prompt leads with /devflow:writing-plans and embeds the self-contained devflow handoff context block (feature branch/worktree + relative spec path + recovery commands) that the wrapper's Step 0 consumes to re-establish the feature worktree before reading the spec.
Do NOT auto-invoke writing-plans from this skill — context cleanup is the explicit boundary.
$ARGUMENTS
faa2388
Also appears in
since May 7, 2026
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.