maestro-flow 0.3.43 → 0.3.44

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (169) hide show
  1. package/.claude/commands/learn-decompose.md +10 -15
  2. package/.claude/commands/learn-follow.md +11 -16
  3. package/.claude/commands/learn-investigate.md +18 -22
  4. package/.claude/commands/learn-retro.md +23 -26
  5. package/.claude/commands/learn-second-opinion.md +11 -16
  6. package/.claude/commands/maestro-analyze.md +8 -0
  7. package/.claude/commands/maestro-brainstorm.md +8 -0
  8. package/.claude/commands/maestro-execute.md +11 -3
  9. package/.claude/commands/maestro-learn.md +4 -4
  10. package/.claude/commands/maestro-milestone-complete.md +6 -6
  11. package/.claude/commands/maestro-plan.md +8 -0
  12. package/.claude/commands/maestro-ralph-execute.md +1 -2
  13. package/.claude/commands/maestro-tools-execute.md +117 -0
  14. package/.claude/commands/maestro-tools-register.md +137 -0
  15. package/.claude/commands/maestro-ui-codify.md +67 -0
  16. package/.claude/commands/manage-harvest.md +1 -1
  17. package/.claude/commands/manage-learn.md +5 -7
  18. package/.claude/commands/manage-wiki.md +1 -1
  19. package/.claude/commands/quality-auto-test.md +1 -1
  20. package/.claude/commands/quality-debug.md +8 -0
  21. package/.claude/commands/quality-retrospective.md +4 -5
  22. package/.claude/commands/quality-review.md +8 -0
  23. package/.claude/commands/spec-add.md +25 -4
  24. package/.claude/commands/spec-load.md +26 -6
  25. package/.claude/commands/spec-setup.md +2 -2
  26. package/.claude/commands/wiki-connect.md +1 -1
  27. package/.claude/commands/wiki-digest.md +5 -6
  28. package/.claude/skills/codify-to-knowhow/SKILL.md +167 -0
  29. package/.claude/skills/codify-to-knowhow/phases/01-load-manifest.md +101 -0
  30. package/.claude/skills/codify-to-knowhow/phases/02-generate-knowhow.md +97 -0
  31. package/.claude/skills/codify-to-knowhow/phases/03-generate-specs.md +92 -0
  32. package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +119 -0
  33. package/.codex/skills/codify-to-knowhow/SKILL.md +427 -0
  34. package/.codex/skills/learn-decompose/SKILL.md +8 -8
  35. package/.codex/skills/learn-follow/SKILL.md +6 -6
  36. package/.codex/skills/learn-investigate/SKILL.md +4 -4
  37. package/.codex/skills/learn-retro/SKILL.md +7 -7
  38. package/.codex/skills/learn-second-opinion/SKILL.md +6 -6
  39. package/.codex/skills/maestro-analyze/SKILL.md +491 -491
  40. package/.codex/skills/maestro-collab/SKILL.md +1 -1
  41. package/.codex/skills/maestro-learn/SKILL.md +1 -1
  42. package/.codex/skills/maestro-milestone-complete/SKILL.md +122 -122
  43. package/.codex/skills/maestro-plan/SKILL.md +485 -485
  44. package/.codex/skills/maestro-tools-execute/SKILL.md +105 -0
  45. package/.codex/skills/maestro-tools-register/SKILL.md +144 -0
  46. package/.codex/skills/maestro-ui-codify/SKILL.md +398 -0
  47. package/.codex/skills/maestro-verify/SKILL.md +486 -486
  48. package/.codex/skills/manage-harvest/SKILL.md +3 -3
  49. package/.codex/skills/manage-issue-discover/SKILL.md +431 -431
  50. package/.codex/skills/manage-learn/SKILL.md +13 -13
  51. package/.codex/skills/manage-wiki/SKILL.md +1 -1
  52. package/.codex/skills/quality-auto-test/SKILL.md +553 -553
  53. package/.codex/skills/quality-refactor/SKILL.md +151 -151
  54. package/.codex/skills/quality-retrospective/SKILL.md +6 -6
  55. package/.codex/skills/spec-add/SKILL.md +17 -4
  56. package/.codex/skills/spec-load/SKILL.md +24 -28
  57. package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
  58. package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
  59. package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
  60. package/.codex/skills/team-testing/roles/executor/role.md +1 -1
  61. package/.codex/skills/team-testing/roles/generator/role.md +1 -1
  62. package/.codex/skills/wiki-connect/SKILL.md +5 -5
  63. package/.codex/skills/wiki-digest/SKILL.md +8 -8
  64. package/dashboard/dist-server/dashboard/src/server/routes/specs.js +1 -1
  65. package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
  66. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +2 -1
  67. package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
  68. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js +2 -2
  69. package/dashboard/dist-server/dashboard/src/server/state/fs-watcher.js.map +1 -1
  70. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.d.ts +1 -1
  71. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js +1 -1
  72. package/dashboard/dist-server/dashboard/src/server/supervisor/self-learning-service.js.map +1 -1
  73. package/dashboard/dist-server/dashboard/src/server/wiki/search.js +2 -2
  74. package/dashboard/dist-server/dashboard/src/server/wiki/search.js.map +1 -1
  75. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +7 -3
  76. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +47 -15
  77. package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
  78. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +1 -1
  79. package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
  80. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.d.ts +1 -2
  81. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +3 -52
  82. package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
  83. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +67 -21
  84. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
  85. package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +6 -1
  86. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js +1 -11
  87. package/dashboard/dist-server/dashboard/src/server/wiki/writer-stress.test.js.map +1 -1
  88. package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +7 -4
  89. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +27 -12
  90. package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
  91. package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +10 -2
  92. package/dashboard/dist-server/src/tools/spec-entry-parser.js +46 -12
  93. package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
  94. package/dashboard/dist-server/src/tools/spec-loader.d.ts +6 -2
  95. package/dashboard/dist-server/src/tools/spec-loader.js +119 -23
  96. package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
  97. package/dist/src/commands/knowhow.d.ts.map +1 -1
  98. package/dist/src/commands/knowhow.js +21 -2
  99. package/dist/src/commands/knowhow.js.map +1 -1
  100. package/dist/src/commands/spec.d.ts +1 -1
  101. package/dist/src/commands/spec.d.ts.map +1 -1
  102. package/dist/src/commands/spec.js +78 -4
  103. package/dist/src/commands/spec.js.map +1 -1
  104. package/dist/src/commands/wiki.d.ts.map +1 -1
  105. package/dist/src/commands/wiki.js +51 -3
  106. package/dist/src/commands/wiki.js.map +1 -1
  107. package/dist/src/hooks/keyword-spec-injector.js +1 -1
  108. package/dist/src/hooks/keyword-spec-injector.js.map +1 -1
  109. package/dist/src/hooks/plugins/spec-injection-plugin.js +11 -11
  110. package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
  111. package/dist/src/hooks/spec-injector.d.ts +1 -0
  112. package/dist/src/hooks/spec-injector.d.ts.map +1 -1
  113. package/dist/src/hooks/spec-injector.js +55 -22
  114. package/dist/src/hooks/spec-injector.js.map +1 -1
  115. package/dist/src/hooks/wiki-role-loader.d.ts +18 -0
  116. package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -0
  117. package/dist/src/hooks/wiki-role-loader.js +43 -0
  118. package/dist/src/hooks/wiki-role-loader.js.map +1 -0
  119. package/dist/src/tools/spec-entry-parser.d.ts +10 -2
  120. package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
  121. package/dist/src/tools/spec-entry-parser.js +46 -12
  122. package/dist/src/tools/spec-entry-parser.js.map +1 -1
  123. package/dist/src/tools/spec-init.d.ts.map +1 -1
  124. package/dist/src/tools/spec-init.js +19 -0
  125. package/dist/src/tools/spec-init.js.map +1 -1
  126. package/dist/src/tools/spec-loader.d.ts +6 -2
  127. package/dist/src/tools/spec-loader.d.ts.map +1 -1
  128. package/dist/src/tools/spec-loader.js +119 -23
  129. package/dist/src/tools/spec-loader.js.map +1 -1
  130. package/dist/src/tools/spec-writer.d.ts +6 -1
  131. package/dist/src/tools/spec-writer.d.ts.map +1 -1
  132. package/dist/src/tools/spec-writer.js +29 -2
  133. package/dist/src/tools/spec-writer.js.map +1 -1
  134. package/dist/src/tools/store-knowhow.d.ts.map +1 -1
  135. package/dist/src/tools/store-knowhow.js +56 -27
  136. package/dist/src/tools/store-knowhow.js.map +1 -1
  137. package/package.json +1 -1
  138. package/workflows/analyze.md +2 -2
  139. package/workflows/auto-test.md +2 -2
  140. package/workflows/brainstorm.md +1 -1
  141. package/workflows/codebase-rebuild.md +1 -1
  142. package/workflows/codebase-refresh.md +1 -1
  143. package/workflows/debug.md +1 -1
  144. package/workflows/execute.md +3 -3
  145. package/workflows/harvest.md +13 -13
  146. package/workflows/integration-test.md +2 -2
  147. package/workflows/issue-discover.md +1 -1
  148. package/workflows/knowhow.md +72 -11
  149. package/workflows/learn.md +70 -58
  150. package/workflows/map.md +1 -1
  151. package/workflows/milestone-complete.md +2 -2
  152. package/workflows/plan.md +1 -1
  153. package/workflows/quick.md +1 -1
  154. package/workflows/refactor.md +1 -1
  155. package/workflows/retrospective.md +51 -57
  156. package/workflows/review.md +1 -1
  157. package/workflows/roadmap-common.md +1 -1
  158. package/workflows/specs-add.md +11 -2
  159. package/workflows/specs-load.md +17 -15
  160. package/workflows/test-gen.md +1 -1
  161. package/workflows/tools-spec.md +98 -0
  162. package/workflows/ui-codify-extract.md +373 -0
  163. package/workflows/ui-codify-knowhow.md +258 -0
  164. package/workflows/ui-codify-package.md +161 -0
  165. package/workflows/ui-codify.md +225 -0
  166. package/workflows/verify.md +1 -1
  167. package/workflows/wiki-connect.md +7 -7
  168. package/workflows/wiki-digest.md +13 -13
  169. package/workflows/wiki-manage.md +1 -1
