maestro-flow 0.3.37 → 0.3.39

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 (186) hide show
  1. package/.claude/agents/workflow-analyzer.md +2 -0
  2. package/.claude/agents/workflow-debugger.md +2 -0
  3. package/.claude/agents/workflow-executor.md +2 -0
  4. package/.claude/agents/workflow-integration-checker.md +1 -0
  5. package/.claude/agents/workflow-nyquist-auditor.md +1 -0
  6. package/.claude/agents/workflow-planner.md +2 -0
  7. package/.claude/agents/workflow-reviewer.md +2 -0
  8. package/.claude/agents/workflow-verifier.md +2 -0
  9. package/.claude/commands/learn-decompose.md +176 -176
  10. package/.claude/commands/learn-follow.md +167 -167
  11. package/.claude/commands/learn-investigate.md +221 -221
  12. package/.claude/commands/learn-retro.md +303 -303
  13. package/.claude/commands/learn-second-opinion.md +167 -167
  14. package/.claude/commands/maestro-amend.md +300 -300
  15. package/.claude/commands/maestro-analyze.md +126 -126
  16. package/.claude/commands/maestro-brainstorm.md +100 -100
  17. package/.claude/commands/maestro-composer.md +354 -354
  18. package/.claude/commands/maestro-execute.md +120 -114
  19. package/.claude/commands/maestro-fork.md +86 -86
  20. package/.claude/commands/maestro-init.md +78 -78
  21. package/.claude/commands/maestro-learn.md +140 -140
  22. package/.claude/commands/maestro-link-coordinate.md +1 -1
  23. package/.claude/commands/maestro-merge.md +61 -61
  24. package/.claude/commands/maestro-milestone-release.md +96 -96
  25. package/.claude/commands/maestro-overlay.md +178 -178
  26. package/.claude/commands/maestro-plan.md +150 -138
  27. package/.claude/commands/maestro-player.md +404 -404
  28. package/.claude/commands/maestro-quick.md +56 -56
  29. package/.claude/commands/maestro-ralph-execute.md +7 -18
  30. package/.claude/commands/maestro-ralph.md +9 -3
  31. package/.claude/commands/maestro-roadmap.md +1 -1
  32. package/.claude/commands/maestro-ui-design.md +93 -93
  33. package/.claude/commands/maestro-update.md +176 -176
  34. package/.claude/commands/maestro-verify.md +96 -90
  35. package/.claude/commands/maestro.md +121 -121
  36. package/.claude/commands/manage-codebase-rebuild.md +75 -75
  37. package/.claude/commands/manage-codebase-refresh.md +57 -57
  38. package/.claude/commands/manage-harvest.md +94 -94
  39. package/.claude/commands/manage-issue-discover.md +77 -77
  40. package/.claude/commands/manage-issue.md +73 -73
  41. package/.claude/commands/manage-knowhow-capture.md +193 -193
  42. package/.claude/commands/manage-knowhow.md +77 -77
  43. package/.claude/commands/manage-learn.md +67 -67
  44. package/.claude/commands/manage-status.md +51 -51
  45. package/.claude/commands/manage-wiki.md +62 -62
  46. package/.claude/commands/quality-auto-test.md +1 -1
  47. package/.claude/commands/quality-debug.md +121 -115
  48. package/.claude/commands/quality-refactor.md +55 -55
  49. package/.claude/commands/quality-retrospective.md +78 -78
  50. package/.claude/commands/quality-review.md +114 -108
  51. package/.claude/commands/quality-sync.md +51 -51
  52. package/.claude/commands/quality-test.md +103 -103
  53. package/.claude/commands/spec-add.md +49 -49
  54. package/.claude/commands/spec-load.md +51 -51
  55. package/.claude/commands/spec-remove.md +51 -51
  56. package/.claude/commands/spec-setup.md +51 -51
  57. package/.claude/commands/wiki-connect.md +62 -62
  58. package/.claude/commands/wiki-digest.md +69 -69
  59. package/.codex/skills/learn-decompose/SKILL.md +113 -113
  60. package/.codex/skills/learn-follow/SKILL.md +1 -1
  61. package/.codex/skills/learn-investigate/SKILL.md +83 -83
  62. package/.codex/skills/learn-retro/SKILL.md +83 -83
  63. package/.codex/skills/learn-second-opinion/SKILL.md +86 -86
  64. package/.codex/skills/maestro/SKILL.md +304 -304
  65. package/.codex/skills/maestro-analyze/SKILL.md +9 -8
  66. package/.codex/skills/maestro-brainstorm/SKILL.md +442 -397
  67. package/.codex/skills/maestro-composer/SKILL.md +213 -213
  68. package/.codex/skills/maestro-execute/SKILL.md +346 -318
  69. package/.codex/skills/maestro-fork/SKILL.md +56 -2
  70. package/.codex/skills/maestro-init/SKILL.md +40 -16
  71. package/.codex/skills/maestro-learn/SKILL.md +80 -80
  72. package/.codex/skills/maestro-link-coordinate/SKILL.md +257 -257
  73. package/.codex/skills/maestro-merge/SKILL.md +1 -1
  74. package/.codex/skills/maestro-milestone-audit/SKILL.md +1 -1
  75. package/.codex/skills/maestro-milestone-complete/SKILL.md +40 -9
  76. package/.codex/skills/maestro-milestone-release/SKILL.md +70 -70
  77. package/.codex/skills/maestro-overlay/SKILL.md +1 -1
  78. package/.codex/skills/maestro-plan/SKILL.md +19 -4
  79. package/.codex/skills/maestro-player/SKILL.md +323 -323
  80. package/.codex/skills/maestro-quick/SKILL.md +1 -1
  81. package/.codex/skills/maestro-ralph/SKILL.md +681 -578
  82. package/.codex/skills/maestro-roadmap/SKILL.md +518 -468
  83. package/.codex/skills/maestro-ui-design/SKILL.md +109 -12
  84. package/.codex/skills/maestro-verify/SKILL.md +27 -9
  85. package/.codex/skills/manage-codebase-rebuild/SKILL.md +3 -2
  86. package/.codex/skills/manage-codebase-refresh/SKILL.md +1 -1
  87. package/.codex/skills/manage-harvest/SKILL.md +91 -91
  88. package/.codex/skills/manage-issue/SKILL.md +19 -6
  89. package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
  90. package/.codex/skills/manage-knowhow/SKILL.md +95 -95
  91. package/.codex/skills/manage-knowhow-capture/SKILL.md +110 -110
  92. package/.codex/skills/manage-learn/SKILL.md +1 -1
  93. package/.codex/skills/manage-status/SKILL.md +1 -1
  94. package/.codex/skills/manage-wiki/SKILL.md +55 -55
  95. package/.codex/skills/quality-auto-test/SKILL.md +547 -547
  96. package/.codex/skills/quality-debug/SKILL.md +339 -334
  97. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  98. package/.codex/skills/quality-retrospective/SKILL.md +292 -292
  99. package/.codex/skills/quality-review/SKILL.md +365 -364
  100. package/.codex/skills/quality-sync/SKILL.md +1 -1
  101. package/.codex/skills/quality-test/SKILL.md +498 -498
  102. package/.codex/skills/spec-add/SKILL.md +101 -101
  103. package/.codex/skills/spec-load/SKILL.md +77 -77
  104. package/.codex/skills/spec-map/SKILL.md +1 -1
  105. package/.codex/skills/spec-remove/SKILL.md +69 -69
  106. package/.codex/skills/spec-setup/SKILL.md +1 -1
  107. package/.codex/skills/team-coordinate/SKILL.md +2 -1
  108. package/.codex/skills/team-executor/SKILL.md +116 -115
  109. package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -1
  110. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +14 -6
  111. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +16 -4
  112. package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +7 -1
  113. package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +16 -4
  114. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +8 -2
  115. package/.codex/skills/team-quality-assurance/SKILL.md +2 -1
  116. package/.codex/skills/team-quality-assurance/roles/scout/role.md +9 -2
  117. package/.codex/skills/team-review/SKILL.md +2 -1
  118. package/.codex/skills/team-review/roles/reviewer/role.md +10 -1
  119. package/.codex/skills/team-review/roles/scanner/role.md +10 -1
  120. package/.codex/skills/team-tech-debt/SKILL.md +144 -143
  121. package/.codex/skills/team-tech-debt/roles/executor/role.md +9 -5
  122. package/.codex/skills/team-tech-debt/roles/scanner/role.md +10 -0
  123. package/.codex/skills/team-tech-debt/roles/validator/role.md +8 -2
  124. package/.codex/skills/team-testing/SKILL.md +2 -1
  125. package/.codex/skills/team-testing/roles/executor/role.md +8 -2
  126. package/.codex/skills/team-testing/roles/generator/role.md +8 -2
  127. package/.codex/skills/wiki-connect/SKILL.md +73 -73
  128. package/.codex/skills/wiki-digest/SKILL.md +87 -87
  129. package/README.md +6 -0
  130. package/README.zh-CN.md +6 -0
  131. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js +4 -0
  132. package/dashboard/dist-server/dashboard/src/server/agents/claude-code-adapter.js.map +1 -1
  133. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js +118 -7
  134. package/dashboard/dist-server/dashboard/src/server/agents/codex-cli-adapter.js.map +1 -1
  135. package/dashboard/dist-server/shared/agent-types.d.ts +2 -0
  136. package/dashboard/dist-server/src/agents/cli-agent-runner.d.ts +2 -0
  137. package/dashboard/dist-server/src/agents/cli-agent-runner.js +4 -0
  138. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  139. package/dashboard/dist-server/src/commands/delegate.d.ts +2 -0
  140. package/dashboard/dist-server/src/commands/delegate.js +18 -0
  141. package/dashboard/dist-server/src/commands/delegate.js.map +1 -1
  142. package/dashboard/dist-server/src/config/cli-tools-config.d.ts +6 -0
  143. package/dashboard/dist-server/src/config/cli-tools-config.js +2 -0
  144. package/dashboard/dist-server/src/config/cli-tools-config.js.map +1 -1
  145. package/dist/shared/agent-types.d.ts +2 -0
  146. package/dist/shared/agent-types.d.ts.map +1 -1
  147. package/dist/src/agents/cli-agent-runner.d.ts +2 -0
  148. package/dist/src/agents/cli-agent-runner.d.ts.map +1 -1
  149. package/dist/src/agents/cli-agent-runner.js +4 -0
  150. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  151. package/dist/src/commands/config.d.ts.map +1 -1
  152. package/dist/src/commands/config.js +29 -1
  153. package/dist/src/commands/config.js.map +1 -1
  154. package/dist/src/commands/delegate.d.ts +2 -0
  155. package/dist/src/commands/delegate.d.ts.map +1 -1
  156. package/dist/src/commands/delegate.js +18 -0
  157. package/dist/src/commands/delegate.js.map +1 -1
  158. package/dist/src/commands/launcher.d.ts.map +1 -1
  159. package/dist/src/commands/launcher.js +27 -4
  160. package/dist/src/commands/launcher.js.map +1 -1
  161. package/dist/src/config/cli-tools-config.d.ts +6 -0
  162. package/dist/src/config/cli-tools-config.d.ts.map +1 -1
  163. package/dist/src/config/cli-tools-config.js +2 -0
  164. package/dist/src/config/cli-tools-config.js.map +1 -1
  165. package/dist/src/core/overlay/applier.d.ts.map +1 -1
  166. package/dist/src/core/overlay/applier.js +65 -5
  167. package/dist/src/core/overlay/applier.js.map +1 -1
  168. package/dist/src/core/overlay/loader.d.ts.map +1 -1
  169. package/dist/src/core/overlay/loader.js +9 -4
  170. package/dist/src/core/overlay/loader.js.map +1 -1
  171. package/dist/src/core/overlay/types.d.ts +2 -0
  172. package/dist/src/core/overlay/types.d.ts.map +1 -1
  173. package/dist/src/core/overlay/types.js +2 -0
  174. package/dist/src/core/overlay/types.js.map +1 -1
  175. package/dist/src/tui/tools-ui/ToolsDashboard.d.ts.map +1 -1
  176. package/dist/src/tui/tools-ui/ToolsDashboard.js +1 -1
  177. package/dist/src/tui/tools-ui/ToolsDashboard.js.map +1 -1
  178. package/dist/src/tui/tools-ui/ToolsOverview.d.ts.map +1 -1
  179. package/dist/src/tui/tools-ui/ToolsOverview.js +51 -4
  180. package/dist/src/tui/tools-ui/ToolsOverview.js.map +1 -1
  181. package/package.json +1 -1
  182. package/shared/agent-types.ts +2 -0
  183. package/workflows/delegate-protocol.codex.md +65 -0
  184. package/workflows/issue-analyze.md +2 -3
  185. package/workflows/issue-gaps-analyze.codex.md +260 -0
  186. package/workflows/issue-gaps-analyze.md +214 -0
