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
@@ -1,144 +1,171 @@
1
- ---
2
- name: maestro-tools-register
3
- description: Register tool specs - extract, generate, or optimize reusable process definitions
4
- argument-hint: "[description or intent]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
6
- ---
7
-
8
- <purpose>
9
- 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.
10
-
11
- Three modes:
12
-
13
- 1. **Extract** — Pull reusable processes from conversations/code/docs
14
- 2. **Generate** — Create new tool definitions from user description
15
- 3. **Optimize** — Improve existing tool spec steps, structure, clarity
16
-
17
- Short processes (<10 steps) inline; long processes (>=10 steps or with code examples) use ref mode with knowhow detail doc (RCP-/DOC-).
18
- </purpose>
19
-
20
- <context>
21
- $ARGUMENTS — User intent description, or empty (interactive guidance)
22
-
23
- ```bash
24
- $maestro-tools-register "extract OAuth PKCE token exchange flow from src/auth/"
25
- $maestro-tools-register "generate Stripe webhook idempotency verification --roles implement,test"
26
- $maestro-tools-register "generate E2E checkout flow with payment gateway mock setup --roles test"
27
- $maestro-tools-register "optimize e2e-checkout tool"
28
- ```
29
-
30
- **Tool spec storage**: `.workflow/specs/tools.md`, format:
31
- ```xml
32
- <spec-entry roles="implement,test" keywords="testing,api" date="YYYY-MM-DD">
33
- ### Tool Name
34
- Step content...
35
- </spec-entry>
36
- ```
37
-
38
- **Ref mode** (long processes):
39
- ```xml
40
- <spec-entry roles="implement" keywords="deploy,pipeline" date="YYYY-MM-DD"
41
- ref="knowhow/RCP-deploy-flow.md">
42
- ### Deploy Flow
43
- Standard deployment process. See referenced document.
44
- </spec-entry>
45
- ```
46
- </context>
47
-
48
- <execution>
49
-
50
- ### Step 1: Intent Detection
51
-
52
- Parse $ARGUMENTS to determine mode:
53
- - Contains "extract" extract mode
54
- - Contains "optimize/improve" → optimize mode
55
- - Othergenerate mode
56
- - Empty ask user with AskUserQuestion
57
-
58
- ### Step 2: Gather Information
59
-
60
- **Extract mode**:
61
- - Identify source (current conversation, specified files, codebase scan)
62
- - Extract step sequence, prerequisites, expected outputs
63
-
64
- **Generate mode**:
65
- - Confirm tool name, applicable roles, target scenario
66
- - If unclear, ask user with AskUserQuestion
67
-
68
- **Optimize mode**:
69
- - Load existing tool: `maestro spec load --role implement --keyword <name>`
70
- - Analyze improvement points (step splitting, prerequisites, error handling)
71
-
72
- **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).
73
-
74
- ### Step 3: Determine Roles
75
-
76
- Infer applicable roles from context, or ask user:
77
- - implement execution tools (build, deploy, integrate)
78
- - test testing tools (test flows, verification steps)
79
- - review review tools (checklists, audit standards)
80
- - plan planning tools (design flows, analysis steps)
81
- - analyze — analysis tools (diagnostic flows, investigation steps)
82
-
83
- ### Step 4: Decide Inline vs Ref
84
-
85
- - Steps <10 and no code blocks → **inline mode**
86
- - Steps >=10 or contains code examples/config **ref mode**
87
-
88
- ### Step 5: Write
89
-
90
- **Description format**: First line after `### Title` must state **when to use** this tool (the usage timing from Step 2). This is critical for ref entries — `spec load` only shows the first 200 chars after the heading as the summary.
91
-
92
- ```
93
- ### {Title}
94
-
95
- Use when {timing/trigger condition}.
96
-
97
- 1. Step one ...
98
- ```
99
-
100
- **Inline mode**:
101
- ```bash
102
- maestro spec add tools "<title>" "Use when <timing>.\n\n1. <step1>\n2. <step2>" --roles "<csv>" --keywords "<csv>"
103
- ```
104
-
105
- **Ref mode**:
106
- 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:
107
- ```yaml
108
- ---
109
- title: <Title>
110
- type: recipe
111
- category: recipe
112
- summary: "Use when <timing>. <scope description>"
113
- tags: [<keywords>]
114
- roles: [<roles>]
115
- ---
116
- ```
117
- 2. Register spec index entry — description must also include usage timing within 200 chars (this is what `spec load` shows):
118
- ```bash
119
- maestro spec add tools "<title>" "Use when <timing>. <scope summary>" --roles "<csv>" --keywords "<csv>" \
120
- --ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
121
- ```
122
-
123
- ### Step 6: Verify
124
-
125
- - `maestro spec load --role <role> --keyword <keyword>` to confirm loadable
126
- - Display result: title, roles, keywords, storage location
127
-
128
- </execution>
129
-
130
- <error_codes>
131
- | Code | Severity | Description |
132
- |------|----------|-------------|
133
- | E001 | fatal | `.workflow/specs/` does not exist — run `maestro spec init` |
134
- | E002 | warning | Duplicate tool name detected — confirm overwrite/optimize |
135
- | E003 | fatal | roles parameter empty — tools must declare applicable roles |
136
- </error_codes>
137
-
138
- <success_criteria>
139
- - [ ] Tool definition written to tools.md (or ref to knowhow)
140
- - [ ] roles attribute correctly set
141
- - [ ] keywords auto-extracted (3-5 terms)
142
- - [ ] Loadable via `spec load --role <role>`
143
- - [ ] Long processes use ref mode with knowhow file created
144
- </success_criteria>
1
+ ---
2
+ name: maestro-tools-register
3
+ description: Register tool specs - extract, generate, or optimize reusable process definitions
4
+ argument-hint: "[description or intent]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion, Agent
6
+ ---
7
+
8
+ <purpose>
9
+ Codify reusable business processes as knowhow documents with `tool: true` in YAML frontmatter. Once registered, entries are auto-discovered by downstream agents via `spec load --category` — plan agents pick up design/architecture flows, test agents pick up verification methods, coding agents pick up execution steps.
10
+
11
+ Four modes:
12
+
13
+ 1. **Extract** — Pull reusable processes from conversations/code/docs
14
+ 2. **Generate** — Create new tool definitions from user description
15
+ 3. **Optimize** — Improve existing tool spec steps, structure, clarity
16
+ 4. **Promote** — Convert existing knowhow document to tool (add `tool: true` + category in place)
17
+
18
+ Short processes (<10 steps) inline; long processes (>=10 steps or with code examples) use ref mode with knowhow detail doc (RCP-/DOC-).
19
+ </purpose>
20
+
21
+ <context>
22
+ $ARGUMENTS — User intent description, or empty (interactive guidance)
23
+
24
+ ```bash
25
+ $maestro-tools-register "extract OAuth PKCE token exchange flow from src/auth/"
26
+ $maestro-tools-register "generate Stripe webhook idempotency verification"
27
+ $maestro-tools-register "generate E2E checkout flow with payment gateway mock setup"
28
+ $maestro-tools-register "optimize e2e-checkout tool"
29
+ $maestro-tools-register "promote RCP-db-migration-rollback as test tool"
30
+ $maestro-tools-register "promote knowhow-auth-api to coding tool"
31
+ ```
32
+
33
+ **Tool registration**: Creates knowhow documents in `knowhow/` folder with `tool: true` in YAML frontmatter. Tools are auto-discovered by `spec load` based on category + tool flag.
34
+
35
+ **Knowhow format**:
36
+ ```yaml
37
+ ---
38
+ title: Tool Name
39
+ type: recipe
40
+ category: coding
41
+ summary: "Use when <timing>. <scope description>"
42
+ tags: [testing, api]
43
+ tool: true
44
+ ---
45
+ Step content...
46
+ ```
47
+ </context>
48
+
49
+ <execution>
50
+
51
+ ### Step 1: Intent Detection
52
+
53
+ Parse $ARGUMENTS to determine mode:
54
+ - Contains "extract" → extract mode
55
+ - Contains "optimize/improve" optimize mode
56
+ - Contains "promote" or references existing knowhow doc (path/ID) → promote mode
57
+ - Other → generate mode
58
+ - Empty ask user with AskUserQuestion
59
+
60
+ ### Step 2: Gather Information
61
+
62
+ **Extract mode**:
63
+ - Identify source (current conversation, specified files, codebase scan)
64
+ - Extract step sequence, prerequisites, expected outputs
65
+
66
+ **Generate mode**:
67
+ - Confirm tool name, applicable roles, target scenario
68
+ - If unclear, ask user with AskUserQuestion
69
+
70
+ **Optimize mode**:
71
+ - Load existing tool: `maestro spec load --category coding --keyword <name>`
72
+ - Analyze improvement points (step splitting, prerequisites, error handling)
73
+
74
+ **Promote mode** (existing knowhow → tool):
75
+ - Locate document: `maestro wiki list --keyword <name>` or by path in `.workflow/knowhow/`
76
+ - Read document, verify it contains actionable steps (numbered list or ## Steps section)
77
+ - If no actionable steps, suggest extract mode instead
78
+ - Determine category (Step 3) and summary ("Use when ...")
79
+ - Update frontmatter via: `maestro wiki update <id> --frontmatter '{"tool": true, "category": "<cat>", "summary": "<summary>"}'`
80
+ - Do NOT recreate the document modify in place
81
+
82
+ **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).
83
+
84
+ ### Step 3: Determine Category
85
+
86
+ **Core principle**: `category` = **who consumes this tool** (which agent type discovers and uses it), not what the content is about.
87
+
88
+ | Category | Consumer Agent | Decision Question | Signal Words |
89
+ |---|---|---|---|
90
+ | `coding` | code-developer, workflow-executor | 开发者实现时需要这个流程吗? | build, deploy, integrate, configure, setup, migrate, api-contract |
91
+ | `test` | tdd-developer, test-fix-agent | 测试者验证行为时需要这个流程吗? | verify, validate, assert, e2e, regression, coverage, idempotency |
92
+ | `review` | workflow-reviewer | 审查者需要这个作为 checklist 吗? | audit, checklist, compliance, quality-gate, standard |
93
+ | `arch` | workflow-planner | 规划者设计方案时需要这个吗? | design, architecture, decompose, trade-off, migration-strategy |
94
+ | `debug` | debug-explore-agent | 调试者排查问题时需要这个吗? | diagnose, trace, investigate, root-cause, reproduce |
95
+
96
+ **Multi-consumer split**: If content serves multiple consumers (e.g., API doc for both dev and test), split into separate documents:
97
+ - API contract (what endpoints look like) → `category: coding` (AST-*, tool: false)
98
+ - API verification steps (how to test) → `category: test` (RCP-*, tool: true)
99
+ - Ask user when ambiguous: "This tool content serves both developers and testers. Split into separate documents?"
100
+
101
+ **Ambiguous cases**: Choose the **primary consumer** — the agent that would fail without this knowledge.
102
+
103
+ ### Step 4: Decide Inline vs Ref
104
+
105
+ - Steps <10 and no code blocks → **inline mode**
106
+ - Steps >=10 or contains code examples/config **ref mode**
107
+
108
+ ### Step 5: Write
109
+
110
+ **Description format**: First line after `### Title` must state **when to use** this tool (the usage timing from Step 2). This is critical for ref entries — `spec load` only shows the first 200 chars after the heading as the summary.
111
+
112
+ ```
113
+ ### {Title}
114
+
115
+ Use when {timing/trigger condition}.
116
+
117
+ 1. Step one ...
118
+ ```
119
+
120
+ **Inline mode**:
121
+ Create a knowhow document in `knowhow/` with `tool: true` frontmatter:
122
+ ```yaml
123
+ ---
124
+ title: <Title>
125
+ type: recipe
126
+ category: <category>
127
+ summary: "Use when <timing>. <scope description>"
128
+ tags: [<keywords>]
129
+ tool: true
130
+ ---
131
+ Use when <timing>.
132
+
133
+ 1. <step1>
134
+ 2. <step2>
135
+ ```
136
+
137
+ **Ref mode**:
138
+ 1. Generate knowhow detail document (RCP- or DOC- prefix). YAML frontmatter must include `summary` with usage timing and `tool: true`:
139
+ ```yaml
140
+ ---
141
+ title: <Title>
142
+ type: recipe
143
+ category: <category>
144
+ summary: "Use when <timing>. <scope description>"
145
+ tags: [<keywords>]
146
+ tool: true
147
+ ---
148
+ ```
149
+
150
+ ### Step 6: Verify
151
+
152
+ - `maestro spec load --category <category> --keyword <keyword>` to confirm loadable
153
+ - Display result: title, category, keywords, storage location
154
+
155
+ </execution>
156
+
157
+ <error_codes>
158
+ | Code | Severity | Description |
159
+ |------|----------|-------------|
160
+ | E001 | fatal | `.workflow/specs/` does not exist — run `maestro spec init` |
161
+ | E002 | warning | Duplicate tool name detected — confirm overwrite/optimize |
162
+ | E003 | fatal | category parameter empty — tools must declare applicable category |
163
+ </error_codes>
164
+
165
+ <success_criteria>
166
+ - [ ] Tool registered as knowhow document with `tool: true` frontmatter
167
+ - [ ] category attribute correctly set
168
+ - [ ] keywords auto-extracted (3-5 terms)
169
+ - [ ] Loadable via `spec load --category <category>`
170
+ - [ ] Long processes use ref mode with knowhow file created
171
+ </success_criteria>
@@ -361,7 +361,7 @@ Open preview:
361
361
  file://{absolute_path}/preview.html
