@rajat-rastogi/maestro 0.1.0

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 (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +254 -0
  3. package/defaults/agents/documentation.txt +18 -0
  4. package/defaults/agents/implementation.txt +16 -0
  5. package/defaults/agents/quality.txt +19 -0
  6. package/defaults/agents/simplification.txt +19 -0
  7. package/defaults/agents/testing.txt +16 -0
  8. package/defaults/config +46 -0
  9. package/defaults/plan-tips.md +50 -0
  10. package/defaults/prompts/finalize.txt +14 -0
  11. package/defaults/prompts/hint_analysis.txt +38 -0
  12. package/defaults/prompts/plan_create.txt +36 -0
  13. package/defaults/prompts/review_first.txt +37 -0
  14. package/defaults/prompts/review_second.txt +36 -0
  15. package/defaults/prompts/task.txt +23 -0
  16. package/dist/backend/backend.d.ts +29 -0
  17. package/dist/backend/backend.d.ts.map +1 -0
  18. package/dist/backend/backend.js +9 -0
  19. package/dist/backend/backend.js.map +1 -0
  20. package/dist/backend/claude.d.ts +12 -0
  21. package/dist/backend/claude.d.ts.map +1 -0
  22. package/dist/backend/claude.js +155 -0
  23. package/dist/backend/claude.js.map +1 -0
  24. package/dist/backend/copilot.d.ts +11 -0
  25. package/dist/backend/copilot.d.ts.map +1 -0
  26. package/dist/backend/copilot.js +110 -0
  27. package/dist/backend/copilot.js.map +1 -0
  28. package/dist/backend/factory.d.ts +4 -0
  29. package/dist/backend/factory.d.ts.map +1 -0
  30. package/dist/backend/factory.js +13 -0
  31. package/dist/backend/factory.js.map +1 -0
  32. package/dist/config/configserver.d.ts +9 -0
  33. package/dist/config/configserver.d.ts.map +1 -0
  34. package/dist/config/configserver.js +141 -0
  35. package/dist/config/configserver.js.map +1 -0
  36. package/dist/config/dump.d.ts +2 -0
  37. package/dist/config/dump.d.ts.map +1 -0
  38. package/dist/config/dump.js +24 -0
  39. package/dist/config/dump.js.map +1 -0
  40. package/dist/config/loader.d.ts +11 -0
  41. package/dist/config/loader.d.ts.map +1 -0
  42. package/dist/config/loader.js +119 -0
  43. package/dist/config/loader.js.map +1 -0
  44. package/dist/config/prompts.d.ts +19 -0
  45. package/dist/config/prompts.d.ts.map +1 -0
  46. package/dist/config/prompts.js +128 -0
  47. package/dist/config/prompts.js.map +1 -0
  48. package/dist/config/reset.d.ts +3 -0
  49. package/dist/config/reset.d.ts.map +1 -0
  50. package/dist/config/reset.js +23 -0
  51. package/dist/config/reset.js.map +1 -0
  52. package/dist/config/template.d.ts +5 -0
  53. package/dist/config/template.d.ts.map +1 -0
  54. package/dist/config/template.js +11 -0
  55. package/dist/config/template.js.map +1 -0
  56. package/dist/config/types.d.ts +35 -0
  57. package/dist/config/types.d.ts.map +1 -0
  58. package/dist/config/types.js +42 -0
  59. package/dist/config/types.js.map +1 -0
  60. package/dist/config/write.d.ts +5 -0
  61. package/dist/config/write.d.ts.map +1 -0
  62. package/dist/config/write.js +59 -0
  63. package/dist/config/write.js.map +1 -0
  64. package/dist/dashboard/assets/config.html +1012 -0
  65. package/dist/dashboard/assets/dashboard.html +871 -0
  66. package/dist/dashboard/assets/help.html +657 -0
  67. package/dist/dashboard/assets.d.ts +2 -0
  68. package/dist/dashboard/assets.d.ts.map +1 -0
  69. package/dist/dashboard/assets.js +5 -0
  70. package/dist/dashboard/assets.js.map +1 -0
  71. package/dist/dashboard/event-bus.d.ts +11 -0
  72. package/dist/dashboard/event-bus.d.ts.map +1 -0
  73. package/dist/dashboard/event-bus.js +4 -0
  74. package/dist/dashboard/event-bus.js.map +1 -0
  75. package/dist/dashboard/replay-parser.d.ts +6 -0
  76. package/dist/dashboard/replay-parser.d.ts.map +1 -0
  77. package/dist/dashboard/replay-parser.js +56 -0
  78. package/dist/dashboard/replay-parser.js.map +1 -0
  79. package/dist/dashboard/server.d.ts +14 -0
  80. package/dist/dashboard/server.d.ts.map +1 -0
  81. package/dist/dashboard/server.js +178 -0
  82. package/dist/dashboard/server.js.map +1 -0
  83. package/dist/dashboard/watcher.d.ts +17 -0
  84. package/dist/dashboard/watcher.d.ts.map +1 -0
  85. package/dist/dashboard/watcher.js +73 -0
  86. package/dist/dashboard/watcher.js.map +1 -0
  87. package/dist/executor/hints.d.ts +21 -0
  88. package/dist/executor/hints.d.ts.map +1 -0
  89. package/dist/executor/hints.js +102 -0
  90. package/dist/executor/hints.js.map +1 -0
  91. package/dist/executor/task.d.ts +19 -0
  92. package/dist/executor/task.d.ts.map +1 -0
  93. package/dist/executor/task.js +119 -0
  94. package/dist/executor/task.js.map +1 -0
  95. package/dist/executor/validation.d.ts +18 -0
  96. package/dist/executor/validation.d.ts.map +1 -0
  97. package/dist/executor/validation.js +73 -0
  98. package/dist/executor/validation.js.map +1 -0
  99. package/dist/git/branch.d.ts +23 -0
  100. package/dist/git/branch.d.ts.map +1 -0
  101. package/dist/git/branch.js +64 -0
  102. package/dist/git/branch.js.map +1 -0
  103. package/dist/git/commit.d.ts +21 -0
  104. package/dist/git/commit.d.ts.map +1 -0
  105. package/dist/git/commit.js +37 -0
  106. package/dist/git/commit.js.map +1 -0
  107. package/dist/git/diff.d.ts +15 -0
  108. package/dist/git/diff.d.ts.map +1 -0
  109. package/dist/git/diff.js +26 -0
  110. package/dist/git/diff.js.map +1 -0
  111. package/dist/git/git.d.ts +9 -0
  112. package/dist/git/git.d.ts.map +1 -0
  113. package/dist/git/git.js +20 -0
  114. package/dist/git/git.js.map +1 -0
  115. package/dist/git/gitignore.d.ts +2 -0
  116. package/dist/git/gitignore.d.ts.map +1 -0
  117. package/dist/git/gitignore.js +66 -0
  118. package/dist/git/gitignore.js.map +1 -0
  119. package/dist/git/worktree.d.ts +3 -0
  120. package/dist/git/worktree.d.ts.map +1 -0
  121. package/dist/git/worktree.js +17 -0
  122. package/dist/git/worktree.js.map +1 -0
  123. package/dist/main.d.ts +3 -0
  124. package/dist/main.d.ts.map +1 -0
  125. package/dist/main.js +212 -0
  126. package/dist/main.js.map +1 -0
  127. package/dist/orchestrator/orchestrator.d.ts +21 -0
  128. package/dist/orchestrator/orchestrator.d.ts.map +1 -0
  129. package/dist/orchestrator/orchestrator.js +218 -0
  130. package/dist/orchestrator/orchestrator.js.map +1 -0
  131. package/dist/plan/creator.d.ts +27 -0
  132. package/dist/plan/creator.d.ts.map +1 -0
  133. package/dist/plan/creator.js +251 -0
  134. package/dist/plan/creator.js.map +1 -0
  135. package/dist/plan/parser.d.ts +11 -0
  136. package/dist/plan/parser.d.ts.map +1 -0
  137. package/dist/plan/parser.js +151 -0
  138. package/dist/plan/parser.js.map +1 -0
  139. package/dist/plan/types.d.ts +23 -0
  140. package/dist/plan/types.d.ts.map +1 -0
  141. package/dist/plan/types.js +2 -0
  142. package/dist/plan/types.js.map +1 -0
  143. package/dist/plan/updater.d.ts +16 -0
  144. package/dist/plan/updater.d.ts.map +1 -0
  145. package/dist/plan/updater.js +59 -0
  146. package/dist/plan/updater.js.map +1 -0
  147. package/dist/progress/colors.d.ts +9 -0
  148. package/dist/progress/colors.d.ts.map +1 -0
  149. package/dist/progress/colors.js +39 -0
  150. package/dist/progress/colors.js.map +1 -0
  151. package/dist/progress/logger.d.ts +17 -0
  152. package/dist/progress/logger.d.ts.map +1 -0
  153. package/dist/progress/logger.js +101 -0
  154. package/dist/progress/logger.js.map +1 -0
  155. package/dist/progress/notify.d.ts +2 -0
  156. package/dist/progress/notify.d.ts.map +1 -0
  157. package/dist/progress/notify.js +37 -0
  158. package/dist/progress/notify.js.map +1 -0
  159. package/dist/progress/timestamp.d.ts +5 -0
  160. package/dist/progress/timestamp.d.ts.map +1 -0
  161. package/dist/progress/timestamp.js +13 -0
  162. package/dist/progress/timestamp.js.map +1 -0
  163. package/dist/review/agents.d.ts +18 -0
  164. package/dist/review/agents.d.ts.map +1 -0
  165. package/dist/review/agents.js +43 -0
  166. package/dist/review/agents.js.map +1 -0
  167. package/dist/review/pipeline.d.ts +36 -0
  168. package/dist/review/pipeline.d.ts.map +1 -0
  169. package/dist/review/pipeline.js +210 -0
  170. package/dist/review/pipeline.js.map +1 -0
  171. package/dist/sea.d.ts +19 -0
  172. package/dist/sea.d.ts.map +1 -0
  173. package/dist/sea.js +41 -0
  174. package/dist/sea.js.map +1 -0
  175. package/package.json +57 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Rajat Rastogi
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,254 @@
1
+ # Maestro
2
+
3
+ **Autonomous AI coding orchestrator.** Maestro reads a markdown plan file, executes each
4
+ task using a fresh Claude Code or GitHub Copilot session, validates after every step,
5
+ commits the result, and runs a multi-phase code review — all without human intervention.
6
+
7
+ ---
8
+
9
+ ## How It Works
10
+
11
+ ```
12
+ Plan File → Phase 1: Tasks → Phase 2: First Review → Phase 3: Second Review → Phase 4: Finalize
13
+ (N tasks, (single agent, (multi-agent, (optional
14
+ validate + broad pass) targeted pass) cleanup)
15
+ commit each)
16
+ ```
17
+
18
+ 1. **Parse** — Maestro reads your markdown plan and extracts tasks (checkboxes) and
19
+ validation commands.
20
+ 2. **Execute** — Each task is sent to a fresh AI session. The session runs until all
21
+ checkboxes are marked complete.
22
+ 3. **Validate** — After each task, shell validation commands run. On failure, a retry
23
+ is triggered (up to `task_retry_count`).
24
+ 4. **Commit** — A git commit is made after each successful task.
25
+ 5. **Review** — Two review phases run over the full diff: Phase 2 catches broad issues,
26
+ Phase 3 runs multiple specialist agents on targeted concerns.
27
+ 6. **Finalize** — Optional cleanup pass (disabled by default).
28
+
29
+ ---
30
+
31
+ ## Prerequisites
32
+
33
+ - **Node.js ≥ 22**
34
+ - **Git**
35
+ - At least one AI provider:
36
+ - **Claude Code**: `npm install -g @anthropic-ai/claude-code` — then `claude login`
37
+ - **GitHub Copilot**: `npm install -g @github/copilot` — then `gh auth login`
38
+
39
+ ---
40
+
41
+ ## Installation
42
+
43
+ ```sh
44
+ npm install -g @rajat-rastogi/maestro
45
+ ```
46
+
47
+ ---
48
+
49
+ ## Quick Start
50
+
51
+ **1. Write a plan file** (`docs/plans/my-feature.md`):
52
+
53
+ ```markdown
54
+ # Plan: Add greeting endpoint
55
+
56
+ ## Overview
57
+ Add a /greet route that returns a personalised JSON greeting.
58
+
59
+ ## Validation Commands
60
+ - `npm run build`
61
+ - `npm test`
62
+
63
+ ### Task 1: Create the route handler
64
+ - [ ] Create `src/routes/greet.ts` with a `GET /greet?name=` handler
65
+ - [ ] Export `greetRouter` from the file
66
+ - [ ] Add unit test in `src/routes/greet.test.ts`
67
+
68
+ ### Task 2: Wire into Express app
69
+ - [ ] Import `greetRouter` in `src/app.ts`
70
+ - [ ] Register at `/greet` before the catch-all handler
71
+ ```
72
+
73
+ **2. Run it:**
74
+
75
+ ```sh
76
+ maestro docs/plans/my-feature.md
77
+ ```
78
+
79
+ **3. Watch the output** — each task is executed, validated, and committed automatically.
80
+ When all tasks are done Maestro prints `ALL_TASKS_DONE` and kicks off the review phases.
81
+
82
+ ---
83
+
84
+ ## Plan File Format
85
+
86
+ ```markdown
87
+ # Plan: <Title>
88
+
89
+ ## Overview
90
+ One-paragraph description of the goal.
91
+
92
+ ## Validation Commands
93
+ - `command that must pass after every task`
94
+ - `another command`
95
+
96
+ ### Task 1: <Title>
97
+ - [ ] Specific, verifiable deliverable
98
+ - [ ] Another deliverable
99
+
100
+ #### Validation Commands
101
+ - `command that only runs after this task`
102
+
103
+ ### Task 2: <Title>
104
+ - [ ] Deliverable
105
+ ```
106
+
107
+ **Rules:**
108
+ - `## Validation Commands` (top-level) — runs after **every** task.
109
+ - `#### Validation Commands` (under a task) — runs only after that task.
110
+ - Each checkbox must be a specific, observable outcome — Claude marks it `[x]` when done.
111
+ - Every task should leave the codebase in a compilable, passing state.
112
+
113
+ ---
114
+
115
+ ## CLI Reference
116
+
117
+ | Flag | Description | Default |
118
+ |------|-------------|---------|
119
+ | `[plan-file]` | Path to the markdown plan to execute | — |
120
+ | `--provider <name>` | AI provider: `copilot` or `claude` | `copilot` |
121
+ | `-m, --max-iterations <n>` | Maximum task execution iterations | `50` |
122
+ | `--max-external-iterations <n>` | Second-review iteration limit (0 = auto) | `0` |
123
+ | `-r, --review` | Skip tasks; run review pipeline on current branch | — |
124
+ | `-t, --tasks-only` | Run tasks only; skip all reviews | — |
125
+ | `-b, --base-ref <ref>` | Override default branch for review diffs | auto |
126
+ | `--skip-finalize` | Skip finalize step | — |
127
+ | `--worktree` | Run in an isolated git worktree | — |
128
+ | `--plan <description>` | Create a plan file interactively via AI | — |
129
+ | `-s, --serve` | Start live web dashboard | — |
130
+ | `--replay` | Browse completed runs in offline dashboard | — |
131
+ | `-p, --port <n>` | Web dashboard port | `8080` |
132
+ | `-w, --watch <dir>` | Extra directory to watch for progress files | — |
133
+ | `-d, --debug` | Enable debug logging | — |
134
+ | `--no-color` | Disable ANSI color output | — |
135
+ | `--plan-tips` | Show plan authoring best practices | — |
136
+ | `--docs` | Open full reference documentation in browser | — |
137
+ | `--config` | Open web UI to view/edit configuration | — |
138
+ | `--reset` | Interactively reset global config to defaults | — |
139
+ | `--dump-defaults <dir>` | Extract embedded defaults to a directory | — |
140
+ | `--config-dir <dir>` | Override config directory | — |
141
+
142
+ ---
143
+
144
+ ## Configuration
145
+
146
+ Maestro merges configuration from four layers (highest priority first):
147
+
148
+ 1. **CLI flags** — `--provider`, `--max-iterations`, etc.
149
+ 2. **Project config** — `.maestro/config` in the current working directory
150
+ 3. **Global config** — `~/.config/maestro/config`
151
+ 4. **Embedded defaults** — shipped inside the package
152
+
153
+ Config files use INI format. You only need to set keys that differ from the defaults.
154
+
155
+ ### Config Keys
156
+
157
+ | Key | Default | Description |
158
+ |-----|---------|-------------|
159
+ | `ai_provider` | `copilot` | `copilot` or `claude` |
160
+ | `claude_command` | `claude` | Claude Code executable |
161
+ | `claude_args` | (see defaults) | Extra args passed to Claude |
162
+ | `claude_error_patterns` | (see defaults) | Patterns that signal a fatal Claude error |
163
+ | `copilot_command` | `copilot` | Copilot executable |
164
+ | `copilot_args` | `--autopilot --allow-all` | Extra args passed to Copilot |
165
+ | `copilot_error_patterns` | (see defaults) | Patterns that signal a fatal Copilot error |
166
+ | `max_iterations` | `50` | Max AI iterations per task |
167
+ | `max_external_iterations` | `0` | Review iteration limit (0 = auto) |
168
+ | `iteration_delay_ms` | `2000` | Delay between iterations (ms) |
169
+ | `task_retry_count` | `1` | Retries on validation failure |
170
+ | `validation_timeout_ms` | `60000` | Validation command timeout (0 = unlimited) |
171
+ | `finalize_enabled` | `false` | Enable Phase 4 finalize step |
172
+ | `use_worktree` | `false` | Run in isolated git worktree |
173
+ | `plans_dir` | `docs/plans` | Default directory for plan files |
174
+ | `default_branch` | (auto) | Base branch for review diffs |
175
+ | `vcs_command` | `git` | VCS executable |
176
+ | `push_on_complete` | `false` | Push branch after all phases complete |
177
+ | `port` | `8080` | Web dashboard port |
178
+ | `watch_dirs` | — | Comma-separated extra dirs for dashboard |
179
+ | `color_task` | `#00ff00` | Task phase color |
180
+ | `color_review` | `#00ffff` | Review phase color |
181
+ | `color_signal` | `#ff6464` | Signal color (ALL_TASKS_DONE etc.) |
182
+ | `color_warn` | `#ffff00` | Warning color |
183
+ | `color_error` | `#ff0000` | Error color |
184
+ | `color_info` | `#b4b4b4` | Info / default text color |
185
+ | `color_timestamp` | `#8a8a8a` | Timestamp color |
186
+
187
+ Edit your global config:
188
+
189
+ ```sh
190
+ maestro --config # opens browser-based editor
191
+ ```
192
+
193
+ Or edit `~/.config/maestro/config` directly (INI format).
194
+
195
+ ---
196
+
197
+ ## AI Providers
198
+
199
+ ### Claude Code
200
+
201
+ ```sh
202
+ npm install -g @anthropic-ai/claude-code
203
+ claude login
204
+ ```
205
+
206
+ Set in config: `ai_provider = claude`.
207
+
208
+ ### GitHub Copilot
209
+
210
+ ```sh
211
+ npm install -g @github/copilot
212
+ gh auth login
213
+ ```
214
+
215
+ Set in config: `ai_provider = copilot` (this is the default).
216
+
217
+ ---
218
+
219
+ ## Web Dashboard
220
+
221
+ | Command | What it does |
222
+ |---------|-------------|
223
+ | `maestro <plan> --serve` | Live dashboard — streams task progress in real time |
224
+ | `maestro --replay` | Offline dashboard — browse completed run logs |
225
+ | `maestro --config` | Config editor — view and change all settings in a browser UI |
226
+
227
+ All dashboards run locally on `http://localhost:8080` (or your configured port).
228
+
229
+ ---
230
+
231
+ ## Writing Good Plans
232
+
233
+ A few key tips (run `maestro --plan-tips` for the full guide):
234
+
235
+ - **Validation must pass at every step** — not just when all tasks are done. Use
236
+ conditional checks (`existsSync`) if a file is created by a later task.
237
+ - **Checkboxes are verifiable outcomes** — write `Create src/foo.ts with exported bar()`
238
+ not `Work on the foo module`.
239
+ - **Each task should leave the build green** — no intentionally broken intermediate states.
240
+ - **Prefer independent tasks** — tasks that don't depend on files from other tasks are
241
+ safer, easier to retry, and useful with `--tasks-only`.
242
+ - **Sequential dependencies** — if Task 3 imports a file created by Task 1, use the
243
+ incremental validation pattern so Task 2 doesn't fail.
244
+
245
+ ---
246
+
247
+ ## --docs
248
+
249
+ ```sh
250
+ maestro --docs
251
+ ```
252
+
253
+ Opens the full reference documentation (this content, as a formatted HTML page) in your
254
+ default browser — no internet connection required, served from the local install.
@@ -0,0 +1,18 @@
1
+ # documentation
2
+ # This agent reviews documentation completeness.
3
+
4
+ Review the code changes in this branch for:
5
+ - Public API functions/methods/classes that have no documentation at all
6
+ - README updates needed for new features that users need to know about
7
+ - Missing or outdated configuration documentation
8
+ - Missing or misleading error messages (errors that don't help the user understand what to do)
9
+
10
+ Do NOT report:
11
+ - Missing inline comments for self-explanatory code
12
+ - Documentation style preferences
13
+ - Minor documentation improvements
14
+
15
+ Report findings as: file:line - description (or "README - <what's needed>")
16
+ Severity prefix: MAJOR / MINOR
17
+
18
+ If documentation is adequate for the changes made, output exactly: NO ISSUES FOUND
@@ -0,0 +1,16 @@
1
+ # implementation
2
+ # This agent verifies the code actually does what the plan describes.
3
+
4
+ Review the code changes in this branch and compare against the plan file to verify:
5
+ - Does the implementation actually achieve what each task in the plan describes?
6
+ - Are all the requirements from each task's checklist met?
7
+ - Are there any missing pieces that should have been implemented?
8
+ - Are there any deviations from the plan that might cause problems?
9
+ - Does the feature work end-to-end as the plan intended?
10
+
11
+ Read the plan file to understand what was supposed to be implemented before reviewing.
12
+
13
+ Report findings as: file:line - description (or "Plan task N: <what's missing>")
14
+ Severity prefix: CRITICAL / MAJOR / MINOR
15
+
16
+ If the implementation matches the plan, output exactly: NO ISSUES FOUND
@@ -0,0 +1,19 @@
1
+ # quality
2
+ # This agent reviews for bugs, security issues, and reliability problems.
3
+
4
+ Review the code changes introduced in this branch vs {{DEFAULT_BRANCH}} for:
5
+ - Bugs and logic errors that could cause incorrect behavior
6
+ - Security vulnerabilities (injection, XSS, auth bypass, SSRF, insecure deserialization, etc.)
7
+ - Race conditions and concurrency issues
8
+ - Unhandled error cases and missing error propagation
9
+ - Memory leaks or resource leaks (unclosed files, connections, etc.)
10
+ - Null/undefined dereferences and boundary conditions
11
+ - Input validation gaps at system boundaries
12
+
13
+ Focus only on code introduced or modified in this branch. Do not report pre-existing issues that were not touched.
14
+
15
+ Report findings as: file:line - description
16
+ Severity prefix: CRITICAL / MAJOR / MINOR
17
+ Example: MAJOR src/auth.ts:42 - JWT token is not verified before use
18
+
19
+ If no issues found, output exactly: NO ISSUES FOUND
@@ -0,0 +1,19 @@
1
+ # simplification
2
+ # This agent looks for over-engineering and unnecessary complexity.
3
+
4
+ Review the code changes in this branch for:
5
+ - Unnecessary abstractions for one-time operations (premature abstraction)
6
+ - Dead code or code that can never be reached
7
+ - Premature optimization that adds complexity without a clear performance need
8
+ - Over-engineered solutions to simple problems
9
+ - Duplicate code that could be consolidated without adding abstraction overhead
10
+ - Unnecessary dependencies or large libraries used for trivial tasks
11
+ - Feature flags or backwards-compat shims for changes that could just be direct
12
+
13
+ The right amount of complexity is the minimum needed for the current task.
14
+ Three similar lines of code is often better than a premature abstraction.
15
+
16
+ Report findings as: file:line - description
17
+ Severity prefix: MAJOR / MINOR (rarely CRITICAL for over-engineering)
18
+
19
+ If the implementation is appropriately simple, output exactly: NO ISSUES FOUND
@@ -0,0 +1,16 @@
1
+ # testing
2
+ # This agent reviews test coverage and test quality.
3
+
4
+ Review the code changes in this branch for:
5
+ - Missing unit tests for new functions and methods
6
+ - Missing integration tests for new API endpoints or major workflows
7
+ - Tests that don't actually assert meaningful behavior (testing implementation details instead of behavior)
8
+ - Edge cases not covered by tests (empty inputs, boundary values, error paths)
9
+ - Tests that could pass vacuously (no assertions, trivial assertions)
10
+ - Flaky tests (time-dependent, order-dependent, environment-dependent)
11
+
12
+ Report findings as: file:line - description
13
+ Severity prefix: CRITICAL / MAJOR / MINOR
14
+ Example: MAJOR src/auth.ts - No tests for JWT expiry handling
15
+
16
+ If test coverage is adequate, output exactly: NO ISSUES FOUND
@@ -0,0 +1,46 @@
1
+ # Maestro configuration file
2
+ # Lines starting with # are comments.
3
+ # Uncomment and change only what you need — all settings have sensible defaults.
4
+
5
+ # AI Provider — choose which CLI to use for task execution and reviews
6
+ # ai_provider = copilot # 'copilot' (default) or 'claude'
7
+
8
+ # Claude Code provider settings (used when ai_provider = claude)
9
+ # claude_command = claude
10
+ # claude_args = --dangerously-skip-permissions --output-format stream-json --verbose
11
+ # claude_error_patterns = You've hit your limit,API Error:,cannot be launched inside another Claude Code session
12
+
13
+ # GitHub Copilot provider settings (used when ai_provider = copilot)
14
+ # copilot_command = copilot
15
+ # copilot_args = --autopilot --allow-all
16
+ # copilot_error_patterns = authentication required,Copilot is not enabled,rate limit exceeded
17
+
18
+ # Iteration limits
19
+ # max_external_iterations = 0 # 0 = auto (max(3, max_iterations/5))
20
+ # iteration_delay_ms = 2000
21
+ # task_retry_count = 1
22
+ # validation_timeout_ms = 60000 # ms before a hung validation command is killed (0 = no limit)
23
+
24
+ # Finalize step (disabled by default)
25
+ # finalize_enabled = false
26
+
27
+ # Git
28
+ # use_worktree = false
29
+ # plans_dir = docs/plans
30
+ # default_branch = # auto-detected from git if not set
31
+ # vcs_command = git # change to a wrapper for hg repos
32
+ # push_on_complete = false
33
+
34
+ # Web dashboard
35
+ # port = 8080
36
+ # watch_dirs = # comma-separated list of directories to watch
37
+
38
+ # Colors (24-bit RGB hex)
39
+ # color_task = #00ff00
40
+ # color_review = #00ffff
41
+ # color_claude_eval = #64c8ff
42
+ # color_warn = #ffff00
43
+ # color_error = #ff0000
44
+ # color_signal = #ff6464
45
+ # color_timestamp = #8a8a8a
46
+ # color_info = #b4b4b4
@@ -0,0 +1,50 @@
1
+ # Maestro Plan Authoring Best Practices
2
+
3
+ ## Validation Commands
4
+
5
+ ### Global commands run after EVERY task
6
+ The `## Validation Commands` section defines commands that run after each task
7
+ completes — not just the last one. Every command must pass at every intermediate stage.
8
+
9
+ **Good — passes at every stage:**
10
+ - `npm run build` — compiles whatever has been built so far
11
+ - `tsc --noEmit` — type-checks files that exist
12
+ - `npm test` — runs tests for features already implemented
13
+
14
+ **Bad — only passes when all tasks are done:**
15
+ - Integration tests that reference files created by later tasks
16
+ - `node -e "import('./src/index.js')..."` when index.js is Task 3's output
17
+
18
+ ### Incremental validation pattern
19
+ If your validation must reference a file that doesn't exist until a later task,
20
+ wrap it conditionally:
21
+
22
+ node --input-type=module -e "
23
+ import { existsSync } from 'fs';
24
+ if (existsSync('./src/index.js')) {
25
+ const m = await import('./src/index.js');
26
+ console.log(m.greet('world'));
27
+ } else {
28
+ console.log('partial build ok');
29
+ }
30
+ "
31
+
32
+ ### Each task should leave the codebase valid
33
+ Design tasks so the codebase compiles and existing tests pass after every task.
34
+ Avoid tasks that intentionally break the build temporarily.
35
+
36
+ ## Task Design
37
+
38
+ ### Checkboxes are specific, observable outcomes
39
+ Write each checkbox as a verifiable deliverable:
40
+ - ✓ `- [ ] Create src/greet.ts with exported greet(name): string function`
41
+ - ✗ `- [ ] Work on the greet module` (too vague — Claude may not mark it done)
42
+
43
+ ### Prefer tasks that stand alone
44
+ When possible, design tasks that don't depend on files from other tasks.
45
+ This makes validation simpler and allows partial runs (--tasks-only) to be useful
46
+ at any stopping point.
47
+
48
+ ### Sequential dependencies — use conditional validation
49
+ If tasks must build on each other (Task 1 creates a file Task 3 imports),
50
+ use the incremental validation pattern above so intermediate tasks don't fail.
@@ -0,0 +1,14 @@
1
+ You are performing a final cleanup step after all tasks and reviews are complete on this feature branch.
2
+
3
+ Default branch: {{DEFAULT_BRANCH}}
4
+ Plan file: {{PLAN_FILE}}
5
+
6
+ Default behavior:
7
+ 1. Rebase the feature branch onto {{DEFAULT_BRANCH}} to get a clean linear history
8
+ 2. If there are many small commits, squash them into logical groups (e.g., one commit per major feature area)
9
+ 3. Ensure all commit messages follow conventional commit format
10
+
11
+ Only perform actions that are safe and reversible. Do not force-push to shared branches.
12
+ Do not push to any remote unless explicitly configured to do so.
13
+
14
+ Report what you did. If nothing needs to be done, say so.
@@ -0,0 +1,38 @@
1
+ You are a maestro plan diagnostician. A task validation has failed after all retries.
2
+ Determine whether this failure is caused by a structural problem in the plan document
3
+ itself (wrong validation ordering, missing setup step, command referencing something
4
+ not yet created) or a normal code bug / transient error the coding agent should fix.
5
+
6
+ == FULL PLAN DOCUMENT ==
7
+ {{PLAN_CONTENT}}
8
+
9
+ == TASK THAT FAILED ==
10
+ Task {{TASK_INDEX}}: {{TASK_TITLE}}
11
+
12
+ == VALIDATION ERROR OUTPUT ==
13
+ {{VALIDATION_ERRORS}}
14
+
15
+ == RECENT PROGRESS LOG (last 60 lines) ==
16
+ {{PROGRESS_TAIL}}
17
+
18
+ == INSTRUCTIONS ==
19
+ Read the full plan above. Pay special attention to:
20
+ - Which global "## Validation Commands" run after every task
21
+ - Whether a future task in the plan will set up something the failing command needs
22
+ - Whether the failing task's validation commands reference work not done until later
23
+
24
+ If this is a PLAN DOCUMENT PROBLEM (validation command too early, references a
25
+ file/script not yet set up, ordering issue), respond with ONLY this JSON block:
26
+
27
+ ```json
28
+ {
29
+ "title": "<one sentence, max 80 chars>",
30
+ "explanation": "<2-4 sentences: what plan problem caused this, reference the specific command/file and which task will set it up if applicable>",
31
+ "suggestion": "<2-4 sentences: concrete fix the plan author can make — e.g. move command to per-task validation on Task N. Mention 'maestro --plan-tips' for guidance.>"
32
+ }
33
+ ```
34
+
35
+ If this is a NORMAL CODE BUG or TRANSIENT ERROR (compile error, test failure,
36
+ runtime exception — something the coding agent should fix, not a plan issue),
37
+ respond with exactly this and nothing else:
38
+ NO_PLAN_ISSUE
@@ -0,0 +1,36 @@
1
+ You are helping a developer create a detailed maestro plan file.
2
+
3
+ The developer wants to: {{DESCRIPTION}}
4
+
5
+ The working directory is: {{CWD}}
6
+
7
+ Please:
8
+ 1. Use your file reading tools to explore the project — read package.json, look at the
9
+ src/ directory structure, and examine files relevant to the described change.
10
+ 2. Based on your exploration, ask the developer 3–5 clarifying questions to understand:
11
+ - Exact scope and requirements
12
+ - Which files/modules to create or modify
13
+ - What validation commands should run (build, test, lint)
14
+ - Any constraints, design preferences, or edge cases to handle
15
+
16
+ Format your questions as a numbered list. Be specific and reference what you found in the
17
+ codebase. After your questions, print exactly this line:
18
+ ---QUESTIONS_COMPLETE---
19
+
20
+ IMPORTANT — Two levels of validation:
21
+
22
+ Global "## Validation Commands" run after EVERY task. Only include commands
23
+ that already pass from Task 1 (e.g. `npm run build` if a build script exists).
24
+
25
+ Per-task "#### Validation Commands" run only after that specific task:
26
+
27
+ ### Task 5: Write tests
28
+ - [ ] Create test file
29
+
30
+ #### Validation Commands
31
+ - `npm test`
32
+
33
+ Use per-task validation for commands that depend on work done in that task
34
+ (e.g. `npm test` only after the test runner is installed and tests are written).
35
+ Do NOT put `npm test` in global Validation Commands if the test runner
36
+ doesn't exist yet at the start of the plan.
@@ -0,0 +1,37 @@
1
+ You are performing a comprehensive code review of changes introduced on the current branch vs the default branch ({{DEFAULT_BRANCH}}).
2
+
3
+ Plan file: {{PLAN_FILE}}
4
+ Goal: {{GOAL}}
5
+ Progress log: {{PROGRESS_FILE}}
6
+
7
+ {{DIFF_INSTRUCTION}}
8
+
9
+ Launch the following review agents in parallel using the Task tool:
10
+
11
+ {{agent:quality}}
12
+
13
+ {{agent:implementation}}
14
+
15
+ {{agent:testing}}
16
+
17
+ {{agent:simplification}}
18
+
19
+ {{agent:documentation}}
20
+
21
+ After all agents complete, produce the output in exactly this format:
22
+
23
+ MERGED FINDINGS FROM ALL AGENTS:
24
+ 1. <agent-name>: <finding or "No issues found">
25
+ 2. <agent-name>: <finding or "No issues found">
26
+ ... (one entry per finding across all agents, numbered sequentially)
27
+
28
+ ISSUE CLASSIFICATION:
29
+ For each finding:
30
+ <number>. <brief description>
31
+ - <reasoning bullet>
32
+ - CLASSIFICATION: CONFIRMED | FALSE POSITIVE - <reason>
33
+
34
+ After classifying all findings:
35
+ - If there are CONFIRMED issues: fix them directly by modifying the relevant files, then output REVIEW_DONE
36
+ - If all findings are FALSE POSITIVE or there are no findings: output exactly: No confirmed issues to fix.
37
+ Then output REVIEW_DONE
@@ -0,0 +1,36 @@
1
+ You are performing a focused second-pass code review. Only report CRITICAL and MAJOR issues — minor issues and cosmetic changes are explicitly out of scope.
2
+
3
+ Plan file: {{PLAN_FILE}}
4
+ Goal: {{GOAL}}
5
+ Default branch: {{DEFAULT_BRANCH}}
6
+
7
+ {{DIFF_INSTRUCTION}}
8
+
9
+ Launch the following review agents in parallel using the Task tool:
10
+
11
+ {{agent:quality}}
12
+
13
+ {{agent:implementation}}
14
+
15
+ Focus only on:
16
+ - Critical bugs that will cause crashes, data loss, or security vulnerabilities
17
+ - Major logic errors that prevent the feature from working correctly
18
+ - Serious performance problems that will impact production
19
+
20
+ Do NOT report:
21
+ - Minor style issues
22
+ - Documentation gaps (unless public API is completely undocumented)
23
+ - Cosmetic improvements
24
+ - Nice-to-have refactors
25
+
26
+ After all agents complete, produce output in this format:
27
+
28
+ MERGED FINDINGS FROM ALL AGENTS:
29
+ 1. <agent-name>: <finding or "No critical/major issues found">
30
+
31
+ ISSUE CLASSIFICATION:
32
+ (same format as first review — CONFIRMED or FALSE POSITIVE)
33
+
34
+ - If CONFIRMED critical/major issues exist: fix them, then output REVIEW_DONE
35
+ - If none: output exactly: No confirmed issues to fix.
36
+ Then output REVIEW_DONE
@@ -0,0 +1,23 @@
1
+ You are implementing a specific task from a software feature plan. Your job is to implement exactly this task — no more, no less.
2
+
3
+ Plan file: {{PLAN_FILE}}
4
+ Goal: {{GOAL}}
5
+ Progress log: {{PROGRESS_FILE}}
6
+ Default branch: {{DEFAULT_BRANCH}}
7
+
8
+ Task to implement:
9
+
10
+ {{TASK_CONTENT}}
11
+
12
+ Instructions:
13
+ - Read the plan file to understand the full feature context before implementing
14
+ - Implement ONLY this task — do not implement future tasks
15
+ - Make all necessary file changes to complete the task's checkboxes
16
+ - Run the validation commands listed in the plan's ## Validation Commands section after implementation
17
+ - If validation fails, fix the issues and re-run validation
18
+ - When all checkboxes in this task are complete and validation passes, update the plan file: change - [ ] to - [x] for each completed checkbox in this task
19
+ - Do NOT mark checkboxes complete unless validation actually passes
20
+ - Do not modify files unrelated to this task
21
+ - Do not touch the default branch ({{DEFAULT_BRANCH}})
22
+ - After marking checkboxes complete, stop — do not proceed to future tasks
23
+ - The external loop will handle committing and moving to the next task