Generates lightweight, implementation-ready feature specifications. A feature spec is the bridge between spec-forge's formal documentation chain (PRD/SRS/Tech Design/Test Plan) and code-forge's implementation planning. It distills what a module or component must do into a concise, language-agnostic document that code-forge:plan can consume directly. Supports two modes: standalone creation through a brief Q&A interview, or automatic extraction from an existing tech-design document. Output lives in docs/features/ and is shared across all language-specific implementations.
Generates concise, implementation-ready feature specifications from tech designs or via brief interviews.
npx claudepluginhub tercel/spec-forgeThis skill inherits all available tools. When active, it can use any tool Claude has access to.
Generate a concise, implementation-ready feature specification that serves as the input contract for code-forge:plan.
/spec-forge:decompose first.docs/features/{feature-name}.md
where {feature-name} is a lowercase, kebab-case slug (e.g., core-executor, schema-system, acl-system).
CRITICAL — No Sequential Numbering: Do NOT prefix filenames with sequence numbers like F001-, F002-, 001-, etc. The filename is ONLY the kebab-case slug. Ordering and relationships between features are managed in the overview file, not encoded in filenames.
If the docs/features/ directory does not exist, create it.
When generating feature specs for a multi-feature project (i.e., more than one feature spec exists or will exist in docs/features/), maintain an overview file:
docs/features/overview.md
Overview file rules:
docs/project-*.md), use its execution order and dependency informationOverview template:
# Feature Overview
> Auto-generated index of feature specs for this project.
> Updated: {date}
## Features
| Feature | Description | Dependencies | Status |
|---------|-------------|--------------|--------|
| [{feature-name}](./{feature-name}.md) | {one-line description} | {none or list} | draft |
| ... | ... | ... | ... |
## Execution Order
{Ordered list showing recommended implementation sequence, derived from dependencies.
If sourced from a project manifest, reference it.}
1. **{feature-name}** — {reason it goes first, e.g., "no dependencies"}
2. **{feature-name}** — {reason, e.g., "depends on feature-1"}
3. ...
Parse the feature name from arguments. Then determine the mode:
Chain mode detection: If the invocation prompt contains "Chain mode" or "Auto-confirm extraction", this is being called as part of the spec-forge chain. In chain mode:
AskUserQuestion calls — auto-select the recommended option at each step{feature-name}.md — plain kebab-case slug, NO numeric prefixes (01-, F001-, etc.). This rule applies in ALL modes but is especially important in chain mode where multiple features are generated sequentially.docs/features/overview.md (the overview tracks execution order, not filenames)Check for existing feature spec: If docs/features/{feature-name}.md already exists:
AskUserQuestion (skip in chain mode — auto-select "Regenerate from scratch"):
Check for upstream tech-design: Scan for docs/{feature-name}/tech-design.md or docs/*/tech-design.md that covers this feature.
If upstream tech-design is found, ask the user (skip in chain mode — auto-select "Extract from tech-design"):
Read the upstream docs/{feature-name}/tech-design.md (or the matched tech-design file).
Extract these elements from the tech-design:
Present a brief summary of what was extracted. Use AskUserQuestion (0-1 questions) — skip in chain mode, proceed directly to generation:
Write the feature spec to docs/features/{feature-name}.md using the template below. Skip to Step 4.
No upstream tech-design found. Gather requirements through a brief interview.
docs/ for related documents (PRD, SRS, other feature specs)Summarize context internally — do not present to user.
Use AskUserQuestion to understand the feature. Adapt based on answers.
Round 1 — Purpose and Scope:
Round 2 — Interfaces and Data:
Round 3 — Constraints (if needed):
Stop when you have enough to write a clear feature spec. Do NOT over-interview — 2 rounds is often sufficient.
Write the document to docs/features/{feature-name}.md using the template below.
Reminder: The filename MUST be {feature-name}.md — a plain kebab-case slug with NO numeric prefixes (no F001-, 001-, etc.).
After writing the feature spec, check if 2+ feature specs now exist in docs/features/ (excluding overview.md):
docs/features/overview.md using the overview template from the Output Location sectionVerify the generated feature spec against these criteria:
Fix any issues before presenting.
Display:
Feature spec generated: {feature-name}
Location: docs/features/{feature-name}.md
Source: {extracted from tech-design | standalone Q&A}
Length: {line count} lines
Overview: {updated | not needed (single feature)}
Next steps:
/code-forge:plan @docs/features/{feature-name}.md → Generate implementation plan
/spec-forge:tech-design {feature-name} → Generate full technical design (if needed)
# {Feature Name}
> Feature spec for code-forge implementation planning.
> Source: {standalone | extracted from docs/{name}/tech-design.md}
> Created: {date}
## Purpose
{One paragraph describing what this module does and why it exists.}
## Scope
**Included:**
- {responsibility 1}
- {responsibility 2}
- ...
**Excluded:**
- {explicitly out of scope item 1}
- ...
## Core Responsibilities
1. **{Responsibility name}** — {brief description of what it does}
2. **{Responsibility name}** — {brief description}
3. ...
## Interfaces
### Inputs
- **{input name}** ({source}) — {description}
- ...
### Outputs
- **{output name}** ({destination}) — {description}
- ...
### Dependencies
- **{module/system name}** — {what it provides and why it's needed}
- ...
## Data Flow
{Describe the main processing pipeline or data flow. Use a mermaid diagram if the flow has 3+ steps:}
```mermaid
graph LR
A[Input] --> B[Process Step 1]
B --> C[Process Step 2]
C --> D[Output]
{Describe the important behavioral rules, algorithms, or processing logic. Focus on WHAT happens, not HOW to implement it.}
{Description}
{Description}
{Summary of error categories and expected behavior. Not a full error taxonomy — just enough to guide implementation.}
{Any additional context, open questions, or references to related documents.}
## Relationship to Other spec-forge Documents
| Document | Relationship |
|----------|-------------|
| **PRD** | Feature spec may reference PRD requirements but does not duplicate them |
| **SRS** | Feature spec is less formal — no requirement IDs, no CRUD matrix |
| **Tech Design** | Feature spec is a condensed derivative; tech-design is the authoritative source |
| **Test Plan** | Feature spec does not cover testing strategy |
| **Decompose** | If a project is decomposed, each sub-feature can have its own feature spec |
## When to Use This vs Tech Design
| Scenario | Use |
|----------|-----|
| Quick module planning, daily development | `/spec-forge:feature` |
| Formal architecture review, team alignment | `/spec-forge:tech-design` |
| Full project specification chain | `/spec-forge <name>` (includes tech-design) |
| Already have tech-design, need implementation input | `/spec-forge:feature` (extract mode) |