learnship 2.1.2 → 2.2.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 (45) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/.cursor-plugin/plugin.json +1 -1
  3. package/README.md +172 -155
  4. package/SKILL.md +22 -1
  5. package/bin/install.js +305 -3
  6. package/commands/learnship/diagnose-issues.md +1 -0
  7. package/commands/learnship/discuss-phase.md +1 -0
  8. package/commands/learnship/ideate.md +1 -0
  9. package/commands/learnship/list-phase-assumptions.md +1 -0
  10. package/commands/learnship/quick.md +1 -0
  11. package/commands/learnship/research-phase.md +1 -0
  12. package/commands/learnship/secure-phase.md +1 -0
  13. package/commands/learnship/validate-phase.md +2 -0
  14. package/commands/learnship/verify-work.md +1 -0
  15. package/cursor-rules/learnship.mdc +13 -3
  16. package/gemini-extension.json +1 -1
  17. package/hooks/learnship-context-monitor.js +120 -0
  18. package/hooks/learnship-prompt-guard.js +75 -0
  19. package/hooks/learnship-session-state.js +136 -0
  20. package/hooks/learnship-statusline.js +179 -0
  21. package/learnship/contexts/dev.md +21 -0
  22. package/learnship/contexts/research.md +22 -0
  23. package/learnship/contexts/review.md +22 -0
  24. package/learnship/templates/research-project/ARCHITECTURE.md +140 -0
  25. package/learnship/templates/research-project/FEATURES.md +130 -0
  26. package/learnship/templates/research-project/PITFALLS.md +102 -0
  27. package/learnship/templates/research-project/STACK.md +105 -0
  28. package/learnship/templates/research-project/SUMMARY.md +111 -0
  29. package/learnship/workflows/challenge.md +16 -4
  30. package/learnship/workflows/debug.md +30 -6
  31. package/learnship/workflows/diagnose-issues.md +14 -1
  32. package/learnship/workflows/discuss-milestone.md +15 -1
  33. package/learnship/workflows/discuss-phase.md +83 -10
  34. package/learnship/workflows/ideate.md +25 -5
  35. package/learnship/workflows/list-phase-assumptions.md +12 -5
  36. package/learnship/workflows/new-milestone.md +12 -6
  37. package/learnship/workflows/new-project.md +200 -73
  38. package/learnship/workflows/quick.md +18 -4
  39. package/learnship/workflows/research-phase.md +43 -8
  40. package/learnship/workflows/secure-phase.md +57 -15
  41. package/learnship/workflows/settings.md +142 -142
  42. package/learnship/workflows/validate-phase.md +39 -12
  43. package/learnship/workflows/verify-work.md +27 -0
  44. package/package.json +1 -1
  45. package/templates/config.json +1 -0
