get-research-done 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +560 -0
- package/agents/grd-architect.md +789 -0
- package/agents/grd-codebase-mapper.md +738 -0
- package/agents/grd-critic.md +1065 -0
- package/agents/grd-debugger.md +1203 -0
- package/agents/grd-evaluator.md +948 -0
- package/agents/grd-executor.md +784 -0
- package/agents/grd-explorer.md +2063 -0
- package/agents/grd-graduator.md +484 -0
- package/agents/grd-integration-checker.md +423 -0
- package/agents/grd-phase-researcher.md +641 -0
- package/agents/grd-plan-checker.md +745 -0
- package/agents/grd-planner.md +1386 -0
- package/agents/grd-project-researcher.md +865 -0
- package/agents/grd-research-synthesizer.md +256 -0
- package/agents/grd-researcher.md +2361 -0
- package/agents/grd-roadmapper.md +605 -0
- package/agents/grd-verifier.md +778 -0
- package/bin/install.js +1294 -0
- package/commands/grd/add-phase.md +207 -0
- package/commands/grd/add-todo.md +193 -0
- package/commands/grd/architect.md +283 -0
- package/commands/grd/audit-milestone.md +277 -0
- package/commands/grd/check-todos.md +228 -0
- package/commands/grd/complete-milestone.md +136 -0
- package/commands/grd/debug.md +169 -0
- package/commands/grd/discuss-phase.md +86 -0
- package/commands/grd/evaluate.md +1095 -0
- package/commands/grd/execute-phase.md +339 -0
- package/commands/grd/explore.md +258 -0
- package/commands/grd/graduate.md +323 -0
- package/commands/grd/help.md +482 -0
- package/commands/grd/insert-phase.md +227 -0
- package/commands/grd/insights.md +231 -0
- package/commands/grd/join-discord.md +18 -0
- package/commands/grd/list-phase-assumptions.md +50 -0
- package/commands/grd/map-codebase.md +71 -0
- package/commands/grd/new-milestone.md +721 -0
- package/commands/grd/new-project.md +1008 -0
- package/commands/grd/pause-work.md +134 -0
- package/commands/grd/plan-milestone-gaps.md +295 -0
- package/commands/grd/plan-phase.md +525 -0
- package/commands/grd/progress.md +364 -0
- package/commands/grd/quick-explore.md +236 -0
- package/commands/grd/quick.md +309 -0
- package/commands/grd/remove-phase.md +349 -0
- package/commands/grd/research-phase.md +200 -0
- package/commands/grd/research.md +681 -0
- package/commands/grd/resume-work.md +40 -0
- package/commands/grd/set-profile.md +106 -0
- package/commands/grd/settings.md +136 -0
- package/commands/grd/update.md +172 -0
- package/commands/grd/verify-work.md +219 -0
- package/get-research-done/config/default.json +15 -0
- package/get-research-done/references/checkpoints.md +1078 -0
- package/get-research-done/references/continuation-format.md +249 -0
- package/get-research-done/references/git-integration.md +254 -0
- package/get-research-done/references/model-profiles.md +73 -0
- package/get-research-done/references/planning-config.md +94 -0
- package/get-research-done/references/questioning.md +141 -0
- package/get-research-done/references/tdd.md +263 -0
- package/get-research-done/references/ui-brand.md +160 -0
- package/get-research-done/references/verification-patterns.md +612 -0
- package/get-research-done/templates/DEBUG.md +159 -0
- package/get-research-done/templates/UAT.md +247 -0
- package/get-research-done/templates/archive-reason.md +195 -0
- package/get-research-done/templates/codebase/architecture.md +255 -0
- package/get-research-done/templates/codebase/concerns.md +310 -0
- package/get-research-done/templates/codebase/conventions.md +307 -0
- package/get-research-done/templates/codebase/integrations.md +280 -0
- package/get-research-done/templates/codebase/stack.md +186 -0
- package/get-research-done/templates/codebase/structure.md +285 -0
- package/get-research-done/templates/codebase/testing.md +480 -0
- package/get-research-done/templates/config.json +35 -0
- package/get-research-done/templates/context.md +283 -0
- package/get-research-done/templates/continue-here.md +78 -0
- package/get-research-done/templates/critic-log.md +288 -0
- package/get-research-done/templates/data-report.md +173 -0
- package/get-research-done/templates/debug-subagent-prompt.md +91 -0
- package/get-research-done/templates/decision-log.md +58 -0
- package/get-research-done/templates/decision.md +138 -0
- package/get-research-done/templates/discovery.md +146 -0
- package/get-research-done/templates/experiment-readme.md +104 -0
- package/get-research-done/templates/graduated-script.md +180 -0
- package/get-research-done/templates/iteration-summary.md +234 -0
- package/get-research-done/templates/milestone-archive.md +123 -0
- package/get-research-done/templates/milestone.md +115 -0
- package/get-research-done/templates/objective.md +271 -0
- package/get-research-done/templates/phase-prompt.md +567 -0
- package/get-research-done/templates/planner-subagent-prompt.md +117 -0
- package/get-research-done/templates/project.md +184 -0
- package/get-research-done/templates/requirements.md +231 -0
- package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
- package/get-research-done/templates/research-project/FEATURES.md +147 -0
- package/get-research-done/templates/research-project/PITFALLS.md +200 -0
- package/get-research-done/templates/research-project/STACK.md +120 -0
- package/get-research-done/templates/research-project/SUMMARY.md +170 -0
- package/get-research-done/templates/research.md +529 -0
- package/get-research-done/templates/roadmap.md +202 -0
- package/get-research-done/templates/scorecard.json +113 -0
- package/get-research-done/templates/state.md +287 -0
- package/get-research-done/templates/summary.md +246 -0
- package/get-research-done/templates/user-setup.md +311 -0
- package/get-research-done/templates/verification-report.md +322 -0
- package/get-research-done/workflows/complete-milestone.md +756 -0
- package/get-research-done/workflows/diagnose-issues.md +231 -0
- package/get-research-done/workflows/discovery-phase.md +289 -0
- package/get-research-done/workflows/discuss-phase.md +433 -0
- package/get-research-done/workflows/execute-phase.md +657 -0
- package/get-research-done/workflows/execute-plan.md +1844 -0
- package/get-research-done/workflows/list-phase-assumptions.md +178 -0
- package/get-research-done/workflows/map-codebase.md +322 -0
- package/get-research-done/workflows/resume-project.md +307 -0
- package/get-research-done/workflows/transition.md +556 -0
- package/get-research-done/workflows/verify-phase.md +628 -0
- package/get-research-done/workflows/verify-work.md +596 -0
- package/hooks/dist/grd-check-update.js +61 -0
- package/hooks/dist/grd-statusline.js +84 -0
- package/package.json +47 -0
- package/scripts/audit-help-commands.sh +115 -0
- package/scripts/build-hooks.js +42 -0
- package/scripts/verify-all-commands.sh +246 -0
- package/scripts/verify-architect-warning.sh +35 -0
- package/scripts/verify-insights-mode.sh +40 -0
- package/scripts/verify-quick-mode.sh +20 -0
- package/scripts/verify-revise-data-routing.sh +139 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Surface Claude's assumptions about a phase before planning, enabling users to correct misconceptions early.
|
|
3
|
+
|
|
4
|
+
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.
|
|
5
|
+
</purpose>
|
|
6
|
+
|
|
7
|
+
<process>
|
|
8
|
+
|
|
9
|
+
<step name="validate_phase" priority="first">
|
|
10
|
+
Phase number: $ARGUMENTS (required)
|
|
11
|
+
|
|
12
|
+
**If argument missing:**
|
|
13
|
+
|
|
14
|
+
```
|
|
15
|
+
Error: Phase number required.
|
|
16
|
+
|
|
17
|
+
Usage: /grd:list-phase-assumptions [phase-number]
|
|
18
|
+
Example: /grd:list-phase-assumptions 3
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Exit workflow.
|
|
22
|
+
|
|
23
|
+
**If argument provided:**
|
|
24
|
+
Validate phase exists in roadmap:
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
cat .planning/ROADMAP.md | grep -i "Phase ${PHASE}"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**If phase not found:**
|
|
31
|
+
|
|
32
|
+
```
|
|
33
|
+
Error: Phase ${PHASE} not found in roadmap.
|
|
34
|
+
|
|
35
|
+
Available phases:
|
|
36
|
+
[list phases from roadmap]
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Exit workflow.
|
|
40
|
+
|
|
41
|
+
**If phase found:**
|
|
42
|
+
Parse phase details from roadmap:
|
|
43
|
+
|
|
44
|
+
- Phase number
|
|
45
|
+
- Phase name
|
|
46
|
+
- Phase description/goal
|
|
47
|
+
- Any scope details mentioned
|
|
48
|
+
|
|
49
|
+
Continue to analyze_phase.
|
|
50
|
+
</step>
|
|
51
|
+
|
|
52
|
+
<step name="analyze_phase">
|
|
53
|
+
Based on roadmap description and project context, identify assumptions across five areas:
|
|
54
|
+
|
|
55
|
+
**1. Technical Approach:**
|
|
56
|
+
What libraries, frameworks, patterns, or tools would Claude use?
|
|
57
|
+
- "I'd use X library because..."
|
|
58
|
+
- "I'd follow Y pattern because..."
|
|
59
|
+
- "I'd structure this as Z because..."
|
|
60
|
+
|
|
61
|
+
**2. Implementation Order:**
|
|
62
|
+
What would Claude build first, second, third?
|
|
63
|
+
- "I'd start with X because it's foundational"
|
|
64
|
+
- "Then Y because it depends on X"
|
|
65
|
+
- "Finally Z because..."
|
|
66
|
+
|
|
67
|
+
**3. Scope Boundaries:**
|
|
68
|
+
What's included vs excluded in Claude's interpretation?
|
|
69
|
+
- "This phase includes: A, B, C"
|
|
70
|
+
- "This phase does NOT include: D, E, F"
|
|
71
|
+
- "Boundary ambiguities: G could go either way"
|
|
72
|
+
|
|
73
|
+
**4. Risk Areas:**
|
|
74
|
+
Where does Claude expect complexity or challenges?
|
|
75
|
+
- "The tricky part is X because..."
|
|
76
|
+
- "Potential issues: Y, Z"
|
|
77
|
+
- "I'd watch out for..."
|
|
78
|
+
|
|
79
|
+
**5. Dependencies:**
|
|
80
|
+
What does Claude assume exists or needs to be in place?
|
|
81
|
+
- "This assumes X from previous phases"
|
|
82
|
+
- "External dependencies: Y, Z"
|
|
83
|
+
- "This will be consumed by..."
|
|
84
|
+
|
|
85
|
+
Be honest about uncertainty. Mark assumptions with confidence levels:
|
|
86
|
+
- "Fairly confident: ..." (clear from roadmap)
|
|
87
|
+
- "Assuming: ..." (reasonable inference)
|
|
88
|
+
- "Unclear: ..." (could go multiple ways)
|
|
89
|
+
</step>
|
|
90
|
+
|
|
91
|
+
<step name="present_assumptions">
|
|
92
|
+
Present assumptions in a clear, scannable format:
|
|
93
|
+
|
|
94
|
+
```
|
|
95
|
+
## My Assumptions for Phase ${PHASE}: ${PHASE_NAME}
|
|
96
|
+
|
|
97
|
+
### Technical Approach
|
|
98
|
+
[List assumptions about how to implement]
|
|
99
|
+
|
|
100
|
+
### Implementation Order
|
|
101
|
+
[List assumptions about sequencing]
|
|
102
|
+
|
|
103
|
+
### Scope Boundaries
|
|
104
|
+
**In scope:** [what's included]
|
|
105
|
+
**Out of scope:** [what's excluded]
|
|
106
|
+
**Ambiguous:** [what could go either way]
|
|
107
|
+
|
|
108
|
+
### Risk Areas
|
|
109
|
+
[List anticipated challenges]
|
|
110
|
+
|
|
111
|
+
### Dependencies
|
|
112
|
+
**From prior phases:** [what's needed]
|
|
113
|
+
**External:** [third-party needs]
|
|
114
|
+
**Feeds into:** [what future phases need from this]
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
**What do you think?**
|
|
119
|
+
|
|
120
|
+
Are these assumptions accurate? Let me know:
|
|
121
|
+
- What I got right
|
|
122
|
+
- What I got wrong
|
|
123
|
+
- What I'm missing
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
Wait for user response.
|
|
127
|
+
</step>
|
|
128
|
+
|
|
129
|
+
<step name="gather_feedback">
|
|
130
|
+
**If user provides corrections:**
|
|
131
|
+
|
|
132
|
+
Acknowledge the corrections:
|
|
133
|
+
|
|
134
|
+
```
|
|
135
|
+
Key corrections:
|
|
136
|
+
- [correction 1]
|
|
137
|
+
- [correction 2]
|
|
138
|
+
|
|
139
|
+
This changes my understanding significantly. [Summarize new understanding]
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
**If user confirms assumptions:**
|
|
143
|
+
|
|
144
|
+
```
|
|
145
|
+
Assumptions validated.
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
Continue to offer_next.
|
|
149
|
+
</step>
|
|
150
|
+
|
|
151
|
+
<step name="offer_next">
|
|
152
|
+
Present next steps:
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
What's next?
|
|
156
|
+
1. Discuss context (/grd:discuss-phase ${PHASE}) - Let me ask you questions to build comprehensive context
|
|
157
|
+
2. Plan this phase (/grd:plan-phase ${PHASE}) - Create detailed execution plans
|
|
158
|
+
3. Re-examine assumptions - I'll analyze again with your corrections
|
|
159
|
+
4. Done for now
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
Wait for user selection.
|
|
163
|
+
|
|
164
|
+
If "Discuss context": Note that CONTEXT.md will incorporate any corrections discussed here
|
|
165
|
+
If "Plan this phase": Proceed knowing assumptions are understood
|
|
166
|
+
If "Re-examine": Return to analyze_phase with updated understanding
|
|
167
|
+
</step>
|
|
168
|
+
|
|
169
|
+
</process>
|
|
170
|
+
|
|
171
|
+
<success_criteria>
|
|
172
|
+
- Phase number validated against roadmap
|
|
173
|
+
- Assumptions surfaced across five areas: technical approach, implementation order, scope, risks, dependencies
|
|
174
|
+
- Confidence levels marked where appropriate
|
|
175
|
+
- "What do you think?" prompt presented
|
|
176
|
+
- User feedback acknowledged
|
|
177
|
+
- Clear next steps offered
|
|
178
|
+
</success_criteria>
|
|
@@ -0,0 +1,322 @@
|
|
|
1
|
+
<purpose>
|
|
2
|
+
Orchestrate parallel codebase mapper agents to analyze codebase and produce structured documents in .planning/codebase/
|
|
3
|
+
|
|
4
|
+
Each agent has fresh context, explores a specific focus area, and **writes documents directly**. The orchestrator only receives confirmation + line counts, then writes a summary.
|
|
5
|
+
|
|
6
|
+
Output: .planning/codebase/ folder with 7 structured documents about the codebase state.
|
|
7
|
+
</purpose>
|
|
8
|
+
|
|
9
|
+
<philosophy>
|
|
10
|
+
**Why dedicated mapper agents:**
|
|
11
|
+
- Fresh context per domain (no token contamination)
|
|
12
|
+
- Agents write documents directly (no context transfer back to orchestrator)
|
|
13
|
+
- Orchestrator only summarizes what was created (minimal context usage)
|
|
14
|
+
- Faster execution (agents run simultaneously)
|
|
15
|
+
|
|
16
|
+
**Document quality over length:**
|
|
17
|
+
Include enough detail to be useful as reference. Prioritize practical examples (especially code patterns) over arbitrary brevity.
|
|
18
|
+
|
|
19
|
+
**Always include file paths:**
|
|
20
|
+
Documents are reference material for Claude when planning/executing. Always include actual file paths formatted with backticks: `src/services/user.ts`.
|
|
21
|
+
</philosophy>
|
|
22
|
+
|
|
23
|
+
<process>
|
|
24
|
+
|
|
25
|
+
<step name="resolve_model_profile" priority="first">
|
|
26
|
+
Read model profile for agent spawning:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
MODEL_PROFILE=$(cat .planning/config.json 2>/dev/null | grep -o '"model_profile"[[:space:]]*:[[:space:]]*"[^"]*"' | grep -o '"[^"]*"$' | tr -d '"' || echo "balanced")
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Default to "balanced" if not set.
|
|
33
|
+
|
|
34
|
+
**Model lookup table:**
|
|
35
|
+
|
|
36
|
+
| Agent | quality | balanced | budget |
|
|
37
|
+
|-------|---------|----------|--------|
|
|
38
|
+
| grd-codebase-mapper | sonnet | haiku | haiku |
|
|
39
|
+
|
|
40
|
+
Store resolved model for use in Task calls below.
|
|
41
|
+
</step>
|
|
42
|
+
|
|
43
|
+
<step name="check_existing">
|
|
44
|
+
Check if .planning/codebase/ already exists:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
ls -la .planning/codebase/ 2>/dev/null
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
**If exists:**
|
|
51
|
+
|
|
52
|
+
```
|
|
53
|
+
.planning/codebase/ already exists with these documents:
|
|
54
|
+
[List files found]
|
|
55
|
+
|
|
56
|
+
What's next?
|
|
57
|
+
1. Refresh - Delete existing and remap codebase
|
|
58
|
+
2. Update - Keep existing, only update specific documents
|
|
59
|
+
3. Skip - Use existing codebase map as-is
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Wait for user response.
|
|
63
|
+
|
|
64
|
+
If "Refresh": Delete .planning/codebase/, continue to create_structure
|
|
65
|
+
If "Update": Ask which documents to update, continue to spawn_agents (filtered)
|
|
66
|
+
If "Skip": Exit workflow
|
|
67
|
+
|
|
68
|
+
**If doesn't exist:**
|
|
69
|
+
Continue to create_structure.
|
|
70
|
+
</step>
|
|
71
|
+
|
|
72
|
+
<step name="create_structure">
|
|
73
|
+
Create .planning/codebase/ directory:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
mkdir -p .planning/codebase
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
**Expected output files:**
|
|
80
|
+
- STACK.md (from tech mapper)
|
|
81
|
+
- INTEGRATIONS.md (from tech mapper)
|
|
82
|
+
- ARCHITECTURE.md (from arch mapper)
|
|
83
|
+
- STRUCTURE.md (from arch mapper)
|
|
84
|
+
- CONVENTIONS.md (from quality mapper)
|
|
85
|
+
- TESTING.md (from quality mapper)
|
|
86
|
+
- CONCERNS.md (from concerns mapper)
|
|
87
|
+
|
|
88
|
+
Continue to spawn_agents.
|
|
89
|
+
</step>
|
|
90
|
+
|
|
91
|
+
<step name="spawn_agents">
|
|
92
|
+
Spawn 4 parallel grd-codebase-mapper agents.
|
|
93
|
+
|
|
94
|
+
Use Task tool with `subagent_type="grd-codebase-mapper"`, `model="{mapper_model}"`, and `run_in_background=true` for parallel execution.
|
|
95
|
+
|
|
96
|
+
**CRITICAL:** Use the dedicated `grd-codebase-mapper` agent, NOT `Explore`. The mapper agent writes documents directly.
|
|
97
|
+
|
|
98
|
+
**Agent 1: Tech Focus**
|
|
99
|
+
|
|
100
|
+
Task tool parameters:
|
|
101
|
+
```
|
|
102
|
+
subagent_type: "grd-codebase-mapper"
|
|
103
|
+
model: "{mapper_model}"
|
|
104
|
+
run_in_background: true
|
|
105
|
+
description: "Map codebase tech stack"
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Prompt:
|
|
109
|
+
```
|
|
110
|
+
Focus: tech
|
|
111
|
+
|
|
112
|
+
Analyze this codebase for technology stack and external integrations.
|
|
113
|
+
|
|
114
|
+
Write these documents to .planning/codebase/:
|
|
115
|
+
- STACK.md - Languages, runtime, frameworks, dependencies, configuration
|
|
116
|
+
- INTEGRATIONS.md - External APIs, databases, auth providers, webhooks
|
|
117
|
+
|
|
118
|
+
Explore thoroughly. Write documents directly using templates. Return confirmation only.
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
**Agent 2: Architecture Focus**
|
|
122
|
+
|
|
123
|
+
Task tool parameters:
|
|
124
|
+
```
|
|
125
|
+
subagent_type: "grd-codebase-mapper"
|
|
126
|
+
model: "{mapper_model}"
|
|
127
|
+
run_in_background: true
|
|
128
|
+
description: "Map codebase architecture"
|
|
129
|
+
```
|
|
130
|
+
|
|
131
|
+
Prompt:
|
|
132
|
+
```
|
|
133
|
+
Focus: arch
|
|
134
|
+
|
|
135
|
+
Analyze this codebase architecture and directory structure.
|
|
136
|
+
|
|
137
|
+
Write these documents to .planning/codebase/:
|
|
138
|
+
- ARCHITECTURE.md - Pattern, layers, data flow, abstractions, entry points
|
|
139
|
+
- STRUCTURE.md - Directory layout, key locations, naming conventions
|
|
140
|
+
|
|
141
|
+
Explore thoroughly. Write documents directly using templates. Return confirmation only.
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
**Agent 3: Quality Focus**
|
|
145
|
+
|
|
146
|
+
Task tool parameters:
|
|
147
|
+
```
|
|
148
|
+
subagent_type: "grd-codebase-mapper"
|
|
149
|
+
model: "{mapper_model}"
|
|
150
|
+
run_in_background: true
|
|
151
|
+
description: "Map codebase conventions"
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
Prompt:
|
|
155
|
+
```
|
|
156
|
+
Focus: quality
|
|
157
|
+
|
|
158
|
+
Analyze this codebase for coding conventions and testing patterns.
|
|
159
|
+
|
|
160
|
+
Write these documents to .planning/codebase/:
|
|
161
|
+
- CONVENTIONS.md - Code style, naming, patterns, error handling
|
|
162
|
+
- TESTING.md - Framework, structure, mocking, coverage
|
|
163
|
+
|
|
164
|
+
Explore thoroughly. Write documents directly using templates. Return confirmation only.
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
**Agent 4: Concerns Focus**
|
|
168
|
+
|
|
169
|
+
Task tool parameters:
|
|
170
|
+
```
|
|
171
|
+
subagent_type: "grd-codebase-mapper"
|
|
172
|
+
model: "{mapper_model}"
|
|
173
|
+
run_in_background: true
|
|
174
|
+
description: "Map codebase concerns"
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
Prompt:
|
|
178
|
+
```
|
|
179
|
+
Focus: concerns
|
|
180
|
+
|
|
181
|
+
Analyze this codebase for technical debt, known issues, and areas of concern.
|
|
182
|
+
|
|
183
|
+
Write this document to .planning/codebase/:
|
|
184
|
+
- CONCERNS.md - Tech debt, bugs, security, performance, fragile areas
|
|
185
|
+
|
|
186
|
+
Explore thoroughly. Write document directly using template. Return confirmation only.
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
Continue to collect_confirmations.
|
|
190
|
+
</step>
|
|
191
|
+
|
|
192
|
+
<step name="collect_confirmations">
|
|
193
|
+
Wait for all 4 agents to complete.
|
|
194
|
+
|
|
195
|
+
Read each agent's output file to collect confirmations.
|
|
196
|
+
|
|
197
|
+
**Expected confirmation format from each agent:**
|
|
198
|
+
```
|
|
199
|
+
## Mapping Complete
|
|
200
|
+
|
|
201
|
+
**Focus:** {focus}
|
|
202
|
+
**Documents written:**
|
|
203
|
+
- `.planning/codebase/{DOC1}.md` ({N} lines)
|
|
204
|
+
- `.planning/codebase/{DOC2}.md` ({N} lines)
|
|
205
|
+
|
|
206
|
+
Ready for orchestrator summary.
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
**What you receive:** Just file paths and line counts. NOT document contents.
|
|
210
|
+
|
|
211
|
+
If any agent failed, note the failure and continue with successful documents.
|
|
212
|
+
|
|
213
|
+
Continue to verify_output.
|
|
214
|
+
</step>
|
|
215
|
+
|
|
216
|
+
<step name="verify_output">
|
|
217
|
+
Verify all documents created successfully:
|
|
218
|
+
|
|
219
|
+
```bash
|
|
220
|
+
ls -la .planning/codebase/
|
|
221
|
+
wc -l .planning/codebase/*.md
|
|
222
|
+
```
|
|
223
|
+
|
|
224
|
+
**Verification checklist:**
|
|
225
|
+
- All 7 documents exist
|
|
226
|
+
- No empty documents (each should have >20 lines)
|
|
227
|
+
|
|
228
|
+
If any documents missing or empty, note which agents may have failed.
|
|
229
|
+
|
|
230
|
+
Continue to commit_codebase_map.
|
|
231
|
+
</step>
|
|
232
|
+
|
|
233
|
+
<step name="commit_codebase_map">
|
|
234
|
+
Commit the codebase map:
|
|
235
|
+
|
|
236
|
+
**Check planning config:**
|
|
237
|
+
|
|
238
|
+
```bash
|
|
239
|
+
COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
|
|
240
|
+
git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
**If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
|
|
244
|
+
|
|
245
|
+
**If `COMMIT_PLANNING_DOCS=true` (default):**
|
|
246
|
+
|
|
247
|
+
```bash
|
|
248
|
+
git add .planning/codebase/*.md
|
|
249
|
+
git commit -m "$(cat <<'EOF'
|
|
250
|
+
docs: map existing codebase
|
|
251
|
+
|
|
252
|
+
- STACK.md - Technologies and dependencies
|
|
253
|
+
- ARCHITECTURE.md - System design and patterns
|
|
254
|
+
- STRUCTURE.md - Directory layout
|
|
255
|
+
- CONVENTIONS.md - Code style and patterns
|
|
256
|
+
- TESTING.md - Test structure
|
|
257
|
+
- INTEGRATIONS.md - External services
|
|
258
|
+
- CONCERNS.md - Technical debt and issues
|
|
259
|
+
EOF
|
|
260
|
+
)"
|
|
261
|
+
```
|
|
262
|
+
|
|
263
|
+
Continue to offer_next.
|
|
264
|
+
</step>
|
|
265
|
+
|
|
266
|
+
<step name="offer_next">
|
|
267
|
+
Present completion summary and next steps.
|
|
268
|
+
|
|
269
|
+
**Get line counts:**
|
|
270
|
+
```bash
|
|
271
|
+
wc -l .planning/codebase/*.md
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
**Output format:**
|
|
275
|
+
|
|
276
|
+
```
|
|
277
|
+
Codebase mapping complete.
|
|
278
|
+
|
|
279
|
+
Created .planning/codebase/:
|
|
280
|
+
- STACK.md ([N] lines) - Technologies and dependencies
|
|
281
|
+
- ARCHITECTURE.md ([N] lines) - System design and patterns
|
|
282
|
+
- STRUCTURE.md ([N] lines) - Directory layout and organization
|
|
283
|
+
- CONVENTIONS.md ([N] lines) - Code style and patterns
|
|
284
|
+
- TESTING.md ([N] lines) - Test structure and practices
|
|
285
|
+
- INTEGRATIONS.md ([N] lines) - External services and APIs
|
|
286
|
+
- CONCERNS.md ([N] lines) - Technical debt and issues
|
|
287
|
+
|
|
288
|
+
|
|
289
|
+
---
|
|
290
|
+
|
|
291
|
+
## ▶ Next Up
|
|
292
|
+
|
|
293
|
+
**Initialize project** — use codebase context for planning
|
|
294
|
+
|
|
295
|
+
`/grd:new-project`
|
|
296
|
+
|
|
297
|
+
<sub>`/clear` first → fresh context window</sub>
|
|
298
|
+
|
|
299
|
+
---
|
|
300
|
+
|
|
301
|
+
**Also available:**
|
|
302
|
+
- Re-run mapping: `/grd:map-codebase`
|
|
303
|
+
- Review specific file: `cat .planning/codebase/STACK.md`
|
|
304
|
+
- Edit any document before proceeding
|
|
305
|
+
|
|
306
|
+
---
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
End workflow.
|
|
310
|
+
</step>
|
|
311
|
+
|
|
312
|
+
</process>
|
|
313
|
+
|
|
314
|
+
<success_criteria>
|
|
315
|
+
- .planning/codebase/ directory created
|
|
316
|
+
- 4 parallel grd-codebase-mapper agents spawned with run_in_background=true
|
|
317
|
+
- Agents write documents directly (orchestrator doesn't receive document contents)
|
|
318
|
+
- Read agent output files to collect confirmations
|
|
319
|
+
- All 7 codebase documents exist
|
|
320
|
+
- Clear completion summary with line counts
|
|
321
|
+
- User offered clear next steps in GRD style
|
|
322
|
+
</success_criteria>
|