Create or update the feature specification from a natural language feature description.
Creates a new feature specification from a natural language description. Use this when starting any new feature to generate a structured spec with requirements, scenarios, and success criteria before planning implementation.
/plugin marketplace add nprbst/speck-market/plugin install nprbst-speck-speck@nprbst/speck-market$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
The text the user typed after /speck:specify in the triggering message is the feature description. Assume you always have it available in this conversation even if $ARGUMENTS appears literally below. Do not ask the user to repeat it unless they provided an empty command.
Given that feature description, do this:
Generate a concise short name (2-4 words) for the branch:
Get next feature number and detect mode:
Run: speck next-feature --json --short-name "<short-name>"
This single command handles all git branch checking internally and returns:
NEXT_NUMBER: The next available feature numberMODE: "single-repo" or "multi-repo"SPECS_DIR: Path to the specs directoryIf MODE is "multi-repo":
SPEC_LOCATION (either "parent" or "local")If MODE is "single-repo":
SPEC_LOCATION = "local" (no prompt needed)Create the feature:
Run the command speck create-new-feature --json --no-ide "$ARGUMENTS" with the number from step 2:
--number NEXT_NUMBER and --short-name "your-short-name" along with the feature description--no-ide to defer IDE launch until after spec is fully written--shared-spec flag--local-spec flag (or omit flag - local is default)speck create-new-feature --json --no-ide --number 5 --short-name "user-auth" --shared-spec "Add user authentication"speck create-new-feature --json --no-ide --number 5 --short-name "user-auth" --branch "feature/user-auth" "Add user authentication"IMPORTANT:
--branch <name> flag: Also pass it to create-new-feature to use a custom branch name--no-worktree flag: Also pass it to create-new-feature to skip worktree creation--worktree flag: Also pass it to force worktree creation--no-deps flag: Also pass it to skip dependency installationRead spec template from {TEMPLATE_DIR}/spec-template.md using Read tool to understand required sections.
Follow this execution flow:
Write the specification to the absolute SPEC_FILE path from the JSON output using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings.
IMPORTANT: Always use the exact SPEC_FILE path returned by create-new-feature. Do NOT construct a relative path like specs/NNN-name/spec.md - the script may have created the spec in a worktree directory, and SPEC_FILE contains the correct absolute path.
Specification Quality Validation: After writing the initial spec, validate it against quality criteria:
a. Create Spec Quality Checklist: Generate a checklist file at FEATURE_DIR/checklists/requirements.md using the checklist template structure with these validation items (FEATURE_DIR is the directory containing SPEC_FILE, e.g., if SPEC_FILE is /path/to/specs/001-auth/spec.md, then FEATURE_DIR is /path/to/specs/001-auth/):
# Specification Quality Checklist: [FEATURE NAME]
**Purpose**: Validate specification completeness and quality before proceeding to planning
**Created**: [DATE]
**Feature**: [Link to spec.md]
## Content Quality
- [ ] No implementation details (languages, frameworks, APIs)
- [ ] Focused on user value and business needs
- [ ] Written for non-technical stakeholders
- [ ] All mandatory sections completed
## Requirement Completeness
- [ ] No [NEEDS CLARIFICATION] markers remain
- [ ] Requirements are testable and unambiguous
- [ ] Success criteria are measurable
- [ ] Success criteria are technology-agnostic (no implementation details)
- [ ] All acceptance scenarios are defined
- [ ] Edge cases are identified
- [ ] Scope is clearly bounded
- [ ] Dependencies and assumptions identified
## Feature Readiness
- [ ] All functional requirements have clear acceptance criteria
- [ ] User scenarios cover primary flows
- [ ] Feature meets measurable outcomes defined in Success Criteria
- [ ] No implementation details leak into specification
## Notes
- Items marked incomplete require spec updates before `/speck:clarify` or `/speck:plan`
b. Run Validation Check: Review the spec against each checklist item:
c. Handle Validation Results:
If all items pass: Mark checklist complete and proceed to step 6
If items fail (excluding [NEEDS CLARIFICATION]):
If [NEEDS CLARIFICATION] markers remain:
Extract all [NEEDS CLARIFICATION: ...] markers from the spec
LIMIT CHECK: If more than 3 markers exist, keep only the 3 most critical (by scope/security/UX impact) and make informed guesses for the rest
For each clarification needed (max 3), present options to user in this format:
## Question [N]: [Topic]
**Context**: [Quote relevant spec section]
**What we need to know**: [Specific question from NEEDS CLARIFICATION marker]
**Suggested Answers**:
| Option | Answer | Implications |
|--------|--------|--------------|
| A | [First suggested answer] | [What this means for the feature] |
| B | [Second suggested answer] | [What this means for the feature] |
| C | [Third suggested answer] | [What this means for the feature] |
| Custom | Provide your own answer | [Explain how to provide custom input] |
**Your choice**: _[Wait for user response]_
CRITICAL - Table Formatting: Ensure markdown tables are properly formatted:
| Content | not |Content||--------|Number questions sequentially (Q1, Q2, Q3 - max 3 total)
Present all questions together before waiting for responses
Wait for user to respond with their choices for all questions (e.g., "Q1: A, Q2: Custom - [details], Q3: B")
Update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
Re-run validation after all clarifications are resolved
d. Update Checklist: After each validation iteration, update the checklist file with current pass/fail status
Report completion with branch name, spec file path, checklist results, and readiness for the next phase (/speck:clarify or /speck:plan).
[SPECK-EXTENSION] Deferred IDE Launch (Only if worktree was created in step 3):
--no-ide flag:
speck launch-ide --worktree-path "$WORKTREE_PATH"NOTE: The script creates and checks out the new branch and initializes the spec file before writing.
When creating this spec from a user prompt:
Examples of reasonable defaults (don't ask about these):
Success criteria must be:
Good examples:
Bad examples (implementation-focused):