@@ -0,0 +1,130 @@
1
+ # Features Research Template
2
+
3
+ Template for `.planning/research/FEATURES.md` — feature landscape for the project domain.
4
+
5
+ <template>
6
+
7
+ ```markdown
8
+ # Feature Research
9
+
10
+ **Domain:** [domain type]
11
+ **Researched:** [date]
12
+ **Confidence:** [HIGH/MEDIUM/LOW]
13
+
14
+ ## Table Stakes
15
+
16
+ Features users expect by default. Missing these = product feels incomplete.
17
+
18
+ | Feature | Why Expected | Complexity | Notes |
19
+ |---------|--------------|------------|-------|
20
+ | [feature] | [user expectation] | LOW/MEDIUM/HIGH | [implementation notes] |
21
+ | [feature] | [user expectation] | LOW/MEDIUM/HIGH | [implementation notes] |
22
+ | [feature] | [user expectation] | LOW/MEDIUM/HIGH | [implementation notes] |
23
+
24
+ ## Differentiators
25
+
26
+ Features that set the product apart. Not required for launch, but valuable.
27
+
28
+ | Feature | Value Proposition | Complexity | Notes |
29
+ |---------|-------------------|------------|-------|
30
+ | [feature] | [why it matters] | LOW/MEDIUM/HIGH | [implementation notes] |
31
+ | [feature] | [why it matters] | LOW/MEDIUM/HIGH | [implementation notes] |
32
+
33
+ ## Anti-Features
34
+
35
+ Features that seem good but create problems. Prevent scope creep by documenting them.
36
+
37
+ | Feature | Why Requested | Why Problematic | Alternative |
38
+ |---------|---------------|-----------------|-------------|
39
+ | [feature] | [surface appeal] | [actual problems] | [better approach] |
40
+ | [feature] | [surface appeal] | [actual problems] | [better approach] |
41
+
42
+ ## Feature Dependencies
43
+
44
+ ```
45
+ [Feature A]
46
+ └──requires──> [Feature B]
47
+ └──requires──> [Feature C]
48
+
49
+ [Feature D] ──enhances──> [Feature A]
50
+
51
+ [Feature E] ──conflicts──> [Feature F]
52
+ ```
53
+
54
+ ### Dependency Notes
55
+
56
+ - **[Feature A] requires [Feature B]:** [why the dependency exists]
57
+ - **[Feature D] enhances [Feature A]:** [how they work together]
58
+ - **[Feature E] conflicts with [Feature F]:** [why they're incompatible]
59
+
60
+ ## MVP Definition
61
+
62
+ ### Launch With (v1)
63
+
64
+ Minimum viable product — what's needed to validate the concept.
65
+
66
+ - [ ] [Feature] — [why essential]
67
+ - [ ] [Feature] — [why essential]
68
+ - [ ] [Feature] — [why essential]
69
+
70
+ ### Add After Validation (v1.x)
71
+
72
+ Features to add once core is working.
73
+
74
+ - [ ] [Feature] — [trigger for adding]
75
+ - [ ] [Feature] — [trigger for adding]
76
+
77
+ ### Future Consideration (v2+)
78
+
79
+ Features to defer until product-market fit is established.
80
+
81
+ - [ ] [Feature] — [why defer]
82
+ - [ ] [Feature] — [why defer]
83
+
84
+ ## Feature Prioritization Matrix
85
+
86
+ | Feature | User Value | Implementation Cost | Priority |
87
+ |---------|------------|---------------------|----------|
88
+ | [feature] | HIGH/MEDIUM/LOW | HIGH/MEDIUM/LOW | P1/P2/P3 |
89
+ | [feature] | HIGH/MEDIUM/LOW | HIGH/MEDIUM/LOW | P1/P2/P3 |
90
+
91
+ **Priority key:**
92
+ - P1: Must have for launch
93
+ - P2: Should have, add when possible
94
+ - P3: Nice to have, future consideration
95
+
96
+ ---
97
+ *Feature research for: [domain]*
98
+ *Researched: [date]*
99
+ ```
100
+
101
+ </template>
102
+
103
+ <guidelines>
104
+
105
+ **Table Stakes:**
106
+ - These are non-negotiable for launch
107
+ - Users don't give credit for having them, but penalize for missing them
108
+ - Example: A community platform without user profiles is broken
109
+
110
+ **Differentiators:**
111
+ - These are where you compete
112
+ - Should align with the Core Value from PROJECT.md
113
+ - Don't try to differentiate on everything — pick 2-3
114
+
115
+ **Anti-Features:**
116
+ - Prevent scope creep by documenting what seems good but isn't
117
+ - Include the alternative approach
118
+ - Example: "Real-time everything" often creates complexity without value
119
+
120
+ **Feature Dependencies:**
121
+ - Critical for roadmap phase ordering
122
+ - If A requires B, B must be in an earlier phase
123
+ - Conflicts inform what NOT to combine in same phase
124
+
125
+ **MVP Definition:**
126
+ - Be ruthless about what's truly minimum
127
+ - "Nice to have" is not MVP
128
+ - Launch with less, validate, then expand
129
+
130
+ </guidelines>
@@ -0,0 +1,102 @@
1
+ # Pitfalls Research Template
2
+
3
+ Template for `.planning/research/PITFALLS.md` — common mistakes and prevention strategies for the project domain.
4
+
5
+ <template>
6
+
7
+ ```markdown
8
+ # Pitfalls Research
9
+
10
+ **Domain:** [domain type]
11
+ **Researched:** [date]
12
+ **Confidence:** [HIGH/MEDIUM/LOW]
13
+
14
+ ## Common Mistakes
15
+
16
+ | # | Mistake | Severity | Frequency | Impact |
17
+ |---|---------|----------|-----------|--------|
18
+ | 1 | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how often teams hit this] | [what breaks] |
19
+ | 2 | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how often teams hit this] | [what breaks] |
20
+ | 3 | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how often teams hit this] | [what breaks] |
21
+ | 4 | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how often teams hit this] | [what breaks] |
22
+ | 5 | [what goes wrong] | CRITICAL/HIGH/MEDIUM/LOW | [how often teams hit this] | [what breaks] |
23
+
24
+ ### Mistake Details
25
+
26
+ **1. [Mistake name]**
27
+ - **What happens:** [detailed description of the failure mode]
28
+ - **Why it happens:** [root cause — usually a misunderstanding or shortcut]
29
+ - **Example:** [concrete scenario]
30
+ - **Fix cost:** [how expensive is it to fix after the fact]
31
+
32
+ **2. [Mistake name]**
33
+ - **What happens:** [detailed description]
34
+ - **Why it happens:** [root cause]
35
+ - **Example:** [concrete scenario]
36
+ - **Fix cost:** [cost to fix later]
37
+
38
+ ## Warning Signs
39
+
40
+ Early indicators that a project is heading toward common pitfalls:
41
+
42
+ | Warning Sign | Indicates | Action |
43
+ |-------------|-----------|--------|
44
+ | [observable symptom] | [which mistake is brewing] | [what to do immediately] |
45
+ | [observable symptom] | [which mistake is brewing] | [what to do immediately] |
46
+ | [observable symptom] | [which mistake is brewing] | [what to do immediately] |
47
+
48
+ ## Prevention Strategies
49
+
50
+ Proactive measures to avoid the mistakes above:
51
+
52
+ | Strategy | Prevents | When to Apply | How |
53
+ |----------|----------|---------------|-----|
54
+ | [strategy name] | [mistake #N] | [at what phase/stage] | [concrete implementation steps] |
55
+ | [strategy name] | [mistake #N] | [at what phase/stage] | [concrete implementation steps] |
56
+ | [strategy name] | [mistake #N] | [at what phase/stage] | [concrete implementation steps] |
57
+
58
+ ## Domain-Specific Patterns
59
+
60
+ ### Patterns That Look Right But Aren't
61
+
62
+ | Pattern | Why It Seems Good | Actual Problem | Better Approach |
63
+ |---------|-------------------|----------------|-----------------|
64
+ | [pattern] | [surface appeal] | [hidden issue] | [what to do instead] |
65
+ | [pattern] | [surface appeal] | [hidden issue] | [what to do instead] |
66
+
67
+ ### Patterns That Look Wrong But Work
68
+
69
+ | Pattern | Why It Seems Bad | Why It Actually Works | When to Use |
70
+ |---------|------------------|----------------------|-------------|
71
+ | [pattern] | [surface concern] | [deeper reason] | [specific conditions] |
72
+
73
+ ---
74
+ *Pitfalls research for: [domain]*
75
+ *Researched: [date]*
76
+ ```
77
+
78
+ </template>
79
+
80
+ <guidelines>
81
+
82
+ **Common Mistakes:**
83
+ - Rank by severity — CRITICAL mistakes should be listed first
84
+ - Include fix cost — some mistakes are cheap to fix later, others are architectural
85
+ - Be specific: "not handling auth token refresh" not "bad auth"
86
+
87
+ **Warning Signs:**
88
+ - These are observable symptoms, not the mistakes themselves
89
+ - Help the executor recognize when things are going wrong mid-implementation
90
+ - Each warning sign should map to a specific mistake
91
+
92
+ **Prevention Strategies:**
93
+ - Must be actionable — "be careful" is not a strategy
94
+ - Include when to apply (during planning, during implementation, during testing)
95
+ - Reference specific mistakes they prevent
96
+
97
+ **Domain-Specific Patterns:**
98
+ - "Looks right but isn't" catches cargo-cult patterns
99
+ - "Looks wrong but works" prevents premature optimization of working patterns
100
+ - Both require domain expertise to identify
101
+
102
+ </guidelines>
@@ -0,0 +1,105 @@
1
+ # Stack Research Template
2
+
3
+ Template for `.planning/research/STACK.md` — recommended technologies for the project domain.
4
+
5
+ <template>
6
+
7
+ ```markdown
8
+ # Stack Research
9
+
10
+ **Domain:** [domain type]
11
+ **Researched:** [date]
12
+ **Confidence:** [HIGH/MEDIUM/LOW]
13
+
14
+ ## Recommended Stack
15
+
16
+ ### Core Technologies
17
+
18
+ | Technology | Version | Purpose | Why Recommended |
19
+ |------------|---------|---------|-----------------|
20
+ | [name] | [version] | [what it does] | [why experts use it for this domain] |
21
+ | [name] | [version] | [what it does] | [why experts use it for this domain] |
22
+ | [name] | [version] | [what it does] | [why experts use it for this domain] |
23
+
24
+ ### Supporting Libraries
25
+
26
+ | Library | Version | Purpose | When to Use |
27
+ |---------|---------|---------|-------------|
28
+ | [name] | [version] | [what it does] | [specific use case] |
29
+ | [name] | [version] | [what it does] | [specific use case] |
30
+
31
+ ### Development Tools
32
+
33
+ | Tool | Purpose | Notes |
34
+ |------|---------|-------|
35
+ | [name] | [what it does] | [configuration tips] |
36
+ | [name] | [what it does] | [configuration tips] |
37
+
38
+ ## Alternatives Considered
39
+
40
+ | Recommended | Alternative | When to Use Alternative |
41
+ |-------------|-------------|-------------------------|
42
+ | [our choice] | [other option] | [conditions where alternative is better] |
43
+ | [our choice] | [other option] | [conditions where alternative is better] |
44
+
45
+ ## What NOT to Use
46
+
47
+ | Avoid | Why | Use Instead |
48
+ |-------|-----|-------------|
49
+ | [technology] | [specific problem] | [recommended alternative] |
50
+ | [technology] | [specific problem] | [recommended alternative] |
51
+
52
+ ## Versions
53
+
54
+ ### Version Compatibility
55
+
56
+ | Package A | Compatible With | Notes |
57
+ |-----------|-----------------|-------|
58
+ | [package@version] | [package@version] | [compatibility notes] |
59
+
60
+ ### Installation
61
+
62
+ ```bash
63
+ # Core
64
+ [package manager] install [packages]
65
+
66
+ # Supporting
67
+ [package manager] install [packages]
68
+
69
+ # Dev dependencies
70
+ [package manager] install -D [packages]
71
+ ```
72
+
73
+ ---
74
+ *Stack research for: [domain]*
75
+ *Researched: [date]*
76
+ ```
77
+
78
+ </template>
79
+
80
+ <guidelines>
81
+
82
+ **Core Technologies:**
83
+ - Include specific version numbers — not just "React" but "React 19.x"
84
+ - Explain why this is the standard choice, not just what it does
85
+ - Focus on technologies that affect architecture decisions
86
+
87
+ **Supporting Libraries:**
88
+ - Include libraries commonly needed for this domain
89
+ - Note when each is needed (not all projects need all libraries)
90
+
91
+ **Alternatives:**
92
+ - Don't just dismiss alternatives — explain when they make sense
93
+ - Helps the user make informed decisions if they disagree with recommendations
94
+
95
+ **What NOT to Use:**
96
+ - Actively warn against outdated or problematic choices
97
+ - Explain the specific problem, not just "it's old"
98
+ - Always provide the recommended alternative
99
+
100
+ **Versions:**
101
+ - Note any known compatibility issues between packages
102
+ - Critical for avoiding debugging time later
103
+ - Include installation commands so the planner can reference them
104
+
105
+ </guidelines>
@@ -0,0 +1,111 @@
1
+ # Summary Research Template
2
+
3
+ Template for `.planning/research/SUMMARY.md` — synthesis of all research findings into actionable guidance.
4
+
5
+ <template>
6
+
7
+ ```markdown
8
+ # Research Summary
9
+
10
+ **Domain:** [domain type]
11
+ **Researched:** [date]
12
+ **Confidence:** [HIGH/MEDIUM/LOW]
13
+
14
+ ## Recommended Stack
15
+
16
+ ### Primary Technologies
17
+
18
+ | Technology | Version | Role |
19
+ |------------|---------|------|
20
+ | [name] | [version] | [primary purpose in this project] |
21
+ | [name] | [version] | [primary purpose in this project] |
22
+ | [name] | [version] | [primary purpose in this project] |
23
+
24
+ ### Key Stack Decisions
25
+
26
+ - **[Decision 1]:** [rationale — why this over alternatives]
27
+ - **[Decision 2]:** [rationale]
28
+ - **[Decision 3]:** [rationale]
29
+
30
+ ## Table Stakes Features
31
+
32
+ Features that must be in v1 — users expect these by default:
33
+
34
+ - [ ] [Feature] — [one-line description]
35
+ - [ ] [Feature] — [one-line description]
36
+ - [ ] [Feature] — [one-line description]
37
+ - [ ] [Feature] — [one-line description]
38
+
39
+ ## Key Architecture Decisions
40
+
41
+ ### System Shape
42
+
43
+ [1-2 sentences describing the overall architecture pattern — e.g., "Monolithic Next.js app with server components, Postgres via Prisma ORM, and Stripe for payments."]
44
+
45
+ ### Critical Boundaries
46
+
47
+ | Boundary | What It Separates | Why It Matters |
48
+ |----------|-------------------|----------------|
49
+ | [boundary] | [side A] / [side B] | [architectural significance] |
50
+ | [boundary] | [side A] / [side B] | [architectural significance] |
51
+
52
+ ### Recommended Build Order
53
+
54
+ 1. [Component] — [why first]
55
+ 2. [Component] — [depends on #1]
56
+ 3. [Component] — [depends on #1, #2]
57
+ 4. [Component] — [depends on previous]
58
+
59
+ ## Top Pitfalls
60
+
61
+ The most dangerous mistakes for this domain, ranked by severity:
62
+
63
+ | # | Pitfall | Severity | Prevention |
64
+ |---|---------|----------|------------|
65
+ | 1 | [mistake] | CRITICAL | [one-line prevention strategy] |
66
+ | 2 | [mistake] | HIGH | [one-line prevention strategy] |
67
+ | 3 | [mistake] | HIGH | [one-line prevention strategy] |
68
+ | 4 | [mistake] | MEDIUM | [one-line prevention strategy] |
69
+ | 5 | [mistake] | MEDIUM | [one-line prevention strategy] |
70
+
71
+ ## Primary Recommendation
72
+
73
+ [One paragraph — the single most important takeaway from this research. What should the planner prioritize above all else?]
74
+
75
+ ---
76
+ *Research summary for: [domain]*
77
+ *Researched: [date]*
78
+ *Sources: STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md*
79
+ ```
80
+
81
+ </template>
82
+
83
+ <guidelines>
84
+
85
+ **Purpose:**
86
+ - This file synthesizes the other 4 research files into a single actionable reference
87
+ - The planner reads this file first — it should contain everything needed to start planning
88
+ - Keep it concise: tables and bullet points, not paragraphs
89
+
90
+ **Recommended Stack:**
91
+ - Only include the primary technologies — no supporting libraries
92
+ - Key decisions explain WHY, not just WHAT
93
+
94
+ **Table Stakes Features:**
95
+ - Pull directly from FEATURES.md Table Stakes section
96
+ - These become the v1 must_haves in requirements
97
+
98
+ **Key Architecture Decisions:**
99
+ - System shape in 1-2 sentences — enough for the planner to understand the pattern
100
+ - Build order feeds directly into roadmap phase ordering
101
+
102
+ **Top Pitfalls:**
103
+ - Maximum 5 — the most dangerous ones only
104
+ - Each must have a one-line prevention strategy
105
+ - These become verification checkpoints during execution
106
+
107
+ **Primary Recommendation:**
108
+ - One paragraph, one decision
109
+ - This is what the planner optimizes for
110
+
111
+ </guidelines>
@@ -138,10 +138,22 @@ Proposal: [description]
138
138
  [If PROCEED: key risks to monitor]
