learnship 2.2.1 → 2.3.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 (35) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.cursor-plugin/plugin.json +2 -2
  3. package/README.md +19 -8
  4. package/agents/learnship-doc-verifier.md +79 -0
  5. package/agents/learnship-project-researcher.md +78 -0
  6. package/agents/learnship-research-synthesizer.md +89 -0
  7. package/agents/learnship-researcher.md +113 -0
  8. package/agents/learnship-roadmapper.md +56 -0
  9. package/bin/install.js +59 -1
  10. package/gemini-extension.json +2 -2
  11. package/learnship/agents/doc-verifier.md +73 -0
  12. package/learnship/agents/phase-researcher.md +92 -0
  13. package/learnship/agents/project-researcher.md +72 -0
  14. package/learnship/agents/research-synthesizer.md +83 -0
  15. package/learnship/agents/roadmapper.md +50 -0
  16. package/learnship/workflows/audit-milestone.md +6 -1
  17. package/learnship/workflows/challenge.md +28 -2
  18. package/learnship/workflows/compound.md +12 -1
  19. package/learnship/workflows/debug.md +20 -2
  20. package/learnship/workflows/diagnose-issues.md +6 -1
  21. package/learnship/workflows/execute-phase.md +22 -2
  22. package/learnship/workflows/execute-plan.md +7 -1
  23. package/learnship/workflows/ideate.md +24 -2
  24. package/learnship/workflows/map-codebase.md +6 -1
  25. package/learnship/workflows/new-milestone.md +14 -2
  26. package/learnship/workflows/new-project.md +227 -30
  27. package/learnship/workflows/plan-phase.md +62 -16
  28. package/learnship/workflows/quick.md +30 -5
  29. package/learnship/workflows/research-phase.md +28 -14
  30. package/learnship/workflows/review.md +14 -1
  31. package/learnship/workflows/secure-phase.md +13 -3
  32. package/learnship/workflows/validate-phase.md +14 -3
  33. package/learnship/workflows/verify-work.md +24 -5
  34. package/package.json +2 -3
  35. package/install.sh +0 -254
@@ -162,7 +162,13 @@ Update config accordingly:
162
162
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
163
163
  ```
164
164
 
165
- Using `@./agents/researcher.md` in project research mode, investigate the new feature domain:
165
+ <persona_context>
166
+ You are now the **learnship project researcher**. Your training data is stale — verify before asserting.
167
+ Use WebSearch for ecosystem discovery (always include current year), WebFetch for official docs.
168
+ Tag confidence: HIGH/MEDIUM/LOW. Be comprehensive but opinionated.
169
+ </persona_context>
170
+
171
+ Read `@./agents/project-researcher.md` for the full persona definition. In project research mode, investigate the new feature domain:
166
172
  - Focus ONLY on the new capabilities — not the existing codebase
167
173
  - Write STACK.md, FEATURES.md, ARCHITECTURE.md, PITFALLS.md to `.planning/research/`
168
174
  - Synthesize into `.planning/research/SUMMARY.md`
@@ -187,7 +193,13 @@ git commit -m "docs: define [VERSION] requirements"
187
193
 
188
194
  ## Step 9: Create Roadmap
189
195
 
190
- Using `@./agents/planner.md` as planning persona, read PROJECT.md, REQUIREMENTS.md, research (if exists).
196
+ <persona_context>
197
+ You are now the **learnship roadmapper**. Transform requirements into a phased roadmap.
198
+ Every v1 requirement maps to exactly one phase. Every phase has observable success criteria.
199
+ Dependencies drive order. Phases should be deliverable.
200
+ </persona_context>
201
+
202
+ Read `@./agents/roadmapper.md` for the full persona definition. Read PROJECT.md, REQUIREMENTS.md, research (if exists).
191
203
 
192
204
  Create a new `.planning/ROADMAP.md` with phases for this milestone only. Map every v1 requirement to exactly one phase.
193
205
 
@@ -468,54 +468,244 @@ Read `parallelization` from `.planning/config.json` (defaults to `false`).
468
468
 
469
469
  **If `parallelization.enabled` is `true` (subagent mode — Claude Code, OpenCode, Codex):**
470
470
 
471
- Spawn a dedicated researcher agent with the project context:
471
+ Display spawning indicator:
472
+ ```
473
+ ◆ Spawning 4 researchers in parallel...
474
+ → Stack research
475
+ → Features research
476
+ → Architecture research
477
+ → Pitfalls research
478
+ ```
479
+
480
+ Spawn 4 parallel researcher agents — one per research dimension. Each agent writes ONE file.
481
+
472
482
  ```
