@emiliosp/pi-maestro 0.23.1 → 0.23.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.
- package/README.md +5 -3
- package/docs/MISSION.md +5 -4
- package/docs/configuration.md +23 -44
- package/docs/glossary.md +0 -2
- package/docs/subagent-integration.md +2 -4
- package/docs/workflow.md +7 -30
- package/package.json +1 -1
- package/docs/maestro.png +0 -0
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="pi-maestro-logo.png" alt="Pi Maestro logo" width="200">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
1
5
|
# pi-maestro
|
|
2
6
|
|
|
3
7
|
[](https://codecov.io/gh/emiliosp/pi-maestro)
|
|
4
8
|
|
|
5
9
|
Pi extension for writing a specification and optionally implementing it through a spec-driven multiagent workflow.
|
|
6
10
|
|
|
7
|
-

|
|
8
|
-
|
|
9
11
|
## How it works
|
|
10
12
|
|
|
11
13
|
Every change starts with a `spec`. `Maestro` helps the `owner` to define a specification (`spec`) for a change, including clear requirements and acceptance criteria.
|
|
@@ -98,7 +100,7 @@ It scores:
|
|
|
98
100
|
|
|
99
101
|
`Maestro` presents the results in the final summary.
|
|
100
102
|
|
|
101
|
-
See [Scorer configuration](docs/configuration.md#
|
|
103
|
+
See [Scorer configuration](docs/configuration.md#model-access) to choose a classifier.
|
|
102
104
|
|
|
103
105
|
This automatic grading system gives the `owner` a level of confidence in the workflow's outcome, not proof of correctness.
|
|
104
106
|
|
package/docs/MISSION.md
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
# Mission
|
|
2
2
|
|
|
3
|
-
`Maestro` uses spec-driven development to improve quality when coding with agents.
|
|
4
|
-
code. It provides a clear path from an approved `spec` to verified code and manages agent coordination for the `owner`.
|
|
3
|
+
`Maestro` uses spec-driven development to improve quality when coding with agents.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
- It guides the `owner` to define requirements and think through a feature before writing code.
|
|
6
|
+
- It provides a clear path from an approved `spec` to verified code and manages agent coordination for the `owner`.
|
|
7
|
+
- The `owner` remains responsible for final code review, pull requests, and merging.
|
|
8
|
+
- The `owner` also provides and maintains the project's development checks and instructions, including linters, tests, anti-slop checks, and `AGENTS.md`.
|
package/docs/configuration.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Configuration
|
|
2
2
|
|
|
3
|
-
`Maestro` reads `.pi/maestro.json` from the project root. When it is absent, `/maestro` opens initial setup in Pi's interactive terminal.
|
|
3
|
+
`Maestro` reads `.pi/maestro.json` from the project root. When it is absent, `/maestro` opens initial setup in Pi's interactive terminal and creates the file.
|
|
4
4
|
|
|
5
5
|
## Project root
|
|
6
6
|
|
|
@@ -11,12 +11,8 @@ For example, if Pi starts in `/work/app/src`, `Maestro` reads `/work/app/src/.pi
|
|
|
11
11
|
## Initial setup
|
|
12
12
|
|
|
13
13
|
The `owner` runs `/maestro` in Pi's interactive terminal and follows the guided setup to select models and thinking levels for `builder`, `verifier`, and `simplifier`.
|
|
14
|
-
The `scorer` appears in the same menu and offers available Pi classifiers only
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
## Agent models
|
|
18
|
-
|
|
19
|
-
Before starting or restarting a `spec`, the `owner` can choose "Agent models" in `/maestro` to change or clear any role's model.
|
|
14
|
+
The `scorer` appears in the same menu and offers available Pi classifiers only. Selecting a classifier enables scoring; leaving it unselected keeps scoring disabled.
|
|
15
|
+
Confirmation saves the choices in `.pi/maestro.json`.
|
|
20
16
|
|
|
21
17
|
## Example configuration
|
|
22
18
|
|
|
@@ -70,8 +66,7 @@ This is an explicit all-agent configuration, not a set of model defaults. The `o
|
|
|
70
66
|
| `scorer.required` | No | `false` | Boolean selecting workflow scoring. |
|
|
71
67
|
| `scorer.model` | When scoring is enabled | None | Full Pi classifier identifier; no default or fallback. |
|
|
72
68
|
|
|
73
|
-
Model values use the full `provider/model` identifier supplied by Pi's model registry, such as `openrouter/~openai/gpt-mini-latest`.
|
|
74
|
-
slashes. `Maestro` does not apply a separate format rule; it matches the complete identifier against Pi's available models and uses it unchanged for SDK execution.
|
|
69
|
+
Model values use the full `provider/model` identifier supplied by Pi's model registry, such as `openrouter/~openai/gpt-mini-latest`.
|
|
75
70
|
|
|
76
71
|
`Maestro` accepts these thinking levels:
|
|
77
72
|
|
|
@@ -89,12 +84,10 @@ max
|
|
|
89
84
|
|
|
90
85
|
The configuration file can omit fields that have a default in the table above:
|
|
91
86
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
There are no default models: `Maestro` does not automatically assign Pi's current model to an agent.
|
|
87
|
+
- `version` is always required and must be `1.0.0`.
|
|
88
|
+
- Each agent that will execute needs an explicit `model`. If its model is missing, `Maestro` reports an error and does not activate.
|
|
89
|
+
- An agent disabled with `required: false` needs no model. With `builder.required: false`, no agents execute, so no models are required.
|
|
90
|
+
- Other omitted fields use the defaults in the table. For example, omitting `specDirectory` uses `.specs`.
|
|
98
91
|
|
|
99
92
|
```json
|
|
100
93
|
{
|
|
@@ -113,33 +106,19 @@ directory is `.specs` because `specDirectory` is omitted.
|
|
|
113
106
|
|
|
114
107
|
## Phase selection
|
|
115
108
|
|
|
116
|
-
|
|
117
|
-
`verifier`, and `false` for `simplifier` and `scorer`, including when their sections are absent. Strings, numbers, and `null` are invalid.
|
|
118
|
-
|
|
119
|
-
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
|
|
120
|
-
used for implementation in another workflow. With `builder` enabled, `verifier`, `simplifier`, and `scorer` can each be disabled independently. None runs without
|
|
121
|
-
`builder`. The table below shows agent execution; enabled scoring follows the last selected implementation phase.
|
|
122
|
-
|
|
123
|
-
| `builder.required` | `verifier.required` | `simplifier.required` | Selected phases after approval |
|
|
124
|
-
| ------------------ | ------------------- | --------------------- | ------------------------------ |
|
|
125
|
-
| `false` | Any | Any | None; approved `spec` only |
|
|
126
|
-
| `true` | `false` | `false` | `Builder` only |
|
|
127
|
-
| `true` | `true` | `false` | `Builder`, then `verifier` |
|
|
128
|
-
| `true` | `false` | `true` | `Builder`, then `simplifier` |
|
|
129
|
-
| `true` | `true` | `true` | All three, in order |
|
|
130
|
-
|
|
131
|
-
Disabled phases do not require model availability and produce no `handoff`. The final summary identifies skipped work rather than claiming it was performed. Enabled
|
|
132
|
-
simplification can still be skipped if Git is unavailable.
|
|
133
|
-
|
|
134
|
-
## Scorer
|
|
135
|
-
|
|
136
|
-
The `owner` can choose any available Pi classifier in [Agent models](#agent-models) or during initial setup. The choice is saved as `scorer.model`. The example above uses
|
|
137
|
-
`openrouter/typesafe/jev-1.14`, but no model or provider is required by default.
|
|
138
|
-
|
|
139
|
-
Scoring is disabled when `scorer` is omitted or `scorer.required` is `false`. Enabling it requires an explicit, non-empty model.
|
|
109
|
+
The `required` flags determine which phases run after the `owner` approves the `spec`.
|
|
140
110
|
|
|
141
|
-
|
|
142
|
-
|
|
111
|
+
| `builder.required` | `verifier.required` | `simplifier.required` | `scorer.required` | What runs after spec approval |
|
|
112
|
+
| ------------------ | ------------------- | --------------------- | ----------------- | ------------------------------------------------ |
|
|
113
|
+
| `false` | Any | Any | Any | None; approved `spec` only |
|
|
114
|
+
| `true` | `false` | `false` | `false` | `Builder` only |
|
|
115
|
+
| `true` | `false` | `false` | `true` | `Builder` → `scorer` |
|
|
116
|
+
| `true` | `false` | `true` | `false` | `Builder` → `simplifier` |
|
|
117
|
+
| `true` | `false` | `true` | `true` | `Builder` → `simplifier` → `scorer` |
|
|
118
|
+
| `true` | `true` | `false` | `false` | `Builder` → `verifier` |
|
|
119
|
+
| `true` | `true` | `false` | `true` | `Builder` → `verifier` → `scorer` |
|
|
120
|
+
| `true` | `true` | `true` | `false` | `Builder` → `verifier` → `simplifier` |
|
|
121
|
+
| `true` | `true` | `true` | `true` | `Builder` → `verifier` → `simplifier` → `scorer` |
|
|
143
122
|
|
|
144
123
|
## Schema version
|
|
145
124
|
|
|
@@ -158,9 +137,9 @@ For example, `specDirectory: "planning/specs"` places `specs` in `<project-root>
|
|
|
158
137
|
|
|
159
138
|
## Model access
|
|
160
139
|
|
|
161
|
-
|
|
162
|
-
or sign in to the provider in Pi. If the `builder` is disabled, no models are needed to start.
|
|
140
|
+
Each enabled phase needs a model when the `builder` is enabled. The `owner` can change models under "Agent models" in `/maestro`.
|
|
163
141
|
|
|
164
|
-
|
|
142
|
+
- `Builder`, `verifier`, and `simplifier`: If an enabled model is unavailable, `Maestro` won’t start.
|
|
143
|
+
- `Scorer`: `Maestro` checks the Pi classifier when scoring runs. If it’s unavailable, `Maestro` records the failure and finishes without scores.
|
|
165
144
|
|
|
166
145
|
See [Subagent integration](subagent-integration.md#roles-and-context) for agent context.
|
package/docs/glossary.md
CHANGED
|
@@ -65,5 +65,3 @@
|
|
|
65
65
|
|
|
66
66
|
All paths in this table are relative to the `spec` directory unless stated otherwise. The [configuration](configuration.md#path-rules) can change the directory that
|
|
67
67
|
contains `specs`.
|
|
68
|
-
|
|
69
|
-
`Escalation` and `finding` numbers restart in each report: `B1/E1` and `B2/E1` refer to different questions.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Subagents integration
|
|
2
2
|
|
|
3
3
|
The `owner` stays in the main `Maestro` conversation while the `builder`, `verifier`, and `simplifier` each work in a separate Pi session. The optional `scorer` uses a Pi
|
|
4
4
|
classifier instead of a separate agent session. See [Workflow evaluation](workflow.md#workflow-evaluation).
|
|
@@ -10,11 +10,9 @@ not see the main conversation or earlier agent conversations. Requirements discu
|
|
|
10
10
|
|
|
11
11
|
Agents can use Pi's enabled extensions and skills, including configured MCP, codemode, and tool search support.
|
|
12
12
|
|
|
13
|
-
Maestro's status in Pi shows the current workflow phase.
|
|
14
|
-
|
|
15
13
|
## Cancellation and errors
|
|
16
14
|
|
|
17
|
-
Press `Escape` (Pi's default cancel key) to stop a running agent. Cancellation does not undo file changes. After an interruption or error, see
|
|
15
|
+
Press `Escape` (Pi's default cancel key) to stop a running agent. Cancellation does not undo file changes. After an interruption or error the spec can be restarted, see
|
|
18
16
|
[Restart an existing spec](workflow.md#restart-an-existing-spec).
|
|
19
17
|
|
|
20
18
|
## Inspecting saved sessions
|
package/docs/workflow.md
CHANGED
|
@@ -42,8 +42,6 @@ flowchart TD
|
|
|
42
42
|
|
|
43
43
|
## Workflow phases
|
|
44
44
|
|
|
45
|
-
The saved phase in `workflow.json` determines what can happen next.
|
|
46
|
-
|
|
47
45
|
| Phase | Meaning |
|
|
48
46
|
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
|
49
47
|
| `drafting-spec` | The `owner` and `Maestro` prepare the initial `spec` or revise it after recorded `escalation` answers or `finding` decisions. |
|
|
@@ -59,8 +57,6 @@ The saved phase in `workflow.json` determines what can happen next.
|
|
|
59
57
|
|
|
60
58
|
## Specification documents
|
|
61
59
|
|
|
62
|
-
Each new `spec` uses these documents in the same directory:
|
|
63
|
-
|
|
64
60
|
| Document | Content | Presence |
|
|
65
61
|
| ------------- | ------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------- |
|
|
66
62
|
| `proposal.md` | Problem, goal, scope, and exclusions. | Always created. |
|
|
@@ -69,8 +65,8 @@ Each new `spec` uses these documents in the same directory:
|
|
|
69
65
|
|
|
70
66
|
## Spec approval
|
|
71
67
|
|
|
72
|
-
Review `proposal.md`, `spec.md`, and `design.md` if present
|
|
73
|
-
prototypes, and starts the selected [implementation phases](configuration.md#phase-selection).
|
|
68
|
+
Review `proposal.md`, `spec.md`, and `design.md` if present, and reply `GREEN FLAG` when `Maestro` asks for approval. This approves the whole set, including any visual
|
|
69
|
+
prototypes, and starts the selected [implementation phases](configuration.md#phase-selection).
|
|
74
70
|
|
|
75
71
|
## Escalations
|
|
76
72
|
|
|
@@ -95,33 +91,18 @@ A `finding` is an issue the `verifier` identifies while independently checking t
|
|
|
95
91
|
| `revise-spec` | Records the owner's reason and agreed requirement change, then returns to `drafting-spec`. |
|
|
96
92
|
|
|
97
93
|
If any `finding` requires revision, revise the `spec` before any code fixes. Otherwise, if any decision is `fix-code`, the `verifier` checks the work again after the
|
|
98
|
-
`builder` fixes it.
|
|
94
|
+
`builder` fixes it.
|
|
99
95
|
|
|
100
96
|
## Spec revision
|
|
101
97
|
|
|
102
98
|
A decision to change the `spec` pauses implementation. Review the revised document set and reply `GREEN FLAG` again before the `builder` restarts. Earlier reports and
|
|
103
99
|
decisions remain available as context.
|
|
104
100
|
|
|
105
|
-
## Verification boundary
|
|
106
|
-
|
|
107
|
-
The `verifier` can make temporary changes to run its checks. Before submitting its `handoff`, it restores the exact original contents of affected files and removes only
|
|
108
|
-
files it created.
|
|
109
|
-
|
|
110
|
-
Cleanup relies on the `verifier`. If cleanup cannot finish safely, the `verifier` stops and reports the remaining changes.
|
|
111
|
-
|
|
112
|
-
## Simplification
|
|
113
|
-
|
|
114
|
-
When enabled, `Maestro` starts the `simplifier` after successful verification, rejection of all `findings`, or `builder` completion with verification disabled. The
|
|
115
|
-
`simplifier` runs only if Git is available, if not, a warning is displayed: `Simplifier skipped: Git repository unavailable.`
|
|
116
|
-
|
|
117
|
-
The `simplifier` starts from all staged, unstaged, and untracked code changes, including pre-existing changes. It preserves observable behavior and introduces no new
|
|
118
|
-
check failures. If no code needs refactoring, the `simplifier` does not make any change.
|
|
119
|
-
|
|
120
101
|
## Workflow evaluation
|
|
121
102
|
|
|
122
103
|
When scoring is enabled, `scorer-running` evaluates the entire workflow against the approved `spec` after the selected implementation phases, including simplification.
|
|
123
104
|
The selected Pi classifier receives the approved documents, available `handoffs` and `owner` decisions, and staged, unstaged, and untracked Git changes against `HEAD`.
|
|
124
|
-
Scoring is off by default.
|
|
105
|
+
Scoring is off by default.
|
|
125
106
|
|
|
126
107
|
The classifier's ratings are converted to two separate scores on a **0–100 scale**. Each retains its confidence value from 0 to 1:
|
|
127
108
|
|
|
@@ -139,9 +120,6 @@ Results are saved in the `spec-score/` folder inside the active `spec` directory
|
|
|
139
120
|
- `evaluation.json` has the scores and confidence values, or the reason for a failure.
|
|
140
121
|
- `evaluation.raw.json` has the classifier response, if one was returned.
|
|
141
122
|
|
|
142
|
-
Evaluation needs Git with an existing `HEAD`. Once a success or a failure is saved, the workflow moves to `candidate-ready`. If the evaluation hits an error or is
|
|
143
|
-
cancelled, a failure report is saved without scores. If the report cannot be saved, the workflow cannot finish. Maestro adds the workflow evaluation in the final summary.
|
|
144
|
-
|
|
145
123
|
## Workflow completion
|
|
146
124
|
|
|
147
125
|
When the workflow ends, `Maestro` presents a summary and turns off. The `owner` then reviews the changes.
|
|
@@ -194,13 +172,12 @@ these project-specific checks.
|
|
|
194
172
|
|
|
195
173
|
### No automatic rollback
|
|
196
174
|
|
|
197
|
-
A failed or interrupted `run` can leave file changes on disk and a running phase in `workflow.json`. `Maestro` does not roll back or repair partial changes.
|
|
198
|
-
should inspect the project files and saved reports before restarting.
|
|
175
|
+
A failed or interrupted `run` can leave file changes on disk and a running phase in `workflow.json`. `Maestro` does not roll back or repair partial changes.
|
|
199
176
|
|
|
200
177
|
### Restart an existing spec
|
|
201
178
|
|
|
202
179
|
To revisit an existing `spec`, choose "Restart spec" in `/maestro`. The selected `spec` returns to `drafting-spec` from any saved phase. `Maestro` reads and reviews its
|
|
203
180
|
proposal, `spec`, and optional design with the `owner` before asking for renewed `GREEN FLAG`.
|
|
204
181
|
|
|
205
|
-
Restart preserves the existing files
|
|
206
|
-
|
|
182
|
+
Restart preserves the existing files, saved `owner` decisions retain their normal effect for the same approved documents and restart does not recover an interrupted agent
|
|
183
|
+
or its conversation.
|
package/package.json
CHANGED
package/docs/maestro.png
DELETED
|
Binary file
|