spec-smith
npx skills add https://github.com/ngvoicu/specsmith-forge --skill spec-smith
Agent 安装分布
Skill 文档
Spec Smith
Turn ephemeral plans into structured, persistent specs built through deep
research and iterative interviews. Specs have phases, tasks, resume context,
and a decision log. They live in .specs/ at the project root and work
with any AI coding tool that can read markdown.
Plugin Commands
Spec Smith is a Claude Code plugin. These commands are the primary interface:
| Command | What it does |
|---|---|
/spec-smith:forge <description> |
The main workflow. Deep research â interview â more research â more interview â write spec â implement. This replaces plan mode. |
/spec-smith:resume |
Resume the active spec from where you left off |
/spec-smith:pause |
Pause the active spec with detailed resume context |
/spec-smith:switch <id> |
Switch to a different spec (pauses current) |
/spec-smith:list |
List all specs with status and progress |
/spec-smith:status |
Detailed progress of the active spec |
The /forge command is the key innovation â it’s what plan mode should be.
Instead of a quick scan and a plan, it does exhaustive research, interviews
the user in multiple rounds, stores everything, then writes a spec where
every task is concrete and unambiguous.
Plan Mode Handling
The /forge workflow bypasses Claude Code’s built-in plan mode â it IS the
planning phase. However, users might invoke forge while already in plan mode.
If you detect you’re in plan mode (read-only, can’t write files):
- Tell the user: “You’re in plan mode. Research and interviews work fine here since they’re read-only. When we’re ready to write the spec and implement, I’ll need you to exit plan mode (Shift+Tab).”
- Proceed with research and interviews normally (Phases 1-4)
- When reaching Phase 5 (write spec), remind the user: “We’re ready to write the spec. Please exit plan mode (Shift+Tab) so I can create the spec files.”
- Wait for the user to confirm they’ve exited plan mode before writing
This means forge works in ANY permission mode â it adapts. The research and interview phases are naturally read-only. Only spec writing and implementation need write access.
How Forge Works (The Enhanced Plan Mode)
The forge workflow replaces Claude Code’s plan mode with something far more
thorough. See commands/forge.md for the full workflow, but the key phases:
-
Deep Research â Exhaustive codebase scan, web search, Context7 docs, UI inspection. Reads 10-20+ files, maps architecture, finds patterns. All findings saved to
.specs/research/<id>/research-01.md -
Interview Round 1 â Present findings, state assumptions, ask targeted questions informed by the research. Save to
interview-01.md -
Deeper Research â Investigate the specific directions from the interview. Save to
research-02.md -
Interview Round 2+ â Repeat research â interview until everything is clear. No ambiguous tasks. As many rounds as needed.
-
Write Spec â Synthesize all research and interviews into a SPEC.md with phases, tasks, decision log
-
Implement â Work through the spec task by task, tracking progress
All research and interviews are stored in .specs/research/<id>/ so
nothing is ever lost across sessions.
Session Lifecycle
Session Start
When a session begins in a project that has .specs/:
- Read
.specs/activeto check for an active spec - If one exists, briefly mention it:
“You have an active spec: User Auth System (5/12 tasks, Phase 2).
Say ‘resume’ or run
/spec-smith:resumeto pick up where you left off.” - Don’t force it â the user might want to do something else first
After Plan Mode Ends
If the user used Claude Code’s built-in plan mode (not forge), offer to capture the plan as a spec:
- Offer to save: “Want me to save this plan as a spec? That way you can resume it across sessions and track progress.”
- If yes, convert the plan into a SPEC.md:
- Plan’s high-level steps â phases
- Substeps â tasks (checkboxes)
- Decisions â Decision Log
- Context/rationale â Overview
- Set as active spec and begin implementing
During Implementation
While working through a spec’s tasks:
- Check off tasks proactively as you complete them
- When finishing a task, note what’s next
- If a task is more complex than expected, split it into subtasks
- Update resume context at natural pauses
Before Session Ends
If the session is ending:
- Pause the active spec (run full pause workflow)
- Write detailed resume context
- Confirm to the user that context was saved
Re-Forging
Sometimes a spec needs rework. The user might say “this approach isn’t working” or “let’s rethink Phase 3.”
- Run
/spec-smith:forgeagain with the new direction - Or update the SPEC.md directly with revised phases/tasks
- Add a Decision Log entry explaining why the plan changed
- Don’t delete completed work â mark changed tasks clearly
When to Use This
- User exits plan mode â offer to save as spec
- User returns after a break â
spec resume - User juggles multiple features â
spec list,spec activate - User wants progress tracking â
spec status - User says “what was I working on” â
spec resume - Session starts in a project with
.specs/â mention active spec - Plan isn’t working â re-plan and update the spec
Directory Layout
All state lives in .specs/ at the project root:
.specs/
âââ active # Plain text file containing active spec ID
âââ registry.md # Table of all specs with status
âââ specs/
âââ <spec-id>/
âââ SPEC.md # The spec document
Commands
| Trigger | What it does |
|---|---|
spec new <title> / “create a spec for X” / “save this plan as a spec” |
Create a new spec |
spec list / “show my specs” / “what specs do I have” |
List all specs |
spec resume / “resume” / “what was I working on” |
Resume active spec |
spec status / “how far along am I” |
Show progress of active spec |
spec activate <id> / “switch to spec X” |
Switch to a different spec |
spec pause / “pause this” / “park this for now” |
Pause and save context |
spec complete / “mark spec as done” |
Complete active spec |
spec archive <id> |
Archive a finished or abandoned spec |
spec update / “check off task X” |
Update progress in active spec |
Workflows
Creating a Spec
From plan mode output (most common path):
- Take the approved plan from the conversation
- Generate a spec ID from the title (lowercase, hyphenated):
"User Auth System"âuser-auth-system - Initialize
.specs/if it doesn’t exist:mkdir -p .specs/specs - Create
.specs/specs/<id>/SPEC.mdusing the template fromreferences/spec-format.md - Map the plan structure to spec format:
- Plan’s major steps â Phases
- Plan’s substeps â Tasks (checkboxes)
- Plan’s file/architecture notes â Overview
- Plan’s trade-off decisions â Decision Log
- Update
.specs/registry.md(create if missing) - Write the ID to
.specs/active - Present the spec to the user for review before implementing
From conversation (no plan mode):
- Extract the goal, phases, and tasks from discussion
- Same steps as above
From scratch (vague idea):
Ask clarifying questions to establish scope, then structure into phases. Be opinionated about phasing â suggest a reasonable breakdown and let the user adjust rather than asking them to define every phase.
Phase/task guidelines:
- Phases are major milestones (3-6 phases is typical)
- Tasks are concrete, actionable items (checkbox format)
- Each task should be completable in roughly one focused session
- Mark Phase 1 as
[in-progress], the rest as[pending] - Mark the first unchecked task with
â current - Preserve the plan’s original structure but add granularity where needed
Resuming a Spec
When the user says “resume”, “what was I working on”, or spec resume:
-
Read
.specs/activeâ if empty, showspec listand ask which to resume -
Load
.specs/specs/<id>/SPEC.md -
Parse progress:
- Count completed
[x]vs total tasks per phase - Find current phase (first
[in-progress]phase) - Find current task (
â currentmarker, or first unchecked in current phase)
- Count completed
-
Read the Resume Context section
-
Present a compact summary:
Resuming: User Auth System Progress: 5/12 tasks (Phase 2: OAuth Integration) Current: Implement Google OAuth callback handler Context: Token exchange is working. Need to handle the callback URL parsing and store refresh tokens in the user model. Next file: src/auth/oauth/google.ts -
Begin working on the current task â don’t wait for permission
Pausing a Spec
When the user says “pause”, switches specs, or a session is ending:
- Capture what was happening:
- Which task was in progress
- What files were being modified (paths, function names)
- Key decisions made this session
- Any blockers or open questions
- Write this to the Resume Context section in SPEC.md
- Update checkboxes to reflect actual progress
- Move
â currentmarker to the right task - Add any session decisions to the Decision Log
- Update
status: pausedin frontmatter - Update the
updateddate
Resume Context is the most important part of pausing. Write it as if
briefing a colleague who will pick up tomorrow. Include specific file paths,
function names, and the exact next step. Vague context like “was working on
auth” is useless â write “implementing verifyRefreshToken() in
src/auth/tokens.ts, the JWT verification works but refresh rotation isn’t
hooked up to the /auth/refresh endpoint yet.”
Switching Between Specs
- Pause the current spec (full pause workflow)
- Load the target spec
- Write target ID to
.specs/active - Set target status to
activein its frontmatter - Resume the target spec (full resume workflow)
This should feel seamless â one command to context-switch.
Updating Progress
As the user works through tasks:
- Check off completed tasks:
- [ ]â- [x] - Move
â currentto the next task - When all tasks in a phase are done:
- Phase status:
[in-progress]â[completed] - Next phase:
[pending]â[in-progress]
- Phase status:
- Update Resume Context with latest state
- Update
updateddate in frontmatter
Don’t wait for the user to explicitly say “check off task X” â when you finish implementing something that matches a task, check it off proactively.
Listing Specs
Read .specs/registry.md and present specs grouped by status:
Active:
â user-auth-system: User Auth System (5/12 tasks, Phase 2)
Paused:
⸠api-refactor: API Refactoring (2/8 tasks, Phase 1)
⸠dark-mode: Dark Mode Support (0/6 tasks, not started)
Completed:
â ci-pipeline: CI Pipeline Setup (8/8 tasks)
Completing a Spec
- Verify all tasks are checked (warn if not, but allow override)
- Set status to
completedin frontmatter - Update registry
- Clear
.specs/activeif this was active - Suggest next spec to activate if any are paused
Archiving
Set status to archived. Files stay in place â can be reactivated anytime
with spec activate.
Registry Format
.specs/registry.md is a simple markdown table:
# Spec Registry
| ID | Title | Status | Priority | Updated |
|----|-------|--------|----------|---------|
| user-auth-system | User Auth System | active | high | 2026-02-10 |
| api-refactor | API Refactoring | paused | medium | 2026-02-09 |
| ci-pipeline | CI Pipeline Setup | completed | high | 2026-02-05 |
Always keep this in sync when creating, pausing, completing, or archiving.
Tools Without Plan Mode (Codex, Cursor, Windsurf, etc.)
Most AI coding tools don’t have a plan mode. In those tools, the spec replaces plan mode entirely â it’s both the plan and the tracker.
The workflow becomes:
- User describes what they want to build (in chat or a prompt)
- Tool creates a SPEC.md with phases and tasks (the “planning” step)
- User reviews the spec
- Tool implements task by task, checking them off
- When the session ends, resume context is saved to the spec
- Next session: tool reads the spec and picks up where it left off
To make other tools aware of .specs/, add a snippet to their
instruction file (AGENTS.md for Codex, .cursorrules for Cursor, etc.).
Read references/tool-setup.md for copy-paste snippets for each tool.
Multi-tool projects work naturally. If you use Claude Code for complex
features and Codex for batch work, they share the same .specs/ directory.
The markdown format and â current marker keep everything in sync.
Cross-Tool Compatibility
The spec format is pure markdown with YAML frontmatter. This means:
- Claude Code: Native skill support, reads SKILL.md automatically
- Codex: Add snippet to AGENTS.md (see
references/tool-setup.md) - Cursor / Windsurf / Cline: Add snippet to rules file
- Humans: Readable, editable in any text editor
- Git: Diffs cleanly, easy to track in version control
Any tool that can read and write files can use these specs. The format is deliberately tool-agnostic â no proprietary metadata, no binary formats, no database. Just markdown files in a directory.
Spec Format
Read references/spec-format.md for the full SPEC.md template with all
fields and sections. Use it as a starting point for every new spec.
Behavioral Notes
Be proactive about spec management. If you notice the user has been working for a while and made progress, update the spec without being asked. If a session is ending, offer to pause and save context.
Specs should evolve. It’s fine to add tasks, reorder phases, or split a phase into two as understanding deepens. Specs aren’t contracts â they’re living documents that adapt as you learn more about the problem.
The Decision Log matters. When the user makes a non-obvious technical choice (library selection, architecture pattern, API design), log it with the rationale. Future-you resuming this spec will thank present-you.
Don’t over-structure. A spec with 3 phases and 15 tasks is useful. A spec with 12 phases and 80 tasks is a project plan, not a coding spec. Keep it lean enough to parse and act on in one read.
Respect the user’s flow. Don’t interrupt deep coding work to update the spec. Batch updates for natural pauses â task completion, phase transitions, or session boundaries.