learnship 1.9.22 → 2.0.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 (56) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/.cursor-plugin/plugin.json +2 -2
  3. package/README.md +75 -21
  4. package/SKILL.md +17 -0
  5. package/agents/learnship-challenger.md +96 -0
  6. package/agents/learnship-code-reviewer.md +109 -0
  7. package/agents/learnship-executor.md +15 -0
  8. package/agents/learnship-ideation-agent.md +83 -0
  9. package/agents/learnship-solution-writer.md +140 -0
  10. package/bin/install.js +100 -48
  11. package/commands/learnship/challenge.md +22 -0
  12. package/commands/learnship/compound.md +22 -0
  13. package/commands/learnship/guard.md +21 -0
  14. package/commands/learnship/ideate.md +23 -0
  15. package/commands/learnship/review.md +23 -0
  16. package/commands/learnship/ship.md +21 -0
  17. package/commands/learnship/sync-docs.md +21 -0
  18. package/cursor-rules/learnship.mdc +7 -0
  19. package/gemini-extension.json +2 -2
  20. package/learnship/agents/challenger.md +52 -0
  21. package/learnship/agents/code-reviewer.md +81 -0
  22. package/learnship/agents/executor.md +15 -0
  23. package/learnship/agents/ideation-agent.md +54 -0
  24. package/learnship/agents/plan-checker.md +95 -0
  25. package/learnship/agents/solution-writer.md +64 -0
  26. package/learnship/references/model-profiles.md +41 -33
  27. package/learnship/references/planning-config.md +49 -0
  28. package/learnship/references/solution-schema.md +159 -0
  29. package/learnship/templates/agents.md +6 -1
  30. package/learnship/workflows/challenge.md +189 -0
  31. package/learnship/workflows/complete-milestone.md +9 -0
  32. package/learnship/workflows/compound.md +305 -0
  33. package/learnship/workflows/debug.md +7 -0
  34. package/learnship/workflows/discuss-milestone.md +5 -0
  35. package/learnship/workflows/execute-phase.md +24 -0
  36. package/learnship/workflows/guard.md +164 -0
  37. package/learnship/workflows/help.md +14 -2
  38. package/learnship/workflows/ideate.md +182 -0
  39. package/learnship/workflows/knowledge-base.md +8 -0
  40. package/learnship/workflows/ls.md +7 -3
  41. package/learnship/workflows/milestone-retrospective.md +45 -0
  42. package/learnship/workflows/new-project.md +5 -3
  43. package/learnship/workflows/next.md +3 -2
  44. package/learnship/workflows/plan-phase.md +23 -0
  45. package/learnship/workflows/progress.md +9 -3
  46. package/learnship/workflows/review.md +226 -0
  47. package/learnship/workflows/set-profile.md +6 -6
  48. package/learnship/workflows/settings.md +8 -8
  49. package/learnship/workflows/ship.md +219 -0
  50. package/learnship/workflows/sync-docs.md +159 -0
  51. package/learnship/workflows/sync-upstream-skills.md +10 -10
  52. package/learnship/workflows/validate-phase.md +4 -4
  53. package/learnship/workflows/verify-work.md +3 -0
  54. package/package.json +1 -1
  55. package/references/model-profiles.md +41 -33
  56. package/templates/config.json +13 -1