473
483
  Task(
474
484
  subagent_type="learnship-researcher",
485
+ description="Stack research",
475
486
  prompt="
487
+ <agent_definition>
488
+ You are a learnship researcher. Your training data is 6-18 months stale — treat it as hypothesis, not fact.
489
+ Verify before asserting. Flag uncertainty with confidence levels (HIGH/MEDIUM/LOW). Be prescriptive: 'Use X because Y' not 'Options are X, Y, Z.'
490
+ Tool priority: 1. WebSearch (ecosystem discovery — always include current year), 2. WebFetch (official docs), 3. Codebase scan.
491
+ </agent_definition>
492
+
476
493
  <objective>
477
- Research the domain ecosystem for a new project, then write 5 research files into .planning/research/.
494
+ Research the standard tech stack for [project domain]. Write .planning/research/STACK.md.
495
+ You MUST run WebSearch queries BEFORE writing the file. Do NOT write from training data alone.
496
+ </objective>
497
+
498
+ <research_steps>
499
+ 1. Read .planning/PROJECT.md to understand the project domain and goals
500
+ 2. Run 2-3 WebSearch queries: '[domain] recommended tech stack [current year]', '[domain] best libraries [current year]'
501
+ 3. WebFetch official docs for any key libraries discovered
502
+ 4. Write .planning/research/STACK.md with confidence levels and source citations
503
+ </research_steps>
504
+
505
+ <files_to_read>
506
+ - .planning/PROJECT.md (project context and goals)
507
+ </files_to_read>
508
+
509
+ <downstream_consumer>
510
+ Your STACK.md feeds into roadmap creation. Be prescriptive:
511
+ - Specific libraries with versions
512
+ - Clear rationale for each choice
513
+ - What NOT to use and why
514
+ </downstream_consumer>
515
+
516
+ <quality_gate>
517
+ - [ ] Versions are current (verified via WebSearch/WebFetch, not training data)
518
+ - [ ] Rationale explains WHY, not just WHAT
519
+ - [ ] Confidence levels assigned to each recommendation
520
+ </quality_gate>
521
+
522
+ <output>
523
+ Write to: .planning/research/STACK.md
524
+ Required sections: ## Recommended Stack, ## Alternatives Considered, ## What NOT to Use, ## Versions
525
+ </output>
526
+ "
527
+ )
528
+
529
+ Task(
530
+ subagent_type="learnship-researcher",
531
+ description="Features research",
532
+ prompt="
533
+ <agent_definition>
534
+ You are a learnship researcher. Your training data is 6-18 months stale — treat it as hypothesis, not fact.
535
+ Verify before asserting. Flag uncertainty with confidence levels (HIGH/MEDIUM/LOW). Be prescriptive: 'Use X because Y' not 'Options are X, Y, Z.'
536
+ Tool priority: 1. WebSearch (ecosystem discovery — always include current year), 2. WebFetch (official docs), 3. Codebase scan.
537
+ </agent_definition>
478
538
 
479
- IMPORTANT: You MUST do online research BEFORE writing any files. Your training data is stale — verify everything.
539
+ <objective>
540
+ Research what features [project domain] products typically have. Write .planning/research/FEATURES.md.
541
+ You MUST run WebSearch queries BEFORE writing the file. Do NOT write from training data alone.
542
+ </objective>
480
543
 
481
- Phase 1 — INVESTIGATE (do this first):
544
+ <research_steps>
482
545
  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.
546
+ 2. Run 2-3 WebSearch queries: '[domain] features table stakes [current year]', '[domain] product features comparison'
547
+ 3. WebFetch any relevant product comparison pages or feature lists
548
+ 4. Write .planning/research/FEATURES.md with confidence levels and source citations
549
+ </research_steps>
550
+
551
+ <files_to_read>
552
+ - .planning/PROJECT.md (project context and goals)
553
+ </files_to_read>
554
+
555
+ <downstream_consumer>
556
+ Your FEATURES.md feeds into requirements definition. Categorize clearly:
557
+ - Table stakes (must have or users leave)
558
+ - Differentiators (competitive advantage)
559
+ - Anti-features (things to deliberately NOT build)
560
+ </downstream_consumer>
561
+
562
+ <quality_gate>
563
+ - [ ] Categories are clear (table stakes vs differentiators vs anti-features)
564
+ - [ ] Complexity noted for each feature
565
+ - [ ] Dependencies between features identified
566
+ </quality_gate>
567
+
568
+ <output>
569
+ Write to: .planning/research/FEATURES.md
570
+ Required sections: ## Table Stakes, ## Differentiators, ## Anti-Features
571
+ </output>
572
+ "
573
+ )
574
+
575
+ Task(
576
+ subagent_type="learnship-researcher",
577
+ description="Architecture research",
578
+ prompt="
579
+ <agent_definition>
580
+ You are a learnship researcher. Your training data is 6-18 months stale — treat it as hypothesis, not fact.
581
+ Verify before asserting. Flag uncertainty with confidence levels (HIGH/MEDIUM/LOW). Be prescriptive: 'Use X because Y' not 'Options are X, Y, Z.'
582
+ Tool priority: 1. WebSearch (ecosystem discovery — always include current year), 2. WebFetch (official docs), 3. Codebase scan.
583
+ </agent_definition>
584
+
585
+ <objective>
586
+ Research how [project domain] systems are typically structured. Write .planning/research/ARCHITECTURE.md.
587
+ You MUST run WebSearch queries BEFORE writing the file. Do NOT write from training data alone.
499
588
  </objective>
500
589
 
590
+ <research_steps>
591
+ 1. Read .planning/PROJECT.md to understand the project domain and goals
592
+ 2. Run 2-3 WebSearch queries: '[domain] architecture patterns', '[domain] system design components'
593
+ 3. WebFetch architectural guides or documentation for the chosen stack
594
+ 4. Write .planning/research/ARCHITECTURE.md with confidence levels and source citations
595
+ </research_steps>
596
+
501
597
  <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)