362
362
 
363
363
  Next steps:
364
- maestro wiki list --role implement # Browse by role
364
+ maestro wiki list --category coding # Browse by role
365
365
  maestro spec load --keyword {package_name} # Load related specs
366
366
  ```
367
367
 
@@ -226,7 +226,7 @@ If exit code is 1, present warnings and ask whether to proceed.
226
226
  - Wave 2: artifact/substance + wiring (need existence confirmation from wave 1)
227
227
  - Wave 3: antipattern + nyquist (need substance/wiring context from wave 2)
228
228
 
229
- 7. **Specs loading**: `specs_content = maestro spec load --role review`
229
+ 7. **Specs loading**: `specs_content = maestro spec load --category review`
230
230
 
231
231
  8. **CSV generation**: One row per check task.
232
232
 
@@ -225,7 +225,7 @@ Initialize `discovery-state.json`:
225
225
  4. Store dimensions in `{discoveryDir}/exploration-plan.json`
226
226
  5. Generate N dimension rows (wave 1) + 1 dedup row (wave 2)
227
227
 
228
- **Specs loading**: `specs_content = maestro spec load --role implement` -- pass to agents for severity calibration.
228
+ **Specs loading**: `specs_content = maestro spec load --category coding` -- pass to agents for severity calibration.
229
229
 
230
230
  **User validation**: Display perspective/dimension breakdown (skip if AUTO_YES).
231
231
 
@@ -6,7 +6,7 @@ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, AskUserQuestion
6
6
  ---
7
7
 
8
8
  <purpose>
9
- Capture reusable knowledge into `.workflow/knowhow/`. Six content types: `session` (full session recovery), `template` (code/config pattern), `recipe` (step-by-step guide), `reference` (external doc summary), `decision` (ADR), `tip` (quick note). Auto-detects type or asks user.
9
+ Capture reusable knowledge into `.workflow/knowhow/`. Nine content types: `session` (full session recovery), `template` (code/config pattern), `recipe` (step-by-step guide), `reference` (external doc summary), `decision` (ADR), `tip` (quick note), `asset` (API contract, data model, etc.), `blueprint` (architecture design with code paths), `document` (general long-form). Auto-detects type or asks user.
10
10
  </purpose>
11
11
 
12
12
  <context>
@@ -22,13 +22,16 @@ $manage-knowhow-capture "reference Stripe API --source https://docs.stripe.com/a
22
22
  $manage-knowhow-capture "decision Use PostgreSQL over MongoDB --status accepted"
23
23
  ```