139
139
  ```
140
140
 
141
- Present the verdict using the platform's blocking question tool:
142
- - **Proceed as planned** → continue to planning
143
- - **Adjust scope** → describe adjustments, then re-challenge or proceed
144
- - **Rethink** → go back to ideation or discussion
141
+ Present the verdict using a structured question:
142
+
143
+ ```
144
+ AskUserQuestion([
145
+ {
146
+ header: "Challenge Verdict",
147
+ question: "Based on the product and engineering analysis — how do you want to proceed?",
148
+ multiSelect: false,
149
+ options: [
150
+ { label: "Proceed as planned", description: "Continue to planning with identified risks monitored" },
151
+ { label: "Adjust scope", description: "Narrow the scope based on challenge findings, then proceed" },
152
+ { label: "Rethink", description: "Go back to ideation or discussion — too many concerns" }
153
+ ]
154
+ }
155
+ ])
156
+ ```
145
157
 
146
158
  ## Step 5: Record Decision
147
159
 
@@ -35,14 +35,38 @@ description: [description]
35
35
 
36
36
  ## Step 2: Triage
37
37
 
38
- Ask: **"What is the exact symptom?"**
38
+ If no description was provided as an argument, ask: **"What is the exact symptom?"** and wait for response.
39
39
 
40
- If description was provided as an argument, use it as starting context. Then ask follow-up questions one at a time:
40
+ If description was provided, use it as starting context. Then gather triage details using structured questions:
41
41
 
42
- 1. "When does this happen? Always, sometimes, or only under specific conditions?"
43
- 2. "What did you expect to happen?"
44
- 3. "When did it start? Was it working before? What changed?"
45
- 4. "What have you already tried?"
42
+ ```
43
+ AskUserQuestion([
44
+ {
45
+ header: "Frequency",
46
+ question: "When does this happen?",
47
+ multiSelect: false,
48
+ options: [
49
+ { label: "Always", description: "Reproduces every time" },
50
+ { label: "Sometimes", description: "Intermittent, not always reproducible" },
51
+ { label: "Specific conditions", description: "Only under certain circumstances" }
52
+ ]
53
+ },
54
+ {
55
+ header: "Regression",
56
+ question: "When did it start?",
57
+ multiSelect: false,
58
+ options: [
59
+ { label: "Always been broken", description: "Never worked correctly" },
60
+ { label: "Recently broke", description: "Was working before, something changed" },
61
+ { label: "Not sure", description: "Don't know when it started" }
62
+ ]
63
+ }
64
+ ])
65
+ ```
66
+
67
+ Then ask as follow-ups (one at a time):
68
+ - "What did you expect to happen?"
69
+ - "What have you already tried?"
46
70
 
47
71
  After gathering answers, write a triage summary to the session file:
48
72
  ```markdown