@@ -0,0 +1,117 @@
1
+ ---
2
+ name: maestro-tools-execute
3
+ description: Load and execute tool specs by role or name
4
+ argument-hint: "[tool-name | --role <role>]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - AskUserQuestion
13
+ - Agent
14
+ ---
15
+ <purpose>
16
+ Load registered tool specs and execute them step-by-step. Two invocation modes:
17
+
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
20
+
21
+ Execution follows the tool definition steps in order, reporting progress per step and asking user on blockers.
22
+ </purpose>
23
+
24
+ <required_reading>
25
+ @~/.maestro/workflows/tools-spec.md
26
+ </required_reading>
27
+
28
+ <context>
29
+ $ARGUMENTS — Tool name, keyword, or --role filter
30
+
31
+ **Examples**:
32
+ ```
33
+ /maestro-tools-execute integration-test
34
+ /maestro-tools-execute --role implement
35
+ /maestro-tools-execute --role review --keyword api
36
+ /maestro-tools-execute
37
+ ```
38
+
39
+ Empty arguments enters interactive mode: list all tools for user selection.
40
+ </context>
41
+
42
+ <execution>
43
+
44
+ ### Step 1: Load Tool
45
+
46
+ **By name**:
47
+ ```bash
48
+ maestro spec load --role implement --keyword <name>
49
+ ```
50
+ Match entries in tools.md whose title or keywords contain the name.
51
+
52
+ **By role**:
53
+ ```bash
54
+ maestro spec load --role <role>
55
+ ```
56
+ Extract tools.md entries from output, list available tools.
57
+
58
+ **Empty args**:
59
+ Load all tools.md entries, present to user with AskUserQuestion for selection.
60
+
61
+ ### Step 2: Display Tool
62
+
63
+ Show tool information:
64
+ - Name, roles, keywords
65
+ - Steps overview (for ref entries, expand knowhow detail first)
66
+
67
+ Expand ref entries:
68
+ ```bash
69
+ maestro wiki load <knowhow-id>
70
+ ```
71
+
72
+ ### Step 3: Confirm Execution
73
+
74
+ Ask user:
75
+ - Execute steps as-is?
76
+ - Adjust parameters/scope?
77
+ - View only, do not execute?
78
+
79
+ ### Step 4: Step-by-Step Execution
80
+
81
+ Follow the tool definition steps in order:
82
+ 1. Read current step description
83
+ 2. Execute step action (file ops, commands, code changes, etc.)
84
+ 3. Verify step completion
85
+ 4. Report progress: `[Step N/M] done — <step_name>`
86
+ 5. Proceed to next step
87
+
88
+ **Blocker handling**:
89
+ - Step fails → report error, ask user: retry / skip / abort
90
+ - Needs user input → AskUserQuestion for parameters
91
+ - Prerequisites unmet → show missing items, ask how to proceed
92
+
93
+ ### Step 5: Report Results
94
+
95
+ After completion, output:
96
+ - Completed steps list
97
+ - Skipped/failed steps (if any)
98
+ - Artifacts produced (generated files, test results, etc.)
99
+ - Suggested next actions
100
+
101
+ </execution>
102
+
103
+ <error_codes>
104
+ | Code | Severity | Description |
105
+ |------|----------|-------------|
106
+ | E001 | fatal | No matching tool found — check name/keyword |
107
+ | E002 | warning | Multiple tools match — list options for user selection |
108
+ | E003 | warning | Step execution failed — ask user how to proceed |
109
+ </error_codes>
110
+
111
+ <success_criteria>
112
+ - [ ] Tool correctly loaded (ref expanded if applicable)
113
+ - [ ] User confirmed before execution starts
114
+ - [ ] Each step has progress feedback
115
+ - [ ] Blockers handled interactively
116
+ - [ ] Results reported clearly
117
+ </success_criteria>
@@ -0,0 +1,137 @@
1
+ ---
2
+ name: maestro-tools-register
3
+ description: Register tool specs - extract, generate, or optimize
4
+ argument-hint: "[description]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - AskUserQuestion
13
+ - Agent
14
+ ---
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.
17
+
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
+
20
+ Three modes: Extract (from code/docs), Generate (from description), Optimize (improve existing).
21
+ Short processes (<10 steps) inline; long processes (>=10 steps) use ref mode with knowhow detail doc.
22
+ </purpose>
23
+
24
+ <required_reading>
25
+ @~/.maestro/workflows/tools-spec.md
26
+ </required_reading>
27
+
28
+ <context>
29
+ $ARGUMENTS — Intent description
30
+
31
+ **Examples**:
32
+ ```
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
36
+ /maestro-tools-register optimize e2e-checkout tool
37
+ ```
38
+ </context>
39
+
40
+ <execution>
41
+
42
+ ### Step 1: Intent Detection
43
+
44
+ Parse $ARGUMENTS to determine mode:
45
+ - Contains "extract" → extract mode
46
+ - Contains "optimize/improve" → optimize mode
47
+ - Other → generate mode
48
+ - Empty → ask user with AskUserQuestion
49
+
50
+ ### Step 2: Gather Information
51
+
52
+ **Extract mode**:
53
+ - Identify source (current conversation, specified files, codebase scan)
54
+ - Extract step sequence, prerequisites, expected outputs
55
+
56
+ **Generate mode**:
57
+ - Confirm tool name, applicable roles, target scenario
58
+ - If unclear, ask user with AskUserQuestion
59
+
60
+ **Optimize mode**:
61
+ - Load existing tool: `maestro spec load --role implement --keyword <name>`
62
+ - Analyze improvement points (step splitting, prerequisites, error handling)
63
+
64
+ **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
+
66
+ ### Step 3: Determine Roles
67
+
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
+ - analyze — analysis tools (diagnostic flows, investigation steps)
74
+
75
+ ### Step 4: Decide Inline vs Ref
76
+
77
+ - Steps <10 and no code blocks → **inline mode**
78
+ - Steps >=10 or contains code examples/config → **ref mode**
79
+
80
+ ### Step 5: Write
81
+
82
+ **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.
83
+
84
+ ```
85
+ ### {Title}
86
+
87
+ Use when {timing/trigger condition}.
88
+
89
+ 1. Step one ...
90
+ ```
91
+
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:
99
+ ```yaml
100
+ ---
101
+ title: <Title>
102
+ type: recipe
103
+ summary: "Use when <timing>. <scope description>"
104
+ tags: [<keywords>]
105
+ roles: [<roles>]
106
+ ---
107
+ ```
108
+ 2. Register spec index entry — description must also include usage timing within 200 chars (this is what `spec load` shows):
109
+ ```bash
110
+ maestro spec add tools "<title>" "Use when <timing>. <scope summary>" --roles "<csv>" --keywords "<csv>" \
111
+ --ref "knowhow/RCP-<slug>.md" --knowhow-type recipe
112
+ ```
113
+
114
+ ### Step 6: Verify
115
+
116
+ - `maestro spec load --role <role> --keyword <keyword>` to confirm loadable
117
+ - Display result: title, roles, keywords, storage location
118
+
119
+ </execution>
120
+
121
+ <error_codes>
122
+ | Code | Severity | Description |
123
+ |------|----------|-------------|
124
+ | E001 | fatal | `.workflow/specs/` does not exist — run `maestro spec init` |
125
+ | E002 | warning | Duplicate tool name detected — confirm overwrite/optimize |
126
+ | E003 | fatal | roles parameter empty — tools must declare applicable roles |
127
+ </error_codes>
128
+
129
+ <success_criteria>
130
+ - [ ] Tool definition written to tools.md (or ref to knowhow)
131
+ - [ ] roles attribute correctly set
132
+ - [ ] keywords auto-extracted (3-5 terms)
133
+ - [ ] Description starts with "Use when ..." (usage timing)
134
+ - [ ] Loadable via `spec load --role <role>`
135
+ - [ ] Long processes use ref mode with knowhow file created
136
+ - [ ] Ref knowhow YAML includes `summary` with usage timing
137
+ </success_criteria>
@@ -0,0 +1,67 @@
1
+ ---
2
+ name: maestro-ui-codify
3
+ description: Extract design system from code, generate reference package, persist as knowledge assets
4
+ argument-hint: "<source-path> [--package-name <name>] [--output-dir <path>] [--overwrite]"
5
+ allowed-tools:
6
+ - Read
7
+ - Write
8
+ - Edit
9
+ - Bash
10
+ - Glob
11
+ - Grep
12
+ - Agent
13
+ - Skill
14
+ ---
15
+ <purpose>
16
+ Codify UI design system from existing source code. 4-phase pipeline:
17
+
18
+ 1. **Validate** (inline): Parameter validation, workspace setup, file discovery
19
+ 2. **Extract** (3 parallel agents): Style Agent + Animation Agent + Layout Agent produce design-tokens.json, animation-tokens.json, layout-templates.json
20
+ 3. **Package** (agent): Copy tokens to package directory, generate preview.html + preview.css
21
+ 4. **Knowhow** (manifest + skill): Build knowhow-manifest.json, call codify-to-knowhow to persist as knowledge assets
22
+
23
+ Position in pipeline: code -> **ui-codify** -> knowhow + specs
24
+ </purpose>
25
+
26
+ <deferred_reading>
27
+ - [ui-codify.md](~/.maestro/workflows/ui-codify.md) — read always (main workflow orchestrator)
28
+ - [ui-codify-extract.md](~/.maestro/workflows/ui-codify-extract.md) — read when Phase 2 starts (style extraction with 3 agents)
29
+ - [ui-codify-package.md](~/.maestro/workflows/ui-codify-package.md) — read when Phase 3 starts (reference package generation)
30
+ - [ui-codify-knowhow.md](~/.maestro/workflows/ui-codify-knowhow.md) — read when Phase 4 starts (knowledge asset generation)
31
+ </deferred_reading>
32
+
33
+ <context>
34
+ $ARGUMENTS — source path (required) with optional flags.
35
+
36
+ Flags:
37
+ - `<source-path>` (positional, required): Directory containing CSS/SCSS/JS/TS/HTML source files
38
+ - `--package-name <name>`: Package name for reference output (default: auto-generated from source directory)
39
+ - `--output-dir <path>`: Output directory for reference package (default: `.workflow/reference_style`)
40
+ - `--overwrite`: Allow overwriting existing package directory
41
+ </context>
42
+
43
+ <execution>
44
+ Route to `~/.maestro/workflows/ui-codify.md` and follow completely.
45
+
46
+ The workflow orchestrates 4 phases with deferred loading of phase-specific workflow files. Each phase reads its workflow file only when execution reaches that phase.
47
+ </execution>
48
+
49
+ <error_codes>
50
+ | Code | Severity | Description | Stage |
51
+ |------|----------|-------------|-------|
52
+ | E001 | error | Source path argument required | parse_input |
53
+ | E002 | error | Source path not found or not a directory | validate |
54
+ | E003 | error | Package directory exists without --overwrite flag | validate |
55
+ | W001 | warning | animation-tokens.json not found (optional, extraction continues) | extract |
56
+ </error_codes>
57
+
58
+ <success_criteria>
59
+ - [ ] Source path validated and file discovery completed
60
+ - [ ] design-tokens.json generated with color, typography, spacing tokens
61
+ - [ ] layout-templates.json generated with component patterns (universal/specialized)
62
+ - [ ] animation-tokens.json generated (optional, W001 if missing)
63
+ - [ ] preview.html + preview.css generated as interactive showcase
64
+ - [ ] knowhow-manifest.json created with AST/DCS assets and spec entries
65
+ - [ ] codify-to-knowhow called and completed successfully
66
+ - [ ] Temporary workspace cleaned up
67
+ </success_criteria>
@@ -54,7 +54,7 @@ Extraction patterns, classification rules, routing infrastructure, and fragment
54
54
  - Review wiki entries → `maestro wiki list --type note`