@@ -0,0 +1,164 @@
1
+ ---
2
+ description: Safety mode — warn on destructive commands, lock file scope
3
+ ---
4
+
5
+ # Guard
6
+
7
+ Safety mode for sensitive phases. Warns before destructive commands, locks file scope to prevent accidental changes outside the working area, and persists guard state across sessions.
8
+
9
+ **Usage:** `guard [scope]` — activate guard mode for a specific scope (directory, file pattern, or phase)
10
+ **Usage:** `guard off` — deactivate guard mode
11
+
12
+ ## Step 1: Parse Arguments
13
+
14
+ If argument is `off` → deactivate guard mode (Step 6).
15
+
16
+ Otherwise, interpret the scope:
17
+ - **Directory path** (e.g., `src/auth/`) → guard all files under that path
18
+ - **File pattern** (e.g., `*.migration`) → guard files matching the pattern
19
+ - **Phase number** (e.g., `3`) → guard files modified by that phase's plans
20
+ - **No argument** → guard the current phase's file scope
21
+
22
+ ## Step 2: Determine File Scope
23
+
24
+ **If a directory or pattern was provided:** Use it directly.
25
+
26
+ **If a phase number was provided:**
27
+ ```bash
28
+ # Extract files_modified from all plans in the phase
29
+ grep -h "files_modified" .planning/phases/[padded_phase]-*/*-PLAN.md -A 50 2>/dev/null | grep "^ *-" | sed 's/^ *- //'
30
+ ```
31
+
32
+ **If no argument — auto-detect from current phase:**
33
+ ```bash
34
+ # Read current phase from STATE.md
35
+ cat .planning/STATE.md 2>/dev/null | grep -i "phase"
36
+
37
+ # Get files from current phase plans
38
+ grep -rh "files_modified" .planning/phases/$(ls .planning/phases/ | sort | tail -1)/*-PLAN.md -A 50 2>/dev/null | grep "^ *-" | sed 's/^ *- //'
39
+ ```
40
+
41
+ **Brownfield enhancement:** If `.planning/codebase/CONCERNS.md` exists, read it and auto-suggest guard scope for files flagged as high-risk:
42
+ ```bash
43
+ cat .planning/codebase/CONCERNS.md 2>/dev/null | grep -i "risk\|sensitive\|critical\|production"
44
+ ```
45
+
46
+ ## Step 3: Activate Guard
47
+
48
+ Write guard state to `.planning/guard-state.md`:
49
+
50
+ ```markdown
51
+ ---
52
+ active: true
53
+ activated: [ISO timestamp]
54
+ scope: [description of what's guarded]
55
+ ---
56
+
57
+ # Guard Mode Active
58
+
59
+ ## Protected Scope
60
+
61
+ [list of files/directories/patterns being guarded]
62
+
63
+ ## Destructive Command Warnings
64
+
65
+ The following commands will trigger a warning before execution:
66
+ - `rm`, `rm -rf`, `git reset --hard`, `git clean -fd`
67
+ - `DROP TABLE`, `DELETE FROM`, `TRUNCATE`
68
+ - `git push --force`, `git rebase` (on shared branches)
69
+ - Any write to files outside the guarded scope
70
+
71
+ ## Session Log
72
+
73
+ - [timestamp]: Guard activated — scope: [scope description]
74
+ ```
75
+
76
+ ```bash
77
+ git add .planning/guard-state.md
78
+ git commit -m "docs: activate guard mode — scope: [description]"
79
+ ```
80
+
81
+ Display:
82
+ ```
83
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
84
+ learnship ► GUARD MODE ACTIVE
85
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
86
+
87
+ Protected scope:
88
+ [list of guarded files/dirs]
89
+
90
+ Warnings will trigger for:
91
+ - Destructive commands (rm -rf, git reset --hard, DROP TABLE)
92
+ - Writes outside guarded scope
93
+ - Force pushes and rebases on shared branches
94
+
95
+ ▶ Run: guard off — to deactivate
96
+ ```
97
+
98
+ ## Step 4: Guard Behavior (While Active)
99
+
100
+ When guard mode is active (`.planning/guard-state.md` exists with `active: true`):
101
+
102
+ **Before any file write:** Check if the target file is within the guarded scope.
103
+ - **Inside scope** → proceed normally
104
+ - **Outside scope** → warn: "⚠ Guard: This file is outside the guarded scope ([scope]). Proceed anyway?"
105
+
106
+ **Before destructive commands:** Always warn:
107
+ ```
108
+ ⚠ Guard: Destructive command detected: [command]
109
+ This will [description of what it does].
110
+ Proceed? (yes/no)
111
+ ```
112
+
113
+ **Log all guard events** to the Session Log in `guard-state.md`.
114
+
115
+ ## Step 5: Persistent State
116
+
117
+ Guard mode persists across sessions via `.planning/guard-state.md`. Any workflow that reads `.planning/config.json` should also check for active guard state:
118
+
119
+ ```bash
120
+ # Check if guard is active
121
+ grep -q "active: true" .planning/guard-state.md 2>/dev/null && echo "GUARD_ACTIVE"
122
+ ```
123
+
124
+ ## Step 6: Deactivate
125
+
126
+ When `guard off` is invoked:
127
+
128
+ Update `.planning/guard-state.md`:
129
+ ```markdown
130
+ ---
131
+ active: false
132
+ activated: [original timestamp]
133
+ deactivated: [ISO timestamp]
134
+ scope: [original scope]
135
+ ---
136
+ ```
137
+
138
+ ```bash
139
+ git add .planning/guard-state.md
140
+ git commit -m "docs: deactivate guard mode"
141
+ ```
142
+
143
+ ```
144
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
145
+ learnship ► GUARD MODE DEACTIVATED
146
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
147
+
148
+ Guard was active for: [duration]
149
+ Events logged: [N]
150
+ ```
151
+
152
+ ---
153
+
154
+ ## Learning Checkpoint
155
+
156
+ Read `learning_mode` from `.planning/config.json`.
157
+
158
+ **If `auto`:** After activating guard, offer:
159
+
160
+ > 💡 **Learning moment:** Safety modes reflect risk awareness:
161
+ >
162
+ > `@agentic-learning either-or` — When should you use guard mode vs just being careful? Log the decision criteria for future reference.
163
+
164
+ **If `manual`:** Add quietly: *"Tip: `@agentic-learning either-or` to log when guard mode is worth the overhead."*
@@ -16,7 +16,7 @@ You only need to remember **5 commands** to use learnship effectively:
16
16
  | `/next` | Auto-pilot — reads state and runs the right workflow for you |