598
+ - .planning/PROJECT.md (project context and goals)
509
599
  </files_to_read>
600
+
601
+ <downstream_consumer>
602
+ Your ARCHITECTURE.md informs phase structure in roadmap. Include:
603
+ - Component boundaries (what talks to what)
604
+ - Data flow (how information moves)
605
+ - Suggested build order (dependencies between components)
606
+ </downstream_consumer>
607
+
608
+ <quality_gate>
609
+ - [ ] Components clearly defined with boundaries
610
+ - [ ] Data flow direction explicit
611
+ - [ ] Build order implications noted
612
+ </quality_gate>
613
+
614
+ <output>
615
+ Write to: .planning/research/ARCHITECTURE.md
616
+ Required sections: ## Component Boundaries, ## Data Flow, ## Build Order, ## Integration Points
617
+ </output>
618
+ "
619
+ )
620
+
621
+ Task(
622
+ subagent_type="learnship-researcher",
623
+ description="Pitfalls research",
624
+ prompt="
625
+ <agent_definition>
626
+ You are a learnship researcher. Your training data is 6-18 months stale — treat it as hypothesis, not fact.
627
+ Verify before asserting. Flag uncertainty with confidence levels (HIGH/MEDIUM/LOW). Be prescriptive: 'Use X because Y' not 'Options are X, Y, Z.'
628
+ Tool priority: 1. WebSearch (ecosystem discovery — always include current year), 2. WebFetch (official docs), 3. Codebase scan.
629
+ </agent_definition>
630
+
631
+ <objective>
632
+ Research what [project domain] projects commonly get wrong. Write .planning/research/PITFALLS.md.
633
+ You MUST run WebSearch queries BEFORE writing the file. Do NOT write from training data alone.
634
+ </objective>
635
+
636
+ <research_steps>
637
+ 1. Read .planning/PROJECT.md to understand the project domain and goals
638
+ 2. Run 2-3 WebSearch queries: '[domain] common mistakes gotchas', '[domain] pitfalls beginners'
639
+ 3. WebFetch any detailed postmortems or lessons-learned articles
640
+ 4. Write .planning/research/PITFALLS.md with confidence levels and source citations
641
+ </research_steps>
642
+
643
+ <files_to_read>
644
+ - .planning/PROJECT.md (project context and goals)
645
+ </files_to_read>
646
+
647
+ <downstream_consumer>
648
+ Your PITFALLS.md prevents mistakes in roadmap/planning. For each pitfall:
649
+ - Warning signs (how to detect early)
650
+ - Prevention strategy (how to avoid)
651
+ - Which phase should address it
652
+ </downstream_consumer>
653
+
654
+ <quality_gate>
655
+ - [ ] Pitfalls are specific to this domain (not generic advice)
656
+ - [ ] Prevention strategies are actionable
657
+ - [ ] Phase mapping included where relevant
658
+ </quality_gate>
659
+
660
+ <output>
661
+ Write to: .planning/research/PITFALLS.md
662
+ Required sections: ## Common Mistakes, ## Warning Signs, ## Prevention Strategies
663
+ </output>
510
664
  "
511
665
  )