55
55
  - Connect wiki graph → `/wiki-connect --fix`
56
56
  - Triage issues → `/manage-issue list --source harvest`
57
- - View specs → `/spec-load --category learning`
57
+ - View specs → `/spec-load --role implement`
58
58
  - Full retrospective → `/quality-retrospective`
59
59
  </execution>
60
60
 
@@ -16,7 +16,7 @@ Unified atomic knowledge capture for the workflow learning library. Captures two
16
16
  - **Insights**: Timeless "eureka moment" entries (patterns, gotchas, techniques) — the default mode
17
17
  - **Tips**: Quick contextual notes for cross-session recovery (formerly in `manage-knowhow-capture tip`)
18
18
 
19
- Both types are stored in `.workflow/learning/lessons.jsonl` with auto-detected phase linkage and keyword-based category inference. Tips are distinguished by `source: "tip"` and implicitly tagged `tip`. Same store as retrospective output, so search and list see the entire knowledge corpus.
19
+ Both types are stored in `.workflow/specs/learnings.md` as `<spec-entry>` blocks with auto-detected phase linkage and keyword-based category inference. Tips are distinguished by `source: "tip"` and implicitly tagged `tip`. Same store as retrospective output, so search and list see the entire knowledge corpus.
20
20
  </purpose>
