learnship 1.9.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 (171) hide show
  1. package/.claude-plugin/plugin.json +26 -0
  2. package/.cursor-plugin/plugin.json +26 -0
  3. package/LICENSE +21 -0
  4. package/README.md +791 -0
  5. package/SKILL.md +86 -0
  6. package/agents/debugger.md +102 -0
  7. package/agents/executor.md +115 -0
  8. package/agents/learnship-debugger.md +146 -0
  9. package/agents/learnship-executor.md +155 -0
  10. package/agents/learnship-phase-researcher.md +128 -0
  11. package/agents/learnship-plan-checker.md +119 -0
  12. package/agents/learnship-planner.md +146 -0
  13. package/agents/learnship-verifier.md +157 -0
  14. package/agents/planner.md +109 -0
  15. package/agents/researcher.md +80 -0
  16. package/agents/verifier.md +114 -0
  17. package/bin/install.js +1242 -0
  18. package/bin/learnship.js +56 -0
  19. package/commands/learnship/add-phase.md +22 -0
  20. package/commands/learnship/add-tests.md +24 -0
  21. package/commands/learnship/add-todo.md +21 -0
  22. package/commands/learnship/audit-milestone.md +21 -0
  23. package/commands/learnship/check-todos.md +22 -0
  24. package/commands/learnship/cleanup.md +22 -0
  25. package/commands/learnship/complete-milestone.md +22 -0
  26. package/commands/learnship/debug.md +27 -0
  27. package/commands/learnship/decision-log.md +22 -0
  28. package/commands/learnship/diagnose-issues.md +23 -0
  29. package/commands/learnship/discovery-phase.md +24 -0
  30. package/commands/learnship/discuss-milestone.md +23 -0
  31. package/commands/learnship/discuss-phase.md +23 -0
  32. package/commands/learnship/execute-phase.md +27 -0
  33. package/commands/learnship/execute-plan.md +26 -0
  34. package/commands/learnship/health.md +20 -0
  35. package/commands/learnship/help.md +19 -0
  36. package/commands/learnship/insert-phase.md +22 -0
  37. package/commands/learnship/knowledge-base.md +21 -0
  38. package/commands/learnship/list-phase-assumptions.md +21 -0
  39. package/commands/learnship/ls.md +20 -0
  40. package/commands/learnship/map-codebase.md +23 -0
  41. package/commands/learnship/milestone-retrospective.md +21 -0
  42. package/commands/learnship/new-milestone.md +23 -0
  43. package/commands/learnship/new-project.md +24 -0
  44. package/commands/learnship/next.md +22 -0
  45. package/commands/learnship/pause-work.md +21 -0
  46. package/commands/learnship/plan-milestone-gaps.md +22 -0
  47. package/commands/learnship/plan-phase.md +24 -0
  48. package/commands/learnship/progress.md +20 -0
  49. package/commands/learnship/quick.md +27 -0
  50. package/commands/learnship/reapply-patches.md +21 -0
  51. package/commands/learnship/release.md +21 -0
  52. package/commands/learnship/remove-phase.md +23 -0
  53. package/commands/learnship/research-phase.md +23 -0
  54. package/commands/learnship/resume-work.md +21 -0
  55. package/commands/learnship/set-profile.md +21 -0
  56. package/commands/learnship/settings.md +21 -0
  57. package/commands/learnship/transition.md +21 -0
  58. package/commands/learnship/update.md +21 -0
  59. package/commands/learnship/validate-phase.md +22 -0
  60. package/commands/learnship/verify-work.md +23 -0
  61. package/cursor-rules/learnship.mdc +60 -0
  62. package/gemini-extension.json +10 -0
  63. package/hooks/hooks-claude.json +15 -0
  64. package/hooks/hooks-cursor.json +10 -0
  65. package/hooks/session-start +43 -0
  66. package/install.sh +254 -0
  67. package/learnship/references/design-commands.md +119 -0
  68. package/learnship/references/git-integration.md +249 -0
  69. package/learnship/references/learning-design.md +142 -0
  70. package/learnship/references/model-profiles.md +90 -0
  71. package/learnship/references/planning-config.md +184 -0
  72. package/learnship/references/questioning.md +162 -0
  73. package/learnship/references/ui-brand.md +160 -0
  74. package/learnship/references/verification-patterns.md +608 -0
  75. package/learnship/templates/agents.md +166 -0
  76. package/learnship/templates/context.md +72 -0
  77. package/learnship/templates/plan.md +202 -0
  78. package/learnship/templates/project.md +184 -0
  79. package/learnship/templates/requirements.md +231 -0
  80. package/learnship/templates/state.md +176 -0
  81. package/learnship/templates/uat.md +80 -0
  82. package/learnship/workflows/add-phase.md +84 -0
  83. package/learnship/workflows/add-tests.md +191 -0
  84. package/learnship/workflows/add-todo.md +108 -0
  85. package/learnship/workflows/audit-milestone.md +178 -0
  86. package/learnship/workflows/check-todos.md +138 -0
  87. package/learnship/workflows/cleanup.md +107 -0
  88. package/learnship/workflows/complete-milestone.md +191 -0
  89. package/learnship/workflows/debug.md +245 -0
  90. package/learnship/workflows/decision-log.md +131 -0
  91. package/learnship/workflows/diagnose-issues.md +145 -0
  92. package/learnship/workflows/discovery-phase.md +183 -0
  93. package/learnship/workflows/discuss-milestone.md +136 -0
  94. package/learnship/workflows/discuss-phase.md +244 -0
  95. package/learnship/workflows/execute-phase.md +345 -0
  96. package/learnship/workflows/execute-plan.md +149 -0
  97. package/learnship/workflows/health.md +171 -0
  98. package/learnship/workflows/help.md +153 -0
  99. package/learnship/workflows/insert-phase.md +106 -0
  100. package/learnship/workflows/knowledge-base.md +168 -0
  101. package/learnship/workflows/list-phase-assumptions.md +129 -0
  102. package/learnship/workflows/ls.md +145 -0
  103. package/learnship/workflows/map-codebase.md +142 -0
  104. package/learnship/workflows/milestone-retrospective.md +178 -0
  105. package/learnship/workflows/new-milestone.md +200 -0
  106. package/learnship/workflows/new-project.md +340 -0
  107. package/learnship/workflows/next.md +100 -0
  108. package/learnship/workflows/pause-work.md +122 -0
  109. package/learnship/workflows/plan-milestone-gaps.md +160 -0
  110. package/learnship/workflows/plan-phase.md +288 -0
  111. package/learnship/workflows/progress.md +118 -0
  112. package/learnship/workflows/quick.md +256 -0
  113. package/learnship/workflows/reapply-patches.md +130 -0
  114. package/learnship/workflows/release.md +217 -0
  115. package/learnship/workflows/remove-phase.md +128 -0
  116. package/learnship/workflows/research-phase.md +137 -0
  117. package/learnship/workflows/resume-work.md +162 -0
  118. package/learnship/workflows/set-profile.md +78 -0
  119. package/learnship/workflows/settings.md +204 -0
  120. package/learnship/workflows/sync-upstream-skills.md +269 -0
  121. package/learnship/workflows/transition.md +165 -0
  122. package/learnship/workflows/update.md +166 -0
  123. package/learnship/workflows/validate-phase.md +174 -0
  124. package/learnship/workflows/verify-work.md +264 -0
  125. package/package.json +62 -0
  126. package/references/design-commands.md +119 -0
  127. package/references/git-integration.md +249 -0
  128. package/references/learning-design.md +142 -0
  129. package/references/model-profiles.md +90 -0
  130. package/references/planning-config.md +184 -0
  131. package/references/questioning.md +162 -0
  132. package/references/ui-brand.md +160 -0
  133. package/references/verification-patterns.md +608 -0
  134. package/skills/agentic-learning/SKILL.md +373 -0
  135. package/skills/agentic-learning/references/either-or-format.md +161 -0
  136. package/skills/agentic-learning/references/learning-science.md +190 -0
  137. package/skills/agentic-learning/references/struggle-ladder.md +140 -0
  138. package/skills/impeccable/SKILL.md +125 -0
  139. package/skills/impeccable/adapt/SKILL.md +199 -0
  140. package/skills/impeccable/animate/SKILL.md +190 -0
  141. package/skills/impeccable/audit/SKILL.md +129 -0
  142. package/skills/impeccable/bolder/SKILL.md +132 -0
  143. package/skills/impeccable/clarify/SKILL.md +180 -0
  144. package/skills/impeccable/colorize/SKILL.md +158 -0
  145. package/skills/impeccable/critique/SKILL.md +118 -0
  146. package/skills/impeccable/delight/SKILL.md +317 -0
  147. package/skills/impeccable/distill/SKILL.md +137 -0
  148. package/skills/impeccable/extract/SKILL.md +95 -0
  149. package/skills/impeccable/frontend-design/SKILL.md +127 -0
  150. package/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  151. package/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  152. package/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  153. package/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  154. package/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  155. package/skills/impeccable/frontend-design/reference/typography.md +131 -0
  156. package/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  157. package/skills/impeccable/harden/SKILL.md +358 -0
  158. package/skills/impeccable/normalize/SKILL.md +67 -0
  159. package/skills/impeccable/onboard/SKILL.md +243 -0
  160. package/skills/impeccable/optimize/SKILL.md +269 -0
  161. package/skills/impeccable/polish/SKILL.md +202 -0
  162. package/skills/impeccable/quieter/SKILL.md +118 -0
  163. package/skills/impeccable/teach-impeccable/SKILL.md +69 -0
  164. package/templates/agents.md +166 -0
  165. package/templates/config.json +22 -0
  166. package/templates/context.md +72 -0
  167. package/templates/plan.md +202 -0
  168. package/templates/project.md +184 -0
  169. package/templates/requirements.md +231 -0
  170. package/templates/state.md +176 -0
  171. package/templates/uat.md +80 -0