24
24
 
25
- **Types**: `compact` | `template` | `recipe` | `reference` | `decision` | `tip`
25
+ **Types**: `compact` | `template` | `recipe` | `reference` | `decision` | `tip` | `asset` | `blueprint` | `document`
26
26
 
27
27
  **Flags**:
28
28
  - `--lang <lang>` — Language for templates (typescript, python, bash, yaml, ...)
29
29
  - `--source <url>` — Source URL for references
30
30
  - `--tag tag1,tag2` — Categorization tags
31
31
  - `--title <title>` — Explicit title
32
+ - `--asset-type <type>` — Asset subtype (api-contract, data-model, prompt, config, ...)
33
+ - `--code-paths <paths>` — Related source paths for asset/blueprint (comma-separated)
34
+ - `--category <cat>` — Spec category for agent discovery (coding, arch, test, debug, review, learning)
32
35
  </context>
33
36
 
34
37
  <execution>
@@ -49,6 +52,9 @@ Parse first token as type. If absent or ambiguous, ask user via AskUserQuestion.
49
52
  | `reference`, `ref`, `参考` | reference |
50
53
  | `decision`, `dcs`, `决策` | decision |
51
54
  | `tip`, `note`, `记录` | tip |
55
+ | `asset`, `ast`, `资产`, `契约` | asset |
56
+ | `blueprint`, `blp`, `蓝图` | blueprint |
57
+ | `document`, `doc`, `文档` | document |
52
58
 