21
21
 
22
22
  <required_reading>
@@ -30,7 +30,7 @@ Arguments: $ARGUMENTS
30
30
  - `"<insight text>"` (or any non-keyword text) → insight capture mode
31
31
  - `tip <text>` → tip capture mode (quick contextual note, auto-tagged `tip`)
32
32
  - `list` → list recent entries (default 20)
33
- - `search <query>` → text search across lessons.jsonl
33
+ - `search <query>` → `maestro spec load --category learning` or text search across `specs/learnings.md`
34
34
  - `show <INS-id>` → full detail with phase context
35
35
  - empty → AskUserQuestion to prompt for text
36
36
 
@@ -47,21 +47,19 @@ Follow `~/.maestro/workflows/learn.md` Stages 1–5 in order.
47
47
  | E001 | error | `.workflow/` not initialized — run `/maestro-init` first | parse_input |
48
48
  | E002 | error | Unknown `--category` value (allowed: pattern, antipattern, decision, tool, gotcha, technique, tip) | parse_input |
49
49
  | E003 | error | `show` mode requires an INS-id argument | show |
50
- | E004 | error | Insight id not found in lessons.jsonl | show |
50
+ | E004 | error | Insight id not found in `specs/learnings.md` | show |
51
51
  | W001 | warning | Auto-phase detection found a current_phase but no matching artifact in registry; phase set to null | capture |
