Create or update the feature specification from a natural language feature description.
Creates or updates a feature specification from natural language. Use this to start SDD feature development with guided discovery, architecture analysis, and quality validation before implementation.
/plugin marketplace add NeoLabHQ/context-engineering-kit/plugin install sdd@context-engineering-kitFeature descriptionGuided feature development with codebase understanding and architecture focus.
You are helping a developer implement a new feature based on SDD: Specification Driven Development. Follow a systematic approach: understand the codebase deeply, identify and ask about all underspecified details, design detailed specification.
$ARGUMENTS
You MUST consider the user input before proceeding (if not empty).
Goal: Understand what needs to be built
Actions:
If feature unclear, Ask clarifying questions: Identify all ambiguities, edge cases, and underspecified behaviors. Ask specific, concrete questions rather than making assumptions. Wait for user answers before proceeding with next steps. Ask questions early.
Once feature is clear, summarize understanding by answering on this questions:
Write feature specification following #Outline section.
The text the user typed after /sdd:01-specify in the triggering message is the feature description. Assume you always have it available in this conversation even if {ARGS} 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:
Check for existing branches before creating new one:
a. First, fetch all remote branches to ensure we have the latest information:
git fetch --all --prune
b. Find the highest feature number across all sources for the short-name:
git ls-remote --heads origin | grep -E 'refs/heads/feature/[0-9]+-<short-name>$'git branch | grep -E '^[* ]*feature/[0-9]+-<short-name>$'specs/[0-9]+-<short-name>c. Determine the next available number:
d. Create new feature folder in specs/ directory with the calculated number and short-name:
specs/<number-padded-to-3-digits>-<short-name>, in future refered as FEATURE_DIRFEATURE_DIR/spec.md by copying specs/templates/spec-template.md file, in future refered as SPEC_FILE.cp specs/templates/spec-template.md specs/5-user-auth/spec.mdIMPORTANT:
Launch business-analyst agent with provided prompt exactly, while prefiling required variables:
Perform business analysis and requirements gathering.
Write the specification to {SPEC_FILE} using the template structure, replacing placeholders with concrete details derived from the feature description (arguments) while preserving section order and headings, and expanding specification based on use case and feature information.
User Input: {provide user input here}
FEATURE_NAME: {FEATURE_NAME}
FEATURE_DIR: {FEATURE_DIR}
SPEC_FILE: {SPEC_FILE}
Specification Quality Validation: After writing the initial spec, validate it against quality criteria:
a. Create Spec Quality Checklist: Copy specs/templates/spec-checklist.md file to FEATURE_DIR/spec-checklist.md using cp command, in future refered as CHECKLIST_FILE.
b. Launch new business-analyst agent with provided prompt exactly, while prefiling required variables
Peform following steps:
1. Fill in {CHECKLIST_FILE} file with based on user input.
2. Review the specification in {SPEC_FILE} file against each checklist item in this checklist:
- For each item, determine if it passes or fails
- Document specific issues found (quote relevant spec sections)
3. Reflect on specification and provide feedback on potential issues and missing areas, even if they not present in checklist.
---
User Input: {provide user input here}
FEATURE_NAME: {FEATURE_NAME}
FEATURE_DIR: {FEATURE_DIR}
SPEC_FILE: {SPEC_FILE}
c. Handle Validation Results:
If all items pass: Mark checklist complete and proceed to step 6
If items fail (excluding [NEEDS CLARIFICATION]):
business-analyst agent and ask it to analyze and update the spec to address each issuebusiness-analyst agent until all items pass (max 3 iterations)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 and launch new business-analyst agent to 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")
Launch new business-analyst agent to update the spec by replacing each [NEEDS CLARIFICATION] marker with the user's selected or provided answer
Re-run validation by launching new business-analyst agent 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 stage /sdd:01-plan.