maestro-flow 0.3.43 → 0.3.44

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 (169) hide show
  1. package/.claude/commands/learn-decompose.md +10 -15
  2. package/.claude/commands/learn-follow.md +11 -16
  3. package/.claude/commands/learn-investigate.md +18 -22
  4. package/.claude/commands/learn-retro.md +23 -26
  5. package/.claude/commands/learn-second-opinion.md +11 -16
  6. package/.claude/commands/maestro-analyze.md +8 -0
  7. package/.claude/commands/maestro-brainstorm.md +8 -0
  8. package/.claude/commands/maestro-execute.md +11 -3
  9. package/.claude/commands/maestro-learn.md +4 -4
  10. package/.claude/commands/maestro-milestone-complete.md +6 -6
  11. package/.claude/commands/maestro-plan.md +8 -0
  12. package/.claude/commands/maestro-ralph-execute.md +1 -2
  13. package/.claude/commands/maestro-tools-execute.md +117 -0
  14. package/.claude/commands/maestro-tools-register.md +137 -0
  15. package/.claude/commands/maestro-ui-codify.md +67 -0
  16. package/.claude/commands/manage-harvest.md +1 -1
  17. package/.claude/commands/manage-learn.md +5 -7
  18. package/.claude/commands/manage-wiki.md +1 -1
  19. package/.claude/commands/quality-auto-test.md +1 -1
  20. package/.claude/commands/quality-debug.md +8 -0
  21. package/.claude/commands/quality-retrospective.md +4 -5
  22. package/.claude/commands/quality-review.md +8 -0
  23. package/.claude/commands/spec-add.md +25 -4
  24. package/.claude/commands/spec-load.md +26 -6
  25. package/.claude/commands/spec-setup.md +2 -2
  26. package/.claude/commands/wiki-connect.md +1 -1
  27. package/.claude/commands/wiki-digest.md +5 -6
  28. package/.claude/skills/codify-to-knowhow/SKILL.md +167 -0
  29. package/.claude/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  30. package/.claude/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  31. package/.claude/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  32. package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  33. package/.codex/skills/codify-to-knowhow/SKILL.md +427 -0
  34. package/.codex/skills/learn-decompose/SKILL.md +8 -8
  35. package/.codex/skills/learn-follow/SKILL.md +6 -6
  36. package/.codex/skills/learn-investigate/SKILL.md +4 -4
  37. package/.codex/skills/learn-retro/SKILL.md +7 -7
  38. package/.codex/skills/learn-second-opinion/SKILL.md +6 -6
  39. package/.codex/skills/maestro-analyze/SKILL.md +491 -491
  40. package/.codex/skills/maestro-collab/SKILL.md +1 -1
  41. package/.codex/skills/maestro-learn/SKILL.md +1 -1
  42. package/.codex/skills/maestro-milestone-complete/SKILL.md +122 -122
  43. package/.codex/skills/maestro-plan/SKILL.md +485 -485
  44. package/.codex/skills/maestro-tools-execute/SKILL.md +105 -0
  45. package/.codex/skills/maestro-tools-register/SKILL.md +144 -0
  46. package/.codex/skills/maestro-ui-codify/SKILL.md +398 -0
  47. package/.codex/skills/maestro-verify/SKILL.md +486 -486
  48. package/.codex/skills/manage-harvest/SKILL.md +3 -3
  49. package/.codex/skills/manage-issue-discover/SKILL.md +431 -431
  50. package/.codex/skills/manage-learn/SKILL.md +13 -13
  51. package/.codex/skills/manage-wiki/SKILL.md +1 -1
  52. package/.codex/skills/quality-auto-test/SKILL.md +553 -553
  53. package/.codex/skills/quality-refactor/SKILL.md +151 -151
  54. package/.codex/skills/quality-retrospective/SKILL.md +6 -6
  55. package/.codex/skills/spec-add/SKILL.md +17 -4
  56. package/.codex/skills/spec-load/SKILL.md +24 -28
  57. package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
  58. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  59. package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
  60. package/.codex/skills/team-testing/roles/executor/role.md +1 -1
  61. package/.codex/skills/team-testing/roles/generator/role.md +1 -1
  62. package/.codex/skills/wiki-connect/SKILL.md +5 -5
  63. package/.codex/skills/wiki-digest/SKILL.md +8 -8
  64. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +1 -1
  65. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  66. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -1
  67. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  68. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +2 -2
  69. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  70. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.d.ts +1 -1
  71. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js +1 -1
  72. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js.map +1 -1
  73. package/dashboard/dist-server/dashboard/src/server/wiki/search.js +2 -2
  74. package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
  75. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +7 -3
  76. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +47 -15
  77. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  78. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
  79. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  80. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +1 -2
  81. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +3 -52
  82. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +67 -21
  84. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +6 -1
  86. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +1 -11
  87. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
  88. package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +7 -4
  89. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +27 -12
  90. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  91. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +10 -2
  92. package/dashboard/dist-server/src/tools/spec-entry-parser.js +46 -12
  93. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
  94. package/dashboard/dist-server/src/tools/spec-loader.d.ts +6 -2
  95. package/dashboard/dist-server/src/tools/spec-loader.js +119 -23
  96. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  97. package/dist/src/commands/knowhow.d.ts.map +1 -1
  98. package/dist/src/commands/knowhow.js +21 -2
  99. package/dist/src/commands/knowhow.js.map +1 -1
  100. package/dist/src/commands/spec.d.ts +1 -1
  101. package/dist/src/commands/spec.d.ts.map +1 -1
  102. package/dist/src/commands/spec.js +78 -4
  103. package/dist/src/commands/spec.js.map +1 -1
  104. package/dist/src/commands/wiki.d.ts.map +1 -1
  105. package/dist/src/commands/wiki.js +51 -3
  106. package/dist/src/commands/wiki.js.map +1 -1
  107. package/dist/src/hooks/keyword-spec-injector.js +1 -1
  108. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  109. package/dist/src/hooks/plugins/spec-injection-plugin.js +11 -11
  110. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  111. package/dist/src/hooks/spec-injector.d.ts +1 -0
  112. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  113. package/dist/src/hooks/spec-injector.js +55 -22
  114. package/dist/src/hooks/spec-injector.js.map +1 -1
  115. package/dist/src/hooks/wiki-role-loader.d.ts +18 -0
  116. package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -0
  117. package/dist/src/hooks/wiki-role-loader.js +43 -0
  118. package/dist/src/hooks/wiki-role-loader.js.map +1 -0
  119. package/dist/src/tools/spec-entry-parser.d.ts +10 -2
  120. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  121. package/dist/src/tools/spec-entry-parser.js +46 -12
  122. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  123. package/dist/src/tools/spec-init.d.ts.map +1 -1
  124. package/dist/src/tools/spec-init.js +19 -0
  125. package/dist/src/tools/spec-init.js.map +1 -1
  126. package/dist/src/tools/spec-loader.d.ts +6 -2
  127. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  128. package/dist/src/tools/spec-loader.js +119 -23
  129. package/dist/src/tools/spec-loader.js.map +1 -1
  130. package/dist/src/tools/spec-writer.d.ts +6 -1
  131. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  132. package/dist/src/tools/spec-writer.js +29 -2
  133. package/dist/src/tools/spec-writer.js.map +1 -1
  134. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  135. package/dist/src/tools/store-knowhow.js +56 -27
  136. package/dist/src/tools/store-knowhow.js.map +1 -1
  137. package/package.json +1 -1
  138. package/workflows/analyze.md +2 -2
  139. package/workflows/auto-test.md +2 -2
  140. package/workflows/brainstorm.md +1 -1
  141. package/workflows/codebase-rebuild.md +1 -1
  142. package/workflows/codebase-refresh.md +1 -1
  143. package/workflows/debug.md +1 -1
  144. package/workflows/execute.md +3 -3
  145. package/workflows/harvest.md +13 -13
  146. package/workflows/integration-test.md +2 -2
  147. package/workflows/issue-discover.md +1 -1
  148. package/workflows/knowhow.md +72 -11
  149. package/workflows/learn.md +70 -58
  150. package/workflows/map.md +1 -1
  151. package/workflows/milestone-complete.md +2 -2
  152. package/workflows/plan.md +1 -1
  153. package/workflows/quick.md +1 -1
  154. package/workflows/refactor.md +1 -1
  155. package/workflows/retrospective.md +51 -57
  156. package/workflows/review.md +1 -1
  157. package/workflows/roadmap-common.md +1 -1
  158. package/workflows/specs-add.md +11 -2
  159. package/workflows/specs-load.md +17 -15
  160. package/workflows/test-gen.md +1 -1
  161. package/workflows/tools-spec.md +98 -0
  162. package/workflows/ui-codify-extract.md +373 -0
  163. package/workflows/ui-codify-knowhow.md +258 -0
  164. package/workflows/ui-codify-package.md +161 -0
  165. package/workflows/ui-codify.md +225 -0
  166. package/workflows/verify.md +1 -1
  167. package/workflows/wiki-connect.md +7 -7
  168. package/workflows/wiki-digest.md +13 -13
  169. package/workflows/wiki-manage.md +1 -1