52
- | W002 | warning | learning-index.json out of sync with lessons.jsonl (different row count); offer to rebuild | list/search |
53
52
  </error_codes>
54
53
 
55
54
  <success_criteria>
56
55
  - [ ] Mode correctly routed (capture / list / search / show)
57
- - [ ] Capture: `lessons.jsonl` row appended with valid JSON and all required fields
58
- - [ ] Capture: `learning-index.json` updated with matching entry
56
+ - [ ] Capture: `<spec-entry>` block appended to `specs/learnings.md` with all required fields
59
57
  - [ ] Capture: phase auto-link resolves correctly via artifact registry when `state.json` has `current_phase`
60
58
  - [ ] Capture: category inference produces a sensible default when `--category` absent
61
59
  - [ ] List: filters apply, output sorted newest-first, default limit 20
62
60
  - [ ] Search: results ranked by title (3) > tags (2) > summary (1) match
63
61
  - [ ] Show: full insight displayed with phase context and routed-artifact link if any
64
- - [ ] No file modifications outside `.workflow/learning/`
62
+ - [ ] No file modifications outside `.workflow/knowhow/`
65
63
  - [ ] Confirmation banner displayed with INS-id and next-step hints
66
64
  - [ ] Next step: `/manage-learn list` to browse, or `/manage-learn search <query>` to find related insights
