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.
- package/.claude-plugin/plugin.json +26 -0
- package/.cursor-plugin/plugin.json +26 -0
- package/LICENSE +21 -0
- package/README.md +791 -0
- package/SKILL.md +86 -0
- package/agents/debugger.md +102 -0
- package/agents/executor.md +115 -0
- package/agents/learnship-debugger.md +146 -0
- package/agents/learnship-executor.md +155 -0
- package/agents/learnship-phase-researcher.md +128 -0
- package/agents/learnship-plan-checker.md +119 -0
- package/agents/learnship-planner.md +146 -0
- package/agents/learnship-verifier.md +157 -0
- package/agents/planner.md +109 -0
- package/agents/researcher.md +80 -0
- package/agents/verifier.md +114 -0
- package/bin/install.js +1242 -0
- package/bin/learnship.js +56 -0
- package/commands/learnship/add-phase.md +22 -0
- package/commands/learnship/add-tests.md +24 -0
- package/commands/learnship/add-todo.md +21 -0
- package/commands/learnship/audit-milestone.md +21 -0
- package/commands/learnship/check-todos.md +22 -0
- package/commands/learnship/cleanup.md +22 -0
- package/commands/learnship/complete-milestone.md +22 -0
- package/commands/learnship/debug.md +27 -0
- package/commands/learnship/decision-log.md +22 -0
- package/commands/learnship/diagnose-issues.md +23 -0
- package/commands/learnship/discovery-phase.md +24 -0
- package/commands/learnship/discuss-milestone.md +23 -0
- package/commands/learnship/discuss-phase.md +23 -0
- package/commands/learnship/execute-phase.md +27 -0
- package/commands/learnship/execute-plan.md +26 -0
- package/commands/learnship/health.md +20 -0
- package/commands/learnship/help.md +19 -0
- package/commands/learnship/insert-phase.md +22 -0
- package/commands/learnship/knowledge-base.md +21 -0
- package/commands/learnship/list-phase-assumptions.md +21 -0
- package/commands/learnship/ls.md +20 -0
- package/commands/learnship/map-codebase.md +23 -0
- package/commands/learnship/milestone-retrospective.md +21 -0
- package/commands/learnship/new-milestone.md +23 -0
- package/commands/learnship/new-project.md +24 -0
- package/commands/learnship/next.md +22 -0
- package/commands/learnship/pause-work.md +21 -0
- package/commands/learnship/plan-milestone-gaps.md +22 -0
- package/commands/learnship/plan-phase.md +24 -0
- package/commands/learnship/progress.md +20 -0
- package/commands/learnship/quick.md +27 -0
- package/commands/learnship/reapply-patches.md +21 -0
- package/commands/learnship/release.md +21 -0
- package/commands/learnship/remove-phase.md +23 -0
- package/commands/learnship/research-phase.md +23 -0
- package/commands/learnship/resume-work.md +21 -0
- package/commands/learnship/set-profile.md +21 -0
- package/commands/learnship/settings.md +21 -0
- package/commands/learnship/transition.md +21 -0
- package/commands/learnship/update.md +21 -0
- package/commands/learnship/validate-phase.md +22 -0
- package/commands/learnship/verify-work.md +23 -0
- package/cursor-rules/learnship.mdc +60 -0
- package/gemini-extension.json +10 -0
- package/hooks/hooks-claude.json +15 -0
- package/hooks/hooks-cursor.json +10 -0
- package/hooks/session-start +43 -0
- package/install.sh +254 -0
- package/learnship/references/design-commands.md +119 -0
- package/learnship/references/git-integration.md +249 -0
- package/learnship/references/learning-design.md +142 -0
- package/learnship/references/model-profiles.md +90 -0
- package/learnship/references/planning-config.md +184 -0
- package/learnship/references/questioning.md +162 -0
- package/learnship/references/ui-brand.md +160 -0
- package/learnship/references/verification-patterns.md +608 -0
- package/learnship/templates/agents.md +166 -0
- package/learnship/templates/context.md +72 -0
- package/learnship/templates/plan.md +202 -0
- package/learnship/templates/project.md +184 -0
- package/learnship/templates/requirements.md +231 -0
- package/learnship/templates/state.md +176 -0
- package/learnship/templates/uat.md +80 -0
- package/learnship/workflows/add-phase.md +84 -0
- package/learnship/workflows/add-tests.md +191 -0
- package/learnship/workflows/add-todo.md +108 -0
- package/learnship/workflows/audit-milestone.md +178 -0
- package/learnship/workflows/check-todos.md +138 -0
- package/learnship/workflows/cleanup.md +107 -0
- package/learnship/workflows/complete-milestone.md +191 -0
- package/learnship/workflows/debug.md +245 -0
- package/learnship/workflows/decision-log.md +131 -0
- package/learnship/workflows/diagnose-issues.md +145 -0
- package/learnship/workflows/discovery-phase.md +183 -0
- package/learnship/workflows/discuss-milestone.md +136 -0
- package/learnship/workflows/discuss-phase.md +244 -0
- package/learnship/workflows/execute-phase.md +345 -0
- package/learnship/workflows/execute-plan.md +149 -0
- package/learnship/workflows/health.md +171 -0
- package/learnship/workflows/help.md +153 -0
- package/learnship/workflows/insert-phase.md +106 -0
- package/learnship/workflows/knowledge-base.md +168 -0
- package/learnship/workflows/list-phase-assumptions.md +129 -0
- package/learnship/workflows/ls.md +145 -0
- package/learnship/workflows/map-codebase.md +142 -0
- package/learnship/workflows/milestone-retrospective.md +178 -0
- package/learnship/workflows/new-milestone.md +200 -0
- package/learnship/workflows/new-project.md +340 -0
- package/learnship/workflows/next.md +100 -0
- package/learnship/workflows/pause-work.md +122 -0
- package/learnship/workflows/plan-milestone-gaps.md +160 -0
- package/learnship/workflows/plan-phase.md +288 -0
- package/learnship/workflows/progress.md +118 -0
- package/learnship/workflows/quick.md +256 -0
- package/learnship/workflows/reapply-patches.md +130 -0
- package/learnship/workflows/release.md +217 -0
- package/learnship/workflows/remove-phase.md +128 -0
- package/learnship/workflows/research-phase.md +137 -0
- package/learnship/workflows/resume-work.md +162 -0
- package/learnship/workflows/set-profile.md +78 -0
- package/learnship/workflows/settings.md +204 -0
- package/learnship/workflows/sync-upstream-skills.md +269 -0
- package/learnship/workflows/transition.md +165 -0
- package/learnship/workflows/update.md +166 -0
- package/learnship/workflows/validate-phase.md +174 -0
- package/learnship/workflows/verify-work.md +264 -0
- package/package.json +62 -0
- package/references/design-commands.md +119 -0
- package/references/git-integration.md +249 -0
- package/references/learning-design.md +142 -0
- package/references/model-profiles.md +90 -0
- package/references/planning-config.md +184 -0
- package/references/questioning.md +162 -0
- package/references/ui-brand.md +160 -0
- package/references/verification-patterns.md +608 -0
- package/skills/agentic-learning/SKILL.md +373 -0
- package/skills/agentic-learning/references/either-or-format.md +161 -0
- package/skills/agentic-learning/references/learning-science.md +190 -0
- package/skills/agentic-learning/references/struggle-ladder.md +140 -0
- package/skills/impeccable/SKILL.md +125 -0
- package/skills/impeccable/adapt/SKILL.md +199 -0
- package/skills/impeccable/animate/SKILL.md +190 -0
- package/skills/impeccable/audit/SKILL.md +129 -0
- package/skills/impeccable/bolder/SKILL.md +132 -0
- package/skills/impeccable/clarify/SKILL.md +180 -0
- package/skills/impeccable/colorize/SKILL.md +158 -0
- package/skills/impeccable/critique/SKILL.md +118 -0
- package/skills/impeccable/delight/SKILL.md +317 -0
- package/skills/impeccable/distill/SKILL.md +137 -0
- package/skills/impeccable/extract/SKILL.md +95 -0
- package/skills/impeccable/frontend-design/SKILL.md +127 -0
- package/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
- package/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
- package/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
- package/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
- package/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
- package/skills/impeccable/frontend-design/reference/typography.md +131 -0
- package/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
- package/skills/impeccable/harden/SKILL.md +358 -0
- package/skills/impeccable/normalize/SKILL.md +67 -0
- package/skills/impeccable/onboard/SKILL.md +243 -0
- package/skills/impeccable/optimize/SKILL.md +269 -0
- package/skills/impeccable/polish/SKILL.md +202 -0
- package/skills/impeccable/quieter/SKILL.md +118 -0
- package/skills/impeccable/teach-impeccable/SKILL.md +69 -0
- package/templates/agents.md +166 -0
- package/templates/config.json +22 -0
- package/templates/context.md +72 -0
- package/templates/plan.md +202 -0
- package/templates/project.md +184 -0
- package/templates/requirements.md +231 -0
- package/templates/state.md +176 -0
- package/templates/uat.md +80 -0
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Execute all plans in a phase using wave-based ordered execution — spawns subagents per plan where the platform supports it
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Execute Phase
|
|
6
|
+
|
|
7
|
+
Execute all plans in a phase. Plans run in waves — ordered by dependencies. On platforms with subagent support (Claude Code, OpenCode, Codex), plans within a wave are dispatched to dedicated executor agents. On all other platforms, plans execute sequentially.
|
|
8
|
+
|
|
9
|
+
**Usage:** `execute-phase [N]`
|
|
10
|
+
|
|
11
|
+
**Core principle:** Orchestrate, don't implement directly. Describe each plan's objective clearly, execute each plan in sequence (or in parallel via subagents), collect results.
|
|
12
|
+
|
|
13
|
+
> **Platform note:** This workflow detects whether subagent spawning is available by reading `parallelization` from `.planning/config.json`. Set `"parallelization": true` to enable parallel agent spawning on supported platforms. Defaults to `false` (sequential — always safe).
|
|
14
|
+
|
|
15
|
+
## Step 1: Initialize
|
|
16
|
+
|
|
17
|
+
Read the phase directory:
|
|
18
|
+
```bash
|
|
19
|
+
ls .planning/phases/ | grep "^[0-9]" | sort
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Find the phase matching `[N]`. If not found, stop and list available phases.
|
|
23
|
+
|
|
24
|
+
Read all PLAN.md files in the phase directory:
|
|
25
|
+
```bash
|
|
26
|
+
ls ".planning/phases/[padded_phase]-[phase_slug]/"*-PLAN.md 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If no plans found: stop — run `plan-phase [N]` first.
|
|
30
|
+
|
|
31
|
+
Read `.planning/STATE.md` for project context.
|
|
32
|
+
Read `.planning/config.json` for settings.
|
|
33
|
+
|
|
34
|
+
## Step 2: Discover and Group Plans
|
|
35
|
+
|
|
36
|
+
Read each PLAN.md's frontmatter to extract:
|
|
37
|
+
- `wave` — which wave this plan belongs to
|
|
38
|
+
- `depends_on` — which plans must complete before this one
|
|
39
|
+
- `autonomous` — whether this plan requires human checkpoints
|
|
40
|
+
- `objective` — what this plan builds
|
|
41
|
+
|
|
42
|
+
Group plans into waves based on `wave` and `depends_on` values. Plans in the same wave have no cross-dependencies and can be executed in any order.
|
|
43
|
+
|
|
44
|
+
Report the execution plan:
|
|
45
|
+
```
|
|
46
|
+
## Execution Plan
|
|
47
|
+
|
|
48
|
+
**Phase [X]: [Name]** — [N] plans across [M] waves
|
|
49
|
+
|
|
50
|
+
| Wave | Plans | What it builds |
|
|
51
|
+
|------|-------|----------------|
|
|
52
|
+
| 1 | 01, 02 | [objectives from plan frontmatter] |
|
|
53
|
+
| 2 | 03 | [objective] |
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
## Step 2b: UI Detection
|
|
57
|
+
|
|
58
|
+
Before executing, scan all PLAN.md files for UI/frontend work:
|
|
59
|
+
|
|
60
|
+
Look for any of these signals in plan objectives, task descriptions, or file paths:
|
|
61
|
+
- UI keywords: `component`, `page`, `layout`, `form`, `modal`, `nav`, `dashboard`, `landing`, `design`, `style`, `css`, `tailwind`, `theme`, `color`, `typography`, `animation`, `responsive`
|
|
62
|
+
- Frontend file patterns: `.tsx`, `.jsx`, `.vue`, `.svelte`, `styles/`, `components/`, `pages/`, `app/`
|
|
63
|
+
|
|
64
|
+
**If UI work is detected:**
|
|
65
|
+
|
|
66
|
+
Display:
|
|
67
|
+
```
|
|
68
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
69
|
+
learnship ► UI PHASE DETECTED — applying impeccable standards
|
|
70
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Activate `@impeccable frontend-design` as your design foundation for this entire phase. This means:
|
|
74
|
+
|
|
75
|
+
- **Typography:** Avoid overused fonts (Inter, Roboto, Arial). Use a modular type scale with clear visual hierarchy.
|
|
76
|
+
- **Color:** Avoid the AI palette (cyan-on-dark, purple-to-blue gradients, neon on dark). Tint neutrals toward the brand hue. No pure black (#000) or pure white (#fff).
|
|
77
|
+
- **Layout:** Create rhythm through varied spacing. Not everything needs a card. Never nest cards inside cards.
|
|
78
|
+
- **Components:** Avoid large rounded icons above every heading. Resist generic "AI-built" patterns.
|
|
79
|
+
- **Differentiation:** Every UI phase must have one intentional, memorable design decision — commit to it.
|
|
80
|
+
|
|
81
|
+
Check if `@impeccable teach-impeccable` has been run for this project (look for a `.planning/impeccable-context.md` or references to impeccable in DECISIONS.md). If not, add a note at the end of execution suggesting it be run before the next UI phase.
|
|
82
|
+
|
|
83
|
+
Carry these principles through every task in every wave of this phase.
|
|
84
|
+
|
|
85
|
+
## Step 3: Execute Waves
|
|
86
|
+
|
|
87
|
+
Read `parallelization` from `.planning/config.json` (defaults to `false`).
|
|
88
|
+
|
|
89
|
+
For each wave, in sequence:
|
|
90
|
+
|
|
91
|
+
### Before each wave
|
|
92
|
+
|
|
93
|
+
Describe what's being built — read each plan's `<objective>`:
|
|
94
|
+
|
|
95
|
+
```
|
|
96
|
+
---
|
|
97
|
+
## Wave [N]
|
|
98
|
+
|
|
99
|
+
**Plan [ID]: [Name]**
|
|
100
|
+
[2-3 sentences: what this builds, technical approach, why it matters for the overall phase]
|
|
101
|
+
|
|
102
|
+
Executing [count] plan(s)...
|
|
103
|
+
---
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
### Execute the plans
|
|
107
|
+
|
|
108
|
+
**If `parallelization` is `true` (subagent mode — Claude Code, OpenCode, Codex):**
|
|
109
|
+
|
|
110
|
+
For each plan in the wave, spawn a dedicated executor subagent. Pass paths only — each executor reads files itself with a fresh context budget.
|
|
111
|
+
|
|
112
|
+
```
|
|
113
|
+
Task(
|
|
114
|
+
subagent_type="learnship-executor",
|
|
115
|
+
prompt="
|
|
116
|
+
<objective>
|
|
117
|
+
Execute plan [plan_id] of phase [phase_number]-[phase_name].
|
|
118
|
+
Commit each task atomically. Create SUMMARY.md. Update STATE.md and ROADMAP.md.
|
|
119
|
+
</objective>
|
|
120
|
+
|
|
121
|
+
<files_to_read>
|
|
122
|
+
Read these files at execution start using the Read tool:
|
|
123
|
+
- [phase_dir]/[plan_file] (Plan)
|
|
124
|
+
- .planning/STATE.md (State)
|
|
125
|
+
- .planning/config.json (Config, if exists)
|
|
126
|
+
- ./AGENTS.md or ./CLAUDE.md or ./GEMINI.md (Project context, whichever exists)
|
|
127
|
+
</files_to_read>
|
|
128
|
+
|
|
129
|
+
<success_criteria>
|
|
130
|
+
- [ ] All tasks executed
|
|
131
|
+
- [ ] Each task committed individually
|
|
132
|
+
- [ ] SUMMARY.md created in plan directory
|
|
133
|
+
- [ ] STATE.md updated
|
|
134
|
+
</success_criteria>
|
|
135
|
+
"
|
|
136
|
+
)
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Spawn all plans in the wave before waiting. Wait for all agents to complete, then proceed to spot-checks.
|
|
140
|
+
|
|
141
|
+
**If `parallelization` is `false` (sequential mode — Windsurf, Gemini CLI, or user preference):**
|
|
142
|
+
|
|
143
|
+
For each plan in the wave, using `@./agents/executor.md` as your execution persona:
|
|
144
|
+
|
|
145
|
+
Read the full plan file. Execute each task in sequence:
|
|
146
|
+
1. Read the task's `<files>`, `<action>`, `<verify>`, and `<done>` fields
|
|
147
|
+
2. Implement exactly what the action describes
|
|
148
|
+
3. Verify using the verify criteria
|
|
149
|
+
4. Commit atomically after each task:
|
|
150
|
+
|
|
151
|
+
```bash
|
|
152
|
+
git add [files modified]
|
|
153
|
+
git commit -m "[type]([phase]-[plan]): [task description]"
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
Execute plans in the wave sequentially. Same-wave plans are independent so order within the wave doesn't matter.
|
|
157
|
+
|
|
158
|
+
### After each wave
|
|
159
|
+
|
|
160
|
+
Spot-check completion for each plan:
|
|
161
|
+
- Does the SUMMARY.md exist?
|
|
162
|
+
- Do the key created/modified files exist on disk?
|
|
163
|
+
- Does git log show commits for this plan?
|
|
164
|
+
|
|
165
|
+
If spot-check fails: report which plan failed, ask "Retry plan?" or "Continue with remaining waves?"
|
|
166
|
+
|
|
167
|
+
Report wave completion:
|
|
168
|
+
```
|
|
169
|
+
---
|
|
170
|
+
## Wave [N] Complete
|
|
171
|
+
|
|
172
|
+
**[Plan ID]: [Plan Name]**
|
|
173
|
+
[What was built — from SUMMARY.md]
|
|
174
|
+
[Notable deviations, if any]
|
|
175
|
+
|
|
176
|
+
[If more waves: what this enables for next wave]
|
|
177
|
+
---
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Checkpoint plans (`autonomous: false`)
|
|
181
|
+
|
|
182
|
+
When a plan requires human verification before continuing:
|
|
183
|
+
|
|
184
|
+
```
|
|
185
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
186
|
+
║ CHECKPOINT: Human Action Required ║
|
|
187
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
188
|
+
|
|
189
|
+
**Plan [ID]: [Name]**
|
|
190
|
+
Progress: [N] of [M] tasks complete
|
|
191
|
+
|
|
192
|
+
[What needs to be done / verified by the human]
|
|
193
|
+
|
|
194
|
+
→ Reply "done" when complete, or describe any issues found
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Wait for user response before continuing.
|
|
198
|
+
|
|
199
|
+
## Step 4: Write SUMMARY.md per Plan
|
|
200
|
+
|
|
201
|
+
After each plan completes, write `[plan_file_base]-SUMMARY.md` in the same directory:
|
|
202
|
+
|
|
203
|
+
```markdown
|
|
204
|
+
# Plan [ID] Summary
|
|
205
|
+
|
|
206
|
+
**Completed:** [date]
|
|
207
|
+
|
|
208
|
+
## What was built
|
|
209
|
+
[2-4 sentences describing what was implemented]
|
|
210
|
+
|
|
211
|
+
## Key files
|
|
212
|
+
- [file]: [what it does]
|
|
213
|
+
|
|
214
|
+
## Decisions made
|
|
215
|
+
- [Any implementation choices made during execution]
|
|
216
|
+
|
|
217
|
+
## Notes for downstream
|
|
218
|
+
- [Anything the next plan or phase should know]
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
## Step 5: Aggregate Results
|
|
222
|
+
|
|
223
|
+
After all waves complete:
|
|
224
|
+
|
|
225
|
+
```
|
|
226
|
+
## Phase [X]: [Name] — Execution Complete
|
|
227
|
+
|
|
228
|
+
**Waves:** [N] | **Plans:** [M] complete
|
|
229
|
+
|
|
230
|
+
| Wave | Plans | Status |
|
|
231
|
+
|------|-------|--------|
|
|
232
|
+
| 1 | 01, 02 | ✓ Complete |
|
|
233
|
+
| 2 | 03 | ✓ Complete |
|
|
234
|
+
|
|
235
|
+
### Summary
|
|
236
|
+
[Brief description of what was built across all plans]
|
|
237
|
+
```
|
|
238
|
+
|
|
239
|
+
## Step 6: Verify Phase Goal
|
|
240
|
+
|
|
241
|
+
Read `workflow.verifier` from `.planning/config.json`.
|
|
242
|
+
|
|
243
|
+
**If verifier is enabled:**
|
|
244
|
+
|
|
245
|
+
Display:
|
|
246
|
+
```
|
|
247
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
248
|
+
learnship ► VERIFYING PHASE GOAL
|
|
249
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Using `@./agents/verifier.md` as your verification persona, check:
|
|
253
|
+
- Do the `must_haves` from each plan's frontmatter match reality in the codebase?
|
|
254
|
+
- Are all requirement IDs for this phase accounted for?
|
|
255
|
+
- Do files exist, have substance, and export what they claim?
|
|
256
|
+
- Are the key integration links wired correctly?
|
|
257
|
+
|
|
258
|
+
Write `.planning/phases/[padded_phase]-[phase_slug]/[padded_phase]-VERIFICATION.md` with status: `passed`, `human_needed`, or `gaps_found`.
|
|
259
|
+
|
|
260
|
+
**If `human_needed`:**
|
|
261
|
+
```
|
|
262
|
+
## ✓ Phase [X]: [Name] — Human Verification Required
|
|
263
|
+
|
|
264
|
+
All automated checks passed. [N] items need human testing:
|
|
265
|
+
|
|
266
|
+
[List of items requiring manual verification]
|
|
267
|
+
|
|
268
|
+
→ Reply "approved" to continue, or describe any issues found
|
|
269
|
+
```
|
|
270
|
+
|
|
271
|
+
**If `gaps_found`:**
|
|
272
|
+
```
|
|
273
|
+
## ⚠ Phase [X]: [Name] — Gaps Found
|
|
274
|
+
|
|
275
|
+
**Score:** [N]/[M] must-haves verified
|
|
276
|
+
|
|
277
|
+
### What's Missing
|
|
278
|
+
[Gap summaries]
|
|
279
|
+
|
|
280
|
+
▶ Next: plan-phase [X] --gaps
|
|
281
|
+
```
|
|
282
|
+
|
|
283
|
+
If gaps found, stop here. User should run `plan-phase [X]` with gaps flag to create fix plans.
|
|
284
|
+
|
|
285
|
+
## Step 7: Update Roadmap
|
|
286
|
+
|
|
287
|
+
Mark phase complete in ROADMAP.md (update status to `✓ Complete` with date).
|
|
288
|
+
Update STATE.md to point to next phase.
|
|
289
|
+
Update REQUIREMENTS.md traceability section.
|
|
290
|
+
|
|
291
|
+
```bash
|
|
292
|
+
git add .planning/ROADMAP.md .planning/STATE.md .planning/REQUIREMENTS.md
|
|
293
|
+
git commit -m "docs(phase-[X]): complete phase execution"
|
|
294
|
+
```
|
|
295
|
+
|
|
296
|
+
## Step 7b: Update AGENTS.md
|
|
297
|
+
|
|
298
|
+
If `AGENTS.md` exists at the project root, update the `## Current Phase` block to reflect execution complete and the next phase:
|
|
299
|
+
|
|
300
|
+
```markdown
|
|
301
|
+
## Current Phase
|
|
302
|
+
|
|
303
|
+
**Milestone:** [VERSION from STATE.md]
|
|
304
|
+
**Phase:** [X] — [Phase Name] ✓ complete → Phase [X+1] — [Next Phase Name]
|
|
305
|
+
**Status:** verifying
|
|
306
|
+
**Last updated:** [today's date]
|
|
307
|
+
```
|
|
308
|
+
|
|
309
|
+
Also append any newly created key files or modules to the `## Project Structure` tree if significant new directories were created during this phase.
|
|
310
|
+
|
|
311
|
+
```bash
|
|
312
|
+
git add AGENTS.md
|
|
313
|
+
git commit -m "docs: update AGENTS.md — phase [X] complete"
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Step 8: Done
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
320
|
+
learnship ► PHASE [X] COMPLETE ✓
|
|
321
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
322
|
+
|
|
323
|
+
**Phase [X]: [Name]** — all plans complete, goals verified.
|
|
324
|
+
|
|
325
|
+
▶ Next: verify-work [X] (manual UAT)
|
|
326
|
+
Then: discuss-phase [X+1] → plan-phase [X+1]
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
---
|
|
330
|
+
|
|
331
|
+
## Learning Checkpoint
|
|
332
|
+
|
|
333
|
+
Read `learning_mode` from `.planning/config.json`.
|
|
334
|
+
|
|
335
|
+
**If `auto`:** Offer all three — pick the one that fits:
|
|
336
|
+
|
|
337
|
+
> 💡 **Learning moment:** Phase [X] is done. Three ways to make this stick:
|
|
338
|
+
>
|
|
339
|
+
> `@agentic-learning reflect` — Structured 3-part reflection: what was built, what was the goal, what gaps remain. Takes 5 minutes, pays off for weeks.
|
|
340
|
+
>
|
|
341
|
+
> `@agentic-learning quiz [phase topic]` — Active recall on what was just implemented. Surfaces gaps in understanding before they become bugs in the next phase.
|
|
342
|
+
>
|
|
343
|
+
> `@agentic-learning interleave [phase topic]` — Mix this phase's concepts with older ones to strengthen long-term retention. Especially useful if this phase touched a domain you've worked in before.
|
|
344
|
+
|
|
345
|
+
**If `manual`:** Add quietly: *"Tip: `@agentic-learning reflect` · `@agentic-learning quiz [topic]` · `@agentic-learning interleave [topic]` — pick one to consolidate this phase."*
|
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Run a single PLAN.md file in isolation — useful for re-running a failed plan without re-executing the whole phase
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Execute Plan
|
|
6
|
+
|
|
7
|
+
Execute a single PLAN.md file in isolation. Useful when one plan in a phase failed, when you want to re-run a specific plan after a fix, or when testing a plan independently before running the full phase.
|
|
8
|
+
|
|
9
|
+
**Usage:** `execute-plan [phase] [plan-id]` — e.g., `execute-plan 3 02`
|
|
10
|
+
|
|
11
|
+
## Step 1: Locate the Plan
|
|
12
|
+
|
|
13
|
+
Find the phase directory:
|
|
14
|
+
```bash
|
|
15
|
+
ls .planning/phases/ | grep -E "^0*[phase]-" | head -1
|
|
16
|
+
PHASE_DIR=".planning/phases/[matched]"
|
|
17
|
+
```
|
|
18
|
+
|
|
19
|
+
Find the specific plan file:
|
|
20
|
+
```bash
|
|
21
|
+
ls "$PHASE_DIR"/*-[plan-id]-PLAN.md 2>/dev/null
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
If not found, list available plans:
|
|
25
|
+
```bash
|
|
26
|
+
ls "$PHASE_DIR"/*-PLAN.md 2>/dev/null
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
If still not found: stop — "No plan file found. Check phase and plan ID."
|
|
30
|
+
|
|
31
|
+
## Step 2: Check for Existing Summary
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
ls "${PLAN_FILE%-PLAN.md}-SUMMARY.md" 2>/dev/null
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
If SUMMARY.md already exists:
|
|
38
|
+
```
|
|
39
|
+
Plan [phase]-[plan-id] already has a SUMMARY.md — it appears to have been executed.
|
|
40
|
+
|
|
41
|
+
Options:
|
|
42
|
+
1. Re-execute anyway (overwrites SUMMARY.md)
|
|
43
|
+
2. View the existing summary
|
|
44
|
+
3. Cancel
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Wait for choice.
|
|
48
|
+
|
|
49
|
+
## Step 3: Load Context
|
|
50
|
+
|
|
51
|
+
Read the full plan file. Read project context:
|
|
52
|
+
```bash
|
|
53
|
+
cat .planning/STATE.md
|
|
54
|
+
cat .planning/ROADMAP.md
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Read any existing SUMMARY.md files from other plans in the same phase — they contain important context about what was already built.
|
|
58
|
+
|
|
59
|
+
Display:
|
|
60
|
+
```
|
|
61
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
62
|
+
learnship ► EXECUTE PLAN [phase]-[plan-id]
|
|
63
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
64
|
+
|
|
65
|
+
Plan: [plan file name]
|
|
66
|
+
Objective: [from plan frontmatter]
|
|
67
|
+
Wave: [wave number]
|
|
68
|
+
Depends on: [depends_on from frontmatter, or "none"]
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## Step 4: Check Dependencies
|
|
72
|
+
|
|
73
|
+
If the plan has `depends_on` entries in its frontmatter, check that those plans have SUMMARY.md files:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
for dep in [depends_on list]; do
|
|
77
|
+
ls "$PHASE_DIR"/*${dep}*-SUMMARY.md 2>/dev/null || echo "MISSING: $dep"
|
|
78
|
+
done
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
If any dependency is missing:
|
|
82
|
+
```
|
|
83
|
+
⚠️ This plan depends on [plan-id] which has not been executed yet.
|
|
84
|
+
|
|
85
|
+
Options:
|
|
86
|
+
1. Execute [plan-id] first (recommended)
|
|
87
|
+
2. Proceed anyway (may fail if dependent files don't exist)
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## Step 5: Execute
|
|
91
|
+
|
|
92
|
+
Using `@./agents/executor.md` as execution persona, execute each task in the plan sequentially:
|
|
93
|
+
|
|
94
|
+
1. Read the task's `<files>`, `<action>`, `<verify>`, and `<done>` fields
|
|
95
|
+
2. Implement exactly what the action describes
|
|
96
|
+
3. Verify using the verify criteria
|
|
97
|
+
4. Commit atomically after each task:
|
|
98
|
+
|
|
99
|
+
```bash
|
|
100
|
+
git add [files modified]
|
|
101
|
+
git commit -m "[type]([phase]-[plan-id]): [task description]"
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
For checkpoint plans (`autonomous: false`), pause for human verification:
|
|
105
|
+
```
|
|
106
|
+
╔══════════════════════════════════════════════════════════════╗
|
|
107
|
+
║ CHECKPOINT: Human Action Required ║
|
|
108
|
+
╚══════════════════════════════════════════════════════════════╝
|
|
109
|
+
|
|
110
|
+
[What needs to be done / verified]
|
|
111
|
+
|
|
112
|
+
→ Reply "done" when complete, or describe any issues found
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## Step 6: Write SUMMARY.md
|
|
116
|
+
|
|
117
|
+
Write `${PLAN_FILE%-PLAN.md}-SUMMARY.md`:
|
|
118
|
+
|
|
119
|
+
```markdown
|
|
120
|
+
# Plan [plan-id] Summary
|
|
121
|
+
|
|
122
|
+
**Completed:** [date]
|
|
123
|
+
**Executed via:** execute-plan (isolated run)
|
|
124
|
+
|
|
125
|
+
## What was built
|
|
126
|
+
[2-4 sentences]
|
|
127
|
+
|
|
128
|
+
## Key files
|
|
129
|
+
- [file]: [what it does]
|
|
130
|
+
|
|
131
|
+
## Decisions made
|
|
132
|
+
- [Any implementation choices]
|
|
133
|
+
|
|
134
|
+
## Notes for downstream
|
|
135
|
+
- [Anything the next plan or phase should know]
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
## Step 7: Report
|
|
139
|
+
|
|
140
|
+
```
|
|
141
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
142
|
+
learnship ► PLAN [phase]-[plan-id] COMPLETE ✓
|
|
143
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
144
|
+
|
|
145
|
+
[Summary of what was built]
|
|
146
|
+
|
|
147
|
+
▶ If this was the last missing plan: execute-phase [phase] will skip already-done plans
|
|
148
|
+
and run the verifier to check the full phase goal.
|
|
149
|
+
```
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Project health check — stale files, uncommitted changes, missing artifacts, config drift
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
# Health
|
|
6
|
+
|
|
7
|
+
Validate `.planning/` directory integrity and report actionable issues. Optionally repairs auto-fixable problems.
|
|
8
|
+
|
|
9
|
+
**Usage:** `health` or `health --repair`
|
|
10
|
+
|
|
11
|
+
## Step 1: Parse Arguments
|
|
12
|
+
|
|
13
|
+
Check if `--repair` flag is present.
|
|
14
|
+
|
|
15
|
+
## Step 2: Check Project Exists
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
test -d .planning && echo "OK" || echo "MISSING"
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
If `.planning/` doesn't exist:
|
|
22
|
+
```
|
|
23
|
+
No .planning/ directory found.
|
|
24
|
+
|
|
25
|
+
This project hasn't been initialized. Run new-project to start.
|
|
26
|
+
```
|
|
27
|
+
Stop.
|
|
28
|
+
|
|
29
|
+
## Step 3: Run Health Checks
|
|
30
|
+
|
|
31
|
+
Run the following checks and classify each as error, warning, or info:
|
|
32
|
+
|
|
33
|
+
### Required Files
|
|
34
|
+
```bash
|
|
35
|
+
test -f .planning/PROJECT.md || echo "E002: PROJECT.md not found"
|
|
36
|
+
test -f .planning/ROADMAP.md || echo "E003: ROADMAP.md not found"
|
|
37
|
+
test -f .planning/STATE.md || echo "E004: STATE.md not found (repairable)"
|
|
38
|
+
test -f .planning/config.json || echo "W003: config.json not found (repairable)"
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Config Validity
|
|
42
|
+
```bash
|
|
43
|
+
cat .planning/config.json | python3 -c "import sys,json; json.load(sys.stdin)" 2>&1 || echo "E005: config.json parse error (repairable)"
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### State / Roadmap Consistency
|
|
47
|
+
```bash
|
|
48
|
+
# Check if STATE.md references a phase that exists in ROADMAP.md
|
|
49
|
+
CURRENT_PHASE=$(grep -E "^Phase:" .planning/STATE.md 2>/dev/null | head -1 | grep -oE "[0-9]+")
|
|
50
|
+
if [ -n "$CURRENT_PHASE" ]; then
|
|
51
|
+
grep -q "Phase ${CURRENT_PHASE}:" .planning/ROADMAP.md || echo "W002: STATE.md references phase ${CURRENT_PHASE} not found in roadmap (repairable)"
|
|
52
|
+
fi
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Phase Directory Checks
|
|
56
|
+
```bash
|
|
57
|
+
# Phases in ROADMAP but no directory
|
|
58
|
+
grep -oE "Phase [0-9]+:" .planning/ROADMAP.md | while read phase; do
|
|
59
|
+
num=$(echo "$phase" | grep -oE "[0-9]+")
|
|
60
|
+
padded=$(printf "%02d" $num)
|
|
61
|
+
ls .planning/phases/${padded}-* 2>/dev/null | head -1 || echo "W006: Phase ${num} in roadmap but no directory"
|
|
62
|
+
done
|
|
63
|
+
|
|
64
|
+
# Phase directories not in ROADMAP
|
|
65
|
+
for dir in .planning/phases/*/; do
|
|
66
|
+
slug=$(basename "$dir" | sed 's/^[0-9]*-//')
|
|
67
|
+
grep -q "$slug" .planning/ROADMAP.md || echo "W007: Directory $(basename $dir) not in roadmap"
|
|
68
|
+
done
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### Plans Without Summaries
|
|
72
|
+
```bash
|
|
73
|
+
for plan in .planning/phases/*/*-PLAN.md; do
|
|
74
|
+
summary="${plan%-PLAN.md}-SUMMARY.md"
|
|
75
|
+
test -f "$summary" || echo "I001: $(basename $plan) has no SUMMARY (may be in progress)"
|
|
76
|
+
done
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
### Uncommitted Changes
|
|
80
|
+
```bash
|
|
81
|
+
git status --short .planning/ 2>/dev/null | head -10
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Config Fields
|
|
85
|
+
```bash
|
|
86
|
+
# Check for required config keys
|
|
87
|
+
python3 -c "
|
|
88
|
+
import json
|
|
89
|
+
cfg = json.load(open('.planning/config.json'))
|
|
90
|
+
missing = []
|
|
91
|
+
for key in ['mode', 'granularity', 'model_profile', 'learning_mode']:
|
|
92
|
+
if key not in cfg:
|
|
93
|
+
missing.append(key)
|
|
94
|
+
if missing:
|
|
95
|
+
print('W004: config.json missing fields: ' + ', '.join(missing))
|
|
96
|
+
" 2>/dev/null
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
## Step 4: Format Output
|
|
100
|
+
|
|
101
|
+
```
|
|
102
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
103
|
+
learnship ► HEALTH CHECK
|
|
104
|
+
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
|
|
105
|
+
|
|
106
|
+
Status: HEALTHY | DEGRADED | BROKEN
|
|
107
|
+
Errors: [N] Warnings: [N] Info: [N]
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
**Errors** (must fix):
|
|
111
|
+
```
|
|
112
|
+
[E002] PROJECT.md not found
|
|
113
|
+
Fix: Run new-project to initialize
|
|
114
|
+
|
|
115
|
+
[E005] config.json parse error
|
|
116
|
+
Fix: Run health --repair to reset to defaults
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
**Warnings** (should fix):
|
|
120
|
+
```
|
|
121
|
+
[W002] STATE.md references phase 5, but only phases 1-3 exist in roadmap
|
|
122
|
+
Fix: Run health --repair to regenerate STATE.md
|
|
123
|
+
|
|
124
|
+
[W006] Phase 4 in roadmap but no directory
|
|
125
|
+
Fix: Create .planning/phases/04-[slug]/ manually
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
**Info** (no action needed):
|
|
129
|
+
```
|
|
130
|
+
[I001] 02-auth/02-01-PLAN.md has no SUMMARY.md
|
|
131
|
+
Note: May be in progress
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
**If uncommitted .planning/ changes:**
|
|
135
|
+
```
|
|
136
|
+
Uncommitted changes in .planning/:
|
|
137
|
+
M .planning/STATE.md
|
|
138
|
+
? .planning/phases/03-api/03-01-PLAN.md
|
|
139
|
+
|
|
140
|
+
Consider: git add .planning/ && git commit -m "docs: update planning artifacts"
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
**Footer if repairable issues and --repair not used:**
|
|
144
|
+
```
|
|
145
|
+
[N] issue(s) can be auto-repaired. Run: health --repair
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Step 5: Repair (if --repair flag)
|
|
149
|
+
|
|
150
|
+
Run repairs for each repairable issue found:
|
|
151
|
+
|
|
152
|
+
| Issue | Repair action |
|
|
153
|
+
|-------|--------------|
|
|
154
|
+
| `STATE.md not found` | Generate from ROADMAP.md structure with current phase from roadmap |
|
|
155
|
+
| `config.json not found` | Create with defaults from `templates/config.json` |
|
|
156
|
+
| `config.json parse error` | Reset to defaults (warn: loses custom settings) |
|
|
157
|
+
| `config.json missing fields` | Add missing fields with default values |
|
|
158
|
+
|
|
159
|
+
For each repair:
|
|
160
|
+
```bash
|
|
161
|
+
# Example: regenerate STATE.md
|
|
162
|
+
cp templates/state.md .planning/STATE.md
|
|
163
|
+
# Then fill in project name from PROJECT.md and current phase from ROADMAP.md
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
After repairs, re-run the health checks and report final status.
|
|
167
|
+
|
|
168
|
+
**Not repairable:**
|
|
169
|
+
- `PROJECT.md`, `ROADMAP.md` content (too risky to auto-generate)
|
|
170
|
+
- Phase directory renaming
|
|
171
|
+
- Orphaned plan cleanup
|