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,249 @@
1
+ <overview>
2
+ Git integration for learnship.
3
+ </overview>
4
+
5
+ <core_principle>
6
+
7
+ **Commit outcomes, not process.**
8
+
9
+ The git log should read like a changelog of what shipped, not a diary of planning activity.
10
+ </core_principle>
11
+
12
+ <commit_points>
13
+
14
+ | Event | Commit? | Why |
15
+ | ----------------------- | ------- | ------------------------------------------------ |
16
+ | BRIEF + ROADMAP created | YES | Project initialization |
17
+ | PLAN.md created | NO | Intermediate - commit with plan completion |
18
+ | RESEARCH.md created | NO | Intermediate |
19
+ | DISCOVERY.md created | NO | Intermediate |
20
+ | **Task completed** | YES | Atomic unit of work (1 commit per task) |
21
+ | **Plan completed** | YES | Metadata commit (SUMMARY + STATE + ROADMAP) |
22
+ | Handoff created | YES | WIP state preserved |
23
+
24
+ </commit_points>
25
+
26
+ <git_check>
27
+
28
+ ```bash
29
+ [ -d .git ] && echo "GIT_EXISTS" || echo "NO_GIT"
30
+ ```
31
+
32
+ If NO_GIT: Run `git init` silently. learnship projects always get their own repo.
33
+ </git_check>
34
+
35
+ <commit_formats>
36
+
37
+ <format name="initialization">
38
+ ## Project Initialization (brief + roadmap together)
39
+
40
+ ```
41
+ docs: initialize [project-name] ([N] phases)
42
+
43
+ [One-liner from PROJECT.md]
44
+
45
+ Phases:
46
+ 1. [phase-name]: [goal]
47
+ 2. [phase-name]: [goal]
48
+ 3. [phase-name]: [goal]
49
+ ```
50
+
51
+ What to commit:
52
+
53
+ ```bash
54
+ git add .planning/ && git commit -m "docs: initialize [project-name] ([N] phases)"
55
+ ```
56
+
57
+ </format>
58
+
59
+ <format name="task-completion">
60
+ ## Task Completion (During Plan Execution)
61
+
62
+ Each task gets its own commit immediately after completion.
63
+
64
+ ```
65
+ {type}({phase}-{plan}): {task-name}
66
+
67
+ - [Key change 1]
68
+ - [Key change 2]
69
+ - [Key change 3]
70
+ ```
71
+
72
+ **Commit types:**
73
+ - `feat` - New feature/functionality
74
+ - `fix` - Bug fix
75
+ - `test` - Test-only (TDD RED phase)
76
+ - `refactor` - Code cleanup (TDD REFACTOR phase)
77
+ - `perf` - Performance improvement
78
+ - `chore` - Dependencies, config, tooling
79
+
80
+ **Examples:**
81
+
82
+ ```bash
83
+ # Standard task
84
+ git add src/api/auth.ts src/types/user.ts
85
+ git commit -m "feat(08-02): create user registration endpoint
86
+
87
+ - POST /auth/register validates email and password
88
+ - Checks for duplicate users
89
+ - Returns JWT token on success
90
+ "
91
+
92
+ # TDD task - RED phase
93
+ git add src/__tests__/jwt.test.ts
94
+ git commit -m "test(07-02): add failing test for JWT generation
95
+
96
+ - Tests token contains user ID claim
97
+ - Tests token expires in 1 hour
98
+ - Tests signature verification
99
+ "
100
+
101
+ # TDD task - GREEN phase
102
+ git add src/utils/jwt.ts
103
+ git commit -m "feat(07-02): implement JWT generation
104
+
105
+ - Uses jose library for signing
106
+ - Includes user ID and expiry claims
107
+ - Signs with HS256 algorithm
108
+ "
109
+ ```
110
+
111
+ </format>
112
+
113
+ <format name="plan-completion">
114
+ ## Plan Completion (After All Tasks Done)
115
+
116
+ After all tasks committed, one final metadata commit captures plan completion.
117
+
118
+ ```
119
+ docs({phase}-{plan}): complete [plan-name] plan
120
+
121
+ Tasks completed: [N]/[N]
122
+ - [Task 1 name]
123
+ - [Task 2 name]
124
+ - [Task 3 name]
125
+
126
+ SUMMARY: .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md
127
+ ```
128
+
129
+ What to commit:
130
+
131
+ ```bash
132
+ git add .planning/phases/XX-name/{phase}-{plan}-PLAN.md .planning/phases/XX-name/{phase}-{plan}-SUMMARY.md .planning/STATE.md .planning/ROADMAP.md
133
+ git commit -m "docs({phase}-{plan}): complete [plan-name] plan"
134
+ ```
135
+
136
+ **Note:** Code files NOT included - already committed per-task.
137
+
138
+ </format>
139
+
140
+ <format name="handoff">
141
+ ## Handoff (WIP)
142
+
143
+ ```
144
+ wip: [phase-name] paused at task [X]/[Y]
145
+
146
+ Current: [task name]
147
+ [If blocked:] Blocked: [reason]
148
+ ```
149
+
150
+ What to commit:
151
+
152
+ ```bash
153
+ git add .planning/ && git commit -m "wip: [phase-name] paused at task [X]/[Y]"
154
+ ```
155
+
156
+ </format>
157
+ </commit_formats>
158
+
159
+ <example_log>
160
+
161
+ **Old approach (per-plan commits):**
162
+ ```
163
+ a7f2d1 feat(checkout): Stripe payments with webhook verification
164
+ 3e9c4b feat(products): catalog with search, filters, and pagination
165
+ 8a1b2c feat(auth): JWT with refresh rotation using jose
166
+ 5c3d7e feat(foundation): Next.js 15 + Prisma + Tailwind scaffold
167
+ 2f4a8d docs: initialize ecommerce-app (5 phases)
168
+ ```
169
+
170
+ **New approach (per-task commits):**
171
+ ```
172
+ # Phase 04 - Checkout
173
+ 1a2b3c docs(04-01): complete checkout flow plan
174
+ 4d5e6f feat(04-01): add webhook signature verification
175
+ 7g8h9i feat(04-01): implement payment session creation
176
+ 0j1k2l feat(04-01): create checkout page component
177
+
178
+ # Phase 03 - Products
179
+ 3m4n5o docs(03-02): complete product listing plan
180
+ 6p7q8r feat(03-02): add pagination controls
181
+ 9s0t1u feat(03-02): implement search and filters
182
+ 2v3w4x feat(03-01): create product catalog schema
183
+
184
+ # Phase 02 - Auth
185
+ 5y6z7a docs(02-02): complete token refresh plan
186
+ 8b9c0d feat(02-02): implement refresh token rotation
187
+ 1e2f3g test(02-02): add failing test for token refresh
188
+ 4h5i6j docs(02-01): complete JWT setup plan
189
+ 7k8l9m feat(02-01): add JWT generation and validation
190
+ 0n1o2p chore(02-01): install jose library
191
+
192
+ # Phase 01 - Foundation
193
+ 3q4r5s docs(01-01): complete scaffold plan
194
+ 6t7u8v feat(01-01): configure Tailwind and globals
195
+ 9w0x1y feat(01-01): set up Prisma with database
196
+ 2z3a4b feat(01-01): create Next.js 15 project
197
+
198
+ # Initialization
199
+ 5c6d7e docs: initialize ecommerce-app (5 phases)
200
+ ```
201
+
202
+ Each plan produces 2-4 commits (tasks + metadata). Clear, granular, bisectable.
203
+
204
+ </example_log>
205
+
206
+ <anti_patterns>
207
+
208
+ **Still don't commit (intermediate artifacts):**
209
+ - PLAN.md creation (commit with plan completion)
210
+ - RESEARCH.md (intermediate)
211
+ - DISCOVERY.md (intermediate)
212
+ - Minor planning tweaks
213
+ - "Fixed typo in roadmap"
214
+
215
+ **Do commit (outcomes):**
216
+ - Each task completion (feat/fix/test/refactor)
217
+ - Plan completion metadata (docs)
218
+ - Project initialization (docs)
219
+
220
+ **Key principle:** Commit working code and shipped outcomes, not planning process.
221
+
222
+ </anti_patterns>
223
+
224
+ <commit_strategy_rationale>
225
+
226
+ ## Why Per-Task Commits?
227
+
228
+ **Context engineering for AI:**
229
+ - Git history becomes primary context source for future Claude sessions
230
+ - `git log --grep="{phase}-{plan}"` shows all work for a plan
231
+ - `git diff <hash>^..<hash>` shows exact changes per task
232
+ - Less reliance on parsing SUMMARY.md = more context for actual work
233
+
234
+ **Failure recovery:**
235
+ - Task 1 committed ✅, Task 2 failed ❌
236
+ - Claude in next session: sees task 1 complete, can retry task 2
237
+ - Can `git reset --hard` to last successful task
238
+
239
+ **Debugging:**
240
+ - `git bisect` finds exact failing task, not just failing plan
241
+ - `git blame` traces line to specific task context
242
+ - Each commit is independently revertable
243
+
244
+ **Observability:**
245
+ - Solo developer + Claude workflow benefits from granular attribution
246
+ - Atomic commits are git best practice
247
+ - "Commit noise" irrelevant when consumer is Claude, not humans
248
+
249
+ </commit_strategy_rationale>
@@ -0,0 +1,142 @@
1
+ # Learning × Design Integration
2
+
3
+ How to use the Learning Partner and Design System together. These two layers amplify each other when used at the right moments.
4
+
5
+ ---
6
+
7
+ ## The Core Idea
8
+
9
+ Building software teaches you things. Building *interfaces* teaches you even more — because design decisions are high-stakes, visible, and often irreversible once shipped. The Learning Partner captures that knowledge before it evaporates.
10
+
11
+ The pattern:
12
+ 1. **Before design** — brainstorm to surface blind spots
13
+ 2. **During design** — use steering commands to maintain quality
14
+ 3. **After design** — reflect to consolidate what you learned
15
+
16
+ ---
17
+
18
+ ## Before Any Design Work
19
+
20
+ ### Start with brainstorm
21
+
22
+ Before writing a line of UI code, use:
23
+ ```
24
+ @agentic-learning brainstorm [interface or feature name]
25
+ ```
26
+
27
+ This surfaces:
28
+ - What problem does this UI solve? For whom?
29
+ - What mental model does the user have coming in?
30
+ - What are the 2-3 approaches? What are the trade-offs?
31
+ - What's the one thing they'll remember about this interface?
32
+
33
+ The brainstorm is saved to `docs/brainstorm/` — it becomes a design brief that both the agent and you can reference.
34
+
35
+ ### Use either-or to log design decisions
36
+
37
+ When you choose between two approaches (card layout vs. table, modal vs. inline edit, sidebar vs. tabs), log it:
38
+ ```
39
+ @agentic-learning either-or
40
+ ```
41
+
42
+ This creates a decision journal entry — paths considered, the choice, the rationale. When you revisit the design in 3 weeks and wonder "why did we do it this way?", the journal has the answer.
43
+
44
+ ---
45
+
46
+ ## During Design Sprints
47
+
48
+ ### Use steering commands to maintain quality
49
+
50
+ While building interfaces, invoke design steering commands directly:
51
+
52
+ | Moment | Command |
53
+ |--------|---------|
54
+ | Before starting any new component | `/audit` — check what quality problems to avoid |
55
+ | After first pass of implementation | `/critique` — get honest feedback before polish |
56
+ | Typography looks off | `/typography` — systematic type review |
57
+ | Colors feel wrong | `/color` — OKLCH-based palette review |
58
+ | Layout feels cramped or cluttered | `/layout` — spatial rhythm review |
59
+ | Adding animations | `/motion` — purposeful motion, not decoration |
60
+ | Building forms | `/forms` — labels, validation, error states |
61
+ | Writing button labels or headings | `/copy` — UX writing review |
62
+ | Worried about accessibility | `/accessibility` — focus, contrast, screen readers |
63
+
64
+ ### The AI Slop Test
65
+
66
+ Run `/critique` and ask: "If someone saw this and said 'AI made this' — would they be right?"
67
+
68
+ If yes, that's the signal to push harder. Use `@agentic-learning struggle` to work through it yourself first:
69
+ ```
70
+ @agentic-learning struggle "make this interface feel genuinely designed, not AI-generated"
71
+ ```
72
+
73
+ This forces you to try your own design thinking before getting a solution — which builds the design intuition that transfers to the next project.
74
+
75
+ ---
76
+
77
+ ## After Design Phases
78
+
79
+ ### Reflect after execute-phase
80
+
81
+ When a UI phase finishes executing:
82
+ ```
83
+ @agentic-learning reflect
84
+ ```
85
+
86
+ Three questions:
87
+ 1. What design decisions did you make? Which ones felt right?
88
+ 2. What were you trying to achieve aesthetically and functionally?
89
+ 3. What's still fuzzy — patterns you used but don't fully understand?
90
+
91
+ ### Schedule design patterns for review
92
+
93
+ After a design-heavy phase:
94
+ ```
95
+ @agentic-learning space
96
+ ```
97
+
98
+ This schedules the design patterns you used (OKLCH color, container queries, motion easing, etc.) for spaced review — so they transfer to long-term memory instead of being forgotten between projects.
99
+
100
+ ---
101
+
102
+ ## Learning Design Patterns Explicitly
103
+
104
+ When you encounter a design pattern you want to understand deeply (not just copy):
105
+
106
+ ```
107
+ @agentic-learning learn [pattern name]
108
+ ```
109
+
110
+ Examples:
111
+ - `@agentic-learning learn OKLCH color spaces`
112
+ - `@agentic-learning learn container queries vs media queries`
113
+ - `@agentic-learning learn exponential easing curves`
114
+ - `@agentic-learning learn fluid typography with clamp()`
115
+
116
+ The `learn` action uses active retrieval — you explain what you know first, then gaps are filled. This is how design patterns become intuition, not just copy-paste.
117
+
118
+ ### Quiz yourself on design principles
119
+
120
+ After reading the design skill reference files:
121
+ ```
122
+ @agentic-learning quiz typography
123
+ @agentic-learning quiz color-and-contrast
124
+ @agentic-learning quiz motion-design
125
+ ```
126
+
127
+ ---
128
+
129
+ ## The Full Design-Learning Loop
130
+
131
+ ```
132
+ brainstorm → build → /critique → /polish → reflect → space
133
+ ```
134
+
135
+ 1. `@agentic-learning brainstorm` — clarify the problem and approach
136
+ 2. Build with steering commands as checkpoints
137
+ 3. `/critique` — honest quality check
138
+ 4. `/polish` — elevate and refine
139
+ 5. `@agentic-learning reflect` — consolidate what you learned
140
+ 6. `@agentic-learning space` — schedule patterns for review
141
+
142
+ Each time through this loop, the design decisions get better — not because the AI gets better, but because *you* do.
@@ -0,0 +1,90 @@
1
+ # Model Profiles
2
+
3
+ Model profiles control which AI model each learnship agent uses. This allows balancing quality vs token spend.
4
+
5
+ ## Profile Definitions
6
+
7
+ | Agent | `quality` | `balanced` | `budget` |
8
+ |-------|-----------|------------|----------|
9
+ | planner | opus | opus | sonnet |
10
+ | roadmapper | opus | sonnet | sonnet |
11
+ | executor | opus | sonnet | sonnet |
12
+ | phase-researcher | opus | sonnet | haiku |
13
+ | project-researcher | opus | sonnet | haiku |
14
+ | research-synthesizer | sonnet | sonnet | haiku |
15
+ | debugger | opus | sonnet | sonnet |
16
+ | codebase-mapper | sonnet | haiku | haiku |
17
+ | verifier | sonnet | sonnet | haiku |
18
+ | plan-checker | sonnet | sonnet | haiku |
19
+ | integration-checker | sonnet | sonnet | haiku |
20
+ | nyquist-auditor | sonnet | sonnet | haiku |
21
+
22
+ ## Profile Philosophy
23
+
24
+ **quality** - Maximum reasoning power
25
+ - Opus for all decision-making agents
26
+ - Sonnet for read-only verification
27
+ - Use when: quota available, critical architecture work
28
+
29
+ **balanced** (default) - Smart allocation
30
+ - Opus only for planning (where architecture decisions happen)
31
+ - Sonnet for execution and research (follows explicit instructions)
32
+ - Sonnet for verification (needs reasoning, not just pattern matching)
33
+ - Use when: normal development, good balance of quality and cost
34
+
35
+ **budget** - Minimal Opus usage
36
+ - Sonnet for anything that writes code
37
+ - Haiku for research and verification
38
+ - Use when: conserving quota, high-volume work, less critical phases
39
+
40
+ ## Resolution Logic
41
+
42
+ Resolution order:
43
+
44
+ ```
45
+ 1. Read .planning/config.json
46
+ 2. Check model_overrides for agent-specific override
47
+ 3. If no override, look up agent in profile table
48
+ 4. Apply the resolved profile when adopting the agent persona
49
+ ```
50
+
51
+ ## Per-Agent Overrides
52
+
53
+ Override specific agents without changing the entire profile:
54
+
55
+ ```json
56
+ {
57
+ "model_profile": "balanced",
58
+ "model_overrides": {
59
+ "executor": "opus",
60
+ "planner": "haiku"
61
+ }
62
+ }
63
+ ```
64
+
65
+ Overrides take precedence over the profile. Valid values: `opus`, `sonnet`, `haiku`.
66
+
67
+ ## Switching Profiles
68
+
69
+ Runtime: `/set-profile <profile>`
70
+
71
+ Per-project default: Set in `.planning/config.json`:
72
+ ```json
73
+ {
74
+ "model_profile": "balanced"
75
+ }
76
+ ```
77
+
78
+ ## Design Rationale
79
+
80
+ **Why Opus for the planner?**
81
+ Planning involves architecture decisions, goal decomposition, and task design. This is where model quality has the highest impact.
82
+
83
+ **Why Sonnet for the executor?**
84
+ Executors follow explicit PLAN.md instructions. The plan already contains the reasoning; execution is implementation.
85
+
86
+ **Why Sonnet (not Haiku) for verifiers in balanced?**
87
+ Verification requires goal-backward reasoning — checking if code *delivers* what the phase promised, not just pattern matching. Sonnet handles this well; Haiku may miss subtle gaps.
88
+
89
+ **Why Haiku for the codebase-mapper?**
90
+ Read-only exploration and pattern extraction. No reasoning required, just structured output from file contents.
@@ -0,0 +1,184 @@
1
+ <planning_config>
2
+
3
+ Configuration options for `.planning/` directory behavior.
4
+
5
+ <config_schema>
6
+ ```json
7
+ "planning": {
8
+ "commit_docs": true,
9
+ "search_gitignored": false
10
+ },
11
+ "git": {
12
+ "branching_strategy": "none",
13
+ "phase_branch_template": "phase-{phase}-{slug}",
14
+ "milestone_branch_template": "{milestone}-{slug}"
15
+ }
16
+ ```
17
+
18
+ | Option | Default | Description |
19
+ |--------|---------|-------------|
20
+ | `commit_docs` | `true` | Whether to commit planning artifacts to git |
21
+ | `search_gitignored` | `false` | Add `--no-ignore` to broad rg searches |
22
+ | `git.branching_strategy` | `"none"` | Git branching approach: `"none"`, `"phase"`, or `"milestone"` |
23
+ | `git.phase_branch_template` | `"phase-{phase}-{slug}"` | Branch template for phase strategy |
24
+ | `git.milestone_branch_template` | `"{milestone}-{slug}"` | Branch template for milestone strategy |
25
+ </config_schema>
26
+
27
+ <commit_docs_behavior>
28
+
29
+ **When `commit_docs: true` (default):**
30
+ - Planning files committed normally
31
+ - SUMMARY.md, STATE.md, ROADMAP.md tracked in git
32
+ - Full history of planning decisions preserved
33
+
34
+ **When `commit_docs: false`:**
35
+ - Skip all `git add`/`git commit` for `.planning/` files
36
+ - User must add `.planning/` to `.gitignore`
37
+ - Useful for: OSS contributions, client projects, keeping planning private
38
+
39
+ **Reading `commit_docs` from config:**
40
+
41
+ ```bash
42
+ # Read commit_docs from config.json
43
+ COMMIT_DOCS=$(python3 -c "import json; c=json.load(open('.planning/config.json')); print(c.get('planning',{}).get('commit_docs','true'))" 2>/dev/null || echo 'true')
44
+ ```
45
+
46
+ **Auto-detection:** If `.planning/` is gitignored, treat `commit_docs` as `false` regardless of config.json. This prevents git errors.
47
+
48
+ ```bash
49
+ # Check if .planning/ is gitignored
50
+ git check-ignore -q .planning && COMMIT_DOCS=false
51
+ ```
52
+
53
+ **Committing planning docs (when commit_docs is true):**
54
+
55
+ ```bash
56
+ git add .planning/STATE.md && git commit -m "docs: update state"
57
+ ```
58
+
59
+ </commit_docs_behavior>
60
+
61
+ <search_behavior>
62
+
63
+ **When `search_gitignored: false` (default):**
64
+ - Standard rg behavior (respects .gitignore)
65
+ - Direct path searches work: `rg "pattern" .planning/` finds files
66
+ - Broad searches skip gitignored: `rg "pattern"` skips `.planning/`
67
+
68
+ **When `search_gitignored: true`:**
69
+ - Add `--no-ignore` to broad rg searches that should include `.planning/`
70
+ - Only needed when searching entire repo and expecting `.planning/` matches
71
+
72
+ **Note:** Most learnship operations use direct file reads or explicit paths, which work regardless of gitignore status.
73
+
74
+ </search_behavior>
75
+
76
+ <setup_uncommitted_mode>
77
+
78
+ To use uncommitted mode:
79
+
80
+ 1. **Set config:**
81
+ ```json
82
+ "planning": {
83
+ "commit_docs": false,
84
+ "search_gitignored": true
85
+ }
86
+ ```
87
+
88
+ 2. **Add to .gitignore:**
89
+ ```
90
+ .planning/
91
+ ```
92
+
93
+ 3. **Existing tracked files:** If `.planning/` was previously tracked:
94
+ ```bash
95
+ git rm -r --cached .planning/
96
+ git commit -m "chore: stop tracking planning docs"
97
+ ```
98
+
99
+ 4. **Branch merges:** When using `branching_strategy: phase` or `milestone`, the `complete-milestone` workflow automatically strips `.planning/` files from staging before merge commits when `commit_docs: false`.
100
+
101
+ </setup_uncommitted_mode>
102
+
103
+ <branching_strategy_behavior>
104
+
105
+ **Branching Strategies:**
106
+
107
+ | Strategy | When branch created | Branch scope | Merge point |
108
+ |----------|---------------------|--------------|-------------|
109
+ | `none` | Never | N/A | N/A |
110
+ | `phase` | At `execute-phase` start | Single phase | User merges after phase |
111
+ | `milestone` | At first `execute-phase` of milestone | Entire milestone | At `complete-milestone` |
112
+
113
+ **When `git.branching_strategy: "none"` (default):**
114
+ - All work commits to current branch
115
+ - **Standard learnship behavior**
116
+
117
+ **When `git.branching_strategy: "phase"`:**
118
+ - `execute-phase` creates/switches to a branch before execution
119
+ - Branch name from `phase_branch_template` (e.g., `phase-03-authentication`)
120
+ - All plan commits go to that branch
121
+ - User merges branches manually after phase completion
122
+ - `complete-milestone` offers to merge all phase branches
123
+
124
+ **When `git.branching_strategy: "milestone"`:**
125
+ - First `execute-phase` of milestone creates the milestone branch
126
+ - Branch name from `milestone_branch_template` (e.g., `v1.0-mvp`)
127
+ - All phases in milestone commit to same branch
128
+ - `complete-milestone` offers to merge milestone branch to main
129
+
130
+ **Template variables:**
131
+
132
+ | Variable | Available in | Description |
133
+ |----------|--------------|-------------|
134
+ | `{phase}` | phase_branch_template | Zero-padded phase number (e.g., "03") |
135
+ | `{slug}` | Both | Lowercase, hyphenated name |
136
+ | `{milestone}` | milestone_branch_template | Milestone version (e.g., "v1.0") |
137
+
138
+ **Checking the config:**
139
+
140
+ Read config directly:
141
+ ```bash
142
+ python3 -c "import json; c=json.load(open('.planning/config.json')); g=c.get('git',{}); print(g.get('branching_strategy','none'), g.get('phase_branch_template','phase-{phase}-{slug}'), g.get('milestone_branch_template','{milestone}-{slug}'))"
143
+ ```
144
+
145
+ **Branch creation:**
146
+
147
+ ```bash
148
+ # For phase strategy
149
+ if [ "$BRANCHING_STRATEGY" = "phase" ]; then
150
+ PHASE_SLUG=$(echo "$PHASE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
151
+ BRANCH_NAME=$(echo "$PHASE_BRANCH_TEMPLATE" | sed "s/{phase}/$PADDED_PHASE/g" | sed "s/{slug}/$PHASE_SLUG/g")
152
+ git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
153
+ fi
154
+
155
+ # For milestone strategy
156
+ if [ "$BRANCHING_STRATEGY" = "milestone" ]; then
157
+ MILESTONE_SLUG=$(echo "$MILESTONE_NAME" | tr '[:upper:]' '[:lower:]' | sed 's/[^a-z0-9]/-/g' | sed 's/--*/-/g' | sed 's/^-//;s/-$//')
158
+ BRANCH_NAME=$(echo "$MILESTONE_BRANCH_TEMPLATE" | sed "s/{milestone}/$MILESTONE_VERSION/g" | sed "s/{slug}/$MILESTONE_SLUG/g")
159
+ git checkout -b "$BRANCH_NAME" 2>/dev/null || git checkout "$BRANCH_NAME"
160
+ fi
161
+ ```
162
+
163
+ **Merge options at complete-milestone:**
164
+
165
+ | Option | Git command | Result |
166
+ |--------|-------------|--------|
167
+ | Squash merge (recommended) | `git merge --squash` | Single clean commit per branch |
168
+ | Merge with history | `git merge --no-ff` | Preserves all individual commits |
169
+ | Delete without merging | `git branch -D` | Discard branch work |
170
+ | Keep branches | (none) | Manual handling later |
171
+
172
+ Squash merge is recommended — keeps main branch history clean while preserving the full development history in the branch (until deleted).
173
+
174
+ **Use cases:**
175
+
176
+ | Strategy | Best for |
177
+ |----------|----------|
178
+ | `none` | Solo development, simple projects |
179
+ | `phase` | Code review per phase, granular rollback, team collaboration |
180
+ | `milestone` | Release branches, staging environments, PR per version |
181
+
182
+ </branching_strategy_behavior>
183
+
184
+ </planning_config>