maestro-flow 0.3.44 → 0.3.46

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 (173) hide show
  1. package/.claude/commands/learn-decompose.md +1 -1
  2. package/.claude/commands/learn-follow.md +1 -1
  3. package/.claude/commands/learn-investigate.md +1 -1
  4. package/.claude/commands/learn-retro.md +1 -1
  5. package/.claude/commands/learn-second-opinion.md +1 -1
  6. package/.claude/commands/maestro-analyze.md +1 -1
  7. package/.claude/commands/maestro-brainstorm.md +1 -1
  8. package/.claude/commands/maestro-execute.md +3 -2
  9. package/.claude/commands/maestro-plan.md +1 -1
  10. package/.claude/commands/maestro-tools-execute.md +14 -14
  11. package/.claude/commands/maestro-tools-register.md +49 -29
  12. package/.claude/commands/manage-knowhow-capture.md +10 -1
  13. package/.claude/commands/quality-debug.md +3 -2
  14. package/.claude/commands/quality-review.md +3 -2
  15. package/.claude/commands/quality-test.md +5 -0
  16. package/.claude/commands/spec-add.md +7 -12
  17. package/.claude/commands/spec-load.md +15 -16
  18. package/.claude/skills/codify-to-knowhow/SKILL.md +1 -1
  19. package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +1 -1
  20. package/.claude/skills/maestro-help/SKILL.md +264 -0
  21. package/.claude/skills/maestro-help/index/catalog.json +182 -0
  22. package/.claude/skills/maestro-help/phases/01-parse-intent.md +122 -0
  23. package/.claude/skills/maestro-help/phases/02-search-present.md +181 -0
  24. package/.claude/skills/maestro-help/phases/03-workflow-guide.md +186 -0
  25. package/.codex/agents/team-supervisor.toml +40 -0
  26. package/.codex/agents/team-worker.toml +63 -0
  27. package/.codex/skills/codify-to-knowhow/SKILL.md +2 -2
  28. package/.codex/skills/maestro-analyze/SKILL.md +1 -1
  29. package/.codex/skills/maestro-brainstorm/SKILL.md +1 -1
  30. package/.codex/skills/maestro-collab/SKILL.md +1 -1
  31. package/.codex/skills/maestro-execute/SKILL.md +1 -1
  32. package/.codex/skills/maestro-help/SKILL.md +213 -0
  33. package/.codex/skills/maestro-help/catalog.json +182 -0
  34. package/.codex/skills/maestro-milestone-complete/SKILL.md +1 -1
  35. package/.codex/skills/maestro-plan/SKILL.md +1 -1
  36. package/.codex/skills/maestro-roadmap/SKILL.md +1 -1
  37. package/.codex/skills/maestro-tools-execute/SKILL.md +12 -12
  38. package/.codex/skills/maestro-tools-register/SKILL.md +171 -144
  39. package/.codex/skills/maestro-ui-codify/SKILL.md +1 -1
  40. package/.codex/skills/maestro-verify/SKILL.md +1 -1
  41. package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
  42. package/.codex/skills/manage-knowhow-capture/SKILL.md +18 -3
  43. package/.codex/skills/quality-auto-test/SKILL.md +2 -2
  44. package/.codex/skills/quality-debug/SKILL.md +2 -1
  45. package/.codex/skills/quality-refactor/SKILL.md +1 -1
  46. package/.codex/skills/quality-review/SKILL.md +1 -1
  47. package/.codex/skills/quality-test/SKILL.md +11 -1
  48. package/.codex/skills/spec-add/SKILL.md +104 -114
  49. package/.codex/skills/spec-load/SKILL.md +73 -73
  50. package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
  51. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  52. package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
  53. package/.codex/skills/team-testing/roles/executor/role.md +1 -1
  54. package/.codex/skills/team-testing/roles/generator/role.md +1 -1
  55. package/dashboard/dist-server/dashboard/src/server/index.js +5 -3
  56. package/dashboard/dist-server/dashboard/src/server/index.js.map +1 -1
  57. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js +3 -3
  58. package/dashboard/dist-server/dashboard/src/server/routes/board-state.integration.test.js.map +1 -1
  59. package/dashboard/dist-server/dashboard/src/server/routes/index.js +14 -5
  60. package/dashboard/dist-server/dashboard/src/server/routes/index.js.map +1 -1
  61. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.d.ts +2 -0
  62. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js +181 -0
  63. package/dashboard/dist-server/dashboard/src/server/routes/maestro-coordinate.js.map +1 -0
  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 +0 -2
  67. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  68. package/dashboard/dist-server/dashboard/src/server/state/event-bus.d.ts +2 -0
  69. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js +2 -0
  70. package/dashboard/dist-server/dashboard/src/server/state/event-bus.js.map +1 -1
  71. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.d.ts +2 -0
  72. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +58 -0
  73. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  74. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +0 -1
  75. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +6 -23
  76. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  77. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +0 -1
  78. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  79. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +0 -1
  80. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
  81. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +25 -36
  82. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +0 -5
  84. package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +0 -2
  85. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +2 -3
  86. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  87. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.d.ts +7 -2
  88. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js +7 -1
  89. package/dashboard/dist-server/dashboard/src/server/ws/handlers/agent-handler.js.map +1 -1
  90. package/dashboard/dist-server/dashboard/src/shared/constants.js +7 -9
  91. package/dashboard/dist-server/dashboard/src/shared/constants.js.map +1 -1
  92. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.d.ts +113 -0
  93. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js +6 -0
  94. package/dashboard/dist-server/dashboard/src/shared/maestro-session-types.js.map +1 -0
  95. package/dashboard/dist-server/dashboard/src/shared/types.d.ts +4 -3
  96. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.d.ts +1 -1
  97. package/dashboard/dist-server/dashboard/src/shared/ws-protocol.js.map +1 -1
  98. package/dashboard/dist-server/src/agents/cli-agent-runner.js +5 -5
  99. package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
  100. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +3 -9
  101. package/dashboard/dist-server/src/tools/spec-entry-parser.js +9 -31
  102. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
  103. package/dashboard/dist-server/src/tools/spec-loader.d.ts +5 -9
  104. package/dashboard/dist-server/src/tools/spec-loader.js +99 -52
  105. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  106. package/dist/src/agents/cli-agent-runner.js +5 -5
  107. package/dist/src/agents/cli-agent-runner.js.map +1 -1
  108. package/dist/src/commands/knowhow.d.ts.map +1 -1
  109. package/dist/src/commands/knowhow.js +11 -8
  110. package/dist/src/commands/knowhow.js.map +1 -1
  111. package/dist/src/commands/spec.d.ts.map +1 -1
  112. package/dist/src/commands/spec.js +7 -14
  113. package/dist/src/commands/spec.js.map +1 -1
  114. package/dist/src/commands/wiki.d.ts.map +1 -1
  115. package/dist/src/commands/wiki.js +11 -20
  116. package/dist/src/commands/wiki.js.map +1 -1
  117. package/dist/src/hooks/plugins/spec-injection-plugin.js +17 -14
  118. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  119. package/dist/src/hooks/spec-injector.d.ts +0 -7
  120. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  121. package/dist/src/hooks/spec-injector.js +41 -81
  122. package/dist/src/hooks/spec-injector.js.map +1 -1
  123. package/dist/src/hooks/wiki-role-loader.d.ts +5 -5
  124. package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -1
  125. package/dist/src/hooks/wiki-role-loader.js +6 -6
  126. package/dist/src/hooks/wiki-role-loader.js.map +1 -1
  127. package/dist/src/tools/spec-entry-parser.d.ts +3 -9
  128. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  129. package/dist/src/tools/spec-entry-parser.js +9 -31
  130. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  131. package/dist/src/tools/spec-init.d.ts.map +1 -1
  132. package/dist/src/tools/spec-init.js +54 -73
  133. package/dist/src/tools/spec-init.js.map +1 -1
  134. package/dist/src/tools/spec-loader.d.ts +5 -9
  135. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  136. package/dist/src/tools/spec-loader.js +99 -52
  137. package/dist/src/tools/spec-loader.js.map +1 -1
  138. package/dist/src/tools/spec-writer.d.ts +1 -1
  139. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  140. package/dist/src/tools/spec-writer.js +2 -2
  141. package/dist/src/tools/spec-writer.js.map +1 -1
  142. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  143. package/dist/src/tools/store-knowhow.js +15 -6
  144. package/dist/src/tools/store-knowhow.js.map +1 -1
  145. package/package.json +4 -2
  146. package/workflows/analyze.md +2 -2
  147. package/workflows/auto-test.md +2 -2
  148. package/workflows/brainstorm.md +1 -1
  149. package/workflows/codebase-rebuild.md +1 -1
  150. package/workflows/codebase-refresh.md +1 -1
  151. package/workflows/debug.md +1 -1
  152. package/workflows/execute.md +3 -3
  153. package/workflows/integration-test.md +2 -2
  154. package/workflows/issue-discover.md +1 -1
  155. package/workflows/knowhow.md +2 -2
  156. package/workflows/learn.md +1 -1
  157. package/workflows/map.md +1 -1
  158. package/workflows/milestone-complete.md +2 -2
  159. package/workflows/plan.md +1 -1
  160. package/workflows/quick.md +1 -1
  161. package/workflows/refactor.md +1 -1
  162. package/workflows/retrospective.md +3 -3
  163. package/workflows/review.md +1 -1
  164. package/workflows/roadmap-common.md +1 -1
  165. package/workflows/specs-add.md +2 -11
  166. package/workflows/specs-load.md +13 -14
  167. package/workflows/test-gen.md +1 -1
  168. package/workflows/tools-spec.md +27 -53
  169. package/workflows/ui-codify-knowhow.md +1 -1
  170. package/workflows/ui-codify.md +1 -1
  171. package/workflows/verify.md +1 -1
  172. package/.claude/commands/maestro-link-coordinate.md +0 -71
  173. package/.codex/skills/maestro-link-coordinate/SKILL.md +0 -257
