learnship 1.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (171) hide show
  1. package/.claude-plugin/plugin.json +26 -0
  2. package/.cursor-plugin/plugin.json +26 -0
  3. package/LICENSE +21 -0
  4. package/README.md +791 -0
  5. package/SKILL.md +86 -0
  6. package/agents/debugger.md +102 -0
  7. package/agents/executor.md +115 -0
  8. package/agents/learnship-debugger.md +146 -0
  9. package/agents/learnship-executor.md +155 -0
  10. package/agents/learnship-phase-researcher.md +128 -0
  11. package/agents/learnship-plan-checker.md +119 -0
  12. package/agents/learnship-planner.md +146 -0
  13. package/agents/learnship-verifier.md +157 -0
  14. package/agents/planner.md +109 -0
  15. package/agents/researcher.md +80 -0
  16. package/agents/verifier.md +114 -0
  17. package/bin/install.js +1242 -0
  18. package/bin/learnship.js +56 -0
  19. package/commands/learnship/add-phase.md +22 -0
  20. package/commands/learnship/add-tests.md +24 -0
  21. package/commands/learnship/add-todo.md +21 -0
  22. package/commands/learnship/audit-milestone.md +21 -0
  23. package/commands/learnship/check-todos.md +22 -0
  24. package/commands/learnship/cleanup.md +22 -0
  25. package/commands/learnship/complete-milestone.md +22 -0
  26. package/commands/learnship/debug.md +27 -0
  27. package/commands/learnship/decision-log.md +22 -0
  28. package/commands/learnship/diagnose-issues.md +23 -0
  29. package/commands/learnship/discovery-phase.md +24 -0
  30. package/commands/learnship/discuss-milestone.md +23 -0
  31. package/commands/learnship/discuss-phase.md +23 -0
  32. package/commands/learnship/execute-phase.md +27 -0
  33. package/commands/learnship/execute-plan.md +26 -0
  34. package/commands/learnship/health.md +20 -0
  35. package/commands/learnship/help.md +19 -0
  36. package/commands/learnship/insert-phase.md +22 -0
  37. package/commands/learnship/knowledge-base.md +21 -0
  38. package/commands/learnship/list-phase-assumptions.md +21 -0
  39. package/commands/learnship/ls.md +20 -0
  40. package/commands/learnship/map-codebase.md +23 -0
  41. package/commands/learnship/milestone-retrospective.md +21 -0
  42. package/commands/learnship/new-milestone.md +23 -0
  43. package/commands/learnship/new-project.md +24 -0
  44. package/commands/learnship/next.md +22 -0
  45. package/commands/learnship/pause-work.md +21 -0
  46. package/commands/learnship/plan-milestone-gaps.md +22 -0
  47. package/commands/learnship/plan-phase.md +24 -0
  48. package/commands/learnship/progress.md +20 -0
  49. package/commands/learnship/quick.md +27 -0
  50. package/commands/learnship/reapply-patches.md +21 -0
  51. package/commands/learnship/release.md +21 -0
  52. package/commands/learnship/remove-phase.md +23 -0
  53. package/commands/learnship/research-phase.md +23 -0
  54. package/commands/learnship/resume-work.md +21 -0
  55. package/commands/learnship/set-profile.md +21 -0
  56. package/commands/learnship/settings.md +21 -0
  57. package/commands/learnship/transition.md +21 -0
  58. package/commands/learnship/update.md +21 -0
  59. package/commands/learnship/validate-phase.md +22 -0
  60. package/commands/learnship/verify-work.md +23 -0
  61. package/cursor-rules/learnship.mdc +60 -0
  62. package/gemini-extension.json +10 -0
  63. package/hooks/hooks-claude.json +15 -0
  64. package/hooks/hooks-cursor.json +10 -0
  65. package/hooks/session-start +43 -0
  66. package/install.sh +254 -0
  67. package/learnship/references/design-commands.md +119 -0
  68. package/learnship/references/git-integration.md +249 -0
  69. package/learnship/references/learning-design.md +142 -0
  70. package/learnship/references/model-profiles.md +90 -0
  71. package/learnship/references/planning-config.md +184 -0
  72. package/learnship/references/questioning.md +162 -0
  73. package/learnship/references/ui-brand.md +160 -0
  74. package/learnship/references/verification-patterns.md +608 -0
  75. package/learnship/templates/agents.md +166 -0
  76. package/learnship/templates/context.md +72 -0
  77. package/learnship/templates/plan.md +202 -0
  78. package/learnship/templates/project.md +184 -0
  79. package/learnship/templates/requirements.md +231 -0
  80. package/learnship/templates/state.md +176 -0
  81. package/learnship/templates/uat.md +80 -0
  82. package/learnship/workflows/add-phase.md +84 -0
  83. package/learnship/workflows/add-tests.md +191 -0
  84. package/learnship/workflows/add-todo.md +108 -0
  85. package/learnship/workflows/audit-milestone.md +178 -0
  86. package/learnship/workflows/check-todos.md +138 -0
  87. package/learnship/workflows/cleanup.md +107 -0
  88. package/learnship/workflows/complete-milestone.md +191 -0
  89. package/learnship/workflows/debug.md +245 -0
  90. package/learnship/workflows/decision-log.md +131 -0
  91. package/learnship/workflows/diagnose-issues.md +145 -0
  92. package/learnship/workflows/discovery-phase.md +183 -0
  93. package/learnship/workflows/discuss-milestone.md +136 -0
  94. package/learnship/workflows/discuss-phase.md +244 -0
  95. package/learnship/workflows/execute-phase.md +345 -0
  96. package/learnship/workflows/execute-plan.md +149 -0
  97. package/learnship/workflows/health.md +171 -0
  98. package/learnship/workflows/help.md +153 -0
  99. package/learnship/workflows/insert-phase.md +106 -0
  100. package/learnship/workflows/knowledge-base.md +168 -0
  101. package/learnship/workflows/list-phase-assumptions.md +129 -0
  102. package/learnship/workflows/ls.md +145 -0
  103. package/learnship/workflows/map-codebase.md +142 -0
  104. package/learnship/workflows/milestone-retrospective.md +178 -0
  105. package/learnship/workflows/new-milestone.md +200 -0
  106. package/learnship/workflows/new-project.md +340 -0
  107. package/learnship/workflows/next.md +100 -0
  108. package/learnship/workflows/pause-work.md +122 -0
  109. package/learnship/workflows/plan-milestone-gaps.md +160 -0
  110. package/learnship/workflows/plan-phase.md +288 -0
  111. package/learnship/workflows/progress.md +118 -0
  112. package/learnship/workflows/quick.md +256 -0
  113. package/learnship/workflows/reapply-patches.md +130 -0
  114. package/learnship/workflows/release.md +217 -0
  115. package/learnship/workflows/remove-phase.md +128 -0
  116. package/learnship/workflows/research-phase.md +137 -0
  117. package/learnship/workflows/resume-work.md +162 -0
  118. package/learnship/workflows/set-profile.md +78 -0
  119. package/learnship/workflows/settings.md +204 -0
  120. package/learnship/workflows/sync-upstream-skills.md +269 -0
  121. package/learnship/workflows/transition.md +165 -0
  122. package/learnship/workflows/update.md +166 -0
  123. package/learnship/workflows/validate-phase.md +174 -0
  124. package/learnship/workflows/verify-work.md +264 -0
  125. package/package.json +62 -0
  126. package/references/design-commands.md +119 -0
  127. package/references/git-integration.md +249 -0
  128. package/references/learning-design.md +142 -0
  129. package/references/model-profiles.md +90 -0
  130. package/references/planning-config.md +184 -0
  131. package/references/questioning.md +162 -0
  132. package/references/ui-brand.md +160 -0
  133. package/references/verification-patterns.md +608 -0
  134. package/skills/agentic-learning/SKILL.md +373 -0
  135. package/skills/agentic-learning/references/either-or-format.md +161 -0
  136. package/skills/agentic-learning/references/learning-science.md +190 -0
  137. package/skills/agentic-learning/references/struggle-ladder.md +140 -0
  138. package/skills/impeccable/SKILL.md +125 -0
  139. package/skills/impeccable/adapt/SKILL.md +199 -0
  140. package/skills/impeccable/animate/SKILL.md +190 -0
  141. package/skills/impeccable/audit/SKILL.md +129 -0
  142. package/skills/impeccable/bolder/SKILL.md +132 -0
  143. package/skills/impeccable/clarify/SKILL.md +180 -0
  144. package/skills/impeccable/colorize/SKILL.md +158 -0
  145. package/skills/impeccable/critique/SKILL.md +118 -0
  146. package/skills/impeccable/delight/SKILL.md +317 -0
  147. package/skills/impeccable/distill/SKILL.md +137 -0
  148. package/skills/impeccable/extract/SKILL.md +95 -0
  149. package/skills/impeccable/frontend-design/SKILL.md +127 -0
  150. package/skills/impeccable/frontend-design/reference/color-and-contrast.md +132 -0
  151. package/skills/impeccable/frontend-design/reference/interaction-design.md +123 -0
  152. package/skills/impeccable/frontend-design/reference/motion-design.md +99 -0
  153. package/skills/impeccable/frontend-design/reference/responsive-design.md +114 -0
  154. package/skills/impeccable/frontend-design/reference/spatial-design.md +100 -0
  155. package/skills/impeccable/frontend-design/reference/typography.md +131 -0
  156. package/skills/impeccable/frontend-design/reference/ux-writing.md +107 -0
  157. package/skills/impeccable/harden/SKILL.md +358 -0
  158. package/skills/impeccable/normalize/SKILL.md +67 -0
  159. package/skills/impeccable/onboard/SKILL.md +243 -0
  160. package/skills/impeccable/optimize/SKILL.md +269 -0
  161. package/skills/impeccable/polish/SKILL.md +202 -0
  162. package/skills/impeccable/quieter/SKILL.md +118 -0
  163. package/skills/impeccable/teach-impeccable/SKILL.md +69 -0
  164. package/templates/agents.md +166 -0
  165. package/templates/config.json +22 -0
  166. package/templates/context.md +72 -0
  167. package/templates/plan.md +202 -0
  168. package/templates/project.md +184 -0
  169. package/templates/requirements.md +231 -0
  170. package/templates/state.md +176 -0
  171. package/templates/uat.md +80 -0