512
666
  ```
513
667
 
514
- Wait for the agent to complete, then proceed to Step 5c (verification) to confirm files were written correctly.
668
+ After all 4 agents complete, spawn a synthesizer to create SUMMARY.md from the other 4 files:
669
+
670
+ ```
671
+ Task(
672
+ subagent_type="learnship-researcher",
673
+ description="Synthesize research",
674
+ prompt="
675
+ <objective>
676
+ Synthesize the 4 research files into a single SUMMARY.md.
677
+ Read all 4 files, extract the key findings, and write a cohesive summary.
678
+ </objective>
679
+
680
+ <files_to_read>
681
+ - .planning/research/STACK.md
682
+ - .planning/research/FEATURES.md
683
+ - .planning/research/ARCHITECTURE.md
684
+ - .planning/research/PITFALLS.md
685
+ </files_to_read>
686
+
687
+ <output>
688
+ Write to: .planning/research/SUMMARY.md
689
+ Required sections: ## Recommended Stack, ## Table Stakes Features, ## Key Architecture Decisions, ## Top Pitfalls
690
+ </output>
691
+ "
692
+ )
693
+ ```
694
+
695
+ Wait for the synthesizer to complete, then proceed to Step 5c (verification) to confirm all 5 files were written correctly.
515
696
 
516
697
  **If `parallelization.enabled` is `false` (sequential mode):**
517
698
 
518
- Using `@./agents/researcher.md` as your research persona:
699
+ <persona_context>
700
+ You are now the **learnship project researcher**. Your training data is 6–18 months stale — verify before asserting.
701
+ Use WebSearch for ecosystem discovery (always include current year), WebFetch for official docs, codebase scan for existing patterns.
702
+ Tag confidence: HIGH (multi-source verified), MEDIUM (single official source), LOW (unverified).
703
+ Be comprehensive but opinionated — "Use X because Y" not "Options are X, Y, Z."
704
+ Investigation, not confirmation — gather evidence first, recommend second.
705
+ Your research feeds the roadmapper: STACK.md → tech decisions, FEATURES.md → what to build, ARCHITECTURE.md → system structure, PITFALLS.md → risk flags.
706
+ </persona_context>
707
+
708
+ Read `@./agents/project-researcher.md` for the full persona definition.
519
709
 
520
710
  **Step 5b-pre — Online research (BEFORE writing any files).**
521
711
 
@@ -683,7 +873,14 @@ git add .planning/REQUIREMENTS.md && git commit -m "docs: define v1 requirements
683
873
 
684
874
  Read `.planning/PROJECT.md`, `.planning/REQUIREMENTS.md`, and research summary (if exists).
685
875
 
686
- Using `@./agents/planner.md` as your planning persona:
876
+ <persona_context>
877
+ You are now the **learnship roadmapper**. Transform requirements into a phased roadmap.
878
+ Every v1 requirement maps to exactly one phase. Every phase has observable success criteria.
879
+ Goal-backward: start from what the user needs, work backward to what must be built first.
880
+ Dependencies drive order. Phases should be deliverable — each produces something testable.
881
+ </persona_context>
882
+
883
+ Read `@./agents/roadmapper.md` for the full persona definition.
687
884
 
688
885
  1. Derive phases from requirements (don't impose structure — let requirements drive phases)
689
886
  2. Map every v1 requirement to exactly one phase
@@ -107,31 +107,39 @@ Display:
107
107
  Spawn a dedicated researcher agent:
108
108
  ```