@@ -134,7 +134,7 @@ Build the decomposition report grouped by dimension:
134
134
 
135
135
  ### Stage 6: Persist
136
136
  1. Write `.workflow/knowhow/KNW-decompose-{slug}-{date}.md`
137
- 2. Append each **new** pattern as a `<spec-entry>` block to `specs/learnings.md` via `maestro spec add learning --roles implement --body "<content>" --keywords "decompose,pattern,{dimension},{target-slug}"`:
137
+ 2. Append each **new** pattern as a `<spec-entry>` block to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "decompose,pattern,{dimension},{target-slug}"`:
138
138
  - Stable INS-id from `hash("decompose" + target + pattern_name)`
139
139
  4. If `--save-spec`: for each new pattern, invoke `Skill({ skill: "spec-add", args: "pattern {description}" })`
140
140
  5. If `--save-wiki`: create wiki note per dimension group via `maestro wiki create --type note --slug decompose-{dimension}-{slug}`
@@ -124,7 +124,7 @@ Build a structured summary document:
124
124
 
125
125
  ### Stage 7: Persist
126
126
  1. Write `.workflow/knowhow/KNW-follow-{slug}-{date}.md` with the understanding map
127
- 2. Append each new pattern/technique as a `<spec-entry>` block to `specs/learnings.md` via `maestro spec add learning --roles implement --body "<content>" --keywords "follow,{target-slug}"`:
127
+ 2. Append each new pattern/technique as a `<spec-entry>` block to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "follow,{target-slug}"`:
128
128
  - Stable INS-id from `hash("follow" + target + pattern_name)`