53
59
  ### Step 3: Capture Content by Type
54
60
 
@@ -70,6 +76,15 @@ Prompt for or extract: context, decision, alternatives (at least 2), rationale,
70
76
  **tip** (TIP-{YYYYMMDD}-{HHMM}.md):
71
77
  Content from remaining arguments. Auto-detect context from recent conversation files. Sections: Content, Context, Tags, Timestamp.
72
78
 
79
+ **asset** (AST-{YYYYMMDD}-{HHMM}.md):
80
+ Prompt for or extract: asset subtype (`--asset-type`), related code paths (`--code-paths`), category (`--category`). Sections: Overview, Structure (tables/schemas), Usage, Related Code Paths. Common asset subtypes: `api-contract`, `data-model`, `prompt`, `config`, `ui-prototype`.
81
+
82
+ **blueprint** (BLP-{YYYYMMDD}-{HHMM}.md):
83
+ Prompt for or extract: system scope, code paths (`--code-paths`), category (`--category`). Sections: Overview, Components, Interactions, Code Paths, Constraints, Trade-offs.
84
+
85
+ **document** (DOC-{YYYYMMDD}-{HHMM}.md):
86
+ General long-form fallback. No specific structure enforced.
87
+
73
88
  ### Step 4: Write File
74
89
 