17
17
  | `/new-project` | Starting a brand new project |
18
18
  | `/quick "..."` | One-off task with atomic commit, no ceremony |
19
- | `/help` | This screen — see all 42 commands |
19
+ | `/help` | This screen — see all 49 commands |
20
20
 
21
21
  Everything else below is discoverable from `/ls` as you go.
22
22
 
@@ -79,6 +79,18 @@ Everything else below is discoverable from `/ls` as you go.
79
79
  | `/check-todos` | Review and act on captured todos |
80
80
  | `/add-tests [N]` | Generate unit and E2E tests post-execution |
81
81
 
82
+ ### Compounding & Quality — capture, review, ship
83
+
84
+ | Workflow | What it does |
85
+ |----------|-------------|
86
+ | `/compound` | Capture a solution while context is fresh → `.planning/solutions/` |
87
+ | `/review [mode]` | Multi-persona code review (correctness, testing, security, performance, maintainability) |
88
+ | `/challenge [description]` | Product + engineering challenge gate — is this worth building? |
89
+ | `/ship` | Ship pipeline: test → lint → commit → push → PR |
90
+ | `/ideate [focus]` | Codebase-grounded divergent thinking — discover what to work on |
91
+ | `/guard [scope\|off]` | Safety mode — warn on destructive commands, lock file scope |
92
+ | `/sync-docs` | Detect stale documentation after code changes |
93
+
82
94
  ### Decision Intelligence — institutional memory
83
95
 
84
96
  | Workflow | What it does |
@@ -119,7 +131,7 @@ Everything else below is discoverable from `/ls` as you go.
119
131
 
120
132
  **Standard phase loop:**