129
129
  3. If `--save-wiki`: run `maestro wiki create --type note --slug follow-{slug} --title "Follow-Along: {target}" --body-file .workflow/knowhow/KNW-follow-{slug}-{date}.md`
130
130
  5. Display summary with key findings and next steps
@@ -178,7 +178,7 @@ Write final `report.md`:
178
178
  ```
179
179
 
180
180
  ### Stage 8: Persist
181
- 1. Append findings as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --roles implement --body "<content>" --keywords "investigate,{question-slug}"`:
181
+ 1. Append findings as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "investigate,{question-slug}"`:
182
182
  - Confirmed hypotheses → `roles="implement"` (merge "technique"/"pattern" into keywords)
183
183
  - Disproved hypotheses → `roles="analyze"` (merge "gotcha" into keywords)
184
184
  - Stable INS-id from `hash("investigate" + question + finding_title)`
@@ -248,7 +248,7 @@ Write `.workflow/knowhow/KNW-retro-{date}.json` with structured data.
248
248
 
249
249
  ### Stage 5: Persist
250
250
  1. Write report files
251
- 2. Append insights as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --roles implement --body "<content>" --keywords "<kw>"`:
251
+ 2. Append insights as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "<kw>"`:
252
252
  - Git insights: source="retro-git", roles per insight type
253
253
  - Decision insights: source="retro-decision", roles="plan" (merge "decision" into keywords)
254
254
  - Stable INS-id from `hash(lens + metric_or_decision + date)`
@@ -128,7 +128,7 @@ Across all perspectives (or from single agent in challenge/consult):
128
128
  - Per-persona findings (review) / adversarial analysis (challenge) / Q&A transcript (consult)
129
129
  - Synthesis: agreements, disagreements, verdict
130
130
  - Recommendations
131
- 2. Append non-trivial findings as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --roles implement --body "<content>" --keywords "second-opinion,{mode},{target-slug}"`
131
+ 2. Append non-trivial findings as `<spec-entry>` blocks to `specs/learnings.md` via `maestro spec add learning --body "<content>" --keywords "second-opinion,{mode},{target-slug}"`
132
132
  4. Display summary with verdict and recommendations
133
133
 
134
134
  **Next-step routing:**
@@ -44,7 +44,7 @@ Scope routing, output directory format, artifact registration schema, and output
44
44
 
45
45
  ### Role Knowledge
46
46
  1. Browse accumulated knowledge for this role:
47
- `maestro wiki list --role analyze`
47
+ `maestro wiki list --category debug`
48
48
  2. Analyze the index, identify entries relevant to the current task
49
49
  3. Load selected documents:
50
50
  `maestro wiki load <id1> [id2] [id3...]`
@@ -47,7 +47,7 @@ $ARGUMENTS -- topic text for auto mode, or role name for single role mode.
47
47
 
48
48
  ### Role Knowledge
49
49
  1. Browse accumulated knowledge for this role:
50
- `maestro wiki list --role brainstorm`
50
+ `maestro wiki list --category arch`
51
51
  2. Analyze the index, identify entries relevant to the current task
52
52
  3. Load selected documents:
53
53
  `maestro wiki load <id1> [id2] [id3...]`
@@ -36,11 +36,12 @@ Scope routing, flags, resolution logic, output directory format, artifact regist
36
36
 
37
37
  1. **Codebase docs**: If `.workflow/codebase/doc-index.json` exists, read `ARCHITECTURE.md` for module boundaries. Pass as shared context to executor agents.