@@ -1,62 +1,62 @@
1
- ---
2
- name: wiki-connect
3
- description: Surface hidden connections in the wiki knowledge graph and suggest or apply new links
4
- argument-hint: "[--scope <type>] [--min-similarity N] [--fix] [--max N]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
- <required_reading>
15
- @~/.maestro/workflows/wiki-connect.md
16
- </required_reading>
17
-
18
- <purpose>
19
- Knowledge graph link discovery and health improvement. Analyzes the wiki index to find orphaned entries, missing connections, and transitive link gaps, then suggests or auto-applies new `related` links to improve graph connectivity.
20
-
21
- Leverages maestro's unique wiki graph infrastructure (BM25 search, backlinks, health scoring) — no equivalent in gstack. Directly improves the quality of all downstream wiki consumers (search, digest, follow-along).
22
- </purpose>
23
-
24
- <context>
25
- Arguments: $ARGUMENTS
26
-
27
- Flags, storage paths, and CLI commands defined in workflow wiki-connect.md.
28
- </context>
29
-
30
- <execution>
31
- Follow '~/.maestro/workflows/wiki-connect.md' completely (Stages 1-6).
32
-
33
- **Next-step routing:**
34
- - Generate knowledge digest → `/wiki-digest <topic>`
35
- - Follow-along on orphan → `/learn-follow <wiki-id>`
36
- - View full graph → `maestro wiki graph`
37
- </execution>
38
-
39
- <error_codes>
40
- | Code | Severity | Condition | Recovery |
41
- |------|----------|-----------|----------|
42
- | E001 | error | No wiki entries found (empty index) | Initialize wiki content first, or run `/maestro-init` |
43
- | E002 | error | `maestro wiki` CLI not available | Check maestro installation |
44
- | W001 | warning | No connection candidates found above threshold | Lower --min-similarity or check if graph is already well-connected |
45
- | W002 | warning | Some wiki update calls failed during --fix | Partial application; retry failed entries manually |
46
- | W003 | warning | Health score unchanged after fix | Connections may not have improved the specific health metrics |
47
- </error_codes>
48
-
49
- <success_criteria>
50
- - [ ] Wiki index loaded with entry count and type distribution
51
- - [ ] Baseline health score recorded
52
- - [ ] Orphans identified and rescue candidates generated
53
- - [ ] Connection candidates scored and ranked
54
- - [ ] Results filtered by --min-similarity and limited by --max
55
- - [ ] Suggestions displayed with scores and reasons
56
- - [ ] If --fix: entries updated with new `related` links
57
- - [ ] If --fix: new health score computed and delta reported
58
- - [ ] Report written to `wiki-connections-{date}.md`
59
- - [ ] Graph insights appended to `lessons.jsonl`
60
- - [ ] No unintended entry modifications (only `related` field changed)
61
- - [ ] Summary displayed with next-step routing
62
- </success_criteria>
1
+ ---
2
+ name: wiki-connect
3
+ description: Find and link hidden connections in wiki graph
4
+ argument-hint: "[--scope <type>] [--min-similarity N] [--fix] [--max N]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+ <required_reading>
15
+ @~/.maestro/workflows/wiki-connect.md
16
+ </required_reading>
17
+
18
+ <purpose>
19
+ Knowledge graph link discovery and health improvement. Analyzes the wiki index to find orphaned entries, missing connections, and transitive link gaps, then suggests or auto-applies new `related` links to improve graph connectivity.
20
+
21
+ Leverages maestro's unique wiki graph infrastructure (BM25 search, backlinks, health scoring) — no equivalent in gstack. Directly improves the quality of all downstream wiki consumers (search, digest, follow-along).
22
+ </purpose>
23
+
24
+ <context>
25
+ Arguments: $ARGUMENTS
26
+
27
+ Flags, storage paths, and CLI commands defined in workflow wiki-connect.md.
28
+ </context>
29
+
30
+ <execution>
31
+ Follow '~/.maestro/workflows/wiki-connect.md' completely (Stages 1-6).
32
+
33
+ **Next-step routing:**
34
+ - Generate knowledge digest → `/wiki-digest <topic>`
35
+ - Follow-along on orphan → `/learn-follow <wiki-id>`
36
+ - View full graph → `maestro wiki graph`
37
+ </execution>
38
+
39
+ <error_codes>
40
+ | Code | Severity | Condition | Recovery |
41
+ |------|----------|-----------|----------|
42
+ | E001 | error | No wiki entries found (empty index) | Initialize wiki content first, or run `/maestro-init` |
43
+ | E002 | error | `maestro wiki` CLI not available | Check maestro installation |
44
+ | W001 | warning | No connection candidates found above threshold | Lower --min-similarity or check if graph is already well-connected |
45
+ | W002 | warning | Some wiki update calls failed during --fix | Partial application; retry failed entries manually |
46
+ | W003 | warning | Health score unchanged after fix | Connections may not have improved the specific health metrics |
47
+ </error_codes>
48
+
49
+ <success_criteria>
50
+ - [ ] Wiki index loaded with entry count and type distribution
51
+ - [ ] Baseline health score recorded
52
+ - [ ] Orphans identified and rescue candidates generated
53
+ - [ ] Connection candidates scored and ranked
54
+ - [ ] Results filtered by --min-similarity and limited by --max
55
+ - [ ] Suggestions displayed with scores and reasons
56
+ - [ ] If --fix: entries updated with new `related` links
57
+ - [ ] If --fix: new health score computed and delta reported
58
+ - [ ] Report written to `wiki-connections-{date}.md`
59
+ - [ ] Graph insights appended to `lessons.jsonl`
60
+ - [ ] No unintended entry modifications (only `related` field changed)
61
+ - [ ] Summary displayed with next-step routing
62
+ </success_criteria>
@@ -1,69 +1,69 @@
1
- ---
2
- name: wiki-digest
3
- description: Generate knowledge digest from wiki entries with theme clustering, gap analysis, and coverage heatmap
4
- argument-hint: "[<topic>|--recent N] [--type <type>] [--format brief|full]"
5
- allowed-tools:
6
- - Read
7
- - Write
8
- - Bash
9
- - Glob
10
- - Grep
11
- - Agent
12
- - AskUserQuestion
13
- ---
14
- <purpose>
15
- Knowledge synthesis command that generates actionable digests from the wiki knowledge graph. Clusters entries by semantic theme, identifies knowledge gaps, and produces a coverage heatmap. Unique to maestro — leverages the wiki graph (BM25 search, backlinks, health) to surface trends and missing knowledge.
16
-
17
- Unlike `maestro wiki list` which shows raw entries, this command synthesizes and interprets the knowledge base, producing a curated summary with gap analysis and recommended next actions.
18
- </purpose>
19
-
20
- <required_reading>
21
- @~/.maestro/workflows/wiki-digest.md
22
- </required_reading>
23
-
24
- <deferred_reading>
25
- - @~/.maestro/workflows/issue.md (issues.jsonl canonical schema for `--create-issues` routing)
26
- </deferred_reading>
27
-
28
- <context>
29
- Arguments: $ARGUMENTS
30
-
31
- Flags, scope resolution, storage paths, and CLI commands defined in workflow wiki-digest.md.
32
- </context>
33
-
34
- <execution>
35
- Follow '~/.maestro/workflows/wiki-digest.md' completely (Stages 1-8).
36
-
37
- **Next-step routing:**
38
- - Deep dive on a theme → `/learn-follow <wiki-id>`
39
- - Fix graph gaps → `/wiki-connect --fix`
40
- - Decompose code for missing patterns → `/learn-decompose <path>`
41
- - Create missing entries → `maestro wiki create --type <type> --slug <slug>`
42
- - Triage gap issues → `/manage-issue list --source wiki-digest`
43
- </execution>
44
-
45
- <error_codes>
46
- | Code | Severity | Condition | Recovery |
47
- |------|----------|-----------|----------|
48
- | E001 | error | No wiki entries found (empty index) | Initialize wiki content first |
49
- | E002 | error | Topic search returned 0 results | Broaden topic or check wiki content |
50
- | W001 | warning | Too few entries (<5) for meaningful theme clustering | Digest produced but themes may be trivial |
51
- | W002 | warning | lessons.jsonl not found — skipping cross-reference | Proceed without lesson context |
52
- | W003 | warning | Some entry bodies failed to load — partial summaries | Note incomplete entries in digest |
53
- </error_codes>
54
-
55
- <success_criteria>
56
- - [ ] Scope parsed and entries loaded
57
- - [ ] Baseline health score recorded
58
- - [ ] Entries clustered into 3-5 semantic themes
59
- - [ ] Per-theme analysis: summary, key entries, gaps, health
60
- - [ ] Cross-reference with lessons.jsonl completed
61
- - [ ] Coverage heatmap generated (type × theme matrix)
62
- - [ ] Knowledge gaps identified with suggested actions
63
- - [ ] If `--create-issues`: gap issues created in `issues.jsonl` (deduped)
64
- - [ ] Digest written to `digest-{slug}-{date}.md`
65
- - [ ] Meta-insights appended to `lessons.jsonl`
66
- - [ ] `learning-index.json` updated
67
- - [ ] No files modified outside `.workflow/learning/` and `.workflow/issues/` (issues only when `--create-issues`)
68
- - [ ] Summary displayed with key findings and next-step routing
69
- </success_criteria>
1
+ ---
2
+ name: wiki-digest
3
+ description: Generate wiki digest with theme clustering and gap analysis
4
+ argument-hint: "[<topic>|--recent N] [--type <type>] [--format brief|full]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Bash
9
+ - Glob
10
+ - Grep
11
+ - Agent
12
+ - AskUserQuestion
13
+ ---
14
+ <purpose>
15
+ Knowledge synthesis command that generates actionable digests from the wiki knowledge graph. Clusters entries by semantic theme, identifies knowledge gaps, and produces a coverage heatmap. Unique to maestro — leverages the wiki graph (BM25 search, backlinks, health) to surface trends and missing knowledge.
16
+
17
+ Unlike `maestro wiki list` which shows raw entries, this command synthesizes and interprets the knowledge base, producing a curated summary with gap analysis and recommended next actions.
18
+ </purpose>
19
+
20
+ <required_reading>
21
+ @~/.maestro/workflows/wiki-digest.md
22
+ </required_reading>
23
+
24
+ <deferred_reading>
25
+ - @~/.maestro/workflows/issue.md (issues.jsonl canonical schema for `--create-issues` routing)
26
+ </deferred_reading>
27
+
28
+ <context>
29
+ Arguments: $ARGUMENTS
30
+
31
+ Flags, scope resolution, storage paths, and CLI commands defined in workflow wiki-digest.md.
32
+ </context>
33
+
34
+ <execution>
35
+ Follow '~/.maestro/workflows/wiki-digest.md' completely (Stages 1-8).
36
+
37
+ **Next-step routing:**
38
+ - Deep dive on a theme → `/learn-follow <wiki-id>`
39
+ - Fix graph gaps → `/wiki-connect --fix`
40
+ - Decompose code for missing patterns → `/learn-decompose <path>`
41
+ - Create missing entries → `maestro wiki create --type <type> --slug <slug>`
42
+ - Triage gap issues → `/manage-issue list --source wiki-digest`
43
+ </execution>
44
+
45
+ <error_codes>
46
+ | Code | Severity | Condition | Recovery |
47
+ |------|----------|-----------|----------|
48
+ | E001 | error | No wiki entries found (empty index) | Initialize wiki content first |
49
+ | E002 | error | Topic search returned 0 results | Broaden topic or check wiki content |
50
+ | W001 | warning | Too few entries (<5) for meaningful theme clustering | Digest produced but themes may be trivial |
51
+ | W002 | warning | lessons.jsonl not found — skipping cross-reference | Proceed without lesson context |
52
+ | W003 | warning | Some entry bodies failed to load — partial summaries | Note incomplete entries in digest |
53
+ </error_codes>
54
+
55
+ <success_criteria>
56
+ - [ ] Scope parsed and entries loaded
57
+ - [ ] Baseline health score recorded
58
+ - [ ] Entries clustered into 3-5 semantic themes
59
+ - [ ] Per-theme analysis: summary, key entries, gaps, health
60
+ - [ ] Cross-reference with lessons.jsonl completed
61
+ - [ ] Coverage heatmap generated (type × theme matrix)
62
+ - [ ] Knowledge gaps identified with suggested actions
63
+ - [ ] If `--create-issues`: gap issues created in `issues.jsonl` (deduped)
64
+ - [ ] Digest written to `digest-{slug}-{date}.md`
65
+ - [ ] Meta-insights appended to `lessons.jsonl`
66
+ - [ ] `learning-index.json` updated
67
+ - [ ] No files modified outside `.workflow/learning/` and `.workflow/issues/` (issues only when `--create-issues`)
68
+ - [ ] Summary displayed with key findings and next-step routing
69
+ </success_criteria>
@@ -1,113 +1,113 @@
1
- ---
2
- name: learn-decompose
3
- description: 4-dimension parallel pattern extraction via CSV wave pipeline. Structural, behavioral, data, and error dimension agents scan in parallel (Wave 1), cross-reference agent deduplicates and catalogs (Wave 2). Outputs pattern catalog to lessons.jsonl.
4
- argument-hint: "[-y|--yes] [-c|--concurrency 4] [--continue] \"<path|module> [--patterns <list>] [--save-spec] [--save-wiki]\""
5
- allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
- ---
7
-
8
- <purpose>
9
- Systematic pattern extraction from code via CSV wave pipeline. 4 parallel dimension agents
10
- scan a module, then a cross-reference agent deduplicates against existing patterns and
11
- produces a catalog. Discovered patterns persist to `lessons.jsonl` and optionally to
12
- specs (via `spec-add`) and wiki.
13
-
14
- ```
15
- Resolve Target → Load Existing Patterns → Wave 1 (4 parallel dimension scans) → Wave 2 (cross-ref + catalog) → Persist
16
- ```
17
- </purpose>
18
-
19
- <context>
20
- $ARGUMENTS — target path/module and optional flags.
21
-
22
- **Target resolution:**
23
- - File path → analyze that file
24
- - Directory path → all source files in it
25
- - Module name → Glob `src/**/{module}*`
26
-
27
- **Flags:**
28
- - `-y, --yes`: Skip confirmations
29
- - `-c, --concurrency N`: Max concurrent agents (default: 4)
30
- - `--continue`: Resume existing session
31
- - `--patterns <list>`: Comma-separated pattern names to focus on
32
- - `--save-spec`: Invoke `spec-add` for each new pattern
33
- - `--save-wiki`: Create wiki note entries per dimension group
34
-
35
- **Output**: `.workflow/.csv-wave/{session-id}/` + `.workflow/learning/decompose-{slug}-{date}.md`
36
- </context>
37
-
38
- <invariants>
39
- 1. **4 dimensions always**: structural, behavioral, data, error — each a wave 1 task
40
- 2. **Evidence required**: Every finding must have file:line anchors
41
- 3. **Dedup before persist**: Cross-reference against existing specs + lessons
42
- 4. **Stable IDs**: INS-id from `hash("decompose" + target + pattern_name)`
43
- 5. **No files modified outside** `.workflow/learning/` (and optionally specs/wiki)
44
- </invariants>
45
-
46
- <execution>
47
-
48
- ### Phase 1: Session Init + Target Resolution
49
-
50
- Parse flags from `$ARGUMENTS`: `-y`/`--yes`, `--patterns <list>`, `--save-spec`, `--save-wiki`, `--continue`, `-c N`.
51
- Extract remaining text as target path/module.
52
-
53
- Resolve target to file list. Load existing patterns from `coding-conventions.md` + `lessons.jsonl` for dedup set.
54
-
55
- ### Phase 2: Wave 1 — Parallel Dimension Scans
56
-
57
- Generate `tasks.csv` with 4 dimension rows (wave 1) + 1 cross-ref row (wave 2):
58
-
59
- | id | dimension | focus |
60
- |----|-----------|-------|
61
- | 1 | structural | Class hierarchy, composition, DI, factories, exports |
62
- | 2 | behavioral | Events, middleware, observer, command, state machines |
63
- | 3 | data | Repository, DTO, caching, serialization, validation |
64
- | 4 | error | Boundaries, retry/backoff, fallbacks, guards, logging |
65
- | 5 | cross-ref | Dedup + catalog from wave 1 findings |
66
-
67
- Each dimension agent returns:
68
- ```json
69
- [{
70
- "name": "pattern name",
71
- "dimension": "structural|behavioral|data|error",
72
- "confidence": "high|medium|low",
73
- "anchors": ["file:line"],
74
- "description": "what it does",
75
- "rationale": "why this approach",
76
- "tradeoffs": "what was given up"
77
- }]
78
- ```
79
-
80
- ### Phase 3: Wave 2 — Cross-Reference + Catalog
81
-
82
- Single agent receives all wave 1 findings via `prev_context`. Tasks:
83
- - Match against dedup set → mark as `documented`, `known`, or `new`
84
- - Merge duplicates across dimensions (same pattern found by multiple agents)
85
- - Flag contradictions with documented conventions
86
- - Build pattern catalog grouped by dimension
87
-
88
- ### Phase 4: Persist
89
-
90
- 1. Write `decompose-{slug}-{date}.md` with full catalog
91
- 2. Append each **new** pattern to `lessons.jsonl` (source: "decompose", category: "pattern")
92
- 3. If `--save-spec`: invoke `spec-add` per new pattern
93
- 4. If `--save-wiki`: create wiki note per dimension group
94
- </execution>
95
-
96
- <error_codes>
97
- | Code | Severity | Condition | Recovery |
98
- |------|----------|-----------|----------|
99
- | E001 | error | Target path not found | Check path or use module name |
100
- | E002 | error | No source files in target | Check target has .ts/.js files |
101
- | W001 | warning | Dimension agent failed — partial results | Proceed with available dimensions |
102
- | W002 | warning | coding-conventions.md not found | All patterns marked "new" |
103
- </error_codes>
104
-
105
- <success_criteria>
106
- - [ ] Target resolved to concrete file list
107
- - [ ] 4 dimension agents spawned in parallel via spawn_agents_on_csv
108
- - [ ] Each finding has: name, dimension, confidence, anchors, description
109
- - [ ] Cross-reference performed (documented / known / new)
110
- - [ ] Pattern catalog written to `decompose-{slug}-{date}.md`
111
- - [ ] New patterns appended to `lessons.jsonl` with stable INS-ids
112
- - [ ] If --save-spec / --save-wiki: entries created
113
- </success_criteria>
1
+ ---
2
+ name: learn-decompose
3
+ description: Extract design patterns from code into specs and wiki
4
+ argument-hint: "[-y|--yes] [-c|--concurrency 4] [--continue] \"<path|module> [--patterns <list>] [--save-spec] [--save-wiki]\""
5
+ allowed-tools: spawn_agents_on_csv, Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
+ ---
7
+
8
+ <purpose>
9
+ Systematic pattern extraction from code via CSV wave pipeline. 4 parallel dimension agents
10
+ scan a module, then a cross-reference agent deduplicates against existing patterns and
11
+ produces a catalog. Discovered patterns persist to `lessons.jsonl` and optionally to
12
+ specs (via `spec-add`) and wiki.
13
+
14
+ ```
15
+ Resolve Target → Load Existing Patterns → Wave 1 (4 parallel dimension scans) → Wave 2 (cross-ref + catalog) → Persist
16
+ ```
17
+ </purpose>
18
+
19
+ <context>
20
+ $ARGUMENTS — target path/module and optional flags.
21
+
22
+ **Target resolution:**
23
+ - File path → analyze that file
24
+ - Directory path → all source files in it
25
+ - Module name → Glob `src/**/{module}*`
26
+
27
+ **Flags:**
28
+ - `-y, --yes`: Skip confirmations
29
+ - `-c, --concurrency N`: Max concurrent agents (default: 4)
30
+ - `--continue`: Resume existing session
31
+ - `--patterns <list>`: Comma-separated pattern names to focus on
32
+ - `--save-spec`: Invoke `spec-add` for each new pattern
33
+ - `--save-wiki`: Create wiki note entries per dimension group
34
+
35
+ **Output**: `.workflow/.csv-wave/{session-id}/` + `.workflow/learning/decompose-{slug}-{date}.md`
36
+ </context>
37
+
38
+ <invariants>
39
+ 1. **4 dimensions always**: structural, behavioral, data, error — each a wave 1 task
40
+ 2. **Evidence required**: Every finding must have file:line anchors
41
+ 3. **Dedup before persist**: Cross-reference against existing specs + lessons
42
+ 4. **Stable IDs**: INS-id from `hash("decompose" + target + pattern_name)`
43
+ 5. **No files modified outside** `.workflow/learning/` (and optionally specs/wiki)
44
+ </invariants>
45
+
46
+ <execution>
47
+
48
+ ### Phase 1: Session Init + Target Resolution
49
+
50
+ Parse flags from `$ARGUMENTS`: `-y`/`--yes`, `--patterns <list>`, `--save-spec`, `--save-wiki`, `--continue`, `-c N`.
51
+ Extract remaining text as target path/module.
52
+
53
+ Resolve target to file list. Load existing patterns from `coding-conventions.md` + `lessons.jsonl` for dedup set.
54
+
55
+ ### Phase 2: Wave 1 — Parallel Dimension Scans
56
+
57
+ Generate `tasks.csv` with 4 dimension rows (wave 1) + 1 cross-ref row (wave 2):
58
+
59
+ | id | dimension | focus |
60
+ |----|-----------|-------|
61
+ | 1 | structural | Class hierarchy, composition, DI, factories, exports |
62
+ | 2 | behavioral | Events, middleware, observer, command, state machines |
63
+ | 3 | data | Repository, DTO, caching, serialization, validation |
64
+ | 4 | error | Boundaries, retry/backoff, fallbacks, guards, logging |
65
+ | 5 | cross-ref | Dedup + catalog from wave 1 findings |
66
+
67
+ Each dimension agent returns:
68
+ ```json
69
+ [{
70
+ "name": "pattern name",
71
+ "dimension": "structural|behavioral|data|error",
72
+ "confidence": "high|medium|low",
73
+ "anchors": ["file:line"],
74
+ "description": "what it does",
75
+ "rationale": "why this approach",
76
+ "tradeoffs": "what was given up"
77
+ }]
78
+ ```
79
+
80
+ ### Phase 3: Wave 2 — Cross-Reference + Catalog
81
+
82
+ Single agent receives all wave 1 findings via `prev_context`. Tasks:
83
+ - Match against dedup set → mark as `documented`, `known`, or `new`
84
+ - Merge duplicates across dimensions (same pattern found by multiple agents)
85
+ - Flag contradictions with documented conventions
86
+ - Build pattern catalog grouped by dimension
87
+
88
+ ### Phase 4: Persist
89
+
90
+ 1. Write `decompose-{slug}-{date}.md` with full catalog
91
+ 2. Append each **new** pattern to `lessons.jsonl` (source: "decompose", category: "pattern")
92
+ 3. If `--save-spec`: invoke `spec-add` per new pattern
93
+ 4. If `--save-wiki`: create wiki note per dimension group
94
+ </execution>
95
+
96
+ <error_codes>
97
+ | Code | Severity | Condition | Recovery |
98
+ |------|----------|-----------|----------|
99
+ | E001 | error | Target path not found | Check path or use module name |
100
+ | E002 | error | No source files in target | Check target has .ts/.js files |
101
+ | W001 | warning | Dimension agent failed — partial results | Proceed with available dimensions |
102
+ | W002 | warning | coding-conventions.md not found | All patterns marked "new" |
103
+ </error_codes>
104
+
105
+ <success_criteria>
106
+ - [ ] Target resolved to concrete file list
107
+ - [ ] 4 dimension agents spawned in parallel via spawn_agents_on_csv
108
+ - [ ] Each finding has: name, dimension, confidence, anchors, description
109
+ - [ ] Cross-reference performed (documented / known / new)
110
+ - [ ] Pattern catalog written to `decompose-{slug}-{date}.md`
111
+ - [ ] New patterns appended to `lessons.jsonl` with stable INS-ids
112
+ - [ ] If --save-spec / --save-wiki: entries created
113
+ </success_criteria>
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: learn-follow
3
- description: Guided follow-along reading of code or wiki entries. Section-by-section walk-through with 4 forcing questions, pattern extraction, and understanding map generation. Persists insights to lessons.jsonl.
3
+ description: Guided reading of code or wiki to extract patterns
4
4
  argument-hint: "<path|wiki-id|topic> [--depth shallow|deep] [--save-wiki]"
5
5
  allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
6
  ---