@@ -107,7 +107,20 @@ Files: [list]
107
107
  Effort: small | medium | large
108
108
  ```
109
109
 
110
- Ask: "Does this diagnosis look right? Proceed with creating fix plans?"
110
+ ```
111
+ AskUserQuestion([
112
+ {
113
+ header: "Diagnosis Review",
114
+ question: "Does this diagnosis look right?",
115
+ multiSelect: false,
116
+ options: [
117
+ { label: "Proceed", description: "Diagnosis is correct — create fix plans" },
118
+ { label: "Revise", description: "Something is off — let me provide corrections" },
119
+ { label: "Cancel", description: "Stop here — I'll investigate manually" }
120
+ ]
121
+ }
122
+ ])
123
+ ```
111
124
 
112
125
  ## Step 6: Create Fix Plans
113
126
 
@@ -33,7 +33,21 @@ Check if a MILESTONE-CONTEXT.md already exists:
33
33
  node -e "const fs=require('fs'); console.log(fs.existsSync('.planning/MILESTONE-CONTEXT.md') ? 'EXISTS' : 'MISSING')"
34
34
  ```
35
35
 
36
- If exists: ask "A milestone context file already exists from a prior discussion. Update it or start fresh?"
36
+ If exists:
37
+
38
+ ```
39
+ AskUserQuestion([
40
+ {
41
+ header: "Existing Context",
42
+ question: "A milestone context file already exists from a prior discussion.",
43
+ multiSelect: false,
44
+ options: [
45
+ { label: "Update it", description: "Add to or revise existing milestone context" },
46
+ { label: "Start fresh", description: "Discard prior context and start over" }
47
+ ]
48
+ }
49
+ ])
50
+ ```
37
51
 