121
133
  ```
122
- /discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N
134
+ /discuss-phase N → /plan-phase N → /execute-phase N → /verify-work N → /review → /ship → /compound
123
135
  ```
124
136
 
125
137
  **Quick fix:**
@@ -0,0 +1,182 @@
1
+ ---
2
+ description: Codebase-grounded divergent thinking — discover what is worth working on
3
+ ---
4
+
5
+ # Ideate
6
+
7
+ Codebase-grounded divergent ideation. Scans the actual codebase for hotspots, TODOs, test gaps, and friction points, then generates 15-25 improvement ideas across multiple thinking frames. Adversarial filter eliminates weak ideas. Presents top 5-7 ranked survivors.
8
+
9
+ **Usage:** `ideate` — open-ended ideation on the current project
10
+ **Usage:** `ideate [focus]` — focused ideation on a specific area, concept, or constraint
11
+
12
+ **Sequencing:** Run before `/new-project`, `/challenge`, or `/discuss-milestone` to discover what's worth building.
13
+
14
+ ## Step 1: Scope
15
+
16
+ If a focus argument was provided, use it as the ideation lens.
17
+ If no argument, proceed with open-ended ideation.
18
+
19
+ Check for recent ideation work:
20
+ ```bash
21
+ find .planning/ -name "*-ideation-*.md" -mtime -30 2>/dev/null
22
+ ```
23
+
24
+ If recent ideation exists, ask: "Found recent ideation work. Resume from it, or start fresh?"
25
+
26
+ ## Step 2: Codebase Scan
27
+
28
+ Gather grounding context before generating ideas:
29
+
30
+ ```bash
31
+ # Project shape
32
+ cat AGENTS.md 2>/dev/null || cat CLAUDE.md 2>/dev/null || cat README.md 2>/dev/null
33
+
34
+ # TODOs and FIXMEs in codebase
35
+ grep -rn "TODO\|FIXME\|HACK\|XXX" --include="*.ts" --include="*.js" --include="*.py" --include="*.rb" --include="*.go" --include="*.rs" . 2>/dev/null | head -30
36
+
37
+ # Test coverage gaps (files without corresponding test files)
38
+ find . -name "*.ts" -not -name "*.test.*" -not -name "*.spec.*" -not -path "*/node_modules/*" -not -path "*/.git/*" 2>/dev/null | head -20
39
+
40
+ # Recent git activity (hotspots)
41
+ git log --oneline -20 --format="%s" 2>/dev/null
42
+ git log --since="30 days ago" --format="" --name-only 2>/dev/null | sort | uniq -c | sort -rn | head -15
43
+ ```
44
+
45
+ **Brownfield enhancement:** If `.planning/codebase/` exists, also read:
46
+ ```bash
47
+ cat .planning/codebase/ARCHITECTURE.md 2>/dev/null
48
+ cat .planning/codebase/CONCERNS.md 2>/dev/null
49
+ cat .planning/codebase/TESTING.md 2>/dev/null
50
+ ```
51
+
52
+ Read compounded solutions and knowledge:
53
+ ```bash
54
+ ls .planning/solutions/ 2>/dev/null
55
+ cat .planning/KNOWLEDGE.md 2>/dev/null
56
+ ```
57
+
58
+ ## Step 3: Divergent Ideation
59
+
60
+ Read `parallelization` from `.planning/config.json` (defaults to `false`).
61
+
62
+ **If `parallelization` is `true` (subagent mode):**
63
+
64
+ Spawn 3-4 ideation agents in parallel, each with a different thinking frame:
65
+
66
+ ```
67
+ Task(
68
+ subagent_type="learnship-ideation-agent",
69
+ prompt="
70
+ <objective>
71
+ Generate 6-8 improvement ideas for this project using the [FRAME] lens.
72
+ Ground every idea in the codebase scan results — no abstract advice.
73
+ Return: title, summary, why_it_matters, evidence (specific files/patterns)
74
+
75
+ Frame: [one of the frames below]
76
+ Focus: [focus hint if provided]
77
+ </objective>
78
+
79
+ <context>
80
+ [codebase scan results]
81
+ [solutions and knowledge if available]
82
+ </context>
83
+ "
84
+ )
85
+ ```
86
+
87
+ **Thinking frames:**
88
+ 1. **User/operator pain** — friction, confusion, error-prone workflows
89
+ 2. **Inversion/removal** — what could be automated, eliminated, or simplified
90
+ 3. **Assumption-breaking** — what if the current approach is wrong?
91
+ 4. **Leverage/compounding** — what would make all future work easier?
92
+
93
+ **If `parallelization` is `false` (sequential mode):**
94
+
95
+ Using `@./agents/ideation-agent.md`, generate 15-25 ideas across all four frames sequentially.
96
+
97
+ ## Step 4: Deduplicate & Filter
98
+
99
+ Merge ideas from all frames:
100
+
101
+ 1. **Deduplicate** — merge ideas that describe the same improvement from different angles
102
+ 2. **Adversarial filter** — for each idea, ask:
103
+ - Is this grounded in the actual codebase, or generic advice?
104
+ - Is this actionable within a reasonable scope?
105
+ - Does the evidence support the claimed impact?
106
+ - Would a senior engineer roll their eyes at this suggestion?
107
+ 3. **Eliminate** weak ideas with explicit reasons
108
+
109
+ ## Step 5: Rank Survivors
110
+
111
+ Rank the surviving ideas (target: 5-7) by:
112
+
113
+ | Factor | Weight |
114
+ |--------|--------|
115
+ | **Impact** — how much does this improve the project? | High |
116
+ | **Evidence** — how grounded is the idea in codebase data? | High |
117
+ | **Feasibility** — can this be done in a reasonable scope? | Medium |
118
+ | **Compounding** — does this make future work easier? | Medium |
119
+
120
+ ## Step 6: Present Results
121
+
122
+ ```
123
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
124
+ learnship ► IDEATION COMPLETE
125
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
126
+
127
+ Focus: [focus or "open-ended"]
128
+ Scanned: [N] files, [M] TODOs, [K] hotspots
129
+ Generated: [total] ideas → [filtered] eliminated → [survivors] survivors
130
+
131
+ ## Top Ideas
132
+
133
+ ### 1. [Title]
134
+ **Impact:** high | medium | low
135
+ **Evidence:** [specific files/patterns from codebase]
136
+ **Summary:** [2-3 sentences]
137
+ **Scope:** [estimated effort — small/medium/large]
138
+
139
+ ### 2. [Title]
140
+ [...]
141
+
142
+ ---
143
+
144
+ Eliminated ideas (with reasons):
145
+ - [idea]: [why eliminated]
146
+ [...]
147
+ ```
148
+
149
+ Save the ideation artifact:
150
+ ```bash
151
+ DATE=$(date +%Y%m%d)
152
+ node -e "require('fs').mkdirSync('.planning',{recursive:true})"
153
+ # Write ideation results to .planning/[DATE]-ideation-[slug].md
154
+ git add .planning/[DATE]-ideation-[slug].md
155
+ git commit -m "docs: ideation — [focus or 'open-ended'] ([N] survivors)"
156
+ ```
157
+
158
+ ## Step 7: Route to Action
159
+
160
+ Present the "What's next?" options using the platform's blocking question tool:
161
+
162
+ - **Deep-dive an idea** → expand on the selected idea with more detail
163
+ - **Start a new project** → feed selected idea into `/new-project`
164
+ - **Add to current milestone** → feed into `/add-phase`
165
+ - **Challenge an idea** → run `/challenge [idea]` to stress-test it
166
+ - **Save and return later** → already saved to `.planning/`
167
+
168
+ ---
169
+
170
+ ## Learning Checkpoint
171
+
172
+ Read `learning_mode` from `.planning/config.json`.
173
+
174
+ **If `auto`:** After ideation, offer:
175
+
176
+ > 💡 **Learning moment:** Ideation is where divergent thinking gets practiced:
177
+ >
178
+ > `@agentic-learning brainstorm [top idea]` — Take the #1 idea and brainstorm collaboratively. Explore variations, edge cases, and alternative approaches.
179
+ >
180
+ > `@agentic-learning either-or [idea A] vs [idea B]` — Compare two competing ideas. Which is worth pursuing? Log the reasoning.
181
+
182
+ **If `manual`:** Add quietly: *"Tip: `@agentic-learning brainstorm [idea]` to explore the top idea collaboratively."*
@@ -32,6 +32,9 @@ find .planning/ -name "*-RESEARCH.md" | sort
32
32
 