@@ -67,7 +67,7 @@ Scan `.workflow/` for harvestable artifacts. Each source type has a known struct
67
67
  | `debug` | `.workflow/.debug/*/` | `debug-log.md`, `hypothesis-*.md` | directory name |
68
68
  | `scratchpad` | `.workflow/.scratchpad/` | `*.md`, `*.json` | filename |
69
69
  | `session` | `.workflow/active/WFS-*/` | `workflow-session.json` | `WFS-*` |
70
- | `learning` | `.workflow/learning/` | `lessons.jsonl`, `digest-*.md`, `*.md` | filename |
70
+ | `knowhow` | `.workflow/knowhow/` | `*.md`, `digest-*.md` | filename |
71
71
 
72
72
  Scan each source type (filtered by `--source`). For each matching directory/file within `--recent` window, extract: `source_type`, `id`, `path`, `title` (from JSON or H1), `updated_at`, `summary`, `file_count`.
73
73
 
@@ -143,8 +143,8 @@ Parse content to identify discrete knowledge items. Each source type has specifi
143
143
 
144
144
  **Debug (`debug-log.md`, `hypothesis-*.md`):**
145
145
  - Final diagnosis → bug fragment
146
- - Verified hypothesis → pattern/lesson fragment
147
- - Rejected hypotheses with reasoning → lesson fragment
146
+ - Verified hypothesis → pattern/knowhow fragment
147
+ - Rejected hypotheses with reasoning → knowhow fragment
148
148
 
