Spec Requirements
Generate comprehensive requirements definition documents with technology selection, improvement suggestions, and EARS format acceptance criteria.
Usage
/spec:requirements <system_name> [options]
Options
| Option |
Short |
Description |
Example |
--mode |
-m |
Mode (new-creation/reverse-engineering) |
-m reverse-engineering |
--backlog |
-b |
Enable product backlog format |
--backlog |
--epic |
-e |
Epic name for backlog structure |
-e "User Management Epic" |
--story-points |
|
Include story point estimation |
--story-points |
--app |
-a |
Application name |
-a "Web Store" |
--function |
-f |
Function/feature name |
-f "Authentication" |
--output |
-o |
Output file path |
-o specs.md |
--tech |
-t |
Technology stack |
-t "react,nodejs,postgresql" |
--priority |
-p |
Priority level (low/medium/high/critical) |
-p high |
--scope |
-s |
Scope type (mvp/full/enterprise) |
-s mvp |
--suggest |
|
Include improvement suggestions |
--suggest |
--examples |
|
Include implementation examples |
--examples |
--template |
|
Template type |
--template agile |
--hearing |
|
Interactive clarification mode |
--hearing |
Templates
| Template |
Description |
standard |
General purpose with EARS format |
agile |
User story format with acceptance criteria |
waterfall |
Detailed specification document |
product-backlog |
Full backlog with epics, features, stories |
Tool Priorities
ALWAYS prioritize mcp__serena__ tools:
File Operations (Serena MCP First)
mcp__serena__find_file → Read (fallback)
mcp__serena__search_for_pattern → Grep (fallback)
mcp__serena__list_dir → LS (fallback)
Code Analysis (Serena MCP)
mcp__serena__get_symbols_overview
mcp__serena__find_referencing_symbols
Context7 Integration
For technology documentation:
- Frontend: React, Vue, Angular
- Backend: Node.js, Express, FastAPI
- Database: PostgreSQL, MongoDB, Redis
Modes
New Creation Mode (Default)
Generate requirements from specifications and user input.
Reverse Engineering Mode
Analyze existing codebase to extract requirements:
- Component Discovery (controllers, services, models)
- Feature Extraction (user-facing functionality)
- User Story Generation (features to stories)
EARS Format
Acceptance criteria use EARS (Easy Approach to Requirements Syntax):
- WHEN [event] THEN [system] SHALL [response]
- IF [precondition] THEN [system] SHALL [response]
- WHILE [condition] THE SYSTEM SHALL [behavior]
- WHERE [context] THE SYSTEM SHALL [behavior]
Examples
# Basic requirements
/spec:requirements "E-commerce Platform" -a "Web Store" -t "react,nodejs"
# MVP with suggestions
/spec:requirements "Social Media App" -s mvp --suggest
# Interactive hearing mode
/spec:requirements "Mobile App" --hearing
# Reverse engineering with backlog
/spec:requirements "User Management" -m reverse-engineering -b -e "Auth Epic"
# Full enterprise with examples
/spec:requirements "CRM System" -s enterprise -t "react,nodejs,postgresql" --examples
Output Structure
- Header Information: Timestamp, system name, priority, scope
- Functional Requirements: Core features, user scenarios (EARS format)
- Non-Functional Requirements: Performance, security, availability
- Technical Specifications: Architecture, tech stack, integrations
- Additional Sections: Examples, suggestions (if enabled)
1---2name: spec-requirements3description: Generate comprehensive requirements definition documents with technology selection and improvement suggestions4---56# Spec Requirements78Generate comprehensive requirements definition documents with technology selection, improvement suggestions, and EARS format acceptance criteria.910## Usage1112```bash13/spec:requirements <system_name> [options]14```1516## Options1718| Option | Short | Description | Example |19|--------|-------|-------------|---------|20| `--mode` | `-m` | Mode (new-creation/reverse-engineering) | `-m reverse-engineering` |21| `--backlog` | `-b` | Enable product backlog format | `--backlog` |22| `--epic` | `-e` | Epic name for backlog structure | `-e "User Management Epic"` |23| `--story-points` | | Include story point estimation | `--story-points` |24| `--app` | `-a` | Application name | `-a "Web Store"` |25| `--function` | `-f` | Function/feature name | `-f "Authentication"` |26| `--output` | `-o` | Output file path | `-o specs.md` |27| `--tech` | `-t` | Technology stack | `-t "react,nodejs,postgresql"` |28| `--priority` | `-p` | Priority level (low/medium/high/critical) | `-p high` |29| `--scope` | `-s` | Scope type (mvp/full/enterprise) | `-s mvp` |30| `--suggest` | | Include improvement suggestions | `--suggest` |31| `--examples` | | Include implementation examples | `--examples` |32| `--template` | | Template type | `--template agile` |33| `--hearing` | | Interactive clarification mode | `--hearing` |3435## Templates3637| Template | Description |38|----------|-------------|39| `standard` | General purpose with EARS format |40| `agile` | User story format with acceptance criteria |41| `waterfall` | Detailed specification document |42| `product-backlog` | Full backlog with epics, features, stories |4344## Tool Priorities4546**ALWAYS prioritize mcp__serena__ tools:**4748### File Operations (Serena MCP First)49- `mcp__serena__find_file` → `Read` (fallback)50- `mcp__serena__search_for_pattern` → `Grep` (fallback)51- `mcp__serena__list_dir` → `LS` (fallback)5253### Code Analysis (Serena MCP)54- `mcp__serena__get_symbols_overview`55- `mcp__serena__find_referencing_symbols`5657### Context7 Integration58For technology documentation:59- Frontend: React, Vue, Angular60- Backend: Node.js, Express, FastAPI61- Database: PostgreSQL, MongoDB, Redis6263## Modes6465### New Creation Mode (Default)66Generate requirements from specifications and user input.6768### Reverse Engineering Mode69Analyze existing codebase to extract requirements:701. Component Discovery (controllers, services, models)712. Feature Extraction (user-facing functionality)723. User Story Generation (features to stories)7374## EARS Format7576Acceptance criteria use EARS (Easy Approach to Requirements Syntax):77- WHEN [event] THEN [system] SHALL [response]78- IF [precondition] THEN [system] SHALL [response]79- WHILE [condition] THE SYSTEM SHALL [behavior]80- WHERE [context] THE SYSTEM SHALL [behavior]8182## Examples8384```bash85# Basic requirements86/spec:requirements "E-commerce Platform" -a "Web Store" -t "react,nodejs"8788# MVP with suggestions89/spec:requirements "Social Media App" -s mvp --suggest9091# Interactive hearing mode92/spec:requirements "Mobile App" --hearing9394# Reverse engineering with backlog95/spec:requirements "User Management" -m reverse-engineering -b -e "Auth Epic"9697# Full enterprise with examples98/spec:requirements "CRM System" -s enterprise -t "react,nodejs,postgresql" --examples99```100101## Output Structure1021031. **Header Information**: Timestamp, system name, priority, scope1042. **Functional Requirements**: Core features, user scenarios (EARS format)1053. **Non-Functional Requirements**: Performance, security, availability1064. **Technical Specifications**: Architecture, tech stack, integrations1075. **Additional Sections**: Examples, suggestions (if enabled)