maestro-flow 0.3.44 → 0.3.45
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.
- package/.claude/commands/learn-decompose.md +1 -1
- package/.claude/commands/learn-follow.md +1 -1
- package/.claude/commands/learn-investigate.md +1 -1
- package/.claude/commands/learn-retro.md +1 -1
- package/.claude/commands/learn-second-opinion.md +1 -1
- package/.claude/commands/maestro-analyze.md +1 -1
- package/.claude/commands/maestro-brainstorm.md +1 -1
- package/.claude/commands/maestro-execute.md +1 -1
- package/.claude/commands/maestro-plan.md +1 -1
- package/.claude/commands/maestro-tools-execute.md +14 -14
- package/.claude/commands/maestro-tools-register.md +25 -26
- package/.claude/commands/quality-debug.md +1 -1
- package/.claude/commands/quality-review.md +1 -1
- package/.claude/commands/spec-add.md +7 -12
- package/.claude/commands/spec-load.md +15 -16
- package/.claude/skills/codify-to-knowhow/SKILL.md +1 -1
- package/.claude/skills/codify-to-knowhow/phases/04-index-verify.md +1 -1
- package/.codex/skills/codify-to-knowhow/SKILL.md +2 -2
- package/.codex/skills/maestro-analyze/SKILL.md +1 -1
- package/.codex/skills/maestro-collab/SKILL.md +1 -1
- package/.codex/skills/maestro-milestone-complete/SKILL.md +1 -1
- package/.codex/skills/maestro-plan/SKILL.md +1 -1
- package/.codex/skills/maestro-tools-execute/SKILL.md +12 -12
- package/.codex/skills/maestro-tools-register/SKILL.md +149 -144
- package/.codex/skills/maestro-ui-codify/SKILL.md +1 -1
- package/.codex/skills/maestro-verify/SKILL.md +1 -1
- package/.codex/skills/manage-issue-discover/SKILL.md +1 -1
- package/.codex/skills/quality-auto-test/SKILL.md +2 -2
- package/.codex/skills/quality-refactor/SKILL.md +1 -1
- package/.codex/skills/spec-add/SKILL.md +104 -114
- package/.codex/skills/spec-load/SKILL.md +73 -73
- package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
- package/.codex/skills/team-review/roles/reviewer/role.md +1 -1
- package/.codex/skills/team-tech-debt/roles/scanner/role.md +1 -1
- package/.codex/skills/team-testing/roles/executor/role.md +1 -1
- package/.codex/skills/team-testing/roles/generator/role.md +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/specs.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js +0 -2
- package/dashboard/dist-server/dashboard/src/server/routes/wiki.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.d.ts +0 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js +6 -23
- package/dashboard/dist-server/dashboard/src/server/wiki/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js +0 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/stress.test.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js +0 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/virtual-wiki-adapters.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js +25 -36
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-indexer.js.map +1 -1
- package/dashboard/dist-server/dashboard/src/server/wiki/wiki-types.d.ts +0 -5
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.d.ts +0 -2
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js +2 -3
- package/dashboard/dist-server/dashboard/src/server/wiki/writer.js.map +1 -1
- package/dashboard/dist-server/src/agents/cli-agent-runner.js +5 -5
- package/dashboard/dist-server/src/agents/cli-agent-runner.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-entry-parser.d.ts +3 -9
- package/dashboard/dist-server/src/tools/spec-entry-parser.js +9 -31
- package/dashboard/dist-server/src/tools/spec-entry-parser.js.map +1 -1
- package/dashboard/dist-server/src/tools/spec-loader.d.ts +5 -9
- package/dashboard/dist-server/src/tools/spec-loader.js +99 -52
- package/dashboard/dist-server/src/tools/spec-loader.js.map +1 -1
- package/dist/src/agents/cli-agent-runner.js +5 -5
- package/dist/src/agents/cli-agent-runner.js.map +1 -1
- package/dist/src/commands/knowhow.js +4 -4
- package/dist/src/commands/knowhow.js.map +1 -1
- package/dist/src/commands/spec.d.ts.map +1 -1
- package/dist/src/commands/spec.js +7 -14
- package/dist/src/commands/spec.js.map +1 -1
- package/dist/src/commands/wiki.d.ts.map +1 -1
- package/dist/src/commands/wiki.js +11 -20
- package/dist/src/commands/wiki.js.map +1 -1
- package/dist/src/hooks/plugins/spec-injection-plugin.js +10 -10
- package/dist/src/hooks/plugins/spec-injection-plugin.js.map +1 -1
- package/dist/src/hooks/spec-injector.d.ts +0 -7
- package/dist/src/hooks/spec-injector.d.ts.map +1 -1
- package/dist/src/hooks/spec-injector.js +41 -81
- package/dist/src/hooks/spec-injector.js.map +1 -1
- package/dist/src/hooks/wiki-role-loader.d.ts +5 -5
- package/dist/src/hooks/wiki-role-loader.d.ts.map +1 -1
- package/dist/src/hooks/wiki-role-loader.js +6 -6
- package/dist/src/hooks/wiki-role-loader.js.map +1 -1
- package/dist/src/tools/spec-entry-parser.d.ts +3 -9
- package/dist/src/tools/spec-entry-parser.d.ts.map +1 -1
- package/dist/src/tools/spec-entry-parser.js +9 -31
- package/dist/src/tools/spec-entry-parser.js.map +1 -1
- package/dist/src/tools/spec-init.d.ts.map +1 -1
- package/dist/src/tools/spec-init.js +54 -73
- package/dist/src/tools/spec-init.js.map +1 -1
- package/dist/src/tools/spec-loader.d.ts +5 -9
- package/dist/src/tools/spec-loader.d.ts.map +1 -1
- package/dist/src/tools/spec-loader.js +99 -52
- package/dist/src/tools/spec-loader.js.map +1 -1
- package/dist/src/tools/spec-writer.d.ts +1 -1
- package/dist/src/tools/spec-writer.d.ts.map +1 -1
- package/dist/src/tools/spec-writer.js +2 -2
- package/dist/src/tools/spec-writer.js.map +1 -1
- package/package.json +1 -1
- package/workflows/analyze.md +2 -2
- package/workflows/auto-test.md +2 -2
- package/workflows/brainstorm.md +1 -1
- package/workflows/codebase-rebuild.md +1 -1
- package/workflows/codebase-refresh.md +1 -1
- package/workflows/debug.md +1 -1
- package/workflows/execute.md +3 -3
- package/workflows/integration-test.md +2 -2
- package/workflows/issue-discover.md +1 -1
- package/workflows/knowhow.md +2 -2
- package/workflows/learn.md +1 -1
- package/workflows/map.md +1 -1
- package/workflows/milestone-complete.md +2 -2
- package/workflows/plan.md +1 -1
- package/workflows/quick.md +1 -1
- package/workflows/refactor.md +1 -1
- package/workflows/retrospective.md +3 -3
- package/workflows/review.md +1 -1
- package/workflows/roadmap-common.md +1 -1
- package/workflows/specs-add.md +2 -11
- package/workflows/specs-load.md +13 -14
- package/workflows/test-gen.md +1 -1
- package/workflows/tools-spec.md +17 -50
- package/workflows/ui-codify-knowhow.md +1 -1
- package/workflows/ui-codify.md +1 -1
- package/workflows/verify.md +1 -1
|
@@ -1,144 +1,149 @@
|
|
|
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
|
|
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
|
|
26
|
-
$maestro-tools-register "generate E2E checkout flow with payment gateway mock setup
|
|
27
|
-
$maestro-tools-register "optimize e2e-checkout tool"
|
|
28
|
-
```
|
|
29
|
-
|
|
30
|
-
**Tool spec
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
</
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
-
|
|
78
|
-
-
|
|
79
|
-
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
---
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
<
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
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
|
+
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"
|
|
26
|
+
$maestro-tools-register "generate E2E checkout flow with payment gateway mock setup"
|
|
27
|
+
$maestro-tools-register "optimize e2e-checkout tool"
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**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.
|
|
31
|
+
|
|
32
|
+
**Knowhow format**:
|
|
33
|
+
```yaml
|
|
34
|
+
---
|
|
35
|
+
title: Tool Name
|
|
36
|
+
type: recipe
|
|
37
|
+
category: coding
|
|
38
|
+
summary: "Use when <timing>. <scope description>"
|
|
39
|
+
tags: [testing, api]
|
|
40
|
+
tool: true
|
|
41
|
+
---
|
|
42
|
+
Step content...
|
|
43
|
+
```
|
|
44
|
+
</context>
|
|
45
|
+
|
|
46
|
+
<execution>
|
|
47
|
+
|
|
48
|
+
### Step 1: Intent Detection
|
|
49
|
+
|
|
50
|
+
Parse $ARGUMENTS to determine mode:
|
|
51
|
+
- Contains "extract" → extract mode
|
|
52
|
+
- Contains "optimize/improve" → optimize mode
|
|
53
|
+
- Other → generate mode
|
|
54
|
+
- Empty → ask user with AskUserQuestion
|
|
55
|
+
|
|
56
|
+
### Step 2: Gather Information
|
|
57
|
+
|
|
58
|
+
**Extract mode**:
|
|
59
|
+
- Identify source (current conversation, specified files, codebase scan)
|
|
60
|
+
- Extract step sequence, prerequisites, expected outputs
|
|
61
|
+
|
|
62
|
+
**Generate mode**:
|
|
63
|
+
- Confirm tool name, applicable roles, target scenario
|
|
64
|
+
- If unclear, ask user with AskUserQuestion
|
|
65
|
+
|
|
66
|
+
**Optimize mode**:
|
|
67
|
+
- Load existing tool: `maestro spec load --category coding --keyword <name>`
|
|
68
|
+
- Analyze improvement points (step splitting, prerequisites, error handling)
|
|
69
|
+
|
|
70
|
+
**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).
|
|
71
|
+
|
|
72
|
+
### Step 3: Determine Category
|
|
73
|
+
|
|
74
|
+
Infer applicable category from context, or ask user:
|
|
75
|
+
- coding — execution tools (build, deploy, integrate)
|
|
76
|
+
- test — testing tools (test flows, verification steps)
|
|
77
|
+
- review — review tools (checklists, audit standards)
|
|
78
|
+
- arch — planning tools (design flows, analysis steps)
|
|
79
|
+
- debug — analysis tools (diagnostic flows, investigation steps)
|
|
80
|
+
|
|
81
|
+
### Step 4: Decide Inline vs Ref
|
|
82
|
+
|
|
83
|
+
- Steps <10 and no code blocks → **inline mode**
|
|
84
|
+
- Steps >=10 or contains code examples/config → **ref mode**
|
|
85
|
+
|
|
86
|
+
### Step 5: Write
|
|
87
|
+
|
|
88
|
+
**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.
|
|
89
|
+
|
|
90
|
+
```
|
|
91
|
+
### {Title}
|
|
92
|
+
|
|
93
|
+
Use when {timing/trigger condition}.
|
|
94
|
+
|
|
95
|
+
1. Step one ...
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
**Inline mode**:
|
|
99
|
+
Create a knowhow document in `knowhow/` with `tool: true` frontmatter:
|
|
100
|
+
```yaml
|
|
101
|
+
---
|
|
102
|
+
title: <Title>
|
|
103
|
+
type: recipe
|
|
104
|
+
category: <category>
|
|
105
|
+
summary: "Use when <timing>. <scope description>"
|
|
106
|
+
tags: [<keywords>]
|
|
107
|
+
tool: true
|
|
108
|
+
---
|
|
109
|
+
Use when <timing>.
|
|
110
|
+
|
|
111
|
+
1. <step1>
|
|
112
|
+
2. <step2>
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
**Ref mode**:
|
|
116
|
+
1. Generate knowhow detail document (RCP- or DOC- prefix). YAML frontmatter must include `summary` with usage timing and `tool: true`:
|
|
117
|
+
```yaml
|
|
118
|
+
---
|
|
119
|
+
title: <Title>
|
|
120
|
+
type: recipe
|
|
121
|
+
category: <category>
|
|
122
|
+
summary: "Use when <timing>. <scope description>"
|
|
123
|
+
tags: [<keywords>]
|
|
124
|
+
tool: true
|
|
125
|
+
---
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
### Step 6: Verify
|
|
129
|
+
|
|
130
|
+
- `maestro spec load --category <category> --keyword <keyword>` to confirm loadable
|
|
131
|
+
- Display result: title, category, keywords, storage location
|
|
132
|
+
|
|
133
|
+
</execution>
|
|
134
|
+
|
|
135
|
+
<error_codes>
|
|
136
|
+
| Code | Severity | Description |
|
|
137
|
+
|------|----------|-------------|
|
|
138
|
+
| E001 | fatal | `.workflow/specs/` does not exist — run `maestro spec init` |
|
|
139
|
+
| E002 | warning | Duplicate tool name detected — confirm overwrite/optimize |
|
|
140
|
+
| E003 | fatal | category parameter empty — tools must declare applicable category |
|
|
141
|
+
</error_codes>
|
|
142
|
+
|
|
143
|
+
<success_criteria>
|
|
144
|
+
- [ ] Tool registered as knowhow document with `tool: true` frontmatter
|
|
145
|
+
- [ ] category attribute correctly set
|
|
146
|
+
- [ ] keywords auto-extracted (3-5 terms)
|
|
147
|
+
- [ ] Loadable via `spec load --category <category>`
|
|
148
|
+
- [ ] Long processes use ref mode with knowhow file created
|
|
149
|
+
</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 --
|
|
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 --
|
|
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 --
|
|
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
|
|
|
@@ -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 --
|
|
212
|
-
specs_arch = maestro spec load --
|
|
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
|
|
@@ -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 --
|
|
63
|
+
Load project specs if available (`maestro spec load --category coding`).
|
|
64
64
|
|
|
65
65
|
Analyze scope for tech debt categories:
|
|
66
66
|
|
|
@@ -1,114 +1,104 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: spec-add
|
|
3
|
-
description: Add spec entry by category with role tagging
|
|
4
|
-
argument-hint: "<category> <content>
|
|
5
|
-
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
6
|
-
---
|
|
7
|
-
|
|
8
|
-
<purpose>
|
|
9
|
-
Add a spec entry using `<spec-entry>` closed-tag format. Each category maps 1:1 to a single target file.
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
$spec-add "coding Always use named exports for utility functions"
|
|
13
|
-
$spec-add "learning Off-by-one in pagination when page=0"
|
|
14
|
-
$spec-add "arch Use Zod for runtime validation over io-ts"
|
|
15
|
-
$spec-add "quality All API endpoints must return structured error objects"
|
|
16
|
-
```
|
|
17
|
-
|
|
18
|
-
**Valid categories**: coding, arch, quality, debug, test, review, learning, tools, bug, pattern, decision, rule, validation.
|
|
19
|
-
|
|
20
|
-
**CLI alternative**: `maestro spec add <category> "<title>" "<content>" --keywords kw1,kw2 --
|
|
21
|
-
</purpose>
|
|
22
|
-
|
|
23
|
-
<context>
|
|
24
|
-
$ARGUMENTS — `<category> <content>` where category selects the target file.
|
|
25
|
-
|
|
26
|
-
**Category-to-file mapping (1:1, same as spec-load):**
|
|
27
|
-
| Category | Target file |
|
|
28
|
-
|----------|------------|
|
|
29
|
-
| `coding` | `coding-conventions.md` |
|
|
30
|
-
| `arch` | `architecture-constraints.md` |
|
|
31
|
-
| `quality` | `quality-rules.md` |
|
|
32
|
-
| `debug` | `debug-notes.md` |
|
|
33
|
-
| `test` | `test-conventions.md` |
|
|
34
|
-
| `review` | `review-standards.md` |
|
|
35
|
-
| `learning` | `learnings.md` |
|
|
36
|
-
| `tools` | `tools.md` |
|
|
37
|
-
| `bug` | `learnings.md` |
|
|
38
|
-
| `pattern` | `coding-conventions.md` |
|
|
39
|
-
| `decision` | `architecture-constraints.md` |
|
|
40
|
-
| `rule` | `quality-rules.md` |
|
|
41
|
-
| `validation` | `quality-rules.md` |
|
|
42
|
-
|
|
43
|
-
Extended types (`bug`, `pattern`, `decision`, `rule`, `validation`) are stored in the file of their closest core category but retain their specific category in the `<spec-entry>` tag.
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
</context>
|
|
47
|
-
|
|
48
|
-
<execution>
|
|
49
|
-
|
|
50
|
-
### Step 1: Parse Input
|
|
51
|
-
|
|
52
|
-
Extract category (first token) and content (remainder) from arguments.
|
|
53
|
-
- Validate category is one of: coding, arch, quality, debug, test, review, learning, bug, pattern, decision, rule, validation (E003 if invalid)
|
|
54
|
-
- Validate content is non-empty (E001 if missing)
|
|
55
|
-
|
|
56
|
-
### Step 2: Validate Specs Directory
|
|
57
|
-
|
|
58
|
-
Verify `.workflow/specs/` exists (E002).
|
|
59
|
-
|
|
60
|
-
### Step 3: Route to File
|
|
61
|
-
|
|
62
|
-
Resolve target file from category-to-file mapping table. If the target file does not exist, create it with a basic header.
|
|
63
|
-
|
|
64
|
-
### Step 4: Extract Keywords
|
|
65
|
-
|
|
66
|
-
Auto-extract 3-5 relevant keywords from the content. Keywords should be:
|
|
67
|
-
- Lowercase, no spaces (use hyphens for multi-word)
|
|
68
|
-
- Domain-specific terms that would help future lookup
|
|
69
|
-
- Avoid generic words (code, file, function, etc.)
|
|
70
|
-
|
|
71
|
-
### Step 5: Write Entry
|
|
72
|
-
|
|
73
|
-
Append `<spec-entry>` closed-tag block to target file:
|
|
74
|
-
|
|
75
|
-
```markdown
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
| E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning, bug, pattern, decision, rule, validation |
|
|
106
|
-
</error_codes>
|
|
107
|
-
|
|
108
|
-
<success_criteria>
|
|
109
|
-
- [ ] Category and content parsed and validated
|
|
110
|
-
- [ ] Keywords auto-extracted from content (3-5 terms)
|
|
111
|
-
- [ ] Entry written in `<spec-entry>` closed-tag format with keywords attribute
|
|
112
|
-
- [ ] Entry appended to correct target file
|
|
113
|
-
- [ ] Confirmation displayed with keywords and verify command
|
|
114
|
-
</success_criteria>
|
|
1
|
+
---
|
|
2
|
+
name: spec-add
|
|
3
|
+
description: Add spec entry by category with role tagging
|
|
4
|
+
argument-hint: "<category> <content>"
|
|
5
|
+
allowed-tools: Read, Write, Bash, Glob, Grep
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
<purpose>
|
|
9
|
+
Add a spec entry using `<spec-entry>` closed-tag format. Each category maps 1:1 to a single target file.
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
$spec-add "coding Always use named exports for utility functions"
|
|
13
|
+
$spec-add "learning Off-by-one in pagination when page=0"
|
|
14
|
+
$spec-add "arch Use Zod for runtime validation over io-ts"
|
|
15
|
+
$spec-add "quality All API endpoints must return structured error objects"
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
**Valid categories**: coding, arch, quality, debug, test, review, learning, tools, bug, pattern, decision, rule, validation.
|
|
19
|
+
|
|
20
|
+
**CLI alternative**: `maestro spec add <category> "<title>" "<content>" --keywords kw1,kw2 --source <src>`. Used by workflow agents (analyze, plan, execute) for programmatic spec enrichment.
|
|
21
|
+
</purpose>
|
|
22
|
+
|
|
23
|
+
<context>
|
|
24
|
+
$ARGUMENTS — `<category> <content>` where category selects the target file.
|
|
25
|
+
|
|
26
|
+
**Category-to-file mapping (1:1, same as spec-load):**
|
|
27
|
+
| Category | Target file |
|
|
28
|
+
|----------|------------|
|
|
29
|
+
| `coding` | `coding-conventions.md` |
|
|
30
|
+
| `arch` | `architecture-constraints.md` |
|
|
31
|
+
| `quality` | `quality-rules.md` |
|
|
32
|
+
| `debug` | `debug-notes.md` |
|
|
33
|
+
| `test` | `test-conventions.md` |
|
|
34
|
+
| `review` | `review-standards.md` |
|
|
35
|
+
| `learning` | `learnings.md` |
|
|
36
|
+
| `tools` | `tools.md` |
|
|
37
|
+
| `bug` | `learnings.md` |
|
|
38
|
+
| `pattern` | `coding-conventions.md` |
|
|
39
|
+
| `decision` | `architecture-constraints.md` |
|
|
40
|
+
| `rule` | `quality-rules.md` |
|
|
41
|
+
| `validation` | `quality-rules.md` |
|
|
42
|
+
|
|
43
|
+
Extended types (`bug`, `pattern`, `decision`, `rule`, `validation`) are stored in the file of their closest core category but retain their specific category in the `<spec-entry>` tag.
|
|
44
|
+
|
|
45
|
+
Category is determined by the first positional argument.
|
|
46
|
+
</context>
|
|
47
|
+
|
|
48
|
+
<execution>
|
|
49
|
+
|
|
50
|
+
### Step 1: Parse Input
|
|
51
|
+
|
|
52
|
+
Extract category (first token) and content (remainder) from arguments.
|
|
53
|
+
- Validate category is one of: coding, arch, quality, debug, test, review, learning, bug, pattern, decision, rule, validation (E003 if invalid)
|
|
54
|
+
- Validate content is non-empty (E001 if missing)
|
|
55
|
+
|
|
56
|
+
### Step 2: Validate Specs Directory
|
|
57
|
+
|
|
58
|
+
Verify `.workflow/specs/` exists (E002).
|
|
59
|
+
|
|
60
|
+
### Step 3: Route to File
|
|
61
|
+
|
|
62
|
+
Resolve target file from category-to-file mapping table. If the target file does not exist, create it with a basic header.
|
|
63
|
+
|
|
64
|
+
### Step 4: Extract Keywords
|
|
65
|
+
|
|
66
|
+
Auto-extract 3-5 relevant keywords from the content. Keywords should be:
|
|
67
|
+
- Lowercase, no spaces (use hyphens for multi-word)
|
|
68
|
+
- Domain-specific terms that would help future lookup
|
|
69
|
+
- Avoid generic words (code, file, function, etc.)
|
|
70
|
+
|
|
71
|
+
### Step 5: Write Entry
|
|
72
|
+
|
|
73
|
+
Append `<spec-entry>` closed-tag block to target file:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
<spec-entry category="{category}" keywords="{kw1},{kw2},{kw3}" date="{YYYY-MM-DD}">
|
|
77
|
+
|
|
78
|
+
### {title extracted from content}
|
|
79
|
+
|
|
80
|
+
{content}
|
|
81
|
+
|
|
82
|
+
</spec-entry>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
### Step 6: Confirm
|
|
86
|
+
|
|
87
|
+
Display: category, target file, extracted keywords, and commands for verify (`/spec-load`) and remove (`/spec-remove`).
|
|
88
|
+
</execution>
|
|
89
|
+
|
|
90
|
+
<error_codes>
|
|
91
|
+
| Code | Severity | Description |
|
|
92
|
+
|------|----------|-------------|
|
|
93
|
+
| E001 | fatal | Category and content are both required |
|
|
94
|
+
| E002 | fatal | `.workflow/specs/` not initialized -- run `Skill({ skill: "spec-setup" })` first |
|
|
95
|
+
| E003 | fatal | Invalid category -- must be one of: coding, arch, quality, debug, test, review, learning, bug, pattern, decision, rule, validation |
|
|
96
|
+
</error_codes>
|
|
97
|
+
|
|
98
|
+
<success_criteria>
|
|
99
|
+
- [ ] Category and content parsed and validated
|
|
100
|
+
- [ ] Keywords auto-extracted from content (3-5 terms)
|
|
101
|
+
- [ ] Entry written in `<spec-entry>` closed-tag format with keywords attribute
|
|
102
|
+
- [ ] Entry appended to correct target file
|
|
103
|
+
- [ ] Confirmation displayed with keywords and verify command
|
|
104
|
+
</success_criteria>
|