feat(03-01): /gsd:create-roadmap command with research-aware workflow

- Create /gsd:create-roadmap slash command entry point
- Add check_research step to workflow after check_brief
- Incorporate research findings into phase structure planning
- Add Research Context section to roadmap output when research exists

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Lex Christopherson
2025-12-15 21:38:26 -06:00
parent 08539ffd45
commit a3c351452b
2 changed files with 253 additions and 1 deletions

View File

@@ -0,0 +1,146 @@
---
description: Create roadmap with phases for the project
allowed-tools:
- Read
- Write
- Bash
- AskUserQuestion
- Glob
---
<objective>
Create project roadmap, optionally incorporating research findings from /gsd:research-project.
Roadmaps define the phase breakdown - what work happens in what order. This command can be used:
1. After /gsd:new-project (without research)
2. After /gsd:research-project (with domain research incorporated)
</objective>
<execution_context>
@~/.claude/get-shit-done/workflows/create-roadmap.md
@~/.claude/get-shit-done/templates/roadmap.md
@~/.claude/get-shit-done/templates/state.md
</execution_context>
<context>
@.planning/PROJECT.md
**Check for research:**
!`ls .planning/research/*.md 2>/dev/null || echo "NO_RESEARCH"`
**Load config:**
@.planning/config.json
</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; }
```
</step>
<step name="check_existing">
Check if roadmap already exists:
```bash
[ -f .planning/ROADMAP.md ] && echo "ROADMAP_EXISTS" || echo "NO_ROADMAP"
```
**If ROADMAP_EXISTS:**
Use AskUserQuestion:
- header: "Roadmap exists"
- question: "A roadmap already exists. What would you like to do?"
- options:
- "View existing" - Show current roadmap
- "Replace" - Create new roadmap (will overwrite)
- "Cancel" - Keep existing roadmap
If "View existing": `cat .planning/ROADMAP.md` and exit
If "Cancel": Exit
If "Replace": Continue with workflow
</step>
<step name="check_research">
Check for project research:
```bash
ls .planning/research/*.md 2>/dev/null
```
**If research found:**
Load and summarize each research file:
- ecosystem.md → Key libraries/frameworks recommended
- architecture.md → Architectural patterns to follow
- pitfalls.md → Top 2-3 critical pitfalls to avoid
- standards.md → Standards and conventions to follow
Present summary:
```
Found project research:
Ecosystem: [key libraries/frameworks]
Architecture: [key patterns]
Pitfalls: [top 2-3 to avoid]
Standards: [key conventions]
This will inform phase structure.
```
**If no research found:**
```
No project research found.
Creating roadmap based on PROJECT.md alone.
(Optional: Run /gsd:research-project first for niche/complex domains)
```
</step>
<step name="create_roadmap">
Follow the create-roadmap.md workflow starting from detect_domain step.
The workflow handles:
- Domain expertise detection
- Phase identification (informed by research if present)
- Research flags for each phase
- Confirmation gates (respecting config mode)
- ROADMAP.md creation
- STATE.md initialization
- Phase directory creation
- Git commit
</step>
<step name="done">
```
Roadmap created:
- Roadmap: .planning/ROADMAP.md
- State: .planning/STATE.md
- [N] phases defined
What's next?
1. Discuss Phase 1 context (/gsd:discuss-phase 1)
2. Plan Phase 1 in detail (/gsd:plan-phase 1)
3. Review/adjust phases
4. Done for now
```
If user selects "Discuss Phase 1 context" → invoke `/gsd:discuss-phase 1`
If user selects "Plan Phase 1 in detail" → invoke `/gsd:plan-phase 1`
</step>
</process>
<output>
- `.planning/ROADMAP.md`
- `.planning/STATE.md`
- `.planning/phases/XX-name/` directories
</output>
<success_criteria>
- [ ] PROJECT.md validated
- [ ] Research incorporated if present
- [ ] ROADMAP.md created with phases
- [ ] STATE.md initialized
- [ ] Phase directories created
- [ ] Changes committed
</success_criteria>

View File

@@ -25,7 +25,69 @@ If proceeding without brief, gather quick context:
- What are we building?
- What's the rough scope?
</step>
</step>
<step name="check_research">
Check for project research from /gsd:research-project:
```bash
ls .planning/research/*.md 2>/dev/null
```
**If research files found:**
Load and extract key findings from each file:
1. **ecosystem.md** → Standard stack recommendations
- Which libraries/frameworks to use
- Why they're recommended for this domain
2. **architecture.md** → Architectural patterns
- Recommended project structure
- Key patterns to follow
3. **pitfalls.md** → Critical pitfalls
- Top 2-3 things that commonly go wrong
- How to avoid them
4. **standards.md** → Domain standards
- Conventions and best practices
- Compliance requirements (if any)
Present summary to user:
```
Found project research:
**Ecosystem:**
[Key libraries/frameworks from ecosystem.md]
**Architecture:**
[Key patterns from architecture.md]
**Pitfalls to Avoid:**
[Top 2-3 from pitfalls.md]
**Standards:**
[Key conventions from standards.md]
This research will inform phase structure and planning.
Continue with roadmap creation? (yes / review research first)
```
If user wants to review research, show relevant files.
**If no research found:**
```
No project research found.
Creating roadmap based on PROJECT.md.
(For niche/complex domains, consider running /gsd:research-project first)
```
Continue with roadmap creation.
**Store research context** for use in identify_phases and write_roadmap steps.
</step>
<step name="detect_domain">
Scan for available domain expertise:
@@ -82,6 +144,26 @@ Select (comma-separate for multiple):
<step name="identify_phases">
Based on the brief/context, identify 3-6 phases.
**Incorporate research if available:**
If research was found in check_research step, use findings to inform phase structure:
- **ecosystem.md recommendations** → Inform technology choices in phases
- If research recommends specific libraries, plan phases that set them up properly
- Add foundation phases for recommended architectural patterns
- **architecture.md patterns** → Inform phase ordering
- If research identifies layered architecture, order phases accordingly
- Include phases for recommended project structure setup
- **pitfalls.md warnings** → Add phases to address risks
- If research identifies common failure modes, add phases that mitigate them
- Consider early validation phases for risky integrations
- **standards.md conventions** → Inform phase content
- Ensure phases follow domain conventions
- Add phases for compliance requirements if applicable
**Phase Numbering System:**
Use integer phases (1, 2, 3) for planned milestone work.
@@ -276,6 +358,7 @@ Decimal phases added later via /gsd:insert-phase command (if it exists).
Write to `.planning/ROADMAP.md` with:
- Domain Expertise section (paths from detect_domain step, or "None" if skipped)
- **Research Context section** (if research found in check_research step)
- Phase list with names and one-line descriptions
- Dependencies (what must complete before what)
- **Research flags** (from detect_research_needs step):
@@ -283,6 +366,29 @@ Write to `.planning/ROADMAP.md` with:
- `Research: Unlikely ([reason])` for unflagged phases
- Status tracking (all start as "not started")
**Research Context section format (if research exists):**
```markdown
## Research Context
Pre-planning research was conducted for this domain. Key findings incorporated into phase planning:
**Source:** .planning/research/
**Key Ecosystem Choices:**
- [Library/framework from ecosystem.md and why]
**Architectural Patterns:**
- [Pattern from architecture.md]
**Critical Pitfalls Addressed:**
- [Pitfall from pitfalls.md and which phase addresses it]
See .planning/research/*.md for full research findings.
```
**If no research:** Omit the Research Context section entirely.
Create phase directories:
```bash