38
38
  2. **Wiki knowledge**: Run `maestro wiki search "<phase keywords>" --json 2>/dev/null`. If results found, extract top 5 entries as prior knowledge context for agents.
39
- 3. Both are optional proceed without if unavailable (log warning).
39
+ 3. **Coding specs + tools**: Run `maestro spec load --category coding` to load coding conventions AND discoverable knowhow tools (tool: true entries). Pass as specs context to all executor agents.
40
+ 4. All are optional — proceed without if unavailable (log warning).
40
41
 
41
42
  ### Role Knowledge
42
43
  1. Browse accumulated knowledge for this role:
43
- `maestro wiki list --role implement`
44
+ `maestro wiki list --category coding`
44
45
  2. Analyze the index, identify entries relevant to the current task
45
46
  3. Load selected documents:
46
47
  `maestro wiki load <id1> [id2] [id3...]`
@@ -48,7 +48,7 @@ Scope routing, base flags (`--collab`, `--spec`, `-y`, `--gaps`, `--dir`), outpu
48
48
 
49
49
  ### Role Knowledge
50
50
  1. Browse accumulated knowledge for this role:
51
- `maestro wiki list --role plan`
51
+ `maestro wiki list --category arch`
52
52
  2. Analyze the index, identify entries relevant to the current task
53
53
  3. Load selected documents:
54
54
  `maestro wiki load <id1> [id2] [id3...]`
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: maestro-tools-execute
3
- description: Load and execute tool specs by role or name
4
- argument-hint: "[tool-name | --role <role>]"
3
+ description: Load and execute tool specs by category or name
4
+ argument-hint: "[tool-name | --category <category>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -13,10 +13,10 @@ allowed-tools:
13
13
  - Agent
14
14
  ---
15
15
  <purpose>
16
- Load registered tool specs and execute them step-by-step. Two invocation modes:
16
+ Load registered tool documents and execute them step-by-step. Two invocation modes:
17
17
 
18
18
  1. **Direct** — Specify tool name, load full steps, execute sequentially
19
- 2. **Role-based** — List available tools for a role, user selects, then execute
19
+ 2. **Category-based** — List available tools for a category, user selects, then execute
20
20
 
21
21
  Execution follows the tool definition steps in order, reporting progress per step and asking user on blockers.
22
22
  </purpose>
@@ -26,13 +26,13 @@ Execution follows the tool definition steps in order, reporting progress per ste
26
26
  </required_reading>
27
27
 
28
28
  <context>
29
- $ARGUMENTS — Tool name, keyword, or --role filter
29
+ $ARGUMENTS — Tool name, keyword, or --category filter
30
30
 
31
31
  **Examples**:
32
32
  ```
33
33
  /maestro-tools-execute integration-test
34
- /maestro-tools-execute --role implement
35
- /maestro-tools-execute --role review --keyword api
34
+ /maestro-tools-execute --category coding
35
+ /maestro-tools-execute --category review --keyword api
36
36
  /maestro-tools-execute
37
37
  ```
38
38
 
@@ -45,23 +45,23 @@ Empty arguments enters interactive mode: list all tools for user selection.
45
45
 
46
46
  **By name**:
47
47
  ```bash
48
- maestro spec load --role implement --keyword <name>
48
+ maestro spec load --category coding --keyword <name>
49
49
  ```
50
- Match entries in tools.md whose title or keywords contain the name.
50
+ Match knowhow documents with `tool: true` whose title or keywords contain the name.
51
51
 
52
- **By role**:
52
+ **By category**:
53
53
  ```bash
54
- maestro spec load --role <role>
54
+ maestro spec load --category <category>
55
55
  ```
56
- Extract tools.md entries from output, list available tools.
56
+ Extract tool entries from the "Available Tools" section in output.
57
57
 
58
58
  **Empty args**:
59
- Load all tools.md entries, present to user with AskUserQuestion for selection.
59
+ Load all categories, collect tool entries, present to user with AskUserQuestion for selection.
60
60
 
61
61
  ### Step 2: Display Tool
62
62
 
63
63
  Show tool information:
64
- - Name, roles, keywords
64
+ - Name, category, keywords
65
65
  - Steps overview (for ref entries, expand knowhow detail first)
66
66
 
67
67
  Expand ref entries:
@@ -13,11 +13,11 @@ allowed-tools:
13
13
  - Agent
14
14
  ---
15
15
  <purpose>
16
- Codify reusable business processes as tool specs into `.workflow/specs/tools.md`. Once registered, entries are auto-discovered by downstream agents via `spec load --role` and spec-injector — plan agents pick up design/architecture flows, test agents pick up verification methods, implement agents pick up execution steps.
16
+ Codify reusable business processes as knowhow documents with `tool: true` in `.workflow/knowhow/`. Once registered, tools are auto-discovered by `spec load --category` and spec-injector — plan agents pick up design/architecture flows, test agents pick up verification methods, implement agents pick up execution steps.
17
17
 