33
33
  # AGENTS.md regressions
34
34
  grep -A 5 "### 20" AGENTS.md 2>/dev/null
35
+
36
+ # Compounded solutions
37
+ find .planning/solutions/ -name "*.md" -type f 2>/dev/null | sort
35
38
  ```
36
39
 
37
40
  ## Step 3: Extract Knowledge
@@ -53,6 +56,11 @@ From each source, extract structured knowledge items:
53
56
  - "Don't Hand-Roll" entries → Knowledge item: `library`
54
57
  - "Common Pitfalls" entries → Knowledge item: `pitfall`
55
58
 
59
+ **From compounded solutions (`.planning/solutions/`):**
60
+ - Bug track solutions → Knowledge item: `lesson` (root cause + prevention)
61
+ - Knowledge track solutions → Knowledge item: `pattern` or `anti-pattern`
62
+ - Read YAML frontmatter for classification (module, problem_type, severity, tags)
63
+
56
64
  Deduplicate: if the same concept appears multiple times, merge into one entry with multiple `sources`.
57
65
 
58
66
  ## Step 4: Write / Update KNOWLEDGE.md
@@ -119,10 +119,14 @@ Determine the next action (same logic as `progress`):
119
119
  5. **Plans = 0, no CONTEXT.md** → needs discussion
120
120
  - Next: `discuss-phase [X]`
121
121
 
122
- 6. **All plans have summaries, more phases remain** → move forward
122
+ 6. **All plans have summaries, UAT not done** → verify before moving on
123
+ - Next: `verify-work [X]`
124
+
125
+ 7. **All plans have summaries, UAT passed, more phases remain** → move forward
123
126
  - Next: `discuss-phase [X+1]`
127
+ - Suggest: `/review` → `/ship` → `/compound` before starting next phase
124
128
 
125
- 7. **All phases done** → ready to ship
129
+ 8. **All phases done** → ready to ship
126
130
  - Next: `audit-milestone`
127
131
 
128
132
  Display clearly, then **ask**:
@@ -142,4 +146,4 @@ If the user says yes (or "go", "do it", "run it", "proceed") — immediately inv
142
146
 
143
147
  - `/ls` is an alias for the status + routing logic in `progress`. Use either.
144
148
  - For full auto-pilot (no prompt), use `/next` instead.
145
- - To see all 40+ available commands: `/help`
149
+ - To see all 49 available commands: `/help`
@@ -67,6 +67,51 @@ Ask each question and wait for a real answer before moving to the next. These ar
67
67
  **Question 5: What should carry forward?**
68
68
  "Any patterns, decisions, or lessons from this milestone that should explicitly inform the next one? What goes into the decision register?"
69
69
 
70
+ ## Step 2b: Quantitative Summary
71
+
72
+ Gather data-driven metrics for this milestone:
73
+
74
+ ```bash
75
+ # Commits per phase
76
+ for dir in .planning/phases/*/; do
77
+ PHASE=$(basename "$dir")
78
+ COUNT=$(git log --oneline --all -- "$dir" 2>/dev/null | wc -l | tr -d ' ')
79
+ echo "$PHASE: $COUNT commits"
80
+ done
81
+
82
+ # Total LOC changed
83
+ git log --oneline --format="" --numstat $(git log --all --oneline .planning/ 2>/dev/null | tail -1 | cut -d' ' -f1)..HEAD 2>/dev/null | awk '{add+=$1; del+=$2} END {print "+" add " -" del " lines"}'
84
+
85
+ # Test file ratio
86
+ TOTAL_FILES=$(find . -name "*.ts" -o -name "*.js" -o -name "*.py" -o -name "*.rb" -o -name "*.go" 2>/dev/null | grep -v node_modules | grep -v .git | wc -l | tr -d ' ')
87
+ TEST_FILES=$(find . -name "*.test.*" -o -name "*.spec.*" -o -name "*_test.*" 2>/dev/null | grep -v node_modules | grep -v .git | wc -l | tr -d ' ')
88
+ echo "Test ratio: $TEST_FILES test files / $TOTAL_FILES total files"
89
+
90
+ # Debug sessions count
91
+ DEBUG_COUNT=$(ls .planning/debug/resolved/ 2>/dev/null | wc -l | tr -d ' ')
92
+ echo "Debug sessions resolved: $DEBUG_COUNT"
93
+
94
+ # Velocity (days from first to last commit in milestone)
95
+ FIRST_DATE=$(git log --reverse --format="%ai" .planning/ 2>/dev/null | head -1 | cut -d' ' -f1)
96
+ LAST_DATE=$(git log --format="%ai" .planning/ 2>/dev/null | head -1 | cut -d' ' -f1)
97
+ echo "Duration: $FIRST_DATE to $LAST_DATE"
98
+ ```
99
+
100
+ Present the quantitative summary before the qualitative questions:
101
+
102
+ ```
103
+ ## Quantitative Summary
104
+
105
+ | Metric | Value |
106
+ |--------|-------|
107
+ | Phases completed | [N] |
108
+ | Total commits | [N] |
109
+ | LOC changed | +[N] / -[N] |
110
+ | Test file ratio | [N]% |
111
+ | Debug sessions | [N] |
112
+ | Duration | [N] days |
113
+ ```
114
+
70
115
  ## Step 3: Synthesize Themes
71
116
 
72
117
  After all five answers, synthesize the key themes:
@@ -21,7 +21,7 @@ Initialize a new project with full context gathering, optional research, require
21
21
 
22
22
  ## Step 1: Setup
23
23
 
24
- You are running on **Windsurf**. Platform config directory: `.windsurf/`
24
+ <!-- LEARNSHIP_PLATFORM_LABEL -->
25
25
 
26
26
  > **Routing protocol suspended.** While this workflow is running, every user message is an answer to a workflow question — not a task to route. Do NOT apply the request routing protocol until `/new-project` is fully complete and `.planning/PROJECT.md` exists.
27
27
 
@@ -59,7 +59,7 @@ git init
59
59
 
60
60
  Add the platform config directory to `.gitignore` so AI platform files are not tracked in the project repo:
61
61
  ```bash
62
- grep -q '.windsurf/' .gitignore 2>/dev/null || echo '.windsurf/' >> .gitignore
62
+ <!-- LEARNSHIP_GITIGNORE_CMD -->
63
63
  ```
64
64
 
65
65
  Create the planning directory:
@@ -108,7 +108,7 @@ Ask: "Which workflow agents should be enabled?"
108
108
 
109
109
  **Group D — Parallel execution:**
110
110
 
111
- Windsurf does not support real subagents. Parallelization is automatically set to `false`.
111
+ <!-- LEARNSHIP_PARALLEL_BLOCK -->
112
112
 
113
113
  Ask: "Commit planning docs to git?"
114
114
  - **Yes** (recommended) — Planning docs tracked in version control
@@ -379,6 +379,8 @@ Last updated: [today's date]
379
379
  git add AGENTS.md && git commit -m "docs: add AGENTS.md with project context"
380
380
  ```
381
381
 
382
+ <!-- LEARNSHIP_AGENTSMD_PLATFORM_NOTE -->
383
+
382
384
  ## Step 9: Done
383
385
 
384
386
  ```
@@ -67,7 +67,8 @@ Evaluate in order:
67
67
  | Plans exist, summaries < plans | `execute-phase [X]` |
68
68
  | Plans = 0, CONTEXT.md exists | `plan-phase [X]` |
69
69
  | Plans = 0, no CONTEXT.md | `discuss-phase [X]` |
70
- | All summaries complete, more phases remain | `discuss-phase [X+1]` |
70
+ | All summaries complete, UAT not done | `verify-work [X]` |
71
+ | All summaries complete, UAT passed, more phases remain | `discuss-phase [X+1]` |
71
72
  | All phases complete | `audit-milestone` |
72
73
 
73
74
  ---
@@ -97,4 +98,4 @@ If no — show `/ls` output so the user can choose manually.
97
98
 
98
99
  - `/next` always confirms before acting (never fully silent).
99
100
  - For status-only with manual choice, use `/ls` instead.
100
- - To see all available commands: `/help`
101
+ - To see all 49 available commands: `/help`
@@ -53,6 +53,29 @@ Ask: "No CONTEXT.md found for Phase [X]. Plans will use research and requirement
53
53
 
54
54
  **If CONTEXT.md exists:** Load it and confirm: "Using phase context from: [path]"
55
55
 
56
+ ## Step 2b: Search Solutions for Prior Art
57
+
58
+ **Skip if:** `workflow.solutions_search` is `false` in config (defaults to `true`).
59
+
60
+ Search `.planning/solutions/` for prior art matching this phase's keywords:
61
+
62
+ ```bash
63
+ # Check if solutions directory exists
64
+ ls .planning/solutions/ 2>/dev/null
65
+
66
+ # Search for matching solutions by phase keywords
67
+ grep -ril "[phase_keyword1]\|[phase_keyword2]\|[phase_keyword3]" .planning/solutions/ 2>/dev/null
68
+ ```
69
+
70
+ If matches found, read the frontmatter (first 30 lines) of each match. Surface relevant prior solutions to the planner:
71
+
72
+ ```
73
+ Solutions prior art found:
74
+ - .planning/solutions/[category]/[file].md — [title] (relevant: [why])
75
+ ```
76
+
77
+ These solutions provide context for planning — the planner should reference them to avoid reinventing known solutions.
78
+
56
79
  ## Step 3: Research Phase
57
80
 
58
81
  **Skip if:** `--skip-research` flag, or `workflow.research` is `false` in config, or RESEARCH.md already exists (unless `--research` flag forces re-research).
@@ -101,9 +101,15 @@ Context: [✓ CONTEXT.md exists | — not yet]
101
101
  - If CONTEXT.md exists: `▶ Next: plan-phase [X]`
102
102
  - If no CONTEXT.md: `▶ Next: discuss-phase [X]` (recommended) or `plan-phase [X]`
103
103
 
104
- 5. **Summaries = plans AND plans > 0** → phase complete
105
- - If more phases remain: `▶ Next: discuss-phase [X+1]`
106
- - If all phases done: `▶ Next: audit-milestone`
104
+ 5. **Summaries = plans AND plans > 0, UAT not done** → verify first
105
+ - `▶ Next: verify-work [X]`
106
+
107
+ 6. **Summaries = plans, UAT passed, more phases remain** → move forward
108
+ - `▶ Next: discuss-phase [X+1]`
109
+ - Suggest: `/review` → `/ship` → `/compound` before starting next phase
110
+
111
+ 7. **All phases done** → ready to ship
112
+ - `▶ Next: audit-milestone`
107
113
 
108
114
  After presenting the recommended next step, ask:
109
115