38
52
  ## Step 2: Discuss Goals
39
53
 
@@ -56,13 +56,40 @@ Note any decisions that constrain or inform this phase's approach. Surface them
56
56
  ls .planning/phases/*-CONTEXT.md 2>/dev/null
57
57
  ```
58
58
 
59
- If CONTEXT.md already exists for this phase:
60
- - Offer: **Update it** / **View it** / **Skip** (use as-is)
61
- - If "Skip" → exit workflow
59
+ If CONTEXT.md already exists for this phase, present the choice:
60
+
61
+ ```
62
+ AskUserQuestion([
63
+ {
64
+ header: "Existing Context",
65
+ question: "CONTEXT.md already exists for this phase. What do you want to do?",
66
+ multiSelect: false,
67
+ options: [
68
+ { label: "Update it", description: "Add to or revise existing decisions" },
69
+ { label: "View it", description: "Show current context, then decide" },
70
+ { label: "Skip", description: "Use existing context as-is" }
71
+ ]
72
+ }
73
+ ])
74
+ ```
75
+
76
+ If "Skip" → exit workflow.
62
77
 
63
78
  If no CONTEXT.md exists but plans already exist for this phase:
64
- - Warn: "Phase [X] already has plans created without user context. Your decisions here won't affect existing plans unless you re-run plan-phase."
65
- - Ask: **Continue and replan after** / **Cancel**
79
+
80
+ ```
81
+ AskUserQuestion([
82
+ {
83
+ header: "Plans Already Exist",
84
+ question: "Phase [X] already has plans created without user context. Your decisions here won't affect existing plans unless you re-run plan-phase.",
85
+ multiSelect: false,
86
+ options: [
87
+ { label: "Continue and replan after", description: "Capture decisions now, re-run plan-phase later" },
88
+ { label: "Cancel", description: "Keep existing plans unchanged" }
89
+ ]
90
+ }
91
+ ])
92
+ ```
66
93
 
67
94
  ## Step 3: Scout Codebase
68
95
 
@@ -119,20 +146,66 @@ Carrying forward from earlier phases:
119
146
  - [Decision from Phase N]
120
147
  ```
121
148
 
122
- Present 3-4 gray areas for selection (multi-select). Annotate with:
123
- - Prior decision context: "You chose X in Phase 5"
124
- - Code context: "You already have a Card component with shadow/rounded variants"
149
+ Present gray areas using a structured multi-select question. Annotate with prior decisions and code context:
150
+
151
+ ```
152
+ AskUserQuestion([
153
+ {
154
+ header: "Gray Areas",
155
+ question: "Which areas do you want to discuss? (select all that apply)",
156
+ multiSelect: true,
157
+ options: [
158
+ { label: "[Area 1]", description: "[Prior context or code context annotation]" },
159
+ { label: "[Area 2]", description: "[Prior context or code context annotation]" },
160
+ { label: "[Area 3]", description: "[Prior context or code context annotation]" },
161
+ { label: "All clear — skip discussion", description: "No gray areas need clarification" }
162
+ ]
163
+ }
164
+ ])
165
+ ```
166
+
167
+ If "All clear" → skip to Step 6.
125
168
 
126
169
  **For each selected area, discuss:**
127
170
 
128
171
  1. Announce: "Let's talk about [Area]."
129
- 2. Ask 4 focused questions with concrete options (not abstract). Include the recommended choice. Annotate options with existing code where relevant.
172
+ 2. Ask focused questions with concrete options using structured questions where possible:
173
+
174
+ ```
175
+ AskUserQuestion([
176
+ {
177
+ header: "[Area]: [Decision Point]",
178
+ question: "[Specific implementation question]",
179
+ multiSelect: false,
180
+ options: [
181
+ { label: "[Option A] (Recommended)", description: "[Why, with code context if relevant]" },
182
+ { label: "[Option B]", description: "[Why]" },
183
+ { label: "[Option C]", description: "[Why]" }
184
+ ]
185
+ }
186
+ ])
187
+ ```
188
+
130
189
  3. After 4 questions, ask: "More questions about [area], or move to next?"
131
190
  4. If more → ask 4 more, then check again
132
191
 
133
192
  After all selected areas:
134
193
  - Summarize decisions captured
135
- - Ask: "Which gray areas remain unclear?" → "Explore more" or "I'm ready for context"
194
+ - Present final check:
195
+
196
+ ```
197
+ AskUserQuestion([
198
+ {
199
+ header: "Wrap Up",
200
+ question: "All gray areas discussed. Ready to generate CONTEXT.md?",
201
+ multiSelect: false,
202
+ options: [
203
+ { label: "Ready", description: "Generate CONTEXT.md with captured decisions" },
204
+ { label: "Explore more", description: "Discuss additional areas before writing context" }
205
+ ]
206
+ }
207
+ ])
208
+ ```
136
209
 
137
210
  <scope_guardrail>
138
211
  **No scope creep.** The phase boundary comes from ROADMAP.md and is FIXED. Discussion clarifies HOW to implement what's scoped, never WHETHER to add new capabilities.