@@ -0,0 +1,191 @@
1
+ ---
2
+ description: Generate and add test coverage for a specific plan or phase post-execution
3
+ ---
4
+
5
+ # Add Tests
6
+
7
+ Generate unit and E2E tests for a completed phase. Classifies each changed file into unit (TDD), browser (E2E), or skip categories, presents a test plan for approval, then writes tests following RED-GREEN conventions.
8
+
9
+ **Usage:** `add-tests [N]` or `add-tests [N] [additional instructions]`
10
+
11
+ ## Step 1: Validate Phase
12
+
13
+ Phase number is required:
14
+ ```
15
+ Usage: add-tests [N] [optional instructions]
16
+ Example: add-tests 3
17
+ Example: add-tests 3 focus on edge cases in the pricing module
18
+ ```
19
+
20
+ Find the phase directory:
21
+ ```bash
22
+ ls .planning/phases/ | grep -E "^0*[N]-" | head -1
23
+ PHASE_DIR=".planning/phases/[matched]"
24
+ ```
25
+
26
+ Check that SUMMARY.md exists (phase must be executed):
27
+ ```bash
28
+ ls "$PHASE_DIR"/*-SUMMARY.md 2>/dev/null
29
+ ```
30
+
31
+ If no SUMMARY.md: stop — "Phase [N] hasn't been executed yet. Run `execute-phase [N]` first."
32
+
33
+ ## Step 2: Read Phase Artifacts
34
+
35
+ Read in priority order:
36
+ 1. All `*-SUMMARY.md` files — what was implemented, which files changed
37
+ 2. `CONTEXT.md` — acceptance criteria and user decisions
38
+ 3. `*-VERIFICATION.md` — user-verified scenarios (if UAT was done)
39
+
40
+ Extract the list of files modified by the phase from SUMMARY.md.
41
+
42
+ ## Step 3: Detect Test Infrastructure
43
+
44
+ ```bash
45
+ find . \( -name "jest.config.*" -o -name "vitest.config.*" -o -name "pytest.ini" -o -name "pyproject.toml" -o -name "playwright.config.*" \) -not -path "*/node_modules/*" 2>/dev/null
46
+
47
+ find . \( -name "*.test.*" -o -name "*.spec.*" -o -name "test_*.py" \) -not -path "*/node_modules/*" 2>/dev/null | head -10
48
+ ```
49
+
50
+ Identify: test framework, E2E framework (if any), how to run tests, existing test file patterns and locations.
51
+
52
+ ## Step 4: Classify Each File
53
+
54
+ For each file modified by the phase, classify into one of three categories:
55
+
56
+ **Unit (TDD)** — when the file contains:
57
+ - Business logic: calculations, pricing, tax, discounts
58
+ - Data transformations: mapping, filtering, aggregation, formatting
59
+ - Validators: input validation, schema validation, business rules
60
+ - State machines: status transitions, workflow steps
61
+ - Pure utilities: string manipulation, date handling, number formatting
62
+
63
+ **E2E (Browser)** — when the file produces:
64
+ - Keyboard shortcut behavior
65
+ - Navigation and routing
66
+ - Form interactions: submit, validation errors, focus
67
+ - Multi-step user flows
68
+ - Modal dialogs and overlays
69
+ - Data grids: sorting, filtering, inline editing
70
+
71
+ **Skip** — when the file is:
72
+ - UI layout/styling only (CSS, visual appearance)
73
+ - Configuration files, env vars, feature flags
74
+ - Glue code: DI setup, middleware registration, routing tables
75
+ - Database migrations or schema files
76
+ - Simple CRUD with no business logic
77
+ - Pure type definitions with no logic
78
+
79
+ Read each file to verify — don't classify by filename alone.
80
+
81
+ ## Step 5: Present Classification
82
+
83
+ ```
84
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
85
+ learnship ► ADD TESTS — Phase [N]: [name]
86
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
87
+
88
+ Files classified for testing:
89
+
90
+ Unit Tests ([N] files):
91
+ - [file]: [reason — "contains pricing calculation logic"]
92
+ - [file]: [reason]
93
+
94
+ E2E Tests ([M] files):
95
+ - [file]: [reason — "login form with validation"]
96
+
97
+ Skipped ([K] files):
98
+ - [file]: [reason — "CSS-only, no logic"]
99
+
100
+ Proceed with this plan? (yes / adjust classification)
101
+ ```
102
+
103
+ Wait for confirmation.
104
+
105
+ ## Step 6: Generate Unit Tests
106
+
107
+ For each TDD file, write unit tests:
108
+
109
+ **File location:** Match the project's test file convention (e.g., `src/utils/__tests__/pricing.test.ts` or `tests/test_pricing.py`).
110
+
111
+ **Pattern:**
112
+ ```
113
+ describe('[function/module name]', () => {
114
+ it('[behavior description]', () => {
115
+ // Arrange
116
+ const input = [test input]
117
+ // Act
118
+ const result = [function call]
119
+ // Assert
120
+ expect(result).toBe([expected])
121
+ })
122
+
123
+ it('handles edge case: [edge case description]', () => {
124
+ ...
125
+ })
126
+ })
127
+ ```
128
+
129
+ For each test file written:
130
+ - Cover the happy path
131
+ - Cover 2-3 edge cases (empty input, boundary values, error conditions)
132
+ - Apply any extra instructions provided
133
+
134
+ Run tests to verify they pass:
135
+ ```bash
136
+ [test command] [test file path]
137
+ ```
138
+
139
+ If tests fail: fix them (up to 3 attempts). If tests still fail after 3 attempts, note the blocker and skip that file.
140
+
141
+ ## Step 7: Generate E2E Tests (if applicable)
142
+
143
+ If E2E framework exists (Playwright, Cypress, etc.), write E2E tests for classified files:
144
+
145
+ Match existing E2E test conventions in the project. Focus on user-visible behavior described in CONTEXT.md and VERIFICATION.md.
146
+
147
+ If no E2E framework exists: note it and skip E2E generation.
148
+
149
+ ## Step 8: Commit Tests
150
+
151
+ Commit unit and E2E tests separately:
152
+
153
+ ```bash
154
+ git add [unit test files]
155
+ git commit -m "test([padded_phase]): add unit tests for [brief description]"
156
+
157
+ git add [e2e test files]
158
+ git commit -m "test([padded_phase]): add E2E tests for [brief description]"
159
+ ```
160
+
161
+ ## Step 9: Report
162
+
163
+ ```
164
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
165
+ learnship ► TESTS ADDED ✓
166
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
167
+
168
+ Unit tests: [N] files, [M] test cases
169
+ E2E tests: [K] files (or "none — no E2E framework detected")
170
+ Skipped: [J] files
171
+
172
+ [If any blockers:]
173
+ ⚠️ [N] file(s) could not be tested: [reasons]
174
+
175
+ ▶ Next: validate-phase [N] — map tests to requirements
176
+ or: verify-work [N] — manual acceptance testing
177
+ ```
178
+
179
+ ---
180
+
181
+ ## Learning Checkpoint
182
+
183
+ Read `learning_mode` from `.planning/config.json`.
184
+
185
+ **If `auto`:** Offer:
186
+
187
+ > 💡 **Learning moment:** Tests written. Test what you know about the behaviors you just covered:
188
+ >
189
+ > `@agentic-learning quiz [phase topic]` — Quiz yourself on the behaviors these tests encode. If you can't explain *why* each test case exists, the knowledge is fragile.
190
+
191
+ **If `manual`:** Add quietly: *"Tip: `@agentic-learning quiz [topic]` to verify you understand what the tests are actually testing."*
@@ -0,0 +1,108 @@
1
+ ---
2
+ description: Capture a todo/idea mid-session without interrupting flow
3
+ ---
4
+
5
+ # Add Todo
6
+
7
+ Capture an idea, task, or issue that surfaces during a session. Fast "thought → capture → continue" — saves context without losing momentum.
8
+
9
+ **Usage:** `add-todo [description]` or just `add-todo` to capture from recent conversation.
10
+
11
+ ## Step 1: Ensure Directories Exist
12
+
13
+ ```bash
14
+ mkdir -p .planning/todos/pending .planning/todos/done
15
+ ```
16
+
17
+ ## Step 2: Extract Content
18
+
19
+ **With description argument:** Use it as the title/focus.
20
+
21
+ **Without argument:** Read recent conversation context to extract:
22
+ - The specific problem, idea, or task being discussed
23
+ - Relevant file paths mentioned
24
+ - Technical details (error messages, constraints, line numbers)
25
+
26
+ Formulate:
27
+ - `title` — 3-10 word descriptive title (action verb preferred, e.g., "Add auth token refresh")
28
+ - `problem` — what's wrong or why this is needed (enough context for future Cascade sessions)
29
+ - `solution` — approach hints, or "TBD" if just an idea
30
+ - `files` — relevant file paths with line numbers from context
31
+
32
+ ## Step 3: Infer Area
33
+
34
+ Determine area from file paths mentioned:
35
+
36
+ | Path pattern | Area |
37
+ |--------------|------|
38
+ | `src/api/`, `api/` | `api` |
39
+ | `src/components/`, `src/ui/` | `ui` |
40
+ | `src/auth/`, `auth/` | `auth` |
41
+ | `src/db/`, `database/` | `database` |
42
+ | `tests/`, `__tests__/`, `*.test.*` | `testing` |
43
+ | `docs/` | `docs` |
44
+ | `.planning/` | `planning` |
45
+ | `scripts/`, `bin/` | `tooling` |
46
+ | Unclear or none | `general` |
47
+
48
+ ## Step 4: Check for Duplicates
49
+
50
+ ```bash
51
+ ls .planning/todos/pending/ 2>/dev/null
52
+ grep -rl "[key words from title]" .planning/todos/pending/ 2>/dev/null
53
+ ```
54
+
55
+ If a similar todo exists, show it and ask: "A similar todo already exists: [title]. Create anyway, or update the existing one?"
56
+
57
+ ## Step 5: Write Todo File
58
+
59
+ Generate a date-based slug: `YYYY-MM-DD-[slug].md`
60
+
61
+ Write to `.planning/todos/pending/[filename]`:
62
+
63
+ ```markdown
64
+ ---
65
+ created: [ISO datetime]
66
+ title: [title]
67
+ area: [area]
68
+ files:
69
+ - [file:line if applicable]
70
+ ---
71
+
72
+ ## Problem
73
+
74
+ [problem description — enough context for future Cascade to understand weeks later, without re-reading the full conversation]
75
+
76
+ ## Solution
77
+
78
+ [approach hints or "TBD — need to investigate"]
79
+ ```
80
+
81
+ ## Step 6: Update STATE.md
82
+
83
+ If `.planning/STATE.md` exists, update the Pending Todos count under Accumulated Context:
84
+
85
+ ```bash
86
+ grep -c "^" .planning/todos/pending/*.md 2>/dev/null
87
+ ```
88
+
89
+ Update the `### Pending Todos` section with the new count and latest title.
90
+
91
+ ## Step 7: Commit
92
+
93
+ ```bash
94
+ git add ".planning/todos/pending/[filename]" .planning/STATE.md
95
+ git commit -m "docs: capture todo — [title]"
96
+ ```
97
+
98
+ ## Step 8: Confirm
99
+
100
+ ```
101
+ Todo saved: .planning/todos/pending/[filename]
102
+
103
+ [title]
104
+ Area: [area]
105
+ Files: [count] referenced
106
+
107
+ Continue with current work, or check all todos with check-todos.
108
+ ```
@@ -0,0 +1,178 @@
1
+ ---
2
+ description: Verify milestone met its definition of done — requirement coverage, integration check, stub detection
3
+ ---
4
+
5
+ # Audit Milestone
6
+
7
+ Pre-release audit that aggregates phase verifications, checks cross-phase integration, validates requirement coverage, and detects stubs/placeholders. Run before `/complete-milestone`.
8
+
9
+ **Use when:** All phases are complete and you want to verify the milestone is actually done before archiving.
10
+
11
+ ## Step 1: Determine Milestone Scope
12
+
13
+ Read `.planning/ROADMAP.md` and `.planning/REQUIREMENTS.md`.
14
+
15
+ Find all phases in the current milestone (all phases in ROADMAP.md that aren't in a completed milestone archive).
16
+
17
+ Display:
18
+ ```
19
+ Auditing milestone: [VERSION] [Name]
20
+ Phases in scope: [list of phase numbers and names]
21
+ Requirements in scope: [N] requirements ([list of REQ-IDs])
22
+ ```
23
+
24
+ ## Step 2: Read All Phase Verifications
25
+
26
+ For each phase directory, read its VERIFICATION.md:
27
+ ```bash
28
+ for phase_dir in .planning/phases/*/; do
29
+ cat "${phase_dir}"*-VERIFICATION.md 2>/dev/null
30
+ done
31
+ ```
32
+
33
+ From each VERIFICATION.md, extract:
34
+ - **Status:** `passed` | `gaps_found` | `human_needed`
35
+ - **Gaps:** any items that failed
36
+ - **Requirements coverage table:** which REQ-IDs were verified
37
+
38
+ **If any phase is missing VERIFICATION.md:** flag as `unverified` — this is a blocker.
39
+
40
+ ## Step 3: Check Requirements Coverage
41
+
42
+ Cross-reference three sources for each requirement:
43
+
44
+ **Source A — REQUIREMENTS.md traceability:**
45
+ ```bash
46
+ grep -E "^\|.*REQ-" .planning/REQUIREMENTS.md
47
+ ```
48
+
49
+ **Source B — Phase VERIFICATION.md tables:**
50
+ Extract per-requirement status from each phase's verification file.
51
+
52
+ **Source C — Phase SUMMARY.md:**
53
+ Check each SUMMARY.md for requirements-completed notes.
54
+
55
+ For each REQ-ID, determine status:
56
+
57
+ | VERIFICATION status | SUMMARY mentions it | REQUIREMENTS checkbox | → Audit status |
58
+ |--------------------|--------------------|----------------------|----------------|
59
+ | passed | yes | `[x]` | **satisfied** |
60
+ | passed | yes | `[ ]` | **satisfied** (fix checkbox) |
61
+ | gaps_found | any | any | **unsatisfied** |
62
+ | missing | any | any | **unsatisfied** |
63
+
64
+ Any `unsatisfied` requirement = milestone audit `gaps_found`.
65
+
66
+ **Orphan detection:** Requirements in REQUIREMENTS.md that appear in no phase VERIFICATION.md → flag as `orphaned` (treated as unsatisfied).
67
+
68
+ ## Step 4: Cross-Phase Integration Check
69
+
70
+ Using `@./agents/verifier.md` in integration mode, check cross-phase wiring:
71
+
72
+ Read all SUMMARY.md files to understand what each phase exported (APIs, components, utilities).
73
+
74
+ Check:
75
+ 1. **Import chains:** Do modules that claim to export X actually export it? Do modules that import X use the correct path and signature?
76
+ 2. **API contracts:** Do API routes match what the UI calls? Are response shapes consistent?
77
+ 3. **E2E user flows:** Pick the 3-5 most important user journeys. Trace each through the codebase — does every step have a real implementation?
78
+ 4. **Stub detection:** Scan for `// TODO`, `// FIXME`, placeholder strings, `return null`/`return undefined` in non-trivial functions, empty bodies.
79
+
80
+ ```bash
81
+ grep -rn "TODO\|FIXME\|PLACEHOLDER\|return null\|return undefined" src/ --include="*.ts" --include="*.tsx" --include="*.js" 2>/dev/null | grep -v "node_modules\|\.test\." | head -30
82
+ ```
83
+
84
+ ## Step 5: Compile Audit Report
85
+
86
+ Write `.planning/[VERSION]-MILESTONE-AUDIT.md`:
87
+
88
+ ```markdown
89
+ ---
90
+ status: passed | gaps_found
91
+ milestone: [VERSION]
92
+ audited: [date]
93
+ gaps:
94
+ requirements: [list of unsatisfied REQ-IDs]
95
+ integration: [list of broken cross-phase connections]
96
+ flows: [list of broken E2E flows]
97
+ stubs: [list of stub locations]
98
+ ---
99
+
100
+ # Milestone Audit: [VERSION] [Name]
101
+
102
+ ## Requirements Coverage
103
+
104
+ | REQ-ID | Description | Phase | Status |
105
+ |--------|-------------|-------|--------|
106
+ | AUTH-01 | [description] | 02 | ✓ satisfied |
107
+ | DASH-01 | [description] | 03 | ✗ unsatisfied |
108
+
109
+ **Total:** [X]/[Y] requirements satisfied
110
+
111
+ ## Phase Verification Summary
112
+
113
+ | Phase | Status | Notes |
114
+ |-------|--------|-------|
115
+ | 01 — [Name] | ✓ passed | |
116
+ | 02 — [Name] | ✗ gaps_found | [gap summary] |
117
+
118
+ ## Integration Findings
119
+
120
+ ### Cross-Phase Wiring
121
+ [What's connected correctly, what's broken]
122
+
123
+ ### E2E Flows
124
+ [Which flows work, which are broken and where]
125
+
126
+ ## Stubs Found
127
+
128
+ [List of TODO/FIXME/placeholder locations, or "None found"]
129
+
130
+ ## Verdict
131
+
132
+ [PASSED — all requirements satisfied, no critical gaps]
133
+ OR
134
+ [GAPS FOUND — N requirements unsatisfied, M integration issues]
135
+ ```
136
+
137
+ ## Step 6: Present Audit Results
138
+
139
+ ```
140
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
141
+ learnship ► MILESTONE AUDIT [VERSION]
142
+ ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
143
+
144
+ Requirements: [X]/[Y] satisfied
145
+ Integration: [passed | N issues found]
146
+ Stubs: [none | N found]
147
+
148
+ Status: [PASSED ✓ | GAPS FOUND ⚠️]
149
+ ```
150
+
151
+ **If PASSED:**
152
+ ```
153
+ Milestone [VERSION] is ready to ship.
154
+
155
+ ▶ Next: complete-milestone
156
+ ```
157
+
158
+ **If GAPS FOUND:**
159
+ ```
160
+ [N] gap(s) require attention before release:
161
+
162
+ [List gaps]
163
+
164
+ ▶ Next: plan-milestone-gaps — create fix phases for all gaps
165
+ OR: complete-milestone — ship anyway (mark gaps as known issues)
166
+ ```
167
+
168
+ ---
169
+
170
+ ## Learning Checkpoint
171
+
172
+ Read `learning_mode` from `.planning/config.json`.
173
+
174
+ **If `auto`:** Offer:
175
+
176
+ > 💡 **Learning moment:** Audit complete. Before planning fixes:
177
+ >
178
+ > `@agentic-learning reflect` — What were the gap patterns? Were they requirements misses, integration oversights, or execution stubs? Understanding *why* gaps happened improves the next milestone.
@@ -0,0 +1,138 @@
1
+ ---
2
+ description: Review and act on all pending todos captured with add-todo
3
+ ---
4
+
5
+ # Check Todos
6
+
7
+ List all pending todos, select one to review, and route to the appropriate action.
8
+
9
+ **Usage:** `check-todos` or `check-todos [area]` to filter by area.
10
+
11
+ ## Step 1: Load Todos
12
+
13
+ ```bash
14
+ ls .planning/todos/pending/ 2>/dev/null | sort
15
+ ```
16
+
17
+ If no pending todos:
18
+ ```
19
+ No pending todos.
20
+
21
+ Todos are captured during work sessions with add-todo.
22
+ ```
23
+ Stop.
24
+
25
+ ## Step 2: Apply Area Filter (if specified)
26
+
27
+ If an area argument was provided (e.g., `check-todos api`), filter to only show todos matching that area:
28
+ ```bash
29
+ grep -l "^area: api" .planning/todos/pending/*.md 2>/dev/null
30
+ ```
31
+
32
+ Valid areas: `api`, `ui`, `auth`, `database`, `testing`, `docs`, `planning`, `tooling`, `general`.
33
+
34
+ If filter yields no results: "No todos in area '[area]'. Showing all todos instead."
35
+
36
+ ## Step 3: List Todos
37
+
38
+ Read frontmatter from each todo file and display as a numbered list:
39
+
40
+ ```
41
+ Pending Todos ([N] total):
42
+
43
+ 1. [title] (area: [area], [relative age — e.g., "2d ago"])
44
+ 2. [title] (area: [area], [relative age])
45
+ 3. [title] (area: [area], [relative age])
46
+
47
+ Reply with a number to view details, or 'q' to exit.
48
+ ```
49
+
50
+ Wait for selection.
51
+
52
+ ## Step 4: Show Todo Detail
53
+
54
+ Read the full todo file:
55
+
56
+ ```
57
+ ## [title]
58
+
59
+ Area: [area]
60
+ Created: [date] ([relative age] ago)
61
+ Files: [list of file:line references, or "None"]
62
+
63
+ ### Problem
64
+ [problem content]
65
+
66
+ ### Solution
67
+ [solution content]
68
+ ```
69
+
70
+ If files are listed, briefly check if they still exist and note if any were deleted or moved.
71
+
72
+ ## Step 5: Check Roadmap Relevance
73
+
74
+ ```bash
75
+ cat .planning/ROADMAP.md 2>/dev/null
76
+ ```
77
+
78
+ Check if the todo's area or files overlap with any upcoming (not yet executed) phase. If yes, note: "This todo may relate to Phase [N]: [name]."
79
+
80
+ ## Step 6: Offer Actions
81
+
82
+ Present actions based on context:
83
+
84
+ **If todo relates to a roadmap phase:**
85
+ ```
86
+ This todo relates to Phase [N]: [name].
87
+
88
+ Actions:
89
+ 1. Work on it now — move to done, start working immediately
90
+ 2. Note for Phase [N] — keep pending, bring up when planning that phase
91
+ 3. Brainstorm approach — think through the problem before deciding
92
+ 4. Back to list
93
+
94
+ ```
95
+
96
+ **If no roadmap match:**
97
+ ```
98
+ Actions:
99
+ 1. Work on it now — move to done, start working immediately
100
+ 2. Create a phase — add a new phase to the roadmap for this work
101
+ 3. Brainstorm approach — think through the problem before deciding
102
+ 4. Back to list
103
+ ```
104
+
105
+ Wait for choice.
106
+
107
+ ## Step 7: Execute Action
108
+
109
+ **Work on it now:**
110
+ ```bash
111
+ mv ".planning/todos/pending/[filename]" ".planning/todos/done/"
112
+ git add ".planning/todos/pending/[filename]" ".planning/todos/done/[filename]"
113
+ git commit -m "docs: start work on todo — [title]"
114
+ ```
115
+
116
+ Present the problem and solution context. Begin work, or ask how to proceed.
117
+
118
+ **Note for Phase [N]:**
119
+ Keep in pending. Remind at planning time. Return to list.
120
+
121
+ **Create a phase:**
122
+ Suggest: `add-phase [description from todo title]`. Keep todo in pending. User runs the command.
123
+
124
+ **Brainstorm approach:**
125
+ Keep in pending. Begin discussing the problem — what approaches exist, trade-offs, what to investigate.
126
+
127
+ **Back to list:**
128
+ Return to Step 3.
129
+
130
+ ## Step 8: Update STATE.md
131
+
132
+ After any action that changes the todo count:
133
+
134
+ ```bash
135
+ PENDING=$(ls .planning/todos/pending/*.md 2>/dev/null | wc -l)
136
+ ```
137
+
138
+ Update the `### Pending Todos` section in STATE.md with the new count.