75
90
  Write to `.workflow/knowhow/{PREFIX}-{YYYYMMDD}-{HHMM}.md` with YAML frontmatter:
@@ -82,7 +97,7 @@ category: {type}
82
97
  created: {ISO timestamp}
83
98
  tags: [{tags}]
84
99
  ```
85
- Plus type-specific: `lang` (template), `source` (reference), `status` (decision).
100
+ Plus type-specific: `lang` (template), `source` (reference), `status` (decision), `assetType` + `codePaths` (asset), `codePaths` (blueprint). `category` written when `--category` provided.
86
101
 
87
102
  ### Step 5: Confirm
88
103
 
@@ -208,8 +208,8 @@ mkdir -p {sessionFolder}
208
208
  Resolve phase dir from `state.json` artifact registry (`type='execute'`, matching phase). Error E002 if not found.
209
209
 
210
210
  ```
211
- specs_test = maestro spec load --role test
212
- specs_arch = maestro spec load --role plan
211
+ specs_test = maestro spec load --category test
212
+ specs_arch = maestro spec load --category arch
213
213
  ```
214
214
 
215
215
  #### Step 1: Read State & Route
@@ -184,7 +184,8 @@ mkdir -p {sessionFolder}
184
184
  2b. **Load codebase + wiki context** (optional, informs hypothesis generation):
185
185
  - If `.workflow/codebase/ARCHITECTURE.md` exists: read module boundaries to scope impact analysis
186
186
  - Run `maestro wiki search "<symptom keywords>" --json 2>/dev/null`; if results: check for prior investigations on similar issues
187
- - Both are optional proceed without if unavailable
187
+ - Run `maestro spec load --category debug --keyword "<symptom keywords>"`; if tools found: extract known issues, workarounds, and root-cause notes to inform hypotheses
188
+ - All are optional — proceed without if unavailable
188
189
 
189
190
  3. **Symptom collection**:
190
191
 
@@ -60,7 +60,7 @@ Create `.workflow/scratch/refactor-{slug}-{date}/` with `.task/` and `.summaries
60
60
 