18
18
  When to register: during planning to standardize a business process (e.g. payment reconciliation, OAuth integration steps); after execution to capture a validated procedure (e.g. database migration rollback); before testing to register verification methods for test agents (e.g. E2E checkout flow, API idempotency verification); during retrospective/harvest to extract reusable process knowledge from artifacts.
19
19
 
20
- Three modes: Extract (from code/docs), Generate (from description), Optimize (improve existing).
20
+ Four modes: Extract (from code/docs), Generate (from description), Optimize (improve existing), Promote (existing knowhow → tool in place).
21
21
  Short processes (<10 steps) inline; long processes (>=10 steps) use ref mode with knowhow detail doc.
22
22
  </purpose>
23
23
 
@@ -31,9 +31,11 @@ $ARGUMENTS — Intent description
31
31
  **Examples**:
32
32
  ```
33
33
  /maestro-tools-register extract OAuth PKCE token exchange flow from src/auth/
34
- /maestro-tools-register generate Stripe webhook idempotency verification --roles implement,test
35
- /maestro-tools-register generate E2E checkout flow with payment gateway mock setup --roles test
34
+ /maestro-tools-register generate Stripe webhook idempotency verification
35
+ /maestro-tools-register generate E2E checkout flow with payment gateway mock setup
36
36
  /maestro-tools-register optimize e2e-checkout tool
37
+ /maestro-tools-register promote RCP-db-migration-rollback as test tool
38
+ /maestro-tools-register promote knowhow-auth-api to coding tool
37
39
  ```
38
40
  </context>
39
41
 
@@ -44,6 +46,7 @@ $ARGUMENTS — Intent description
44
46
  Parse $ARGUMENTS to determine mode:
45
47
  - Contains "extract" → extract mode
46
48
  - Contains "optimize/improve" → optimize mode
49
+ - Contains "promote" or references existing knowhow doc (path/ID) → promote mode
47
50
  - Other → generate mode
48
51
  - Empty → ask user with AskUserQuestion
49
52
 
@@ -58,19 +61,37 @@ Parse $ARGUMENTS to determine mode:
58
61
  - If unclear, ask user with AskUserQuestion
59
62
 
60
63
  **Optimize mode**:
61
- - Load existing tool: `maestro spec load --role implement --keyword <name>`
64
+ - Load existing tool: `maestro spec load --category coding --keyword <name>`
62
65
  - Analyze improvement points (step splitting, prerequisites, error handling)
63
66
 