67
65
  </success_criteria>
@@ -34,7 +34,7 @@ $ARGUMENTS — subcommand and optional flags.
34
34
  | No args | Same as `health` |
35
35
 
36
36
  **Flags:**
37
- - `--type <type>` — Filter by wiki type: spec, knowhow, note, lesson, issue
37
+ - `--type <type>` — Filter by wiki type: spec, knowhow, note, issue
38
38
  - `--fix` — Auto-fix issues found during cleanup (remove broken links, suggest connections)
39
39
  - `--json` — Output in JSON format
40
40
  </context>
@@ -85,7 +85,7 @@ Append to state.json.artifacts[]:
85
85
  **Next-step routing on completion:**
86
86
  - Converged (>=95%) → `/maestro-verify {phase}`
87
87
  - All requirements verified (spec source) → `/maestro-milestone-audit`
88
- - Bugs discovered → `/quality-debug --from-auto-test {phase}`
88
+ - Bugs discovered → `/quality-debug --from-uat {phase}`
89
89
  - Max iter, >80% → `/quality-test {phase}` for manual UAT
90
90
  - Max iter, <80% → `/quality-debug {phase}`
91
91
  - Coverage still low → `/quality-auto-test {phase} --layer {missing}`
@@ -49,6 +49,14 @@ Extract conclusions from related artifacts that may affect this debug session
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
50
  3. Both are optional — proceed without if unavailable.
51
51
 
52
+ ### Role Knowledge
53
+ 1. Browse accumulated knowledge for this role:
54
+ `maestro wiki list --role analyze`
55
+ 2. Analyze the index, identify entries relevant to the current task
56
+ 3. Load selected documents:
57
+ `maestro wiki load <id1> [id2] [id3...]`
58
+ 4. Review loaded knowledge before proceeding
59
+
52
60
  **Output**: `DEBUG_DIR = .workflow/scratch/{YYYYMMDD}-debug-P{N}-{slug}/` (P{N} = phase number when phase-scoped; omit for standalone). Output directory rules defined in workflow debug.md Step 4.
53
61
  </context>
54
62
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: quality-retrospective
3
- description: Phase retrospective with insight routing to specs and lessons
3
+ description: Phase retrospective with insight routing to specs and knowhow
4
4
  argument-hint: "[phase|N..M] [--lens technical|process|quality|decision] [--all] [--no-route] [--compare N] [-y]"
5
5
  allowed-tools:
6
6
  - Read
@@ -13,7 +13,7 @@ allowed-tools:
13
13
  - AskUserQuestion
14
14
  ---
15
15
  <purpose>
16
- Post-execution multi-perspective retrospective (复盘) for completed phases. Consumes existing execution artifacts (verification.json, review.json, issues.jsonl, plan.json, .summaries/, uat.md, state.json) and runs four parallel lenses — technical, process, quality, decision — to distill reusable insights. Routes each insight into the appropriate store: spec stub for reusable patterns, memory tip for process notes, issue for recurring gaps. Auto-scans for unreviewed completed phases and reports the backlog. Every insight is also persisted to `.workflow/learning/lessons.jsonl` for cross-phase queryability.
16
+ Post-execution multi-perspective retrospective (复盘) for completed phases. Consumes existing execution artifacts (verification.json, review.json, issues.jsonl, plan.json, .summaries/, uat.md, state.json) and runs four parallel lenses — technical, process, quality, decision — to distill reusable insights. Routes each insight into the appropriate store: spec stub for reusable patterns, memory tip for process notes, issue for recurring gaps. Auto-scans for unreviewed completed phases and reports the backlog. Every insight is also persisted to `.workflow/knowhow/specs/learnings.md` as `<spec-entry>` blocks for cross-phase queryability.
17
17
  </purpose>
