maestro-flow 0.1.1 → 0.1.3

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 (92) hide show
  1. package/.codex/skills/manage-codebase-rebuild/SKILL.md +405 -405
  2. package/.codex/skills/manage-codebase-refresh/SKILL.md +82 -82
  3. package/.codex/skills/manage-issue/SKILL.md +65 -65
  4. package/.codex/skills/manage-status/SKILL.md +89 -89
  5. package/.codex/skills/quality-debug/SKILL.md +413 -413
  6. package/.codex/skills/quality-refactor/SKILL.md +191 -191
  7. package/.codex/skills/quality-sync/SKILL.md +89 -89
  8. package/.codex/skills/quality-test/SKILL.md +198 -198
  9. package/.codex/skills/spec-add/SKILL.md +79 -79
  10. package/.codex/skills/spec-load/SKILL.md +75 -75
  11. package/.codex/skills/spec-map/SKILL.md +182 -182
  12. package/.codex/skills/spec-setup/SKILL.md +76 -76
  13. package/.codex/skills/team-coordinate/SKILL.md +7 -7
  14. package/.codex/skills/team-coordinate/roles/coordinator/role.md +1 -1
  15. package/.codex/skills/team-lifecycle-v4/SKILL.md +2 -2
  16. package/.codex/skills/team-lifecycle-v4/instructions/agent-instruction.md +2 -2
  17. package/.codex/skills/team-lifecycle-v4/roles/analyst/role.md +2 -2
  18. package/.codex/skills/team-lifecycle-v4/roles/coordinator/role.md +2 -2
  19. package/.codex/skills/team-lifecycle-v4/roles/executor/commands/implement.md +1 -1
  20. package/.codex/skills/team-lifecycle-v4/roles/planner/role.md +2 -2
  21. package/.codex/skills/team-lifecycle-v4/roles/writer/role.md +1 -1
  22. package/.codex/skills/team-lifecycle-v4/schemas/tasks-schema.md +1 -1
  23. package/.codex/skills/team-quality-assurance/SKILL.md +2 -2
  24. package/.codex/skills/team-quality-assurance/roles/coordinator/role.md +2 -2
  25. package/.codex/skills/team-quality-assurance/roles/executor/role.md +1 -1
  26. package/.codex/skills/team-quality-assurance/roles/scout/role.md +2 -2
  27. package/.codex/skills/team-review/SKILL.md +2 -2
  28. package/.codex/skills/team-review/roles/coordinator/role.md +2 -2
  29. package/.codex/skills/team-review/roles/reviewer/role.md +2 -2
  30. package/.codex/skills/team-review/roles/scanner/role.md +1 -1
  31. package/.codex/skills/team-tech-debt/SKILL.md +2 -2
  32. package/.codex/skills/team-tech-debt/roles/coordinator/role.md +1 -1
  33. package/.codex/skills/team-tech-debt/roles/executor/role.md +1 -1
  34. package/.codex/skills/team-tech-debt/roles/scanner/role.md +2 -2
  35. package/.codex/skills/team-tech-debt/roles/validator/role.md +1 -1
  36. package/.codex/skills/team-testing/SKILL.md +2 -2
  37. package/.codex/skills/team-testing/roles/coordinator/role.md +2 -2
  38. package/.codex/skills/team-testing/roles/executor/role.md +2 -2
  39. package/.codex/skills/team-testing/roles/generator/role.md +2 -2
  40. package/README.md +43 -4
  41. package/dist/agents/dashboard-bridge.d.ts +5 -0
  42. package/dist/agents/dashboard-bridge.d.ts.map +1 -1
  43. package/dist/agents/dashboard-bridge.js +13 -0
  44. package/dist/agents/dashboard-bridge.js.map +1 -1
  45. package/dist/agents/parallel-cli-runner.d.ts +42 -0
  46. package/dist/agents/parallel-cli-runner.d.ts.map +1 -0
  47. package/dist/agents/parallel-cli-runner.js +200 -0
  48. package/dist/agents/parallel-cli-runner.js.map +1 -0
  49. package/dist/agents/terminal-adapter.d.ts +94 -0
  50. package/dist/agents/terminal-adapter.d.ts.map +1 -0
  51. package/dist/agents/terminal-adapter.js +132 -0
  52. package/dist/agents/terminal-adapter.js.map +1 -0
  53. package/dist/agents/terminal-backend.d.ts +53 -0
  54. package/dist/agents/terminal-backend.d.ts.map +1 -0
  55. package/dist/agents/terminal-backend.js +286 -0
  56. package/dist/agents/terminal-backend.js.map +1 -0
  57. package/dist/cli.js +4 -0
  58. package/dist/cli.js.map +1 -1
  59. package/dist/commands/coordinate.d.ts.map +1 -1
  60. package/dist/commands/coordinate.js +14 -5
  61. package/dist/commands/coordinate.js.map +1 -1
  62. package/dist/commands/delegate.d.ts +3 -0
  63. package/dist/commands/delegate.d.ts.map +1 -0
  64. package/dist/commands/delegate.js +142 -0
  65. package/dist/commands/delegate.js.map +1 -0
  66. package/dist/commands/msg.d.ts +3 -0
  67. package/dist/commands/msg.d.ts.map +1 -0
  68. package/dist/commands/msg.js +110 -0
  69. package/dist/commands/msg.js.map +1 -0
  70. package/dist/coordinator/graph-types.d.ts +17 -0
  71. package/dist/coordinator/graph-types.d.ts.map +1 -1
  72. package/dist/coordinator/graph-walker.d.ts +3 -1
  73. package/dist/coordinator/graph-walker.d.ts.map +1 -1
  74. package/dist/coordinator/graph-walker.js +147 -8
  75. package/dist/coordinator/graph-walker.js.map +1 -1
  76. package/dist/coordinator/index.d.ts +2 -0
  77. package/dist/coordinator/index.d.ts.map +1 -1
  78. package/dist/coordinator/index.js +1 -0
  79. package/dist/coordinator/index.js.map +1 -1
  80. package/dist/coordinator/parallel-executor.d.ts +24 -0
  81. package/dist/coordinator/parallel-executor.d.ts.map +1 -0
  82. package/dist/coordinator/parallel-executor.js +43 -0
  83. package/dist/coordinator/parallel-executor.js.map +1 -0
  84. package/package.json +4 -2
  85. package/templates/cli/prompts/rules-tech-rules-agent-prompt.txt +89 -89
  86. package/templates/cli/prompts/workflow-codex-feasibility-validation.txt +176 -176
  87. package/templates/cli/prompts/workflow-gemini-solution-design.txt +131 -131
  88. package/templates/cli/prompts/workflow-skill-index.txt +224 -224
  89. package/templates/cli/protocols/analysis-protocol.md +2 -2
  90. package/templates/cli/protocols/write-protocol.md +2 -2
  91. package/workflows/memory.md +2 -2
  92. package/.codex/skills/team-lifecycle-v4/MIGRATION-PLAN.md +0 -512