67
+ **Promote mode** (existing knowhow → tool):
68
+ - Locate document: `maestro wiki list --keyword <name>` or by path in `.workflow/knowhow/`
69
+ - Read document, verify it contains actionable steps (numbered list or ## Steps section)
70
+ - If no actionable steps, suggest extract mode instead
71
+ - Determine category (Step 3) and summary ("Use when ...")
72
+ - Update frontmatter via: `maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "<summary>"}'`
73
+ - Do NOT recreate the document — modify in place
74
+
64
75
  **For all modes** — identify the usage timing: when should an agent or user invoke this tool? This becomes the first line of the entry description (see Step 5).
65
76
 
66
- ### Step 3: Determine Roles
77
+ ### Step 3: Determine Category
78
+
79
+ **Core principle**: `category` = **who consumes this tool** (which agent type discovers and uses it), not what the content is about.
80
+
81
+ | Category | Consumer Agent | Decision Question | Signal Words |
82
+ |---|---|---|---|
83
+ | `coding` | code-developer, workflow-executor | 开发者实现时需要这个流程吗? | build, deploy, integrate, configure, setup, migrate, api-contract |
84
+ | `test` | tdd-developer, test-fix-agent | 测试者验证行为时需要这个流程吗? | verify, validate, assert, e2e, regression, coverage, idempotency |
85
+ | `review` | workflow-reviewer | 审查者需要这个作为 checklist 吗? | audit, checklist, compliance, quality-gate, standard |
86
+ | `arch` | workflow-planner | 规划者设计方案时需要这个吗? | design, architecture, decompose, trade-off, migration-strategy |
87
+ | `debug` | debug-explore-agent | 调试者排查问题时需要这个吗? | diagnose, trace, investigate, root-cause, reproduce |
67
88
 
68
- Infer applicable roles from context, or ask user:
69
- - implement execution tools (build, deploy, integrate)
70
- - test testing tools (test flows, verification steps)
71
- - review review tools (checklists, audit standards)
72
- - plan — planning tools (design flows, analysis steps)
73
- - analyzeanalysis tools (diagnostic flows, investigation steps)
89
+ **Multi-consumer split**: If content serves multiple consumers (e.g., API doc for both dev and test), split into separate documents:
90
+ - API contract (what endpoints look like) → `category: coding` (AST-*, tool: false)
91
+ - API verification steps (how to test) `category: test` (RCP-*, tool: true)
92
+ - Ask user when ambiguous: "This tool content serves both developers and testers. Split into separate documents?"
93
+
94
+ **Ambiguous cases**: Choose the **primary consumer** the agent that would fail without this knowledge.
74
95
 
75
96
  ### Step 4: Decide Inline vs Ref
76
97
 
@@ -89,32 +110,31 @@ Use when {timing/trigger condition}.
89
110
  1. Step one ...
90
111
  ```
91
112
 
92
- **Inline mode**:
93
- ```bash
94
- maestro spec add tools "<title>" "Use when <timing>.\n\n1. <step1>\n2. <step2>" --roles "<csv>" --keywords "<csv>"
95
- ```
96
-
97
- **Ref mode**:
98
- 1. Generate knowhow detail document (RCP- or DOC- prefix). YAML frontmatter must include `summary` with usage timing — this is what `wiki list` and wiki-role-loader show to agents:
113
+ **Create knowhow tool document** in `.workflow/knowhow/` with `tool: true` in YAML frontmatter:
99
114
  ```yaml
100
115
  ---
101
116
  title: <Title>
102
117
  type: recipe
118
+ category: <category>
119
+ keywords: [<keywords>]
120
+ tool: true
103
121
  summary: "Use when <timing>. <scope description>"
104
- tags: [<keywords>]
105
- roles: [<roles>]
106
122
  ---
123
+
124
+ ## Steps
125
+ 1. Step one ...
107
126
  ```
108
- 2. Register spec index entry — description must also include usage timing within 200 chars (this is what `spec load` shows):
127
+
128
+ **Optionally register spec ref entry** for index discoverability:
109
129
  ```bash
110
- maestro spec add tools "<title>" "Use when <timing>. <scope summary>" --roles "<csv>" --keywords "<csv>" \
130
+ maestro spec add <category> "<title>" "Use when <timing>. <scope summary>" --keywords "<csv>" \
111
131
  --ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
112
132
  ```
113
133
 
114
134
  ### Step 6: Verify
115
135
 
116
- - `maestro spec load --role <role> --keyword <keyword>` to confirm loadable
117
- - Display result: title, roles, keywords, storage location
136
+ - `maestro spec load --category <category> --keyword <keyword>` to confirm loadable
137
+ - Display result: title, category, keywords, storage location
118
138
 
119
139
  </execution>
120
140
 
@@ -123,15 +143,15 @@ maestro spec add tools "<title>" "Use when <timing>. <scope summary>" --roles "<
123
143
  |------|----------|-------------|
124
144
  | E001 | fatal | `.workflow/specs/` does not exist — run `maestro spec init` |
125
145
  | E002 | warning | Duplicate tool name detected — confirm overwrite/optimize |
126
- | E003 | fatal | roles parameter empty — tools must declare applicable roles |
146
+ | E003 | fatal | category parameter empty — tools must declare a category |
127
147
  </error_codes>
128
148
 
129
149
  <success_criteria>
130
- - [ ] Tool definition written to tools.md (or ref to knowhow)
131
- - [ ] roles attribute correctly set
150
+ - [ ] Tool registered as knowhow document with `tool: true` frontmatter
151
+ - [ ] category correctly set
132
152
  - [ ] keywords auto-extracted (3-5 terms)
133
153
  - [ ] Description starts with "Use when ..." (usage timing)
134
- - [ ] Loadable via `spec load --role <role>`
154
+ - [ ] Loadable via `spec load --category <category>`
135
155
  - [ ] Long processes use ref mode with knowhow file created
136
156
  - [ ] Ref knowhow YAML includes `summary` with usage timing
137
157
  </success_criteria>
@@ -34,6 +34,9 @@ Arguments: $ARGUMENTS
34
34
  | `reference` | REF- | External doc / API quick-ref | source URL, key points, scenarios |
35
35
  | `decision` | DCS- | Design decision record | context, alternatives, rationale, consequences |
36
36
  | `tip` | TIP- | Quick note / reminder | content, tags |
37
+ | `asset` | AST- | Code asset (API contract, data model) | assetType, codePaths, category |
38
+ | `blueprint` | BLP- | Architecture design with code paths | codePaths, category |
39
+ | `document` | DOC- | General long-form (fallback) | — |
37
40
 
38
41
  No arguments: auto-detect type or ask user via AskUserQuestion.
39
42
 
@@ -42,6 +45,9 @@ No arguments: auto-detect type or ask user via AskUserQuestion.
42
45
  - `--source <url>` — Source URL for references
43
46
  - `--tag tag1,tag2` — Categorization tags
44
47
  - `--title <title>` — Explicit title (auto-generated if omitted)
48
+ - `--asset-type <type>` — Asset subtype: api-contract, data-model, prompt, config, etc.
49
+ - `--code-paths <paths>` — Related source paths for asset/blueprint (comma-separated)
50
+ - `--category <cat>` — Spec category for agent discovery (coding, arch, test, debug, review, learning)
45
51
  </context>
46
52
 
47
53
  <execution>
@@ -58,8 +64,11 @@ Parse first token as type. If ambiguous, AskUserQuestion with options:
58
64
  | `reference`, `ref`, `参考`, `引用` | reference |
59
65
  | `decision`, `dcs`, `决策`, `adr` | decision |
60
66
  | `tip`, `note`, `记录`, `快速` | tip |
67
+ | `asset`, `ast`, `资产`, `契约` | asset |
68
+ | `blueprint`, `blp`, `蓝图` | blueprint |
69
+ | `document`, `doc`, `文档` | document |
61
70
  | No match, short text, `--tag` present | tip |
62
- | No arguments | AskUserQuestion (6 options) |
71
+ | No arguments | AskUserQuestion (9 options) |
63
72
 
64
73
  ### Step 2: Generate Content by Type
65
74
 
@@ -47,11 +47,12 @@ Extract conclusions from related artifacts that may affect this debug session
47
47
 
48
48
  1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, load module boundaries to scope impact analysis and inform hypothesis formation.
49
49
  2. **Wiki prior knowledge**: Run `maestro wiki search "<symptom keywords>" --json 2>/dev/null`. If results found, check for prior investigations on similar issues to avoid re-investigation.
50
- 3. Both are optional proceed without if unavailable.
50
+ 3. **Debug specs + tools**: Run `maestro spec load --category debug --keyword "<symptom keywords>"`. If tools found, extract known issues, workarounds, and root-cause notes to inform hypotheses.
51
+ 4. All are optional — proceed without if unavailable.
51
52
 
52
53
  ### Role Knowledge
53
54
  1. Browse accumulated knowledge for this role:
54
- `maestro wiki list --role analyze`
55
+ `maestro wiki list --category debug`
55
56
  2. Analyze the index, identify entries relevant to the current task
56
57
  3. Load selected documents:
57
58
  `maestro wiki load <id1> [id2] [id3...]`
@@ -52,11 +52,12 @@ Extract conclusions from related artifacts that may affect this review. Pass as
52
52
 
53
53
  1. **Codebase docs**: If `.workflow/codebase/ARCHITECTURE.md` exists, load component boundaries and layer rules. Pass as `codebase_context` to reviewer agents (especially architecture dimension).
54
54
  2. **Wiki constraints**: Run `maestro wiki search "architecture constraint" --json 2>/dev/null`. If results found, pass as `wiki_context` to reviewer agents for evaluating code against documented decisions.
55
- 3. Both are optional proceed without if unavailable.
55
+ 3. **Review specs + tools**: Run `maestro spec load --category review` to load review standards, checklists, AND discoverable knowhow tools. Pass as `specs_content` to all reviewer agents.
56
+ 4. All are optional — proceed without if unavailable.
56
57
 
57
58
  ### Role Knowledge
58
59
  1. Browse accumulated knowledge for this role:
59
- `maestro wiki list --role review`
60
+ `maestro wiki list --category review`
60
61
  2. Analyze the index, identify entries relevant to the current task
61
62
  3. Load selected documents:
62
63
  `maestro wiki load <id1> [id2] [id3...]`
@@ -40,6 +40,11 @@ Follow '~/.maestro/workflows/test.md' completely.
40
40
 
41
41
  **Command-specific extensions (not in workflow):**
42
42
 
43
+ **Test tool discovery** (knowhow tools as scenario source):
44
+ - Load registered test tools: `maestro spec load --category test --keyword <feature>`
45
+ - If tools found, extract their steps as additional test scenarios marked `source: "tool"`
46
+ - Each numbered step in a tool becomes a UAT test with its assertion as `expected` behavior
47
+
43
48
  **Review findings integration** (from related review artifacts):
44
49
  - Extract critical/high findings as additional test scenarios, marked `source: "review_finding"`
45
50
  - When review verdict is "BLOCK" and review-finding tests fail, auto-enter gap-fix loop
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: spec-add
3
3
  description: Add spec entry by category with role tagging
4
- argument-hint: "[--scope project|global|team|personal] [--roles <csv>] <category> <content>"
4
+ argument-hint: "[--scope project|global|team|personal] <category> <content>"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -13,7 +13,7 @@ allowed-tools:
13
13
  Add a knowledge entry to the specs system using `<spec-entry>` closed-tag format.
14
14
  Each category maps 1:1 to a single target file — no dual-write.
15
15
  Supports 4 scopes: project (default), global, team, personal.
16
- Entries use `roles` attribute to declare which agent roles should load them.
16
+ Entries use `category` attribute to declare which category they belong to.
17
17
  </purpose>
18
18
 
19
19
  <required_reading>
@@ -21,10 +21,9 @@ Entries use `roles` attribute to declare which agent roles should load them.
21
21
  </required_reading>
22
22
 
23
23
  <context>
24
- $ARGUMENTS -- expects `[--scope <scope>] [--uid <uid>] [--roles <csv>] <category> <content>`
24
+ $ARGUMENTS -- expects `[--scope <scope>] [--uid <uid>] <category> <content>`
25
25
 
26
26
  **Options:**
27
- - `--roles <csv>` — Comma-separated roles (implement, plan, test, review, analyze, explore). Determines which agents load this entry via `spec load --role`.
28
27
  - `--ref <path>` — Create as index entry referencing a knowhow document. If the path exists, only creates the spec index entry. If path doesn't exist, also creates the knowhow file.
29
28
  - `--knowhow-type <type>` — Knowhow document type when creating with --ref (asset, blueprint, document, template, recipe, reference, decision)
30
29
 
@@ -32,16 +31,12 @@ Scope-to-directory mapping, category-to-file mapping, and entry format defined i
32
31
 
33
32
  **Examples:**
34
33
  ```bash
35
- # Tool spec with roles (stored in tools.md)
36
- /spec-add tools "Integration Test Flow" "## Steps\n1. Setup\n2. Run" --roles "implement,test" --keywords "testing,api"
34
+ # Standard spec entry
35
+ /spec-add coding "Named exports" "Always use named exports" --keywords "exports,naming"
37
36
 
38
- # Tool spec with ref to detailed knowhow
39
- /spec-add tools "OAuth PKCE Flow" "完整 PKCE 集成流程" --roles "implement" --ref knowhow/RCP-oauth-pkce.md
37
+ # Spec with ref to detailed knowhow
38
+ /spec-add coding "OAuth PKCE Flow" "完整 PKCE 集成流程" --ref knowhow/RCP-oauth-pkce.md --keywords "oauth,pkce"
40
39
 
41
- # Standard spec with role
42
- /spec-add coding "Named exports" "Always use named exports" --roles "implement"
43
-
44
- # Legacy style (no --roles, backward compat)
45
40
  /spec-add arch "OAuth PKCE 集成" "完整流程设计" --ref knowhow/AST-oauth-flow.md
46
41
  ```
47
42
  </context>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: spec-load
3
3
  description: Load specs and lessons for current context
4
- argument-hint: "[--role <role>] [--keyword <word>]"
4
+ argument-hint: "[--category <category>] [--keyword <word>]"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Bash
@@ -9,8 +9,8 @@ allowed-tools:
9
9
  - Grep
10
10
  ---
11
11
  <purpose>
12
- Load relevant specs filtered by role (primary), category (file-level), and/or keyword (entry-level).
13
- Role-based loading: loads the role's primary doc in full + matching entries from other files.
12
+ Load relevant specs filtered by category (file-level) and/or keyword (entry-level).
13
+ Category-based loading: loads the category's primary doc in full + matching entries from other files.
14
14
  </purpose>
15
15
 
16
16
  <required_reading>
@@ -21,26 +21,25 @@ Role-based loading: loads the role's primary doc in full + matching entries from
21
21
  $ARGUMENTS -- optional flags and keyword
22
22
 
23
23
  **Flags:**
24
- - `--role <role>` — Load by role: primary role doc (full) + cross-file entries with matching roles attr. Roles: implement, plan, test, review, analyze, explore, brainstorm, research.
24
+ - `--category <category>` — Load by category: primary category doc (full) + cross-file entries with matching category attr. Categories: coding, arch, test, review, debug, quality, learning.
25
25
  - `--keyword <word>` — Filter by keyword within entries
26
26
 
27
- **File → Primary Role mapping:**
28
- | File | Role |
29
- |------|------|
30
- | coding-conventions.md | implement |
31
- | architecture-constraints.md | plan |
27
+ **File → Primary Category mapping:**
28
+ | File | Category |
29
+ |------|----------|
30
+ | coding-conventions.md | coding |
31
+ | architecture-constraints.md | arch |
32
32
  | test-conventions.md | test |
33
33
  | review-standards.md | review |
34
- | debug-notes.md | analyze |
35
- | quality-rules.md | review |
36
- | learnings.md | implement |
37
- | tools.md | _(per-entry roles)_ |
34
+ | debug-notes.md | debug |
35
+ | quality-rules.md | quality |
36
+ | learnings.md | learning |
38
37
 
39
38
  **Examples:**
40
39
  ```
41
- /spec-load --role implement # coding全文 + 跨文件implement条目
42
- /spec-load --role review # review-standards + quality-rules + 跨文件review条目
43
- /spec-load --role implement --keyword auth
40
+ /spec-load --category coding # coding全文 + 跨文件coding条目
41
+ /spec-load --category review # review-standards + quality-rules + 跨文件review条目
42
+ /spec-load --category coding --keyword auth
44
43
  /spec-load --keyword auth
45
44
  ```
46
45
 
@@ -164,4 +164,4 @@ Completion report
164
164
  ## Related Commands
165
165
 
166
166
  **上游**: `maestro-ui-codify`, `learn-decompose`, 或任何生成 manifest 的 skill
167
- **后续**: `maestro wiki list --role implement`, `maestro spec load --keyword <slug>`
167
+ **后续**: `maestro wiki list --category coding`, `maestro spec load --keyword <slug>`
@@ -104,7 +104,7 @@ Ref 链接: spec → knowhow 桥梁已建立
104
104
  Wiki 索引: 已刷新
105
105
 
106
106
  后续操作:
107
- maestro wiki list --role implement # 按角色浏览
107
+ maestro wiki list --category coding # 按角色浏览
108
108
  maestro spec load --keyword {slug} # 加载相关 spec
109
109
  maestro wiki load <id> # 加载详文
110
110
  ```