learnship 2.1.2 → 2.2.1
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/.claude-plugin/plugin.json +1 -1
- package/.cursor-plugin/plugin.json +1 -1
- package/README.md +172 -155
- package/SKILL.md +23 -2
- package/bin/install.js +316 -3
- package/commands/learnship/diagnose-issues.md +1 -0
- package/commands/learnship/discuss-phase.md +1 -0
- package/commands/learnship/ideate.md +3 -0
- package/commands/learnship/list-phase-assumptions.md +1 -0
- package/commands/learnship/new-project.md +2 -0
- package/commands/learnship/plan-phase.md +2 -0
- package/commands/learnship/quick.md +1 -0
- package/commands/learnship/research-phase.md +3 -0
- package/commands/learnship/secure-phase.md +1 -0
- package/commands/learnship/validate-phase.md +2 -0
- package/commands/learnship/verify-work.md +1 -0
- package/cursor-rules/learnship.mdc +14 -4
- package/gemini-extension.json +1 -1
- package/hooks/learnship-context-monitor.js +120 -0
- package/hooks/learnship-prompt-guard.js +75 -0
- package/hooks/learnship-session-state.js +136 -0
- package/hooks/learnship-statusline.js +179 -0
- package/learnship/agents/researcher.md +43 -2
- package/learnship/contexts/dev.md +21 -0
- package/learnship/contexts/research.md +22 -0
- package/learnship/contexts/review.md +22 -0
- package/learnship/templates/research-project/ARCHITECTURE.md +140 -0
- package/learnship/templates/research-project/FEATURES.md +130 -0
- package/learnship/templates/research-project/PITFALLS.md +102 -0
- package/learnship/templates/research-project/STACK.md +105 -0
- package/learnship/templates/research-project/SUMMARY.md +111 -0
- package/learnship/workflows/challenge.md +16 -4
- package/learnship/workflows/debug.md +30 -6
- package/learnship/workflows/diagnose-issues.md +14 -1
- package/learnship/workflows/discuss-milestone.md +15 -1
- package/learnship/workflows/discuss-phase.md +83 -10
- package/learnship/workflows/ideate.md +25 -5
- package/learnship/workflows/list-phase-assumptions.md +12 -5
- package/learnship/workflows/new-milestone.md +12 -6
- package/learnship/workflows/new-project.md +232 -75
- package/learnship/workflows/plan-phase.md +17 -3
- package/learnship/workflows/quick.md +18 -4
- package/learnship/workflows/research-phase.md +62 -9
- package/learnship/workflows/secure-phase.md +57 -15
- package/learnship/workflows/settings.md +142 -142
- package/learnship/workflows/validate-phase.md +39 -12
- package/learnship/workflows/verify-work.md +27 -0
- package/package.json +1 -1
- package/templates/config.json +1 -0
|
@@ -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:
|
|
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
|
-
|
|
61
|
-
|
|
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
|
-
|
|
65
|
-
|
|
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
|
|
123
|
-
|
|
124
|
-
|
|
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
|
|
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
|
-
-
|
|
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.
|
|
@@ -74,14 +74,34 @@ a problem you're trying to solve, or something you're not sure about yet.
|
|
|
74
74
|
**Mid-conversation research offer (after 2-3 exchanges):**
|
|
75
75
|
|
|
76
76
|
If the conversation surfaces factual questions, technology comparisons, or unknowns:
|
|
77
|
-
```
|
|
78
|
-
This touches on [specific question]. Want me to do a quick research pass before we continue?
|
|
79
|
-
This would take ~30 seconds and might surface useful context.
|
|
80
77
|
|
|
81
|
-
|
|
78
|
+
```
|
|
79
|
+
AskUserQuestion([
|
|
80
|
+
{
|
|
81
|
+
header: "Research Opportunity",
|
|
82
|
+
question: "This touches on [specific question]. Want me to do a quick research pass before we continue?",
|
|
83
|
+
multiSelect: false,
|
|
84
|
+
options: [
|
|
85
|
+
{ label: "Yes, research this", description: "~30 seconds — may surface useful context" },
|
|
86
|
+
{ label: "No, keep exploring", description: "Continue the conversation without research" }
|
|
87
|
+
]
|
|
88
|
+
}
|
|
89
|
+
])
|
|
82
90
|
```
|
|
83
91
|
|
|
84
|
-
If yes
|
|
92
|
+
If yes: read `parallelization` from `.planning/config.json`. If `parallelization.enabled` is true, spawn a researcher agent:
|
|
93
|
+
```
|
|
94
|
+
Task(
|
|
95
|
+
subagent_type="learnship-researcher",
|
|
96
|
+
prompt="
|
|
97
|
+
<objective>
|
|
98
|
+
Quick research pass on: [specific question].
|
|
99
|
+
Search web, scan codebase for relevant patterns, and return a concise summary of findings.
|
|
100
|
+
</objective>
|
|
101
|
+
"
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
If parallelization is false, use `@./agents/researcher.md` as inline persona for a quick research pass. Share findings and continue.
|
|
85
105
|
|
|
86
106
|
**Crystallize outputs (after 3-6 exchanges):**
|
|
87
107
|
|
|
@@ -105,11 +105,18 @@ Assumptions validated. Ready to plan.
|
|
|
105
105
|
## Step 5: Offer Next Steps
|
|
106
106
|
|
|
107
107
|
```
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
108
|
+
AskUserQuestion([
|
|
109
|
+
{
|
|
110
|
+
header: "Next Step",
|
|
111
|
+
question: "What would you like to do with these assumptions?",
|
|
112
|
+
multiSelect: false,
|
|
113
|
+
options: [
|
|
114
|
+
{ label: "Discuss Phase", description: "Run discuss-phase [N] — you answer my questions to build CONTEXT.md" },
|
|
115
|
+
{ label: "Plan Now", description: "Run plan-phase [N] — create plans now (assumptions noted above apply)" },
|
|
116
|
+
{ label: "Re-examine", description: "Analyze again with your corrections" }
|
|
117
|
+
]
|
|
118
|
+
}
|
|
119
|
+
])
|
|
113
120
|
```
|
|
114
121
|
|
|
115
122
|
Note: Any corrections discussed here are not automatically captured. Run `discuss-phase [N]` to write them to a CONTEXT.md that planners will read.
|
|
@@ -32,14 +32,20 @@ Pending todos carried forward:
|
|
|
32
32
|
Ask openly: **"What do you want to build in this milestone?"**
|
|
33
33
|
|
|
34
34
|
If a milestone scope was already discussed (look for `.planning/MILESTONE-CONTEXT.md`), load it and confirm:
|
|
35
|
-
```
|
|
36
|
-
I found a milestone context file from a prior discussion:
|
|
37
|
-
[summary of scope]
|
|
38
35
|
|
|
39
|
-
Use this as the starting point?
|
|
40
36
|
```
|
|
41
|
-
|
|
42
|
-
|
|
37
|
+
AskUserQuestion([
|
|
38
|
+
{
|
|
39
|
+
header: "Prior Context Found",
|
|
40
|
+
question: "I found a milestone context file from a prior discussion. Use it as the starting point?",
|
|
41
|
+
multiSelect: false,
|
|
42
|
+
options: [
|
|
43
|
+
{ label: "Yes", description: "Proceed with the scope from the prior discussion" },
|
|
44
|
+
{ label: "Start fresh", description: "Discard prior context and ask from scratch" }
|
|
45
|
+
]
|
|
46
|
+
}
|
|
47
|
+
])
|
|
48
|
+
```
|
|
43
49
|
|
|
44
50
|
Follow the thread. When you have enough to write clear goals, ask for confirmation before continuing.
|
|
45
51
|
|
|
@@ -6,6 +6,8 @@ description: Initialize a new project — questioning → research → requireme
|
|
|
6
6
|
|
|
7
7
|
Initialize a new project with full context gathering, optional research, requirements scoping, and roadmap creation. This is the most leveraged moment in any project — deep questioning now means better plans, better execution, better outcomes.
|
|
8
8
|
|
|
9
|
+
> **Platform note:** When this workflow shows structured question blocks, use your platform's interactive question tool to present them (the tool that lets users pick from predefined options). If no such tool is available, present each question as a numbered text list with descriptions and ask the user to reply with their choice number or label.
|
|
10
|
+
|
|
9
11
|
> **This workflow has 9 mandatory steps. You must complete every step in order. Do not skip, defer, or abbreviate any step. Check each one off as you complete it:**
|
|
10
12
|
>
|
|
11
13
|
> - [ ] Step 1 — Setup & codebase check
|
|
@@ -80,70 +82,151 @@ Note the tech stack, key directories, and any README content internally. Use thi
|
|
|
80
82
|
|
|
81
83
|
## Step 2: Configuration
|
|
82
84
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
**Group A — Working style:**
|
|
86
|
-
|
|
87
|
-
Ask: "How do you want to work?"
|
|
88
|
-
- **YOLO** (recommended) — Auto-approve steps, just execute
|
|
89
|
-
- **Interactive** — Confirm at each step
|
|
90
|
-
|
|
91
|
-
Ask: "How finely should scope be sliced into phases?"
|
|
92
|
-
- **Coarse** (recommended) — Fewer, broader phases (3-5 phases, 1-3 plans each)
|
|
93
|
-
- **Standard** — Balanced phase size (5-8 phases, 3-5 plans each)
|
|
94
|
-
- **Fine** — Many focused phases (8-12 phases, 5-10 plans each)
|
|
95
|
-
|
|
96
|
-
**Group B — Learning mode:**
|
|
97
|
-
|
|
98
|
-
Ask: "How should the learning partner (agentic-learning) work during this project?"
|
|
99
|
-
- **Auto** (recommended) — I'll offer relevant learning actions at natural checkpoints (after planning, after execution, etc.)
|
|
100
|
-
- **Manual** — I'll only activate when you explicitly invoke `@agentic-learning`
|
|
101
|
-
|
|
102
|
-
**Group C — Model profile:**
|
|
103
|
-
|
|
104
|
-
Ask: "Which model quality tier do you want?"
|
|
105
|
-
- **Quality** — Large-tier models for all decision-making agents (highest cost, best results)
|
|
106
|
-
- **Balanced** (recommended) — Large for planning, medium for execution
|
|
107
|
-
- **Budget** — Medium for code, small for research/verification (lowest cost)
|
|
85
|
+
Present configuration questions using structured question rounds. Use your platform's interactive question tool, or numbered text lists if unavailable.
|
|
108
86
|
|
|
109
|
-
**
|
|
87
|
+
**Round 1 — Core settings (4 questions):**
|
|
110
88
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
89
|
+
```
|
|
90
|
+
AskUserQuestion([
|
|
91
|
+
{
|
|
92
|
+
header: "Working Style",
|
|
93
|
+
question: "How do you want to work?",
|
|
94
|
+
multiSelect: false,
|
|
95
|
+
options: [
|
|
96
|
+
{ label: "YOLO (Recommended)", description: "Auto-approve steps, just execute" },
|
|
97
|
+
{ label: "Interactive", description: "Confirm at each step" }
|
|
98
|
+
]
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
header: "Granularity",
|
|
102
|
+
question: "How finely should scope be sliced into phases?",
|
|
103
|
+
multiSelect: false,
|
|
104
|
+
options: [
|
|
105
|
+
{ label: "Coarse (Recommended)", description: "Fewer, broader phases (3-5 phases, 1-3 plans each)" },
|
|
106
|
+
{ label: "Standard", description: "Balanced phase size (5-8 phases, 3-5 plans each)" },
|
|
107
|
+
{ label: "Fine", description: "Many focused phases (8-12 phases, 5-10 plans each)" }
|
|
108
|
+
]
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
header: "Learning Partner",
|
|
112
|
+
question: "How should agentic-learning work during this project?",
|
|
113
|
+
multiSelect: false,
|
|
114
|
+
options: [
|
|
115
|
+
{ label: "Auto (Recommended)", description: "Offer learning actions at natural checkpoints (after planning, execution, etc.)" },
|
|
116
|
+
{ label: "Manual", description: "Only activate when you explicitly invoke @agentic-learning" }
|
|
117
|
+
]
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
header: "AI Models",
|
|
121
|
+
question: "Which model quality tier for planning agents?",
|
|
122
|
+
multiSelect: false,
|
|
123
|
+
options: [
|
|
124
|
+
{ label: "Balanced (Recommended)", description: "Large for planning, medium for execution — good quality/cost ratio" },
|
|
125
|
+
{ label: "Quality", description: "Large-tier models for all agents (highest cost, best results)" },
|
|
126
|
+
{ label: "Budget", description: "Medium for code, small for research/verification (lowest cost)" }
|
|
127
|
+
]
|
|
128
|
+
}
|
|
129
|
+
])
|
|
130
|
+
```
|
|
123
131
|
|
|
124
|
-
|
|
125
|
-
- **No** (recommended) — Run `/review` manually when ready
|
|
126
|
-
- **Yes** — Automatically start review after verification succeeds
|
|
132
|
+
**Round 2 — Workflow agents (5 questions):**
|
|
127
133
|
|
|
128
|
-
|
|
134
|
+
```
|
|
135
|
+
AskUserQuestion([
|
|
136
|
+
{
|
|
137
|
+
header: "Research",
|
|
138
|
+
question: "Research domain before planning each phase? (adds tokens/time)",
|
|
139
|
+
multiSelect: false,
|
|
140
|
+
options: [
|
|
141
|
+
{ label: "Yes (Recommended)", description: "Investigate domain, find patterns, surface gotchas" },
|
|
142
|
+
{ label: "No", description: "Plan directly from requirements" }
|
|
143
|
+
]
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
header: "Plan Check",
|
|
147
|
+
question: "Verify plans will achieve their goals? (adds tokens/time)",
|
|
148
|
+
multiSelect: false,
|
|
149
|
+
options: [
|
|
150
|
+
{ label: "Yes (Recommended)", description: "Catch gaps before execution starts" },
|
|
151
|
+
{ label: "No", description: "Execute plans without verification" }
|
|
152
|
+
]
|
|
153
|
+
},
|
|
154
|
+
{
|
|
155
|
+
header: "Verifier",
|
|
156
|
+
question: "Verify work satisfies requirements after each phase? (adds tokens/time)",
|
|
157
|
+
multiSelect: false,
|
|
158
|
+
options: [
|
|
159
|
+
{ label: "Yes (Recommended)", description: "Confirm deliverables match phase goals" },
|
|
160
|
+
{ label: "No", description: "Trust execution, skip verification" }
|
|
161
|
+
]
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
header: "Review",
|
|
165
|
+
question: "Multi-persona code review after verification?",
|
|
166
|
+
multiSelect: false,
|
|
167
|
+
options: [
|
|
168
|
+
{ label: "Yes (Recommended)", description: "Correctness, security, performance, maintainability review" },
|
|
169
|
+
{ label: "No", description: "Skip code review" }
|
|
170
|
+
]
|
|
171
|
+
},
|
|
172
|
+
{
|
|
173
|
+
header: "Solutions Search",
|
|
174
|
+
question: "Search prior solutions for reusable patterns during planning?",
|
|
175
|
+
multiSelect: false,
|
|
176
|
+
options: [
|
|
177
|
+
{ label: "Yes (Recommended)", description: "Check .planning/solutions/ for relevant past fixes" },
|
|
178
|
+
{ label: "No", description: "Plan without searching prior solutions" }
|
|
179
|
+
]
|
|
180
|
+
}
|
|
181
|
+
])
|
|
182
|
+
```
|
|
129
183
|
|
|
130
|
-
|
|
131
|
-
- **Auto-test before shipping** (recommended: yes) — Run tests before every ship
|
|
132
|
-
- **Conventional commits** (recommended: yes) — Use `feat:`, `fix:`, `docs:` commit prefixes
|
|
133
|
-
- **Auto-generate PR description** (recommended: yes) — Create PR body from commit messages
|
|
184
|
+
**Round 3 — Pipeline & git (4 questions):**
|
|
134
185
|
|
|
135
|
-
|
|
186
|
+
```
|
|
187
|
+
AskUserQuestion([
|
|
188
|
+
{
|
|
189
|
+
header: "TDD",
|
|
190
|
+
question: "Test-first (TDD) mode?",
|
|
191
|
+
multiSelect: false,
|
|
192
|
+
options: [
|
|
193
|
+
{ label: "No (Recommended)", description: "Write tests alongside implementation" },
|
|
194
|
+
{ label: "Yes", description: "Red-green-refactor: write failing test first, implement, verify green" }
|
|
195
|
+
]
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
header: "Ship Pipeline",
|
|
199
|
+
question: "Ship pipeline preferences?",
|
|
200
|
+
multiSelect: true,
|
|
201
|
+
options: [
|
|
202
|
+
{ label: "Auto-test before shipping (Recommended)", description: "Run tests before every ship" },
|
|
203
|
+
{ label: "Conventional commits (Recommended)", description: "Use feat:, fix:, docs: commit prefixes" },
|
|
204
|
+
{ label: "Auto-generate PR description (Recommended)", description: "Create PR body from commit messages" }
|
|
205
|
+
]
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
header: "Git Tracking",
|
|
209
|
+
question: "Commit planning docs to git?",
|
|
210
|
+
multiSelect: false,
|
|
211
|
+
options: [
|
|
212
|
+
{ label: "Yes (Recommended)", description: "Planning docs tracked in version control" },
|
|
213
|
+
{ label: "No", description: "Keep .planning/ local-only (add to .gitignore)" }
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
header: "Commit Mode",
|
|
218
|
+
question: "When should learnship commit files to git?",
|
|
219
|
+
multiSelect: false,
|
|
220
|
+
options: [
|
|
221
|
+
{ label: "Automatically (Recommended)", description: "Commit after each workflow step completes" },
|
|
222
|
+
{ label: "Manually", description: "You commit when ready; skip all git commit steps" }
|
|
223
|
+
]
|
|
224
|
+
}
|
|
225
|
+
])
|
|
226
|
+
```
|
|
136
227
|
|
|
137
228
|
<!-- LEARNSHIP_PARALLEL_BLOCK -->
|
|
138
229
|
|
|
139
|
-
Ask: "Commit planning docs to git?"
|
|
140
|
-
- **Yes** (recommended) — Planning docs tracked in version control
|
|
141
|
-
- **No** — Keep `.planning/` local-only
|
|
142
|
-
|
|
143
|
-
Ask: "When should learnship commit files to git?"
|
|
144
|
-
- **Automatically** (recommended) — Commit after each workflow step completes (config, requirements, roadmap, AGENTS.md)
|
|
145
|
-
- **Manually** — I'll commit when I say so; skip all git commit steps
|
|
146
|
-
|
|
147
230
|
Create `.planning/config.json` with all settings:
|
|
148
231
|
|
|
149
232
|
```json
|
|
@@ -311,24 +394,26 @@ git add .planning/PROJECT.md && git commit -m "docs: initialize project"
|
|
|
311
394
|
|
|
312
395
|
> **🔴 MANDATORY USER CHOICE — You must ask this question and wait for a reply. You are NOT allowed to decide this yourself.**
|
|
313
396
|
|
|
314
|
-
Display
|
|
397
|
+
Display the research decision banner, then present the choice using a structured question:
|
|
315
398
|
|
|
316
399
|
```
|
|
317
400
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
318
401
|
learnship ► RESEARCH DECISION
|
|
319
402
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
403
|
+
```
|
|
320
404
|
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
405
|
+
```
|
|
406
|
+
AskUserQuestion([
|
|
407
|
+
{
|
|
408
|
+
header: "Research",
|
|
409
|
+
question: "Before I write the requirements — do you want me to research the domain ecosystem first?",
|
|
410
|
+
multiSelect: false,
|
|
411
|
+
options: [
|
|
412
|
+
{ label: "Research first (Recommended)", description: "Discover standard stacks, expected features, architecture patterns, common pitfalls — writes 5 research files" },
|
|
413
|
+
{ label: "Skip research", description: "Go straight to requirements" }
|
|
414
|
+
]
|
|
415
|
+
}
|
|
416
|
+
])
|
|
332
417
|
```
|
|
333
418
|
|
|
334
419
|
> � **HARD GATE — This is a user decision. You MUST wait for the user to reply.**
|
|
@@ -359,16 +444,17 @@ Reply 1 or 2.
|
|
|
359
444
|
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
360
445
|
```
|
|
361
446
|
|
|
362
|
-
> 🔴 **CRITICAL — "Research" in this step means
|
|
447
|
+
> 🔴 **CRITICAL — "Research" in this step means TWO things: (1) SEARCHING THE WEB for current information, then (2) WRITING 5 FILES to disk based on what you found. The deliverable is 5 markdown files grounded in real online research, not training data. You are not done with research until all 5 files exist and pass verification.**
|
|
363
448
|
>
|
|
364
449
|
> **Forbidden behaviors (if you do any of these, the research step has FAILED):**
|
|
450
|
+
> - **Writing files without doing web research first** — reading templates and writing from training data is NOT research. You must run WebSearch queries and WebFetch official docs BEFORE writing any file.
|
|
365
451
|
> - Doing web searches or thinking about the domain and then saying "I have enough research data" WITHOUT writing the 5 files
|
|
366
452
|
> - Writing research findings only in your response text instead of to files
|
|
367
453
|
> - Writing fewer than 5 files (e.g., one combined file)
|
|
368
454
|
> - Moving to Step 6 or writing REQUIREMENTS.md before the verification command below prints `RESEARCH VERIFIED OK`
|
|
369
455
|
> - Saying "Let me proceed to requirements" or "Moving to requirements" before verification passes
|
|
370
456
|
>
|
|
371
|
-
> **The ONLY acceptable sequence is:** mkdir → write file 1 → write file 2 → write file 3 → write file 4 → write file 5 → run verification → see `RESEARCH VERIFIED OK` → present findings → get user confirmation.
|
|
457
|
+
> **The ONLY acceptable sequence is:** mkdir → **web research (WebSearch + WebFetch)** → write file 1 → write file 2 → write file 3 → write file 4 → write file 5 → run verification → see `RESEARCH VERIFIED OK` → present findings → get user confirmation.
|
|
372
458
|
|
|
373
459
|
**Step 5a — Create the research directory.** Run this command now:
|
|
374
460
|
|
|
@@ -378,10 +464,81 @@ node -e "require('fs').mkdirSync('.planning/research',{recursive:true})"
|
|
|
378
464
|
|
|
379
465
|
> 🛑 Did the mkdir command run? If not, run it now before continuing.
|
|
380
466
|
|
|
381
|
-
|
|
467
|
+
Read `parallelization` from `.planning/config.json` (defaults to `false`).
|
|
468
|
+
|
|
469
|
+
**If `parallelization.enabled` is `true` (subagent mode — Claude Code, OpenCode, Codex):**
|
|
470
|
+
|
|
471
|
+
Spawn a dedicated researcher agent with the project context:
|
|
472
|
+
```
|
|
473
|
+
Task(
|
|
474
|
+
subagent_type="learnship-researcher",
|
|
475
|
+
prompt="
|
|
476
|
+
<objective>
|
|
477
|
+
Research the domain ecosystem for a new project, then write 5 research files into .planning/research/.
|
|
478
|
+
|
|
479
|
+
IMPORTANT: You MUST do online research BEFORE writing any files. Your training data is stale — verify everything.
|
|
480
|
+
|
|
481
|
+
Phase 1 — INVESTIGATE (do this first):
|
|
482
|
+
1. Read .planning/PROJECT.md to understand the project domain and goals
|
|
483
|
+
2. Run at least 5 WebSearch queries to discover: standard tech stacks, recommended libraries, architecture patterns, common pitfalls, and best practices for this domain. Include the current year in queries.
|
|
484
|
+
3. Use WebFetch to read official documentation for any key libraries or frameworks discovered
|
|
485
|
+
4. Read the research persona at @./agents/researcher.md for research principles
|
|
486
|
+
|
|
487
|
+
Phase 2 — WRITE FILES (only after investigating):
|
|
488
|
+
Read each template from @./templates/research-project/ for the expected structure, then write each file based on your actual research findings (not just training data). Include confidence levels (HIGH/MEDIUM/LOW) and cite sources.
|
|
489
|
+
|
|
490
|
+
Files to write:
|
|
491
|
+
1. STACK.md — Must have: ## Recommended Stack, ## Alternatives Considered, ## What NOT to Use, ## Versions
|
|
492
|
+
2. FEATURES.md — Must have: ## Table Stakes, ## Differentiators, ## Anti-Features
|
|
493
|
+
3. ARCHITECTURE.md — Must have: ## Component Boundaries, ## Data Flow, ## Build Order, ## Integration Points
|
|
494
|
+
4. PITFALLS.md — Must have: ## Common Mistakes, ## Warning Signs, ## Prevention Strategies
|
|
495
|
+
5. SUMMARY.md — Must have: ## Recommended Stack, ## Table Stakes Features, ## Key Architecture Decisions, ## Top Pitfalls
|
|
496
|
+
|
|
497
|
+
After writing all 5 files, run the verification command to confirm all files exist with required sections.
|
|
498
|
+
Return: confirmation that all 5 files pass verification, plus a summary of what you found.
|
|
499
|
+
</objective>
|
|
500
|
+
|
|
501
|
+
<files_to_read>
|
|
502
|
+
- .planning/PROJECT.md (project description and goals)
|
|
503
|
+
- @./agents/researcher.md (research persona — read for research principles and tool strategy)
|
|
504
|
+
- @./templates/research-project/STACK.md (template for STACK.md)
|
|
505
|
+
- @./templates/research-project/FEATURES.md (template for FEATURES.md)
|
|
506
|
+
- @./templates/research-project/ARCHITECTURE.md (template for ARCHITECTURE.md)
|
|
507
|
+
- @./templates/research-project/PITFALLS.md (template for PITFALLS.md)
|
|
508
|
+
- @./templates/research-project/SUMMARY.md (template for SUMMARY.md)
|
|
509
|
+
</files_to_read>
|
|
510
|
+
"
|
|
511
|
+
)
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Wait for the agent to complete, then proceed to Step 5c (verification) to confirm files were written correctly.
|
|
515
|
+
|
|
516
|
+
**If `parallelization.enabled` is `false` (sequential mode):**
|
|
517
|
+
|
|
518
|
+
Using `@./agents/researcher.md` as your research persona:
|
|
519
|
+
|
|
520
|
+
**Step 5b-pre — Online research (BEFORE writing any files).**
|
|
521
|
+
|
|
522
|
+
> 🔴 **You MUST do web research before writing files.** Your training data is stale. Do not write research files from memory alone — investigate first, write second.
|
|
523
|
+
|
|
524
|
+
Run at least 5 WebSearch queries to discover the current state of this project's domain. Include the current year in all queries. Example queries (adapt to the actual project domain):
|
|
525
|
+
|
|
526
|
+
1. `"[project domain] recommended tech stack 2026"` — discover what's standard
|
|
527
|
+
2. `"[project domain] best libraries 2026"` — find specific tools
|
|
528
|
+
3. `"[project domain] architecture patterns"` — how systems in this domain are structured
|
|
529
|
+
4. `"[project domain] common mistakes gotchas"` — what goes wrong
|
|
530
|
+
5. `"[key technology from PROJECT.md] best practices"` — specific tech guidance
|
|
531
|
+
|
|
532
|
+
For any libraries or frameworks discovered, use WebFetch to read their official documentation pages.
|
|
533
|
+
|
|
534
|
+
Record your findings internally. You will use them to write the 5 files below. Every recommendation in the files should be grounded in what you found online — include confidence levels (HIGH/MEDIUM/LOW) and cite sources where possible.
|
|
535
|
+
|
|
536
|
+
> 🛑 STOP. Confirm: did you run at least 5 WebSearch queries? If you skipped straight to writing files, go back and search now. Files written purely from training data without web verification are low-quality research.
|
|
537
|
+
|
|
538
|
+
**Step 5b — Write all 5 files.** Create each file one at a time using your file write tool. Each file is a separate write operation. Do NOT combine files. Do NOT skip files. **Before writing each file, read the corresponding template** from `@./templates/research-project/` to understand the expected structure. Base your content on the web research findings from Step 5b-pre.
|
|
382
539
|
|
|
383
540
|
**File 1 of 5 — Write `.planning/research/STACK.md` to disk now.**
|
|
384
|
-
|
|
541
|
+
First, read the template at `@./templates/research-project/STACK.md` for the expected structure. Then write the stack research based on your web search findings. Include confidence levels and cite sources. The file MUST contain these exact `##` headers:
|
|
385
542
|
- `## Recommended Stack`
|
|
386
543
|
- `## Alternatives Considered`
|
|
387
544
|
- `## What NOT to Use` (with reasons)
|
|
@@ -390,26 +547,26 @@ Research the standard tech stack for this domain and write the results to this f
|
|
|
390
547
|
> 🛑 STOP. Confirm: did you write `.planning/research/STACK.md` to the filesystem? If you only thought about the stack but did not create the file, go back and create it now.
|
|
391
548
|
|
|
392
549
|
**File 2 of 5 — Write `.planning/research/FEATURES.md` to disk now.**
|
|
393
|
-
|
|
550
|
+
First, read the template at `@./templates/research-project/FEATURES.md` for the expected structure. Then write the features research based on your web search findings. The file MUST contain these exact `##` headers:
|
|
394
551
|
- `## Table Stakes` (must-haves)
|
|
395
552
|
- `## Differentiators` (nice-to-haves)
|
|
396
553
|
- `## Anti-Features` (what to avoid)
|
|
397
554
|
|
|
398
555
|
**File 3 of 5 — Write `.planning/research/ARCHITECTURE.md` to disk now.**
|
|
399
|
-
|
|
556
|
+
First, read the template at `@./templates/research-project/ARCHITECTURE.md` for the expected structure. Then write the architecture research based on your web search findings. The file MUST contain these exact `##` headers:
|
|
400
557
|
- `## Component Boundaries`
|
|
401
558
|
- `## Data Flow`
|
|
402
559
|
- `## Build Order` (suggested sequence)
|
|
403
560
|
- `## Integration Points`
|
|
404
561
|
|
|
405
562
|
**File 4 of 5 — Write `.planning/research/PITFALLS.md` to disk now.**
|
|
406
|
-
|
|
563
|
+
First, read the template at `@./templates/research-project/PITFALLS.md` for the expected structure. Then write the pitfalls research based on your web search findings. The file MUST contain these exact `##` headers:
|
|
407
564
|
- `## Common Mistakes`
|
|
408
565
|
- `## Warning Signs`
|
|
409
566
|
- `## Prevention Strategies`
|
|
410
567
|
|
|
411
568
|
**File 5 of 5 — Write `.planning/research/SUMMARY.md` to disk now.**
|
|
412
|
-
|
|
569
|
+
First, read the template at `@./templates/research-project/SUMMARY.md` for the expected structure. Then synthesize the 4 files above into a summary. The file MUST contain these exact `##` headers:
|
|
413
570
|
- `## Recommended Stack`
|
|
414
571
|
- `## Table Stakes Features`
|
|
415
572
|
- `## Key Architecture Decisions`
|