feat: add define-requirements command for scoped v1 requirements
Adds /gsd:define-requirements to transform research findings into checkable requirements before roadmap creation. New flow: new-project → research-project → define-requirements → create-roadmap New files: - commands/gsd/define-requirements.md - get-shit-done/workflows/define-requirements.md - get-shit-done/templates/requirements.md Modified: - new-project.md: updated next steps - research-project.md: points to define-requirements - create-roadmap.md: requires REQUIREMENTS.md, validates coverage - workflows/create-roadmap.md: maps phases to requirements, updates traceability Key changes: - Phases now map to specific requirement IDs - 100% requirement coverage required before roadmap creation - REQUIREMENTS.md traceability section tracks phase assignments Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,9 @@ allowed-tools:
|
||||
<objective>
|
||||
Create project roadmap with phase breakdown.
|
||||
|
||||
Roadmaps define what work happens in what order. Run after /gsd:new-project.
|
||||
Roadmaps define what work happens in what order. Phases map to requirements.
|
||||
|
||||
Run after `/gsd:define-requirements`.
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@@ -24,6 +26,7 @@ Roadmaps define what work happens in what order. Run after /gsd:new-project.
|
||||
<context>
|
||||
@.planning/PROJECT.md
|
||||
@.planning/config.json
|
||||
@.planning/REQUIREMENTS.md
|
||||
@.planning/research/SUMMARY.md (if exists)
|
||||
</context>
|
||||
|
||||
@@ -33,6 +36,9 @@ Roadmaps define what work happens in what order. Run after /gsd:new-project.
|
||||
```bash
|
||||
# Verify project exists
|
||||
[ -f .planning/PROJECT.md ] || { echo "ERROR: No PROJECT.md found. Run /gsd:new-project first."; exit 1; }
|
||||
|
||||
# Verify requirements exist
|
||||
[ -f .planning/REQUIREMENTS.md ] || { echo "ERROR: No REQUIREMENTS.md found. Run /gsd:define-requirements first."; exit 1; }
|
||||
```
|
||||
</step>
|
||||
|
||||
@@ -61,12 +67,15 @@ If "Replace": Continue with workflow
|
||||
Follow the create-roadmap.md workflow starting from detect_domain step.
|
||||
|
||||
The workflow handles:
|
||||
- Loading requirements
|
||||
- Domain expertise detection
|
||||
- Phase identification
|
||||
- Phase identification mapped to requirements
|
||||
- Requirement coverage validation (no orphaned requirements)
|
||||
- Research flags for each phase
|
||||
- Confirmation gates (respecting config mode)
|
||||
- ROADMAP.md creation
|
||||
- ROADMAP.md creation with requirement mappings
|
||||
- STATE.md initialization
|
||||
- REQUIREMENTS.md traceability update
|
||||
- Phase directory creation
|
||||
- Git commit
|
||||
</step>
|
||||
@@ -109,8 +118,11 @@ Roadmap created:
|
||||
|
||||
<success_criteria>
|
||||
- [ ] PROJECT.md validated
|
||||
- [ ] ROADMAP.md created with phases
|
||||
- [ ] REQUIREMENTS.md validated
|
||||
- [ ] All v1 requirements mapped to phases (no orphans)
|
||||
- [ ] ROADMAP.md created with phases and requirement mappings
|
||||
- [ ] STATE.md initialized
|
||||
- [ ] REQUIREMENTS.md traceability section updated
|
||||
- [ ] Phase directories created
|
||||
- [ ] Changes committed
|
||||
</success_criteria>
|
||||
|
||||
110
commands/gsd/define-requirements.md
Normal file
110
commands/gsd/define-requirements.md
Normal file
@@ -0,0 +1,110 @@
|
||||
---
|
||||
name: gsd:define-requirements
|
||||
description: Define what "done" looks like with checkable requirements
|
||||
allowed-tools:
|
||||
- Read
|
||||
- Write
|
||||
- Bash
|
||||
- Glob
|
||||
- AskUserQuestion
|
||||
---
|
||||
|
||||
<objective>
|
||||
Define concrete, checkable requirements from research findings.
|
||||
|
||||
Research answers "what do products like this have?"
|
||||
Requirements answers "what are WE building?"
|
||||
|
||||
Transforms research features into scoped v1/v2 requirements that roadmap phases map to.
|
||||
|
||||
Run after `/gsd:research-project`, before `/gsd:create-roadmap`.
|
||||
|
||||
Output: `.planning/REQUIREMENTS.md`
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
@~/.claude/get-shit-done/workflows/define-requirements.md
|
||||
@~/.claude/get-shit-done/templates/requirements.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@.planning/PROJECT.md
|
||||
@.planning/research/FEATURES.md (required)
|
||||
@.planning/research/SUMMARY.md
|
||||
</context>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="validate">
|
||||
```bash
|
||||
# Verify project exists
|
||||
[ -f .planning/PROJECT.md ] || { echo "ERROR: No PROJECT.md found. Run /gsd:new-project first."; exit 1; }
|
||||
|
||||
# Verify research exists
|
||||
[ -f .planning/research/FEATURES.md ] || { echo "ERROR: No research found. Run /gsd:research-project first."; exit 1; }
|
||||
|
||||
# Check if requirements already exist
|
||||
[ -f .planning/REQUIREMENTS.md ] && echo "REQUIREMENTS_EXISTS" || echo "NO_REQUIREMENTS"
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="check_existing">
|
||||
**If REQUIREMENTS_EXISTS:**
|
||||
|
||||
Use AskUserQuestion:
|
||||
- header: "Requirements exist"
|
||||
- question: "Requirements already defined. What would you like to do?"
|
||||
- options:
|
||||
- "View existing" — Show current requirements
|
||||
- "Replace" — Define requirements fresh (will overwrite)
|
||||
- "Cancel" — Keep existing requirements
|
||||
|
||||
If "View existing": Read and display `.planning/REQUIREMENTS.md`, then exit
|
||||
If "Cancel": Exit
|
||||
If "Replace": Continue with workflow
|
||||
</step>
|
||||
|
||||
<step name="execute">
|
||||
Follow the define-requirements.md workflow:
|
||||
- Load research features
|
||||
- Present features by category
|
||||
- Ask user to scope each category (v1 / v2 / out of scope)
|
||||
- Capture any additions research missed
|
||||
- Generate REQUIREMENTS.md with checkable list
|
||||
</step>
|
||||
|
||||
<step name="done">
|
||||
```
|
||||
Requirements defined:
|
||||
|
||||
- Requirements: .planning/REQUIREMENTS.md
|
||||
- v1 scope: [N] requirements across [M] categories
|
||||
- v2 scope: [X] requirements deferred
|
||||
- Out of scope: [Y] requirements excluded
|
||||
|
||||
---
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Create roadmap** — phases mapped to requirements
|
||||
|
||||
`/gsd:create-roadmap`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
---
|
||||
```
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- [ ] PROJECT.md validated
|
||||
- [ ] Research FEATURES.md loaded
|
||||
- [ ] Features presented by category
|
||||
- [ ] User scoped each category (v1/v2/out of scope)
|
||||
- [ ] User had opportunity to add missing requirements
|
||||
- [ ] REQUIREMENTS.md created with checkable list
|
||||
- [ ] Requirements committed to git
|
||||
- [ ] User knows next step (create-roadmap)
|
||||
</success_criteria>
|
||||
@@ -303,20 +303,24 @@ Project initialized:
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
Choose your path:
|
||||
|
||||
**Option A: Research first** (recommended for new domains)
|
||||
Research the ecosystem before creating roadmap. Discovers standard stacks, expected features, architecture patterns, and common pitfalls.
|
||||
**Research the domain** (recommended)
|
||||
|
||||
`/gsd:research-project`
|
||||
|
||||
**Option B: Create roadmap directly** (for familiar domains)
|
||||
Skip research if you know this domain well or have a clear spec.
|
||||
|
||||
`/gsd:create-roadmap`
|
||||
Discovers standard stacks, expected features, architecture patterns, and common pitfalls. Then define requirements and create roadmap.
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
**Full flow:** research-project → define-requirements → create-roadmap
|
||||
|
||||
---
|
||||
|
||||
**Skip research** (familiar domains only)
|
||||
|
||||
If you know this domain well, skip directly to defining requirements:
|
||||
|
||||
`/gsd:define-requirements`
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ Answers the questions that inform quality roadmaps:
|
||||
- How are these systems typically structured?
|
||||
- What do projects in this domain commonly get wrong?
|
||||
|
||||
Run after `/gsd:new-project`, before `/gsd:create-roadmap`.
|
||||
Run after `/gsd:new-project`, before `/gsd:define-requirements`.
|
||||
|
||||
Output: `.planning/research/` folder with ecosystem knowledge.
|
||||
</objective>
|
||||
@@ -95,12 +95,14 @@ Research complete:
|
||||
|
||||
## ▶ Next Up
|
||||
|
||||
**Create roadmap** — informed by research
|
||||
**Define requirements** — scope your v1 from research findings
|
||||
|
||||
`/gsd:create-roadmap`
|
||||
`/gsd:define-requirements`
|
||||
|
||||
<sub>`/clear` first → fresh context window</sub>
|
||||
|
||||
**Flow:** research-project → **define-requirements** → create-roadmap
|
||||
|
||||
---
|
||||
```
|
||||
</step>
|
||||
@@ -130,5 +132,5 @@ Research complete:
|
||||
- [ ] All research documents created in .planning/research/
|
||||
- [ ] SUMMARY.md includes roadmap implications
|
||||
- [ ] Research committed to git
|
||||
- [ ] User knows next step (create-roadmap)
|
||||
- [ ] User knows next step (define-requirements)
|
||||
</success_criteria>
|
||||
|
||||
Reference in New Issue
Block a user