@@ -1,198 +1,198 @@
1
- ---
2
- name: maestro-test
3
- description: Conversational UAT with session persistence, auto-diagnosis, and gap-plan closure loop. Interactive testing flow with severity inference and parallel debug agents.
4
- argument-hint: "<phase> [--auto-fix] [--session ID]"
5
- allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
6
- ---
7
-
8
- ## Auto Mode
9
-
10
- No auto mode -- UAT is inherently interactive. `--auto-fix` only automates gap closure, not test execution.
11
-
12
- # Test (UAT)
13
-
14
- ## Usage
15
-
16
- ```bash
17
- $maestro-test "3" # test phase 3
18
- $maestro-test "3 --smoke" # smoke tests first, then UAT
19
- $maestro-test "3 --auto-fix" # auto-trigger gap-fix loop on failures
20
- $maestro-test "--session 04-comments" # resume specific session
21
- ```
22
-
23
- **Flags**:
24
- - `<phase>`: Phase number or scratch task ID
25
- - `--smoke`: Run cold-start smoke tests before UAT
26
- - `--auto-fix`: Auto-trigger gap-fix loop (plan --gaps -> execute -> re-verify) on failures
27
- - `--session ID`: Resume a specific UAT session
28
-
29
- **Output**: `{target_dir}/uat.md` + `.tests/test-plan.json` + `.tests/test-results.json` + `.tests/coverage-report.json`
30
-
31
- ---
32
-
33
- ## Overview
34
-
35
- Conversational UAT: present expected behavior one test at a time, user confirms or describes issues. Severity inferred from natural language (never asked). Session persists in `uat.md` across context resets. Failed tests trigger parallel debug agent diagnosis and optional gap-fix closure.
36
-
37
- **Philosophy**: Show expected, ask if reality matches.
38
-
39
- ---
40
-
41
- ## Implementation
42
-
43
- ### Step 1: Resolve Target
44
-
45
- 1. Parse `$ARGUMENTS` for phase number, scratch task ID, or flags
46
- 2. **Phase mode**: set `PHASE_DIR = .workflow/phases/{NN}-{slug}/`
47
- 3. **Scratch mode**: set `SCRATCH_DIR = .workflow/scratch/{id}/`
48
- 4. Validate target exists and has `verification.json` -- if missing: **E002**
49
-
50
- ### Step 2: Check Active Sessions
51
-
52
- ```bash
53
- find .workflow/phases -name "uat.md" -type f 2>/dev/null | head -5
54
- find .workflow/scratch -name "uat.md" -type f 2>/dev/null | head -5
55
- ```
56
-
57
- - If active sessions exist and no target specified: display session table, ask user to resume or start new
58
- - If `--session ID` specified: resume that session directly (skip to Step 9)
59
- - If session exists for target: offer resume or restart
60
-
61
- ### Step 3: Smoke Tests (if --smoke)
62
-
63
- Run basic sanity checks (app starts, routes respond, build clean, deps installed).
64
- If any smoke fails: **E003** -- abort, suggest Skill({ skill: "quality-debug" })
65
-
66
- ### Step 4: Load Verification Context
67
-
68
- Read from target directory: verification.json, validation.json, index.json, plan.json, `.summaries/TASK-*.md`. Build testable list from user-observable outcomes.
69
-
70
- ### Step 5: Design Test Scenarios
71
-
72
- Create scenarios from testables (id T-001, name, category, expected behavior, requirement_ref). Focus on USER-OBSERVABLE outcomes. Write `{target_dir}/.tests/test-plan.json`.
73
-
74
- ### Step 6: Create UAT File
75
-
76
- Archive previous `uat.md` to `.history/` if exists.
77
- Write `{target_dir}/uat.md` with frontmatter (status, target, started), Current Test section, Tests section (all pending), Summary counters, empty Gaps section.
78
-
79
- ### Step 7: Present Test (Interactive Loop)
80
-
81
- Present one test at a time:
82
- ```
83
- ------------------------------------------------------------
84
- TEST {number}/{total}: {name}
85
- ------------------------------------------------------------
86
-
87
- Expected behavior:
88
- {expected}
89
-
90
- ------------------------------------------------------------
91
- > Type "pass" or describe what's wrong
92
- ------------------------------------------------------------
93
- ```
94
-
95
- Wait for user response (plain text).
96
-
97
- ### Step 8: Process Response
98
-
99
- | Response | Action |
100
- |----------|--------|
101
- | empty, "yes", "y", "ok", "pass", "next" | Mark as pass |
102
- | "skip", "can't test", "n/a" | Mark as skipped |
103
- | Anything else | Log as issue, infer severity |
104
-
105
- **Severity inference** (never ask):
106
- - "crashes", "error", "fails completely" -> blocker
107
- - "doesn't work", "wrong behavior", "broken" -> major
108
- - "works but...", "slow", "minor issue" -> minor
109
- - "color", "spacing", "typo" -> cosmetic
110
- - Default: major
111
-
112
- **On issue**: auto-create issue in `.workflow/issues/issues.jsonl` with back-reference.
113
-
114
- **Batched writes**: write to file on issue, every 5 passes, or completion.
115
-
116
- If more tests: update Current Test, loop to Step 7.
117
- If done: go to Step 10.
118
-
119
- ### Step 9: Resume From File
120
-
121
- Read `uat.md`, find first `result: [pending]` test, announce progress, continue from there (go to Step 7).
122
-
123
- ### Step 10: Complete Session
124
-
125
- 1. Update `uat.md` frontmatter: status -> "complete"
126
- 2. Archive previous result artifacts to `.history/`
127
- 3. Write `.tests/test-results.json` and `.tests/coverage-report.json`
128
- 4. Update `index.json` with UAT results
129
- 5. If no issues: go to Step 13
130
- 6. If issues found: go to Step 11
131
-
132
- ### Step 11: Auto-Diagnose
133
-
134
- Cluster related gaps by component/area. Spawn one debug Agent per cluster:
135
-
136
- ```
137
- Agent({
138
- subagent_type: "general-purpose",
139
- description: "Diagnose UAT gap cluster: {cluster_name}",
140
- prompt: "Investigate UAT failures. Gaps: {gap list}. Find root cause, fix direction, affected files, evidence (file:line).",
141
- run_in_background: false
142
- })
143
- ```
144
-
145
- Update `uat.md` gaps with diagnosis results (root_cause, fix_direction, affected_files).
146
-
147
- ### Step 12: Gap Closure Decision
148
-
149
- **If `--auto-fix`**: execute gap-fix loop directly.
150
-
151
- **Otherwise**: present diagnosis summary and offer options:
152
- 1. Auto-fix (plan --gaps -> execute -> re-verify, max 2 iterations)
153
- 2. Debug deep -- Skill({ skill: "quality-debug" })
154
- 3. Plan fixes -- Skill({ skill: "maestro-plan", args: "--gaps" })
155
- 4. Manual fix
156
-
157
- Update issue lifecycle during gap-fix loop (registered -> planning -> executing -> completed/failed).
158
-
159
- ### Step 13: Report
160
-
161
- ```
162
- === UAT RESULTS ===
163
- Target: {target}
164
- Smoke Tests: {smoke_count} run, {smoke_pass} passed
165
- UAT Tests: {total} total
166
- Passed: {passed}
167
- Issues: {issues} ({blocker_count} blockers, {major_count} major)
168
- Skipped: {skipped}
169
- Diagnosis: {diagnosed_count}/{issues} gaps diagnosed
170
- Auto-fix: {fixed_count} gaps resolved
171
-
172
- Next steps:
173
- {suggested_next_command}
174
- ```
175
-
176
- ---
177
-
178
- ## Error Handling
179
-
180
- | Code | Severity | Condition | Recovery |
181
- |------|----------|-----------|----------|
182
- | E001 | error | Phase or task target required | Prompt user for phase number |
183
- | E002 | error | Phase not verified (no verification.json) | Suggest Skill({ skill: "maestro-verify" }) |
184
- | E003 | error | Smoke test failed (app won't start) | Suggest Skill({ skill: "quality-debug" }) |
185
- | W001 | warning | Test scenarios failed | Auto-diagnose, suggest fix options |
186
- | W002 | warning | Coverage below threshold | Suggest Skill({ skill: "quality-test-gen" }) |
187
-
188
- ---
189
-
190
- ## Core Rules
191
-
192
- - **One test at a time** -- never batch-present tests
193
- - **Never ask severity** -- always infer from natural language
194
- - **Session persistence** -- uat.md survives context resets, resume from any point
195
- - **Batched writes** -- minimize file I/O (on issue, every 5 passes, completion)
196
- - **Gap-fix loop max 2 iterations** -- prevent infinite loops
197
- - **Agent calls use `run_in_background: false`** for synchronous execution
198
- - **Auto-create issues** in `.workflow/issues/issues.jsonl` for every failed test
1
+ ---
2
+ name: maestro-test
3
+ description: Conversational UAT with session persistence, auto-diagnosis, and gap-plan closure loop. Interactive testing flow with severity inference and parallel debug agents.
4
+ argument-hint: "<phase> [--auto-fix] [--session ID]"
5
+ allowed-tools: Read, Write, Edit, Bash, Glob, Grep, Agent, AskUserQuestion
6
+ ---
7
+
8
+ ## Auto Mode
9
+
10
+ No auto mode -- UAT is inherently interactive. `--auto-fix` only automates gap closure, not test execution.
11
+
12
+ # Test (UAT)
13
+
14
+ ## Usage
15
+
16
+ ```bash
17
+ $maestro-test "3" # test phase 3
18
+ $maestro-test "3 --smoke" # smoke tests first, then UAT
19
+ $maestro-test "3 --auto-fix" # auto-trigger gap-fix loop on failures
20
+ $maestro-test "--session 04-comments" # resume specific session
21
+ ```
22
+
23
+ **Flags**:
24
+ - `<phase>`: Phase number or scratch task ID
25
+ - `--smoke`: Run cold-start smoke tests before UAT
26
+ - `--auto-fix`: Auto-trigger gap-fix loop (plan --gaps -> execute -> re-verify) on failures
27
+ - `--session ID`: Resume a specific UAT session
28
+
29
+ **Output**: `{target_dir}/uat.md` + `.tests/test-plan.json` + `.tests/test-results.json` + `.tests/coverage-report.json`
30
+
31
+ ---
32
+
33
+ ## Overview
34
+
35
+ Conversational UAT: present expected behavior one test at a time, user confirms or describes issues. Severity inferred from natural language (never asked). Session persists in `uat.md` across context resets. Failed tests trigger parallel debug agent diagnosis and optional gap-fix closure.
36
+
37
+ **Philosophy**: Show expected, ask if reality matches.
38
+
39
+ ---
40
+
41
+ ## Implementation
42
+
43
+ ### Step 1: Resolve Target
44
+
45
+ 1. Parse `$ARGUMENTS` for phase number, scratch task ID, or flags
46
+ 2. **Phase mode**: set `PHASE_DIR = .workflow/phases/{NN}-{slug}/`
47
+ 3. **Scratch mode**: set `SCRATCH_DIR = .workflow/scratch/{id}/`
48
+ 4. Validate target exists and has `verification.json` -- if missing: **E002**
49
+
50
+ ### Step 2: Check Active Sessions
51
+
52
+ ```bash
53
+ find .workflow/phases -name "uat.md" -type f 2>/dev/null | head -5
54
+ find .workflow/scratch -name "uat.md" -type f 2>/dev/null | head -5
55
+ ```
56
+
57
+ - If active sessions exist and no target specified: display session table, ask user to resume or start new
58
+ - If `--session ID` specified: resume that session directly (skip to Step 9)
59
+ - If session exists for target: offer resume or restart
60
+
61
+ ### Step 3: Smoke Tests (if --smoke)
62
+
63
+ Run basic sanity checks (app starts, routes respond, build clean, deps installed).
64
+ If any smoke fails: **E003** -- abort, suggest Skill({ skill: "quality-debug" })
65
+
66
+ ### Step 4: Load Verification Context
67
+
68
+ Read from target directory: verification.json, validation.json, index.json, plan.json, `.summaries/TASK-*.md`. Build testable list from user-observable outcomes.
69
+
70
+ ### Step 5: Design Test Scenarios
71
+
72
+ Create scenarios from testables (id T-001, name, category, expected behavior, requirement_ref). Focus on USER-OBSERVABLE outcomes. Write `{target_dir}/.tests/test-plan.json`.
73
+
74
+ ### Step 6: Create UAT File
75
+
76
+ Archive previous `uat.md` to `.history/` if exists.
77
+ Write `{target_dir}/uat.md` with frontmatter (status, target, started), Current Test section, Tests section (all pending), Summary counters, empty Gaps section.
78
+
79
+ ### Step 7: Present Test (Interactive Loop)
80
+
81
+ Present one test at a time:
82
+ ```
83
+ ------------------------------------------------------------
84
+ TEST {number}/{total}: {name}
85
+ ------------------------------------------------------------
86
+
87
+ Expected behavior:
88
+ {expected}
89
+
90
+ ------------------------------------------------------------
91
+ > Type "pass" or describe what's wrong
92
+ ------------------------------------------------------------
93
+ ```
94
+
95
+ Wait for user response (plain text).
96
+
97
+ ### Step 8: Process Response
98
+
99
+ | Response | Action |
100
+ |----------|--------|
101
+ | empty, "yes", "y", "ok", "pass", "next" | Mark as pass |
102
+ | "skip", "can't test", "n/a" | Mark as skipped |
103
+ | Anything else | Log as issue, infer severity |
104
+
105
+ **Severity inference** (never ask):
106
+ - "crashes", "error", "fails completely" -> blocker
107
+ - "doesn't work", "wrong behavior", "broken" -> major
108
+ - "works but...", "slow", "minor issue" -> minor
109
+ - "color", "spacing", "typo" -> cosmetic
110
+ - Default: major
111
+
112
+ **On issue**: auto-create issue in `.workflow/issues/issues.jsonl` with back-reference.
113
+
114
+ **Batched writes**: write to file on issue, every 5 passes, or completion.
115
+
116
+ If more tests: update Current Test, loop to Step 7.
117
+ If done: go to Step 10.
118
+
119
+ ### Step 9: Resume From File
120
+
121
+ Read `uat.md`, find first `result: [pending]` test, announce progress, continue from there (go to Step 7).
122
+
123
+ ### Step 10: Complete Session
124
+
125
+ 1. Update `uat.md` frontmatter: status -> "complete"
126
+ 2. Archive previous result artifacts to `.history/`
127
+ 3. Write `.tests/test-results.json` and `.tests/coverage-report.json`
128
+ 4. Update `index.json` with UAT results
129
+ 5. If no issues: go to Step 13
130
+ 6. If issues found: go to Step 11
131
+
132
+ ### Step 11: Auto-Diagnose
133
+
134
+ Cluster related gaps by component/area. Spawn one debug Agent per cluster:
135
+
136
+ ```
137
+ Agent({
138
+ subagent_type: "general-purpose",
139
+ description: "Diagnose UAT gap cluster: {cluster_name}",
140
+ prompt: "Investigate UAT failures. Gaps: {gap list}. Find root cause, fix direction, affected files, evidence (file:line).",
141
+ run_in_background: false
142
+ })
143
+ ```
144
+
145
+ Update `uat.md` gaps with diagnosis results (root_cause, fix_direction, affected_files).
146
+
147
+ ### Step 12: Gap Closure Decision
148
+
149
+ **If `--auto-fix`**: execute gap-fix loop directly.
150
+
151
+ **Otherwise**: present diagnosis summary and offer options:
152
+ 1. Auto-fix (plan --gaps -> execute -> re-verify, max 2 iterations)
153
+ 2. Debug deep -- Skill({ skill: "quality-debug" })
154
+ 3. Plan fixes -- Skill({ skill: "maestro-plan", args: "--gaps" })
155
+ 4. Manual fix
156
+
157
+ Update issue lifecycle during gap-fix loop (registered -> planning -> executing -> completed/failed).
158
+
159
+ ### Step 13: Report
160
+
161
+ ```
162
+ === UAT RESULTS ===
163
+ Target: {target}
164
+ Smoke Tests: {smoke_count} run, {smoke_pass} passed
165
+ UAT Tests: {total} total
166
+ Passed: {passed}
167
+ Issues: {issues} ({blocker_count} blockers, {major_count} major)
168
+ Skipped: {skipped}
169
+ Diagnosis: {diagnosed_count}/{issues} gaps diagnosed
170
+ Auto-fix: {fixed_count} gaps resolved
171
+
172
+ Next steps:
173
+ {suggested_next_command}
174
+ ```
175
+
176
+ ---
177
+
178
+ ## Error Handling
179
+
180
+ | Code | Severity | Condition | Recovery |
181
+ |------|----------|-----------|----------|
182
+ | E001 | error | Phase or task target required | Prompt user for phase number |
183
+ | E002 | error | Phase not verified (no verification.json) | Suggest Skill({ skill: "maestro-verify" }) |
184
+ | E003 | error | Smoke test failed (app won't start) | Suggest Skill({ skill: "quality-debug" }) |
185
+ | W001 | warning | Test scenarios failed | Auto-diagnose, suggest fix options |
186
+ | W002 | warning | Coverage below threshold | Suggest Skill({ skill: "quality-test-gen" }) |
187
+
188
+ ---
189
+
190
+ ## Core Rules
191
+
192
+ - **One test at a time** -- never batch-present tests
193
+ - **Never ask severity** -- always infer from natural language
194
+ - **Session persistence** -- uat.md survives context resets, resume from any point
195
+ - **Batched writes** -- minimize file I/O (on issue, every 5 passes, completion)
196
+ - **Gap-fix loop max 2 iterations** -- prevent infinite loops
197
+ - **Agent calls use `run_in_background: false`** for synchronous execution
198
+ - **Auto-create issues** in `.workflow/issues/issues.jsonl` for every failed test
@@ -1,79 +1,79 @@
1
- ---
2
- name: maestro-spec-add
3
- description: Add a spec entry (bug, pattern, decision, or rule) to the appropriate specs file
4
- argument-hint: "<type> <content>"
5
- allowed-tools: Read, Write, Bash, Glob, Grep
6
- ---
7
-
8
- # Spec Add
9
-
10
- ## Usage
11
-
12
- ```bash
13
- $maestro-spec-add "pattern Always use named exports for utility functions"
14
- $maestro-spec-add "bug Off-by-one in pagination when page=0"
15
- $maestro-spec-add "decision Use Zod for runtime validation over io-ts"
16
- $maestro-spec-add "rule All API endpoints must return structured error objects"
17
- ```
18
-
19
- **Arguments**: `<type> <content>` where type is one of: bug, pattern, decision, rule, debug, test, review, validation.
20
-
21
- ---
22
-
23
- ## Implementation
24
-
25
- ### Step 1: Parse Input
26
-
27
- Extract type (first token) and content (remainder) from arguments.
28
- - Validate type is one of: bug, pattern, decision, rule, debug, test, review, validation (E003 if invalid)
29
- - Validate content is non-empty (E001 if missing)
30
-
31
- ### Step 2: Validate Specs Directory
32
-
33
- ```bash
34
- test -d .workflow/specs || exit 1 # E002: not initialized
35
- ```
36
-
37
- ### Step 3: Route to File
38
-
39
- | Type | Primary File | Secondary Update |
40
- |------|-------------|-----------------|
41
- | `bug` | `learnings.md` | -- |
42
- | `pattern` | `learnings.md` | `coding-conventions.md` |
43
- | `decision` | `learnings.md` | `architecture-constraints.md` |
44
- | `rule` | `learnings.md` | `quality-rules.md` |
45
- | `debug` | `learnings.md` | `debug-notes.md` |
46
- | `test` | `learnings.md` | `test-conventions.md` |
47
- | `review` | `learnings.md` | `review-standards.md` |
48
- | `validation` | `learnings.md` | `validation-rules.md` |
49
-
50
- ### Step 4: Append Entry
51
-
52
- Append timestamped entry to `.workflow/specs/learnings.md` using the unified `[type] [date]` format:
53
-
54
- ```markdown
55
- ### [{type}] [{YYYY-MM-DD}] {first line of content}
56
-
57
- {content}
58
- ```
59
-
60
- Example: `### [bug] [2026-03-21] Off-by-one in pagination when page=0`
61
-
62
- If type has a secondary file, also update that file with the new convention/rule/decision.
63
-
64
- ### Step 5: Confirm
65
-
66
- ```
67
- Added [{type}] to learnings.md
68
- {Secondary file updated if applicable}
69
- ```
70
-
71
- ---
72
-
73
- ## Error Handling
74
-
75
- | Code | Severity | Description |
76
- |------|----------|-------------|
77
- | E001 | fatal | Category and content are both required |
78
- | E002 | fatal | `.workflow/specs/` not initialized -- run `Skill({ skill: "spec-setup" })` first |
79
- | E003 | fatal | Invalid category -- must be one of: bug, pattern, decision, rule, debug, test, review, validation |
1
+ ---
2
+ name: maestro-spec-add
3
+ description: Add a spec entry (bug, pattern, decision, or rule) to the appropriate specs file
4
+ argument-hint: "<type> <content>"
5
+ allowed-tools: Read, Write, Bash, Glob, Grep
6
+ ---
7
+
8
+ # Spec Add
9
+
10
+ ## Usage
11
+
12
+ ```bash
13
+ $maestro-spec-add "pattern Always use named exports for utility functions"
14
+ $maestro-spec-add "bug Off-by-one in pagination when page=0"
15
+ $maestro-spec-add "decision Use Zod for runtime validation over io-ts"
16
+ $maestro-spec-add "rule All API endpoints must return structured error objects"
17
+ ```
18
+
19
+ **Arguments**: `<type> <content>` where type is one of: bug, pattern, decision, rule, debug, test, review, validation.
20
+
21
+ ---
22
+
23
+ ## Implementation
24
+
25
+ ### Step 1: Parse Input
26
+
27
+ Extract type (first token) and content (remainder) from arguments.
28
+ - Validate type is one of: bug, pattern, decision, rule, debug, test, review, validation (E003 if invalid)
29
+ - Validate content is non-empty (E001 if missing)
30
+
31
+ ### Step 2: Validate Specs Directory
32
+
33
+ ```bash
34
+ test -d .workflow/specs || exit 1 # E002: not initialized
35
+ ```
36
+
37
+ ### Step 3: Route to File
38
+
39
+ | Type | Primary File | Secondary Update |
40
+ |------|-------------|-----------------|
41
+ | `bug` | `learnings.md` | -- |
42
+ | `pattern` | `learnings.md` | `coding-conventions.md` |
43
+ | `decision` | `learnings.md` | `architecture-constraints.md` |
44
+ | `rule` | `learnings.md` | `quality-rules.md` |
45
+ | `debug` | `learnings.md` | `debug-notes.md` |
46
+ | `test` | `learnings.md` | `test-conventions.md` |
47
+ | `review` | `learnings.md` | `review-standards.md` |
48
+ | `validation` | `learnings.md` | `validation-rules.md` |
49
+
50
+ ### Step 4: Append Entry
51
+
52
+ Append timestamped entry to `.workflow/specs/learnings.md` using the unified `[type] [date]` format:
53
+
54
+ ```markdown
55
+ ### [{type}] [{YYYY-MM-DD}] {first line of content}
56
+
57
+ {content}
58
+ ```
59
+
60
+ Example: `### [bug] [2026-03-21] Off-by-one in pagination when page=0`
61
+
62
+ If type has a secondary file, also update that file with the new convention/rule/decision.
63
+
64
+ ### Step 5: Confirm
65
+
66
+ ```
67
+ Added [{type}] to learnings.md
68
+ {Secondary file updated if applicable}
69
+ ```
70
+
71
+ ---
72
+
73
+ ## Error Handling
74
+
75
+ | Code | Severity | Description |
76
+ |------|----------|-------------|
77
+ | E001 | fatal | Category and content are both required |
78
+ | E002 | fatal | `.workflow/specs/` not initialized -- run `Skill({ skill: "spec-setup" })` first |
79
+ | E003 | fatal | Invalid category -- must be one of: bug, pattern, decision, rule, debug, test, review, validation |