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.
Files changed (127) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +560 -0
  3. package/agents/grd-architect.md +789 -0
  4. package/agents/grd-codebase-mapper.md +738 -0
  5. package/agents/grd-critic.md +1065 -0
  6. package/agents/grd-debugger.md +1203 -0
  7. package/agents/grd-evaluator.md +948 -0
  8. package/agents/grd-executor.md +784 -0
  9. package/agents/grd-explorer.md +2063 -0
  10. package/agents/grd-graduator.md +484 -0
  11. package/agents/grd-integration-checker.md +423 -0
  12. package/agents/grd-phase-researcher.md +641 -0
  13. package/agents/grd-plan-checker.md +745 -0
  14. package/agents/grd-planner.md +1386 -0
  15. package/agents/grd-project-researcher.md +865 -0
  16. package/agents/grd-research-synthesizer.md +256 -0
  17. package/agents/grd-researcher.md +2361 -0
  18. package/agents/grd-roadmapper.md +605 -0
  19. package/agents/grd-verifier.md +778 -0
  20. package/bin/install.js +1294 -0
  21. package/commands/grd/add-phase.md +207 -0
  22. package/commands/grd/add-todo.md +193 -0
  23. package/commands/grd/architect.md +283 -0
  24. package/commands/grd/audit-milestone.md +277 -0
  25. package/commands/grd/check-todos.md +228 -0
  26. package/commands/grd/complete-milestone.md +136 -0
  27. package/commands/grd/debug.md +169 -0
  28. package/commands/grd/discuss-phase.md +86 -0
  29. package/commands/grd/evaluate.md +1095 -0
  30. package/commands/grd/execute-phase.md +339 -0
  31. package/commands/grd/explore.md +258 -0
  32. package/commands/grd/graduate.md +323 -0
  33. package/commands/grd/help.md +482 -0
  34. package/commands/grd/insert-phase.md +227 -0
  35. package/commands/grd/insights.md +231 -0
  36. package/commands/grd/join-discord.md +18 -0
  37. package/commands/grd/list-phase-assumptions.md +50 -0
  38. package/commands/grd/map-codebase.md +71 -0
  39. package/commands/grd/new-milestone.md +721 -0
  40. package/commands/grd/new-project.md +1008 -0
  41. package/commands/grd/pause-work.md +134 -0
  42. package/commands/grd/plan-milestone-gaps.md +295 -0
  43. package/commands/grd/plan-phase.md +525 -0
  44. package/commands/grd/progress.md +364 -0
  45. package/commands/grd/quick-explore.md +236 -0
  46. package/commands/grd/quick.md +309 -0
  47. package/commands/grd/remove-phase.md +349 -0
  48. package/commands/grd/research-phase.md +200 -0
  49. package/commands/grd/research.md +681 -0
  50. package/commands/grd/resume-work.md +40 -0
  51. package/commands/grd/set-profile.md +106 -0
  52. package/commands/grd/settings.md +136 -0
  53. package/commands/grd/update.md +172 -0
  54. package/commands/grd/verify-work.md +219 -0
  55. package/get-research-done/config/default.json +15 -0
  56. package/get-research-done/references/checkpoints.md +1078 -0
  57. package/get-research-done/references/continuation-format.md +249 -0
  58. package/get-research-done/references/git-integration.md +254 -0
  59. package/get-research-done/references/model-profiles.md +73 -0
  60. package/get-research-done/references/planning-config.md +94 -0
  61. package/get-research-done/references/questioning.md +141 -0
  62. package/get-research-done/references/tdd.md +263 -0
  63. package/get-research-done/references/ui-brand.md +160 -0
  64. package/get-research-done/references/verification-patterns.md +612 -0
  65. package/get-research-done/templates/DEBUG.md +159 -0
  66. package/get-research-done/templates/UAT.md +247 -0
  67. package/get-research-done/templates/archive-reason.md +195 -0
  68. package/get-research-done/templates/codebase/architecture.md +255 -0
  69. package/get-research-done/templates/codebase/concerns.md +310 -0
  70. package/get-research-done/templates/codebase/conventions.md +307 -0
  71. package/get-research-done/templates/codebase/integrations.md +280 -0
  72. package/get-research-done/templates/codebase/stack.md +186 -0
  73. package/get-research-done/templates/codebase/structure.md +285 -0
  74. package/get-research-done/templates/codebase/testing.md +480 -0
  75. package/get-research-done/templates/config.json +35 -0
  76. package/get-research-done/templates/context.md +283 -0
  77. package/get-research-done/templates/continue-here.md +78 -0
  78. package/get-research-done/templates/critic-log.md +288 -0
  79. package/get-research-done/templates/data-report.md +173 -0
  80. package/get-research-done/templates/debug-subagent-prompt.md +91 -0
  81. package/get-research-done/templates/decision-log.md +58 -0
  82. package/get-research-done/templates/decision.md +138 -0
  83. package/get-research-done/templates/discovery.md +146 -0
  84. package/get-research-done/templates/experiment-readme.md +104 -0
  85. package/get-research-done/templates/graduated-script.md +180 -0
  86. package/get-research-done/templates/iteration-summary.md +234 -0
  87. package/get-research-done/templates/milestone-archive.md +123 -0
  88. package/get-research-done/templates/milestone.md +115 -0
  89. package/get-research-done/templates/objective.md +271 -0
  90. package/get-research-done/templates/phase-prompt.md +567 -0
  91. package/get-research-done/templates/planner-subagent-prompt.md +117 -0
  92. package/get-research-done/templates/project.md +184 -0
  93. package/get-research-done/templates/requirements.md +231 -0
  94. package/get-research-done/templates/research-project/ARCHITECTURE.md +204 -0
  95. package/get-research-done/templates/research-project/FEATURES.md +147 -0
  96. package/get-research-done/templates/research-project/PITFALLS.md +200 -0
  97. package/get-research-done/templates/research-project/STACK.md +120 -0
  98. package/get-research-done/templates/research-project/SUMMARY.md +170 -0
  99. package/get-research-done/templates/research.md +529 -0
  100. package/get-research-done/templates/roadmap.md +202 -0
  101. package/get-research-done/templates/scorecard.json +113 -0
  102. package/get-research-done/templates/state.md +287 -0
  103. package/get-research-done/templates/summary.md +246 -0
  104. package/get-research-done/templates/user-setup.md +311 -0
  105. package/get-research-done/templates/verification-report.md +322 -0
  106. package/get-research-done/workflows/complete-milestone.md +756 -0
  107. package/get-research-done/workflows/diagnose-issues.md +231 -0
  108. package/get-research-done/workflows/discovery-phase.md +289 -0
  109. package/get-research-done/workflows/discuss-phase.md +433 -0
  110. package/get-research-done/workflows/execute-phase.md +657 -0
  111. package/get-research-done/workflows/execute-plan.md +1844 -0
  112. package/get-research-done/workflows/list-phase-assumptions.md +178 -0
  113. package/get-research-done/workflows/map-codebase.md +322 -0
  114. package/get-research-done/workflows/resume-project.md +307 -0
  115. package/get-research-done/workflows/transition.md +556 -0
  116. package/get-research-done/workflows/verify-phase.md +628 -0
  117. package/get-research-done/workflows/verify-work.md +596 -0
  118. package/hooks/dist/grd-check-update.js +61 -0
  119. package/hooks/dist/grd-statusline.js +84 -0
  120. package/package.json +47 -0
  121. package/scripts/audit-help-commands.sh +115 -0
  122. package/scripts/build-hooks.js +42 -0
  123. package/scripts/verify-all-commands.sh +246 -0
  124. package/scripts/verify-architect-warning.sh +35 -0
  125. package/scripts/verify-insights-mode.sh +40 -0
  126. package/scripts/verify-quick-mode.sh +20 -0
  127. package/scripts/verify-revise-data-routing.sh +139 -0