109
109
  Task(
110
- subagent_type="learnship-phase-researcher",
110
+ subagent_type="learnship-researcher",
111
+ description="Phase [phase_number] research",
111
112
  prompt="
113
+ <agent_definition>
114
+ You are a learnship researcher. Your training data is 6-18 months stale — treat it as hypothesis, not fact.
115
+ Verify before asserting. Flag uncertainty with confidence levels (HIGH/MEDIUM/LOW). Be prescriptive: 'Use X because Y' not 'Options are X, Y, Z.'
116
+ Tool priority: 1. WebSearch (ecosystem discovery — always include current year), 2. WebFetch (official docs), 3. Codebase scan.
117
+ </agent_definition>
118
+
112
119
  <objective>
113
120
  Research how to implement Phase [phase_number]: [phase_name].
114
121
  Answer: 'What do I need to know to PLAN this phase well?'
122
+ You MUST run WebSearch queries BEFORE writing the file. Do NOT write from training data alone.
123
+ </objective>
115
124
 
116
- IMPORTANT: You MUST do online research BEFORE writing the research file. Your training data is stale — verify everything.
117
-
118
- Phase 1 — INVESTIGATE (do this first):
125
+ <research_steps>
119
126
  1. Read user decisions from CONTEXT.md (if exists), requirements from REQUIREMENTS.md, and project state from STATE.md
120
- 2. Read the researcher persona at @./agents/researcher.md for research principles and tool strategy
121
- 3. Run at least 3 WebSearch queries to discover: standard approaches, recommended libraries, and common pitfalls for this phase's domain. Include the current year in queries.
122
- 4. Use WebFetch to read official documentation for any key libraries or frameworks discovered
123
- 5. Scan the codebase for existing patterns relevant to this phase
124
-
125
- Phase 2 — WRITE FILE (only after investigating):
126
- Write RESEARCH.md to [phase_dir]/[padded_phase]-RESEARCH.md with Don't Hand-Roll, Common Pitfalls, Existing Patterns, and Recommended Approach sections. Include confidence levels (HIGH/MEDIUM/LOW) and cite sources.
127
- </objective>
127
+ 2. Run at least 3 WebSearch queries: '[phase technology] best practices [current year]', '[phase technology] common mistakes', '[phase technology] recommended libraries'
128
+ 3. WebFetch official docs for key libraries or frameworks discovered
129
+ 4. Scan the codebase for existing patterns relevant to this phase
130
+ 5. Write [padded_phase]-RESEARCH.md with confidence levels and source citations
131
+ </research_steps>
128
132
 
129
133
  <files_to_read>
130
134
  - [context_path] (user decisions, if exists)
131
135
  - .planning/REQUIREMENTS.md
132
136
  - .planning/STATE.md
133
- - @./agents/researcher.md (persona — read for research principles and tool strategy)
134
137
  </files_to_read>
138
+
139
+ <output>
140
+ Write to: .planning/phases/[padded_phase]-[phase_slug]/[padded_phase]-RESEARCH.md
141
+ Required sections: ## Don't Hand-Roll, ## Common Pitfalls, ## Existing Patterns in This Codebase, ## Recommended Approach
142
+ </output>
135
143
  "
136
144
  )
137
145
  ```
@@ -140,7 +148,13 @@ Wait for agent to complete, then verify RESEARCH.md was written.
140
148
 
141
149
  **If `parallelization` is `false` (sequential mode):**
142
150
 
143
- Using `@./agents/researcher.md` as your research persona, investigate how to implement this phase.
151
+ <persona_context>
152
+ You are now the **learnship phase researcher**. Your training data is stale — verify before asserting.
153
+ Tag every claim: [VERIFIED: source], [CITED: url], or [ASSUMED]. Never present assumed knowledge as verified fact.
154
+ Use WebSearch for implementation patterns, WebFetch for official docs, codebase scan for existing patterns to reuse.
155
+ </persona_context>
156
+
157
+ Read `@./agents/phase-researcher.md` for the full persona definition. Investigate how to implement this phase.
144
158
 
145
159
  **Online research first.** Before writing anything, run at least 3 WebSearch queries relevant to this phase's domain. Use WebFetch to read official docs for any libraries discovered. Then read:
146
160
  - The CONTEXT.md (user decisions)
@@ -178,7 +192,15 @@ Spawn a dedicated planner agent:
178
192
  ```