@@ -0,0 +1,142 @@
1
+ ---
2
+ description: Analyze an existing codebase and produce structured reference docs before starting a new project on top of it
3
+ ---
4
+
5
+ # Map Codebase
6
+
7
+ Analyze an existing codebase through structured focused exploration. Produces 7 structured documents in `.planning/codebase/` that feed into `new-project` when adding features to existing code.
8
+
9
+ **Use before:** `/new-project` on a brownfield (existing) codebase.
10
+
11
+ **Philosophy:** Each agent gets fresh context, explores a specific domain, and writes documents directly. The orchestrator only confirms what was created — it never receives document contents.
12
+
13
+ ## Step 1: Check Existing Maps
14
+
15
+ ```bash
16
+ ls .planning/codebase/ 2>/dev/null
17
+ ```
18
+
19
+ If `.planning/codebase/` already exists with documents:
20
+
21
+ ```
22
+ .planning/codebase/ already exists:
23
+ - [list files found]
24
+
25
+ Options:
26
+ 1. Refresh — delete and remap from scratch
27
+ 2. Update — only re-run specific agents
28
+ 3. Skip — use existing map as-is
29
+ ```
30
+
31
+ Wait for response before continuing.
32
+
33
+ ## Step 2: Create Output Directory
34
+
35
+ ```bash
36
+ mkdir -p .planning/codebase
37
+ ```
38
+
39
+ Expected output files:
40
+ - `STACK.md` — technologies and dependencies
41
+ - `INTEGRATIONS.md` — external APIs, databases, auth
42
+ - `ARCHITECTURE.md` — patterns, layers, data flow
43
+ - `STRUCTURE.md` — directory layout, naming conventions
44
+ - `CONVENTIONS.md` — code style, patterns, error handling
45
+ - `TESTING.md` — test framework, structure, coverage
46
+ - `CONCERNS.md` — tech debt, security, fragile areas
47
+
48
+ ## Step 3: Run Structured Mapping
49
+
50
+ For each dimension below, adopt the relevant `@./agents/researcher.md` persona, explore the codebase thoroughly, and write the document directly.
51
+
52
+ ```
53
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
54
+ learnship ► MAPPING CODEBASE
55
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
56
+ Running structured analysis...
57
+ ```
58
+
59
+ **Agent 1 — Tech Stack:**
60
+ Explore: languages, runtime, frameworks, package.json/requirements.txt, build config, env vars.
61
+ Write: `STACK.md` (stack overview, versions, key libraries) + `INTEGRATIONS.md` (external APIs, databases, auth providers, webhooks, message queues).
62
+
63
+ **Agent 2 — Architecture:**
64
+ Explore: entry points, module structure, data flow, abstractions, dependency injection patterns, shared utilities.
65
+ Write: `ARCHITECTURE.md` (overall pattern — monolith/microservices/serverless, layers, data flow, key abstractions) + `STRUCTURE.md` (directory map with purpose of each directory, file naming conventions, where to find things).
66
+
67
+ **Agent 3 — Conventions & Quality:**
68
+ Explore: code style, linting config, existing patterns for common operations (error handling, logging, validation), test files.
69
+ Write: `CONVENTIONS.md` (coding style enforced, naming patterns, common idioms, what NOT to do based on existing code) + `TESTING.md` (test framework, structure, mocking approach, coverage state, how to run tests).
70
+
71
+ **Agent 4 — Concerns:**
72
+ Explore: TODO/FIXME/HACK comments, large files, circular dependencies, outdated packages, security patterns (secrets, auth, input validation).
73
+ Write: `CONCERNS.md` (tech debt items, known bugs, security concerns, performance bottlenecks, fragile areas the planner should avoid or tread carefully around).
74
+
75
+ ## Step 4: Security Check
76
+
77
+ Before committing, scan for accidentally captured secrets:
78
+
79
+ ```bash
80
+ grep -rE '(sk-[a-zA-Z0-9]{20,}|sk_live_|sk_test_|ghp_[a-zA-Z0-9]{36}|AKIA[A-Z0-9]{16}|-----BEGIN.*PRIVATE KEY)' .planning/codebase/*.md 2>/dev/null && echo "SECRETS_FOUND" || echo "CLEAN"
81
+ ```
82
+
83
+ **If secrets found:**
84
+ ```
85
+ ⚠️ SECURITY ALERT: Potential secrets detected in codebase documents.
86
+
87
+ [Show what was found]
88
+
89
+ Review and remove sensitive values before committing.
90
+ Reply "safe" once clean, or I'll skip the commit.
91
+ ```
92
+
93
+ Wait for confirmation.
94
+
95
+ ## Step 5: Verify Output
96
+
97
+ ```bash
98
+ ls -la .planning/codebase/
99
+ wc -l .planning/codebase/*.md 2>/dev/null
100
+ ```
101
+
102
+ Report any missing or suspiciously short documents (< 20 lines = likely empty).
103
+
104
+ ## Step 6: Commit
105
+
106
+ ```bash
107
+ git add .planning/codebase/
108
+ git commit -m "docs: map existing codebase"
109
+ ```
110
+
111
+ ## Step 7: Present Summary
112
+
113
+ ```
114
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
115
+ learnship ► CODEBASE MAPPED ✓
116
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
117
+
118
+ Created .planning/codebase/:
119
+ - STACK.md ([N] lines) — Technologies and dependencies
120
+ - ARCHITECTURE.md ([N] lines) — System design and patterns
121
+ - STRUCTURE.md ([N] lines) — Directory layout and organization
122
+ - CONVENTIONS.md ([N] lines) — Code style and patterns
123
+ - TESTING.md ([N] lines) — Test structure and practices
124
+ - INTEGRATIONS.md ([N] lines) — External services and APIs
125
+ - CONCERNS.md ([N] lines) — Technical debt and issues
126
+
127
+ ▶ Next: new-project (questions will focus on what you're ADDING)
128
+ ```
129
+
130
+ ---
131
+
132
+ ## Learning Checkpoint
133
+
134
+ Read `learning_mode` from `.planning/config.json`.
135
+
136
+ **If `auto`:** Offer:
137
+
138
+ > 💡 **Learning moment:** Codebase mapped. Test your understanding before building on top of it:
139
+ >
140
+ > `@agentic-learning explain [codebase/module name]` — Explain the architecture back in your own words. Gaps in the explanation reveal gaps in the mental model — before they become bugs.
141
+
142
+ **If `manual`:** Add quietly: *"Tip: `@agentic-learning explain [codebase]` to verify your understanding of the architecture."*
@@ -0,0 +1,178 @@
1
+ ---
2
+ description: Structured learning retrospective at end of milestone — 5 questions, produces RETROSPECTIVE.md, triggers spaced review
3
+ ---
4
+
5
+ # Milestone Retrospective
6
+
7
+ A structured learning retrospective after a milestone ships. Five focused questions surface what was learned, what worked, what didn't, and what to carry forward. Produces a `RETROSPECTIVE.md` and schedules key concepts for spaced review.
8
+
9
+ **Usage:** `milestone-retrospective`
10
+
11
+ **Run after:** `complete-milestone`
12
+
13
+ ## Step 1: Load Context
14
+
15
+ Read the milestone that just shipped:
16
+ ```bash
17
+ ls .planning/milestones/ | sort -V | tail -3
18
+ cat .planning/milestones/[VERSION]-ROADMAP.md 2>/dev/null | head -60
19
+ ```
20
+
21
+ Read all phase SUMMARY.md files from this milestone:
22
+ ```bash
23
+ ls .planning/milestones/[VERSION]-phases/*/*-SUMMARY.md 2>/dev/null || \
24
+ ls .planning/phases/*/*-SUMMARY.md 2>/dev/null
25
+ ```
26
+
27
+ Read the debug sessions log for this milestone:
28
+ ```bash
29
+ ls .planning/debug/resolved/ 2>/dev/null
30
+ ```
31
+
32
+ Read DECISIONS.md entries from this milestone period:
33
+ ```bash
34
+ cat .planning/DECISIONS.md 2>/dev/null | grep -A 8 "Phase [1-[N]]"
35
+ ```
36
+
37
+ Display:
38
+ ```
39
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
40
+ learnship ► MILESTONE RETROSPECTIVE
41
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
42
+
43
+ Milestone: [VERSION] — [Name]
44
+ Phases completed: [N]
45
+ Bugs fixed: [M] (from debug sessions)
46
+ Decisions made: [K]
47
+ ```
48
+
49
+ ## Step 2: Five Retrospective Questions
50
+
51
+ Ask each question and wait for a real answer before moving to the next. These are not checkboxes — they're reflection prompts.
52
+
53
+ **Question 1: What did you actually build?**
54
+ "Describe [VERSION] in your own words — not the requirements, but what you actually created. What can a user do now that they couldn't before?"
55
+
56
+ **Question 2: What was harder than expected?**
57
+ "Which phase or task took longer or required more rework than you anticipated? What made it hard?"
58
+
59
+ **Question 3: What worked surprisingly well?**
60
+ "Any decision, approach, or tool that paid off more than expected? Anything you'd do the same way next time?"
61
+
62
+ **Question 4: What would you do differently?**
63
+ "If you were starting this milestone over with what you know now — what's the one thing you'd change?"
64
+
65
+ **Question 5: What should carry forward?**
66
+ "Any patterns, decisions, or lessons from this milestone that should explicitly inform the next one? What goes into the decision register?"
67
+
68
+ ## Step 3: Synthesize Themes
69
+
70
+ After all five answers, synthesize the key themes:
71
+
72
+ ```
73
+ Retrospective themes:
74
+
75
+ What we learned:
76
+ - [theme 1]
77
+ - [theme 2]
78
+
79
+ What to repeat:
80
+ - [approach/decision to carry forward]
81
+
82
+ What to avoid:
83
+ - [approach/anti-pattern to explicitly skip next time]
84
+
85
+ Decisions to add to register:
86
+ - [decision to capture in DECISIONS.md]
87
+ ```
88
+
89
+ Ask: "Does this capture it? Anything to add or change?"
90
+
91
+ ## Step 4: Write RETROSPECTIVE.md
92
+
93
+ Write `.planning/milestones/[VERSION]-RETROSPECTIVE.md`:
94
+
95
+ ```markdown
96
+ ---
97
+ milestone: [VERSION]
98
+ created: [date]
99
+ ---
100
+
101
+ # Milestone Retrospective: [VERSION] — [Name]
102
+
103
+ ## What Was Built
104
+
105
+ [Answer to Q1 — user's own words]
106
+
107
+ ## What Was Hard
108
+
109
+ [Answer to Q2]
110
+
111
+ ## What Worked Well
112
+
113
+ [Answer to Q3]
114
+
115
+ ## What to Do Differently
116
+
117
+ [Answer to Q4]
118
+
119
+ ## Carry Forward
120
+
121
+ [Answer to Q5]
122
+
123
+ ---
124
+
125
+ ## Key Learnings (for next milestone)
126
+
127
+ [Synthesized themes — the 3-5 most actionable takeaways]
128
+
129
+ ## Decisions to Register
130
+
131
+ [Any decisions surfaced that should be added to DECISIONS.md]
132
+ ```
133
+
134
+ ## Step 5: Update DECISIONS.md
135
+
136
+ For each decision surfaced in the retrospective, append to `.planning/DECISIONS.md`:
137
+
138
+ ```markdown
139
+ ## DEC-[XXX]: [title — from retrospective]
140
+ **Date:** [date] | **Phase:** retrospective | **Type:** lesson
141
+ **Context:** [what situation surfaced this]
142
+ **Choice:** [what we learned / what to do]
143
+ **Rationale:** [from the retrospective answer]
144
+ **Consequences:** [what this means for the next milestone]
145
+ **Status:** active
146
+ ```
147
+
148
+ ## Step 6: Commit
149
+
150
+ ```bash
151
+ git add .planning/milestones/[VERSION]-RETROSPECTIVE.md .planning/DECISIONS.md
152
+ git commit -m "docs: add [VERSION] retrospective and carry-forward decisions"
153
+ ```
154
+
155
+ ## Step 7: Schedule for Spaced Review
156
+
157
+ ```
158
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
159
+ learnship ► RETROSPECTIVE COMPLETE ✓
160
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
161
+
162
+ Saved: .planning/milestones/[VERSION]-RETROSPECTIVE.md
163
+ Decisions added: [N]
164
+ ```
165
+
166
+ ---
167
+
168
+ ## Learning Checkpoint
169
+
170
+ Read `learning_mode` from `.planning/config.json`.
171
+
172
+ **If `auto`:** Offer (always, not conditional — retrospective IS the learning moment):
173
+
174
+ > 💡 **Now schedule what you just reflected on:**
175
+ >
176
+ > `@agentic-learning space` — Identifies the key concepts and patterns from this milestone and schedules them for spaced review. Writes to `docs/revisit.md`. The next milestone starts smarter because of this.
177
+
178
+ **If `manual`:** Offer: *"Tip: `@agentic-learning space` to schedule the key patterns from this milestone for review before the next one starts."*
@@ -0,0 +1,200 @@
1
+ ---
2
+ description: Start a new milestone cycle on an existing project after a prior milestone is complete
3
+ ---
4
+
5
+ # New Milestone
6
+
7
+ Start the next version cycle for an existing project. Loads what shipped previously, gathers new goals, optionally researches new feature domains, defines scoped requirements, and creates a new phased roadmap.
8
+
9
+ **Use after:** `/complete-milestone` has archived the previous milestone.
10
+
11
+ ## Step 1: Load Context
12
+
13
+ Read all prior project context:
14
+ ```bash
15
+ cat .planning/PROJECT.md
16
+ cat .planning/STATE.md
17
+ cat .planning/milestones/
18
+ ls .planning/milestones/ 2>/dev/null
19
+ ```
20
+
21
+ Display what shipped in the last milestone:
22
+ ```
23
+ ## Last milestone: [VERSION]
24
+ [2-3 sentences from the milestone archive summarizing what was built]
25
+
26
+ Pending todos carried forward:
27
+ - [Any todos from STATE.md]
28
+ ```
29
+
30
+ ## Step 2: Gather Milestone Goals
31
+
32
+ Ask openly: **"What do you want to build in this milestone?"**
33
+
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
+
39
+ Use this as the starting point?
40
+ ```
41
+ - **Yes** → proceed with it
42
+ - **No / Start fresh** → ask from scratch
43
+
44
+ Follow the thread. When you have enough to write clear goals, ask for confirmation before continuing.
45
+
46
+ ## Step 3: Determine Version
47
+
48
+ Read the last version from `.planning/milestones/`:
49
+ ```bash
50
+ ls .planning/milestones/ | grep -E "^v[0-9]" | sort -V | tail -3
51
+ ```
52
+
53
+ Propose the next version (e.g., `v1.0 → v1.1`, or `v2.0` for a major scope change). Confirm with user or let them specify.
54
+
55
+ ## Step 4: Update PROJECT.md
56
+
57
+ Add or update the current milestone section:
58
+ ```markdown
59
+ ## Current Milestone: [VERSION] [Name]
60
+
61
+ **Goal:** [One sentence describing this milestone's focus]
62
+
63
+ **Target features:**
64
+ - [Feature 1]
65
+ - [Feature 2]
66
+ ```
67
+
68
+ Update the Active requirements section and "Last updated" footer.
69
+
70
+ ## Step 5: Update STATE.md
71
+
72
+ Reset current position:
73
+ ```markdown
74
+ ## Current Position
75
+
76
+ Phase: Not started (defining requirements)
77
+ Plan: —
78
+ Status: Defining requirements
79
+ Last activity: [today] — Milestone [VERSION] started
80
+ ```
81
+
82
+ Keep the Accumulated Context section (decisions, blockers from prior milestones carry forward).
83
+
84
+ ## Step 6: Commit Initial State
85
+
86
+ ```bash
87
+ git add .planning/PROJECT.md .planning/STATE.md
88
+ git commit -m "docs: start milestone [VERSION] [Name]"
89
+ ```
90
+
91
+ If a MILESTONE-CONTEXT.md was consumed, delete it:
92
+ ```bash
93
+ git rm .planning/MILESTONE-CONTEXT.md 2>/dev/null || true
94
+ ```
95
+
96
+ ## Step 7: Research Decision
97
+
98
+ Read `workflow.research` from `.planning/config.json`.
99
+
100
+ Ask: "Research the domain for the new features before defining requirements?"
101
+ - **Research first** (recommended) — investigate new capabilities' ecosystem
102
+ - **Skip research** — domain is familiar
103
+
104
+ Update config accordingly:
105
+ ```bash
106
+ # Edit .planning/config.json: set workflow.research to true or false
107
+ ```
108
+
109
+ **If Research first:**
110
+
111
+ ```
112
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
113
+ learnship ► RESEARCHING NEW MILESTONE FEATURES
114
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
115
+ ```
116
+
117
+ Using `@./agents/researcher.md` in project research mode, investigate the new feature domain:
118
+ - Focus ONLY on the new capabilities — not the existing codebase
119
+ - Write STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md to `.planning/research/`
120
+ - Synthesize into `.planning/research/SUMMARY.md`
121
+
122
+ ## Step 8: Define Requirements
123
+
124
+ Read PROJECT.md, existing REQUIREMENTS traceability (in milestones archive), and research (if run).
125
+
126
+ Present feature categories for this milestone. For each, have the user select what's in scope (multi-select). Apply REQ-IDs continuing from the last milestone's numbering (or restarting per-domain).
127
+
128
+ Create `.planning/REQUIREMENTS.md` fresh for this milestone:
129
+ - v1 requirements with REQ-IDs
130
+ - v2 requirements (next milestone candidates)
131
+ - Out-of-scope items with reasoning
132
+
133
+ Present for confirmation. Iterate if needed.
134
+
135
+ ```bash
136
+ git add .planning/REQUIREMENTS.md
137
+ git commit -m "docs: define [VERSION] requirements"
138
+ ```
139
+
140
+ ## Step 9: Create Roadmap
141
+
142
+ Using `@./agents/planner.md` as planning persona, read PROJECT.md, REQUIREMENTS.md, research (if exists).
143
+
144
+ Create a new `.planning/ROADMAP.md` with phases for this milestone only. Map every v1 requirement to exactly one phase.
145
+
146
+ Present the proposed roadmap for approval. Iterate if needed.
147
+
148
+ Update STATE.md to reflect the new phase count and first phase.
149
+
150
+ ```bash
151
+ git add .planning/ROADMAP.md .planning/STATE.md
152
+ git commit -m "docs: create [VERSION] roadmap ([N] phases)"
153
+ ```
154
+
155
+ ## Step 10: Update AGENTS.md
156
+
157
+ If `AGENTS.md` exists at the project root, update:
158
+
159
+ 1. **Current Phase block** — reset for new milestone:
160
+ ```markdown
161
+ ## Current Phase
162
+
163
+ **Milestone:** [VERSION] — [Milestone Name]
164
+ **Phase:** 1 — [Phase 1 Name from new ROADMAP.md]
165
+ **Status:** planning
166
+ **Last updated:** [today's date]
167
+ ```
168
+
169
+ 2. **Tech Stack** — update if the new milestone introduces new libraries or frameworks.
170
+
171
+ ```bash
172
+ git add AGENTS.md
173
+ git commit -m "docs: update AGENTS.md — milestone [VERSION] started"
174
+ ```
175
+
176
+ ## Step 11: Done
177
+
178
+ ```
179
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
180
+ learnship ► MILESTONE [VERSION] INITIALIZED ✓
181
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
182
+
183
+ **[VERSION] — [Name]** — [N] phases, [X] requirements
184
+
185
+ ▶ Next: discuss-phase 1 → plan-phase 1 → execute-phase 1
186
+ ```
187
+
188
+ ---
189
+
190
+ ## Learning Checkpoint
191
+
192
+ Read `learning_mode` from `.planning/config.json`.
193
+
194
+ **If `auto`:** Offer:
195
+
196
+ > 💡 **Learning moment:** New milestone, new mental model. Before writing a line of code:
197
+ >
198
+ > `@agentic-learning brainstorm [milestone topic]` — Talk through the new features before committing to an approach. Surfaces blind spots before planning starts.
199
+
200
+ **If `manual`:** Add quietly: *"Tip: `@agentic-learning brainstorm [milestone topic]` before planning starts to surface approach alternatives."*