18
18
 
19
19
  <required_reading>
@@ -70,9 +70,8 @@ Follow `~/.maestro/workflows/retrospective.md` Stages 1–8 in order. Key invari
70
70
  - [ ] Spec entries (if any) appended as `<spec-entry>` to matching `.workflow/specs/{category-file}.md`
71
71
  - [ ] Issue rows (if any) match canonical issues.jsonl schema (status "open", full issue_history, all required fields)
72
72
  - [ ] Note tips (if any) created via `Skill({ skill: "manage-learn", args: "tip ..." })`
73
- - [ ] `lessons.jsonl` appended with one row per insight regardless of routing target
74
- - [ ] `learning-index.json` updated and parseable
73
+ - [ ] `specs/learnings.md` appended with one `<spec-entry>` per insight regardless of routing target
75
74
  - [ ] No existing phase artifacts modified (verification.json, review.json, plan.json untouched)
76
75
  - [ ] Confirmation banner displays routing counts and next-step suggestions
77
- - [ ] Next step: `/manage-status` to review state, or `/manage-issue list --source retrospective` to triage created issues, or `/manage-learn list` to browse the lessons library
76
+ - [ ] Next step: `/manage-status` to review state, or `/manage-issue list --source retrospective` to triage created issues, or `/manage-learn list` to browse the knowhow library
78
77
  </success_criteria>
@@ -54,6 +54,14 @@ Extract conclusions from related artifacts that may affect this review. Pass as
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
55
  3. Both are optional — proceed without if unavailable.
56
56
 
57
+ ### Role Knowledge
58
+ 1. Browse accumulated knowledge for this role:
59
+ `maestro wiki list --role review`
60
+ 2. Analyze the index, identify entries relevant to the current task
61
+ 3. Load selected documents:
62
+ `maestro wiki load <id1> [id2] [id3...]`
63
+ 4. Review loaded knowledge before proceeding
64
+
57
65
  **Output**: `REVIEW_DIR = .workflow/scratch/{YYYYMMDD}-review-P{N}-{slug}/` (P{N} = phase number, enables directory-level identification as state.json fallback)
58
66
  </context>
59
67
 
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: spec-add
3
- description: Add spec entry by category
4
- argument-hint: "[--scope project|global|team|personal] <category> <content>"
3
+ description: Add spec entry by category with role tagging
4
+ argument-hint: "[--scope project|global|team|personal] [--roles <csv>] <category> <content>"
5
5
  allowed-tools:
6
6
  - Read
7
7
  - Write
@@ -13,6 +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
17
  </purpose>
17
18
 
18
19
  <required_reading>
@@ -20,9 +21,29 @@ Supports 4 scopes: project (default), global, team, personal.
20
21
  </required_reading>
21
22
 
22
23
  <context>
23
- $ARGUMENTS -- expects `[--scope <scope>] [--uid <uid>] <category> <content>`
24
+ $ARGUMENTS -- expects `[--scope <scope>] [--uid <uid>] [--roles <csv>] <category> <content>`
25
+
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
+ - `--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
+ - `--knowhow-type <type>` — Knowhow document type when creating with --ref (asset, blueprint, document, template, recipe, reference, decision)
24
30
 
25
31
  Scope-to-directory mapping, category-to-file mapping, and entry format defined in workflow specs-add.md.
32
+
33
+ **Examples:**
34
+ ```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"
37
+
38
+ # Tool spec with ref to detailed knowhow
39
+ /spec-add tools "OAuth PKCE Flow" "完整 PKCE 集成流程" --roles "implement" --ref knowhow/RCP-oauth-pkce.md
40
+
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
+ /spec-add arch "OAuth PKCE 集成" "完整流程设计" --ref knowhow/AST-oauth-flow.md
46
+ ```
26
47
  </context>
27
48
 
28
49
  <execution>
@@ -34,7 +55,7 @@ Follow '~/.maestro/workflows/specs-add.md' completely.
34
55
  |------|----------|-------------|-------|
35
56
  | E001 | fatal | Category and content are both required | parse_input |
36
57
  | E002 | fatal | Specs directory not initialized -- run `maestro spec init --scope <scope>` | validate_entry |
37
- | E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning | parse_input |
58
+ | E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning, tools | parse_input |
38
59
  | E004 | fatal | Invalid scope -- must be one of: project, global, team, personal | parse_input |
39
60
  | E005 | fatal | Personal scope requires uid -- use `--uid` or run `maestro collab join` first | parse_input |
40
61
  </error_codes>
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  name: spec-load
3
3
  description: Load specs and lessons for current context
4
- argument-hint: "[--category <type>] [--keyword <word>] [--with-lessons]"
4
+ argument-hint: "[--role <role>] [--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 and display relevant spec files for the current working context.
13
- Supports filtering by category (file-level) and keyword (entry-level via `<spec-entry>` tags).
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.
14
14
  </purpose>
15
15
 
16
16
  <required_reading>
@@ -20,14 +20,34 @@ Supports filtering by category (file-level) and keyword (entry-level via `<spec-
20
20
  <context>