149
149
  **Scratchpad (*.md):**
150
150
  - Markdown sections → generic fragments
@@ -155,8 +155,8 @@ Parse content to identify discrete knowledge items. Each source type has specifi
155
155
  - `key_decisions[]` → decision fragments
156
156
  - `deferred_items[]` → issue fragments
157
157
 
158
- **Learning (`lessons.jsonl`):**
159
- - Each lesson line lesson fragment (check if already routed to wiki/spec/issue)
158
+ **Learning Insights (`specs/learnings.md`):**
159
+ - Each `<spec-entry>`learning fragment (check if already routed to wiki/spec/issue)
160
160
 
161
161
  Each fragment gets:
162
162
  ```
@@ -167,7 +167,7 @@ fragment = {
167
167
  title: extracted or inferred,
168
168
  content: raw text,
169
169
  tags: extracted from context,
170
- category: "finding" | "decision" | "pattern" | "bug" | "risk" | "task" | "lesson" | "recommendation",
170
+ category: "finding" | "decision" | "pattern" | "bug" | "risk" | "task" | "knowhow" | "recommendation",
171
171
  confidence: 0.0-1.0 (based on specificity and actionability)
172
172
  }
173
173
  ```
@@ -190,7 +190,7 @@ For each fragment, determine the best routing target (unless `--to` forces a spe
190
190
  | `bug` | issue or spec (bug) | Active bugs → issue; fixed bugs → spec learnings |
191
191
  | `risk` | issue | Unmitigated risks → trackable issues |
192
192
  | `task` | issue | Unfinished work → trackable issues |
193
- | `lesson` | wiki (lesson) | Generalizable insights → wiki knowledge |
193
+ | `knowhow` | wiki (knowhow) | Generalizable insights → wiki knowledge |
194
194
  | `recommendation` | wiki (note) or issue | Actionable recommendations → issue; informational → wiki |
195
195
 
196
196
  ### Override with `--to`
@@ -214,7 +214,7 @@ Fragments extracted: 8 (filtered from 12 by confidence ≥ 0.5)
214
214
 
215
215
  → Wiki (3 entries):
216
216
  [note] "SQL injection vector in user input" tags: security, sql
217
- [lesson] "Parameterized queries prevent injection" tags: security, pattern
217
+ [knowhow] "Parameterized queries prevent injection" tags: security, pattern
218
218
  [spec] "Auth token rotation policy" tags: auth, security
219
219
 
220
220
  → Spec (2 entries):
@@ -239,11 +239,11 @@ Execute the routing plan. Each target uses existing infrastructure:
239
239
 
240
240
  ### 6a. Wiki routing
241
241
 
242
- Create via `maestro wiki create --type <wiki_type> --slug harvest-<source_type>-<short_id> --title --tags --body`. Types: note/lesson/spec. Fallback on failure: write `.workflow/harvest/wiki-pending-{id}.md` with frontmatter.
242
+ Create via `maestro wiki create --type <wiki_type> --slug harvest-<source_type>-<short_id> --title --tags --body`. Types: note/knowhow/spec. Fallback on failure: write `.workflow/harvest/wiki-pending-{id}.md` with frontmatter.
243
243
 
244
244
  ### 6b. Spec routing
245
245
 
246
- Route via `Skill({ skill: "spec-add", args: "<spec_type> <content>" })`. Category mapping: pattern→pattern, decision→decision, bug→bug, lesson→rule.
246
+ Route via `Skill({ skill: "spec-add", args: "<spec_type> <content>" })`. Category mapping: pattern→pattern, decision→decision, bug→bug, knowhow→rule.
247
247
 
248
248
  ### 6c. Issue routing
249
249
 
@@ -287,7 +287,7 @@ This log prevents duplicate harvesting in future runs.
287
287
 
288
288
  ## Stage 7: dedup_check
289
289
 
290
- Before writing any item in Stage 6, check for duplicates across `harvest-log.jsonl` (by fragment_id), wiki (by title search), `issues.jsonl` (by title/description), and `learnings.md` (by content). Duplicates are skipped with `[SKIP-DUP]` marker and logged to harvest report.
290
+ Before writing any item in Stage 6, check for duplicates across `harvest-log.jsonl` (by fragment_id), wiki (by title search), `issues.jsonl` (by title/description), and `specs/learnings.md` (by content). Duplicates are skipped with `[SKIP-DUP]` marker and logged to harvest report.
291
291
 
292
292
  ---
293
293
 
@@ -314,7 +314,7 @@ Write `.workflow/harvest/harvest-report-{date}.md`:
314
314
  | # | Type | Slug | Title | Status |
315
315
  |---|------|------|-------|--------|
316
316
  | 1 | note | harvest-analysis-abc | SQL injection vector | CREATED |
317
- | 2 | lesson | harvest-analysis-def | Parameterized queries | CREATED |
317
+ | 2 | knowhow | harvest-analysis-def | Parameterized queries | CREATED |
318
318
 
319
319
  ### Spec ({N} entries)
320
320
  | # | Type | Content (truncated) | Status |
@@ -349,5 +349,5 @@ Next:
349
349
  → Review wiki entries: maestro wiki list --type note
350
350
  → Triage issues: Skill({ skill: "manage-issue", args: "list --source harvest" })
351
351
  → Connect wiki graph: Skill({ skill: "wiki-connect", args: "--fix" })
352
- → View specs: Skill({ skill: "spec-load", args: "--category learning" })
352
+ → View specs: Skill({ skill: "spec-load", args: "--role implement" })
353
353
  ```
@@ -30,8 +30,8 @@ If existing session at `${PHASE_DIR}/.tests/integration/state.json`: offer resum
30
30
  ### Step 1.3: Load Project Specs
31
31
 
32
32
  ```
33
- specs_content = maestro spec load --category test
34
- arch_content = maestro spec load --category arch
33
+ specs_content = maestro spec load --role test
34
+ arch_content = maestro spec load --role plan
35
35
  ```
36
36
 
37
37
  `specs_content` for test conventions; `arch_content` for module boundaries in Step 2-3.
@@ -86,7 +86,7 @@ Initialize discovery-state.json:
86
86
  ### Step 3.5: Load Project Specs
87
87
 
88
88
  ```
89
- specs_content = maestro spec load --category coding
89
+ specs_content = maestro spec load --role implement
90
90
  ```
91
91
 
92
92
  Pass to each analysis agent so severity assessments align with project quality standards.
@@ -30,7 +30,7 @@ Six types of knowhow, each with dedicated structure:
30
30
  | `decision` | DCS- | Architecture Decision Record | Making non-trivial design choices |
31
31
  | `tip` | TIP- | Quick note, snippet, reminder | Fleeting insight, debugging trick |
32
32
 
33
- All types share `WikiNodeType = 'knowhow'`. The `category` field distinguishes subtypes in wiki queries.
33
+ All types share `WikiNodeType = 'knowhow'`. The `type` field distinguishes subtypes in wiki queries.
34
34
 
35
35
  ---
36
36
 
@@ -60,7 +60,7 @@ Verify stores exist. Neither → E001.
60
60
 
61
61
  ### Step 3: List
62
62
 
63
- Workflow: `maestro wiki list --type knowhow --json`, filter by `--tag`, `--type`, `--category`.
63
+ Workflow: `maestro wiki list --type knowhow --json`, filter by `--keywords`, `--type`, `--role`.
64
64
  System: Glob `*.md` files, extract titles.
65
65
 
66
66
  Display: ID/File, Type, Category, Date, Tags, Summary with navigation hints.
@@ -123,7 +123,6 @@ Reusable code or configuration pattern. Sections:
123
123
  ---
124
124
  title: {descriptive name}
125
125
  type: template
126
- category: template
127
126
  lang: {typescript|python|bash|yaml|...}
128
127
  tags: [{comma-separated}]
129
128
  created: {ISO timestamp}
@@ -166,7 +165,6 @@ Step-by-step operational guide. Sections:
166
165
  ---
167
166
  title: {goal summary}
168
167
  type: recipe
169
- category: recipe
170
168
  tags: [{comma-separated}]
171
169
  created: {ISO timestamp}
172
170
  ---
@@ -211,7 +209,6 @@ External documentation digest. Sections:
211
209
  ---
212
210
  title: {reference title}
213
211
  type: reference
214
- category: reference
215
212
  source: {original URL}
216
213
  tags: [{comma-separated}]
217
214
  created: {ISO timestamp}
@@ -254,7 +251,6 @@ Architecture Decision Record. Sections:
254
251
  ---
255
252
  title: {decision summary}
256
253
  type: decision
257
- category: decision
258
254
  status: {proposed|accepted|superseded}
259
255
  tags: [{comma-separated}]
260
256
  created: {ISO timestamp}
@@ -304,7 +300,6 @@ Quick note. Minimal structure:
304
300
  ---
305
301
  title: {tip summary}
306
302
  type: tip
307
- category: tip
308
303
  tags: [{comma-separated}]
309
304
  created: {ISO timestamp}
310
305
  ---
@@ -327,7 +322,6 @@ Frontmatter keys by type:
327
322
  |-------|:-------:|:--------:|:------:|:---------:|:--------:|:---:|
328
323
  | title | Y | Y | Y | Y | Y | Y |
329
324
  | type | Y | Y | Y | Y | Y | Y |
330
- | category | Y | Y | Y | Y | Y | Y |
331
325
  | tags | Y | Y | Y | Y | Y | Y |
332
326
  | created | Y | Y | Y | Y | Y | Y |
333
327
  | lang | | Y | | | | |
@@ -352,7 +346,7 @@ maestro knowhow search "deploy auth" # full-text
352
346
  maestro knowhow get knowhow-{slug} # view one
353
347
 
354
348
  maestro wiki list --type knowhow --json # programmatic
355
- maestro wiki list --type knowhow --category decision # decisions only
349
+ maestro wiki list --type knowhow --role plan # decisions only
356
350
  ```
357
351
 
358
352
  ### MCP
@@ -364,11 +358,78 @@ store_knowhow { operation: "add", type: "template", title: "...", body: "..." }
364
358
 
365
359
  ### Type Label Reference
366
360
 
367
- | Wiki type | Category | Prefix | Label |
368
- |-----------|----------|--------|-------|
361
+ | Wiki type | Type | Prefix | Label |
362
+ |-----------|------|--------|-------|
369
363
  | knowhow | session | KNW- | Session |
370
364
  | knowhow | tip | TIP- | Tip |
371
365
  | knowhow | template | TPL- | Template |
372
366
  | knowhow | recipe | RCP- | Recipe |
373
367
  | knowhow | reference | REF- | Reference |
374
368
  | knowhow | decision | DCS- | Decision |
369
+ | spec | learning | — | Learning Insight (in `specs/learnings.md`) |
370
+
371
+ ---
372
+
373
+ ## Part D: Learning Insights Container (specs/learnings.md)
374
+
375
+ A special container file at `.workflow/specs/learnings.md` holds multiple `<spec-entry>` sub-entries for atomic learning insights. This replaces the former `lessons.jsonl` approach.
376
+
377
+ ### Container Format
378
+
379
+ ```markdown
380
+ ---
381
+ title: "Learning Insights"
382
+ type: spec
383
+ roles: [implement]
384
+ tags: [insights, learning]
385
+ created: {ISO timestamp}
386
+ ---
387
+ # Learning Insights
388
+
389
+ Atomic insights captured during active work.
390
+
391
+ ## Entries
392
+
393
+ <spec-entry roles="implement" keywords="pattern,auth,jwt" date="2026-05-10" id="INS-abc123" source="manual">
394
+
395
+ ### JWT refresh tokens must rotate on every use
396
+
397
+ Refresh-on-use prevents replay attacks.
398
+
399
+ - **Phase**: 1 (01-auth)
400
+ - **Confidence**: high
401
+ - **Tags**: auth, jwt, security
402
+
403
+ </spec-entry>
404
+
405
+ <spec-entry roles="analyze" keywords="gotcha,redis,cache" date="2026-05-11" id="INS-def456" source="retrospective">
406
+
407
+ ### Redis MULTI is not truly transactional
408
+
409
+ MULTI/EXEC guarantees atomicity but not isolation...
410
+
411
+ - **Phase**: 2 (02-cache)
412
+ - **Lens**: technical
413
+ - **Confidence**: medium
414
+
415
+ </spec-entry>
416
+ ```
417
+
418
+ ### Producers
419
+
420
+ Multiple workflows append `<spec-entry>` blocks to this container:
421
+
422
+ | Workflow | Source value | When |
423
+ |----------|-------------|------|
424
+ | `manage-learn` | `manual` or `tip` | Manual capture during active work |
425
+ | `quality-retrospective` | `retrospective` | Phase retrospective insight distillation |
426
+ | `learn-retro` | `retro-git` or `retro-decision` | Retrospective from git activity or decisions |
427
+ | `wiki-connect` | `wiki-connect` | Graph connectivity insights |
428
+ | `wiki-digest` | `wiki-digest` | Knowledge synthesis meta-insights |
429
+
430
+ ### Retrieval
431
+
432
+ ```bash
433
+ maestro wiki list --type knowhow --role implement # list all insights
434
+ maestro wiki search "<query>" # full-text search
435
+ ```
@@ -3,8 +3,8 @@
3
3
  Atomic insight capture, search, and retrieval. Lightweight gstack-style "eureka moment" log that complements the retrospective workflow: where retrospective extracts insights from completed phases in bulk, `manage-learn` captures one insight at a time during active work.
4
4
 
5
5
  Storage:
6
- - `.workflow/learning/lessons.jsonl` — append-only JSONL row per insight (shared with retrospective output)
7
- - `.workflow/learning/learning-index.json` searchable index
6
+ - `.workflow/specs/learnings.md` — append-only container of `<spec-entry>` sub-entries (shared with retrospective output)
7
+ - Auto-indexed by WikiIndexer (no manual index required)
8
8
 
9
9
  **Shared store rationale:** Manual captures (`source: "manual"`), tips (`source: "tip"`), retrospective-distilled insights (`source: "retrospective"`, `lens: <name>` from `quality-retrospective`), and learn-retro insights (`source: "retro-git"` or `source: "retro-decision"` from `learn-retro`) all live in the same store so search and list see the entire knowledge corpus. The `source` field disambiguates origin.
10
10
 
@@ -15,7 +15,7 @@ This workflow does NOT spawn agents or call CLI tools. It is a thin file operati
15
15
  ## Prerequisites
16
16
 
17
17
  - `.workflow/` initialized (`.workflow/state.json` exists). If missing, error E001.
18
- - The `learning/` directory and its files are created on first use; do not require them to exist upfront.
18
+ - The `specs/` directory and `learnings.md` are created on first use; do not require them to exist upfront.
19
19
 
20
20
  ---
21
21
 
@@ -23,17 +23,17 @@ This workflow does NOT spawn agents or call CLI tools. It is a thin file operati
23
23
 
24
24
  ```
25
25
  /manage-learn "<insight text>" → capture, infer category, auto-link phase
26
- /manage-learn "<insight>" --category pattern --tag auth,jwt → capture with explicit category and tags
26
+ /manage-learn "<insight>" --category pattern --keywords auth,jwt → capture with explicit category and keywords
27
27
  /manage-learn list → show recent 20 insights
28
- /manage-learn list --tag auth → filtered list
29
- /manage-learn search <query> → text search across lessons.jsonl
28
+ /manage-learn list --keywords auth → filtered list
29
+ /manage-learn search <query> → search via maestro wiki search
30
30
  /manage-learn show <INS-id> → full insight + linked phase context
31
31
  ```
32
32
 
33
33
  | Flag | Effect |
34
34
  |------|--------|
35
35
  | `--category <name>` | One of: pattern, antipattern, decision, tool, gotcha, technique, tip. Default: inferred (tip mode defaults to `tip`). |
36
- | `--tag t1,t2` | Comma-separated tags. Insight mode implicitly adds `manual`, tip mode implicitly adds `tip`. |
36
+ | `--keywords t1,t2` | Comma-separated keywords. Insight mode implicitly adds `manual`, tip mode implicitly adds `tip`. |
37
37
  | `--phase <N>` | Override auto-detected phase link. Use `--phase 0` to force "no phase". |
38
38
  | `--confidence <level>` | high / medium / low. Default: medium (insight), low (tip). |
39
39
  | `--lens <name>` | Filter by retrospective lens: technical, process, quality, decision, git (list/search only). |
@@ -46,7 +46,7 @@ This workflow does NOT spawn agents or call CLI tools. It is a thin file operati
46
46
  ```
47
47
  Verify .workflow/ exists (else E001). Route by first token:
48
48
  "list" → list | "search" → search (next token = query) | "show" → show (next token = INS-id)
49
- "tip" → tip capture (source="tip", category="tip", confidence="low", implicit tag "tip")
49
+ "tip" → tip capture (source="tip", category="tip", confidence="low", implicit keyword "tip")
50
50
  else → capture mode (full quoted text = insight body)
51
51
  Empty args → AskUserQuestion. Invalid --category → E002.
52
52
  ```
@@ -58,15 +58,27 @@ Empty args → AskUserQuestion. Invalid --category → E002.
58
58
  ### Step 2.1: Bootstrap storage
59
59
 
60
60
  ```bash
61
- LEARN_DIR=".workflow/learning"
62
- LESSONS_FILE="$LEARN_DIR/lessons.jsonl"
63
- INDEX_FILE="$LEARN_DIR/learning-index.json"
61
+ SPECS_DIR=".workflow/specs"
62
+ INSIGHTS_FILE="$SPECS_DIR/learnings.md"
64
63
 
65
- mkdir -p "$LEARN_DIR"
66
- touch "$LESSONS_FILE"
64
+ mkdir -p "$SPECS_DIR"
67
65
 
68
- if [ ! -f "$INDEX_FILE" ]; then
69
- echo '{"entries":[],"_metadata":{"created":"'$(date -u +%Y-%m-%dT%H:%M:%SZ)'","version":"1.0"}}' > "$INDEX_FILE"
66
+ if [ ! -f "$INSIGHTS_FILE" ]; then
67
+ cat > "$INSIGHTS_FILE" << 'EOF'
68
+ ---
69
+ title: "Learning Insights"
70
+ type: spec
71
+ roles: [implement]
72
+ tags: [insights, learning]
73
+ created: $(date -u +%Y-%m-%dT%H:%M:%SZ)
74
+ ---
75
+ # Learning Insights
76
+
77
+ Atomic insights captured during active work.
78
+
79
+ ## Entries
80
+
81
+ EOF
70
82
  fi
71
83
  ```
72
84
 
@@ -102,32 +114,33 @@ Simple keyword heuristics — no LLM call. Match the insight text (lowercased) a
102
114
 
103
115
  First match wins. If nothing matches, category = `technique`.
104
116
 
105
- ### Step 2.5: Build row
117
+ ### Step 2.5: Build spec-entry
106
118
 
107
119
  ```
108
- row = {
109
- id: "INS-{hex}",
110
- phase: phase,
111
- phase_slug: phase_slug,
112
- lens: null, // null for manual capture (only retrospective sets this)
113
- category: category,
114
- title: first 80 chars of insight text (truncated on word boundary),
115
- summary: full insight text,
116
- confidence: --confidence value or "medium",
117
- tags: parsed --tag values + ["manual"],
118
- evidence_refs: [], // empty for manual capture
119
- routed_to: "none",
120
- routed_id: null,
121
- source: "manual",
122
- captured_at: now ISO 8601 UTC
123
- }
120
+ entry = <spec-entry
121
+ roles="{role}"
122
+ keywords="{category},{parsed --keywords values joined by comma}"
123
+ date="{YYYY-MM-DD}"
124
+ id="INS-{hex}"
125
+ source="manual"
126
+ >
127
+
128
+ ### {title: first 80 chars of insight text, truncated on word boundary}
129
+
130
+ {full insight text}
131
+
132
+ - **Phase**: {phase or "none"} ({phase_slug or "—"})
133
+ - **Confidence**: {--confidence value or "medium"}
134
+ - **Tags**: {parsed --keywords values + ["manual"]}
135
+
136
+ </spec-entry>
124
137
  ```
125
138
 
126
139
  ### Step 2.6: Persist
127
140
 
128
- Append row as single JSON line to `.workflow/learning/lessons.jsonl`.
141
+ Append the `<spec-entry>` block to `.workflow/specs/learnings.md`.
129
142
 
130
- Update `.workflow/learning/learning-index.json` append an index entry mirroring key row fields: `id`, `type:"insight"`, `timestamp`, `file:"lessons.jsonl"`, `summary` (=title), `tags`, `lens`, `category`, `phase`, `phase_slug`, `confidence`, `routed_to:"none"`, `routed_id:null`.
143
+ WikiIndexer auto-indexes the entry no manual index update required.
131
144
 
132
145
  ### Step 2.7: Confirmation banner
133
146
 
@@ -139,12 +152,12 @@ Display: ID, category, confidence, tags, phase (+slug if present), title, file p
139
152
 
140
153
  ### Step 3.1: Read entries
141
154
 
142
- Read `.workflow/learning/learning-index.json`. Filter by `--tag`, `--category`, `--phase`, `--lens` flags. Sort by timestamp descending. Limit to 20 (or `--limit N`).
155
+ Query via `maestro wiki list --type knowhow --role implement --json`. Filter by `--keywords`, `--category`, `--phase`, `--lens` flags. Sort by timestamp descending. Limit to 20 (or `--limit N`).
143
156
 
144
157
  ### Step 3.2: Display table
145
158
 
146
159
  ```
147
- === LEARNING INSIGHTS ({shown}/{total}) ===
160
+ === KNOWHOW INSIGHTS ({shown}/{total}) ===
148
161
 
149
162
  ID Category Phase Conf Tags Title
150
163
  ────────────── ────────── ────── ───── ─────────────────── ────────────────────────────
@@ -174,9 +187,9 @@ Capture your first: Skill({ skill: "manage-learn", args: "\"...\"" })
174
187
 
175
188
  Next token after "search". Empty → AskUserQuestion.
176
189
 
177
- ### Step 4.2: Scan lessons.jsonl
190
+ ### Step 4.2: Search via wiki
178
191
 
179
- Case-insensitive search across each row's `title`, `summary`, `tags`, `category`, `lens`. Rank matches: title match +3, tags +2, summary +1. Sort by rank desc, then captured_at desc.
192
+ Execute `maestro wiki search "<query>" --type knowhow --json`. Results are ranked by BM25 relevance. Sort by rank desc, then date desc.
180
193
 
181
194
  ### Step 4.3: Display results
182
195
 
@@ -204,45 +217,44 @@ List all: Skill({ skill: "manage-learn", args: "list" })
204
217
 
205
218
  ## Stage 5: show mode
206
219
 
207
- ### Step 5.1: Locate row
220
+ ### Step 5.1: Locate entry
208
221
 
209
- Find row matching target INS-id in `lessons.jsonl`. Missing arg → E003. Not found → E004.
222
+ Find `<spec-entry>` matching target INS-id in `learnings.md`. Missing arg → E003. Not found → E004.
210
223
 
211
224
  ### Step 5.2: Resolve linked phase context (if any)
212
225
 
213
- If `row.phase_slug` set: look up phase directory from `state.json` artifacts, read its `index.json` for title/status, check for `retrospective.md`.
226
+ If `entry.phase_slug` set (parsed from entry content): look up phase directory from `state.json` artifacts, read its `index.json` for title/status, check for `retrospective.md`.
214
227
 
215
228
  ### Step 5.3: Resolve routed artifact (if any)
216
229
 
217
- Map `routed_to` → path: `spec` → `.workflow/specs/{id}`, `issue` → `.workflow/issues/issues.jsonl#{id}`, `note` → `.workflow/knowhow/{id}.md`.
230
+ Map `routed_to` → path: `spec` → `.workflow/specs/{id}`, `issue` → `.workflow/issues/issues.jsonl#{id}`, `knowhow` → `.workflow/knowhow/{id}.md`.
218
231
 
219
232
  ### Step 5.4: Display
220
233
 
221
234
  ```
222
235
  =========================================
223
- INSIGHT: {row.id}
224
- CATEGORY: {row.category}
225
- CONFIDENCE: {row.confidence}
226
- SOURCE: {row.source}{IF row.lens: " (" + row.lens + " lens)"}
236
+ INSIGHT: {entry.id}
237
+ CATEGORY: {entry.category}
238
+ CONFIDENCE: {entry.confidence}
239
+ SOURCE: {entry.source}{IF entry.lens: " (" + entry.lens + " lens)"}
227
240
  =========================================
228
241
 
229
- CAPTURED: {row.captured_at}
230
- PHASE: {row.phase or "none"}{IF phase_slug: " (" + phase_slug + ")"}
231
- TAGS: {row.tags joined by ", "}
242
+ CAPTURED: {entry.date}
243
+ PHASE: {entry.phase or "none"}{IF phase_slug: " (" + phase_slug + ")"}
244
+ TAGS: {entry.keywords}
232
245
 
233
246
  TITLE:
234
- {row.title}
247
+ {entry.title}
235
248
 
236
249
  SUMMARY:
237
- {row.summary}
250
+ {entry.content}
238
251
 
239
252
  EVIDENCE:
240
- {FOR ref in row.evidence_refs:} - {ref}{END FOR}
241
- {OR "(none — manual capture)"}
253
+ {parsed from entry content, or "(none — manual capture)"}
242
254
 
243
255
  ROUTED:
244
- Target: {row.routed_to}
245
- ID: {row.routed_id or "—"}
256
+ Target: {entry.routed_to or "none"}
257
+ ID: {entry.routed_id or "—"}
246
258
  Path: {routed_path or "—"}
247
259
 
248
260
  {IF phase_context:}
@@ -259,7 +271,7 @@ PHASE CONTEXT:
259
271
 
260
272
  | Workflow | Relationship |
261
273
  |----------|--------------|
262
- | `quality-retrospective` | Producer. Writes insights into the same `lessons.jsonl` with `source: "retrospective"` and a populated `lens` field. |
263
- | `manage-knowhow-capture` | Sibling. Captures session state for recovery; `learn` captures timeless insights. They share the JSONL+index pattern but live in different directories so retrieval semantics stay clean. |
274
+ | `quality-retrospective` | Producer. Appends `<spec-entry>` to the same `specs/learnings.md` with `source: "retrospective"` and a populated `lens` field. |
275
+ | `manage-knowhow-capture` | Sibling. Captures session state for recovery; `learn` captures timeless insights. Both write to `.workflow/knowhow/` with different prefixes. |
264
276
  | `phase-transition` | Reader (informally). Phase-transition's free-form `.workflow/specs/learnings.md` is a distinct file with a different audience; do not merge them. |
265
- | `maestro-plan` | Future consumer. Should query `lessons.jsonl` filtered by tag/lens/category to inform planning decisions. (Out of scope for this command.) |
277
+ | `maestro-plan` | Future consumer. Should query via `maestro wiki search` or `maestro wiki list --type knowhow --role implement` to inform planning decisions. (Out of scope for this command.) |
package/workflows/map.md CHANGED
@@ -30,7 +30,7 @@ Spawn 4 parallel `workflow-codebase-mapper` agents, each writing to `.workflow/r
30
30
 
31
31
  If `$ARGUMENTS` provided, pass as focus filter to each agent.
32
32
 
33
- Load project specs: `maestro spec load --category arch`
33
+ Load project specs: `maestro spec load --role plan`
34
34
 
35
35
  Each agent spawned in parallel as `workflow-codebase-mapper` subagent with specs context.
36
36
 
@@ -41,7 +41,7 @@ Archive completed milestone, move artifacts to history, and prepare for next.
41
41
  ## Step 2.5: Load Existing Learnings
42
42
 
43
43
  ```
44
- existing_learnings = maestro spec load --category learning
44
+ existing_learnings = maestro spec load --role implement
45
45
  ```
46
46
 
47
47
  Check existing entries to avoid duplicates when appending in Step 3.
@@ -57,7 +57,7 @@ Check existing entries to avoid duplicates when appending in Step 3.
57
57
 
58
58
  2. Aggregate learnings and append to `.workflow/specs/learnings.md` using `<spec-entry>` closed-tag format. Each entry (strategy adjustment, pattern, or pitfall) follows this template:
59
59
  ```
60
- <spec-entry category="learning" keywords="{auto-extracted}" date="{YYYY-MM-DD}" source="milestone-complete">
60
+ <spec-entry roles="implement" keywords="{auto-extracted}" date="{YYYY-MM-DD}" source="milestone-complete">
61
61
 
62
62
  ### {summary}
63
63
 
package/workflows/plan.md CHANGED
@@ -74,7 +74,7 @@ default → Create Mode: P1 → P2 → P3 → P4 → P4.5 → P5
74
74
 
75
75
  3. **Load project specs**
76
76
  ```
77
- specs_content = maestro spec load --category arch
77
+ specs_content = maestro spec load --role plan
78
78
  ```
79
79
  Pass to planner agent as project constraints context.
80
80
 
@@ -204,7 +204,7 @@ Report: "Context captured: ${QUICK_DIR}/context.md"
204
204
  ### Step 4.5: Load Project Specs
205
205
 
206
206
  ```
207
- specs_content = maestro spec load --category coding
207
+ specs_content = maestro spec load --role implement
208
208
  ```
209
209
 
210
210
  Passed inline to planner agent in Step 5.
@@ -39,7 +39,7 @@ Write index.json: id, type="refactor", title, status="active", scope, plan (empt
39
39
  ### Step 2.5: Load Project Specs
40
40
 
41
41
  ```
42
- specs_content = maestro spec load --category coding
42
+ specs_content = maestro spec load --role implement
43
43
  ```
44
44
 
45
45
  Used in Step 3 to detect pattern violations against project conventions.