@@ -0,0 +1,231 @@
1
+ <purpose>
2
+ Orchestrate parallel debug agents to investigate UAT gaps and find root causes.
3
+
4
+ After UAT finds gaps, spawn one debug agent per gap. Each agent investigates autonomously with symptoms pre-filled from UAT. Collect root causes, update UAT.md gaps with diagnosis, then hand off to plan-phase --gaps with actual diagnoses.
5
+
6
+ Orchestrator stays lean: parse gaps, spawn agents, collect results, update UAT.
7
+ </purpose>
8
+
9
+ <paths>
10
+ DEBUG_DIR=.planning/debug
11
+
12
+ Debug files use the `.planning/debug/` path (hidden directory with leading dot).
13
+ </paths>
14
+
15
+ <core_principle>
16
+ **Diagnose before planning fixes.**
17
+
18
+ UAT tells us WHAT is broken (symptoms). Debug agents find WHY (root cause). plan-phase --gaps then creates targeted fixes based on actual causes, not guesses.
19
+
20
+ Without diagnosis: "Comment doesn't refresh" → guess at fix → maybe wrong
21
+ With diagnosis: "Comment doesn't refresh" → "useEffect missing dependency" → precise fix
22
+ </core_principle>
23
+
24
+ <process>
25
+
26
+ <step name="parse_gaps">
27
+ **Extract gaps from UAT.md:**
28
+
29
+ Read the "Gaps" section (YAML format):
30
+ ```yaml
31
+ - truth: "Comment appears immediately after submission"
32
+ status: failed
33
+ reason: "User reported: works but doesn't show until I refresh the page"
34
+ severity: major
35
+ test: 2
36
+ artifacts: []
37
+ missing: []
38
+ ```
39
+
40
+ For each gap, also read the corresponding test from "Tests" section to get full context.
41
+
42
+ Build gap list:
43
+ ```
44
+ gaps = [
45
+ {truth: "Comment appears immediately...", severity: "major", test_num: 2, reason: "..."},
46
+ {truth: "Reply button positioned correctly...", severity: "minor", test_num: 5, reason: "..."},
47
+ ...
48
+ ]
49
+ ```
50
+ </step>
51
+
52
+ <step name="report_plan">
53
+ **Report diagnosis plan to user:**
54
+
55
+ ```
56
+ ## Diagnosing {N} Gaps
57
+
58
+ Spawning parallel debug agents to investigate root causes:
59
+
60
+ | Gap (Truth) | Severity |
61
+ |-------------|----------|
62
+ | Comment appears immediately after submission | major |
63
+ | Reply button positioned correctly | minor |
64
+ | Delete removes comment | blocker |
65
+
66
+ Each agent will:
67
+ 1. Create DEBUG-{slug}.md with symptoms pre-filled
68
+ 2. Investigate autonomously (read code, form hypotheses, test)
69
+ 3. Return root cause
70
+
71
+ This runs in parallel - all gaps investigated simultaneously.
72
+ ```
73
+ </step>
74
+
75
+ <step name="spawn_agents">
76
+ **Spawn debug agents in parallel:**
77
+
78
+ For each gap, fill the debug-subagent-prompt template and spawn:
79
+
80
+ ```
81
+ Task(
82
+ prompt=filled_debug_subagent_prompt,
83
+ subagent_type="general-purpose",
84
+ description="Debug: {truth_short}"
85
+ )
86
+ ```
87
+
88
+ **All agents spawn in single message** (parallel execution).
89
+
90
+ Template placeholders:
91
+ - `{truth}`: The expected behavior that failed
92
+ - `{expected}`: From UAT test
93
+ - `{actual}`: Verbatim user description from reason field
94
+ - `{errors}`: Any error messages from UAT (or "None reported")
95
+ - `{reproduction}`: "Test {test_num} in UAT"
96
+ - `{timeline}`: "Discovered during UAT"
97
+ - `{goal}`: `find_root_cause_only` (UAT flow - plan-phase --gaps handles fixes)
98
+ - `{slug}`: Generated from truth
99
+ </step>
100
+
101
+ <step name="collect_results">
102
+ **Collect root causes from agents:**
103
+
104
+ Each agent returns with:
105
+ ```
106
+ ## ROOT CAUSE FOUND
107
+
108
+ **Debug Session:** ${DEBUG_DIR}/{slug}.md
109
+
110
+ **Root Cause:** {specific cause with evidence}
111
+
112
+ **Evidence Summary:**
113
+ - {key finding 1}
114
+ - {key finding 2}
115
+ - {key finding 3}
116
+
117
+ **Files Involved:**
118
+ - {file1}: {what's wrong}
119
+ - {file2}: {related issue}
120
+
121
+ **Suggested Fix Direction:** {brief hint for plan-phase --gaps}
122
+ ```
123
+
124
+ Parse each return to extract:
125
+ - root_cause: The diagnosed cause
126
+ - files: Files involved
127
+ - debug_path: Path to debug session file
128
+ - suggested_fix: Hint for gap closure plan
129
+
130
+ If agent returns `## INVESTIGATION INCONCLUSIVE`:
131
+ - root_cause: "Investigation inconclusive - manual review needed"
132
+ - Note which issue needs manual attention
133
+ - Include remaining possibilities from agent return
134
+ </step>
135
+
136
+ <step name="update_uat">
137
+ **Update UAT.md gaps with diagnosis:**
138
+
139
+ For each gap in the Gaps section, add artifacts and missing fields:
140
+
141
+ ```yaml
142
+ - truth: "Comment appears immediately after submission"
143
+ status: failed
144
+ reason: "User reported: works but doesn't show until I refresh the page"
145
+ severity: major
146
+ test: 2
147
+ root_cause: "useEffect in CommentList.tsx missing commentCount dependency"
148
+ artifacts:
149
+ - path: "src/components/CommentList.tsx"
150
+ issue: "useEffect missing dependency"
151
+ missing:
152
+ - "Add commentCount to useEffect dependency array"
153
+ - "Trigger re-render when new comment added"
154
+ debug_session: .planning/debug/comment-not-refreshing.md
155
+ ```
156
+
157
+ Update status in frontmatter to "diagnosed".
158
+
159
+ **Check planning config:**
160
+
161
+ ```bash
162
+ COMMIT_PLANNING_DOCS=$(cat .planning/config.json 2>/dev/null | grep -o '"commit_docs"[[:space:]]*:[[:space:]]*[^,}]*' | grep -o 'true\|false' || echo "true")
163
+ git check-ignore -q .planning 2>/dev/null && COMMIT_PLANNING_DOCS=false
164
+ ```
165
+
166
+ **If `COMMIT_PLANNING_DOCS=false`:** Skip git operations
167
+
168
+ **If `COMMIT_PLANNING_DOCS=true` (default):**
169
+
170
+ Commit the updated UAT.md:
171
+ ```bash
172
+ git add ".planning/phases/XX-name/{phase}-UAT.md"
173
+ git commit -m "docs({phase}): add root causes from diagnosis"
174
+ ```
175
+ </step>
176
+
177
+ <step name="report_results">
178
+ **Report diagnosis results and hand off:**
179
+
180
+ Display:
181
+ ```
182
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
183
+ GRD ► DIAGNOSIS COMPLETE
184
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
185
+
186
+ | Gap (Truth) | Root Cause | Files |
187
+ |-------------|------------|-------|
188
+ | Comment appears immediately | useEffect missing dependency | CommentList.tsx |
189
+ | Reply button positioned correctly | CSS flex order incorrect | ReplyButton.tsx |
190
+ | Delete removes comment | API missing auth header | api/comments.ts |
191
+
192
+ Debug sessions: ${DEBUG_DIR}/
193
+
194
+ Proceeding to plan fixes...
195
+ ```
196
+
197
+ Return to verify-work orchestrator for automatic planning.
198
+ Do NOT offer manual next steps - verify-work handles the rest.
199
+ </step>
200
+
201
+ </process>
202
+
203
+ <context_efficiency>
204
+ Agents start with symptoms pre-filled from UAT (no symptom gathering).
205
+ Agents only diagnose—plan-phase --gaps handles fixes (no fix application).
206
+ </context_efficiency>
207
+
208
+ <failure_handling>
209
+ **Agent fails to find root cause:**
210
+ - Mark gap as "needs manual review"
211
+ - Continue with other gaps
212
+ - Report incomplete diagnosis
213
+
214
+ **Agent times out:**
215
+ - Check DEBUG-{slug}.md for partial progress
216
+ - Can resume with /grd:debug
217
+
218
+ **All agents fail:**
219
+ - Something systemic (permissions, git, etc.)
220
+ - Report for manual investigation
221
+ - Fall back to plan-phase --gaps without root causes (less precise)
222
+ </failure_handling>
223
+
224
+ <success_criteria>
225
+ - [ ] Gaps parsed from UAT.md
226
+ - [ ] Debug agents spawned in parallel
227
+ - [ ] Root causes collected from all agents
228
+ - [ ] UAT.md gaps updated with artifacts and missing
229
+ - [ ] Debug sessions saved to ${DEBUG_DIR}/
230
+ - [ ] Hand off to verify-work for automatic planning
231
+ </success_criteria>
@@ -0,0 +1,289 @@
1
+ <purpose>
2
+ Execute discovery at the appropriate depth level.
3
+ Produces DISCOVERY.md (for Level 2-3) that informs PLAN.md creation.
4
+
5
+ Called from plan-phase.md's mandatory_discovery step with a depth parameter.
6
+
7
+ NOTE: For comprehensive ecosystem research ("how do experts build this"), use /grd:research-phase instead, which produces RESEARCH.md.
8
+ </purpose>
9
+
10
+ <depth_levels>
11
+ **This workflow supports three depth levels:**
12
+
13
+ | Level | Name | Time | Output | When |
14
+ | ----- | ------------ | --------- | -------------------------------------------- | ----------------------------------------- |
15
+ | 1 | Quick Verify | 2-5 min | No file, proceed with verified knowledge | Single library, confirming current syntax |
16
+ | 2 | Standard | 15-30 min | DISCOVERY.md | Choosing between options, new integration |
17
+ | 3 | Deep Dive | 1+ hour | Detailed DISCOVERY.md with validation gates | Architectural decisions, novel problems |
18
+
19
+ **Depth is determined by plan-phase.md before routing here.**
20
+ </depth_levels>
21
+
22
+ <source_hierarchy>
23
+ **MANDATORY: Context7 BEFORE WebSearch**
24
+
25
+ Claude's training data is 6-18 months stale. Always verify.
26
+
27
+ 1. **Context7 MCP FIRST** - Current docs, no hallucination
28
+ 2. **Official docs** - When Context7 lacks coverage
29
+ 3. **WebSearch LAST** - For comparisons and trends only
30
+
31
+ See ~/.claude/get-research-done/templates/discovery.md `<discovery_protocol>` for full protocol.
32
+ </source_hierarchy>
33
+
34
+ <process>
35
+
36
+ <step name="determine_depth">
37
+ Check the depth parameter passed from plan-phase.md:
38
+ - `depth=verify` → Level 1 (Quick Verification)
39
+ - `depth=standard` → Level 2 (Standard Discovery)
40
+ - `depth=deep` → Level 3 (Deep Dive)
41
+
42
+ Route to appropriate level workflow below.
43
+ </step>
44
+
45
+ <step name="level_1_quick_verify">
46
+ **Level 1: Quick Verification (2-5 minutes)**
47
+
48
+ For: Single known library, confirming syntax/version still correct.
49
+
50
+ **Process:**
51
+
52
+ 1. Resolve library in Context7:
53
+
54
+ ```
55
+ mcp__context7__resolve-library-id with libraryName: "[library]"
56
+ ```
57
+
58
+ 2. Fetch relevant docs:
59
+
60
+ ```
61
+ mcp__context7__get-library-docs with:
62
+ - context7CompatibleLibraryID: [from step 1]
63
+ - topic: [specific concern]
64
+ ```
65
+
66
+ 3. Verify:
67
+
68
+ - Current version matches expectations
69
+ - API syntax unchanged
70
+ - No breaking changes in recent versions
71
+
72
+ 4. **If verified:** Return to plan-phase.md with confirmation. No DISCOVERY.md needed.
73
+
74
+ 5. **If concerns found:** Escalate to Level 2.
75
+
76
+ **Output:** Verbal confirmation to proceed, or escalation to Level 2.
77
+ </step>
78
+
79
+ <step name="level_2_standard">
80
+ **Level 2: Standard Discovery (15-30 minutes)**
81
+
82
+ For: Choosing between options, new external integration.
83
+
84
+ **Process:**
85
+
86
+ 1. **Identify what to discover:**
87
+
88
+ - What options exist?
89
+ - What are the key comparison criteria?
90
+ - What's our specific use case?
91
+
92
+ 2. **Context7 for each option:**
93
+
94
+ ```
95
+ For each library/framework:
96
+ - mcp__context7__resolve-library-id
97
+ - mcp__context7__get-library-docs (mode: "code" for API, "info" for concepts)
98
+ ```
99
+
100
+ 3. **Official docs** for anything Context7 lacks.
101
+
102
+ 4. **WebSearch** for comparisons:
103
+
104
+ - "[option A] vs [option B] {current_year}"
105
+ - "[option] known issues"
106
+ - "[option] with [our stack]"
107
+
108
+ 5. **Cross-verify:** Any WebSearch finding → confirm with Context7/official docs.
109
+
110
+ 6. **Create DISCOVERY.md** using ~/.claude/get-research-done/templates/discovery.md structure:
111
+
112
+ - Summary with recommendation
113
+ - Key findings per option
114
+ - Code examples from Context7
115
+ - Confidence level (should be MEDIUM-HIGH for Level 2)
116
+
117
+ 7. Return to plan-phase.md.
118
+
119
+ **Output:** `.planning/phases/XX-name/DISCOVERY.md`
120
+ </step>
121
+
122
+ <step name="level_3_deep_dive">
123
+ **Level 3: Deep Dive (1+ hour)**
124
+
125
+ For: Architectural decisions, novel problems, high-risk choices.
126
+
127
+ **Process:**
128
+
129
+ 1. **Scope the discovery** using ~/.claude/get-research-done/templates/discovery.md:
130
+
131
+ - Define clear scope
132
+ - Define include/exclude boundaries
133
+ - List specific questions to answer
134
+
135
+ 2. **Exhaustive Context7 research:**
136
+
137
+ - All relevant libraries
138
+ - Related patterns and concepts
139
+ - Multiple topics per library if needed
140
+
141
+ 3. **Official documentation deep read:**
142
+
143
+ - Architecture guides
144
+ - Best practices sections
145
+ - Migration/upgrade guides
146
+ - Known limitations
147
+
148
+ 4. **WebSearch for ecosystem context:**
149
+
150
+ - How others solved similar problems
151
+ - Production experiences
152
+ - Gotchas and anti-patterns
153
+ - Recent changes/announcements
154
+
155
+ 5. **Cross-verify ALL findings:**
156
+
157
+ - Every WebSearch claim → verify with authoritative source
158
+ - Mark what's verified vs assumed
159
+ - Flag contradictions
160
+
161
+ 6. **Create comprehensive DISCOVERY.md:**
162
+
163
+ - Full structure from ~/.claude/get-research-done/templates/discovery.md
164
+ - Quality report with source attribution
165
+ - Confidence by finding
166
+ - If LOW confidence on any critical finding → add validation checkpoints
167
+
168
+ 7. **Confidence gate:** If overall confidence is LOW, present options before proceeding.
169
+
170
+ 8. Return to plan-phase.md.
171
+
172
+ **Output:** `.planning/phases/XX-name/DISCOVERY.md` (comprehensive)
173
+ </step>
174
+
175
+ <step name="identify_unknowns">
176
+ **For Level 2-3:** Define what we need to learn.
177
+
178
+ Ask: What do we need to learn before we can plan this phase?
179
+
180
+ - Technology choices?
181
+ - Best practices?
182
+ - API patterns?
183
+ - Architecture approach?
184
+ </step>
185
+
186
+ <step name="create_discovery_scope">
187
+ Use ~/.claude/get-research-done/templates/discovery.md.
188
+
189
+ Include:
190
+
191
+ - Clear discovery objective
192
+ - Scoped include/exclude lists
193
+ - Source preferences (official docs, Context7, current year)
194
+ - Output structure for DISCOVERY.md
195
+ </step>
196
+
197
+ <step name="execute_discovery">
198
+ Run the discovery:
199
+ - Use web search for current info
200
+ - Use Context7 MCP for library docs
201
+ - Prefer current year sources
202
+ - Structure findings per template
203
+ </step>
204
+
205
+ <step name="create_discovery_output">
206
+ Write `.planning/phases/XX-name/DISCOVERY.md`:
207
+ - Summary with recommendation
208
+ - Key findings with sources
209
+ - Code examples if applicable
210
+ - Metadata (confidence, dependencies, open questions, assumptions)
211
+ </step>
212
+
213
+ <step name="confidence_gate">
214
+ After creating DISCOVERY.md, check confidence level.
215
+
216
+ If confidence is LOW:
217
+ Use AskUserQuestion:
218
+
219
+ - header: "Low Confidence"
220
+ - question: "Discovery confidence is LOW: [reason]. How would you like to proceed?"
221
+ - options:
222
+ - "Dig deeper" - Do more research before planning
223
+ - "Proceed anyway" - Accept uncertainty, plan with caveats
224
+ - "Pause" - I need to think about this
225
+
226
+ If confidence is MEDIUM:
227
+ Inline: "Discovery complete (medium confidence). [brief reason]. Proceed to planning?"
228
+
229
+ If confidence is HIGH:
230
+ Proceed directly, just note: "Discovery complete (high confidence)."
231
+ </step>
232
+
233
+ <step name="open_questions_gate">
234
+ If DISCOVERY.md has open_questions:
235
+
236
+ Present them inline:
237
+ "Open questions from discovery:
238
+
239
+ - [Question 1]
240
+ - [Question 2]
241
+
242
+ These may affect implementation. Acknowledge and proceed? (yes / address first)"
243
+
244
+ If "address first": Gather user input on questions, update discovery.
245
+ </step>
246
+
247
+ <step name="offer_next">
248
+ ```
249
+ Discovery complete: .planning/phases/XX-name/DISCOVERY.md
250
+ Recommendation: [one-liner]
251
+ Confidence: [level]
252
+
253
+ What's next?
254
+
255
+ 1. Discuss phase context (/grd:discuss-phase [current-phase])
256
+ 2. Create phase plan (/grd:plan-phase [current-phase])
257
+ 3. Refine discovery (dig deeper)
258
+ 4. Review discovery
259
+
260
+ ```
261
+
262
+ NOTE: DISCOVERY.md is NOT committed separately. It will be committed with phase completion.
263
+ </step>
264
+
265
+ </process>
266
+
267
+ <success_criteria>
268
+ **Level 1 (Quick Verify):**
269
+ - Context7 consulted for library/topic
270
+ - Current state verified or concerns escalated
271
+ - Verbal confirmation to proceed (no files)
272
+
273
+ **Level 2 (Standard):**
274
+ - Context7 consulted for all options
275
+ - WebSearch findings cross-verified
276
+ - DISCOVERY.md created with recommendation
277
+ - Confidence level MEDIUM or higher
278
+ - Ready to inform PLAN.md creation
279
+
280
+ **Level 3 (Deep Dive):**
281
+ - Discovery scope defined
282
+ - Context7 exhaustively consulted
283
+ - All WebSearch findings verified against authoritative sources
284
+ - DISCOVERY.md created with comprehensive analysis
285
+ - Quality report with source attribution
286
+ - If LOW confidence findings → validation checkpoints defined
287
+ - Confidence gate passed
288
+ - Ready to inform PLAN.md creation
289
+ </success_criteria>