21
21
  $ARGUMENTS -- optional flags and keyword
22
22
 
23
- Category-to-file mapping (1:1) and flag details defined in workflow specs-load.md.
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.
25
+ - `--keyword <word>` — Filter by keyword within entries
26
+
27
+ **File → Primary Role mapping:**
28
+ | File | Role |
29
+ |------|------|
30
+ | coding-conventions.md | implement |
31
+ | architecture-constraints.md | plan |
32
+ | test-conventions.md | test |
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)_ |
24
38
 
25
39
  **Examples:**
26
40
  ```
41
+ /spec-load --role implement # coding全文 + 跨文件implement条目
42
+ /spec-load --role review # review-standards + quality-rules + 跨文件review条目
43
+ /spec-load --role implement --keyword auth
27
44
  /spec-load --keyword auth
28
- /spec-load --category coding --keyword naming
29
- /spec-load --category arch
30
45
  ```
46
+
47
+ **Ref entries:**
48
+ When loading entries with `ref` attribute, only the summary is shown with a load command:
49
+ → Detail: maestro wiki load <knowhow-id>
50
+ Use the load command to read the full referenced document.
31
51
  </context>
32
52
 
33
53
  <execution>
@@ -11,7 +11,7 @@ allowed-tools:
11
11
  ---
12
12
  <purpose>
13
13
  Initialize the project-level specs directory by scanning the codebase for conventions, patterns, and tech stack.
14
- Core files (coding, arch, learning) are always created. Optional files (quality, debug, test, review) are created only when relevant signals are detected.
14
+ Core files (coding, arch, knowhow) are always created. Optional files (quality, debug, test, review) are created only when relevant signals are detected.
15
15
  All output lands in `.workflow/specs/`.
16
16
  </purpose>
17
17
 
@@ -44,7 +44,7 @@ Follow '~/.maestro/workflows/specs-setup.md' completely.
44
44
 
45
45
  <success_criteria>
46
46
  - [ ] `.workflow/specs/` directory created
47
- - [ ] Core files always created: `coding-conventions.md`, `architecture-constraints.md`, `learnings.md`
47
+ - [ ] Core files always created: `coding-conventions.md`, `architecture-constraints.md`, `knowhow.md`
48
48
  - [ ] Optional files created when detected: `quality-rules.md` (linter/CI), `test-conventions.md` (test framework), `debug-notes.md` (on demand), `review-standards.md` (on demand)
49
49
  - [ ] Report displayed with summary and next steps
50
50
  </success_criteria>
@@ -56,7 +56,7 @@ Follow '~/.maestro/workflows/wiki-connect.md' completely (Stages 1-6).
56
56
  - [ ] If --fix: entries updated with new `related` links
57
57
  - [ ] If --fix: new health score computed and delta reported
58
58
  - [ ] Report written to `wiki-connections-{date}.md`
59
- - [ ] Graph insights appended to `lessons.jsonl`
59
+ - [ ] Graph insights appended to `specs/learnings.md` as `<spec-entry>` blocks
60
60
  - [ ] No unintended entry modifications (only `related` field changed)
61
61
  - [ ] Summary displayed with next-step routing
62
62
  </success_criteria>
@@ -48,7 +48,7 @@ Follow '~/.maestro/workflows/wiki-digest.md' completely (Stages 1-8).
48
48
  | E001 | error | No wiki entries found (empty index) | Initialize wiki content first |
49
49
  | E002 | error | Topic search returned 0 results | Broaden topic or check wiki content |
50
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 |
51
+ | W002 | warning | specs/learnings.md not found — skipping cross-reference | Proceed without knowhow context |
52
52
  | W003 | warning | Some entry bodies failed to load — partial summaries | Note incomplete entries in digest |
53
53
  </error_codes>
54
54
 
@@ -57,13 +57,12 @@ Follow '~/.maestro/workflows/wiki-digest.md' completely (Stages 1-8).
57
57
  - [ ] Baseline health score recorded
58
58
  - [ ] Entries clustered into 3-5 semantic themes
59
59
  - [ ] Per-theme analysis: summary, key entries, gaps, health
60
- - [ ] Cross-reference with lessons.jsonl completed
60
+ - [ ] Cross-reference with specs/learnings.md completed
61
61
  - [ ] Coverage heatmap generated (type × theme matrix)
62
62
  - [ ] Knowledge gaps identified with suggested actions
63
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`)
64
+ - [ ] Digest written to `KNW-digest-{slug}-{date}.md`
65
+ - [ ] Meta-insights appended to `specs/learnings.md` as `<spec-entry>` blocks
66
+ - [ ] No files modified outside `.workflow/knowhow/` and `.workflow/issues/` (issues only when `--create-issues`)
68
67
  - [ ] Summary displayed with key findings and next-step routing
69
68
  </success_criteria>