@emiliosp/pi-maestro 0.12.0 → 0.13.1
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 +59 -3
- package/CHANGELOG.md +11 -0
- package/README.md +3 -2
- package/ROADMAP.md +230 -160
- package/docs/workflow.md +3 -2
- package/extensions/maestro.ts +51 -0
- package/package.json +1 -1
- package/src/maestro/instructions/getMaestroInstructions.ts +2 -0
- package/src/maestro/session/MaestroSessionState.ts +15 -0
package/ADR.md
CHANGED
|
@@ -87,13 +87,13 @@ This breaking MVP change has no migrations, compatibility readers, deprecated al
|
|
|
87
87
|
### Evidence
|
|
88
88
|
|
|
89
89
|
[Specification](.specs/20261013-101454-route-builder-failures-through-owner-escalations/spec.md) and
|
|
90
|
-
[
|
|
90
|
+
[MAESTRO-7](https://linear.app/emilio-spatola/issue/MAESTRO-7/route-builder-failures-through-owner-escalations).
|
|
91
91
|
|
|
92
92
|
## ADR-004: Require Git only for the simplifier
|
|
93
93
|
|
|
94
94
|
### Status
|
|
95
95
|
|
|
96
|
-
Accepted. Implemented through
|
|
96
|
+
Accepted. Implemented through MAESTRO-24. Supersedes [ADR-001](#adr-001-keep-the-workflow-independent-of-git).
|
|
97
97
|
|
|
98
98
|
### Context
|
|
99
99
|
|
|
@@ -124,7 +124,7 @@ The `simplifier` uses Git to select all staged, unstaged, and untracked code cha
|
|
|
124
124
|
|
|
125
125
|
### Evidence
|
|
126
126
|
|
|
127
|
-
[
|
|
127
|
+
[MAESTRO-24](https://linear.app/emilio-spatola/issue/MAESTRO-24/add-a-simplifier-with-one-clear-purpose-per-agent) and the
|
|
128
128
|
[specification](.specs/20261016-090319-add-a-dedicated-simplifier-after-verification/spec.md).
|
|
129
129
|
|
|
130
130
|
## ADR-005: Approve a specification document set as one contract
|
|
@@ -163,3 +163,59 @@ approval.
|
|
|
163
163
|
|
|
164
164
|
[Document workflow](docs/workflow.md#specification-documents), [creation](src/specs/create.ts), [approval](src/workflow/spec/markSpecReady.ts), and
|
|
165
165
|
[templates](templates/).
|
|
166
|
+
|
|
167
|
+
## ADR-006: Maintain the roadmap in Linear
|
|
168
|
+
|
|
169
|
+
### Status
|
|
170
|
+
|
|
171
|
+
Superseded by [ADR-007](#adr-007-maintain-the-roadmap-in-the-repository).
|
|
172
|
+
|
|
173
|
+
### Context
|
|
174
|
+
|
|
175
|
+
The `owner` moved roadmap items from the repository to Linear, selected the dedicated `MAESTRO` team, and requested removal of the local roadmap file and redundant
|
|
176
|
+
identifiers. This moves the source of truth for planning outside Git.
|
|
177
|
+
|
|
178
|
+
### Decision
|
|
179
|
+
|
|
180
|
+
Maintain the roadmap only in [Linear](https://linear.app/emilio-spatola/team/MAESTRO/overview), using Linear issue identifiers. Keep the roadmap location and maintenance
|
|
181
|
+
instructions in `AGENTS.md`, without a local copy of the issue list.
|
|
182
|
+
|
|
183
|
+
Approved `specifications`, verification evidence, the changelog, and architectural decisions remain in the repository.
|
|
184
|
+
|
|
185
|
+
### Consequences
|
|
186
|
+
|
|
187
|
+
Reading or updating current roadmap state requires Linear access. Git history remains evidence of earlier plans, not the current roadmap. Imported issues retain
|
|
188
|
+
commit-pinned links to repository evidence. Removing the local roadmap also removes it from the published package.
|
|
189
|
+
|
|
190
|
+
### Evidence
|
|
191
|
+
|
|
192
|
+
[Linear roadmap](https://linear.app/emilio-spatola/team/MAESTRO/overview) and [repository instructions](AGENTS.md).
|
|
193
|
+
|
|
194
|
+
## ADR-007: Maintain the roadmap in the repository
|
|
195
|
+
|
|
196
|
+
### Status
|
|
197
|
+
|
|
198
|
+
Accepted. Supersedes [ADR-006](#adr-006-maintain-the-roadmap-in-linear).
|
|
199
|
+
|
|
200
|
+
### Context
|
|
201
|
+
|
|
202
|
+
The `owner` reported excessive token use when accessing Linear and requested restoration of the Markdown roadmap. The `owner` also explicitly prohibited changes to the
|
|
203
|
+
Linear project.
|
|
204
|
+
|
|
205
|
+
### Decision
|
|
206
|
+
|
|
207
|
+
Maintain the roadmap in `ROADMAP.md` as the source of truth. Restore project items from Linear through read-only access, preserving existing `MAESTRO` identifiers, scope,
|
|
208
|
+
and evidence. Do not transfer Linear onboarding or test issues.
|
|
209
|
+
|
|
210
|
+
Keep Linear unchanged as historical reference. Routine roadmap reading and maintenance use local files, not MCP.
|
|
211
|
+
|
|
212
|
+
### Consequences
|
|
213
|
+
|
|
214
|
+
Planning no longer requires Linear access. Repository instructions, documentation audit guidance, links, and published package contents refer to the local roadmap. Later
|
|
215
|
+
roadmap changes do not need synchronization with Linear.
|
|
216
|
+
|
|
217
|
+
Conflicting imported status and acceptance evidence remain explicit rather than being treated as proof of final `owner` acceptance.
|
|
218
|
+
|
|
219
|
+
### Evidence
|
|
220
|
+
|
|
221
|
+
[Roadmap](ROADMAP.md) and [repository instructions](AGENTS.md).
|
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,17 @@
|
|
|
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.13.1
|
|
7
|
+
|
|
8
|
+
1. Restored `ROADMAP.md` as the planning source of truth from the current Linear issues, retaining their identifiers and recorded evidence. Updated repository guidance,
|
|
9
|
+
documentation links, and package contents so roadmap maintenance no longer requires Linear. Linear data remains unchanged.
|
|
10
|
+
|
|
11
|
+
## 0.13.0
|
|
12
|
+
|
|
13
|
+
1. Automatically turn off `Maestro` after successfully delivering the final summary of a completed workflow, including when Git is unavailable and simplification is
|
|
14
|
+
skipped. Clear live tools, status, instructions, and active `spec` selection while preserving saved workflow files and other extensions. See
|
|
15
|
+
[MAESTRO-26](https://linear.app/emilio-spatola/issue/MAESTRO-26).
|
|
16
|
+
|
|
6
17
|
## 0.12.0
|
|
7
18
|
|
|
8
19
|
1. Added stable `REQ` identifiers and a `Verified by` field to the `spec` template and `Maestro` guidance. Each requirement links to its `acceptance criteria` or exact
|
package/README.md
CHANGED
|
@@ -129,7 +129,8 @@ After successful verification or rejection of all `findings`, `Maestro` starts t
|
|
|
129
129
|
`Maestro` warns and skips simplification. The `simplifier` selects all uncommitted code changes, including pre-existing staged, unstaged, and untracked files.
|
|
130
130
|
|
|
131
131
|
The workflow ends at `candidate-ready`. Rejected `findings` retain their reasons and accepted failures can remain. Maestro's summary separates independent verification
|
|
132
|
-
from the later simplifier's report. The `owner` controls later review, commits, pull
|
|
132
|
+
from the later simplifier's report. After the final summary finishes successfully, `Maestro` automatically turns off. The `owner` controls later review, commits, pull
|
|
133
|
+
requests, and merging.
|
|
133
134
|
|
|
134
135
|
The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state. Saved
|
|
135
136
|
files do not automatically restore or resume an incomplete workflow. The `owner` handles it manually.
|
|
@@ -152,6 +153,6 @@ The reading order is:
|
|
|
152
153
|
|
|
153
154
|
1. [Mission](MISSION.md): purpose, scope, and `owner` responsibilities.
|
|
154
155
|
2. [Tech stack](TECH_STACK.md): runtime technologies and development tools.
|
|
155
|
-
3. [Roadmap](ROADMAP.md): completed outcomes and planned
|
|
156
|
+
3. [Roadmap](ROADMAP.md): completed outcomes and planned work maintained in the repository.
|
|
156
157
|
4. [Changelog](CHANGELOG.md): meaningful codebase changes and breaking changes.
|
|
157
158
|
5. [Architecture decision records](ADR.md): architectural choices, context, consequences, and evidence.
|
package/ROADMAP.md
CHANGED
|
@@ -1,61 +1,119 @@
|
|
|
1
1
|
# Roadmap
|
|
2
2
|
|
|
3
|
-
This
|
|
4
|
-
requirements, technical decisions, and `acceptance criteria` belong in that `specification`.
|
|
5
|
-
|
|
6
|
-
"Now" is the current priority. "Next" follows it. "Later" contains uncommitted ideas with no promised order or date.
|
|
7
|
-
|
|
8
|
-
Item identifiers remain stable when priorities change. The `owner` approves changes to priorities and scope.
|
|
9
|
-
|
|
10
|
-
## Overview
|
|
11
|
-
|
|
12
|
-
| ID | Title | Status | Summary |
|
|
13
|
-
| ---- | ---------------------------------------------------------------------------------------------------------------------------- | ----------- | ------------------------------------------------------------------------------------------------------------------ |
|
|
14
|
-
| R-01 | [Improve status presentation and activation feedback](#r-01-improve-status-presentation-and-activation-feedback) | Completed | Show clearer status and configured agent details without adding model context. |
|
|
15
|
-
| R-02 | [Store escalations and owner decisions in builder handoffs](#r-02-store-escalations-and-owner-decisions-in-builder-handoffs) | Completed | Keep `escalation` questions and `owner` answers together in numbered `builder` `handoffs`. |
|
|
16
|
-
| R-03 | [Route builder failures through owner escalations](#r-03-route-builder-failures-through-owner-escalations) | Completed | Route reportable `builder` problems through `owner` `escalations` instead of a terminal failure phase. |
|
|
17
|
-
| R-12 | [Format glossary terms consistently](#r-12-format-glossary-terms-consistently) | Completed | Apply glossary formatting across documentation and record its exclusions. |
|
|
18
|
-
| R-14 | [Introduce Maestro at activation](#r-14-introduce-maestro-at-activation) | Completed | Introduce `Maestro` at activation and load relevant documentation only when needed. |
|
|
19
|
-
| R-15 | [Rename the test support directory](#r-15-rename-the-test-support-directory) | Completed | Rename `test/` to `tests/` and update affected references. |
|
|
20
|
-
| R-16 | [Verify code quality against AGENTS.md instructions](#r-16-verify-code-quality-against-agentsmd-instructions) | Completed | Require the `verifier` to review affected code against applicable `AGENTS.md` code-quality directives. |
|
|
21
|
-
| R-06 | [Check subagent extensions at activation](#r-06-check-subagent-extensions-at-activation) | Completed | Require a successful parent `pi-subagents` availability reply before activation. |
|
|
22
|
-
| R-05 | [Keep acceptance criterion numbering continuous](#r-05-keep-acceptance-criterion-numbering-continuous) | Completed | Reject gaps in `acceptance criterion` numbering before approving a `spec`. |
|
|
23
|
-
| R-10 | [Match handoff criteria to the approved spec](#r-10-match-handoff-criteria-to-the-approved-spec) | Completed | Require every approved `spec` criterion ID in each submitted `builder` and `verifier` `handoff`. |
|
|
24
|
-
| R-17 | [Record escalation resolutions when the spec changes](#r-17-record-escalation-resolutions-when-the-spec-changes) | Completed | Save all current `escalation` answers before changing phase, including when the `spec` requires revision. |
|
|
25
|
-
| R-20 | [Route finding-driven spec revisions through drafting-spec](#r-20-route-finding-driven-spec-revisions-through-drafting-spec) | Completed | Record `finding` decisions before `spec` revision and require renewed `GREEN FLAG` before another `builder` `run`. |
|
|
26
|
-
| R-18 | [Label acceptance criterion coverage](#r-18-label-acceptance-criterion-coverage) | Completed | Label each `acceptance criterion` as success, failure, or unchanged behavior. |
|
|
27
|
-
| R-19 | [Avoid acceptance criteria already covered by tests](#r-19-avoid-acceptance-criteria-already-covered-by-tests) | Completed | Omit `acceptance criteria` whose exact scenarios already have test coverage. |
|
|
28
|
-
| R-04 | [Rename the npm package](#r-04-rename-the-npm-package) | Later | Rename `@emiliosp/pi-maestro` to `pi-maestro-sdd` with compatibility decisions defined in the `spec`. |
|
|
29
|
-
| R-07 | [Guide initial configuration](#r-07-guide-initial-configuration) | Later | Help the `owner` create valid `Maestro` configuration through an interview. |
|
|
30
|
-
| R-08 | [Change agent models before a builder run](#r-08-change-agent-models-before-a-builder-run) | Later | Let the `owner` change `builder` and `verifier` models before subsequent `runs`. |
|
|
31
|
-
| R-09 | [Define workflow reconciliation](#r-09-define-workflow-reconciliation) | Later | Define how `Maestro` can reconcile saved `artifacts` and workflow state. |
|
|
32
|
-
| R-21 | [Add a simplifier with one clear purpose per agent](#r-21-add-a-simplifier-with-one-clear-purpose-per-agent) | Implemented | Run the `simplifier` after accepted verification, with a Git-only file scope and separate report. |
|
|
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
|
+
its `specification` before implementation starts. Detailed requirements, technical decisions, and `acceptance criteria` belong in that `specification`.
|
|
33
5
|
|
|
34
|
-
|
|
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
|
+
Backlog items have no agreed order or date. The `owner` approves priority and scope changes.
|
|
35
8
|
|
|
36
|
-
|
|
9
|
+
Completed entries preserve recorded outcomes and evidence, which may describe behavior later changed. Completion requires `owner` acceptance, not only passing checks or
|
|
10
|
+
reaching `candidate-ready`. Linear onboarding and test issues are not project roadmap items and are omitted.
|
|
37
11
|
|
|
38
|
-
|
|
39
|
-
notice to session history or model context. All 12 `acceptance criteria` passed with no `verifier` `findings`. The saved workflow reached `candidate-ready`.
|
|
12
|
+
## Backlog
|
|
40
13
|
|
|
41
|
-
|
|
14
|
+
### MAESTRO-6: Display specs in a browser
|
|
42
15
|
|
|
43
|
-
|
|
44
|
-
[verifier report](.specs/20261007-170438-update-maestro-status-bar-with-agent-models-theme-colors-and-phase-icons/handoffs/verifier/V1.json), and
|
|
45
|
-
[merged PR #26](https://github.com/emilioSp/pi-maestro/pull/26).
|
|
16
|
+
#### Objective
|
|
46
17
|
|
|
47
|
-
|
|
18
|
+
Display the `spec` documents in a browser to improve readability and help the `owner` understand the proposed change, requirements, and `acceptance criteria`.
|
|
48
19
|
|
|
49
|
-
|
|
50
|
-
|
|
20
|
+
#### Completed when
|
|
21
|
+
|
|
22
|
+
The `owner` can read the `spec` documents in a browser with formatting designed for human comprehension.
|
|
23
|
+
|
|
24
|
+
### MAESTRO-19: Guide initial configuration
|
|
25
|
+
|
|
26
|
+
#### Objective
|
|
27
|
+
|
|
28
|
+
Help the `owner` create `Maestro` configuration through an interview. `Maestro` asks questions and writes the agreed configuration.
|
|
29
|
+
|
|
30
|
+
#### Completed when
|
|
31
|
+
|
|
32
|
+
The `owner` can create a valid project configuration without writing the file manually.
|
|
33
|
+
|
|
34
|
+
### MAESTRO-20: Rename the npm package
|
|
35
|
+
|
|
36
|
+
#### Objective
|
|
37
|
+
|
|
38
|
+
Rename `@emiliosp/pi-maestro` to `pi-maestro-sdd`. The `owner` installs the package under the new name. This item changes the package identity, not the development
|
|
39
|
+
workflow.
|
|
40
|
+
|
|
41
|
+
Compatibility with installations under the old name must be decided in the `specification`. No `specification` is approved yet.
|
|
42
|
+
|
|
43
|
+
#### Completed when
|
|
44
|
+
|
|
45
|
+
Package metadata and installation documentation use the new name. The package is available under that name.
|
|
46
|
+
|
|
47
|
+
### MAESTRO-23: Change agent models before a builder run
|
|
48
|
+
|
|
49
|
+
#### Objective
|
|
50
|
+
|
|
51
|
+
Let the `owner` change the `builder` and `verifier` models during `spec` preparation and the `ready-for-builder` phase. The selected models apply to subsequent `runs`.
|
|
52
|
+
|
|
53
|
+
#### Completed when
|
|
54
|
+
|
|
55
|
+
The `owner` can select available models in those phases. `Maestro` uses the selections.
|
|
56
|
+
|
|
57
|
+
### MAESTRO-25: Define workflow reconciliation
|
|
58
|
+
|
|
59
|
+
#### Objective
|
|
60
|
+
|
|
61
|
+
Explore how `Maestro` can reconcile saved `artifacts` and workflow state. The recovery scope is not yet defined.
|
|
62
|
+
|
|
63
|
+
#### Completed when
|
|
64
|
+
|
|
65
|
+
Not yet defined. The `owner` must define the intended outcome, recovery boundaries, and completion condition before this item can move forward.
|
|
66
|
+
|
|
67
|
+
### MAESTRO-27: Make verifier and simplifier phases optional
|
|
68
|
+
|
|
69
|
+
#### Objective
|
|
70
|
+
|
|
71
|
+
Make the `builder` the only required agent phase. Let the `owner` independently enable or disable the `verifier` and `simplifier` phases.
|
|
72
|
+
|
|
73
|
+
This request concerns agent execution phases, not removal of `spec` preparation or approval.
|
|
74
|
+
|
|
75
|
+
#### Completed when
|
|
76
|
+
|
|
77
|
+
1. The `builder` remains mandatory.
|
|
78
|
+
2. The `owner` can select any of these combinations: `builder` only; `builder` and `verifier`; `builder` and `simplifier`; or all three.
|
|
79
|
+
3. Disabled phases are not delegated and do not block workflow completion.
|
|
80
|
+
4. The workflow reaches `candidate-ready` after the selected phases complete and any required `owner` decisions are resolved.
|
|
81
|
+
5. The final summary clearly identifies skipped phases and does not describe skipped verification as passed.
|
|
82
|
+
|
|
83
|
+
#### Decisions to define in the spec
|
|
84
|
+
|
|
85
|
+
1. Where and when phase selection is configured.
|
|
86
|
+
2. Default selections.
|
|
87
|
+
3. Whether selections can change after a workflow starts.
|
|
88
|
+
|
|
89
|
+
#### Context
|
|
90
|
+
|
|
91
|
+
[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 issue adds independent optionality for both post-`builder` agent phases.
|
|
93
|
+
|
|
94
|
+
## Implemented, acceptance not confirmed
|
|
95
|
+
|
|
96
|
+
### MAESTRO-26: Exit Maestro mode automatically at workflow completion
|
|
97
|
+
|
|
98
|
+
Implemented in `0.13.0`. `Maestro` automatically turns off after successfully delivering the final summary of a completed workflow, including when Git is unavailable and
|
|
99
|
+
simplification is skipped. Live tools, status, instructions, and active `spec` selection are cleared; saved workflow files and other extensions remain unchanged.
|
|
100
|
+
Intermediate phases and interrupted workflows do not trigger automatic exit.
|
|
101
|
+
|
|
102
|
+
Linear marks this item Done, but its description still says final `owner` acceptance is pending. Acceptance is not inferred from that status or the release.
|
|
51
103
|
|
|
52
104
|
#### Evidence
|
|
53
105
|
|
|
54
|
-
[
|
|
55
|
-
[
|
|
56
|
-
[
|
|
106
|
+
[Changelog](CHANGELOG.md#0130), [merged PR #43](https://github.com/emilioSp/pi-maestro/pull/43),
|
|
107
|
+
[specification](.specs/20261030-145712-automatically-exit-maestro-mode-at-workflow-completion/spec.md), and
|
|
108
|
+
[original issue](https://linear.app/emilio-spatola/issue/MAESTRO-26/feat-exit-maestro-mode-automatically-at-workflow-completion).
|
|
109
|
+
|
|
110
|
+
## Completed
|
|
111
|
+
|
|
112
|
+
These entries were recorded as Done in Linear. Their historical verification evidence does not independently establish final `owner` acceptance.
|
|
113
|
+
|
|
114
|
+
### MAESTRO-7: Route builder failures through owner escalations
|
|
57
115
|
|
|
58
|
-
|
|
116
|
+
Route reportable `builder` problems through `owner` `escalations` instead of a terminal failure phase.
|
|
59
117
|
|
|
60
118
|
Released in `0.9.0`. The `builder` reports only `done` or `escalation`. Reportable technical problems use the existing `owner` `escalation` process. Individual `probe`
|
|
61
119
|
results retain `failed`. Execution errors and missing or invalid saved results still stop the workflow without automatic recovery.
|
|
@@ -64,20 +122,51 @@ All 8 `acceptance criteria` passed with no `verifier` `findings`. The saved work
|
|
|
64
122
|
|
|
65
123
|
#### Evidence
|
|
66
124
|
|
|
67
|
-
[Specification](.specs/20261013-101454-route-builder-failures-through-owner-escalations/spec.md),
|
|
68
|
-
[verifier report](.specs/20261013-101454-route-builder-failures-through-owner-escalations/handoffs/verifier/V1.json),
|
|
69
|
-
[merged PR #32](https://github.com/emilioSp/pi-maestro/pull/32).
|
|
125
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-101454-route-builder-failures-through-owner-escalations/spec.md),
|
|
126
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-101454-route-builder-failures-through-owner-escalations/handoffs/verifier/V1.json),
|
|
127
|
+
and [merged PR #32](https://github.com/emilioSp/pi-maestro/pull/32).
|
|
70
128
|
|
|
71
|
-
###
|
|
129
|
+
### MAESTRO-8: Store escalations and owner decisions in builder handoffs
|
|
130
|
+
|
|
131
|
+
Keep `escalation` questions and `owner` answers together in numbered `builder` `handoffs`.
|
|
132
|
+
|
|
133
|
+
Numbered `builder` `handoffs` contain multiple `escalation` questions and their `owner` resolutions. The `owner` resolves all current questions in one batch. Earlier
|
|
134
|
+
`handoffs` remain available as history. All 10 `acceptance criteria` passed with no `verifier` `findings`. The saved workflow reached `candidate-ready`.
|
|
135
|
+
|
|
136
|
+
#### Evidence
|
|
137
|
+
|
|
138
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261008-132344-store-escalations-in-builder-handoffs/spec.md),
|
|
139
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261008-132344-store-escalations-in-builder-handoffs/handoffs/verifier/V1.json),
|
|
140
|
+
and [merged PR #27](https://github.com/emilioSp/pi-maestro/pull/27).
|
|
141
|
+
|
|
142
|
+
### MAESTRO-9: Format glossary terms consistently
|
|
143
|
+
|
|
144
|
+
Apply glossary formatting across documentation and record its exclusions.
|
|
72
145
|
|
|
73
146
|
Applied glossary formatting across the documentation and recorded its exclusions in `AGENTS.md` and the documentation audit skill. The approved change document uses the
|
|
74
147
|
term `spec`. The `owner` confirmed completion.
|
|
75
148
|
|
|
76
149
|
#### Evidence
|
|
77
150
|
|
|
78
|
-
[Glossary](docs/glossary.md) and
|
|
151
|
+
[Glossary](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/docs/glossary.md) and
|
|
152
|
+
[workflow documentation](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/docs/workflow.md).
|
|
153
|
+
|
|
154
|
+
### MAESTRO-10: Improve status presentation and activation feedback
|
|
155
|
+
|
|
156
|
+
Show clearer status and configured agent details without adding model context.
|
|
157
|
+
|
|
158
|
+
The status bar uses phase icons, theme colors, and shortened `spec` IDs. Successful activation shows the configured `builder` and `verifier` settings without adding the
|
|
159
|
+
notice to session history or model context. All 12 `acceptance criteria` passed with no `verifier` `findings`. The saved workflow reached `candidate-ready`.
|
|
160
|
+
|
|
161
|
+
#### Evidence
|
|
162
|
+
|
|
163
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261007-170438-update-maestro-status-bar-with-agent-models-theme-colors-and-phase-icons/spec.md),
|
|
164
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261007-170438-update-maestro-status-bar-with-agent-models-theme-colors-and-phase-icons/handoffs/verifier/V1.json),
|
|
165
|
+
and [merged PR #26](https://github.com/emilioSp/pi-maestro/pull/26).
|
|
79
166
|
|
|
80
|
-
###
|
|
167
|
+
### MAESTRO-11: Introduce Maestro at activation
|
|
168
|
+
|
|
169
|
+
Introduce `Maestro` at activation and load relevant documentation only when needed.
|
|
81
170
|
|
|
82
171
|
Implemented in `0.9.1`. Successful activation introduces `Maestro` and invites the `owner` to ask how it works. The UI-only notice retains the configured agent details
|
|
83
172
|
and does not add session history or start a model request.
|
|
@@ -89,19 +178,15 @@ All 6 `acceptance criteria` passed with no `verifier` `findings`. The saved work
|
|
|
89
178
|
|
|
90
179
|
#### Evidence
|
|
91
180
|
|
|
92
|
-
[Specification](.specs/20261013-171954-introduce-maestro-at-activation/spec.md),
|
|
93
|
-
[verifier report](.specs/20261013-171954-introduce-maestro-at-activation/handoffs/verifier/V1.json),
|
|
94
|
-
|
|
95
|
-
### R-15: Rename the test support directory
|
|
96
|
-
|
|
97
|
-
Renamed `test/` to `tests/` at the owner's request. Updated imports, fixture paths, lint configuration, and project instructions. This follows the global instruction to
|
|
98
|
-
keep fixtures under `tests/fixtures`. Source tests remain next to their source files. Historical `handoffs` retain their recorded paths.
|
|
181
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-171954-introduce-maestro-at-activation/spec.md),
|
|
182
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-171954-introduce-maestro-at-activation/handoffs/verifier/V1.json),
|
|
183
|
+
and [merged PR #33](https://github.com/emilioSp/pi-maestro/pull/33).
|
|
99
184
|
|
|
100
|
-
|
|
185
|
+
### MAESTRO-12: Verify code quality against AGENTS.md instructions
|
|
101
186
|
|
|
102
|
-
|
|
187
|
+
Historical outcome: the extra review described below was removed by [MAESTRO-24](#maestro-24-add-a-simplifier-with-one-clear-purpose-per-agent) in `0.11.0`.
|
|
103
188
|
|
|
104
|
-
|
|
189
|
+
Require the `verifier` to review affected code against applicable `AGENTS.md` code-quality directives.
|
|
105
190
|
|
|
106
191
|
Implemented in `0.9.2`. `Verifier` guidance now requires code-quality review only for code affected by the approved change when applicable `AGENTS.md` directives exist.
|
|
107
192
|
All existing duties remain unchanged, including independent verification of every `acceptance criterion`.
|
|
@@ -114,11 +199,13 @@ saved workflow reached `candidate-ready`.
|
|
|
114
199
|
|
|
115
200
|
#### Evidence
|
|
116
201
|
|
|
117
|
-
[Specification](.specs/20261013-185941-verify-code-quality-against-agents-md-instructions/spec.md),
|
|
118
|
-
[verifier report](.specs/20261013-185941-verify-code-quality-against-agents-md-instructions/handoffs/verifier/V1.json),
|
|
119
|
-
[merged PR #34](https://github.com/emilioSp/pi-maestro/pull/34).
|
|
202
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-185941-verify-code-quality-against-agents-md-instructions/spec.md),
|
|
203
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-185941-verify-code-quality-against-agents-md-instructions/handoffs/verifier/V1.json),
|
|
204
|
+
and [merged PR #34](https://github.com/emilioSp/pi-maestro/pull/34).
|
|
205
|
+
|
|
206
|
+
### MAESTRO-13: Check subagent extensions at activation
|
|
120
207
|
|
|
121
|
-
|
|
208
|
+
Require a successful parent `pi-subagents` availability reply before activation.
|
|
122
209
|
|
|
123
210
|
Implemented in `0.9.3`. Activation requires a matching successful version 1 `ping` reply from the parent `pi-subagents` extension within 2000 ms. A failed or invalid
|
|
124
211
|
reply, emission error, or timeout prevents activation and reports the installation requirement. The check starts no agent and makes no model request. It confirms parent
|
|
@@ -131,27 +218,26 @@ verification.
|
|
|
131
218
|
|
|
132
219
|
#### Evidence
|
|
133
220
|
|
|
134
|
-
[Specification](.specs/20261013-194407-check-pi-subagents-availability-with-ping-at-activation/spec.md),
|
|
135
|
-
[verifier report](.specs/20261013-194407-check-pi-subagents-availability-with-ping-at-activation/handoffs/verifier/V1.json),
|
|
136
|
-
[merged PR #35](https://github.com/emilioSp/pi-maestro/pull/35).
|
|
137
|
-
|
|
138
|
-
### R-05: Keep acceptance criterion numbering continuous
|
|
221
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-194407-check-pi-subagents-availability-with-ping-at-activation/spec.md),
|
|
222
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-194407-check-pi-subagents-availability-with-ping-at-activation/handoffs/verifier/V1.json),
|
|
223
|
+
and [merged PR #35](https://github.com/emilioSp/pi-maestro/pull/35).
|
|
139
224
|
|
|
140
|
-
|
|
141
|
-
files unchanged.
|
|
225
|
+
### MAESTRO-14: Rename the test support directory
|
|
142
226
|
|
|
143
|
-
`
|
|
144
|
-
approval is required.
|
|
227
|
+
Rename `test/` to `tests/` and update affected references.
|
|
145
228
|
|
|
146
|
-
|
|
229
|
+
Renamed `test/` to `tests/` at the owner's request. Updated imports, fixture paths, lint configuration, and project instructions. This follows the global instruction to
|
|
230
|
+
keep fixtures under `tests/fixtures`. Source tests remain next to their source files. Historical `handoffs` retain their recorded paths.
|
|
147
231
|
|
|
148
232
|
#### Evidence
|
|
149
233
|
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
234
|
+
[Test support](https://github.com/emilioSp/pi-maestro/tree/839ab9eb9753df22804d750657a616a9959c2c47/tests/support/),
|
|
235
|
+
[fixtures](https://github.com/emilioSp/pi-maestro/tree/839ab9eb9753df22804d750657a616a9959c2c47/tests/fixtures/), and
|
|
236
|
+
[lint configuration](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.oxlintrc.json).
|
|
237
|
+
|
|
238
|
+
### MAESTRO-15: Match handoff criteria to the approved spec
|
|
153
239
|
|
|
154
|
-
|
|
240
|
+
Require every approved `spec` criterion ID in each submitted `builder` and `verifier` `handoff`.
|
|
155
241
|
|
|
156
242
|
Implemented in `0.9.5` with the narrower scope approved by the `owner`. Both `handoff` submissions require every `acceptance criterion` ID from the approved `spec` before
|
|
157
243
|
saving a report or changing phase. Extra report IDs remain allowed. Existing report validation is unchanged, and no new check rejects duplicate `spec` IDs.
|
|
@@ -163,11 +249,47 @@ role. These changes are outside the completed independent verification. The fina
|
|
|
163
249
|
|
|
164
250
|
#### Evidence
|
|
165
251
|
|
|
166
|
-
[Specification](.specs/20261013-211629-match-handoff-criteria-to-the-approved-spec/spec.md),
|
|
167
|
-
[verifier report](.specs/20261013-211629-match-handoff-criteria-to-the-approved-spec/handoffs/verifier/V1.json),
|
|
168
|
-
[merged PR #37](https://github.com/emilioSp/pi-maestro/pull/37).
|
|
252
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-211629-match-handoff-criteria-to-the-approved-spec/spec.md),
|
|
253
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-211629-match-handoff-criteria-to-the-approved-spec/handoffs/verifier/V1.json),
|
|
254
|
+
and [merged PR #37](https://github.com/emilioSp/pi-maestro/pull/37).
|
|
255
|
+
|
|
256
|
+
### MAESTRO-16: Route finding-driven spec revisions through drafting-spec
|
|
257
|
+
|
|
258
|
+
Record `finding` decisions before `spec` revision and require renewed `GREEN FLAG` before another `builder` `run`.
|
|
259
|
+
|
|
260
|
+
Implemented the approved revision route. `Maestro` records every current `finding` decision before returning to `drafting-spec` when revision is required. The `owner`
|
|
261
|
+
reviews the same revised `spec` and gives renewed `GREEN FLAG` before separate approval and another `builder` `run`. Revision takes priority in mixed batches. Direct
|
|
262
|
+
approval from `finding-decisions` is rejected.
|
|
263
|
+
|
|
264
|
+
Later event naming cleanup identifies `builder` and `owner` actions explicitly. Both revision routes use `OWNER_REQUEST_SPEC_REVISION` without changing the phase flow.
|
|
265
|
+
Batch resolution uses `RESOLVE_ESCALATIONS`, and the status label refers to `escalations` in the plural. The saved decision phases are named `escalation-decisions` and
|
|
266
|
+
`finding-decisions`.
|
|
267
|
+
|
|
268
|
+
#### Evidence
|
|
169
269
|
|
|
170
|
-
|
|
270
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261015-154812-route-finding-driven-spec-revisions-through-drafting-spec/spec.md)
|
|
271
|
+
and
|
|
272
|
+
[resolution integration tests](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/src/tools/main/resolve-findings.integration.test.ts).
|
|
273
|
+
|
|
274
|
+
### MAESTRO-17: Keep acceptance criterion numbering continuous
|
|
275
|
+
|
|
276
|
+
Reject gaps in `acceptance criterion` numbering before approving a `spec`.
|
|
277
|
+
|
|
278
|
+
Implemented in `0.9.4`. `Spec` approval rejects numbered `acceptance criterion` headings that do not start at `AC1` and continue without gaps. Rejection leaves saved
|
|
279
|
+
files unchanged.
|
|
280
|
+
|
|
281
|
+
`Maestro` corrects numbering and affected references without changing criterion order or requirements, then retries with the existing `GREEN FLAG`. No additional `owner`
|
|
282
|
+
approval is required.
|
|
283
|
+
|
|
284
|
+
All 3 `acceptance criteria` passed with no `verifier` `findings`. The saved workflow reached `candidate-ready`.
|
|
285
|
+
|
|
286
|
+
#### Evidence
|
|
287
|
+
|
|
288
|
+
[Specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-202811-check-acceptance-criterion-numbering-before-builder-execution/spec.md),
|
|
289
|
+
[verifier report](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261013-202811-check-acceptance-criterion-numbering-before-builder-execution/handoffs/verifier/V1.json),
|
|
290
|
+
and [merged PR #36](https://github.com/emilioSp/pi-maestro/pull/36).
|
|
291
|
+
|
|
292
|
+
### MAESTRO-18: Record escalation resolutions when the spec changes
|
|
171
293
|
|
|
172
294
|
#### Objective
|
|
173
295
|
|
|
@@ -198,24 +320,14 @@ Saved `resolutions`, workflow phases, tool results, agent instructions, and huma
|
|
|
198
320
|
use of the central transition definitions for each resolution branch. Passing behavior tests alone is not enough. The new `spec` includes coverage labels and omits
|
|
199
321
|
`acceptance criteria` already covered by tests of the same scenario.
|
|
200
322
|
|
|
201
|
-
###
|
|
202
|
-
|
|
203
|
-
Implemented the approved revision route. `Maestro` records every current `finding` decision before returning to `drafting-spec` when revision is required. The `owner`
|
|
204
|
-
reviews the same revised `spec` and gives renewed `GREEN FLAG` before separate approval and another `builder` `run`. Revision takes priority in mixed batches. Direct
|
|
205
|
-
approval from `finding-decisions` is rejected.
|
|
206
|
-
|
|
207
|
-
Later event naming cleanup identifies `builder` and `owner` actions explicitly. Both revision routes use `OWNER_REQUEST_SPEC_REVISION` without changing the phase flow.
|
|
208
|
-
Batch resolution uses `RESOLVE_ESCALATIONS`, and the status label refers to `escalations` in the plural. The saved decision phases are named `escalation-decisions` and
|
|
209
|
-
`finding-decisions`.
|
|
210
|
-
|
|
211
|
-
#### Evidence
|
|
323
|
+
### MAESTRO-21: Label acceptance criterion coverage
|
|
212
324
|
|
|
213
|
-
[
|
|
214
|
-
[resolution integration tests](src/tools/main/resolve-findings.integration.test.ts).
|
|
325
|
+
Historical outcome: the `Coverage` field described below was removed in `0.12.0`. See [changelog](CHANGELOG.md#0120).
|
|
215
326
|
|
|
216
|
-
|
|
327
|
+
Label each `acceptance criterion` as success, failure, or unchanged behavior.
|
|
217
328
|
|
|
218
|
-
Implemented with
|
|
329
|
+
Implemented with [MAESTRO-22](#maestro-22-avoid-acceptance-criteria-already-covered-by-tests) as one task, as selected by the `owner`. The `spec` template and `Maestro`
|
|
330
|
+
guidance require one `Coverage` label per `acceptance criterion`:
|
|
219
331
|
|
|
220
332
|
| Label | Purpose |
|
|
221
333
|
| ----------- | -------------------------------------------- |
|
|
@@ -232,13 +344,18 @@ thresholds. No model trials were performed.
|
|
|
232
344
|
|
|
233
345
|
#### Evidence
|
|
234
346
|
|
|
235
|
-
[Spec template](
|
|
236
|
-
[
|
|
347
|
+
[Spec template](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/templates/spec.md),
|
|
348
|
+
[Maestro guidance](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/src/maestro/instructions/getMaestroInstructions.ts),
|
|
349
|
+
[creation integration test](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/src/specs/create.integration.test.ts), and
|
|
350
|
+
[workflow documentation](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/docs/workflow.md#acceptance-criteria).
|
|
351
|
+
|
|
352
|
+
### MAESTRO-22: Avoid acceptance criteria already covered by tests
|
|
237
353
|
|
|
238
|
-
|
|
354
|
+
Omit `acceptance criteria` whose exact scenarios already have test coverage.
|
|
239
355
|
|
|
240
|
-
Implemented with
|
|
241
|
-
action, and `expected result`. Partial or uncertain coverage does not justify omission. Similar tests do
|
|
356
|
+
Implemented with [MAESTRO-21](#maestro-21-label-acceptance-criterion-coverage). `Maestro` inspects existing tests before writing `acceptance criteria`. It omits a
|
|
357
|
+
criterion only when a test covers the same starting conditions, action, and `expected result`. Partial or uncertain coverage does not justify omission. Similar tests do
|
|
358
|
+
not count.
|
|
242
359
|
|
|
243
360
|
During `spec` review, `Maestro` removes criteria whose exact scenarios already have test coverage. It keeps numbering continuous from `AC1` and updates affected
|
|
244
361
|
references. Required behavior remains documented in the requirements and constraints. The same rules apply during `spec` revisions. No automatic approval check was added.
|
|
@@ -247,16 +364,19 @@ Verification consisted of inspecting the written guidance and running `npm run c
|
|
|
247
364
|
|
|
248
365
|
#### Evidence
|
|
249
366
|
|
|
250
|
-
[Maestro guidance](src/maestro/instructions/getMaestroInstructions.ts),
|
|
251
|
-
[
|
|
367
|
+
[Maestro guidance](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/src/maestro/instructions/getMaestroInstructions.ts),
|
|
368
|
+
[spec template](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/templates/spec.md), and
|
|
369
|
+
[workflow documentation](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/docs/workflow.md#acceptance-criteria).
|
|
252
370
|
|
|
253
|
-
|
|
371
|
+
### MAESTRO-24: Add a simplifier with one clear purpose per agent
|
|
254
372
|
|
|
255
|
-
|
|
373
|
+
Run the `simplifier` after accepted verification, with a Git-only file scope and separate report.
|
|
256
374
|
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
375
|
+
Completed under the
|
|
376
|
+
[specification](https://github.com/emilioSp/pi-maestro/blob/839ab9eb9753df22804d750657a616a9959c2c47/.specs/20261016-090319-add-a-dedicated-simplifier-after-verification/spec.md).
|
|
377
|
+
The `owner` confirmed completion. The `builder` implements the approved `spec`. The `verifier` checks its `acceptance criteria`. The `simplifier` refactors accepted code
|
|
378
|
+
for clarity. The extra code-quality review introduced in [MAESTRO-12](#maestro-12-verify-code-quality-against-agentsmd-instructions) is removed from the verifier's
|
|
379
|
+
instructions.
|
|
260
380
|
|
|
261
381
|
Successful verification and rejection of all current `findings` save `simplifier-running`. `Maestro` calls `maestro_run_simplifier` without another approval or
|
|
262
382
|
verification cycle. Only that tool checks Git readiness. If Git is unavailable, it warns and saves `candidate-ready` without delegation or a `simplifier` `handoff`.
|
|
@@ -267,53 +387,3 @@ automatic commits are excluded.
|
|
|
267
387
|
|
|
268
388
|
A completed `pass` saves the fixed, unnumbered `handoffs/simplifier/S.json`, then saves `candidate-ready`. The report contains refactored files, a summary, and notes. No
|
|
269
389
|
refactoring is required when selected code is already clear. Maestro's final summary separates this report from independent `verifier` evidence.
|
|
270
|
-
|
|
271
|
-
## Next
|
|
272
|
-
|
|
273
|
-
## Later
|
|
274
|
-
|
|
275
|
-
These items need scope review before `specification` approval. Existing behavior must be checked before adding new code. Dependencies between these items are not yet
|
|
276
|
-
agreed.
|
|
277
|
-
|
|
278
|
-
### R-04: Rename the npm package
|
|
279
|
-
|
|
280
|
-
#### Objective
|
|
281
|
-
|
|
282
|
-
Rename `@emiliosp/pi-maestro` to `pi-maestro-sdd`. The `owner` installs the package under the new name. This item changes the package identity, not the development
|
|
283
|
-
workflow.
|
|
284
|
-
|
|
285
|
-
Compatibility with installations under the old name must be decided in the `specification`. No `specification` is approved yet.
|
|
286
|
-
|
|
287
|
-
#### Completed when
|
|
288
|
-
|
|
289
|
-
Package metadata and installation documentation use the new name. The package is available under that name.
|
|
290
|
-
|
|
291
|
-
### R-07: Guide initial configuration
|
|
292
|
-
|
|
293
|
-
#### Objective
|
|
294
|
-
|
|
295
|
-
Help the `owner` create `Maestro` configuration through an interview. `Maestro` asks questions and writes the agreed configuration.
|
|
296
|
-
|
|
297
|
-
#### Completed when
|
|
298
|
-
|
|
299
|
-
The `owner` can create a valid project configuration without writing the file manually.
|
|
300
|
-
|
|
301
|
-
### R-08: Change agent models before a builder run
|
|
302
|
-
|
|
303
|
-
#### Objective
|
|
304
|
-
|
|
305
|
-
Let the `owner` change the `builder` and `verifier` models during `spec` preparation and the `ready-for-builder` phase. The selected models apply to subsequent `runs`.
|
|
306
|
-
|
|
307
|
-
#### Completed when
|
|
308
|
-
|
|
309
|
-
The `owner` can select available models in those phases. `Maestro` uses the selections.
|
|
310
|
-
|
|
311
|
-
### R-09: Define workflow reconciliation
|
|
312
|
-
|
|
313
|
-
#### Objective
|
|
314
|
-
|
|
315
|
-
Explore how `Maestro` can reconcile saved `artifacts` and workflow state. The recovery scope is not yet defined.
|
|
316
|
-
|
|
317
|
-
#### Completed when
|
|
318
|
-
|
|
319
|
-
Not yet defined. The `owner` must define the intended outcome, recovery boundaries, and completion condition before this item can move forward.
|
package/docs/workflow.md
CHANGED
|
@@ -271,9 +271,10 @@ check failures. If no code needs refactoring, the `simplifier` does not make any
|
|
|
271
271
|
## Workflow completion
|
|
272
272
|
|
|
273
273
|
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
|
|
274
|
+
`artifacts`, and simplifier's summary and notes.
|
|
275
275
|
|
|
276
|
-
|
|
276
|
+
`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
|
+
later Git use, pull request, or merge. Changes after completion are outside the completed verification.
|
|
277
278
|
|
|
278
279
|
## Stored artifacts
|
|
279
280
|
|
package/extensions/maestro.ts
CHANGED
|
@@ -23,6 +23,7 @@ import {
|
|
|
23
23
|
import { RUN_BUILDER_TOOL, registerRunBuilderTool } from '#tools/main/run-builder.ts';
|
|
24
24
|
import { RUN_SIMPLIFIER_TOOL, registerRunSimplifierTool } from '#tools/main/run-simplifier.ts';
|
|
25
25
|
import { RUN_VERIFIER_TOOL, registerRunVerifierTool } from '#tools/main/run-verifier.ts';
|
|
26
|
+
import { WORKFLOW_PHASES } from '#workflow/state/schema.ts';
|
|
26
27
|
|
|
27
28
|
const MAIN_TOOL_NAMES: readonly string[] = [
|
|
28
29
|
CREATE_SPEC_TOOL.NAME,
|
|
@@ -34,6 +35,19 @@ const MAIN_TOOL_NAMES: readonly string[] = [
|
|
|
34
35
|
RUN_SIMPLIFIER_TOOL.NAME,
|
|
35
36
|
];
|
|
36
37
|
|
|
38
|
+
type CompletedWorkflowResult = {
|
|
39
|
+
specId: string;
|
|
40
|
+
phase: typeof WORKFLOW_PHASES.CANDIDATE_READY;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
const isCompletedWorkflowResult = (details: unknown): details is CompletedWorkflowResult =>
|
|
44
|
+
typeof details === 'object' &&
|
|
45
|
+
details !== null &&
|
|
46
|
+
'specId' in details &&
|
|
47
|
+
typeof details.specId === 'string' &&
|
|
48
|
+
'phase' in details &&
|
|
49
|
+
details.phase === WORKFLOW_PHASES.CANDIDATE_READY;
|
|
50
|
+
|
|
37
51
|
export default (pi: ExtensionAPI): void => {
|
|
38
52
|
registerCreateSpecTool(pi);
|
|
39
53
|
registerMarkSpecReadyTool(pi);
|
|
@@ -125,8 +139,45 @@ export default (pi: ExtensionAPI): void => {
|
|
|
125
139
|
// Pi fires this after a tool returns, before its result reaches the AI.
|
|
126
140
|
// Refresh status after main Maestro tools, without changing the tool result.
|
|
127
141
|
pi.on('tool_result', async (event, context) => {
|
|
142
|
+
if (!event.isError && isCompletedWorkflowResult(event.details)) {
|
|
143
|
+
maestroSessionState.setWaitingForFinalResponseMode(event.details.specId);
|
|
144
|
+
}
|
|
145
|
+
|
|
128
146
|
if (MAIN_TOOL_NAMES.includes(event.toolName)) {
|
|
129
147
|
await refreshMaestroStatus(context);
|
|
130
148
|
}
|
|
131
149
|
});
|
|
150
|
+
|
|
151
|
+
// Finish at the response boundary, before Pi can process a queued follow-up.
|
|
152
|
+
// Assistant messages that request tools are still preparing the final summary.
|
|
153
|
+
pi.on('message_end', async (event, context) => {
|
|
154
|
+
const message = event.message;
|
|
155
|
+
|
|
156
|
+
if (
|
|
157
|
+
!maestroSessionState.isWaitingForFinalResponse() ||
|
|
158
|
+
message.role !== 'assistant' ||
|
|
159
|
+
message.stopReason === 'toolUse'
|
|
160
|
+
) {
|
|
161
|
+
return;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
maestroSessionState.stopWaitingForFinalResponse();
|
|
165
|
+
|
|
166
|
+
if (
|
|
167
|
+
!maestroSessionState.isActive() ||
|
|
168
|
+
context.signal?.aborted ||
|
|
169
|
+
message.stopReason !== 'stop' ||
|
|
170
|
+
!message.content.some((part) => part.type === 'text' && part.text.trim() !== '')
|
|
171
|
+
) {
|
|
172
|
+
return;
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
maestroSessionState.deactivate();
|
|
176
|
+
syncMainTools();
|
|
177
|
+
await refreshMaestroStatus(context);
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
pi.on('agent_end', () => {
|
|
181
|
+
maestroSessionState.stopWaitingForFinalResponse();
|
|
182
|
+
});
|
|
132
183
|
};
|
package/package.json
CHANGED
|
@@ -218,6 +218,8 @@ Disabling Maestro, restarting Pi, or using /resume clears live state. Do not rec
|
|
|
218
218
|
The owner handles execution errors, protocol errors, and interrupted workflows manually.
|
|
219
219
|
|
|
220
220
|
At candidate-ready, the workflow is complete. No final tool call is required.
|
|
221
|
+
Maestro stays active while you deliver the final summary and automatically turns off after the response finishes successfully, including when simplification was skipped.
|
|
222
|
+
Do not ask the owner to toggle /maestro or disable it before delivering the summary. Saved workflow files remain unchanged.
|
|
221
223
|
You own the final summary. Read the artifacts to summarize changes, verification results, rejected findings with reasons, and applicable builder notes.
|
|
222
224
|
For completed simplification, read handoffs/simplifier/S.json and report its saved summary and notes as the simplifier's report.
|
|
223
225
|
For example, summary "Simplified counting" and note "Updated the caller to read the Map." belong to the simplifier, not verifier evidence.
|
|
@@ -6,6 +6,7 @@
|
|
|
6
6
|
class MaestroSessionState {
|
|
7
7
|
private active = false;
|
|
8
8
|
private activeSpecId: string | null = null;
|
|
9
|
+
private waitingForFinalResponse = false;
|
|
9
10
|
|
|
10
11
|
public isActive = (): boolean => this.active;
|
|
11
12
|
|
|
@@ -23,10 +24,24 @@ class MaestroSessionState {
|
|
|
23
24
|
|
|
24
25
|
public activate = (): void => {
|
|
25
26
|
this.active = true;
|
|
27
|
+
this.stopWaitingForFinalResponse();
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
public setWaitingForFinalResponseMode = (specId: string): void => {
|
|
31
|
+
if (this.active && this.activeSpecId === specId) {
|
|
32
|
+
this.waitingForFinalResponse = true;
|
|
33
|
+
}
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
public isWaitingForFinalResponse = (): boolean => this.waitingForFinalResponse;
|
|
37
|
+
|
|
38
|
+
public stopWaitingForFinalResponse = (): void => {
|
|
39
|
+
this.waitingForFinalResponse = false;
|
|
26
40
|
};
|
|
27
41
|
|
|
28
42
|
public clearActiveSpecId = (): void => {
|
|
29
43
|
this.activeSpecId = null;
|
|
44
|
+
this.stopWaitingForFinalResponse();
|
|
30
45
|
};
|
|
31
46
|
|
|
32
47
|
public deactivate = (): void => {
|