Initial commit: Get Shit Done - meta-prompting system for Claude Code
- NPX install: npx get-shit-done-cc - Slash commands for project management - Context engineering templates and workflows 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
490
get-shit-done/workflows/complete-milestone.md
Normal file
490
get-shit-done/workflows/complete-milestone.md
Normal file
@@ -0,0 +1,490 @@
|
||||
<purpose>
|
||||
Mark a shipped version (v1.0, v1.1, v2.0) as complete. This creates a historical record in MILESTONES.md, updates PROJECT.md with current state, reorganizes ROADMAP.md with milestone groupings, and tags the release in git.
|
||||
|
||||
This is the ritual that separates "development" from "shipped."
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
**Read these files NOW:**
|
||||
|
||||
1. templates/milestone.md
|
||||
2. templates/milestone-archive.md
|
||||
3. `.planning/ROADMAP.md`
|
||||
4. `.planning/PROJECT.md`
|
||||
</required_reading>
|
||||
|
||||
<archival_behavior>
|
||||
When a milestone completes, this workflow:
|
||||
|
||||
1. Extracts full milestone details to `.planning/milestones/v[X.Y]-ROADMAP.md`
|
||||
2. Updates ROADMAP.md to replace milestone details with one-line summary
|
||||
3. Links to archive file for historical reference
|
||||
4. Offers to create next milestone inline
|
||||
|
||||
**Context Efficiency:**
|
||||
|
||||
- Completed milestones: One line each (~50 tokens)
|
||||
- Full details: In archive files (loaded only when needed)
|
||||
- Result: ROADMAP.md stays constant size (~1-2k lines) forever
|
||||
|
||||
**Archive Format:**
|
||||
Uses `templates/milestone-archive.md` template with:
|
||||
|
||||
- Milestone header (status, phases, date)
|
||||
- Full phase details from roadmap
|
||||
- Milestone summary (decisions, issues, technical debt)
|
||||
</archival_behavior>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="verify_readiness">
|
||||
Check if milestone is truly complete:
|
||||
|
||||
```bash
|
||||
cat .planning/ROADMAP.md
|
||||
ls .planning/phases/*/SUMMARY.md 2>/dev/null | wc -l
|
||||
```
|
||||
|
||||
**Questions to ask:**
|
||||
|
||||
- Which phases belong to this milestone?
|
||||
- Are all those phases complete (all plans have summaries)?
|
||||
- Has the work been tested/validated?
|
||||
- Is this ready to ship/tag?
|
||||
|
||||
Present:
|
||||
|
||||
```
|
||||
Milestone: [Name from user, e.g., "v1.0 MVP"]
|
||||
|
||||
Appears to include:
|
||||
- Phase 1: Foundation (2/2 plans complete)
|
||||
- Phase 2: Authentication (2/2 plans complete)
|
||||
- Phase 3: Core Features (3/3 plans complete)
|
||||
- Phase 4: Polish (1/1 plan complete)
|
||||
|
||||
Total: 4 phases, 8 plans, all complete
|
||||
```
|
||||
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
Parse the config:
|
||||
|
||||
- If `mode: "yolo"` → auto-approve
|
||||
- If `mode: "interactive"` → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_milestone_scope` (if exists)
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Milestone scope verification
|
||||
|
||||
[Show breakdown summary without prompting]
|
||||
|
||||
Proceeding to stats gathering...
|
||||
```
|
||||
|
||||
**If prompting (interactive mode):**
|
||||
|
||||
```
|
||||
Ready to mark this milestone as shipped?
|
||||
(yes / wait / adjust scope)
|
||||
```
|
||||
|
||||
Wait for confirmation.
|
||||
|
||||
If "adjust scope": Ask which phases should be included.
|
||||
If "wait": Stop, user will return when ready.
|
||||
</step>
|
||||
|
||||
<step name="gather_stats">
|
||||
Calculate milestone statistics:
|
||||
|
||||
```bash
|
||||
# Count phases and plans in milestone
|
||||
# (user specified or detected from roadmap)
|
||||
|
||||
# Find git range
|
||||
git log --oneline --grep="feat(" | head -20
|
||||
|
||||
# Count files modified in range
|
||||
git diff --stat FIRST_COMMIT..LAST_COMMIT | tail -1
|
||||
|
||||
# Count LOC (adapt to language)
|
||||
find . -name "*.swift" -o -name "*.ts" -o -name "*.py" | xargs wc -l 2>/dev/null
|
||||
|
||||
# Calculate timeline
|
||||
git log --format="%ai" FIRST_COMMIT | tail -1 # Start date
|
||||
git log --format="%ai" LAST_COMMIT | head -1 # End date
|
||||
```
|
||||
|
||||
Present summary:
|
||||
|
||||
```
|
||||
Milestone Stats:
|
||||
- Phases: [X-Y]
|
||||
- Plans: [Z] total
|
||||
- Tasks: [N] total (estimated from phase summaries)
|
||||
- Files modified: [M]
|
||||
- Lines of code: [LOC] [language]
|
||||
- Timeline: [Days] days ([Start] → [End])
|
||||
- Git range: feat(XX-XX) → feat(YY-YY)
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="extract_accomplishments">
|
||||
Read all phase SUMMARY.md files in milestone range:
|
||||
|
||||
```bash
|
||||
cat .planning/phases/01-*/01-*-SUMMARY.md
|
||||
cat .planning/phases/02-*/02-*-SUMMARY.md
|
||||
# ... for each phase in milestone
|
||||
```
|
||||
|
||||
From summaries, extract 4-6 key accomplishments.
|
||||
|
||||
Present:
|
||||
|
||||
```
|
||||
Key accomplishments for this milestone:
|
||||
1. [Achievement from phase 1]
|
||||
2. [Achievement from phase 2]
|
||||
3. [Achievement from phase 3]
|
||||
4. [Achievement from phase 4]
|
||||
5. [Achievement from phase 5]
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="create_milestone_entry">
|
||||
Create or update `.planning/MILESTONES.md`.
|
||||
|
||||
If file doesn't exist:
|
||||
|
||||
```markdown
|
||||
# Project Milestones: [Project Name from PROJECT.md]
|
||||
|
||||
[New entry]
|
||||
```
|
||||
|
||||
If exists, prepend new entry (reverse chronological order).
|
||||
|
||||
Use template from `templates/milestone.md`:
|
||||
|
||||
```markdown
|
||||
## v[Version] [Name] (Shipped: YYYY-MM-DD)
|
||||
|
||||
**Delivered:** [One sentence from user]
|
||||
|
||||
**Phases completed:** [X-Y] ([Z] plans total)
|
||||
|
||||
**Key accomplishments:**
|
||||
|
||||
- [List from previous step]
|
||||
|
||||
**Stats:**
|
||||
|
||||
- [Files] files created/modified
|
||||
- [LOC] lines of [language]
|
||||
- [Phases] phases, [Plans] plans, [Tasks] tasks
|
||||
- [Days] days from [start milestone or start project] to ship
|
||||
|
||||
**Git range:** `feat(XX-XX)` → `feat(YY-YY)`
|
||||
|
||||
**What's next:** [Ask user: what's the next goal?]
|
||||
|
||||
---
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="update_project">
|
||||
Update `.planning/PROJECT.md` to reflect current state.
|
||||
|
||||
Add/update "Current State" section at top (after YAML if present):
|
||||
|
||||
```markdown
|
||||
# Project: [Name]
|
||||
|
||||
## Current State (Updated: YYYY-MM-DD)
|
||||
|
||||
**Shipped:** v[X.Y] [Name] (YYYY-MM-DD)
|
||||
**Status:** [Production / Beta / Internal]
|
||||
**Users:** [If known, e.g., "~500 downloads, 50 DAU" or "Internal use only"]
|
||||
**Feedback:** [Key themes from users, or "Initial release, gathering feedback"]
|
||||
**Codebase:** [LOC] [language], [key tech stack], [platform/deployment target]
|
||||
|
||||
## [Next Milestone] Goals
|
||||
|
||||
**Vision:** [What's the goal for next version?]
|
||||
|
||||
**Motivation:**
|
||||
|
||||
- [Why this next work matters]
|
||||
- [User feedback driving it]
|
||||
- [Technical debt or improvements needed]
|
||||
|
||||
**Scope (v[X.Y]):**
|
||||
|
||||
- [Feature/improvement 1]
|
||||
- [Feature/improvement 2]
|
||||
- [Feature/improvement 3]
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary>Original Vision (v1.0 - Archived for reference)</summary>
|
||||
|
||||
[Move original project content here]
|
||||
|
||||
</details>
|
||||
```
|
||||
|
||||
**If this is v1.0 (first milestone):**
|
||||
Just add "Current State" section, no need to archive original vision yet.
|
||||
|
||||
**If this is v1.1+:**
|
||||
Collapse previous version's content into `<details>` section.
|
||||
|
||||
Show diff of changes:
|
||||
</step>
|
||||
|
||||
<step name="reorganize_roadmap">
|
||||
Update `.planning/ROADMAP.md` to group completed milestone phases.
|
||||
|
||||
Add milestone headers and collapse completed work:
|
||||
|
||||
```markdown
|
||||
# Roadmap: [Project Name]
|
||||
|
||||
## Milestones
|
||||
|
||||
- ✅ **v1.0 MVP** - Phases 1-4 (shipped YYYY-MM-DD)
|
||||
- 🚧 **v1.1 Security** - Phases 5-6 (in progress)
|
||||
- 📋 **v2.0 Redesign** - Phases 7-10 (planned)
|
||||
|
||||
## Phases
|
||||
|
||||
<details>
|
||||
<summary>✅ v1.0 MVP (Phases 1-4) - SHIPPED YYYY-MM-DD</summary>
|
||||
|
||||
- [x] Phase 1: Foundation (2/2 plans) - completed YYYY-MM-DD
|
||||
- [x] Phase 2: Authentication (2/2 plans) - completed YYYY-MM-DD
|
||||
- [x] Phase 3: Core Features (3/3 plans) - completed YYYY-MM-DD
|
||||
- [x] Phase 4: Polish (1/1 plan) - completed YYYY-MM-DD
|
||||
|
||||
</details>
|
||||
|
||||
### 🚧 v[Next] [Name] (In Progress / Planned)
|
||||
|
||||
- [ ] Phase 5: [Name] ([N] plans)
|
||||
- [ ] Phase 6: [Name] ([N] plans)
|
||||
|
||||
## Progress
|
||||
|
||||
| Phase | Milestone | Plans Complete | Status | Completed |
|
||||
| ----------------- | --------- | -------------- | ----------- | ---------- |
|
||||
| 1. Foundation | v1.0 | 2/2 | Complete | YYYY-MM-DD |
|
||||
| 2. Authentication | v1.0 | 2/2 | Complete | YYYY-MM-DD |
|
||||
| 3. Core Features | v1.0 | 3/3 | Complete | YYYY-MM-DD |
|
||||
| 4. Polish | v1.0 | 1/1 | Complete | YYYY-MM-DD |
|
||||
| 5. Security Audit | v1.1 | 0/1 | Not started | - |
|
||||
| 6. Hardening | v1.1 | 0/2 | Not started | - |
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="archive_milestone">
|
||||
Extract completed milestone details and create archive file.
|
||||
|
||||
**Process:**
|
||||
|
||||
1. Create archive file path: `.planning/milestones/v[X.Y]-ROADMAP.md`
|
||||
|
||||
2. Read `~/.claude/get-shit-done/templates/milestone-archive.md` template
|
||||
|
||||
3. Extract data from current ROADMAP.md:
|
||||
|
||||
- All phases belonging to this milestone (by phase number range)
|
||||
- Full phase details (goals, plans, dependencies, status)
|
||||
- Phase plan lists with completion checkmarks
|
||||
|
||||
4. Extract data from STATE.md:
|
||||
|
||||
- All decisions made during this milestone (filter by Phase column)
|
||||
- Issues that were resolved
|
||||
- Issues that were deferred
|
||||
|
||||
5. Fill template {{PLACEHOLDERS}}:
|
||||
|
||||
- {{VERSION}} - Milestone version (e.g., "1.0")
|
||||
- {{MILESTONE_NAME}} - From ROADMAP.md milestone header
|
||||
- {{DATE}} - Today's date
|
||||
- {{PHASE_START}} - First phase number in milestone
|
||||
- {{PHASE_END}} - Last phase number in milestone
|
||||
- {{TOTAL_PLANS}} - Count of all plans in milestone
|
||||
- {{MILESTONE_DESCRIPTION}} - From ROADMAP.md overview
|
||||
- {{PHASES_SECTION}} - Full phase details extracted
|
||||
- {{DECISIONS_FROM_PROJECT_STATE}} - Filtered decisions
|
||||
- {{ISSUES_RESOLVED_DURING_MILESTONE}} - From summaries
|
||||
- {{ISSUES_DEFERRED_TO_LATER}} - From ISSUES.md
|
||||
|
||||
6. Write filled template to `.planning/milestones/v[X.Y]-ROADMAP.md`
|
||||
|
||||
7. Update ROADMAP.md:
|
||||
|
||||
- Create/update "## Completed Milestones" section if not exists
|
||||
- Add one-line entry: `- ✅ [v[X.Y] [Name]](milestones/v[X.Y]-ROADMAP.md) (Phases [N]-[M]) - SHIPPED [DATE]`
|
||||
- Remove full milestone details from "Current Milestone" section
|
||||
- Move next planned milestone to "Current Milestone" position
|
||||
|
||||
8. Verify files:
|
||||
|
||||
- Check archive file exists: `ls .planning/milestones/v[X.Y]-ROADMAP.md`
|
||||
- Validate ROADMAP.md still parseable
|
||||
|
||||
9. Confirm archive complete:
|
||||
|
||||
```
|
||||
✅ v[X.Y] archived to milestones/v[X.Y]-ROADMAP.md
|
||||
```
|
||||
|
||||
Continue to git_tag step. Milestone creation happens in offer_next step.
|
||||
</step>
|
||||
|
||||
<step name="git_tag">
|
||||
Create git tag for milestone:
|
||||
|
||||
```bash
|
||||
git tag -a v[X.Y] -m "$(cat <<'EOF'
|
||||
v[X.Y] [Name]
|
||||
|
||||
Delivered: [One sentence]
|
||||
|
||||
Key accomplishments:
|
||||
- [Item 1]
|
||||
- [Item 2]
|
||||
- [Item 3]
|
||||
|
||||
See .planning/MILESTONES.md for full details.
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Confirm: "Tagged: v[X.Y]"
|
||||
|
||||
Ask: "Push tag to remote? (y/n)"
|
||||
|
||||
If yes:
|
||||
|
||||
```bash
|
||||
git push origin v[X.Y]
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="git_commit_milestone">
|
||||
Commit milestone completion including archive file.
|
||||
|
||||
```bash
|
||||
# Stage all milestone-related files
|
||||
git add .planning/MILESTONES.md
|
||||
git add .planning/PROJECT.md
|
||||
git add .planning/ROADMAP.md
|
||||
git add .planning/milestones/v[X.Y]-ROADMAP.md
|
||||
|
||||
# Commit with descriptive message
|
||||
git commit -m "$(cat <<'EOF'
|
||||
chore: archive v[X.Y] milestone
|
||||
|
||||
- Added MILESTONES.md entry
|
||||
- Updated PROJECT.md current state
|
||||
- Reorganized ROADMAP.md with milestone grouping
|
||||
- Created milestone archive: milestones/v[X.Y]-ROADMAP.md
|
||||
- Tagged v[X.Y]
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Confirm: "Committed: chore: archive v[X.Y] milestone"
|
||||
|
||||
Then proceed to git tag step.
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
```
|
||||
✅ Milestone v[X.Y] [Name] complete
|
||||
|
||||
Shipped:
|
||||
|
||||
- [N] phases ([M] plans, [P] tasks)
|
||||
- [One sentence of what shipped]
|
||||
|
||||
Summary: .planning/MILESTONES.md
|
||||
Tag: v[X.Y]
|
||||
|
||||
Next steps:
|
||||
|
||||
1. Discuss next milestone scope (/gsd:discuss-milestone)
|
||||
2. Create next milestone directly (/gsd:new-milestone)
|
||||
3. Done for now
|
||||
|
||||
```
|
||||
|
||||
Wait for user decision.
|
||||
|
||||
If "1": Invoke SlashCommand("/gsd:discuss-milestone")
|
||||
If "2": Invoke SlashCommand("/gsd:new-milestone")
|
||||
|
||||
Note: Commands are shown in options above so user can see what will run.
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<milestone_naming>
|
||||
**Version conventions:**
|
||||
- **v1.0** - Initial MVP
|
||||
- **v1.1, v1.2, v1.3** - Minor updates, new features, fixes
|
||||
- **v2.0, v3.0** - Major rewrites, breaking changes, significant new direction
|
||||
|
||||
**Name conventions:**
|
||||
- v1.0 MVP
|
||||
- v1.1 Security
|
||||
- v1.2 Performance
|
||||
- v2.0 Redesign
|
||||
- v2.0 iOS Launch
|
||||
|
||||
Keep names short (1-2 words describing the focus).
|
||||
</milestone_naming>
|
||||
|
||||
<what_qualifies>
|
||||
**Create milestones for:**
|
||||
- Initial release (v1.0)
|
||||
- Public releases
|
||||
- Major feature sets shipped
|
||||
- Before archiving planning
|
||||
|
||||
**Don't create milestones for:**
|
||||
- Every phase completion (too granular)
|
||||
- Work in progress (wait until shipped)
|
||||
- Internal dev iterations (unless truly shipped internally)
|
||||
|
||||
If uncertain, ask: "Is this deployed/usable/shipped in some form?"
|
||||
If yes → milestone. If no → keep working.
|
||||
</what_qualifies>
|
||||
|
||||
<success_criteria>
|
||||
Milestone completion is successful when:
|
||||
- [ ] MILESTONES.md entry created with stats and accomplishments
|
||||
- [ ] PROJECT.md updated with current state
|
||||
- [ ] ROADMAP.md reorganized with milestone grouping
|
||||
- [ ] Git tag created (v[X.Y])
|
||||
- [ ] Milestone commit made
|
||||
- [ ] User knows next steps
|
||||
</success_criteria>
|
||||
```
|
||||
379
get-shit-done/workflows/create-milestone.md
Normal file
379
get-shit-done/workflows/create-milestone.md
Normal file
@@ -0,0 +1,379 @@
|
||||
<purpose>
|
||||
Create a new milestone for an existing project. Defines phases, updates roadmap, and resets state tracking for the new milestone.
|
||||
|
||||
This is used after completing a milestone when ready to define the next chunk of work.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
**Read these files NOW:**
|
||||
|
||||
1. ~/.claude/get-shit-done/templates/roadmap.md (milestone-grouped format)
|
||||
2. `.planning/ROADMAP.md`
|
||||
3. `.planning/STATE.md`
|
||||
4. `.planning/MILESTONES.md` (if exists)
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="load_context">
|
||||
Load project context:
|
||||
|
||||
```bash
|
||||
cat .planning/ROADMAP.md
|
||||
cat .planning/STATE.md
|
||||
cat .planning/MILESTONES.md 2>/dev/null || echo "No milestones file yet"
|
||||
```
|
||||
|
||||
Extract:
|
||||
|
||||
- Previous milestone version (e.g., v1.0)
|
||||
- Last phase number used
|
||||
- Deferred issues from STATE.md
|
||||
- Project brief summary from STATE.md
|
||||
|
||||
**Calculate next milestone version:**
|
||||
|
||||
- If previous was v1.0 → suggest v1.1 (minor) or v2.0 (major)
|
||||
- If previous was v1.3 → suggest v1.4 or v2.0
|
||||
- Parse from ROADMAP.md "Completed Milestones" section
|
||||
</step>
|
||||
|
||||
<step name="get_milestone_info">
|
||||
**If called from /gsd:discuss-milestone (context provided):**
|
||||
Use the theme, scope, and constraints from discussion.
|
||||
Suggest milestone name based on theme.
|
||||
|
||||
**If called directly (no prior context):**
|
||||
Ask for milestone details:
|
||||
|
||||
header: "Milestone Name"
|
||||
question: "What should we call this milestone?"
|
||||
options:
|
||||
|
||||
- "v[X.Y] Features" - Adding new functionality
|
||||
- "v[X.Y] Improvements" - Enhancing existing features
|
||||
- "v[X.Y] Fixes" - Bug fixes and stability
|
||||
- "v[X.Y] Refactor" - Code quality and architecture
|
||||
- "v[X.Y+1].0 [Major]" - Major version bump
|
||||
- "Other" - Custom name
|
||||
|
||||
Get milestone name in format: "v[X.Y] [Name]"
|
||||
</step>
|
||||
|
||||
<step name="identify_phases">
|
||||
**Calculate starting phase number:**
|
||||
|
||||
```bash
|
||||
# Find highest phase number from roadmap
|
||||
grep -E "^### Phase [0-9]+" .planning/ROADMAP.md | tail -1
|
||||
# Extract number, add 1
|
||||
```
|
||||
|
||||
Next phase starts at: [last_phase + 1]
|
||||
|
||||
**Gather phases (3-6 recommended):**
|
||||
|
||||
If context from discuss-milestone provided, use that scope.
|
||||
|
||||
Otherwise, ask:
|
||||
|
||||
```
|
||||
What phases should this milestone include?
|
||||
|
||||
Starting at Phase [N]:
|
||||
- Phase [N]: [name] - [one-line goal]
|
||||
- Phase [N+1]: [name] - [one-line goal]
|
||||
...
|
||||
|
||||
Describe the phases, or say "help me break this down" for guidance.
|
||||
```
|
||||
|
||||
For each phase, capture:
|
||||
|
||||
- Phase number (continuing sequence)
|
||||
- Phase name (kebab-case for directory)
|
||||
- One-line goal
|
||||
- Research flag (Likely/Unlikely based on triggers)
|
||||
</step>
|
||||
|
||||
<step name="detect_research_needs">
|
||||
**For each phase, determine if research is likely needed.**
|
||||
|
||||
Apply research triggers from create-roadmap.md:
|
||||
|
||||
<research_triggers>
|
||||
**Likely (flag the phase):**
|
||||
|
||||
| Trigger Pattern | Why Research Needed |
|
||||
| ----------------------------------------------------- | --------------------------------------- |
|
||||
| "integrate [service]", "connect to [API]" | External API - need current docs |
|
||||
| "authentication", "auth", "login", "JWT" | Architectural decision + library choice |
|
||||
| "payment", "billing", "Stripe", "subscription" | External API + compliance patterns |
|
||||
| "email", "SMS", "notifications", "SendGrid", "Twilio" | External service integration |
|
||||
| "database", "Postgres", "MongoDB", "Supabase" | If new to project - setup patterns |
|
||||
| "real-time", "websocket", "sync", "live updates" | Architectural decision |
|
||||
| "deploy", "Vercel", "Railway", "hosting" | If first deployment - config patterns |
|
||||
| "choose between", "select", "evaluate", "which" | Explicit decision needed |
|
||||
| "AI", "OpenAI", "Claude", "LLM", "embeddings" | Fast-moving APIs - need current docs |
|
||||
| Any technology not already in codebase | New integration |
|
||||
|
||||
**Unlikely (no flag needed):**
|
||||
|
||||
| Pattern | Why No Research |
|
||||
| ------------------------------------------- | ----------------------- |
|
||||
| "add button", "create form", "update UI" | Internal patterns |
|
||||
| "CRUD operations", "list/detail views" | Standard patterns |
|
||||
| "refactor", "reorganize", "clean up" | Internal work |
|
||||
| "following existing patterns" | Conventions established |
|
||||
| Technology already in package.json/codebase | Patterns exist |
|
||||
|
||||
</research_triggers>
|
||||
|
||||
Present research assessment:
|
||||
|
||||
```
|
||||
Research needs detected:
|
||||
|
||||
Phase [N]: [Name]
|
||||
Research: Unlikely (internal patterns)
|
||||
|
||||
Phase [N+1]: [Name]
|
||||
Research: Likely (new API integration)
|
||||
Topics: [What to investigate]
|
||||
|
||||
Does this look right? (yes / adjust)
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="confirm_phases">
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
Parse the config:
|
||||
|
||||
- If `mode: "yolo"` → auto-approve
|
||||
- If `mode: "interactive"` or missing → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_phases`
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Milestone phases ([N] phases)
|
||||
|
||||
1. Phase [X]: [Name] - [goal]
|
||||
2. Phase [X+1]: [Name] - [goal]
|
||||
...
|
||||
|
||||
Proceeding to create milestone structure...
|
||||
```
|
||||
|
||||
**If prompting:**
|
||||
|
||||
Present the phase breakdown:
|
||||
|
||||
```
|
||||
Milestone: v[X.Y] [Name]
|
||||
|
||||
Phases:
|
||||
1. Phase [X]: [Name] - [goal]
|
||||
2. Phase [X+1]: [Name] - [goal]
|
||||
3. Phase [X+2]: [Name] - [goal]
|
||||
|
||||
Does this feel right? (yes / adjust)
|
||||
```
|
||||
|
||||
If "adjust": Ask what to change, revise, present again.
|
||||
</step>
|
||||
|
||||
<step name="update_roadmap">
|
||||
Update `.planning/ROADMAP.md` with new milestone:
|
||||
|
||||
**Add to Milestones section (if exists):**
|
||||
|
||||
```markdown
|
||||
## Milestones
|
||||
|
||||
- ✅ **v1.0 [Previous]** - Phases 1-9 (shipped YYYY-MM-DD)
|
||||
- 🚧 **v[X.Y] [Name]** - Phases [N]-[M] (in progress)
|
||||
```
|
||||
|
||||
**Add to Phases section:**
|
||||
|
||||
```markdown
|
||||
### 🚧 v[X.Y] [Name] (In Progress)
|
||||
|
||||
**Milestone Goal:** [One sentence describing what this milestone delivers]
|
||||
|
||||
#### Phase [N]: [Name]
|
||||
|
||||
**Goal**: [What this phase delivers]
|
||||
**Depends on**: Phase [N-1] (or "Previous milestone complete")
|
||||
**Research**: [Likely/Unlikely] ([reason])
|
||||
**Research topics**: [If Likely, what to investigate]
|
||||
**Plans**: TBD
|
||||
|
||||
Plans:
|
||||
|
||||
- [ ] [N]-01: TBD (run /gsd:plan-phase [N] to break down)
|
||||
|
||||
#### Phase [N+1]: [Name]
|
||||
|
||||
**Goal**: [What this phase delivers]
|
||||
**Depends on**: Phase [N]
|
||||
**Research**: [Likely/Unlikely] ([reason])
|
||||
**Plans**: TBD
|
||||
|
||||
Plans:
|
||||
|
||||
- [ ] [N+1]-01: TBD
|
||||
|
||||
[... continue for all phases ...]
|
||||
```
|
||||
|
||||
**Update Progress table:**
|
||||
|
||||
Add new phases with milestone column:
|
||||
|
||||
```markdown
|
||||
| Phase | Milestone | Plans | Status | Completed |
|
||||
| ------------- | --------- | ----- | ----------- | --------- |
|
||||
| [N]. [Name] | v[X.Y] | 0/? | Not started | - |
|
||||
| [N+1]. [Name] | v[X.Y] | 0/? | Not started | - |
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="create_phase_directories">
|
||||
Create directories for new phases:
|
||||
|
||||
```bash
|
||||
mkdir -p .planning/phases/[NN]-[slug]
|
||||
mkdir -p .planning/phases/[NN+1]-[slug]
|
||||
# ... for each phase
|
||||
```
|
||||
|
||||
Use two-digit padding: `10-name`, `11-name`, etc.
|
||||
</step>
|
||||
|
||||
<step name="update_state">
|
||||
Update `.planning/STATE.md` for new milestone:
|
||||
|
||||
**Update Current Position:**
|
||||
|
||||
```markdown
|
||||
## Current Position
|
||||
|
||||
Phase: [N] of [M] ([First phase name])
|
||||
Plan: Not started
|
||||
Status: Ready to plan
|
||||
Last activity: [today's date] - Milestone v[X.Y] created
|
||||
|
||||
Progress: ░░░░░░░░░░ 0%
|
||||
```
|
||||
|
||||
**Update Accumulated Context:**
|
||||
|
||||
Keep decisions from previous milestone (they're historical record).
|
||||
Clear "Blockers/Concerns Carried Forward" section.
|
||||
|
||||
**Add to Roadmap Evolution:**
|
||||
|
||||
```markdown
|
||||
### Roadmap Evolution
|
||||
|
||||
- Milestone v[X.Y] created: [theme/focus], [N] phases (Phase [start]-[end])
|
||||
```
|
||||
|
||||
**Update Session Continuity:**
|
||||
|
||||
```markdown
|
||||
## Session Continuity
|
||||
|
||||
Last session: [today's date and time]
|
||||
Stopped at: Milestone v[X.Y] initialization
|
||||
Resume file: None
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="git_commit">
|
||||
Commit milestone creation:
|
||||
|
||||
```bash
|
||||
git add .planning/ROADMAP.md .planning/STATE.md
|
||||
git add .planning/phases/
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: create milestone v[X.Y] [Name] ([N] phases)
|
||||
|
||||
Phases:
|
||||
- [N]. [name]: [goal]
|
||||
- [N+1]. [name]: [goal]
|
||||
- [N+2]. [name]: [goal]
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Confirm: "Committed: docs: create milestone v[X.Y] [Name]"
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
```
|
||||
Milestone v[X.Y] [Name] created:
|
||||
- Phases: [N]-[M] ([count] phases)
|
||||
- Directories created
|
||||
- ROADMAP.md updated
|
||||
- STATE.md reset for new milestone
|
||||
|
||||
What's next?
|
||||
|
||||
1. Discuss Phase [N] context (/gsd:discuss-phase [N])
|
||||
2. Plan Phase [N] directly (/gsd:plan-phase [N])
|
||||
3. Review roadmap
|
||||
4. Done for now
|
||||
|
||||
```
|
||||
|
||||
**If user selects option 1:**
|
||||
Invoke SlashCommand("/gsd:discuss-phase [N]")
|
||||
|
||||
**If user selects option 2:**
|
||||
Invoke SlashCommand("/gsd:plan-phase [N]")
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<phase_naming>
|
||||
Use `XX-kebab-case-name` format with continuous numbering:
|
||||
- `10-user-profiles`
|
||||
- `11-notifications`
|
||||
- `12-analytics`
|
||||
|
||||
Numbers continue from previous milestone. Names describe content.
|
||||
</phase_naming>
|
||||
|
||||
<anti_patterns>
|
||||
- Don't restart phase numbering at 01 (continue sequence)
|
||||
- Don't add time estimates
|
||||
- Don't create Gantt charts
|
||||
- Don't plan more than 6 phases per milestone (scope creep)
|
||||
- Don't modify completed milestone sections
|
||||
|
||||
Milestones are coherent chunks of work, not project management artifacts.
|
||||
</anti_patterns>
|
||||
|
||||
<success_criteria>
|
||||
Milestone creation is complete when:
|
||||
- [ ] Next phase number calculated correctly (continues from previous)
|
||||
- [ ] 3-6 phases defined with clear names
|
||||
- [ ] Research flags assigned for each phase
|
||||
- [ ] ROADMAP.md updated with new milestone section
|
||||
- [ ] Phase directories created
|
||||
- [ ] STATE.md reset for new milestone
|
||||
- [ ] Git commit made
|
||||
- [ ] User knows next steps
|
||||
</success_criteria>
|
||||
```
|
||||
443
get-shit-done/workflows/create-roadmap.md
Normal file
443
get-shit-done/workflows/create-roadmap.md
Normal file
@@ -0,0 +1,443 @@
|
||||
<purpose>
|
||||
Define the phases of implementation. Each phase is a coherent chunk of work
|
||||
that delivers value. The roadmap provides structure, not detailed tasks.
|
||||
</purpose>
|
||||
|
||||
<required_reading>
|
||||
**Read these files NOW:**
|
||||
|
||||
1. ~/.claude/get-shit-done/templates/roadmap.md
|
||||
2. ~/.claude/get-shit-done/templates/state.md
|
||||
3. Read `.planning/PROJECT.md` if it exists
|
||||
</required_reading>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="check_brief">
|
||||
```bash
|
||||
cat .planning/PROJECT.md 2>/dev/null || echo "No brief found"
|
||||
```
|
||||
|
||||
**If no brief exists:**
|
||||
Ask: "No brief found. Want to create one first, or proceed with roadmap?"
|
||||
|
||||
If proceeding without brief, gather quick context:
|
||||
|
||||
- What are we building?
|
||||
- What's the rough scope?
|
||||
</step>
|
||||
|
||||
<step name="detect_domain">
|
||||
Scan for available domain expertise:
|
||||
|
||||
```bash
|
||||
ls ~/.claude/skills/expertise/ 2>/dev/null
|
||||
```
|
||||
|
||||
**Inference:** Based on the brief/user request, infer applicable domains:
|
||||
|
||||
| Keywords | Domain |
|
||||
| ---------------------------------------- | ------------------------ |
|
||||
| "macOS", "Mac app", "menu bar", "AppKit" | expertise/macos-apps |
|
||||
| "iPhone", "iOS", "iPad", "mobile app" | expertise/iphone-apps |
|
||||
| "Unity", "game", "C#", "3D game" | expertise/unity-games |
|
||||
| "MIDI", "sequencer", "music app" | expertise/midi |
|
||||
| "ISF", "shader", "GLSL", "visual effect" | expertise/isf-shaders |
|
||||
| "UI", "design", "frontend", "Tailwind" | expertise/ui-design |
|
||||
| "Agent SDK", "Claude SDK", "agentic" | expertise/with-agent-sdk |
|
||||
|
||||
**If domain inferred:**
|
||||
|
||||
```
|
||||
Detected: [domain] project → expertise/[name]
|
||||
Include this domain expertise? (Y / see options / none)
|
||||
```
|
||||
|
||||
**If multiple domains apply** (e.g., ISF shaders for a macOS app):
|
||||
|
||||
```
|
||||
Detected multiple domains:
|
||||
- expertise/isf-shaders (shader development)
|
||||
- expertise/macos-apps (native app)
|
||||
|
||||
Include both? (Y / select one / none)
|
||||
```
|
||||
|
||||
**If no domain obvious:**
|
||||
|
||||
```
|
||||
Available domain expertise:
|
||||
1. macos-apps
|
||||
2. iphone-apps
|
||||
[... others found ...]
|
||||
|
||||
N. None - proceed without domain expertise
|
||||
|
||||
Select (comma-separate for multiple):
|
||||
```
|
||||
|
||||
**Store selected paths** for inclusion in ROADMAP.md.
|
||||
</step>
|
||||
|
||||
<step name="identify_phases">
|
||||
Based on the brief/context, identify 3-6 phases.
|
||||
|
||||
**Phase Numbering System:**
|
||||
|
||||
Use integer phases (1, 2, 3) for planned milestone work.
|
||||
|
||||
Use decimal phases (2.1, 2.2) for urgent insertions:
|
||||
|
||||
- Decimal phases inserted between integers (2.1 between 2 and 3)
|
||||
- Mark with "(INSERTED)" in phase title
|
||||
- Created when urgent work discovered after planning
|
||||
- Examples: bugfixes, hotfixes, critical patches
|
||||
|
||||
**When to use decimals:**
|
||||
|
||||
- Urgent work that can't wait for next milestone
|
||||
- Critical bugs blocking progress
|
||||
- Security patches needing immediate attention
|
||||
- NOT for scope creep or "nice to haves" (those go in ISSUES.md)
|
||||
|
||||
**Phase execution order:**
|
||||
Numeric sort: 1 → 1.1 → 1.2 → 2 → 2.1 → 3
|
||||
|
||||
Good phases are:
|
||||
|
||||
- **Coherent**: Each delivers something complete
|
||||
- **Sequential**: Later phases build on earlier
|
||||
- **Sized right**: 1-3 days of work each (for solo + Claude)
|
||||
|
||||
Common phase patterns:
|
||||
|
||||
- Foundation → Core Feature → Enhancement → Polish
|
||||
- Setup → MVP → Iteration → Launch
|
||||
- Infrastructure → Backend → Frontend → Integration
|
||||
</step>
|
||||
|
||||
<step name="detect_research_needs">
|
||||
**For each phase, determine if research is likely needed.**
|
||||
|
||||
Scan the brief and phase descriptions for research triggers:
|
||||
|
||||
<research_triggers>
|
||||
**Likely (flag the phase):**
|
||||
|
||||
| Trigger Pattern | Why Research Needed |
|
||||
| ----------------------------------------------------- | --------------------------------------- |
|
||||
| "integrate [service]", "connect to [API]" | External API - need current docs |
|
||||
| "authentication", "auth", "login", "JWT" | Architectural decision + library choice |
|
||||
| "payment", "billing", "Stripe", "subscription" | External API + compliance patterns |
|
||||
| "email", "SMS", "notifications", "SendGrid", "Twilio" | External service integration |
|
||||
| "database", "Postgres", "MongoDB", "Supabase" | If new to project - setup patterns |
|
||||
| "real-time", "websocket", "sync", "live updates" | Architectural decision |
|
||||
| "deploy", "Vercel", "Railway", "hosting" | If first deployment - config patterns |
|
||||
| "choose between", "select", "evaluate", "which" | Explicit decision needed |
|
||||
| "AI", "OpenAI", "Claude", "LLM", "embeddings" | Fast-moving APIs - need current docs |
|
||||
| Any technology not already in codebase | New integration |
|
||||
| Explicit questions in brief | Unknowns flagged by user |
|
||||
|
||||
**Unlikely (no flag needed):**
|
||||
|
||||
| Pattern | Why No Research |
|
||||
| ------------------------------------------- | ----------------------- |
|
||||
| "add button", "create form", "update UI" | Internal patterns |
|
||||
| "CRUD operations", "list/detail views" | Standard patterns |
|
||||
| "refactor", "reorganize", "clean up" | Internal work |
|
||||
| "following existing patterns" | Conventions established |
|
||||
| Technology already in package.json/codebase | Patterns exist |
|
||||
|
||||
</research_triggers>
|
||||
|
||||
**For each phase, assign:**
|
||||
|
||||
- `Research: Likely ([reason])` + `Research topics: [what to investigate]`
|
||||
- `Research: Unlikely ([reason])`
|
||||
|
||||
**Important:** These are hints, not mandates. The mandatory_discovery step during phase planning will validate.
|
||||
|
||||
Present research assessment:
|
||||
|
||||
```
|
||||
Research needs detected:
|
||||
|
||||
Phase 1: Foundation
|
||||
Research: Unlikely (project setup, established patterns)
|
||||
|
||||
Phase 2: Authentication
|
||||
Research: Likely (new system, technology choice)
|
||||
Topics: JWT library for [stack], session strategy, auth provider options
|
||||
|
||||
Phase 3: Stripe Integration
|
||||
Research: Likely (external API)
|
||||
Topics: Current Stripe API, webhook patterns, checkout flow
|
||||
|
||||
Phase 4: Dashboard
|
||||
Research: Unlikely (internal UI using patterns from earlier phases)
|
||||
|
||||
Does this look right? (yes / adjust)
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="confirm_phases">
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
**Note:** Config may not exist yet (this is project initialization). If missing, default to interactive mode.
|
||||
|
||||
Parse the config (if exists):
|
||||
|
||||
- If `mode: "yolo"` → auto-approve
|
||||
- If `mode: "interactive"` or missing → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_phases`
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Phase breakdown ([N] phases)
|
||||
|
||||
1. [Phase name] - [goal]
|
||||
2. [Phase name] - [goal]
|
||||
3. [Phase name] - [goal]
|
||||
|
||||
Proceeding to research detection...
|
||||
```
|
||||
|
||||
Proceed directly to detect_research_needs.
|
||||
|
||||
**If prompting:**
|
||||
|
||||
Present the phase breakdown inline:
|
||||
|
||||
"Here's how I'd break this down:
|
||||
|
||||
1. [Phase name] - [goal]
|
||||
2. [Phase name] - [goal]
|
||||
3. [Phase name] - [goal]
|
||||
...
|
||||
|
||||
Does this feel right? (yes / adjust)"
|
||||
|
||||
If "adjust": Ask what to change, revise, present again.
|
||||
</step>
|
||||
|
||||
<step name="decision_gate">
|
||||
After phases confirmed (or auto-approved):
|
||||
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
Read config from previous step (already parsed, or default to interactive if missing).
|
||||
|
||||
- If `mode: "yolo"` → auto-approve
|
||||
- If `mode: "interactive"` or missing → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_roadmap`
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Create roadmap with [N] phases
|
||||
|
||||
Proceeding to create .planning/ROADMAP.md...
|
||||
```
|
||||
|
||||
Proceed directly to create_structure.
|
||||
|
||||
**If prompting:**
|
||||
|
||||
Use AskUserQuestion:
|
||||
|
||||
- header: "Ready"
|
||||
- question: "Ready to create the roadmap, or would you like me to ask more questions?"
|
||||
- options:
|
||||
- "Create roadmap" - I have enough context
|
||||
- "Ask more questions" - There are details to clarify
|
||||
- "Let me add context" - I want to provide more information
|
||||
|
||||
Loop until "Create roadmap" selected.
|
||||
</step>
|
||||
|
||||
<step name="create_structure">
|
||||
```bash
|
||||
mkdir -p .planning/phases
|
||||
```
|
||||
</step>
|
||||
|
||||
<step name="write_roadmap">
|
||||
Use template from `~/.claude/get-shit-done/templates/roadmap.md`.
|
||||
|
||||
Initial roadmaps use integer phases (1, 2, 3...).
|
||||
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)
|
||||
- Phase list with names and one-line descriptions
|
||||
- Dependencies (what must complete before what)
|
||||
- **Research flags** (from detect_research_needs step):
|
||||
- `Research: Likely ([reason])` with `Research topics:` for flagged phases
|
||||
- `Research: Unlikely ([reason])` for unflagged phases
|
||||
- Status tracking (all start as "not started")
|
||||
|
||||
Create phase directories:
|
||||
|
||||
```bash
|
||||
mkdir -p .planning/phases/01-{phase-name}
|
||||
mkdir -p .planning/phases/02-{phase-name}
|
||||
# etc.
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="initialize_project_state">
|
||||
Create STATE.md - the project's living memory.
|
||||
|
||||
Use template from `~/.claude/get-shit-done/templates/state.md`.
|
||||
|
||||
Write to `.planning/STATE.md`:
|
||||
|
||||
```markdown
|
||||
# Project State
|
||||
|
||||
## Brief Summary
|
||||
|
||||
**Building:** [Copy one-liner from PROJECT.md]
|
||||
|
||||
**Core requirements:**
|
||||
[Copy 3-5 key requirements from PROJECT.md]
|
||||
|
||||
**Constraints:**
|
||||
[Copy key constraints from PROJECT.md]
|
||||
|
||||
## Current Position
|
||||
|
||||
Phase: 1 of [N] ([First phase name])
|
||||
Plan: Not started
|
||||
Status: Ready to plan
|
||||
Last activity: [today's date] - Project initialized
|
||||
|
||||
Progress: ░░░░░░░░░░ 0%
|
||||
|
||||
## Accumulated Context
|
||||
|
||||
### Decisions Made
|
||||
|
||||
| Phase | Decision | Rationale |
|
||||
| ----- | -------- | --------- |
|
||||
|
||||
### Deferred Issues
|
||||
|
||||
None yet.
|
||||
|
||||
### Blockers/Concerns Carried Forward
|
||||
|
||||
None yet.
|
||||
|
||||
## Brief Alignment
|
||||
|
||||
Last checked: Project start
|
||||
Status: ✓ Aligned
|
||||
Assessment: No work done yet - baseline alignment.
|
||||
Drift notes: None
|
||||
|
||||
## Session Continuity
|
||||
|
||||
Last session: [today's date and time]
|
||||
Stopped at: Project initialization complete
|
||||
Resume file: None
|
||||
```
|
||||
|
||||
**Key points:**
|
||||
|
||||
- Brief Summary section is IMMUTABLE after creation - never edit it
|
||||
- Copy verbatim from PROJECT.md to ensure fidelity
|
||||
- This file will be read first in every future operation
|
||||
- This file will be updated after every execution
|
||||
</step>
|
||||
|
||||
<step name="git_commit_initialization">
|
||||
Commit project initialization (brief + roadmap + state together):
|
||||
|
||||
```bash
|
||||
git add .planning/PROJECT.md .planning/ROADMAP.md .planning/STATE.md
|
||||
git add .planning/phases/
|
||||
# config.json if exists
|
||||
git add .planning/config.json 2>/dev/null
|
||||
git commit -m "$(cat <<'EOF'
|
||||
docs: initialize [project-name] ([N] phases)
|
||||
|
||||
[One-liner from PROJECT.md]
|
||||
|
||||
Phases:
|
||||
1. [phase-name]: [goal]
|
||||
2. [phase-name]: [goal]
|
||||
3. [phase-name]: [goal]
|
||||
EOF
|
||||
)"
|
||||
```
|
||||
|
||||
Confirm: "Committed: docs: initialize [project] ([N] phases)"
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
```
|
||||
Project initialized:
|
||||
- Brief: .planning/PROJECT.md
|
||||
- Roadmap: .planning/ROADMAP.md
|
||||
- State: .planning/STATE.md
|
||||
- Committed as: docs: initialize [project] ([N] phases)
|
||||
|
||||
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":**
|
||||
Exit and invoke SlashCommand("/gsd:discuss-phase 1")
|
||||
|
||||
**If user selects "Plan Phase 1 in detail":**
|
||||
Exit and invoke SlashCommand("/gsd:plan-phase 1")
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<phase_naming>
|
||||
Use `XX-kebab-case-name` format:
|
||||
- `01-foundation`
|
||||
- `02-authentication`
|
||||
- `03-core-features`
|
||||
- `04-polish`
|
||||
|
||||
Numbers ensure ordering. Names describe content.
|
||||
</phase_naming>
|
||||
|
||||
<anti_patterns>
|
||||
- Don't add time estimates
|
||||
- Don't create Gantt charts
|
||||
- Don't add resource allocation
|
||||
- Don't include risk matrices
|
||||
- Don't plan more than 6 phases (scope creep)
|
||||
|
||||
Phases are buckets of work, not project management artifacts.
|
||||
</anti_patterns>
|
||||
|
||||
<success_criteria>
|
||||
Roadmap is complete when:
|
||||
- [ ] `.planning/ROADMAP.md` exists
|
||||
- [ ] `.planning/STATE.md` exists (project memory initialized)
|
||||
- [ ] 3-6 phases defined with clear names
|
||||
- [ ] **Research flags assigned** (Likely/Unlikely for each phase)
|
||||
- [ ] **Research topics listed** for Likely phases
|
||||
- [ ] Phase directories created
|
||||
- [ ] Dependencies noted if any
|
||||
- [ ] Status tracking in place
|
||||
</success_criteria>
|
||||
```
|
||||
144
get-shit-done/workflows/discuss-milestone.md
Normal file
144
get-shit-done/workflows/discuss-milestone.md
Normal file
@@ -0,0 +1,144 @@
|
||||
<purpose>
|
||||
Gather milestone context through adaptive questioning before creating a new milestone, using intake & decision gate pattern to build comprehensive understanding of goals, scope, lessons learned, and success criteria.
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="check_state" priority="first">
|
||||
Load project state:
|
||||
|
||||
```bash
|
||||
cat .planning/STATE.md
|
||||
cat .planning/ROADMAP.md
|
||||
```
|
||||
|
||||
**If no active milestone (expected state after completing previous):**
|
||||
Continue to milestone_context.
|
||||
|
||||
**If active milestone exists:**
|
||||
|
||||
```
|
||||
Current milestone in progress: v[X.Y] [Name]
|
||||
Phases [N]-[M], [P]% complete
|
||||
|
||||
Did you want to:
|
||||
1. Complete current milestone first (/gsd:complete-milestone)
|
||||
2. Add phases to current milestone (/gsd:add-phase)
|
||||
3. Continue anyway - discuss next milestone scope
|
||||
|
||||
```
|
||||
|
||||
Wait for user response. If "Continue anyway", proceed to milestone_context.
|
||||
</step>
|
||||
|
||||
<step name="milestone_context">
|
||||
Present context from previous milestone:
|
||||
|
||||
```
|
||||
Last completed: v[X.Y] [Name] (shipped [DATE])
|
||||
Key accomplishments:
|
||||
- [From MILESTONES.md or STATE.md]
|
||||
|
||||
Total phases delivered: [N]
|
||||
Next phase number: [N+1]
|
||||
```
|
||||
|
||||
Continue to intake_gate.
|
||||
</step>
|
||||
|
||||
<step name="intake_gate">
|
||||
The primary question is: **What do you want to build/add/fix?**
|
||||
|
||||
Everything else (scope, priority, constraints) is secondary and derived from features.
|
||||
|
||||
Check for inputs:
|
||||
- Deferred issues from STATE.md (potential features)
|
||||
- Known gaps or pain points from usage
|
||||
- User's ideas for what's next
|
||||
|
||||
Start: "What do you want to add, improve, or fix in this milestone?"
|
||||
|
||||
Then use AskUserQuestion to explore features. After each response, dig deeper with follow-up questions about specifics.
|
||||
|
||||
**Feature exploration questions (use as needed):**
|
||||
|
||||
If they named specific features:
|
||||
- header: "Feature Details"
|
||||
- question: "Tell me more about [feature] - what should it do?"
|
||||
- options: [Contextual options based on feature type + "Let me describe it"]
|
||||
|
||||
If they described a general direction:
|
||||
- header: "Breaking It Down"
|
||||
- question: "That could involve [A], [B], [C] - which matter most?"
|
||||
- options: [Specific sub-features + "All of them" + "Something else"]
|
||||
|
||||
If they're not sure:
|
||||
- header: "Starting Points"
|
||||
- question: "What's been frustrating or missing?"
|
||||
- options: [Deferred issues from STATE.md + pain point categories + "Let me think about it"]
|
||||
|
||||
After gathering features, synthesize:
|
||||
|
||||
```
|
||||
Based on what you described:
|
||||
|
||||
**Features:**
|
||||
- [Feature 1]: [brief description]
|
||||
- [Feature 2]: [brief description]
|
||||
- [Feature 3]: [brief description]
|
||||
|
||||
**Estimated scope:** [N] phases
|
||||
**Theme suggestion:** v[X.Y] [Name]
|
||||
```
|
||||
|
||||
**Decision gate (MUST have all 3 options):**
|
||||
|
||||
```
|
||||
Header: "Ready?"
|
||||
Options:
|
||||
1. "Create milestone" - Proceed to /gsd:new-milestone
|
||||
2. "Ask more questions" - Explore features or constraints further
|
||||
3. "Let me add context" - I have more to share
|
||||
```
|
||||
|
||||
If "Ask more questions" → generate 2-3 contextual follow-ups → return to gate.
|
||||
If "Let me add context" → receive input, update synthesis → return to gate.
|
||||
Loop until "Create milestone" selected.
|
||||
</step>
|
||||
|
||||
<step name="handoff">
|
||||
Present summary and hand off to create-milestone:
|
||||
|
||||
```
|
||||
Milestone scope defined:
|
||||
|
||||
**Features:**
|
||||
- [Feature 1]: [description]
|
||||
- [Feature 2]: [description]
|
||||
- [Feature 3]: [description]
|
||||
|
||||
**Suggested milestone:** v[X.Y] [Theme Name]
|
||||
**Estimated phases:** [N]
|
||||
|
||||
Ready to create the milestone structure.
|
||||
```
|
||||
|
||||
**Invoke:** SlashCommand("/gsd:new-milestone")
|
||||
|
||||
Pass context forward by summarizing:
|
||||
- Features to build (the substance)
|
||||
- Suggested milestone name
|
||||
- How features map to phases
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- Project state loaded (STATE.md, ROADMAP.md)
|
||||
- Previous milestone context presented
|
||||
- **Features identified** - What to build/add/fix (the substance)
|
||||
- Features explored with clarifying questions
|
||||
- Scope synthesized from features (not asked abstractly)
|
||||
- Context handed off to /gsd:new-milestone with feature list
|
||||
</success_criteria>
|
||||
254
get-shit-done/workflows/discuss-phase.md
Normal file
254
get-shit-done/workflows/discuss-phase.md
Normal file
@@ -0,0 +1,254 @@
|
||||
<purpose>
|
||||
Gather phase context through adaptive questioning before planning, using intake & decision gate pattern to build comprehensive understanding of objectives, constraints, risks, success indicators, and codebase context.
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="validate_phase" priority="first">
|
||||
Phase number: $ARGUMENTS (required)
|
||||
|
||||
Validate phase exists in roadmap:
|
||||
|
||||
```bash
|
||||
if [ -f .planning/ROADMAP.md ]; then
|
||||
cat .planning/ROADMAP.md | grep "Phase ${PHASE}:"
|
||||
else
|
||||
cat .planning/ROADMAP.md | grep "Phase ${PHASE}:"
|
||||
fi
|
||||
```
|
||||
|
||||
**If phase not found:**
|
||||
|
||||
```
|
||||
Error: Phase ${PHASE} not found in roadmap.
|
||||
|
||||
Use /gsd:plan-phase to see available phases.
|
||||
```
|
||||
|
||||
Exit workflow.
|
||||
|
||||
**If phase found:**
|
||||
Parse phase details from roadmap:
|
||||
|
||||
- Phase number
|
||||
- Phase name
|
||||
- Phase description
|
||||
- Status (should be "Not started" or "In progress")
|
||||
|
||||
Continue to check_existing.
|
||||
</step>
|
||||
|
||||
<step name="check_existing">
|
||||
Check if CONTEXT.md already exists for this phase:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/${PHASE}-*/CONTEXT.md 2>/dev/null
|
||||
# Also check for ${PHASE}-CONTEXT.md in phase directory
|
||||
ls .planning/phases/${PHASE}-*/${PHASE}-CONTEXT.md 2>/dev/null
|
||||
```
|
||||
|
||||
**If exists:**
|
||||
|
||||
```
|
||||
Phase ${PHASE} already has context: [path to CONTEXT.md]
|
||||
|
||||
What's next?
|
||||
1. Update context - Review and revise existing context
|
||||
2. View existing - Show me the current context
|
||||
3. Skip - Use existing context as-is
|
||||
```
|
||||
|
||||
Wait for user response.
|
||||
|
||||
If "Update context": Load existing CONTEXT.md into intake flow (pre-populate known context)
|
||||
If "View existing": Read and display CONTEXT.md, then offer update/skip
|
||||
If "Skip": Exit workflow
|
||||
|
||||
**If doesn't exist:**
|
||||
Continue to intake_gate.
|
||||
</step>
|
||||
|
||||
<step name="intake_gate">
|
||||
|
||||
<no_context_handler>
|
||||
Present initial context from roadmap:
|
||||
|
||||
```
|
||||
Phase ${PHASE}: ${PHASE_NAME}
|
||||
|
||||
Roadmap description: ${PHASE_DESCRIPTION}
|
||||
|
||||
I'll gather additional context through questions to ensure comprehensive planning.
|
||||
```
|
||||
|
||||
Continue to context_analysis.
|
||||
</no_context_handler>
|
||||
|
||||
<context_analysis>
|
||||
Analyze roadmap phase description and extract what's already provided:
|
||||
|
||||
**Objectives (what):** What this phase accomplishes
|
||||
**Constraints (how):** Technical/timeline limitations mentioned
|
||||
**Risks (concerns):** Potential issues mentioned
|
||||
**Success indicators (done when):** Completion criteria mentioned
|
||||
**Codebase context (dependencies):** Related systems mentioned
|
||||
|
||||
Identify gaps where additional clarity would improve planning quality.
|
||||
</context_analysis>
|
||||
|
||||
<initial_questions>
|
||||
Ask 2-4 questions based on actual gaps. Use AskUserQuestion with structured options.
|
||||
|
||||
**If objectives are vague:**
|
||||
header: "Phase Objectives"
|
||||
question: "What should Phase ${PHASE} accomplish?"
|
||||
options:
|
||||
|
||||
- "Create new functionality" - Build something that doesn't exist yet
|
||||
- "Modify existing system" - Change or enhance what's already there
|
||||
- "Fix or refactor" - Address bugs or improve code quality
|
||||
- "Integrate external service" - Connect to API, library, or third-party
|
||||
- "Infrastructure or setup" - Database, deployment, configuration
|
||||
- "Other" - Something different
|
||||
|
||||
**If constraints are unclear:**
|
||||
header: "Constraints"
|
||||
question: "Are there constraints I should know about?"
|
||||
options:
|
||||
|
||||
- "Technical limitations" - Library choices, platform requirements, compatibility
|
||||
- "Timeline pressure" - Specific deadline or urgency
|
||||
- "Dependencies" - Waiting on other phases or external factors
|
||||
- "Performance requirements" - Speed, scale, resource constraints
|
||||
- "No constraints" - Flexible approach
|
||||
- "Other" - Something else
|
||||
|
||||
**If risks are not mentioned:**
|
||||
header: "Risks"
|
||||
question: "What could go wrong in this phase?"
|
||||
options:
|
||||
|
||||
- "Breaking changes" - Could affect existing functionality
|
||||
- "Integration complexity" - Coordinating multiple systems
|
||||
- "Unknown unknowns" - New territory, unclear best practices
|
||||
- "Performance impact" - Could slow things down
|
||||
- "Security concerns" - Authentication, data protection, vulnerabilities
|
||||
- "No major risks" - Straightforward implementation
|
||||
- "Other" - Something else
|
||||
|
||||
**If success indicators are unclear:**
|
||||
header: "Success Indicators"
|
||||
question: "How will we know this phase is complete?"
|
||||
options:
|
||||
|
||||
- "Feature works" - Functional verification (tests pass, behavior correct)
|
||||
- "Deployed and live" - Actually running in production
|
||||
- "User-verified" - Visual/manual confirmation required
|
||||
- "Metrics hit target" - Performance, coverage, or quality thresholds
|
||||
- "Documentation complete" - Properly documented for future work
|
||||
- "Other" - Something else
|
||||
|
||||
Skip questions where roadmap already provides clear answers.
|
||||
</initial_questions>
|
||||
|
||||
<gather_codebase_context>
|
||||
After initial questions, ask about codebase state:
|
||||
|
||||
header: "Codebase Context"
|
||||
question: "What should I know about the current codebase state?"
|
||||
options:
|
||||
|
||||
- "Fresh project" - Just starting, minimal existing code
|
||||
- "Established patterns" - Follow existing conventions and architecture
|
||||
- "Needs refactoring" - Current code has issues to address
|
||||
- "External dependencies" - Relies on specific libraries or services
|
||||
- "Legacy constraints" - Working with older code or technologies
|
||||
- "Not sure" - Help me figure this out
|
||||
- "Other" - Something else
|
||||
|
||||
If "Established patterns" or "External dependencies" selected, ask follow-up:
|
||||
"Which files or systems should I examine for context?"
|
||||
|
||||
If "Not sure" selected, offer to scan codebase:
|
||||
"I can scan the codebase to identify patterns and dependencies. Proceed?"
|
||||
</gather_codebase_context>
|
||||
|
||||
<decision_gate>
|
||||
**Decision gate (MUST have all 3 options):**
|
||||
|
||||
```
|
||||
Header: "Context Gathering"
|
||||
Options:
|
||||
1. "Create CONTEXT.md" - I have enough context, proceed
|
||||
2. "Ask more questions" - There are details I want to clarify
|
||||
3. "Let me add context" - I want to provide additional information
|
||||
```
|
||||
|
||||
If "Ask more questions" → generate 2-3 contextual follow-ups based on accumulated context → return to gate.
|
||||
If "Let me add context" → receive input → return to gate.
|
||||
Loop until "Create CONTEXT.md" selected.
|
||||
</decision_gate>
|
||||
|
||||
</step>
|
||||
|
||||
<step name="write_context">
|
||||
Create CONTEXT.md using accumulated context from intake flow.
|
||||
|
||||
Use template from ~/.claude/get-shit-done/templates/context.md
|
||||
|
||||
**File location:** `.planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md`
|
||||
|
||||
**If phase directory doesn't exist yet:**
|
||||
Create it: `.planning/phases/${PHASE}-${SLUG}/`
|
||||
|
||||
Use roadmap phase name for slug (lowercase, hyphens).
|
||||
|
||||
Populate template sections:
|
||||
|
||||
- `<phase_objectives>`: From "what" analysis and questions
|
||||
- `<constraints>`: From "how" analysis and questions
|
||||
- `<risks>`: From "concerns" analysis and questions
|
||||
- `<success_indicators>`: From "done when" analysis and questions
|
||||
- `<codebase_context>`: From codebase questions and optional scanning
|
||||
- `<decisions_needed>`: From questions that revealed choices to make
|
||||
- `<notes>`: Any additional context gathered
|
||||
|
||||
Write file.
|
||||
</step>
|
||||
|
||||
<step name="confirm_creation">
|
||||
Present CONTEXT.md to user:
|
||||
|
||||
```
|
||||
Created: .planning/phases/${PHASE}-${SLUG}/${PHASE}-CONTEXT.md
|
||||
|
||||
## Phase Objectives
|
||||
[summary of objectives]
|
||||
|
||||
## Key Constraints
|
||||
[summary of constraints]
|
||||
|
||||
## Risks to Watch
|
||||
[summary of risks]
|
||||
|
||||
## Success Indicators
|
||||
[summary of success criteria]
|
||||
|
||||
What's next?
|
||||
1. Plan this phase (/gsd:plan-phase ${PHASE}) - CONTEXT.md will be loaded automatically
|
||||
2. Review/edit CONTEXT.md - Make adjustments before planning
|
||||
3. Done for now
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
|
||||
- Phase number validated against roadmap
|
||||
- Context gathered through adaptive questioning
|
||||
- All five core areas addressed: objectives, constraints, risks, success indicators, codebase context
|
||||
- CONTEXT.md created in phase directory using template
|
||||
- User knows next steps (typically: plan the phase)
|
||||
</success_criteria>
|
||||
1261
get-shit-done/workflows/execute-phase.md
Normal file
1261
get-shit-done/workflows/execute-phase.md
Normal file
File diff suppressed because it is too large
Load Diff
178
get-shit-done/workflows/list-phase-assumptions.md
Normal file
178
get-shit-done/workflows/list-phase-assumptions.md
Normal file
@@ -0,0 +1,178 @@
|
||||
<purpose>
|
||||
Surface Claude's assumptions about a phase before planning, enabling users to correct misconceptions early.
|
||||
|
||||
Key difference from discuss-phase: This is ANALYSIS of what Claude thinks, not INTAKE of what user knows. No file output - purely conversational to prompt discussion.
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="validate_phase" priority="first">
|
||||
Phase number: $ARGUMENTS (required)
|
||||
|
||||
**If argument missing:**
|
||||
|
||||
```
|
||||
Error: Phase number required.
|
||||
|
||||
Usage: /gsd:list-phase-assumptions [phase-number]
|
||||
Example: /gsd:list-phase-assumptions 3
|
||||
```
|
||||
|
||||
Exit workflow.
|
||||
|
||||
**If argument provided:**
|
||||
Validate phase exists in roadmap:
|
||||
|
||||
```bash
|
||||
cat .planning/ROADMAP.md | grep -i "Phase ${PHASE}"
|
||||
```
|
||||
|
||||
**If phase not found:**
|
||||
|
||||
```
|
||||
Error: Phase ${PHASE} not found in roadmap.
|
||||
|
||||
Available phases:
|
||||
[list phases from roadmap]
|
||||
```
|
||||
|
||||
Exit workflow.
|
||||
|
||||
**If phase found:**
|
||||
Parse phase details from roadmap:
|
||||
|
||||
- Phase number
|
||||
- Phase name
|
||||
- Phase description/goal
|
||||
- Any scope details mentioned
|
||||
|
||||
Continue to analyze_phase.
|
||||
</step>
|
||||
|
||||
<step name="analyze_phase">
|
||||
Based on roadmap description and project context, identify assumptions across five areas:
|
||||
|
||||
**1. Technical Approach:**
|
||||
What libraries, frameworks, patterns, or tools would Claude use?
|
||||
- "I'd use X library because..."
|
||||
- "I'd follow Y pattern because..."
|
||||
- "I'd structure this as Z because..."
|
||||
|
||||
**2. Implementation Order:**
|
||||
What would Claude build first, second, third?
|
||||
- "I'd start with X because it's foundational"
|
||||
- "Then Y because it depends on X"
|
||||
- "Finally Z because..."
|
||||
|
||||
**3. Scope Boundaries:**
|
||||
What's included vs excluded in Claude's interpretation?
|
||||
- "This phase includes: A, B, C"
|
||||
- "This phase does NOT include: D, E, F"
|
||||
- "Boundary ambiguities: G could go either way"
|
||||
|
||||
**4. Risk Areas:**
|
||||
Where does Claude expect complexity or challenges?
|
||||
- "The tricky part is X because..."
|
||||
- "Potential issues: Y, Z"
|
||||
- "I'd watch out for..."
|
||||
|
||||
**5. Dependencies:**
|
||||
What does Claude assume exists or needs to be in place?
|
||||
- "This assumes X from previous phases"
|
||||
- "External dependencies: Y, Z"
|
||||
- "This will be consumed by..."
|
||||
|
||||
Be honest about uncertainty. Mark assumptions with confidence levels:
|
||||
- "Fairly confident: ..." (clear from roadmap)
|
||||
- "Assuming: ..." (reasonable inference)
|
||||
- "Unclear: ..." (could go multiple ways)
|
||||
</step>
|
||||
|
||||
<step name="present_assumptions">
|
||||
Present assumptions in a clear, scannable format:
|
||||
|
||||
```
|
||||
## My Assumptions for Phase ${PHASE}: ${PHASE_NAME}
|
||||
|
||||
### Technical Approach
|
||||
[List assumptions about how to implement]
|
||||
|
||||
### Implementation Order
|
||||
[List assumptions about sequencing]
|
||||
|
||||
### Scope Boundaries
|
||||
**In scope:** [what's included]
|
||||
**Out of scope:** [what's excluded]
|
||||
**Ambiguous:** [what could go either way]
|
||||
|
||||
### Risk Areas
|
||||
[List anticipated challenges]
|
||||
|
||||
### Dependencies
|
||||
**From prior phases:** [what's needed]
|
||||
**External:** [third-party needs]
|
||||
**Feeds into:** [what future phases need from this]
|
||||
|
||||
---
|
||||
|
||||
**What do you think?**
|
||||
|
||||
Are these assumptions accurate? Let me know:
|
||||
- What I got right
|
||||
- What I got wrong
|
||||
- What I'm missing
|
||||
```
|
||||
|
||||
Wait for user response.
|
||||
</step>
|
||||
|
||||
<step name="gather_feedback">
|
||||
**If user provides corrections:**
|
||||
|
||||
Acknowledge the corrections:
|
||||
|
||||
```
|
||||
Got it. Key corrections:
|
||||
- [correction 1]
|
||||
- [correction 2]
|
||||
|
||||
This changes my understanding significantly. [Summarize new understanding]
|
||||
```
|
||||
|
||||
**If user confirms assumptions:**
|
||||
|
||||
```
|
||||
Great, assumptions validated.
|
||||
```
|
||||
|
||||
Continue to offer_next.
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
Present next steps:
|
||||
|
||||
```
|
||||
What's next?
|
||||
1. Discuss context (/gsd:discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
|
||||
2. Plan this phase (/gsd:plan-phase ${PHASE}) - Create detailed execution plans
|
||||
3. Re-examine assumptions - I'll analyze again with your corrections
|
||||
4. Done for now
|
||||
```
|
||||
|
||||
Wait for user selection.
|
||||
|
||||
If "Discuss context": Note that CONTEXT.md will incorporate any corrections discussed here
|
||||
If "Plan this phase": Proceed knowing assumptions are understood
|
||||
If "Re-examine": Return to analyze_phase with updated understanding
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
- Phase number validated against roadmap
|
||||
- Assumptions surfaced across five areas: technical approach, implementation order, scope, risks, dependencies
|
||||
- Confidence levels marked where appropriate
|
||||
- "What do you think?" prompt presented
|
||||
- User feedback acknowledged
|
||||
- Clear next steps offered
|
||||
</success_criteria>
|
||||
783
get-shit-done/workflows/plan-phase.md
Normal file
783
get-shit-done/workflows/plan-phase.md
Normal file
@@ -0,0 +1,783 @@
|
||||
<decimal_phase_numbering>
|
||||
Decimal phases enable urgent work insertion without renumbering:
|
||||
|
||||
- Integer phases (1, 2, 3) = planned milestone work
|
||||
- Decimal phases (2.1, 2.2) = urgent insertions between integers
|
||||
|
||||
**Rules:**
|
||||
|
||||
- Decimals must be between consecutive integers (2.1 between 2 and 3)
|
||||
- Filesystem sorting works automatically (2 < 2.1 < 2.2 < 3)
|
||||
- Execution order follows numeric sort
|
||||
- Directory format: `02.1-description/` (note the dot)
|
||||
- Plan format: `02.1-01-PLAN.md`
|
||||
|
||||
**Example:**
|
||||
|
||||
```
|
||||
Roadmap before insertion:
|
||||
- Phase 72: Analytics (complete)
|
||||
- Phase 73: Dashboard (planned)
|
||||
|
||||
User: "Need Sentry bugfix before Phase 73"
|
||||
|
||||
System creates Phase 72.1:
|
||||
- Phase 72: Analytics (complete)
|
||||
- Phase 72.1: Sentry Bugfix (INSERTED)
|
||||
- Phase 73: Dashboard (planned)
|
||||
|
||||
Execution order: 72 → 72.1 → 73
|
||||
```
|
||||
|
||||
**Validation:**
|
||||
When creating decimal phase X.Y:
|
||||
|
||||
1. Integer phase X must exist and be complete
|
||||
2. Integer phase X+1 must exist in roadmap
|
||||
3. Decimal X.Y must not already exist
|
||||
4. Y must be >= 1
|
||||
</decimal_phase_numbering>
|
||||
|
||||
<required_reading>
|
||||
**Read these files NOW:**
|
||||
|
||||
1. ~/.claude/get-shit-done/templates/phase-prompt.md
|
||||
2. ~/.claude/get-shit-done/references/plan-format.md
|
||||
3. ~/.claude/get-shit-done/references/scope-estimation.md
|
||||
4. ~/.claude/get-shit-done/references/checkpoints.md
|
||||
5. Read `.planning/ROADMAP.md`
|
||||
6. Read `.planning/PROJECT.md`
|
||||
|
||||
**Load domain expertise from ROADMAP:** 7. Parse ROADMAP.md's `## Domain Expertise` section for paths 8. Read each domain SKILL.md (these serve as indexes) 9. Determine phase type from ROADMAP (UI, database, API, shaders, etc.) 10. Check each SKILL.md's `<references_index>` section 11. Load ONLY references relevant to THIS phase type
|
||||
|
||||
**Example:** Planning a UI phase for an ISF shader macOS app:
|
||||
|
||||
- ROADMAP says: `expertise/isf-shaders`, `expertise/macos-apps`
|
||||
- Read both SKILL.md files
|
||||
- isf-shaders `<references_index>` says: "For UI phases: references/parameter-ui.md"
|
||||
- macos-apps `<references_index>` says: "For UI phases: references/swiftui-layout.md"
|
||||
- Load those two references, not everything
|
||||
</required_reading>
|
||||
|
||||
<purpose>
|
||||
Create an executable phase prompt (PLAN.md). This is where we get specific:
|
||||
objective, context, tasks, verification, success criteria, and output specification.
|
||||
|
||||
**Key insight:** PLAN.md IS the prompt that Claude executes. Not a document that
|
||||
gets transformed into a prompt.
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="load_project_state" priority="first">
|
||||
Before any planning, read project state:
|
||||
|
||||
```bash
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
```
|
||||
|
||||
**If file exists:** Parse and internalize:
|
||||
|
||||
- Current position (which phase we're planning)
|
||||
- Accumulated decisions (constraints on this phase)
|
||||
- Deferred issues (candidates for inclusion in this phase)
|
||||
- Blockers/concerns (things this phase may need to address)
|
||||
- Brief alignment status (are we on track?)
|
||||
|
||||
**If file missing but .planning/ exists:**
|
||||
|
||||
```
|
||||
STATE.md missing but planning artifacts exist.
|
||||
Options:
|
||||
1. Reconstruct from existing artifacts
|
||||
2. Continue without project state (may lose accumulated context)
|
||||
```
|
||||
|
||||
This ensures planning has full project context.
|
||||
</step>
|
||||
|
||||
<step name="identify_phase">
|
||||
Check roadmap for phases:
|
||||
```bash
|
||||
cat .planning/ROADMAP.md
|
||||
ls .planning/phases/
|
||||
```
|
||||
|
||||
If multiple phases available, ask which one to plan.
|
||||
If obvious (first incomplete phase), proceed.
|
||||
|
||||
**Phase number parsing:**
|
||||
|
||||
When user provides phase number, parse using regex: `^(\d+)(?:\.(\d+))?$`
|
||||
|
||||
- Group 1: Integer part (required) - e.g., "2" from "2" or "2.1"
|
||||
- Group 2: Decimal part (optional) - e.g., "1" from "2.1"
|
||||
|
||||
**If decimal phase (e.g., 72.1):**
|
||||
|
||||
Validate insertion:
|
||||
|
||||
1. Check integer phase X (72) exists in roadmap: `grep "Phase 72:" ROADMAP.md`
|
||||
2. Check integer phase X (72) is complete: Look for "Complete" status
|
||||
3. Check integer phase X+1 (73) exists in roadmap: `grep "Phase 73:" ROADMAP.md`
|
||||
4. Check decimal X.Y (72.1) doesn't already exist: `ls .planning/phases/ | grep "^72\.1-"`
|
||||
5. Decimal part Y must be >= 1
|
||||
|
||||
If validation fails, explain issue and suggest correction.
|
||||
|
||||
**Directory naming:**
|
||||
|
||||
```bash
|
||||
# Integer phase: 01-foundation
|
||||
# Decimal phase: 01.1-hotfix
|
||||
|
||||
if decimal:
|
||||
DIR_NAME="${PHASE_INT}.${PHASE_DEC}-${SLUG}"
|
||||
else:
|
||||
DIR_NAME="${PHASE_INT}-${SLUG}"
|
||||
fi
|
||||
```
|
||||
|
||||
**Roadmap marking:**
|
||||
|
||||
When creating decimal phases, mark them as "(INSERTED)" in roadmap entries.
|
||||
|
||||
Read any existing PLAN.md or FINDINGS.md in the phase directory.
|
||||
</step>
|
||||
|
||||
<step name="mandatory_discovery">
|
||||
**Discovery is MANDATORY unless you can prove current context exists.**
|
||||
|
||||
Claude's training data is 6-18 months stale. Treat pre-existing knowledge as hypothesis, not fact.
|
||||
|
||||
<discovery_decision_tree>
|
||||
|
||||
````
|
||||
Starting discovery for Phase [X]...
|
||||
↓
|
||||
CHECK ROADMAP FLAG FIRST
|
||||
─────────────────────────────────────
|
||||
```bash
|
||||
# Check if roadmap flagged this phase for research
|
||||
grep -A2 "Phase [X]:" .planning/ROADMAP.md | grep "Research:"
|
||||
```
|
||||
|
||||
→ If `Research: Likely` → Minimum depth is Level 1 (don't skip to Level 0)
|
||||
→ If `Research: Unlikely` → Level 0 check still runs (might escalate)
|
||||
→ Flag is a hint, not a mandate - actual depth determined below
|
||||
↓
|
||||
LEVEL 0: Pattern Check (30 seconds)
|
||||
─────────────────────────────────────
|
||||
**Skip this check if roadmap flagged Research: Likely**
|
||||
|
||||
Is this pure internal work using ONLY existing codebase patterns?
|
||||
|
||||
Check with:
|
||||
|
||||
```bash
|
||||
# Look for existing patterns in codebase
|
||||
grep -r "libraryName" src/ 2>/dev/null | head -5
|
||||
ls src/components/ 2>/dev/null # existing UI patterns
|
||||
cat package.json 2>/dev/null | grep -A5 '"dependencies"'
|
||||
```
|
||||
|
||||
→ If ALL work follows established codebase patterns: SKIP discovery, proceed to planning
|
||||
→ If ANY external dependency, new library, or API integration: Continue to Level 1+
|
||||
↓
|
||||
Does fresh FINDINGS.md exist?
|
||||
─────────────────────────────────────
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-name/FINDINGS.md 2>/dev/null
|
||||
```
|
||||
|
||||
If exists, check freshness:
|
||||
|
||||
- General libraries/frameworks: Valid for 30 days
|
||||
- Fast-moving APIs (Stripe, OpenAI, etc.): Valid for 7 days
|
||||
- Check file date vs today
|
||||
|
||||
→ If fresh FINDINGS.md exists covering this phase's topics: SKIP discovery, use existing
|
||||
→ If missing or stale: Continue to determine depth
|
||||
↓
|
||||
Determine Discovery Depth
|
||||
─────────────────────────────────────
|
||||
Assess the phase requirements:
|
||||
|
||||
**LEVEL 1 - Quick Verification (2-5 min):**
|
||||
Use when:
|
||||
|
||||
- Single known library, just confirming syntax/version
|
||||
- Low-risk decision (easily changed later)
|
||||
- "Is X still the right choice?"
|
||||
|
||||
Action:
|
||||
|
||||
1. Context7: mcp**context7**resolve-library-id → mcp**context7**get-library-docs
|
||||
2. Verify current version/API matches expectations
|
||||
3. No FINDINGS.md needed - proceed with confirmed knowledge
|
||||
|
||||
**LEVEL 2 - Standard Research (15-30 min):**
|
||||
Use when:
|
||||
|
||||
- Choosing between 2-3 options
|
||||
- New external integration (API, service)
|
||||
- Medium-risk decision
|
||||
|
||||
Action:
|
||||
|
||||
1. Route to workflows/research-phase.md with depth=standard
|
||||
2. Produces FINDINGS.md with recommendation
|
||||
3. Return here after FINDINGS.md created
|
||||
|
||||
**LEVEL 3 - Deep Dive (1+ hour):**
|
||||
Use when:
|
||||
|
||||
- Architectural decision with long-term impact
|
||||
- Novel problem without clear patterns
|
||||
- High-risk, hard to change later
|
||||
- Multiple interacting systems
|
||||
|
||||
Action:
|
||||
|
||||
1. Route to workflows/research-phase.md with depth=deep
|
||||
2. Full research with cross-verification
|
||||
3. FINDINGS.md with detailed rationale and validation checkpoints
|
||||
4. Return here after FINDINGS.md created
|
||||
|
||||
```
|
||||
</discovery_decision_tree>
|
||||
|
||||
<depth_indicators>
|
||||
**Signals requiring LEVEL 2+:**
|
||||
- Phase involves new library not in package.json
|
||||
- Phase involves external API integration
|
||||
- Phase description includes "choose", "select", "evaluate"
|
||||
- Roadmap marked this phase with `Research: Yes`
|
||||
- Technology mentioned that Claude hasn't used in THIS codebase
|
||||
|
||||
**Signals requiring LEVEL 3:**
|
||||
- Words like "architecture", "design", "system"
|
||||
- Integration between multiple external services
|
||||
- Data modeling decisions
|
||||
- Authentication/authorization design
|
||||
- Real-time, sync, or distributed systems
|
||||
</depth_indicators>
|
||||
|
||||
<skip_conditions>
|
||||
**Discovery can be skipped (Level 0) ONLY when ALL true:**
|
||||
□ Pattern already exists in codebase (grep confirms)
|
||||
□ No new external dependencies
|
||||
□ Fresh FINDINGS.md exists (if external deps involved)
|
||||
□ Pure internal refactoring or feature extension
|
||||
□ Using established project conventions only
|
||||
|
||||
**Examples that skip discovery:**
|
||||
- "Add delete button" → existing button patterns in codebase
|
||||
- "Add field to model" → Prisma/schema patterns established
|
||||
- "Create CRUD endpoint" → existing API patterns to follow
|
||||
|
||||
**Examples that REQUIRE discovery:**
|
||||
- "Add authentication" → Level 2-3 (new system, choices to make)
|
||||
- "Integrate Stripe" → Level 2 (external API)
|
||||
- "Add email service" → Level 2 (compare options)
|
||||
- "Design data sync" → Level 3 (architectural)
|
||||
</skip_conditions>
|
||||
|
||||
Present discovery decision:
|
||||
```
|
||||
|
||||
Phase [X]: [Name]
|
||||
|
||||
Discovery assessment:
|
||||
|
||||
- Roadmap flag: [Likely / Unlikely] ([reason from roadmap])
|
||||
- Roadmap topics: [topics if flagged, or N/A]
|
||||
- New external dependencies: [yes/no - list them]
|
||||
- Existing FINDINGS.md: [yes (date) / no]
|
||||
- Codebase patterns exist: [yes/no]
|
||||
|
||||
Discovery depth: [Level 0 (skip) / Level 1 (verify) / Level 2 (standard) / Level 3 (deep)]
|
||||
Reason: [one line explanation]
|
||||
|
||||
[If Level 1: Proceeding with quick verification...]
|
||||
[If Level 2-3: Routing to research workflow...]
|
||||
[If Level 0: Skipping discovery, proceeding to planning...]
|
||||
|
||||
````
|
||||
|
||||
**Note:** If roadmap flagged `Research: Likely`, Level 0 (skip) is not available.
|
||||
The roadmap flag lowers the bar for triggering research but doesn't guarantee depth.
|
||||
</step>
|
||||
|
||||
<step name="read_project_history">
|
||||
Before planning, absorb accumulated project wisdom. This is the **context injection** that ensures each phase benefits from all prior phases.
|
||||
|
||||
**1. From STATE.md (already loaded):**
|
||||
|
||||
- Decisions table → These CONSTRAIN this phase's approach
|
||||
- Deferred issues → Candidates for inclusion in this phase
|
||||
- Blockers/concerns → Things this phase may need to address
|
||||
|
||||
**2. Read previous phase summaries:**
|
||||
|
||||
```bash
|
||||
# List all summaries from prior phases
|
||||
ls .planning/phases/*/*-SUMMARY.md 2>/dev/null | sort
|
||||
```
|
||||
|
||||
Don't load ALL summaries into context—scan them looking for:
|
||||
|
||||
- Decisions that constrain this phase's approach
|
||||
- Issues flagged for "later" where "later" is now
|
||||
- Warnings in "Next Phase Readiness" that apply
|
||||
- Patterns established that should be maintained
|
||||
|
||||
**3. Read ISSUES.md:**
|
||||
|
||||
```bash
|
||||
cat .planning/ISSUES.md 2>/dev/null
|
||||
```
|
||||
|
||||
For each open issue, assess:
|
||||
|
||||
- Is this relevant to the phase being planned?
|
||||
- Has it been waiting long enough to address?
|
||||
- Would addressing it now be natural (same files/subsystem)?
|
||||
- Is it blocking something this phase needs?
|
||||
|
||||
**4. Synthesize into planning context:**
|
||||
|
||||
Before proceeding to task breakdown, answer:
|
||||
|
||||
**Q1: What decisions from previous phases constrain this phase?**
|
||||
→ These become explicit notes in task `<action>` sections
|
||||
Example: "Use jose (NOT jsonwebtoken - see Phase 1 decision)"
|
||||
|
||||
**Q2: Are there deferred issues that should become tasks?**
|
||||
→ These get added to the task list, marked "Addressing ISS-XXX"
|
||||
Example: "Task 3: Add rate limiting (ISS-001 from Phase 2)"
|
||||
|
||||
**Q3: Are there concerns from "Next Phase Readiness" that apply?**
|
||||
→ These inform verification criteria or become explicit tasks
|
||||
Example: "Load test auth endpoints (Phase 2 concern)"
|
||||
|
||||
**Q4: Given all context, does the roadmap's description still make sense?**
|
||||
→ If not, flag: "Phase as described may need adjustment because [X]"
|
||||
|
||||
**5. Document what will inform the plan:**
|
||||
|
||||
Track for inclusion in PLAN.md `<context>` section:
|
||||
|
||||
- Which prior summaries are relevant (will be @referenced)
|
||||
- Which decisions apply (brief notes)
|
||||
- Which issues are being addressed (ISS-XXX numbers)
|
||||
- Which concerns are being verified
|
||||
</step>
|
||||
|
||||
<step name="gather_phase_context">
|
||||
For this specific phase, understand:
|
||||
- What's the phase goal? (from roadmap)
|
||||
- What exists already? (scan codebase if mid-project)
|
||||
- What dependencies are met? (previous phases complete?)
|
||||
- Any research findings? (FINDINGS.md)
|
||||
- Any phase context? ({phase}-CONTEXT.md)
|
||||
|
||||
```bash
|
||||
# If mid-project, understand current state
|
||||
ls -la src/ 2>/dev/null
|
||||
cat package.json 2>/dev/null | head -20
|
||||
|
||||
# Check for phase-specific context (created by /gsd:discuss-phase)
|
||||
cat .planning/phases/XX-name/${PHASE}-CONTEXT.md 2>/dev/null
|
||||
```
|
||||
|
||||
**If {phase}-CONTEXT.md exists:**
|
||||
This file contains the user's input gathered through pre-planning questions. It captures their intent, preferences, constraints, and decisions BEFORE you plan.
|
||||
|
||||
**You MUST use this context to inform your planning:**
|
||||
|
||||
- `<phase_objectives>` → defines what to build (don't guess scope)
|
||||
- `<constraints>` → technical/timeline limits to respect
|
||||
- `<risks>` → inform verification criteria and task ordering
|
||||
- `<success_indicators>` → become plan success criteria
|
||||
- `<codebase_context>` → patterns to follow, files to reference
|
||||
- `<decisions_needed>` → resolve during task breakdown or flag as checkpoints
|
||||
- `<notes>` → user clarifications that override assumptions
|
||||
|
||||
**If {phase}-CONTEXT.md does NOT exist:**
|
||||
Suggest running `/gsd:discuss-phase {phase}` first to gather context, OR proceed with roadmap description only (less informed planning).
|
||||
|
||||
</step>
|
||||
|
||||
<step name="break_into_tasks">
|
||||
Decompose the phase into tasks.
|
||||
|
||||
Each task must have:
|
||||
|
||||
- **Type**: auto, checkpoint:human-verify, checkpoint:decision (human-action rarely needed)
|
||||
- **Task name**: Clear, action-oriented
|
||||
- **Files**: Which files created/modified (for auto tasks)
|
||||
- **Action**: Specific implementation (including what to avoid and WHY)
|
||||
- **Verify**: How to prove it worked
|
||||
- **Done**: Acceptance criteria
|
||||
|
||||
**Identify checkpoints:**
|
||||
|
||||
- Claude automated work needing visual/functional verification? → checkpoint:human-verify
|
||||
- Implementation choices to make? → checkpoint:decision
|
||||
- Truly unavoidable manual action (email link, 2FA)? → checkpoint:human-action (rare)
|
||||
|
||||
**Critical:** If external resource has CLI/API (Vercel, Stripe, Upstash, GitHub, etc.), use type="auto" to automate it. Only checkpoint for verification AFTER automation.
|
||||
|
||||
See ~/.claude/get-shit-done/references/checkpoints.md for checkpoint structure and automation guidance.
|
||||
</step>
|
||||
|
||||
<step name="estimate_scope">
|
||||
After breaking into tasks, assess scope against the **quality degradation curve**.
|
||||
|
||||
**ALWAYS split if:**
|
||||
|
||||
- > 3 tasks total
|
||||
- Multiple subsystems (DB + API + UI = separate plans)
|
||||
- > 5 files modified in any single task
|
||||
- Complex domains (auth, payments, data modeling)
|
||||
|
||||
**Aggressive atomicity principle:** Better to have 10 small, high-quality plans than 3 large, degraded plans.
|
||||
|
||||
**If scope is appropriate (2-3 tasks, single subsystem, <5 files per task):**
|
||||
Proceed to confirm_breakdown for a single plan.
|
||||
|
||||
**If scope is large (>3 tasks):**
|
||||
Split into multiple plans by:
|
||||
|
||||
- Subsystem (01-01: Database, 01-02: API, 01-03: UI, 01-04: Frontend)
|
||||
- Dependency (01-01: Setup, 01-02: Core, 01-03: Features, 01-04: Testing)
|
||||
- Complexity (01-01: Layout, 01-02: Data fetch, 01-03: Visualization)
|
||||
- Autonomous vs Interactive (group auto tasks for subagent execution)
|
||||
|
||||
**Each plan must be:**
|
||||
|
||||
- 2-3 tasks maximum
|
||||
- ~50% context target (not 80%)
|
||||
- Independently committable
|
||||
|
||||
**Autonomous plan optimization:**
|
||||
|
||||
- Plans with NO checkpoints → will execute via subagent (fresh context)
|
||||
- Plans with checkpoints → execute in main context (user interaction required)
|
||||
- Try to group autonomous work together for maximum fresh contexts
|
||||
|
||||
See ~/.claude/get-shit-done/references/scope-estimation.md for complete splitting guidance and quality degradation analysis.
|
||||
</step>
|
||||
|
||||
<step name="confirm_breakdown">
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
Parse the config:
|
||||
|
||||
- If `mode: "yolo"` → auto-approve
|
||||
- If `mode: "interactive"` → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_breakdown`
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Phase [X] breakdown ([N] tasks, [M] plan(s))
|
||||
|
||||
[Show breakdown summary without prompting]
|
||||
|
||||
Proceeding to plan creation...
|
||||
```
|
||||
|
||||
**If prompting (interactive mode or custom with gate enabled):**
|
||||
|
||||
Present the breakdown inline:
|
||||
|
||||
**If single plan (2-3 tasks):**
|
||||
|
||||
```
|
||||
Here's the proposed breakdown for Phase [X]:
|
||||
|
||||
### Tasks (single plan: {phase}-01-PLAN.md)
|
||||
1. [Task name] - [brief description] [type: auto/checkpoint]
|
||||
2. [Task name] - [brief description] [type: auto/checkpoint]
|
||||
[3. [Task name] - [brief description] [type: auto/checkpoint]] (optional 3rd task if small)
|
||||
|
||||
Autonomous: [yes/no] (no checkpoints = subagent execution with fresh context)
|
||||
|
||||
Does this breakdown look right? (yes / adjust / start over)
|
||||
```
|
||||
|
||||
**If multiple plans (>3 tasks or multiple subsystems):**
|
||||
|
||||
```
|
||||
Here's the proposed breakdown for Phase [X]:
|
||||
|
||||
This phase requires 3 plans to maintain quality:
|
||||
|
||||
### Plan 1: {phase}-01-PLAN.md - [Subsystem/Component Name]
|
||||
1. [Task name] - [brief description] [type]
|
||||
2. [Task name] - [brief description] [type]
|
||||
3. [Task name] - [brief description] [type]
|
||||
|
||||
### Plan 2: {phase}-02-PLAN.md - [Subsystem/Component Name]
|
||||
1. [Task name] - [brief description] [type]
|
||||
2. [Task name] - [brief description] [type]
|
||||
|
||||
### Plan 3: {phase}-03-PLAN.md - [Subsystem/Component Name]
|
||||
1. [Task name] - [brief description] [type]
|
||||
2. [Task name] - [brief description] [type]
|
||||
|
||||
Each plan is independently executable and scoped to ~50% context.
|
||||
|
||||
Does this breakdown look right? (yes / adjust / start over)
|
||||
```
|
||||
|
||||
Wait for confirmation before proceeding.
|
||||
|
||||
If "adjust": Ask what to change, revise, present again.
|
||||
If "start over": Return to gather_phase_context step.
|
||||
</step>
|
||||
|
||||
<step name="approach_ambiguity">
|
||||
If multiple valid approaches exist for any task:
|
||||
|
||||
Use AskUserQuestion:
|
||||
|
||||
- header: "Approach"
|
||||
- question: "For [task], there are multiple valid approaches:"
|
||||
- options:
|
||||
- "[Approach A]" - [tradeoff description]
|
||||
- "[Approach B]" - [tradeoff description]
|
||||
- "Decide for me" - Use your best judgment
|
||||
|
||||
Only ask if genuinely ambiguous. Don't ask obvious choices.
|
||||
</step>
|
||||
|
||||
<step name="decision_gate">
|
||||
After breakdown confirmed (or auto-approved):
|
||||
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
Read config from previous step (already parsed).
|
||||
|
||||
- If `mode: "yolo"` → auto-approve
|
||||
- If `mode: "interactive"` → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_plan`
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Create phase prompt for Phase [X]
|
||||
```
|
||||
|
||||
Proceed directly to write_phase_prompt.
|
||||
|
||||
**If prompting:**
|
||||
|
||||
Use AskUserQuestion:
|
||||
|
||||
- header: "Ready"
|
||||
- question: "Ready to create the phase prompt, or would you like me to ask more questions?"
|
||||
- options:
|
||||
- "Create phase prompt" - I have enough context
|
||||
- "Ask more questions" - There are details to clarify
|
||||
- "Let me add context" - I want to provide more information
|
||||
|
||||
Loop until "Create phase prompt" selected.
|
||||
</step>
|
||||
|
||||
<step name="write_phase_prompt">
|
||||
Use template from `~/.claude/get-shit-done/templates/phase-prompt.md`.
|
||||
|
||||
**If single plan:**
|
||||
Write to `.planning/phases/XX-name/{phase}-01-PLAN.md`
|
||||
|
||||
**If multiple plans:**
|
||||
Write multiple files:
|
||||
|
||||
- `.planning/phases/XX-name/{phase}-01-PLAN.md`
|
||||
- `.planning/phases/XX-name/{phase}-02-PLAN.md`
|
||||
- `.planning/phases/XX-name/{phase}-03-PLAN.md`
|
||||
|
||||
Each file follows the template structure:
|
||||
|
||||
```markdown
|
||||
---
|
||||
phase: XX-name
|
||||
plan: { plan-number }
|
||||
type: execute
|
||||
domain: [if domain expertise loaded]
|
||||
---
|
||||
|
||||
<objective>
|
||||
[Plan-specific goal - what this plan accomplishes]
|
||||
|
||||
Purpose: [Why this plan matters for the phase]
|
||||
Output: [What artifacts will be created by this plan]
|
||||
</objective>
|
||||
|
||||
<execution_context>
|
||||
./execute-phase.md
|
||||
~/.claude/get-shit-done/templates/summary.md
|
||||
[If plan has ANY checkpoint tasks (type="checkpoint:*"), add:]
|
||||
~/.claude/get-shit-done/references/checkpoints.md
|
||||
</execution_context>
|
||||
|
||||
<context>
|
||||
@.planning/PROJECT.md
|
||||
@.planning/ROADMAP.md
|
||||
@.planning/STATE.md
|
||||
|
||||
[If research done:]
|
||||
@.planning/phases/XX-name/FINDINGS.md
|
||||
|
||||
[If phase context exists (from /gsd:discuss-phase):]
|
||||
@.planning/phases/XX-name/{phase}-CONTEXT.md
|
||||
|
||||
[If continuing from previous plan in same phase:]
|
||||
@.planning/phases/XX-name/{phase}-{prev}-SUMMARY.md
|
||||
|
||||
[Prior phase summaries relevant to this work (from read_project_history):]
|
||||
@.planning/phases/01-foundation/01-02-SUMMARY.md # If contains relevant decisions
|
||||
@.planning/phases/02-auth/02-01-SUMMARY.md # If contains relevant patterns
|
||||
|
||||
[Document what prior context informed this plan:]
|
||||
**Prior decisions affecting this phase:**
|
||||
|
||||
- [Decision from Phase X that constrains approach]
|
||||
- [Decision from Phase Y that establishes pattern]
|
||||
|
||||
**Deferred issues being addressed:**
|
||||
|
||||
- ISS-XXX: [description] (from Phase Z)
|
||||
|
||||
**Concerns being verified:**
|
||||
|
||||
- [Concern from Phase W's "Next Phase Readiness"]
|
||||
|
||||
[Relevant source files:]
|
||||
@src/path/to/relevant.ts
|
||||
</context>
|
||||
|
||||
<tasks>
|
||||
[Tasks in XML format with type attribute]
|
||||
[Mix of type="auto" and type="checkpoint:*" as needed]
|
||||
</tasks>
|
||||
|
||||
<verification>
|
||||
[Overall plan verification checks]
|
||||
</verification>
|
||||
|
||||
<success_criteria>
|
||||
[Measurable completion criteria for this plan]
|
||||
</success_criteria>
|
||||
|
||||
<output>
|
||||
After completion, create `.planning/phases/XX-name/{phase}-{plan}-SUMMARY.md`
|
||||
[Include summary structure from template]
|
||||
</output>
|
||||
```
|
||||
|
||||
**For multi-plan phases:**
|
||||
|
||||
- Each plan has focused scope (3-6 tasks)
|
||||
- Plans reference previous plan summaries in context
|
||||
- Last plan's success criteria includes "Phase X complete"
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
**If single plan:**
|
||||
```
|
||||
Phase plan created: .planning/phases/XX-name/{phase}-01-PLAN.md
|
||||
[X] tasks defined.
|
||||
|
||||
What's next?
|
||||
|
||||
1. Execute plan (/gsd:execute-plan .planning/phases/XX-name/{phase}-01-PLAN.md)
|
||||
2. Review/adjust tasks
|
||||
3. Done for now
|
||||
|
||||
```
|
||||
|
||||
**If user selects "Execute plan":**
|
||||
Exit skill and invoke SlashCommand("/gsd:execute-plan .planning/phases/XX-name/{phase}-01-PLAN.md")
|
||||
|
||||
Note: Command is shown in the options above so user can see what will run.
|
||||
|
||||
**If multiple plans:**
|
||||
```
|
||||
|
||||
Phase plans created:
|
||||
|
||||
- {phase}-01-PLAN.md ([X] tasks) - [Subsystem name]
|
||||
- {phase}-02-PLAN.md ([X] tasks) - [Subsystem name]
|
||||
- {phase}-03-PLAN.md ([X] tasks) - [Subsystem name]
|
||||
|
||||
Total: [X] tasks across [Y] focused plans.
|
||||
|
||||
What's next?
|
||||
|
||||
1. Execute first plan (/gsd:execute-plan .planning/phases/XX-name/{phase}-01-PLAN.md)
|
||||
2. Review/adjust tasks
|
||||
3. Done for now
|
||||
|
||||
```
|
||||
|
||||
**If user selects "Execute first plan":**
|
||||
Exit skill and invoke SlashCommand("/gsd:execute-plan .planning/phases/XX-name/{phase}-01-PLAN.md")
|
||||
|
||||
Note: Command is shown in the options above so user can see what will run.
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<task_quality>
|
||||
Good tasks:
|
||||
- "Add User model to Prisma schema with email, passwordHash, createdAt"
|
||||
- "Create POST /api/auth/login endpoint with bcrypt validation"
|
||||
- "Add protected route middleware checking JWT in cookies"
|
||||
|
||||
Bad tasks:
|
||||
- "Set up authentication" (too vague)
|
||||
- "Make it secure" (not actionable)
|
||||
- "Handle edge cases" (which ones?)
|
||||
|
||||
If you can't specify Files + Action + Verify + Done, the task is too vague.
|
||||
</task_quality>
|
||||
|
||||
<anti_patterns>
|
||||
- Don't add story points
|
||||
- Don't estimate hours
|
||||
- Don't assign to team members
|
||||
- Don't add acceptance criteria committees
|
||||
- Don't create sub-sub-sub tasks
|
||||
|
||||
Tasks are instructions for Claude, not Jira tickets.
|
||||
</anti_patterns>
|
||||
|
||||
<success_criteria>
|
||||
Phase planning is complete when:
|
||||
- [ ] STATE.md read and project history absorbed
|
||||
- [ ] **Mandatory discovery completed** (Level 0-3 as appropriate)
|
||||
- [ ] If Level 2-3: FINDINGS.md exists with current context
|
||||
- [ ] If Level 1: Quick verification performed via Context7
|
||||
- [ ] Prior decisions, issues, and concerns synthesized
|
||||
- [ ] One or more PLAN files exist with XML structure ({phase}-{plan}-PLAN.md)
|
||||
- [ ] Each plan has: Objective, context, tasks, verification, success criteria, output
|
||||
- [ ] @context references included (including STATE.md, FINDINGS.md if exists, relevant prior summaries)
|
||||
- [ ] Prior decisions documented in context section
|
||||
- [ ] Deferred issues being addressed are noted
|
||||
- [ ] Each plan has 2-3 tasks (scoped to ~50% context)
|
||||
- [ ] Each task has: Type, Files (if auto), Action, Verify, Done
|
||||
- [ ] Checkpoints identified and properly structured
|
||||
- [ ] Tasks are specific enough for Claude to execute
|
||||
- [ ] If multiple plans: logical split by subsystem/dependency/complexity
|
||||
- [ ] User knows next steps
|
||||
</success_criteria>
|
||||
```
|
||||
293
get-shit-done/workflows/research-phase.md
Normal file
293
get-shit-done/workflows/research-phase.md
Normal file
@@ -0,0 +1,293 @@
|
||||
<purpose>
|
||||
Execute discovery/research at the appropriate depth level.
|
||||
Produces FINDINGS.md (for Level 2-3) that informs PLAN.md creation.
|
||||
|
||||
Called from plan-phase.md's mandatory_discovery step with a depth parameter.
|
||||
</purpose>
|
||||
|
||||
<depth_levels>
|
||||
**This workflow supports three depth levels:**
|
||||
|
||||
| Level | Name | Time | Output | When |
|
||||
| ----- | ------------ | --------- | ------------------------------------------ | ----------------------------------------- |
|
||||
| 1 | Quick Verify | 2-5 min | No file, proceed with verified knowledge | Single library, confirming current syntax |
|
||||
| 2 | Standard | 15-30 min | FINDINGS.md | Choosing between options, new integration |
|
||||
| 3 | Deep Dive | 1+ hour | Detailed FINDINGS.md with validation gates | Architectural decisions, novel problems |
|
||||
|
||||
**Depth is determined by plan-phase.md before routing here.**
|
||||
</depth_levels>
|
||||
|
||||
<source_hierarchy>
|
||||
**MANDATORY: Context7 BEFORE WebSearch**
|
||||
|
||||
Claude's training data is 6-18 months stale. Always verify.
|
||||
|
||||
1. **Context7 MCP FIRST** - Current docs, no hallucination
|
||||
2. **Official docs** - When Context7 lacks coverage
|
||||
3. **WebSearch LAST** - For comparisons and trends only
|
||||
|
||||
See ~/.claude/get-shit-done/templates/research-prompt.md `<source_hierarchy>` for full protocol.
|
||||
</source_hierarchy>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="determine_depth">
|
||||
Check the depth parameter passed from plan-phase.md:
|
||||
- `depth=verify` → Level 1 (Quick Verification)
|
||||
- `depth=standard` → Level 2 (Standard Research)
|
||||
- `depth=deep` → Level 3 (Deep Dive)
|
||||
|
||||
Route to appropriate level workflow below.
|
||||
</step>
|
||||
|
||||
<step name="level_1_quick_verify">
|
||||
**Level 1: Quick Verification (2-5 minutes)**
|
||||
|
||||
For: Single known library, confirming syntax/version still correct.
|
||||
|
||||
**Process:**
|
||||
|
||||
1. Resolve library in Context7:
|
||||
|
||||
```
|
||||
mcp__context7__resolve-library-id with libraryName: "[library]"
|
||||
```
|
||||
|
||||
2. Fetch relevant docs:
|
||||
|
||||
```
|
||||
mcp__context7__get-library-docs with:
|
||||
- context7CompatibleLibraryID: [from step 1]
|
||||
- topic: [specific concern]
|
||||
```
|
||||
|
||||
3. Verify:
|
||||
|
||||
- Current version matches expectations
|
||||
- API syntax unchanged
|
||||
- No breaking changes in recent versions
|
||||
|
||||
4. **If verified:** Return to plan-phase.md with confirmation. No FINDINGS.md needed.
|
||||
|
||||
5. **If concerns found:** Escalate to Level 2.
|
||||
|
||||
**Output:** Verbal confirmation to proceed, or escalation to Level 2.
|
||||
</step>
|
||||
|
||||
<step name="level_2_standard">
|
||||
**Level 2: Standard Research (15-30 minutes)**
|
||||
|
||||
For: Choosing between options, new external integration.
|
||||
|
||||
**Process:**
|
||||
|
||||
1. **Identify what to research:**
|
||||
|
||||
- What options exist?
|
||||
- What are the key comparison criteria?
|
||||
- What's our specific use case?
|
||||
|
||||
2. **Context7 for each option:**
|
||||
|
||||
```
|
||||
For each library/framework:
|
||||
- mcp__context7__resolve-library-id
|
||||
- mcp__context7__get-library-docs (mode: "code" for API, "info" for concepts)
|
||||
```
|
||||
|
||||
3. **Official docs** for anything Context7 lacks.
|
||||
|
||||
4. **WebSearch** for comparisons:
|
||||
|
||||
- "[option A] vs [option B] {current_year}"
|
||||
- "[option] known issues"
|
||||
- "[option] with [our stack]"
|
||||
|
||||
5. **Cross-verify:** Any WebSearch finding → confirm with Context7/official docs.
|
||||
|
||||
6. **Quality check:** Before finalizing findings, consult ~/.claude/get-shit-done/references/research-pitfalls.md to avoid common research gaps.
|
||||
|
||||
7. **Create FINDINGS.md** using ~/.claude/get-shit-done/templates/research-prompt.md structure:
|
||||
|
||||
- Summary with recommendation
|
||||
- Key findings per option
|
||||
- Code examples from Context7
|
||||
- Confidence level (should be MEDIUM-HIGH for Level 2)
|
||||
|
||||
8. Return to plan-phase.md.
|
||||
|
||||
**Output:** `.planning/phases/XX-name/FINDINGS.md`
|
||||
</step>
|
||||
|
||||
<step name="level_3_deep_dive">
|
||||
**Level 3: Deep Dive (1+ hour)**
|
||||
|
||||
For: Architectural decisions, novel problems, high-risk choices.
|
||||
|
||||
**Process:**
|
||||
|
||||
1. **Scope the research** using ~/.claude/get-shit-done/templates/research-prompt.md:
|
||||
|
||||
- Create RESEARCH.md with clear scope
|
||||
- Define include/exclude boundaries
|
||||
- List specific questions to answer
|
||||
|
||||
2. **Exhaustive Context7 research:**
|
||||
|
||||
- All relevant libraries
|
||||
- Related patterns and concepts
|
||||
- Multiple topics per library if needed
|
||||
|
||||
3. **Official documentation deep read:**
|
||||
|
||||
- Architecture guides
|
||||
- Best practices sections
|
||||
- Migration/upgrade guides
|
||||
- Known limitations
|
||||
|
||||
4. **WebSearch for ecosystem context:**
|
||||
|
||||
- How others solved similar problems
|
||||
- Production experiences
|
||||
- Gotchas and anti-patterns
|
||||
- Recent changes/announcements
|
||||
|
||||
5. **Cross-verify ALL findings:**
|
||||
|
||||
- Every WebSearch claim → verify with authoritative source
|
||||
- Mark what's verified vs assumed
|
||||
- Flag contradictions
|
||||
|
||||
6. **Quality check:** Before finalizing findings, consult ~/.claude/get-shit-done/references/research-pitfalls.md to ensure comprehensive coverage and avoid common research gaps.
|
||||
|
||||
7. **Create comprehensive FINDINGS.md:**
|
||||
|
||||
- Full structure from ~/.claude/get-shit-done/templates/research-prompt.md
|
||||
- Quality report with source attribution
|
||||
- Confidence by finding
|
||||
- If LOW confidence on any critical finding → add validation checkpoints
|
||||
|
||||
8. **Confidence gate:** If overall confidence is LOW, present options before proceeding.
|
||||
|
||||
9. Return to plan-phase.md.
|
||||
|
||||
**Output:** `.planning/phases/XX-name/FINDINGS.md` (comprehensive)
|
||||
</step>
|
||||
|
||||
<step name="identify_unknowns">
|
||||
**For Level 2-3:** Define what we need to learn.
|
||||
|
||||
Ask: What do we need to learn before we can plan this phase?
|
||||
|
||||
- Technology choices?
|
||||
- Best practices?
|
||||
- API patterns?
|
||||
- Architecture approach?
|
||||
</step>
|
||||
|
||||
<step name="create_research_prompt">
|
||||
Use ~/.claude/get-shit-done/templates/research-prompt.md.
|
||||
Write to `.planning/phases/XX-name/RESEARCH.md`
|
||||
|
||||
Include:
|
||||
|
||||
- Clear research objective
|
||||
- Scoped include/exclude lists
|
||||
- Source preferences (official docs, Context7, current year)
|
||||
- Output structure for FINDINGS.md
|
||||
</step>
|
||||
|
||||
<step name="execute_research">
|
||||
Run the research prompt:
|
||||
- Use web search for current info
|
||||
- Use Context7 MCP for library docs
|
||||
- Prefer current year sources
|
||||
- Structure findings per template
|
||||
</step>
|
||||
|
||||
<step name="create_findings">
|
||||
Write `.planning/phases/XX-name/FINDINGS.md`:
|
||||
- Summary with recommendation
|
||||
- Key findings with sources
|
||||
- Code examples if applicable
|
||||
- Metadata (confidence, dependencies, open questions, assumptions)
|
||||
</step>
|
||||
|
||||
<step name="confidence_gate">
|
||||
After creating FINDINGS.md, check confidence level.
|
||||
|
||||
If confidence is LOW:
|
||||
Use AskUserQuestion:
|
||||
|
||||
- header: "Low Confidence"
|
||||
- question: "Research confidence is LOW: [reason]. How would you like to proceed?"
|
||||
- options:
|
||||
- "Dig deeper" - Do more research before planning
|
||||
- "Proceed anyway" - Accept uncertainty, plan with caveats
|
||||
- "Pause" - I need to think about this
|
||||
|
||||
If confidence is MEDIUM:
|
||||
Inline: "Research complete (medium confidence). [brief reason]. Proceed to planning?"
|
||||
|
||||
If confidence is HIGH:
|
||||
Proceed directly, just note: "Research complete (high confidence)."
|
||||
</step>
|
||||
|
||||
<step name="open_questions_gate">
|
||||
If FINDINGS.md has open_questions:
|
||||
|
||||
Present them inline:
|
||||
"Open questions from research:
|
||||
|
||||
- [Question 1]
|
||||
- [Question 2]
|
||||
|
||||
These may affect implementation. Acknowledge and proceed? (yes / address first)"
|
||||
|
||||
If "address first": Gather user input on questions, update findings.
|
||||
</step>
|
||||
|
||||
<step name="offer_next">
|
||||
```
|
||||
Research complete: .planning/phases/XX-name/FINDINGS.md
|
||||
Recommendation: [one-liner]
|
||||
Confidence: [level]
|
||||
|
||||
What's next?
|
||||
|
||||
1. Discuss phase context (/gsd:discuss-phase [current-phase])
|
||||
2. Create phase plan (/gsd:plan-phase [current-phase])
|
||||
3. Refine research (dig deeper)
|
||||
4. Review findings
|
||||
|
||||
```
|
||||
|
||||
NOTE: FINDINGS.md is NOT committed separately. It will be committed with phase completion.
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<success_criteria>
|
||||
**Level 1 (Quick Verify):**
|
||||
- Context7 consulted for library/topic
|
||||
- Current state verified or concerns escalated
|
||||
- Verbal confirmation to proceed (no files)
|
||||
|
||||
**Level 2 (Standard):**
|
||||
- Context7 consulted for all options
|
||||
- WebSearch findings cross-verified
|
||||
- FINDINGS.md created with recommendation
|
||||
- Confidence level MEDIUM or higher
|
||||
- Ready to inform PLAN.md creation
|
||||
|
||||
**Level 3 (Deep Dive):**
|
||||
- RESEARCH.md exists with clear scope
|
||||
- Context7 exhaustively consulted
|
||||
- All WebSearch findings verified against authoritative sources
|
||||
- FINDINGS.md created with comprehensive analysis
|
||||
- Quality report with source attribution
|
||||
- If LOW confidence findings → validation checkpoints defined
|
||||
- Confidence gate passed
|
||||
- Ready to inform PLAN.md creation
|
||||
</success_criteria>
|
||||
```
|
||||
248
get-shit-done/workflows/resume-project.md
Normal file
248
get-shit-done/workflows/resume-project.md
Normal file
@@ -0,0 +1,248 @@
|
||||
<trigger>
|
||||
Use this workflow when:
|
||||
- Starting a new session on an existing project
|
||||
- User says "continue", "what's next", "where were we", "resume"
|
||||
- Any planning operation when .planning/ already exists
|
||||
- User returns after time away from project
|
||||
</trigger>
|
||||
|
||||
<purpose>
|
||||
Instantly restore full project context and present clear status.
|
||||
Enables seamless session continuity for fully autonomous workflows.
|
||||
|
||||
"Where were we?" should have an immediate, complete answer.
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="detect_existing_project">
|
||||
Check if this is an existing project:
|
||||
|
||||
```bash
|
||||
ls .planning/STATE.md 2>/dev/null && echo "Project exists"
|
||||
ls .planning/ROADMAP.md 2>/dev/null && echo "Roadmap exists"
|
||||
ls .planning/PROJECT.md 2>/dev/null && echo "Project file exists"
|
||||
```
|
||||
|
||||
**If STATE.md exists:** Proceed to load_state
|
||||
**If only ROADMAP.md/PROJECT.md exist:** Offer to reconstruct STATE.md
|
||||
**If .planning/ doesn't exist:** This is a new project - route to /gsd:new-project
|
||||
</step>
|
||||
|
||||
<step name="load_state">
|
||||
Read and parse STATE.md:
|
||||
|
||||
```bash
|
||||
cat .planning/STATE.md
|
||||
```
|
||||
|
||||
Extract:
|
||||
|
||||
- **Brief Summary**: What we're building (immutable reminder)
|
||||
- **Current Position**: Phase X of Y, Plan A of B, Status
|
||||
- **Progress**: Visual progress bar
|
||||
- **Decisions Made**: Key decisions that constrain future work
|
||||
- **Deferred Issues**: Open items awaiting attention
|
||||
- **Blockers/Concerns**: Issues carried forward
|
||||
- **Brief Alignment**: Are we on track?
|
||||
- **Session Continuity**: Where we left off, any resume files
|
||||
</step>
|
||||
|
||||
<step name="check_incomplete_work">
|
||||
Look for incomplete work that needs attention:
|
||||
|
||||
```bash
|
||||
# Check for continue-here files (mid-plan resumption)
|
||||
ls .planning/phases/*/.continue-here*.md 2>/dev/null
|
||||
|
||||
# Check for plans without summaries (incomplete execution)
|
||||
for plan in .planning/phases/*/*-PLAN.md; do
|
||||
summary="${plan/PLAN/SUMMARY}"
|
||||
[ ! -f "$summary" ] && echo "Incomplete: $plan"
|
||||
done 2>/dev/null
|
||||
```
|
||||
|
||||
**If .continue-here file exists:**
|
||||
|
||||
- This is a mid-plan resumption point
|
||||
- Read the file for specific resumption context
|
||||
- Flag: "Found mid-plan checkpoint"
|
||||
|
||||
**If PLAN without SUMMARY exists:**
|
||||
|
||||
- Execution was started but not completed
|
||||
- Flag: "Found incomplete plan execution"
|
||||
</step>
|
||||
|
||||
<step name="present_status">
|
||||
Present complete project status to user:
|
||||
|
||||
```
|
||||
╔══════════════════════════════════════════════════════════════╗
|
||||
║ PROJECT STATUS ║
|
||||
╠══════════════════════════════════════════════════════════════╣
|
||||
║ Building: [one-liner from Brief Summary] ║
|
||||
║ ║
|
||||
║ Phase: [X] of [Y] - [Phase name] ║
|
||||
║ Plan: [A] of [B] - [Status] ║
|
||||
║ Progress: [██████░░░░] XX% ║
|
||||
║ ║
|
||||
║ Last activity: [date] - [what happened] ║
|
||||
╚══════════════════════════════════════════════════════════════╝
|
||||
|
||||
[If incomplete work found:]
|
||||
⚠️ Incomplete work detected:
|
||||
- [.continue-here file or incomplete plan]
|
||||
|
||||
[If deferred issues exist:]
|
||||
📋 [N] deferred issues awaiting attention
|
||||
|
||||
[If blockers exist:]
|
||||
⚠️ Carried concerns:
|
||||
- [blocker 1]
|
||||
- [blocker 2]
|
||||
|
||||
[If alignment is not ✓:]
|
||||
⚠️ Brief alignment: [status] - [assessment]
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="determine_next_action">
|
||||
Based on project state, determine the most logical next action:
|
||||
|
||||
**If .continue-here file exists:**
|
||||
→ Primary: Resume from checkpoint
|
||||
→ Option: Start fresh on current plan
|
||||
|
||||
**If incomplete plan (PLAN without SUMMARY):**
|
||||
→ Primary: Complete the incomplete plan
|
||||
→ Option: Abandon and move on
|
||||
|
||||
**If phase in progress, all plans complete:**
|
||||
→ Primary: Transition to next phase
|
||||
→ Option: Review completed work
|
||||
|
||||
**If phase ready to plan:**
|
||||
→ Check if CONTEXT.md exists for this phase:
|
||||
|
||||
- If CONTEXT.md missing:
|
||||
→ Primary: Discuss phase context (gather objectives, constraints, success indicators)
|
||||
→ Secondary: Plan directly (skip context gathering)
|
||||
- If CONTEXT.md exists:
|
||||
→ Primary: Plan the phase
|
||||
→ Option: Review roadmap
|
||||
|
||||
**If phase ready to execute:**
|
||||
→ Primary: Execute next plan
|
||||
→ Option: Review the plan first
|
||||
</step>
|
||||
|
||||
<step name="offer_options">
|
||||
Present contextual options based on project state:
|
||||
|
||||
```
|
||||
What would you like to do?
|
||||
|
||||
[Primary action based on state - e.g.:]
|
||||
1. Resume from checkpoint (/gsd:execute-plan .planning/phases/XX-name/.continue-here-02-01.md)
|
||||
OR
|
||||
1. Execute next plan (/gsd:execute-plan .planning/phases/XX-name/02-02-PLAN.md)
|
||||
OR
|
||||
1. Discuss Phase 3 context (/gsd:discuss-phase 3) [if CONTEXT.md missing]
|
||||
OR
|
||||
1. Plan Phase 3 (/gsd:plan-phase 3) [if CONTEXT.md exists or discuss option declined]
|
||||
|
||||
[Secondary options:]
|
||||
2. Review current phase status
|
||||
3. Check deferred issues ([N] open)
|
||||
4. Review brief alignment
|
||||
5. Something else
|
||||
```
|
||||
|
||||
**Note:** When offering phase planning, check for CONTEXT.md existence first:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-name/CONTEXT.md 2>/dev/null
|
||||
```
|
||||
|
||||
If missing, suggest discuss-phase before plan. If exists, offer plan directly.
|
||||
|
||||
Wait for user selection.
|
||||
</step>
|
||||
|
||||
<step name="route_to_workflow">
|
||||
Based on user selection, route to appropriate workflow:
|
||||
|
||||
- **Execute plan** → EXIT and invoke SlashCommand("/gsd:execute-plan [path]")
|
||||
- **Plan phase** → EXIT and invoke SlashCommand("/gsd:plan-phase [phase-number]")
|
||||
- **Transition** → ./transition.md
|
||||
- **Review issues** → Read ISSUES.md, present summary
|
||||
- **Review alignment** → Read PROJECT.md, compare to current state
|
||||
- **Something else** → Ask what they need
|
||||
|
||||
Note: Commands are shown in the presented options so user can see what will run.
|
||||
</step>
|
||||
|
||||
<step name="update_session">
|
||||
Before proceeding to routed workflow, update session continuity:
|
||||
|
||||
Update STATE.md:
|
||||
|
||||
```markdown
|
||||
## Session Continuity
|
||||
|
||||
Last session: [now]
|
||||
Stopped at: Session resumed, proceeding to [action]
|
||||
Resume file: [updated if applicable]
|
||||
```
|
||||
|
||||
This ensures if session ends unexpectedly, next resume knows the state.
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<reconstruction>
|
||||
If STATE.md is missing but other artifacts exist:
|
||||
|
||||
"STATE.md missing. Reconstructing from artifacts..."
|
||||
|
||||
1. Read PROJECT.md → Extract Brief Summary
|
||||
2. Read ROADMAP.md → Determine phases, find current position
|
||||
3. Scan \*-SUMMARY.md files → Extract decisions, issues, concerns
|
||||
4. Read ISSUES.md → Count deferred issues
|
||||
5. Check for .continue-here files → Session continuity
|
||||
|
||||
Reconstruct and write STATE.md, then proceed normally.
|
||||
|
||||
This handles cases where:
|
||||
|
||||
- Project predates STATE.md introduction
|
||||
- File was accidentally deleted
|
||||
- Cloning repo without full .planning/ state
|
||||
</reconstruction>
|
||||
|
||||
<quick_resume>
|
||||
For users who want minimal friction:
|
||||
|
||||
If user says just "continue" or "go":
|
||||
|
||||
- Load state silently
|
||||
- Determine primary action
|
||||
- Execute immediately without presenting options
|
||||
|
||||
"Continuing from [state]... [action]"
|
||||
|
||||
This enables fully autonomous "just keep going" workflow.
|
||||
</quick_resume>
|
||||
|
||||
<success_criteria>
|
||||
Resume is complete when:
|
||||
|
||||
- [ ] STATE.md loaded (or reconstructed)
|
||||
- [ ] Incomplete work detected and flagged
|
||||
- [ ] Clear status presented to user
|
||||
- [ ] Contextual next actions offered
|
||||
- [ ] User knows exactly where project stands
|
||||
- [ ] Session continuity updated
|
||||
</success_criteria>
|
||||
488
get-shit-done/workflows/transition.md
Normal file
488
get-shit-done/workflows/transition.md
Normal file
@@ -0,0 +1,488 @@
|
||||
<required_reading>
|
||||
**Read these files NOW:**
|
||||
|
||||
1. `.planning/STATE.md`
|
||||
2. `.planning/ROADMAP.md`
|
||||
3. Current phase's plan files (`*-PLAN.md`)
|
||||
4. Current phase's summary files (`*-SUMMARY.md`)
|
||||
</required_reading>
|
||||
|
||||
<purpose>
|
||||
Mark current phase complete and advance to next. This is the natural point
|
||||
where progress tracking happens - implicit via forward motion.
|
||||
|
||||
"Planning next phase" = "current phase is done"
|
||||
</purpose>
|
||||
|
||||
<process>
|
||||
|
||||
<step name="load_project_state" priority="first">
|
||||
Before transition, read project state:
|
||||
|
||||
```bash
|
||||
cat .planning/STATE.md 2>/dev/null
|
||||
```
|
||||
|
||||
Parse current position to verify we're transitioning the right phase.
|
||||
Note accumulated context that may need updating after transition.
|
||||
</step>
|
||||
|
||||
<step name="verify_completion">
|
||||
Check current phase has all plan summaries:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-current/*-PLAN.md 2>/dev/null | sort
|
||||
ls .planning/phases/XX-current/*-SUMMARY.md 2>/dev/null | sort
|
||||
```
|
||||
|
||||
**Verification logic:**
|
||||
|
||||
- Count PLAN files
|
||||
- Count SUMMARY files
|
||||
- If counts match: all plans complete
|
||||
- If counts don't match: incomplete
|
||||
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
```bash
|
||||
cat .planning/config.json 2>/dev/null
|
||||
```
|
||||
|
||||
Parse the config:
|
||||
|
||||
- If `mode: "yolo"` → auto-approve transition (if all complete)
|
||||
- If `mode: "interactive"` → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_transition`
|
||||
|
||||
**If all plans complete:**
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
⚡ Auto-approved: Transition Phase [X] → Phase [X+1]
|
||||
Phase [X] complete - all [Y] plans finished.
|
||||
|
||||
Proceeding to mark done and advance...
|
||||
```
|
||||
|
||||
Proceed directly to cleanup_handoff.
|
||||
|
||||
**If prompting:**
|
||||
Ask: "Phase [X] complete - all [Y] plans finished. Ready to mark done and move to Phase [X+1]?"
|
||||
|
||||
**If plans incomplete:**
|
||||
|
||||
**SAFETY RAIL: always_confirm_destructive applies here.**
|
||||
Skipping incomplete plans is destructive - ALWAYS prompt regardless of mode.
|
||||
|
||||
Present:
|
||||
|
||||
```
|
||||
Phase [X] has incomplete plans:
|
||||
- {phase}-01-SUMMARY.md ✓ Complete
|
||||
- {phase}-02-SUMMARY.md ✗ Missing
|
||||
- {phase}-03-SUMMARY.md ✗ Missing
|
||||
|
||||
⚠️ Safety rail: Skipping plans requires confirmation (destructive action)
|
||||
|
||||
Options:
|
||||
1. Continue current phase (execute remaining plans)
|
||||
2. Mark complete anyway (skip remaining plans)
|
||||
3. Review what's left
|
||||
```
|
||||
|
||||
Wait for user decision.
|
||||
</step>
|
||||
|
||||
<step name="cleanup_handoff">
|
||||
Check for lingering handoffs:
|
||||
|
||||
```bash
|
||||
ls .planning/phases/XX-current/.continue-here*.md 2>/dev/null
|
||||
```
|
||||
|
||||
If found, delete them - phase is complete, handoffs are stale.
|
||||
</step>
|
||||
|
||||
<step name="update_roadmap">
|
||||
Update the roadmap file:
|
||||
|
||||
```bash
|
||||
ROADMAP_FILE=".planning/ROADMAP.md"
|
||||
```
|
||||
|
||||
Update the file:
|
||||
|
||||
- Mark current phase: `[x] Complete`
|
||||
- Add completion date
|
||||
- Update plan count to final (e.g., "3/3 plans complete")
|
||||
- Update Progress table
|
||||
- Keep next phase as `[ ] Not started`
|
||||
|
||||
**Example:**
|
||||
|
||||
```markdown
|
||||
## Phases
|
||||
|
||||
- [x] Phase 1: Foundation (completed 2025-01-15)
|
||||
- [ ] Phase 2: Authentication ← Next
|
||||
- [ ] Phase 3: Core Features
|
||||
|
||||
## Progress
|
||||
|
||||
| Phase | Plans Complete | Status | Completed |
|
||||
| ----------------- | -------------- | ----------- | ---------- |
|
||||
| 1. Foundation | 3/3 | Complete | 2025-01-15 |
|
||||
| 2. Authentication | 0/2 | Not started | - |
|
||||
| 3. Core Features | 0/1 | Not started | - |
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
<step name="archive_prompts">
|
||||
If prompts were generated for the phase, they stay in place.
|
||||
The `completed/` subfolder pattern from create-meta-prompts handles archival.
|
||||
</step>
|
||||
|
||||
<step name="update_current_position_after_transition">
|
||||
Update Current Position section in STATE.md to reflect phase completion and transition.
|
||||
|
||||
**Format:**
|
||||
|
||||
```markdown
|
||||
Phase: [next] of [total] ([Next phase name])
|
||||
Plan: Not started
|
||||
Status: Ready to plan
|
||||
Last activity: [today] - Phase [X] complete, transitioned to Phase [X+1]
|
||||
|
||||
Progress: [updated progress bar]
|
||||
```
|
||||
|
||||
**Instructions:**
|
||||
|
||||
- Increment phase number to next phase
|
||||
- Reset plan to "Not started"
|
||||
- Set status to "Ready to plan"
|
||||
- Update last activity to describe transition
|
||||
- Recalculate progress bar based on completed plans
|
||||
|
||||
**Example - transitioning from Phase 2 to Phase 3:**
|
||||
|
||||
Before:
|
||||
|
||||
```markdown
|
||||
## Current Position
|
||||
|
||||
Phase: 2 of 4 (Authentication)
|
||||
Plan: 2 of 2 in current phase
|
||||
Status: Phase complete
|
||||
Last activity: 2025-01-20 - Completed 02-02-PLAN.md
|
||||
|
||||
Progress: ███████░░░ 60%
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```markdown
|
||||
## Current Position
|
||||
|
||||
Phase: 3 of 4 (Core Features)
|
||||
Plan: Not started
|
||||
Status: Ready to plan
|
||||
Last activity: 2025-01-20 - Phase 2 complete, transitioned to Phase 3
|
||||
|
||||
Progress: ███████░░░ 60%
|
||||
```
|
||||
|
||||
**Step complete when:**
|
||||
|
||||
- [ ] Phase number incremented to next phase
|
||||
- [ ] Plan status reset to "Not started"
|
||||
- [ ] Status shows "Ready to plan"
|
||||
- [ ] Last activity describes the transition
|
||||
- [ ] Progress bar still reflects total completed plans
|
||||
</step>
|
||||
|
||||
<step name="review_accumulated_context">
|
||||
Review and update Accumulated Context section in STATE.md.
|
||||
|
||||
**Blockers/Concerns:**
|
||||
|
||||
- Review blockers from completed phase
|
||||
- If addressed in this phase: Remove from list
|
||||
- If still relevant for future: Keep with note "Carried from Phase X"
|
||||
- Add any new concerns from completed phase's summaries
|
||||
|
||||
**Deferred Issues:**
|
||||
|
||||
- Count open issues in ISSUES.md
|
||||
- Update count: "[N] open issues - see ISSUES.md"
|
||||
- If many accumulated, note: "Consider addressing ISS-XXX, ISS-YYY in next phase"
|
||||
|
||||
**Example:**
|
||||
|
||||
Before:
|
||||
|
||||
```markdown
|
||||
### Blockers/Concerns Carried Forward
|
||||
|
||||
- ⚠️ [Phase 1] Database schema not indexed for common queries
|
||||
- ⚠️ [Phase 2] WebSocket reconnection behavior on flaky networks unknown
|
||||
|
||||
### Deferred Issues
|
||||
|
||||
- ISS-001: Rate limiting on sync endpoint (Phase 2) - Medium
|
||||
```
|
||||
|
||||
After (if database indexing was addressed in Phase 2):
|
||||
|
||||
```markdown
|
||||
### Blockers/Concerns Carried Forward
|
||||
|
||||
- ⚠️ [Phase 2] WebSocket reconnection behavior on flaky networks unknown
|
||||
|
||||
### Deferred Issues
|
||||
|
||||
- ISS-001: Rate limiting on sync endpoint (Phase 2) - Medium
|
||||
- ISS-002: Better sync error messages (Phase 2) - Quick
|
||||
```
|
||||
|
||||
**Step complete when:**
|
||||
|
||||
- [ ] Resolved blockers removed from list
|
||||
- [ ] Unresolved blockers kept with phase prefix
|
||||
- [ ] New concerns from completed phase added
|
||||
- [ ] Deferred issues count updated
|
||||
</step>
|
||||
|
||||
<step name="update_brief_alignment">
|
||||
Perform brief alignment check after phase completion to verify work matches original vision.
|
||||
|
||||
**Instructions:**
|
||||
|
||||
1. Re-read PROJECT.md core requirements
|
||||
2. Assess what was built in completed phase
|
||||
3. Compare against project's problem statement and success criteria
|
||||
4. Determine alignment status:
|
||||
- ✓ Aligned: Work delivers on project goals, no scope drift
|
||||
- ⚠️ Drift detected: Some divergence from original vision
|
||||
- ✗ Misaligned: Work doesn't serve the project
|
||||
|
||||
**Format:**
|
||||
|
||||
```markdown
|
||||
## Brief Alignment
|
||||
|
||||
Last checked: [today] (Phase [X] completion)
|
||||
Status: [✓ Aligned / ⚠️ Drift detected / ✗ Misaligned]
|
||||
Assessment: [One sentence describing alignment state]
|
||||
Drift notes: [Details if drift detected, otherwise "None"]
|
||||
```
|
||||
|
||||
**Example - transitioning after Phase 2 completion:**
|
||||
|
||||
Before:
|
||||
|
||||
```markdown
|
||||
## Brief Alignment
|
||||
|
||||
Last checked: Project start
|
||||
Status: ✓ Aligned
|
||||
Assessment: No work done yet - baseline alignment.
|
||||
Drift notes: None
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```markdown
|
||||
## Brief Alignment
|
||||
|
||||
Last checked: 2025-01-20 (Phase 2 completion)
|
||||
Status: ✓ Aligned
|
||||
Assessment: Auth phase delivered JWT-based authentication as specified. Sync phase next aligns with project's real-time requirements.
|
||||
Drift notes: None
|
||||
```
|
||||
|
||||
**Alternative example - drift detected:**
|
||||
|
||||
After (with drift):
|
||||
|
||||
```markdown
|
||||
## Brief Alignment
|
||||
|
||||
Last checked: 2025-01-20 (Phase 2 completion)
|
||||
Status: ⚠️ Drift detected
|
||||
Assessment: Auth phase added OAuth2 support beyond project's JWT requirement.
|
||||
Drift notes: OAuth2 adds complexity not in original scope. Consider if this serves user needs or gold-plating.
|
||||
```
|
||||
|
||||
**Step complete when:**
|
||||
|
||||
- [ ] PROJECT.md core requirements reviewed
|
||||
- [ ] Completed phase work assessed against project goals
|
||||
- [ ] Last checked updated to current date with phase reference
|
||||
- [ ] Status reflects actual alignment (Aligned/Drift/Misaligned)
|
||||
- [ ] Assessment explains the alignment state in one sentence
|
||||
- [ ] Drift notes document any divergence from project goals
|
||||
</step>
|
||||
|
||||
<step name="update_session_continuity_after_transition">
|
||||
Update Session Continuity section in STATE.md to reflect transition completion.
|
||||
|
||||
**Format:**
|
||||
|
||||
```markdown
|
||||
Last session: [today]
|
||||
Stopped at: Phase [X] complete, ready to plan Phase [X+1]
|
||||
Resume file: None
|
||||
```
|
||||
|
||||
**Example - after completing Phase 2 transition:**
|
||||
|
||||
Before:
|
||||
|
||||
```markdown
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2025-01-20
|
||||
Stopped at: Completed 02-02-PLAN.md
|
||||
Resume file: None
|
||||
```
|
||||
|
||||
After:
|
||||
|
||||
```markdown
|
||||
## Session Continuity
|
||||
|
||||
Last session: 2025-01-20 16:45
|
||||
Stopped at: Phase 2 complete, ready to plan Phase 3
|
||||
Resume file: None
|
||||
```
|
||||
|
||||
**Step complete when:**
|
||||
|
||||
- [ ] Last session timestamp updated to current date and time
|
||||
- [ ] Stopped at describes phase completion and next phase
|
||||
- [ ] Resume file confirmed as None (transitions don't use resume files)
|
||||
</step>
|
||||
|
||||
<step name="offer_next_phase">
|
||||
**Check if there's a next phase in the current milestone:**
|
||||
|
||||
Re-read the ROADMAP file:
|
||||
|
||||
- Parse current milestone version (e.g., "v1.0" from "## Current Milestone: v1.0 Foundation")
|
||||
- Look for phases after the current one in the current milestone section
|
||||
- If next phase exists: offer to plan it
|
||||
- If no next phase (milestone 100% complete): offer to complete milestone with parsed version
|
||||
|
||||
**Check workflow config for gate behavior:**
|
||||
|
||||
Read config (already parsed).
|
||||
|
||||
- If `mode: "yolo"` → auto-continue
|
||||
- If `mode: "interactive"` → prompt user
|
||||
- If `mode: "custom"` → check `gates.confirm_transition` (reused for continuation)
|
||||
|
||||
**If next phase exists:**
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
Phase [X] marked complete.
|
||||
|
||||
Next: Phase [X+1] - [Name]
|
||||
|
||||
⚡ Auto-continuing: Plan Phase [X+1] in detail
|
||||
```
|
||||
|
||||
Exit skill and invoke SlashCommand("/gsd:plan-phase [X+1]")
|
||||
|
||||
**If prompting:**
|
||||
|
||||
```
|
||||
Phase [X] marked complete.
|
||||
|
||||
Next: Phase [X+1] - [Name]
|
||||
|
||||
What would you like to do?
|
||||
1. Discuss Phase [X+1] context (/gsd:discuss-phase [X+1])
|
||||
2. Plan Phase [X+1] in detail (/gsd:plan-phase [X+1])
|
||||
3. Review roadmap
|
||||
4. Take a break (done for now)
|
||||
```
|
||||
|
||||
**If no next phase (milestone 100% complete):**
|
||||
|
||||
**If auto-approved:**
|
||||
|
||||
```
|
||||
Phase [X] marked complete.
|
||||
|
||||
🎉 Milestone [version] is 100% complete - all phases finished!
|
||||
|
||||
⚡ Auto-continuing: Complete milestone and archive
|
||||
```
|
||||
|
||||
Exit skill and invoke SlashCommand("/gsd:complete-milestone [version]")
|
||||
|
||||
**If prompting:**
|
||||
|
||||
```
|
||||
Phase [X] marked complete.
|
||||
|
||||
🎉 Milestone [version] is 100% complete - all phases finished!
|
||||
|
||||
What would you like to do?
|
||||
1. Complete milestone and archive (/gsd:complete-milestone [version])
|
||||
2. Review accomplishments
|
||||
3. Take a break (done for now)
|
||||
```
|
||||
|
||||
</step>
|
||||
|
||||
</process>
|
||||
|
||||
<implicit_tracking>
|
||||
Progress tracking is IMPLICIT:
|
||||
|
||||
- "Plan phase 2" → Phase 1 must be done (or ask)
|
||||
- "Plan phase 3" → Phases 1-2 must be done (or ask)
|
||||
- Transition workflow makes it explicit in ROADMAP.md
|
||||
|
||||
No separate "update progress" step. Forward motion IS progress.
|
||||
</implicit_tracking>
|
||||
|
||||
<partial_completion>
|
||||
If user wants to move on but phase isn't fully complete:
|
||||
|
||||
```
|
||||
Phase [X] has incomplete plans:
|
||||
- {phase}-02-PLAN.md (not executed)
|
||||
- {phase}-03-PLAN.md (not executed)
|
||||
|
||||
Options:
|
||||
1. Mark complete anyway (plans weren't needed)
|
||||
2. Defer work to later phase
|
||||
3. Stay and finish current phase
|
||||
```
|
||||
|
||||
Respect user judgment - they know if work matters.
|
||||
|
||||
**If marking complete with incomplete plans:**
|
||||
|
||||
- Update ROADMAP: "2/3 plans complete" (not "3/3")
|
||||
- Note in transition message which plans were skipped
|
||||
</partial_completion>
|
||||
|
||||
<success_criteria>
|
||||
Transition is complete when:
|
||||
|
||||
- [ ] Current phase plan summaries verified (all exist or user chose to skip)
|
||||
- [ ] Any stale handoffs deleted
|
||||
- [ ] ROADMAP.md updated with completion status and plan count
|
||||
- [ ] STATE.md updated (position, blockers, alignment, session)
|
||||
- [ ] Brief alignment check performed
|
||||
- [ ] Progress table updated
|
||||
- [ ] User knows next steps
|
||||
</success_criteria>
|
||||
Reference in New Issue
Block a user