@emiliosp/pi-maestro 0.13.1 → 0.15.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.
- package/ADR.md +56 -0
- package/CHANGELOG.md +14 -0
- package/README.md +31 -16
- package/ROADMAP.md +50 -16
- package/agents/simplifier.md +2 -1
- package/agents/verifier.md +2 -1
- package/docs/configuration.md +40 -7
- package/docs/glossary.md +1 -1
- package/docs/subagent-integration.md +6 -4
- package/docs/workflow.md +32 -23
- package/extensions/maestro.ts +11 -13
- package/package.json +1 -1
- package/src/config/assertConfiguration.ts +1 -1
- package/src/config/defaults.ts +3 -0
- package/src/config/schema.ts +4 -4
- package/src/maestro/checks/assertEnvironment.ts +25 -12
- package/src/maestro/instructions/getMaestroInstructions.ts +19 -11
- package/src/tools/child/record-builder-handoff.ts +2 -6
- package/src/tools/child/record-simplifier-handoff.ts +2 -1
- package/src/tools/child/record-verifier-handoff.ts +2 -6
- package/src/tools/child/utils/resolveWorkflowContext.ts +2 -2
- package/src/tools/main/mark-spec-ready.ts +8 -3
- package/src/tools/main/resolve-escalations.ts +2 -1
- package/src/tools/main/resolve-findings.ts +6 -6
- package/src/tools/main/run-builder.ts +45 -12
- package/src/tools/main/run-simplifier.ts +1 -0
- package/src/tools/main/run-verifier.ts +17 -5
- package/src/workflow/builder/completeBuilderPass.ts +4 -0
- package/src/workflow/builder/prepareBuilderRun.ts +7 -1
- package/src/workflow/builder/resolveEscalations.ts +4 -0
- package/src/workflow/simplifier/completeSimplifierPass.ts +4 -0
- package/src/workflow/spec/markSpecReady.ts +4 -0
- package/src/workflow/transitions.ts +28 -7
- package/src/workflow/verifier/completeVerifierPass.ts +4 -0
- package/src/workflow/verifier/prepareVerifierRun.ts +7 -1
- package/src/workflow/verifier/resolveFindings.ts +4 -0
package/ADR.md
CHANGED
|
@@ -219,3 +219,59 @@ Conflicting imported status and acceptance evidence remain explicit rather than
|
|
|
219
219
|
### Evidence
|
|
220
220
|
|
|
221
221
|
[Roadmap](ROADMAP.md) and [repository instructions](AGENTS.md).
|
|
222
|
+
|
|
223
|
+
## ADR-008: Use Pi's registry for model availability
|
|
224
|
+
|
|
225
|
+
### Status
|
|
226
|
+
|
|
227
|
+
Accepted. Implemented.
|
|
228
|
+
|
|
229
|
+
### Context
|
|
230
|
+
|
|
231
|
+
Maestro's model format regex rejected OpenRouter IDs containing additional slashes. The `owner` selected Pi as the source of truth for models and explicitly retained the
|
|
232
|
+
activation availability check because it uses Pi's registry.
|
|
233
|
+
|
|
234
|
+
### Decision
|
|
235
|
+
|
|
236
|
+
Treat configured models as strings without a separate format regex. During activation, match each complete `provider/model` identifier against
|
|
237
|
+
`context.modelRegistry.getAvailable()`, preserving slashes inside model IDs. Pass the configured identifier unchanged through `pi-subagents`.
|
|
238
|
+
|
|
239
|
+
Keep Maestro's configuration structure, version, path, thinking-level, and timeout validation.
|
|
240
|
+
|
|
241
|
+
### Consequences
|
|
242
|
+
|
|
243
|
+
A model absent from Pi's available registry prevents activation. `Maestro` maintains no separate model catalog or authentication check. Provider or authentication
|
|
244
|
+
failures during delegation still use the existing `run` failure path. Workflow recovery and phase transitions remain unchanged.
|
|
245
|
+
|
|
246
|
+
### Evidence
|
|
247
|
+
|
|
248
|
+
[Configuration](docs/configuration.md#model-access), [activation checks](src/maestro/checks/assertEnvironment.ts), and
|
|
249
|
+
[delegation](src/tools/utils/pi-subagent-delegation.ts).
|
|
250
|
+
|
|
251
|
+
## ADR-009: Select optional phases in the transition table
|
|
252
|
+
|
|
253
|
+
### Status
|
|
254
|
+
|
|
255
|
+
Accepted. Implemented under MAESTRO-27.
|
|
256
|
+
|
|
257
|
+
### Context
|
|
258
|
+
|
|
259
|
+
The `owner` selected configuration flags to support workflows with only an approved `spec` and independently optional later agents without a separate phase-selection
|
|
260
|
+
interface.
|
|
261
|
+
|
|
262
|
+
### Decision
|
|
263
|
+
|
|
264
|
+
Each agent has a `required` boolean that defaults to `true`. Disabling `builder` skips all agents. Otherwise `verifier` and `simplifier` can be disabled independently.
|
|
265
|
+
Flags are set before activation and stay unchanged during the workflow. Keep existing configuration reads, without caching or runtime controls.
|
|
266
|
+
|
|
267
|
+
Keep destination selection in `src/workflow/transitions.ts`. A transition destination is either a fixed phase or a pure function of resolved configuration. Callers pass
|
|
268
|
+
configuration to `transitionWorkflow` and save its returned state. No new workflow states, events, or persisted selection fields are needed.
|
|
269
|
+
|
|
270
|
+
### Consequences
|
|
271
|
+
|
|
272
|
+
Approval can finish at `candidate-ready` without agent execution. Agent and model availability checks apply only to selected phases; activation with only an approved
|
|
273
|
+
`spec` needs no `pi-subagents` ping. Final summaries identify skipped work, without claiming implementation or independent verification occurred.
|
|
274
|
+
|
|
275
|
+
### Evidence
|
|
276
|
+
|
|
277
|
+
[Approved design](.specs/20261103-161424-maestro-27-make-implementation-phases-optional/design.md) and [phase selection](docs/configuration.md#phase-selection).
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,20 @@
|
|
|
3
3
|
This file summarizes meaningful changes to the codebase, including behavior, data formats, architecture, and development tools. Git tags identify version boundaries;
|
|
4
4
|
GitHub Releases are not required.
|
|
5
5
|
|
|
6
|
+
## 0.15.0
|
|
7
|
+
|
|
8
|
+
1. Added per-agent `required` booleans in `.pi/maestro.json`, all defaulting to `true`. Disabling `builder` completes the workflow at `spec` approval without agents;
|
|
9
|
+
otherwise `verifier` and `simplifier` can be disabled independently. See [PR #45](https://github.com/emilioSp/pi-maestro/pull/45).
|
|
10
|
+
2. Limited activation checks and displayed agent details to enabled phases. With `builder` disabled, activation requires no agents, models, or `pi-subagents` ping.
|
|
11
|
+
3. Updated workflow transitions, tool messages, agent guidance, and documentation for optional phases. Final-summary guidance identifies skipped work without claiming
|
|
12
|
+
implementation, independent verification, or simplification occurred.
|
|
13
|
+
|
|
14
|
+
## 0.14.0
|
|
15
|
+
|
|
16
|
+
1. Removed Maestro's model format regex while retaining activation checks against Pi's available model registry. Complete identifiers, including
|
|
17
|
+
`openrouter/~openai/gpt-mini-latest`, are matched without truncation and passed unchanged to `pi-subagents`. Maestro's other configuration validation remains
|
|
18
|
+
unchanged.
|
|
19
|
+
|
|
6
20
|
## 0.13.1
|
|
7
21
|
|
|
8
22
|
1. Restored `ROADMAP.md` as the planning source of truth from the current Linear issues, retaining their identifiers and recorded evidence. Updated repository guidance,
|
package/README.md
CHANGED
|
@@ -2,23 +2,34 @@
|
|
|
2
2
|
|
|
3
3
|
[](https://codecov.io/gh/emiliosp/pi-maestro)
|
|
4
4
|
|
|
5
|
-
Pi extension for a spec-driven multiagent
|
|
5
|
+
Pi extension for writing a `spec` and optionally implementing it through a spec-driven multiagent workflow.
|
|
6
6
|
|
|
7
7
|

|
|
8
8
|
|
|
9
9
|
## The idea
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
11
|
+
`Maestro` has two goals:
|
|
12
|
+
|
|
13
|
+
1. Help the `owner` write and approve a `specification` (`spec`) for one reversible change.
|
|
14
|
+
2. Implement the approved `spec` through a multiagent workflow.
|
|
15
|
+
|
|
16
|
+
The `owner` can use `Maestro` only to write and approve a `spec`, leaving implementation to another workflow, or to write the `spec` and implement it within `Maestro`.
|
|
17
|
+
`Spec` preparation and approval are required. The entire implementation stage is optional, and each of its phases is optional too:
|
|
18
|
+
|
|
19
|
+
1. The `builder` implements the approved `spec`.
|
|
20
|
+
2. The independent `verifier` checks every `acceptance criterion`.
|
|
21
|
+
3. The `simplifier` refactors accepted code without changing behavior.
|
|
22
|
+
|
|
23
|
+
Disabling the `builder` skips the entire implementation stage. With the `builder` enabled, the `verifier` and `simplifier` can be disabled independently. All three are
|
|
24
|
+
enabled by default. See [Phase selection](docs/configuration.md#phase-selection).
|
|
25
|
+
|
|
26
|
+
The `owner` performs the final review.
|
|
16
27
|
|
|
17
28
|
Five principles hold the workflow together:
|
|
18
29
|
|
|
19
30
|
1. The approved `spec` defines the required work for the `builder` and `verifier`.
|
|
20
31
|
2. No agent approves its own work.
|
|
21
|
-
3.
|
|
32
|
+
3. When enabled, the `verifier` checks every `acceptance criterion` independently.
|
|
22
33
|
4. The `owner` decides requirements, scope, and unresolved questions.
|
|
23
34
|
5. Each agent has one and only one role. Specific and with clear instruction.
|
|
24
35
|
|
|
@@ -73,8 +84,8 @@ An `escalation` asks the `owner` to decide an implementation question. A `findin
|
|
|
73
84
|
1. macOS.
|
|
74
85
|
2. Node.js 26 or later.
|
|
75
86
|
3. Pi 1.0.0 or later.
|
|
76
|
-
4. `pi-subagents` installed and enabled in Pi.
|
|
77
|
-
5. Access to the
|
|
87
|
+
4. `pi-subagents` installed and enabled in Pi when `builder` is enabled.
|
|
88
|
+
5. Access to the models for enabled agents.
|
|
78
89
|
6. A project directory that Pi trusts.
|
|
79
90
|
|
|
80
91
|
## Installation
|
|
@@ -101,19 +112,20 @@ Activate `Maestro`:
|
|
|
101
112
|
/maestro
|
|
102
113
|
```
|
|
103
114
|
|
|
104
|
-
During activation, `Maestro` checks project trust, configuration,
|
|
115
|
+
During activation, `Maestro` checks project trust, configuration, and enabled agent and model availability. With `builder` disabled, only project trust and configuration
|
|
116
|
+
are checked. Model availability comes from Pi's model registry. If a check fails, `Maestro` stays disabled and reports the problem.
|
|
105
117
|
|
|
106
118
|
The `owner` follows this workflow:
|
|
107
119
|
|
|
108
120
|
1. Describes one change to `Maestro`.
|
|
109
121
|
2. Reviews the `spec`, including its `acceptance criteria` and concrete examples.
|
|
110
|
-
3. Replies `GREEN FLAG` when `Maestro` asks for approval. `Maestro` records the approval and starts the
|
|
122
|
+
3. Replies `GREEN FLAG` when `Maestro` asks for approval. `Maestro` records the approval and starts the selected phases.
|
|
111
123
|
4. Reviews every current `builder` `escalation` and gives `Maestro` an answer and reason for each question.
|
|
112
124
|
5. Reviews `verifier` `findings` and chooses an action for every `finding`.
|
|
113
125
|
6. Reads Maestro's summary at `candidate-ready` and performs the final review.
|
|
114
126
|
|
|
115
|
-
`Maestro` starts the `verifier
|
|
116
|
-
current phase in Pi's status, while `pi-subagents` FleetView and `/subagents-fleet` show agent activity and transcripts.
|
|
127
|
+
`Maestro` starts the `verifier`, when enabled, after a successful `builder` `run`. Selected agents run in the foreground: Pi waits for each `run` to finish and `Maestro`
|
|
128
|
+
shows the current phase in Pi's status, while `pi-subagents` FleetView and `/subagents-fleet` show agent activity and transcripts.
|
|
117
129
|
|
|
118
130
|
The `owner` must not edit product files while the workflow runs. `Maestro` can perform temporary experiments with `owner` agreement during `spec` preparation and
|
|
119
131
|
permitted revisions. See [Workflow](docs/workflow.md#spec-approval).
|
|
@@ -125,8 +137,9 @@ changing phase.
|
|
|
125
137
|
If any decision requires a `spec` change, the workflow returns to `drafting-spec` before the `owner` and `Maestro` revise the same `spec`. The `owner` reviews the revised
|
|
126
138
|
`spec` and replies `GREEN FLAG` again. `Maestro` records renewed approval separately before another `builder` `run`.
|
|
127
139
|
|
|
128
|
-
|
|
129
|
-
`Maestro` warns and skips simplification. The `simplifier` selects all uncommitted code changes, including
|
|
140
|
+
When enabled, `Maestro` starts the `simplifier` after successful verification, rejection of all `findings`, or `builder` completion with verification disabled. Only this
|
|
141
|
+
step requires Git. If Git readiness cannot be confirmed, `Maestro` warns and skips simplification. The `simplifier` selects all uncommitted code changes, including
|
|
142
|
+
pre-existing staged, unstaged, and untracked files.
|
|
130
143
|
|
|
131
144
|
The workflow ends at `candidate-ready`. Rejected `findings` retain their reasons and accepted failures can remain. Maestro's summary separates independent verification
|
|
132
145
|
from the later simplifier's report. After the final summary finishes successfully, `Maestro` automatically turns off. The `owner` controls later review, commits, pull
|
|
@@ -138,7 +151,9 @@ files do not automatically restore or resume an incomplete workflow. The `owner`
|
|
|
138
151
|
## Configuration
|
|
139
152
|
|
|
140
153
|
`Maestro` uses default values when `.pi/maestro.json` is absent from the project root. The `owner` can add this file to change the `spec` directory, models, thinking
|
|
141
|
-
levels, or
|
|
154
|
+
levels, timeouts, or selected phases. Each agent has a `required` boolean that defaults to `true`. Set flags before activation and keep configuration unchanged during the
|
|
155
|
+
workflow. With `builder.required: false`, approval finishes with only an approved `spec` for implementation elsewhere. Otherwise `verifier` and `simplifier` can be
|
|
156
|
+
disabled independently. Skipped work is identified in the final summary and is not claimed as completed. See [Configuration](docs/configuration.md#phase-selection).
|
|
142
157
|
|
|
143
158
|
## Documentation
|
|
144
159
|
|
package/ROADMAP.md
CHANGED
|
@@ -3,12 +3,38 @@
|
|
|
3
3
|
This file is the source of truth for planned outcomes and recorded completion. Roadmap entries are not permission to implement them. The `owner` selects work and approves
|
|
4
4
|
its `specification` before implementation starts. Detailed requirements, technical decisions, and `acceptance criteria` belong in that `specification`.
|
|
5
5
|
|
|
6
|
-
Items were restored from the Linear `MAESTRO` team. Existing identifiers remain stable; Linear is historical reference only and does not need to be read or updated.
|
|
7
6
|
Backlog items have no agreed order or date. The `owner` approves priority and scope changes.
|
|
8
7
|
|
|
9
8
|
Completed entries preserve recorded outcomes and evidence, which may describe behavior later changed. Completion requires `owner` acceptance, not only passing checks or
|
|
10
9
|
reaching `candidate-ready`. Linear onboarding and test issues are not project roadmap items and are omitted.
|
|
11
10
|
|
|
11
|
+
## Overview
|
|
12
|
+
|
|
13
|
+
| ID | Item | Status |
|
|
14
|
+
| ---------- | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------- |
|
|
15
|
+
| MAESTRO-6 | [Display specs in a browser](#maestro-6-display-specs-in-a-browser) | Backlog |
|
|
16
|
+
| MAESTRO-7 | [Route builder failures through owner escalations](#maestro-7-route-builder-failures-through-owner-escalations) | Completed |
|
|
17
|
+
| MAESTRO-8 | [Store escalations and owner decisions in builder handoffs](#maestro-8-store-escalations-and-owner-decisions-in-builder-handoffs) | Completed |
|
|
18
|
+
| MAESTRO-9 | [Format glossary terms consistently](#maestro-9-format-glossary-terms-consistently) | Completed |
|
|
19
|
+
| MAESTRO-10 | [Improve status presentation and activation feedback](#maestro-10-improve-status-presentation-and-activation-feedback) | Completed |
|
|
20
|
+
| MAESTRO-11 | [Introduce Maestro at activation](#maestro-11-introduce-maestro-at-activation) | Completed |
|
|
21
|
+
| MAESTRO-12 | [Verify code quality against AGENTS.md instructions](#maestro-12-verify-code-quality-against-agentsmd-instructions) | Completed |
|
|
22
|
+
| MAESTRO-13 | [Check subagent extensions at activation](#maestro-13-check-subagent-extensions-at-activation) | Completed |
|
|
23
|
+
| MAESTRO-14 | [Rename the test support directory](#maestro-14-rename-the-test-support-directory) | Completed |
|
|
24
|
+
| MAESTRO-15 | [Match handoff criteria to the approved spec](#maestro-15-match-handoff-criteria-to-the-approved-spec) | Completed |
|
|
25
|
+
| MAESTRO-16 | [Route finding-driven spec revisions through drafting-spec](#maestro-16-route-finding-driven-spec-revisions-through-drafting-spec) | Completed |
|
|
26
|
+
| MAESTRO-17 | [Keep acceptance criterion numbering continuous](#maestro-17-keep-acceptance-criterion-numbering-continuous) | Completed |
|
|
27
|
+
| MAESTRO-18 | [Record escalation resolutions when the spec changes](#maestro-18-record-escalation-resolutions-when-the-spec-changes) | Completed |
|
|
28
|
+
| MAESTRO-19 | [Guide initial configuration](#maestro-19-guide-initial-configuration) | Backlog |
|
|
29
|
+
| MAESTRO-20 | [Rename the npm package](#maestro-20-rename-the-npm-package) | Backlog |
|
|
30
|
+
| MAESTRO-21 | [Label acceptance criterion coverage](#maestro-21-label-acceptance-criterion-coverage) | Completed |
|
|
31
|
+
| MAESTRO-22 | [Avoid acceptance criteria already covered by tests](#maestro-22-avoid-acceptance-criteria-already-covered-by-tests) | Completed |
|
|
32
|
+
| MAESTRO-23 | [Change agent models before a builder run](#maestro-23-change-agent-models-before-a-builder-run) | Backlog |
|
|
33
|
+
| MAESTRO-24 | [Add a simplifier with one clear purpose per agent](#maestro-24-add-a-simplifier-with-one-clear-purpose-per-agent) | Completed |
|
|
34
|
+
| MAESTRO-25 | [Define workflow reconciliation](#maestro-25-define-workflow-reconciliation) | Backlog |
|
|
35
|
+
| MAESTRO-26 | [Exit Maestro mode automatically at workflow completion](#maestro-26-exit-maestro-mode-automatically-at-workflow-completion) | Completed |
|
|
36
|
+
| MAESTRO-27 | [Make all implementation phases optional](#maestro-27-make-all-implementation-phases-optional) | Implemented, acceptance not confirmed |
|
|
37
|
+
|
|
12
38
|
## Backlog
|
|
13
39
|
|
|
14
40
|
### MAESTRO-6: Display specs in a browser
|
|
@@ -64,34 +90,42 @@ Explore how `Maestro` can reconcile saved `artifacts` and workflow state. The re
|
|
|
64
90
|
|
|
65
91
|
Not yet defined. The `owner` must define the intended outcome, recovery boundaries, and completion condition before this item can move forward.
|
|
66
92
|
|
|
67
|
-
|
|
93
|
+
## Implemented, acceptance not confirmed
|
|
94
|
+
|
|
95
|
+
### MAESTRO-27: Make all implementation phases optional
|
|
68
96
|
|
|
69
97
|
#### Objective
|
|
70
98
|
|
|
71
|
-
Make the `builder`
|
|
99
|
+
Make the entire implementation stage optional, including the `builder`, `verifier`, and `simplifier` phases. Let the `owner` use `Maestro` only to prepare and approve a
|
|
100
|
+
`spec`, leaving implementation to another workflow.
|
|
72
101
|
|
|
73
|
-
|
|
102
|
+
When implementation runs in `Maestro`, the `owner` can still independently enable or disable the `verifier` and `simplifier` phases. `Spec` preparation and approval
|
|
103
|
+
remain required.
|
|
74
104
|
|
|
75
105
|
#### Completed when
|
|
76
106
|
|
|
77
|
-
1. The `builder`
|
|
78
|
-
2.
|
|
79
|
-
3.
|
|
80
|
-
4.
|
|
81
|
-
5. The
|
|
107
|
+
1. The `owner` can complete a workflow with only an approved `spec`, without running the `builder`, `verifier`, or `simplifier`.
|
|
108
|
+
2. Implementation can be performed through another workflow using the approved `spec`, without requiring further execution in `Maestro`.
|
|
109
|
+
3. The existing requested combinations remain available: `builder` only; `builder` and `verifier`; `builder` and `simplifier`; or all three.
|
|
110
|
+
4. Disabled phases are not delegated and do not block workflow completion.
|
|
111
|
+
5. The workflow reaches `candidate-ready` after `spec` approval when no agent phases are selected, or after the selected phases complete and any required `owner`
|
|
112
|
+
decisions are resolved.
|
|
113
|
+
6. The final summary clearly identifies skipped phases and does not claim that skipped implementation or verification has been completed.
|
|
82
114
|
|
|
83
|
-
####
|
|
115
|
+
#### Implementation and evidence
|
|
84
116
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
117
|
+
Implemented under the [specification](.specs/20261103-161424-maestro-27-make-implementation-phases-optional/spec.md), awaiting `owner` acceptance. Each agent's `required`
|
|
118
|
+
boolean in `.pi/maestro.json` defaults to `true`. Flags are set before activation and remain unchanged during the workflow. Disabling `builder` skips all three agents;
|
|
119
|
+
otherwise `verifier` and `simplifier` are independently optional. `Spec` preparation and approval remain required. The activation notice lists only enabled agents and no
|
|
120
|
+
agents when `builder` is disabled.
|
|
121
|
+
|
|
122
|
+
The [README](README.md#the-idea) presents the two uses of `Maestro`: writing and approving a `spec` only, or also implementing it through optional agent phases.
|
|
88
123
|
|
|
89
124
|
#### Context
|
|
90
125
|
|
|
91
126
|
[MAESTRO-24](#maestro-24-add-a-simplifier-with-one-clear-purpose-per-agent) introduced the `simplifier`. Its existing Git-unavailable skip is not an explicit `owner`
|
|
92
|
-
choice. This
|
|
93
|
-
|
|
94
|
-
## Implemented, acceptance not confirmed
|
|
127
|
+
choice. This item originally made only the post-`builder` phases optional. The `owner` expanded the scope to include the `builder`, so `Maestro` can also be used solely
|
|
128
|
+
for writing and approving a `spec`.
|
|
95
129
|
|
|
96
130
|
### MAESTRO-26: Exit Maestro mode automatically at workflow completion
|
|
97
131
|
|
package/agents/simplifier.md
CHANGED
|
@@ -21,7 +21,8 @@ delegate, approve work, implement new behavior, or raise findings or escalations
|
|
|
21
21
|
files. The present documents form one approved contract: motivation and scope in the proposal, behavior and all acceptance criteria, including standalone regressions,
|
|
22
22
|
in the spec, technical decisions in the optional design.
|
|
23
23
|
3. Read relevant builder and verifier handoffs and embedded owner decisions. The highest numeric B or V sequence is active; earlier numbered handoffs are context, not
|
|
24
|
-
active instructions.
|
|
24
|
+
active instructions. When verification is disabled, no verifier handoff is required; use the builder report and its check baseline, without claiming independent
|
|
25
|
+
verification.
|
|
25
26
|
4. Confirm that the saved workflow identifies this spec and is in `simplifier-running`. If inputs or phase do not match, report the mismatch to Maestro and stop. Do not
|
|
26
27
|
repair protocol state.
|
|
27
28
|
|
package/agents/verifier.md
CHANGED
|
@@ -89,4 +89,5 @@ facts. If the tool already wrote an artifact or changed phase before an error, d
|
|
|
89
89
|
force completion. If restoration or submission cannot be completed safely, report the exact blocker and remaining changes to Maestro and stop.
|
|
90
90
|
|
|
91
91
|
After a successful handoff, return a concise summary and the saved artifact path to Maestro and stop. Do not run more checks. The handoff produces `finding-decisions`
|
|
92
|
-
when findings exist
|
|
92
|
+
when findings exist. With no findings, it produces `simplifier-running` when simplification is enabled, otherwise `candidate-ready`. Report that tool result without
|
|
93
|
+
deciding whether the owner must accept, reject, or fix any finding.
|
package/docs/configuration.md
CHANGED
|
@@ -15,16 +15,19 @@ For example, if Pi starts in `/work/app/src`, `Maestro` reads `/work/app/src/.pi
|
|
|
15
15
|
"version": "1.0.0",
|
|
16
16
|
"specDirectory": ".specs",
|
|
17
17
|
"builder": {
|
|
18
|
+
"required": true,
|
|
18
19
|
"model": "openai-codex/gpt-5.6-luna",
|
|
19
20
|
"thinking": "max",
|
|
20
21
|
"timeoutMinutes": 60
|
|
21
22
|
},
|
|
22
23
|
"simplifier": {
|
|
24
|
+
"required": true,
|
|
23
25
|
"model": "openai-codex/gpt-6.1-sol",
|
|
24
26
|
"thinking": "high",
|
|
25
27
|
"timeoutMinutes": 60
|
|
26
28
|
},
|
|
27
29
|
"verifier": {
|
|
30
|
+
"required": true,
|
|
28
31
|
"model": "openai-codex/gpt-6.1-sol",
|
|
29
32
|
"thinking": "high",
|
|
30
33
|
"timeoutMinutes": 60
|
|
@@ -39,19 +42,25 @@ For example, if Pi starts in `/work/app/src`, `Maestro` reads `/work/app/src/.pi
|
|
|
39
42
|
| `version` | Yes, when the file exists | `1.0.0` | Configuration format version. Only `1.0.0` is supported. |
|
|
40
43
|
| `specDirectory` | No | `.specs` | Relative path below the project root. |
|
|
41
44
|
| `builder` | No | `Builder` defaults | Overrides supported `builder` fields. |
|
|
42
|
-
| `builder.
|
|
45
|
+
| `builder.required` | No | `true` | Boolean selecting the `builder` phase. |
|
|
46
|
+
| `builder.model` | No | `openai-codex/gpt-5.6-luna` | Model string passed unchanged to Pi. |
|
|
43
47
|
| `builder.thinking` | No | `max` | One supported thinking level. |
|
|
44
48
|
| `builder.timeoutMinutes` | No | `60` | Integer from `1` to `1440`. Applies to each `builder` `run`. |
|
|
45
49
|
| `verifier` | No | `Verifier` defaults | Overrides supported `verifier` fields. |
|
|
46
|
-
| `verifier.
|
|
50
|
+
| `verifier.required` | No | `true` | Boolean selecting the `verifier` phase. |
|
|
51
|
+
| `verifier.model` | No | `openai-codex/gpt-6.1-sol` | Model string passed unchanged to Pi. |
|
|
47
52
|
| `verifier.thinking` | No | `high` | One supported thinking level. |
|
|
48
53
|
| `verifier.timeoutMinutes` | No | `60` | Integer from `1` to `1440`. Applies to each `verifier` `run`. |
|
|
49
54
|
| `simplifier` | No | `Simplifier` defaults | Overrides supported `simplifier` fields. |
|
|
50
|
-
| `simplifier.
|
|
55
|
+
| `simplifier.required` | No | `true` | Boolean selecting the `simplifier` phase. |
|
|
56
|
+
| `simplifier.model` | No | `openai-codex/gpt-6.1-sol` | Model string passed unchanged to Pi. |
|
|
51
57
|
| `simplifier.thinking` | No | `high` | One supported thinking level. |
|
|
52
58
|
| `simplifier.timeoutMinutes` | No | `60` | Integer from `1` to `1440`. Applies to each `simplifier` `run`. |
|
|
53
59
|
|
|
54
|
-
Model
|
|
60
|
+
Model values use the full `provider/model` identifier supplied by Pi's model registry, such as `openrouter/~openai/gpt-mini-latest`. Model IDs may contain additional
|
|
61
|
+
slashes. `Maestro` does not apply a separate format rule; it matches the complete identifier against Pi's available models and passes it unchanged through `pi-subagents`.
|
|
62
|
+
|
|
63
|
+
`Maestro` accepts these thinking levels:
|
|
55
64
|
|
|
56
65
|
```text
|
|
57
66
|
off
|
|
@@ -78,6 +87,25 @@ Only `version` is required when the file exists. Each other field overrides its
|
|
|
78
87
|
|
|
79
88
|
This example keeps every default except the `builder` timeout.
|
|
80
89
|
|
|
90
|
+
## Phase selection
|
|
91
|
+
|
|
92
|
+
Set each agent's `required` boolean before activation and leave configuration unchanged until the workflow completes. Omitted flags default to `true`, even when an agent
|
|
93
|
+
section or the entire file is absent. Strings, numbers, and `null` are invalid.
|
|
94
|
+
|
|
95
|
+
With `builder.required: false`, approval completes the workflow with an approved `spec` and no agent execution, regardless of the other flags. The approved `spec` can be
|
|
96
|
+
used for implementation in another workflow. With `builder` enabled, `verifier` and `simplifier` can each be disabled independently. Neither runs without `builder`.
|
|
97
|
+
|
|
98
|
+
| `builder.required` | `verifier.required` | `simplifier.required` | Selected phases after approval |
|
|
99
|
+
| ------------------ | ------------------- | --------------------- | ------------------------------ |
|
|
100
|
+
| `false` | Any | Any | None; approved `spec` only |
|
|
101
|
+
| `true` | `false` | `false` | `Builder` only |
|
|
102
|
+
| `true` | `true` | `false` | `Builder`, then `verifier` |
|
|
103
|
+
| `true` | `false` | `true` | `Builder`, then `simplifier` |
|
|
104
|
+
| `true` | `true` | `true` | All three, in order |
|
|
105
|
+
|
|
106
|
+
Disabled phases do not require agent or model availability and produce no `handoff`. The final summary identifies skipped work rather than claiming it was performed.
|
|
107
|
+
Enabled simplification can still be skipped if Git is unavailable.
|
|
108
|
+
|
|
81
109
|
## Schema version
|
|
82
110
|
|
|
83
111
|
`version` identifies the configuration format, not the npm package version. The supported value is `1.0.0`. Other values stop activation.
|
|
@@ -95,7 +123,12 @@ For example, `specDirectory: "planning/specs"` places `specs` in `<project-root>
|
|
|
95
123
|
|
|
96
124
|
## Model access
|
|
97
125
|
|
|
98
|
-
`Maestro` checks
|
|
126
|
+
During activation, `Maestro` checks only enabled agents and their configured models against `context.modelRegistry.getAvailable()`. Pi's registry is the source of truth
|
|
127
|
+
for model availability; `Maestro` does not maintain a separate model list or authentication check. A missing enabled model stops activation and identifies the full
|
|
128
|
+
configured identifier.
|
|
129
|
+
|
|
130
|
+
With `builder` disabled, activation checks only project trust and configuration, with no agent checks, model lookup, or `pi-subagents` ping. With `builder` enabled, the
|
|
131
|
+
availability ping remains required.
|
|
99
132
|
|
|
100
|
-
|
|
101
|
-
Agent names and context are described in [Subagent integration](subagent-integration.md#roles-and-context).
|
|
133
|
+
The `owner` can correct the identifier or authenticate the provider in Pi, then retry `/maestro`. Authentication or provider errors during delegation still appear as
|
|
134
|
+
`run` failures. Agent names and context are described in [Subagent integration](subagent-integration.md#roles-and-context).
|
package/docs/glossary.md
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
| `Candidate` | The project files created by agents after a workflow `run` |
|
|
21
21
|
| `Finding` | A technical issue that the `verifier` records for an `owner` decision. |
|
|
22
22
|
| `Escalation` | An implementation question or reportable technical problem that the `builder` records in its `handoff` for an `owner` decision. |
|
|
23
|
-
| `GREEN FLAG` | The owner's explicit reply that approves the current `spec` and
|
|
23
|
+
| `GREEN FLAG` | The owner's explicit reply that approves the current `spec` and proceeds through the selected phases. |
|
|
24
24
|
| `fix-code` | An `owner` decision that requests code fixes without changing the approved `spec`. |
|
|
25
25
|
| `revise-spec` | An `owner` decision that records a reason and agreed requirement change, then returns to `drafting-spec` for revision and renewed approval. |
|
|
26
26
|
| `reject` | An `owner` decision that declines a `finding` and records a reason. It does not mean that verification passed. |
|
|
@@ -19,8 +19,9 @@ and available skills. The global file normally lives at `~/.pi/agent/AGENTS.md`.
|
|
|
19
19
|
`Maestro` supplies the `spec` ID, project directory, model, thinking level, and timeout. The agents read all approved documents (`proposal.md`, `spec.md`, and `design.md`
|
|
20
20
|
when present) and saved `artifacts` to understand the work. Earlier `artifacts` provide context, not proof.
|
|
21
21
|
|
|
22
|
-
The `owner` does not call agent tools directly. `Maestro` starts the `builder` after `GREEN FLAG` approval. The `verifier` starts after successful
|
|
23
|
-
|
|
22
|
+
The `owner` does not call agent tools directly. `Maestro` starts the enabled `builder` after `GREEN FLAG` approval. The enabled `verifier` starts after successful
|
|
23
|
+
`builder` completion. The enabled `simplifier` follows the selected preceding phases. Disabled agents are not delegated. See
|
|
24
|
+
[Phase selection](configuration.md#phase-selection).
|
|
24
25
|
|
|
25
26
|
## Following a run
|
|
26
27
|
|
|
@@ -36,8 +37,9 @@ If a `run` fails or returns without a valid saved result, `Maestro` reports the
|
|
|
36
37
|
|
|
37
38
|
## External configuration
|
|
38
39
|
|
|
39
|
-
The `pi-subagents` extension must be installed and enabled in Pi
|
|
40
|
-
[Maestro configuration](configuration.md). Other `pi-subagents`
|
|
40
|
+
The `pi-subagents` extension must be installed and enabled in Pi when `builder` is enabled. Workflows with only an approved `spec` need no agent availability or ping.
|
|
41
|
+
`Builder`, `verifier`, and `simplifier` model choices, thinking levels, and timeouts come from [Maestro configuration](configuration.md). Other `pi-subagents`
|
|
42
|
+
configuration remains the owner's responsibility.
|
|
41
43
|
|
|
42
44
|
Only `maestro_run_simplifier` checks Git readiness, with `git rev-parse --is-inside-work-tree`. If readiness cannot be confirmed, it warns and completes without
|
|
43
45
|
delegation. The `simplifier` uses Git to select all uncommitted code changes. `Maestro` does not change the Git index or create commits or checkpoints.
|
package/docs/workflow.md
CHANGED
|
@@ -41,7 +41,14 @@ independently and which issues it found.
|
|
|
41
41
|
|
|
42
42
|
## Main flow
|
|
43
43
|
|
|
44
|
-
The green arrows and lines show the path without `escalations` or `findings`.
|
|
44
|
+
The diagram shows the default flow with all three agents enabled. The green arrows and lines show the path without `escalations` or `findings`.
|
|
45
|
+
|
|
46
|
+
The `owner` selects phases through each agent's `required` boolean before activation and leaves configuration unchanged during the workflow. All flags default to `true`.
|
|
47
|
+
See [Phase selection](configuration.md#phase-selection).
|
|
48
|
+
|
|
49
|
+
With `builder` disabled, approval moves directly to `candidate-ready` and all agents are skipped. Otherwise, after `builder` completion, disabled verification is
|
|
50
|
+
bypassed: the workflow enters `simplifier-running` if simplification is enabled, or `candidate-ready` otherwise. Successful verification and rejection of all current
|
|
51
|
+
`findings` also move directly to `candidate-ready` when simplification is disabled. Skipped agents are not delegated and need no `handoffs`.
|
|
45
52
|
|
|
46
53
|
```mermaid
|
|
47
54
|
flowchart TD
|
|
@@ -84,17 +91,17 @@ alone does not establish a completed action.
|
|
|
84
91
|
|
|
85
92
|
The default path is `.specs/<spec-id>/workflow.json`. The `spec` directory is [configurable](configuration.md).
|
|
86
93
|
|
|
87
|
-
| Phase | Meaning
|
|
88
|
-
| ---------------------- |
|
|
89
|
-
| `drafting-spec` | The `owner` and `Maestro` prepare the initial `spec` or revise it after recorded `escalation` answers or `finding` decisions.
|
|
90
|
-
| `ready-for-builder` | The approved `spec` or recorded `owner` decisions permit a `builder` `run`.
|
|
91
|
-
| `builder-running` | A `builder` `run` is active.
|
|
92
|
-
| `escalation-decisions` | The `owner` must decide how to handle every `escalation` question.
|
|
93
|
-
| `ready-for-verifier` | The `builder` completed the work and the `verifier` can start.
|
|
94
|
-
| `verifier-running` | A `verifier` `run` is active.
|
|
95
|
-
| `finding-decisions` | The `owner` must decide how to handle every current `finding`.
|
|
96
|
-
| `simplifier-running` |
|
|
97
|
-
| `candidate-ready` |
|
|
94
|
+
| Phase | Meaning |
|
|
95
|
+
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
96
|
+
| `drafting-spec` | The `owner` and `Maestro` prepare the initial `spec` or revise it after recorded `escalation` answers or `finding` decisions. |
|
|
97
|
+
| `ready-for-builder` | The approved `spec` or recorded `owner` decisions permit a `builder` `run`. |
|
|
98
|
+
| `builder-running` | A `builder` `run` is active. |
|
|
99
|
+
| `escalation-decisions` | The `owner` must decide how to handle every `escalation` question. |
|
|
100
|
+
| `ready-for-verifier` | The `builder` completed the work and the `verifier` can start. |
|
|
101
|
+
| `verifier-running` | A `verifier` `run` is active. |
|
|
102
|
+
| `finding-decisions` | The `owner` must decide how to handle every current `finding`. |
|
|
103
|
+
| `simplifier-running` | Selected preceding phases finished. The enabled `simplifier` can run or skip if Git is unavailable. |
|
|
104
|
+
| `candidate-ready` | The selected phases completed or were skipped. The workflow is complete. |
|
|
98
105
|
|
|
99
106
|
## Specification documents
|
|
100
107
|
|
|
@@ -112,9 +119,9 @@ For the initial `spec`:
|
|
|
112
119
|
|
|
113
120
|
1. `Maestro` creates `proposal.md`, `spec.md`, and `workflow.json` in `drafting-spec`, then prepares the documents with the `owner`. It adds `design.md` only when needed.
|
|
114
121
|
2. The `owner` reviews the complete document set: motivation, scope, requirements, `acceptance criteria`, and any approved technical decisions.
|
|
115
|
-
3. `Maestro` asks the `owner` to inspect `proposal.md`, `spec.md`, and `design.md` when present and reply `GREEN FLAG` once to approve the entire set and
|
|
116
|
-
|
|
117
|
-
4. After that reply, `Maestro` saves `ready-for-builder` and starts the `builder` in the foreground.
|
|
122
|
+
3. `Maestro` asks the `owner` to inspect `proposal.md`, `spec.md`, and `design.md` when present and reply `GREEN FLAG` once to approve the entire set and proceed through
|
|
123
|
+
the selected phases.
|
|
124
|
+
4. After that reply, `Maestro` saves `ready-for-builder` and starts the enabled `builder` in the foreground, or saves `candidate-ready` with all agents skipped.
|
|
118
125
|
|
|
119
126
|
Approval freezes all present `spec` documents and visual prototypes together. None may change during `builder`, `verifier`, or `simplifier` execution. See
|
|
120
127
|
[Spec revision](#spec-revision) for permitted revisions.
|
|
@@ -230,11 +237,11 @@ that file's `findings` list, not a separate `F2.json` file. `Finding` numbers re
|
|
|
230
237
|
`Maestro` records `owner` decisions in the same `verifier` report, e.g. decisions about `V1/F2` update `V1.json`, not a new `V2.json`. A new `verifier` result creates the
|
|
231
238
|
next report (`V2.json`).
|
|
232
239
|
|
|
233
|
-
| Decision | Result
|
|
234
|
-
| ------------- |
|
|
235
|
-
| `reject` | Records the owner's reason. If every `finding` is rejected, the workflow reaches `simplifier-running`.
|
|
236
|
-
| `fix-code` | Keeps the current `spec` and returns to `ready-for-builder` for code fixes when no decision requires revision.
|
|
237
|
-
| `revise-spec` | Records the owner's reason and agreed requirement change, then returns to `drafting-spec`.
|
|
240
|
+
| Decision | Result |
|
|
241
|
+
| ------------- | ------------------------------------------------------------------------------------------------------------------------------------------------ |
|
|
242
|
+
| `reject` | Records the owner's reason. If every `finding` is rejected, the workflow reaches `simplifier-running` when enabled, otherwise `candidate-ready`. |
|
|
243
|
+
| `fix-code` | Keeps the current `spec` and returns to `ready-for-builder` for code fixes when no decision requires revision. |
|
|
244
|
+
| `revise-spec` | Records the owner's reason and agreed requirement change, then returns to `drafting-spec`. |
|
|
238
245
|
|
|
239
246
|
`Maestro` saves every current decision together before the phase changes. If any `finding` requires revision, revision takes priority over code fixes and rejections. See
|
|
240
247
|
[Spec revision](#spec-revision).
|
|
@@ -262,8 +269,8 @@ Cleanup relies on the `verifier`. If cleanup cannot finish safely, the `verifier
|
|
|
262
269
|
|
|
263
270
|
## Simplification
|
|
264
271
|
|
|
265
|
-
|
|
266
|
-
`Simplifier skipped: Git repository unavailable.`
|
|
272
|
+
When enabled, `Maestro` starts the `simplifier` after successful verification, rejection of all `findings`, or `builder` completion with verification disabled. The
|
|
273
|
+
`simplifier` runs only if Git is available, if not, a warning is displayed: `Simplifier skipped: Git repository unavailable.`
|
|
267
274
|
|
|
268
275
|
The `simplifier` starts from all staged, unstaged, and untracked code changes, including pre-existing changes. It preserves observable behavior and introduces no new
|
|
269
276
|
check failures. If no code needs refactoring, the `simplifier` does not make any change.
|
|
@@ -271,7 +278,9 @@ check failures. If no code needs refactoring, the `simplifier` does not make any
|
|
|
271
278
|
## Workflow completion
|
|
272
279
|
|
|
273
280
|
The workflow ends at `candidate-ready`. `Maestro` summarizes the changes, verification results, rejected `findings` and reasons, relevant `builder` notes from the saved
|
|
274
|
-
`artifacts`, and simplifier's summary and notes.
|
|
281
|
+
`artifacts`, and simplifier's summary and notes, only for phases that ran. It identifies every skipped phase and its reason. An approved `spec` alone does not mean code
|
|
282
|
+
was implemented or verified. `Builder` checks and the simplifier's report are not independent verification when `verifier` is disabled. The `owner` can use an approved
|
|
283
|
+
`spec` for implementation in another workflow without further `Maestro` execution.
|
|
275
284
|
|
|
276
285
|
`Maestro` stays active while delivering this final summary, then automatically turns off after successful delivery. The `owner` performs the final review and controls any
|
|
277
286
|
later Git use, pull request, or merge. Changes after completion are outside the completed verification.
|
package/extensions/maestro.ts
CHANGED
|
@@ -87,29 +87,27 @@ export default (pi: ExtensionAPI): void => {
|
|
|
87
87
|
try {
|
|
88
88
|
await assertEnvironment({ context, piEventsBus: pi.events });
|
|
89
89
|
const config = await loadConfiguration(context.cwd);
|
|
90
|
+
const isImplementationEnabled = config.builder.required;
|
|
90
91
|
|
|
91
92
|
maestroSessionState.activate();
|
|
92
93
|
syncMainTools();
|
|
93
94
|
await refreshMaestroStatus(context);
|
|
94
95
|
|
|
95
|
-
// Introduce Maestro and show
|
|
96
|
+
// Introduce Maestro and show enabled agents only in the UI.
|
|
96
97
|
context.ui.notify(
|
|
97
98
|
[
|
|
98
99
|
context.ui.theme.fg('muted', 'Maestro active'),
|
|
99
100
|
'Maestro helps the owner define a spec, then coordinates implementation and independent verification.',
|
|
100
101
|
'Ask how Maestro works for a short explanation.',
|
|
101
|
-
|
|
102
|
-
'
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
'accent',
|
|
111
|
-
`Simplifier (${config.simplifier.model} ${config.simplifier.thinking})`,
|
|
112
|
-
),
|
|
102
|
+
...[
|
|
103
|
+
{ label: 'Builder', settings: config.builder },
|
|
104
|
+
{ label: 'Verifier', settings: config.verifier },
|
|
105
|
+
{ label: 'Simplifier', settings: config.simplifier },
|
|
106
|
+
]
|
|
107
|
+
.filter(({ settings }) => isImplementationEnabled && settings.required)
|
|
108
|
+
.map(({ label, settings }) =>
|
|
109
|
+
context.ui.theme.fg('accent', `${label} (${settings.model} ${settings.thinking})`),
|
|
110
|
+
),
|
|
113
111
|
].join('\n'),
|
|
114
112
|
'info',
|
|
115
113
|
);
|
package/package.json
CHANGED
|
@@ -39,7 +39,7 @@ const formatError = (error: SchemaValidationError): string => {
|
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
if (path.endsWith('model')) {
|
|
42
|
-
return `Invalid model
|
|
42
|
+
return `Invalid model at "${path}": expected a string.`;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
if (path === 'builder' || path === 'verifier' || path === 'simplifier') {
|