61
61
  ### Step 3: Scope Analysis
62
62
 
63
- Load project specs if available (`maestro spec load --role implement`).
63
+ Load project specs if available (`maestro spec load --category coding`).
64
64
 
65
65
  Analyze scope for tech debt categories:
66
66
 
@@ -184,7 +184,7 @@ Session folder: `.workflow/.csv-wave/{sessionId}/` — create via `mkdir -p`
184
184
 
185
185
  If `--dimensions` flag provided, override with explicit list.
186
186
 
187
- 6. **Specs loading**: Read `.workflow/specs/` for project conventions (unless `--skip-specs`)
187
+ 6. **Specs loading**: Run `maestro spec load --category review` to load review standards, checklists, AND discoverable knowhow tools (unless `--skip-specs`)
188
188
  7. **CSV generation**: One row per dimension + one aggregation row
189
189
 
190
190
  **Wave computation**: Simple 2-wave -- all dimension tasks = wave 1, aggregation = wave 2.
@@ -163,7 +163,17 @@ Record in `uat.md` under `## Smoke Tests`. If any fails: **E003** — abort, sug
163
163
 
164
164
  Read from target directory: `verification.json`, `validation.json`, `index.json`, `plan.json`, `.summaries/TASK-*.md`. Build testable list from user-observable outcomes.
165
165
 
166
- ### Step 4.5: Load Quality Context (Cross-Artifact Integration)
166
+ ### Step 4.5: Load Test Tools (Knowhow Discovery)
167
+
168
+ Load registered test tools to supplement verification-based scenarios:
169
+
170
+ ```bash
171
+ maestro spec load --category test --keyword <feature>
172
+ ```
173
+
174
+ If tools are found, extract their steps as additional test scenarios marked `source: "tool"`. Tool steps map to UAT scenarios: each numbered step becomes a test with its assertion as `expected` behavior. This enables tools registered via `/maestro-tools-register` to drive UAT verification.
175
+
176
+ ### Step 4.6: Load Quality Context (Cross-Artifact Integration)
167
177
 
168
178
  Query `state.json.artifacts[]` for all artifacts matching current phase and milestone:
169
179