179
193
  Task(
180
194
  subagent_type="learnship-planner",
195
+ description="Plan phase [phase_number]",
181
196
  prompt="
197
+ <agent_definition>
198
+ You are a learnship planner. Create executable PLAN.md files that an AI agent can follow step-by-step.
199
+ Each plan covers a single logical unit of work. Tasks use XML format with file, action, verify, done fields.
200
+ Plans have YAML frontmatter: wave, depends_on, files_modified, autonomous.
201
+ Be specific — task actions should be concrete instructions, not vague guidance.
202
+ </agent_definition>
203
+
182
204
  <objective>
183
205
  Create 2-4 executable PLAN.md files for Phase [phase_number]: [phase_name].
184
206
  Write plans to [phase_dir]/[padded_phase]-NN-PLAN.md.
@@ -192,6 +214,11 @@ Task(
192
214
  - [research_path] (if exists)
193
215
  - $LEARNSHIP_DIR/templates/plan.md
194
216
  </files_to_read>
217
+
218
+ <output>
219
+ Write to: [phase_dir]/[padded_phase]-01-PLAN.md, [padded_phase]-02-PLAN.md, etc.
220
+ Each plan must have: YAML frontmatter (wave, depends_on, files_modified) + tasks in XML + must_haves section
221
+ </output>
195
222
  "
196
223
  )
197
224
  ```
@@ -200,7 +227,13 @@ Wait for agent to complete, then verify PLAN.md files were written.
200
227
 
201
228
  **If `parallelization` is `false` (sequential mode):**
202
229
 
203
- Using `@./agents/planner.md` as your planning persona, read all available context:
230
+ <persona_context>
231
+ You are now the **learnship planner**. Create implementation plans that are executable in a single context window.
232
+ Each plan covers one logical unit of work. Tasks use XML format. Include YAML frontmatter with wave, depends_on, files_modified.
233
+ Right-size plans: too small = overhead, too large = risk. Aim for plans completable in one focused session.
234
+ </persona_context>
235
+
236
+ Read `@./agents/planner.md` for the full persona definition. Read all available context:
204
237
  - `.planning/STATE.md`
205
238
  - `.planning/ROADMAP.md`
206
239
  - `.planning/REQUIREMENTS.md`
@@ -237,7 +270,14 @@ Spawn a plan-checker agent:
237
270
  ```
238
271
  Task(
239
272
  subagent_type="learnship-plan-checker",
273
+ description="Verify phase [phase_number] plans",
240
274
  prompt="
275
+ <agent_definition>
276
+ You are a learnship plan checker. Verify plans are complete, correct, and executable.
277
+ Check: phase goal coverage, requirement IDs, CONTEXT.md decisions honored, task completeness, wave/dependency correctness.
278
+ Be strict — flag missing requirement IDs, vague task actions, incorrect wave assignments.
279
+ </agent_definition>
280
+
241
281
  <objective>
242
282
  Verify all PLAN.md files in [phase_dir] for Phase [phase_number]: [phase_name].
243
283
  Check: phase goal coverage, requirement IDs, CONTEXT.md decisions, task completeness, wave correctness.
@@ -259,7 +299,13 @@ If still failing after 3 iterations: present issues and ask — **Force proceed*
259
299
 
260
300
  **If `parallelization` is `false` (sequential mode):**
261
301
 
262
- Using `@./agents/verifier.md` as your verification persona, check the plans against:
302
+ <persona_context>
303
+ You are now the **learnship verifier**. Check plans against requirements and roadmap.
304
+ Every v1 requirement must map to at least one plan task. Success criteria must be observable and testable.
305
+ Flag gaps, missing coverage, unrealistic estimates, and circular dependencies.
306
+ </persona_context>
307
+
308
+ Read `@./agents/verifier.md` for the full persona definition. Check the plans against:
263
309
  - The phase goal from ROADMAP.md
264
310
  - All requirement IDs assigned to this phase
265
311
  - CONTEXT.md decisions (are they honored?)
@@ -139,7 +139,13 @@ Write `CONTEXT.md` to the task directory:
139
139
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
140
140
  ```
141
141
 
142
- Using `@./agents/researcher.md` as your research persona, do a focused research pass on the task:
142
+ <persona_context>
143
+ You are now the **learnship researcher**. Your training data is stale — verify before asserting.
144
+ Use WebSearch for current best practices, WebFetch for official docs, codebase scan for existing patterns.
145
+ Tag confidence: HIGH/MEDIUM/LOW. Investigation, not confirmation.
146
+ </persona_context>
147
+
148
+ Read `@./agents/researcher.md` for the full persona definition. Do a focused research pass on the task:
143
149
  - What libraries or approaches are relevant?
144
150
  - What pitfalls should the implementation avoid?
145
151
  - Are there existing patterns in the codebase to follow?
@@ -148,7 +154,12 @@ Write a brief `${NEXT_NUM}-RESEARCH.md` (max 50 lines) to the task directory. Th
148
154
 
149
155
  ## Step 4: Create Plan
150
156
 
151
- Using `@./agents/planner.md` as your planning persona, read:
157
+ <persona_context>
158
+ You are now the **learnship planner**. Create a focused implementation plan.
159
+ Single plan with 1-3 tasks. Each task must be completable in one context window. Include must_haves.
160
+ </persona_context>
161
+
162
+ Read `@./agents/planner.md` for the full persona definition. Read:
152
163
  - `.planning/STATE.md`
153
164
  - CONTEXT.md if it exists (from `--discuss`)
154
165
  - The task description
@@ -179,7 +190,12 @@ node -e "const fs=require('fs'); console.log(fs.existsSync('.planning/quick/NEXT
179
190
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
180
191
  ```
181
192
 
182
- Using `@./agents/verifier.md`, verify the plan against the task description:
193
+ <persona_context>
194
+ You are now the **learnship verifier**. Check the plan against the task description.
195
+ Flag gaps, missing coverage, and unrealistic scope.
196
+ </persona_context>
197
+
198
+ Read `@./agents/verifier.md` for the full persona definition. Verify the plan against the task description:
183
199
  - Does the plan address the task description?
184
200
  - Do tasks have files, action, verify, done fields?
185
201
  - Is this appropriately sized for a quick task (1-3 tasks)?
@@ -191,7 +207,12 @@ If still failing after 2 iterations: present remaining issues and ask — **Forc
191
207
 
192
208
  ## Step 6: Execute
193
209
 
194
- Using `@./agents/executor.md` as your execution persona, read the PLAN.md and execute each task:
210
+ <persona_context>
211
+ You are now the **learnship executor**. Implement code from the plan, one task at a time.
212
+ Read task files, action, verify, and done fields. Commit atomically after each task.
213
+ </persona_context>
214
+
215
+ Read `@./agents/executor.md` for the full persona definition. Read the PLAN.md and execute each task:
195
216
 
196
217
  1. Read the task's `<files>`, `<action>`, `<verify>`, `<done>` fields
197
218
  2. Implement what the action describes
@@ -231,7 +252,11 @@ After all tasks complete, write `${NEXT_NUM}-SUMMARY.md`:
231
252
  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
232
253
  ```
233
254
 
234
- Using `@./agents/verifier.md`, check `must_haves` from the plan against the actual codebase.
255
+ <persona_context>
256
+ You are now the **learnship verifier**. Check must_haves from the plan against the actual codebase.
257
+ </persona_context>
258
+
259
+ Read `@./agents/verifier.md` for the full persona definition. Check `must_haves` from the plan against the actual codebase.
235
260
 
236
261
  Write `${NEXT_NUM}-VERIFICATION.md`. Store status as `VERIFICATION_STATUS`.
237
262
 
@@ -78,37 +78,51 @@ Spawn a dedicated researcher agent:
78
78
  ```
79
79
  Task(
80
80
  subagent_type="learnship-researcher",
81
+ description="Phase [N] research",
81
82
  prompt="
82
- <objective>
83
- Research how to implement phase [N] for this project.
83
+ <agent_definition>
84
+ You are a learnship researcher. Your training data is 6-18 months stale — treat it as hypothesis, not fact.
85
+ Verify before asserting. Flag uncertainty with confidence levels (HIGH/MEDIUM/LOW). Be prescriptive: 'Use X because Y' not 'Options are X, Y, Z.'
86
+ Tool priority: 1. WebSearch (ecosystem discovery — always include current year), 2. WebFetch (official docs), 3. Codebase scan.
87
+ </agent_definition>
84
88
 
85
- IMPORTANT: You MUST do online research BEFORE writing the research file. Your training data is stale — verify everything.
89
+ <objective>
90
+ Research how to implement phase [N] for this project. Write [padded_phase]-RESEARCH.md.
91
+ You MUST run WebSearch queries BEFORE writing the file. Do NOT write from training data alone.
92
+ </objective>
86
93
 
87
- Phase 1 — INVESTIGATE (do this first):
94
+ <research_steps>
88
95
  1. Read the phase goal from ROADMAP.md, requirements from REQUIREMENTS.md, and any CONTEXT.md decisions
89
- 2. Read the researcher persona at @./agents/researcher.md for research principles and tool strategy
90
- 3. Run at least 3 WebSearch queries to discover: standard approaches, recommended libraries, and common pitfalls for this phase's domain. Include the current year in queries.
91
- 4. Use WebFetch to read official documentation for any key libraries or frameworks discovered
92
- 5. Scan the codebase for existing patterns relevant to this phase
93
-
94
- Phase 2 — WRITE FILE (only after investigating):
95
- Write [padded_phase]-RESEARCH.md with Don't Hand-Roll, Common Pitfalls, Existing Patterns, and Recommended Approach sections. Include confidence levels (HIGH/MEDIUM/LOW) and cite sources.
96
- </objective>
96
+ 2. Run at least 3 WebSearch queries: '[phase technology] best practices [current year]', '[phase technology] common mistakes', '[phase technology] recommended libraries'
97
+ 3. WebFetch official docs for key libraries or frameworks discovered
98
+ 4. Scan the codebase for existing patterns relevant to this phase
99
+ 5. Write [padded_phase]-RESEARCH.md with confidence levels and source citations
100
+ </research_steps>
97
101
 
98
102
  <files_to_read>
99
103
  - .planning/ROADMAP.md
100
104
  - .planning/REQUIREMENTS.md
101
105
  - .planning/STATE.md
102
106
  - .planning/phases/[padded_phase]-[slug]/[padded_phase]-CONTEXT.md (if exists)
103
- - @./agents/researcher.md (persona — read for research principles and tool strategy)
104
107
  </files_to_read>
108
+
109
+ <output>
110
+ Write to: .planning/phases/[padded_phase]-[slug]/[padded_phase]-RESEARCH.md
111
+ Required sections: ## Don't Hand-Roll, ## Common Pitfalls, ## Existing Patterns in This Codebase, ## Recommended Approach
112
+ </output>
105
113
  "
106
114
  )
107
115
  ```
108
116
 
109
117
  **If `parallelization.enabled` is `false` (sequential mode):**
110
118
 
111
- Using `@./agents/researcher.md` as your research persona in **phase research mode**:
119
+ <persona_context>
120
+ You are now the **learnship phase researcher**. Your training data is stale — verify before asserting.
121
+ Tag every claim: [VERIFIED: source], [CITED: url], or [ASSUMED]. Never present assumed knowledge as verified fact.
122
+ Use WebSearch for implementation patterns, WebFetch for official docs, codebase scan for existing patterns to reuse.
123
+ </persona_context>
124
+
125
+ Read `@./agents/phase-researcher.md` for the full persona definition. In **phase research mode**:
112
126
 
113
127
  **Online research first.** Before writing anything, run at least 3 WebSearch queries relevant to this phase's domain:
114
128
 
@@ -92,7 +92,15 @@ Spawn a dedicated code-reviewer agent for each selected persona:
92
92
  ```
93
93
  Task(
94
94
  subagent_type="learnship-code-reviewer",
95
+ description="Review: [PERSONA]",
95
96
  prompt="
97
+ <agent_definition>
98
+ You are a learnship code reviewer running the [PERSONA] lens.
99
+ Review the diff — do NOT edit any files. Read-only review.
100
+ Return structured findings with severity (P0-P3) and confidence (0.0-1.0).
101
+ Be specific: cite exact files and lines. Distinguish real issues from style preferences.
102
+ </agent_definition>
103
+
96
104
  <objective>
97
105
  Review the following diff as the [PERSONA] reviewer.
98
106
  Focus: [persona-specific focus areas]
@@ -114,7 +122,12 @@ Wait for all personas to complete.
114
122
 
115
123
  **If `parallelization` is `false` (sequential mode):**
116
124
 
117
- Using `@./agents/code-reviewer.md` as your review persona, run each selected persona sequentially. For each persona:
125
+ <persona_context>
126
+ You are now the **learnship code reviewer**. Review code for correctness, testing, security, and performance.
127
+ Be specific — cite file:line, explain the issue, propose the fix. Severity: critical/major/minor/nit.
128
+ </persona_context>
129
+
130
+ Read `@./agents/code-reviewer.md` for the full persona definition. Run each selected persona sequentially. For each persona:
118
131
 
119
132
  1. Adopt the persona's focus lens
120
133
  2. Read the diff through that lens