@emiliosp/pi-maestro 0.15.0 → 0.16.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 +127 -0
- package/CHANGELOG.md +11 -0
- package/README.md +5 -5
- package/ROADMAP.md +174 -46
- package/docs/configuration.md +21 -27
- package/docs/subagent-integration.md +4 -4
- package/package.json +3 -3
- package/src/artifacts/builder-handoff/schema.ts +1 -2
- package/src/config/assertConfiguration.ts +0 -6
- package/src/config/defaults.ts +0 -5
- package/src/config/schema.ts +0 -14
- package/src/tools/main/resolve-findings.ts +3 -4
- package/src/tools/main/run-builder.ts +2 -3
- package/src/tools/main/run-simplifier.ts +2 -3
- package/src/tools/main/run-verifier.ts +2 -3
- package/src/tools/utils/pi-subagent-delegation.ts +3 -0
package/ADR.md
CHANGED
|
@@ -275,3 +275,130 @@ Approval can finish at `candidate-ready` without agent execution. Agent and mode
|
|
|
275
275
|
### Evidence
|
|
276
276
|
|
|
277
277
|
[Approved design](.specs/20261103-161424-maestro-27-make-implementation-phases-optional/design.md) and [phase selection](docs/configuration.md#phase-selection).
|
|
278
|
+
|
|
279
|
+
## ADR-010: Use the Pi SDK for sequential agent delegation
|
|
280
|
+
|
|
281
|
+
### Status
|
|
282
|
+
|
|
283
|
+
Design decisions confirmed by the `owner`. Not implemented.
|
|
284
|
+
|
|
285
|
+
### Context
|
|
286
|
+
|
|
287
|
+
`Maestro` currently depends on `pi-subagents` to execute the `builder`, `verifier`, and `simplifier`. Its delegation needs are limited: only one workflow and one child
|
|
288
|
+
agent execute at a time, and `Maestro` waits for each child to finish. `Maestro` already owns workflow transitions, role instructions, saved `handoffs`, and result
|
|
289
|
+
validation.
|
|
290
|
+
|
|
291
|
+
The `owner` wants to remove the `pi-subagents` dependency without building a general-purpose delegation framework. Pi provides `createAgentSession()` for direct SDK
|
|
292
|
+
integration and `RpcClient` for subprocess control. Separate conversations do not require separate processes.
|
|
293
|
+
|
|
294
|
+
### Decision
|
|
295
|
+
|
|
296
|
+
1. Replace `pi-subagents` delegation with direct use of the Pi SDK through `createAgentSession()`, rather than RPC subprocesses.
|
|
297
|
+
2. Preserve sequential execution: one workflow at a time, one child agent at a time, with `Maestro` waiting for completion.
|
|
298
|
+
3. Use task-and-handoff communication, not a live supervisor dialogue. `Maestro` assigns the task; the child works, saves its `handoff`, and finishes.
|
|
299
|
+
4. When an `owner` decision is needed, the `builder` saves an `escalation` and ends its `run`. `Maestro` discusses it with the `owner` and records the decisions through
|
|
300
|
+
the existing workflow. Any subsequent `builder` `run` starts a fresh conversation and reads the saved decisions.
|
|
301
|
+
5. Child sessions must have access to the same working tools available to `Maestro`, plus the tools needed to save their own `handoffs`. Do not load the main `Maestro`
|
|
302
|
+
extension into child sessions. Tools supplied by other extensions may remain available even if they support delegation; role instructions forbid using them to
|
|
303
|
+
delegate. This is a tool-access requirement, not merely an extension-loading policy.
|
|
304
|
+
6. Automatically load enabled global and project extensions, excluding the main `Maestro` extension. Provide the corresponding working-tool environment through Pi's
|
|
305
|
+
native APIs and configuration, including separate Pi support such as MCP and `codemode` where needed. Loading the same extensions alone does not reproduce every CLI
|
|
306
|
+
capability. Compatibility of arbitrary extensions, tools, and model providers is outside Maestro's responsibility; do not add custom compatibility checks or adapters.
|
|
307
|
+
7. All three child roles receive the owner's global instruction file, normally `~/.pi/agent/AGENTS.md`, preserving the current `inheritGlobalContext: true` behavior.
|
|
308
|
+
These instructions are not the parent's conversation history.
|
|
309
|
+
8. All three child roles automatically receive project instructions discovered by Pi, such as applicable `AGENTS.md` files, preserving the current
|
|
310
|
+
`inheritProjectContext: true` behavior. These instructions supplement global instructions and role-specific guidance.
|
|
311
|
+
9. All three child roles can discover and use available skills, preserving the current `inheritSkills: true` behavior. Expose the skill catalog without loading every
|
|
312
|
+
skill's full contents into the conversation. Skills remain subject to the child's role boundaries and permitted tools; they do not authorize delegation or workflow
|
|
313
|
+
management.
|
|
314
|
+
10. During a child `run`, report the role, elapsed time, current tool, and recent normal assistant text through Pi's standard tool-progress updates (`onUpdate`). Use Pi's
|
|
315
|
+
built-in presentation, including its default layout, truncation, and expansion behavior. Do not build a custom renderer or implement a fixed visible-line count or
|
|
316
|
+
terminal-height adaptation. Update progress in place instead of appending intermediate messages to the main conversation. Do not include internal reasoning or full
|
|
317
|
+
command output. Continue reporting activity when the child produces no text; do not prompt it to generate artificial progress messages.
|
|
318
|
+
11. Intermediate activity text is UI-only and must not enter the main model's context. `Maestro` continues to receive the existing workflow result. Pi's display limits do
|
|
319
|
+
not truncate the saved child conversation. The five-, ten-, and twenty-line alternatives are superseded by the decision to use Pi's standard presentation.
|
|
320
|
+
12. Persist child conversations using Pi's native session format, rather than a custom transcript format. Saved sessions remain available after execution for diagnosis,
|
|
321
|
+
including unsuccessful executions. Each child `run` starts a new conversation; persistence does not introduce automatic session reuse or workflow recovery.
|
|
322
|
+
13. At child completion or failure, show the `owner` the path to its saved Pi session file, when one exists. The `owner` can inspect the file directly or use Pi's native
|
|
323
|
+
HTML export with `pi --export <session-file> conversation.html`. Do not build a transcript inspector inside `Maestro`. Reading or exporting a transcript does not
|
|
324
|
+
resume child execution.
|
|
325
|
+
14. Do not impose an automatic child `run` timeout in `Maestro`. Remove `builder.timeoutMinutes`, `verifier.timeoutMinutes`, and `simplifier.timeoutMinutes` from
|
|
326
|
+
`.pi/maestro.json` configuration support, including schema validation, defaults, launch inputs, and configuration documentation. A child continues until it finishes,
|
|
327
|
+
fails, or is manually interrupted. This removes the workflow-level deadline, not the elapsed-time progress display or timeouts internal to Pi and its tools.
|
|
328
|
+
15. Remove `timeoutMinutes` from the configuration schemas and retain `additionalProperties: false`. Existing TypeBox-based validation rejects configuration files that
|
|
329
|
+
still contain the field. Do not add a migration, ignored legacy fields, or special compatibility handling. The `owner` removes obsolete fields manually.
|
|
330
|
+
16. Preserve the existing execution-error policy. Launch failures, failed child executions, and missing or invalid `handoffs` stop the workflow and report the error.
|
|
331
|
+
`Maestro` does not automatically start another child session to retry, repair saved state, or roll back files. Preserve the remaining project files and saved workflow
|
|
332
|
+
state for manual `owner` follow-up, including partial protocol writes. Errors do not introduce recovery transitions or synthetic `escalations`.
|
|
333
|
+
17. Propagate manual cancellation of the main tool to its active child through `session.abort()` and await the interruption before releasing the child session. Do not
|
|
334
|
+
send a final model prompt asking the child to finish, and do not generate a synthetic `handoff`. Leave project files and saved workflow state unchanged by cleanup.
|
|
335
|
+
Close child sessions and release progress subscriptions and session resources on completion, failure, or cancellation. Do not start another child while the previous
|
|
336
|
+
child remains active.
|
|
337
|
+
18. Store child sessions in a `subagents/` subdirectory of Pi's normal project session directory, normally `~/.pi/agent/sessions/--<project-path>--/subagents/`. Resolve
|
|
338
|
+
the parent directory through Pi's session-directory API rather than reimplementing project-path encoding. Use Pi's native `SessionManager` with this directory. Do not
|
|
339
|
+
create a `subagents/` directory inside the project repository.
|
|
340
|
+
19. Require Pi 1.5.0 or later for the SDK-based implementation. Update the declared Pi requirement and align implementation verification with this baseline. Do not add
|
|
341
|
+
compatibility fallbacks for earlier Pi versions. This minimum is a scope choice, not a claim that all earlier versions lack the required APIs.
|
|
342
|
+
20. Do not build an additional tool allowlist or exclusion list to prevent child delegation. Children may have delegation tools available, but their role instructions
|
|
343
|
+
forbid using them. This deliberately relies on instruction compliance rather than technical removal of delegation capabilities. The main `Maestro` extension remains
|
|
344
|
+
excluded.
|
|
345
|
+
21. Leave compatibility of external integrations to Pi and the `owner`. Do not add a preflight that compares parent and child tool availability, extension health checks,
|
|
346
|
+
special adapters, or a fallback system for incompatible integrations. This scope boundary does not suppress errors actually reported during launch or execution; those
|
|
347
|
+
follow the existing stop-and-report policy.
|
|
348
|
+
|
|
349
|
+
### Consequences
|
|
350
|
+
|
|
351
|
+
The replacement does not need supervisor request routing or a mechanism that makes the main model answer a child while waiting for it. Saved `handoffs` remain the
|
|
352
|
+
communication boundary for completed work and `escalations`.
|
|
353
|
+
|
|
354
|
+
SDK sessions share a Node.js process. Separate conversation histories do not isolate module-level mutable state or project files. Child resource loading must account for
|
|
355
|
+
this distinction.
|
|
356
|
+
|
|
357
|
+
Automatic extension loading intentionally differs from the current foreground behavior of `pi-subagents` 0.78.0, which does not automatically load the parent's global and
|
|
358
|
+
project extensions. Shared working-tool access is provided through Pi's native environment, not an independent compatibility guarantee for every integration. The
|
|
359
|
+
replacement must use Pi's tool activation and support such as MCP and `codemode`, rather than assuming the SDK supplies the CLI's capabilities by default. There is no
|
|
360
|
+
custom parity check, health gate, or adapter layer for third-party integrations. Children do not inherit the parent's conversation, but they share the process and may
|
|
361
|
+
interact with process-wide mutable state. Loaded extensions can create additional connections, timers, and process-wide effects. Excluding the main `Maestro` extension
|
|
362
|
+
does not establish compatibility with every other extension or remove delegation tools supplied by other extensions. `Maestro` launches its own children sequentially;
|
|
363
|
+
compliance with the broader no-delegation rule relies on child instructions. A child that ignores those instructions could launch other agents. This accepted limitation
|
|
364
|
+
avoids maintaining tool classifications and exclusion lists and does not claim a sandbox; even ordinary shell access can launch processes.
|
|
365
|
+
|
|
366
|
+
Pi's standard tool-progress presentation replaces FleetView's live activity display, not its full transcript inspector. `Maestro` owns the progress data, not a new
|
|
367
|
+
rendering system or a guaranteed panel size. Displaying text already produced by the child requires no additional model generation and does not add that text to the main
|
|
368
|
+
model's context. Full transcript inspection uses saved session files and Pi's existing export capability rather than a replacement inspector. The main tool must connect
|
|
369
|
+
cancellation to the child SDK session and perform session cleanup; selecting the SDK alone does not wire these operations together.
|
|
370
|
+
|
|
371
|
+
Native session files retain child messages, tool calls, and tool results beyond the lifetime of the child session. They may contain project data present in those messages
|
|
372
|
+
and results. Persistence is separate from the live progress display and does not add the transcript to the main model's context. The dedicated `subagents/` subdirectory
|
|
373
|
+
keeps child session files separate from the main session files without adding transcript files to the project repository or introducing a custom storage format.
|
|
374
|
+
|
|
375
|
+
Removing the configured deadline simplifies child execution but permits indefinitely running work until manual interruption. This is a breaking configuration change:
|
|
376
|
+
files that still contain `timeoutMinutes` fail existing configuration validation until the `owner` removes the obsolete fields. Document the removal without adding legacy
|
|
377
|
+
compatibility code.
|
|
378
|
+
|
|
379
|
+
Manual cancellation uses Pi's in-process cancellation lifecycle, not termination of a separate operating-system process. It does not undo completed writes or introduce a
|
|
380
|
+
final model turn. `Maestro` uses Pi's cancellation and cleanup lifecycle; behavior of third-party integrations remains outside its compatibility contract.
|
|
381
|
+
|
|
382
|
+
The Pi minimum increases from the currently documented 1.0.0 to 1.5.0. Earlier hosts are outside the new compatibility contract. At decision time, the project has Pi
|
|
383
|
+
1.0.3 installed locally and the active harness uses Pi 1.5.0; the implementation must be verified against the selected baseline rather than treating the older local
|
|
384
|
+
installation as sufficient verification. This ADR changes no installed dependencies.
|
|
385
|
+
|
|
386
|
+
### Evidence
|
|
387
|
+
|
|
388
|
+
During the architecture discussion, the `owner` selected the SDK and task-and-handoff communication, then clarified the tool-access contract: the same working tools as
|
|
389
|
+
`Maestro`, plus child handoff tools, with the main `Maestro` extension excluded. The `owner` subsequently accepted that delegation tools from other extensions may remain
|
|
390
|
+
available, with their use forbidden by instructions rather than additional tool filters. The `owner` also confirmed that all three roles continue receiving global and
|
|
391
|
+
automatically discovered project instructions, as declared by `inheritGlobalContext: true` and `inheritProjectContext: true` in the existing role definitions. All three
|
|
392
|
+
roles also retain access to the skill catalog and can load relevant skill instructions, consistent with their existing `inheritSkills: true` setting and subject to role
|
|
393
|
+
and tool restrictions. After discussing bounded display sizes, the `owner` selected Pi's standard tool-progress presentation rather than custom rendering, while retaining
|
|
394
|
+
recent assistant text without sending intermediate text to the main model. The `owner` selected persistent transcripts in Pi's native session format, while keeping each
|
|
395
|
+
child conversation fresh. The `owner` chose to receive the saved session path and use direct file inspection or Pi's native HTML export, without a `Maestro` transcript
|
|
396
|
+
inspector. The `owner` chose the simplest execution option: no automatic child deadline, with the timeout settings removed from configuration. The `owner` accepted that
|
|
397
|
+
existing TypeBox-based validation rejects configurations retaining `timeoutMinutes`, without migration or compatibility handling, and confirmed the existing
|
|
398
|
+
execution-error policy: stop and report, retain files, and leave follow-up to the `owner`, without automatic retries, repair, or rollback. The `owner` selected manual
|
|
399
|
+
interruption through `session.abort()` followed by session cleanup, without a final model turn or synthetic `handoff`, and placed saved child sessions in `subagents/`
|
|
400
|
+
beneath Pi's project session directory, not inside the repository. The `owner` chose Pi 1.5.0 as the minimum supported version, without fallbacks for earlier hosts. The
|
|
401
|
+
`owner` explicitly excluded compatibility handling for external integrations from scope; no custom checks, adapters, or reduced-capacity fallback system are required.
|
|
402
|
+
Existing boundaries are described in [subagent integration](docs/subagent-integration.md), [delegation](src/tools/utils/pi-subagent-delegation.ts),
|
|
403
|
+
[builder execution](src/tools/main/run-builder.ts), and the [child extension](extensions/maestro-subagent.ts). These links describe the current implementation, not the
|
|
404
|
+
planned SDK replacement.
|
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.16.0
|
|
7
|
+
|
|
8
|
+
1. Required Pi 1.5.0 or later and pinned the development Pi dependencies to that baseline, so type checks and tests run against the declared host. The extension now uses
|
|
9
|
+
TypeBox `Type.Enum` with an explicit string type instead of the `StringEnum` helper, calls `before_agent_start` with Pi's message object, and expects the `truncated`
|
|
10
|
+
field on `exec` results. See [PR #46](https://github.com/emilioSp/pi-maestro/pull/46).
|
|
11
|
+
2. Breaking: removed `timeoutMinutes` from the agent configuration. Configuration files that still contain the field fail validation until the `owner` removes it; no
|
|
12
|
+
migration or legacy handling is provided.
|
|
13
|
+
3. Replaced the configured per-agent timeout with a fixed, non-configurable deadline passed to `pi-subagents` for every `run`. A `run` is no longer bounded by a
|
|
14
|
+
configured duration.
|
|
15
|
+
4. Updated `ADR.md`, `ROADMAP.md`, `README.md`, and `docs/` for the new baseline and the removed timeout settings. `MAESTRO-FREE-1` is recorded as completed.
|
|
16
|
+
|
|
6
17
|
## 0.15.0
|
|
7
18
|
|
|
8
19
|
1. Added per-agent `required` booleans in `.pi/maestro.json`, all defaulting to `true`. Disabling `builder` completes the workflow at `spec` approval without agents;
|
package/README.md
CHANGED
|
@@ -83,7 +83,7 @@ An `escalation` asks the `owner` to decide an implementation question. A `findin
|
|
|
83
83
|
|
|
84
84
|
1. macOS.
|
|
85
85
|
2. Node.js 26 or later.
|
|
86
|
-
3. Pi 1.
|
|
86
|
+
3. Pi 1.5.0 or later.
|
|
87
87
|
4. `pi-subagents` installed and enabled in Pi when `builder` is enabled.
|
|
88
88
|
5. Access to the models for enabled agents.
|
|
89
89
|
6. A project directory that Pi trusts.
|
|
@@ -151,9 +151,9 @@ files do not automatically restore or resume an incomplete workflow. The `owner`
|
|
|
151
151
|
## Configuration
|
|
152
152
|
|
|
153
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
|
|
154
|
-
levels,
|
|
155
|
-
|
|
156
|
-
|
|
154
|
+
levels, or selected phases. Each agent has a `required` boolean that defaults to `true`. Set flags before activation and keep configuration unchanged during the workflow.
|
|
155
|
+
With `builder.required: false`, approval finishes with only an approved `spec` for implementation elsewhere. Otherwise `verifier` and `simplifier` can be disabled
|
|
156
|
+
independently. Skipped work is identified in the final summary and is not claimed as completed. See [Configuration](docs/configuration.md#phase-selection).
|
|
157
157
|
|
|
158
158
|
## Documentation
|
|
159
159
|
|
|
@@ -161,7 +161,7 @@ The reading order is:
|
|
|
161
161
|
|
|
162
162
|
1. [Glossary](docs/glossary.md): terms and identifiers used in `specs`, reports, and `Maestro` messages. Read this before the first workflow.
|
|
163
163
|
2. [Workflow](docs/workflow.md): approvals, decisions, and how each `run` produces `artifacts`.
|
|
164
|
-
3. [Configuration](docs/configuration.md): project paths, models, and
|
|
164
|
+
3. [Configuration](docs/configuration.md): project paths, models, and thinking levels.
|
|
165
165
|
4. [Subagent integration](docs/subagent-integration.md): agent context, execution, and activity tracking.
|
|
166
166
|
|
|
167
167
|
## Project constitution
|
package/ROADMAP.md
CHANGED
|
@@ -10,30 +10,37 @@ reaching `candidate-ready`. Linear onboarding and test issues are not project ro
|
|
|
10
10
|
|
|
11
11
|
## Overview
|
|
12
12
|
|
|
13
|
-
| ID
|
|
14
|
-
|
|
|
15
|
-
| MAESTRO-6
|
|
16
|
-
| MAESTRO-7
|
|
17
|
-
| MAESTRO-8
|
|
18
|
-
| MAESTRO-9
|
|
19
|
-
| MAESTRO-10
|
|
20
|
-
| MAESTRO-11
|
|
21
|
-
| MAESTRO-12
|
|
22
|
-
| MAESTRO-13
|
|
23
|
-
| MAESTRO-14
|
|
24
|
-
| MAESTRO-15
|
|
25
|
-
| MAESTRO-16
|
|
26
|
-
| MAESTRO-17
|
|
27
|
-
| MAESTRO-18
|
|
28
|
-
| MAESTRO-19
|
|
29
|
-
| MAESTRO-20
|
|
30
|
-
| MAESTRO-21
|
|
31
|
-
| MAESTRO-22
|
|
32
|
-
| MAESTRO-23
|
|
33
|
-
| MAESTRO-24
|
|
34
|
-
| MAESTRO-25
|
|
35
|
-
| MAESTRO-26
|
|
36
|
-
| MAESTRO-27
|
|
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) | Completed |
|
|
37
|
+
| MAESTRO-FREE-1 | [Require Pi 1.5.0](#maestro-free-1-require-pi-150) | Completed |
|
|
38
|
+
| MAESTRO-FREE-2 | [Remove Maestro run timeouts](#maestro-free-2-remove-maestro-run-timeouts) | Backlog |
|
|
39
|
+
| MAESTRO-FREE-3 | [Run the builder through the Pi SDK](#maestro-free-3-run-the-builder-through-the-pi-sdk) | Backlog |
|
|
40
|
+
| MAESTRO-FREE-4 | [Run the verifier through the Pi SDK](#maestro-free-4-run-the-verifier-through-the-pi-sdk) | Backlog |
|
|
41
|
+
| MAESTRO-FREE-5 | [Run the simplifier through the Pi SDK](#maestro-free-5-run-the-simplifier-through-the-pi-sdk) | Backlog |
|
|
42
|
+
| MAESTRO-FREE-6 | [Show SDK agent activity through Pi](#maestro-free-6-show-sdk-agent-activity-through-pi) | Backlog |
|
|
43
|
+
| MAESTRO-FREE-7 | [Remove the pi-subagents dependency](#maestro-free-7-remove-the-pi-subagents-dependency) | Backlog |
|
|
37
44
|
|
|
38
45
|
## Backlog
|
|
39
46
|
|
|
@@ -90,8 +97,147 @@ Explore how `Maestro` can reconcile saved `artifacts` and workflow state. The re
|
|
|
90
97
|
|
|
91
98
|
Not yet defined. The `owner` must define the intended outcome, recovery boundaries, and completion condition before this item can move forward.
|
|
92
99
|
|
|
100
|
+
### MAESTRO-FREE-2: Remove Maestro run timeouts
|
|
101
|
+
|
|
102
|
+
#### Objective
|
|
103
|
+
|
|
104
|
+
Remove Maestro's per-agent deadline and the three `timeoutMinutes` settings, as decided in [ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation).
|
|
105
|
+
Remove schema fields, defaults, delegation timeout inputs, and related configuration documentation together.
|
|
106
|
+
|
|
107
|
+
#### Completed when
|
|
108
|
+
|
|
109
|
+
1. `Maestro` no longer supplies a per-agent deadline. Elapsed-time display and timeouts internal to Pi, tools, or the remaining `pi-subagents` integration are unchanged.
|
|
110
|
+
2. Configuration without `timeoutMinutes` works; configuration retaining it fails existing TypeBox validation with no migration or compatibility handling.
|
|
111
|
+
3. Other configuration behavior and the existing workflow remain unchanged.
|
|
112
|
+
|
|
113
|
+
### MAESTRO-FREE-3: Run the builder through the Pi SDK
|
|
114
|
+
|
|
115
|
+
#### Objective
|
|
116
|
+
|
|
117
|
+
Replace `builder` delegation with `createAgentSession()` and deliver a complete, usable SDK `builder` `run`, following
|
|
118
|
+
[ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation). This item includes the internal execution operation used by later role migrations; do not
|
|
119
|
+
release an incomplete `builder` pending separate context, cancellation, or persistence work.
|
|
120
|
+
|
|
121
|
+
#### Scope and dependencies
|
|
122
|
+
|
|
123
|
+
Requires [MAESTRO-FREE-1](#maestro-free-1-require-pi-150) and [MAESTRO-FREE-2](#maestro-free-2-remove-maestro-run-timeouts). Keep the `verifier` and `simplifier` on
|
|
124
|
+
`pi-subagents`. The temporary routing is fixed in code, not a configurable engine selector or a general-purpose delegation framework. Human documentation must describe
|
|
125
|
+
the actual mixed-engine state. Live SDK progress is covered separately by [MAESTRO-FREE-6](#maestro-free-6-show-sdk-agent-activity-through-pi); existing workflow-phase
|
|
126
|
+
status remains available in the meantime.
|
|
127
|
+
|
|
128
|
+
#### Completed when
|
|
129
|
+
|
|
130
|
+
1. An approved `spec` can be implemented by an SDK `builder` with fresh conversation history, the configured model and thinking level, role guidance, global and project
|
|
131
|
+
instructions, skills, working tools, and existing `handoff` tools.
|
|
132
|
+
2. Enabled global and project extensions load through Pi, excluding the main `Maestro` extension. Instructions forbid further delegation; there are no additional tool
|
|
133
|
+
filters, integration health gates, compatibility adapters, or automatic retries.
|
|
134
|
+
3. `done` and `escalation` outcomes preserve existing saved `handoffs`, validation, phase transitions, and subsequent workflow routes. A later `builder` `pass` starts
|
|
135
|
+
fresh and reads saved decisions rather than restoring the previous conversation.
|
|
136
|
+
4. Errors stop the workflow without rollback or repair. Manual cancellation reaches `session.abort()`, and child sessions and subscriptions are cleaned up on every exit.
|
|
137
|
+
5. Native Pi session files are saved beneath the project's Pi session directory in `subagents/`. The `owner` receives the saved path on completion or failure when a file
|
|
138
|
+
exists; it can be inspected or exported with Pi, without automatic resumption.
|
|
139
|
+
6. Existing trust, configuration, and model checks remain applicable. `pi-subagents` ping and launch-contract checks apply only to enabled roles still using that engine;
|
|
140
|
+
a `builder`-only workflow uses the SDK without requiring a `pi-subagents` availability reply.
|
|
141
|
+
7. Each `run` waits for its child to finish or be interrupted before another starts. Existing optional-phase behavior remains intact.
|
|
142
|
+
|
|
143
|
+
### MAESTRO-FREE-4: Run the verifier through the Pi SDK
|
|
144
|
+
|
|
145
|
+
#### Objective
|
|
146
|
+
|
|
147
|
+
Move the `verifier` to the SDK execution operation delivered by [MAESTRO-FREE-3](#maestro-free-3-run-the-builder-through-the-pi-sdk), following
|
|
148
|
+
[ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation). Do not redesign verification or its reports.
|
|
149
|
+
|
|
150
|
+
#### Completed when
|
|
151
|
+
|
|
152
|
+
1. The SDK `verifier` independently checks the approved `spec` and saves existing numbered `handoffs`, preserving criterion validation, `finding` decisions, and phase
|
|
153
|
+
transitions.
|
|
154
|
+
2. It reuses the established fresh-session context, tools, persistence, cancellation, cleanup, and error policy without a second execution mechanism.
|
|
155
|
+
3. Activation no longer asks `pi-subagents` to check or execute the `verifier`. Its remaining checks apply only to enabled roles still on that engine.
|
|
156
|
+
4. Workflows with verification enabled or disabled retain their existing routes. If the `simplifier` is not yet migrated, it continues to use `pi-subagents` unchanged.
|
|
157
|
+
|
|
158
|
+
### MAESTRO-FREE-5: Run the simplifier through the Pi SDK
|
|
159
|
+
|
|
160
|
+
#### Objective
|
|
161
|
+
|
|
162
|
+
Move the `simplifier` to the SDK execution operation delivered by [MAESTRO-FREE-3](#maestro-free-3-run-the-builder-through-the-pi-sdk), following
|
|
163
|
+
[ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation). Keep its existing purpose and Git-only scope.
|
|
164
|
+
|
|
165
|
+
#### Completed when
|
|
166
|
+
|
|
167
|
+
1. The SDK `simplifier` preserves the current Git readiness decision, skip behavior, and entry routes. No Git readiness check moves into activation or an earlier phase.
|
|
168
|
+
2. Successful execution saves the existing unnumbered `S.json` `handoff` and reaches `candidate-ready`; optional-phase behavior remains unchanged.
|
|
169
|
+
3. It reuses the established context, tools, persistence, cancellation, cleanup, and error policy.
|
|
170
|
+
4. Activation no longer asks `pi-subagents` to check or execute the `simplifier`. Once all roles have migrated, no workflow path requires its ping or launch preflight.
|
|
171
|
+
|
|
172
|
+
### MAESTRO-FREE-6: Show SDK agent activity through Pi
|
|
173
|
+
|
|
174
|
+
#### Objective
|
|
175
|
+
|
|
176
|
+
Show activity for SDK-based agent `runs` through Pi's standard `onUpdate` presentation, as decided in
|
|
177
|
+
[ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation). Requires [MAESTRO-FREE-3](#maestro-free-3-run-the-builder-through-the-pi-sdk) and applies to
|
|
178
|
+
each role as it is migrated.
|
|
179
|
+
|
|
180
|
+
#### Completed when
|
|
181
|
+
|
|
182
|
+
1. Progress reports the role, elapsed time, current tool, and recent normal assistant text, including activity while the agent produces no text.
|
|
183
|
+
2. Pi controls layout, truncation, and expansion. There is no custom renderer, fixed line count, transcript inspector, or artificial progress prompting.
|
|
184
|
+
3. Intermediate text stays out of the main model's context. Final workflow results, saved session contents, and cancellation behavior remain unchanged.
|
|
185
|
+
4. Progress subscriptions are released when the child finishes, fails, or is interrupted. Roles still on `pi-subagents` retain their existing presentation.
|
|
186
|
+
|
|
187
|
+
### MAESTRO-FREE-7: Remove the pi-subagents dependency
|
|
188
|
+
|
|
189
|
+
#### Objective
|
|
190
|
+
|
|
191
|
+
Finish [ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation) by removing the package dependency, bundling, and remaining integration metadata after
|
|
192
|
+
[MAESTRO-FREE-3](#maestro-free-3-run-the-builder-through-the-pi-sdk), [MAESTRO-FREE-4](#maestro-free-4-run-the-verifier-through-the-pi-sdk), and
|
|
193
|
+
[MAESTRO-FREE-5](#maestro-free-5-run-the-simplifier-through-the-pi-sdk). This is dependency removal, not another execution-engine switch.
|
|
194
|
+
|
|
195
|
+
#### Completed when
|
|
196
|
+
|
|
197
|
+
1. `Maestro` neither imports nor bundles `pi-subagents`, and package metadata, role frontmatter, tests, installation instructions, and current human documentation no
|
|
198
|
+
longer require it. Historical records remain historical evidence.
|
|
199
|
+
2. A clean installation can activate and complete workflows without `pi-subagents` installed or enabled, including the supported optional-phase combinations.
|
|
200
|
+
3. Existing workflow and `handoff` formats remain unchanged. No compatibility framework, engine-selection flags, or migration of interrupted workflows is added.
|
|
201
|
+
|
|
93
202
|
## Implemented, acceptance not confirmed
|
|
94
203
|
|
|
204
|
+
### MAESTRO-26: Exit Maestro mode automatically at workflow completion
|
|
205
|
+
|
|
206
|
+
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
|
|
207
|
+
simplification is skipped. Live tools, status, instructions, and active `spec` selection are cleared; saved workflow files and other extensions remain unchanged.
|
|
208
|
+
Intermediate phases and interrupted workflows do not trigger automatic exit.
|
|
209
|
+
|
|
210
|
+
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.
|
|
211
|
+
|
|
212
|
+
#### Evidence
|
|
213
|
+
|
|
214
|
+
[Changelog](CHANGELOG.md#0130), [merged PR #43](https://github.com/emilioSp/pi-maestro/pull/43),
|
|
215
|
+
[specification](.specs/20261030-145712-automatically-exit-maestro-mode-at-workflow-completion/spec.md), and
|
|
216
|
+
[original issue](https://linear.app/emilio-spatola/issue/MAESTRO-26/feat-exit-maestro-mode-automatically-at-workflow-completion).
|
|
217
|
+
|
|
218
|
+
## Completed
|
|
219
|
+
|
|
220
|
+
Completed entries include historical records imported from Linear and work explicitly accepted by the `owner`. Historical verification evidence alone does not establish
|
|
221
|
+
final `owner` acceptance.
|
|
222
|
+
|
|
223
|
+
### MAESTRO-FREE-1: Require Pi 1.5.0
|
|
224
|
+
|
|
225
|
+
#### Objective
|
|
226
|
+
|
|
227
|
+
Adopt Pi 1.5.0 as the minimum supported host and verification baseline for [ADR-010](ADR.md#adr-010-use-the-pi-sdk-for-sequential-agent-delegation), without changing the
|
|
228
|
+
delegation engine or adding compatibility fallbacks.
|
|
229
|
+
|
|
230
|
+
#### Completed when
|
|
231
|
+
|
|
232
|
+
1. Declared requirements and the development verification environment use the selected Pi baseline consistently.
|
|
233
|
+
2. The existing extension and `pi-subagents` workflow continue to work on Pi 1.5.0.
|
|
234
|
+
|
|
235
|
+
#### Implementation and evidence
|
|
236
|
+
|
|
237
|
+
The `owner` confirmed completion. `README.md` declares Pi 1.5.0 as the minimum host. Development dependencies for the four Pi packages are pinned to 1.5.0, so type checks
|
|
238
|
+
and tests run against that baseline. Schema enums use TypeBox `Type.Enum` with an explicit string type. `npm run check` passes on 1.5.0, including the extension and
|
|
239
|
+
`pi-subagents` integration tests.
|
|
240
|
+
|
|
95
241
|
### MAESTRO-27: Make all implementation phases optional
|
|
96
242
|
|
|
97
243
|
#### Objective
|
|
@@ -114,10 +260,10 @@ remain required.
|
|
|
114
260
|
|
|
115
261
|
#### Implementation and evidence
|
|
116
262
|
|
|
117
|
-
Implemented under the [specification](.specs/20261103-161424-maestro-27-make-implementation-phases-optional/spec.md)
|
|
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
|
|
119
|
-
otherwise `verifier` and `simplifier` are independently optional. `Spec` preparation and approval remain required. The activation notice lists only enabled agents
|
|
120
|
-
agents when `builder` is disabled.
|
|
263
|
+
Implemented under the [specification](.specs/20261103-161424-maestro-27-make-implementation-phases-optional/spec.md). The `owner` confirmed completion. Each agent's
|
|
264
|
+
`required` boolean in `.pi/maestro.json` defaults to `true`. Flags are set before activation and remain unchanged during the workflow. Disabling `builder` skips all three
|
|
265
|
+
agents; otherwise `verifier` and `simplifier` are independently optional. `Spec` preparation and approval remain required. The activation notice lists only enabled agents
|
|
266
|
+
and no agents when `builder` is disabled.
|
|
121
267
|
|
|
122
268
|
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.
|
|
123
269
|
|
|
@@ -127,24 +273,6 @@ The [README](README.md#the-idea) presents the two uses of `Maestro`: writing and
|
|
|
127
273
|
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
274
|
for writing and approving a `spec`.
|
|
129
275
|
|
|
130
|
-
### MAESTRO-26: Exit Maestro mode automatically at workflow completion
|
|
131
|
-
|
|
132
|
-
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
|
|
133
|
-
simplification is skipped. Live tools, status, instructions, and active `spec` selection are cleared; saved workflow files and other extensions remain unchanged.
|
|
134
|
-
Intermediate phases and interrupted workflows do not trigger automatic exit.
|
|
135
|
-
|
|
136
|
-
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.
|
|
137
|
-
|
|
138
|
-
#### Evidence
|
|
139
|
-
|
|
140
|
-
[Changelog](CHANGELOG.md#0130), [merged PR #43](https://github.com/emilioSp/pi-maestro/pull/43),
|
|
141
|
-
[specification](.specs/20261030-145712-automatically-exit-maestro-mode-at-workflow-completion/spec.md), and
|
|
142
|
-
[original issue](https://linear.app/emilio-spatola/issue/MAESTRO-26/feat-exit-maestro-mode-automatically-at-workflow-completion).
|
|
143
|
-
|
|
144
|
-
## Completed
|
|
145
|
-
|
|
146
|
-
These entries were recorded as Done in Linear. Their historical verification evidence does not independently establish final `owner` acceptance.
|
|
147
|
-
|
|
148
276
|
### MAESTRO-7: Route builder failures through owner escalations
|
|
149
277
|
|
|
150
278
|
Route reportable `builder` problems through `owner` `escalations` instead of a terminal failure phase.
|
package/docs/configuration.md
CHANGED
|
@@ -17,45 +17,39 @@ For example, if Pi starts in `/work/app/src`, `Maestro` reads `/work/app/src/.pi
|
|
|
17
17
|
"builder": {
|
|
18
18
|
"required": true,
|
|
19
19
|
"model": "openai-codex/gpt-5.6-luna",
|
|
20
|
-
"thinking": "max"
|
|
21
|
-
"timeoutMinutes": 60
|
|
20
|
+
"thinking": "max"
|
|
22
21
|
},
|
|
23
22
|
"simplifier": {
|
|
24
23
|
"required": true,
|
|
25
24
|
"model": "openai-codex/gpt-6.1-sol",
|
|
26
|
-
"thinking": "high"
|
|
27
|
-
"timeoutMinutes": 60
|
|
25
|
+
"thinking": "high"
|
|
28
26
|
},
|
|
29
27
|
"verifier": {
|
|
30
28
|
"required": true,
|
|
31
29
|
"model": "openai-codex/gpt-6.1-sol",
|
|
32
|
-
"thinking": "high"
|
|
33
|
-
"timeoutMinutes": 60
|
|
30
|
+
"thinking": "high"
|
|
34
31
|
}
|
|
35
32
|
}
|
|
36
33
|
```
|
|
37
34
|
|
|
38
35
|
## Fields
|
|
39
36
|
|
|
40
|
-
| Field
|
|
41
|
-
|
|
|
42
|
-
| `version`
|
|
43
|
-
| `specDirectory`
|
|
44
|
-
| `builder`
|
|
45
|
-
| `builder.required`
|
|
46
|
-
| `builder.model`
|
|
47
|
-
| `builder.thinking`
|
|
48
|
-
| `
|
|
49
|
-
| `verifier`
|
|
50
|
-
| `verifier.
|
|
51
|
-
| `verifier.
|
|
52
|
-
| `
|
|
53
|
-
| `
|
|
54
|
-
| `simplifier`
|
|
55
|
-
| `simplifier.
|
|
56
|
-
| `simplifier.model` | No | `openai-codex/gpt-6.1-sol` | Model string passed unchanged to Pi. |
|
|
57
|
-
| `simplifier.thinking` | No | `high` | One supported thinking level. |
|
|
58
|
-
| `simplifier.timeoutMinutes` | No | `60` | Integer from `1` to `1440`. Applies to each `simplifier` `run`. |
|
|
37
|
+
| Field | Required | Default | Rules |
|
|
38
|
+
| --------------------- | ------------------------: | --------------------------- | -------------------------------------------------------- |
|
|
39
|
+
| `version` | Yes, when the file exists | `1.0.0` | Configuration format version. Only `1.0.0` is supported. |
|
|
40
|
+
| `specDirectory` | No | `.specs` | Relative path below the project root. |
|
|
41
|
+
| `builder` | No | `Builder` defaults | Overrides supported `builder` fields. |
|
|
42
|
+
| `builder.required` | No | `true` | Boolean selecting the `builder` phase. |
|
|
43
|
+
| `builder.model` | No | `openai-codex/gpt-5.6-luna` | Model string passed unchanged to Pi. |
|
|
44
|
+
| `builder.thinking` | No | `max` | One supported thinking level. |
|
|
45
|
+
| `verifier` | No | `Verifier` defaults | Overrides supported `verifier` fields. |
|
|
46
|
+
| `verifier.required` | No | `true` | Boolean selecting the `verifier` phase. |
|
|
47
|
+
| `verifier.model` | No | `openai-codex/gpt-6.1-sol` | Model string passed unchanged to Pi. |
|
|
48
|
+
| `verifier.thinking` | No | `high` | One supported thinking level. |
|
|
49
|
+
| `simplifier` | No | `Simplifier` defaults | Overrides supported `simplifier` fields. |
|
|
50
|
+
| `simplifier.required` | No | `true` | Boolean selecting the `simplifier` phase. |
|
|
51
|
+
| `simplifier.model` | No | `openai-codex/gpt-6.1-sol` | Model string passed unchanged to Pi. |
|
|
52
|
+
| `simplifier.thinking` | No | `high` | One supported thinking level. |
|
|
59
53
|
|
|
60
54
|
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
55
|
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`.
|
|
@@ -80,12 +74,12 @@ Only `version` is required when the file exists. Each other field overrides its
|
|
|
80
74
|
{
|
|
81
75
|
"version": "1.0.0",
|
|
82
76
|
"builder": {
|
|
83
|
-
"
|
|
77
|
+
"thinking": "high"
|
|
84
78
|
}
|
|
85
79
|
}
|
|
86
80
|
```
|
|
87
81
|
|
|
88
|
-
This example keeps every default except the `builder`
|
|
82
|
+
This example keeps every default except the `builder` thinking level.
|
|
89
83
|
|
|
90
84
|
## Phase selection
|
|
91
85
|
|
|
@@ -16,8 +16,8 @@ The package supplies all three roles and the tools that save their results:
|
|
|
16
16
|
Each `run` starts with a fresh conversation, not the main session's conversation history. All three agents inherit project instructions, the owner's global `AGENTS.md`,
|
|
17
17
|
and available skills. The global file normally lives at `~/.pi/agent/AGENTS.md`.
|
|
18
18
|
|
|
19
|
-
`Maestro` supplies the `spec` ID, project directory, model, thinking level
|
|
20
|
-
|
|
19
|
+
`Maestro` supplies the `spec` ID, project directory, model, and thinking level. The agents read all approved documents (`proposal.md`, `spec.md`, and `design.md` when
|
|
20
|
+
present) and saved `artifacts` to understand the work. Earlier `artifacts` provide context, not proof.
|
|
21
21
|
|
|
22
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
23
|
`builder` completion. The enabled `simplifier` follows the selected preceding phases. Disabled agents are not delegated. See
|
|
@@ -38,8 +38,8 @@ If a `run` fails or returns without a valid saved result, `Maestro` reports the
|
|
|
38
38
|
## External configuration
|
|
39
39
|
|
|
40
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
|
|
42
|
-
configuration remains the owner's responsibility.
|
|
41
|
+
`Builder`, `verifier`, and `simplifier` model choices and thinking levels come from [Maestro configuration](configuration.md). `Maestro` does not supply a per-agent
|
|
42
|
+
deadline. Other `pi-subagents` configuration remains the owner's responsibility.
|
|
43
43
|
|
|
44
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
|
|
45
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@emiliosp/pi-maestro",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.16.0",
|
|
4
4
|
"description": "A spec-driven multiagent development workflow for Pi.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"orchestration",
|
|
@@ -66,8 +66,8 @@
|
|
|
66
66
|
"pi-subagents": "0.78.0"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
69
|
-
"@earendil-works/pi-
|
|
70
|
-
"@earendil-works/pi-tui": "1.0
|
|
69
|
+
"@earendil-works/pi-ai": "1.5.0",
|
|
70
|
+
"@earendil-works/pi-tui": "1.5.0",
|
|
71
71
|
"@types/node": "26.6.4",
|
|
72
72
|
"@vitest/coverage-v8": "5.0.3",
|
|
73
73
|
"oxfmt": "0.73.0",
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Used: When Maestro handles builder handoff artifacts.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { StringEnum } from '@earendil-works/pi-ai';
|
|
7
6
|
import { type Static, Type } from 'typebox';
|
|
8
7
|
|
|
9
8
|
import { SPEC_ID_PATTERN } from '#ids/isValidSpecId.ts';
|
|
@@ -26,7 +25,7 @@ export const PROBE_STATUSES = {
|
|
|
26
25
|
|
|
27
26
|
export type ProbeStatus = (typeof PROBE_STATUSES)[keyof typeof PROBE_STATUSES];
|
|
28
27
|
|
|
29
|
-
const ProbeStatusSchema =
|
|
28
|
+
const ProbeStatusSchema = Type.Enum(PROBE_STATUSES, { type: 'string' });
|
|
30
29
|
|
|
31
30
|
export const BuilderAcceptanceCriterionSchema = Type.Object(
|
|
32
31
|
{
|
|
@@ -6,9 +6,7 @@
|
|
|
6
6
|
import { Value } from 'typebox/value';
|
|
7
7
|
|
|
8
8
|
import {
|
|
9
|
-
MAX_TIMEOUT_MINUTES,
|
|
10
9
|
MaestroConfigInputSchema,
|
|
11
|
-
MIN_TIMEOUT_MINUTES,
|
|
12
10
|
type PartialMaestroConfig,
|
|
13
11
|
SUPPORTED_CONFIG_VERSION,
|
|
14
12
|
THINKING_LEVELS,
|
|
@@ -34,10 +32,6 @@ const formatError = (error: SchemaValidationError): string => {
|
|
|
34
32
|
return `Invalid thinking level at "${path}". Allowed: ${Object.values(THINKING_LEVELS).join(', ')}.`;
|
|
35
33
|
}
|
|
36
34
|
|
|
37
|
-
if (path.endsWith('timeoutMinutes')) {
|
|
38
|
-
return `Invalid timeout at "${path}". Must be an integer between ${MIN_TIMEOUT_MINUTES} and ${MAX_TIMEOUT_MINUTES}.`;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
35
|
if (path.endsWith('model')) {
|
|
42
36
|
return `Invalid model at "${path}": expected a string.`;
|
|
43
37
|
}
|
package/src/config/defaults.ts
CHANGED
|
@@ -19,8 +19,6 @@ export const DEFAULT_VERIFIER_THINKING = THINKING_LEVELS.HIGH;
|
|
|
19
19
|
|
|
20
20
|
export const DEFAULT_SIMPLIFIER_MODEL = 'openai-codex/gpt-6.1-sol';
|
|
21
21
|
|
|
22
|
-
export const DEFAULT_TIMEOUT_MINUTES = 60;
|
|
23
|
-
|
|
24
22
|
export const CONFIG_DIRECTORY_NAME = '.pi';
|
|
25
23
|
|
|
26
24
|
export const CONFIG_FILE_NAME = 'maestro.json';
|
|
@@ -34,18 +32,15 @@ export const DEFAULT_CONFIG: MaestroConfig = {
|
|
|
34
32
|
required: true,
|
|
35
33
|
model: DEFAULT_BUILDER_MODEL,
|
|
36
34
|
thinking: DEFAULT_BUILDER_THINKING,
|
|
37
|
-
timeoutMinutes: DEFAULT_TIMEOUT_MINUTES,
|
|
38
35
|
},
|
|
39
36
|
simplifier: {
|
|
40
37
|
required: true,
|
|
41
38
|
model: DEFAULT_SIMPLIFIER_MODEL,
|
|
42
39
|
thinking: THINKING_LEVELS.HIGH,
|
|
43
|
-
timeoutMinutes: DEFAULT_TIMEOUT_MINUTES,
|
|
44
40
|
},
|
|
45
41
|
verifier: {
|
|
46
42
|
required: true,
|
|
47
43
|
model: DEFAULT_VERIFIER_MODEL,
|
|
48
44
|
thinking: DEFAULT_VERIFIER_THINKING,
|
|
49
|
-
timeoutMinutes: DEFAULT_TIMEOUT_MINUTES,
|
|
50
45
|
},
|
|
51
46
|
};
|
package/src/config/schema.ts
CHANGED
|
@@ -25,10 +25,6 @@ export type ThinkingLevel = (typeof THINKING_LEVELS)[keyof typeof THINKING_LEVEL
|
|
|
25
25
|
|
|
26
26
|
export const SUPPORTED_CONFIG_VERSION = '1.0.0';
|
|
27
27
|
|
|
28
|
-
export const MIN_TIMEOUT_MINUTES = 1;
|
|
29
|
-
|
|
30
|
-
export const MAX_TIMEOUT_MINUTES = 1440;
|
|
31
|
-
|
|
32
28
|
export const ThinkingSchema = Type.Union([
|
|
33
29
|
Type.Literal(THINKING_LEVELS.OFF),
|
|
34
30
|
Type.Literal(THINKING_LEVELS.MINIMAL),
|
|
@@ -44,12 +40,6 @@ export const PartialAgentConfigSchema = Type.Object(
|
|
|
44
40
|
required: Type.Optional(Type.Boolean()),
|
|
45
41
|
model: Type.Optional(Type.String()),
|
|
46
42
|
thinking: Type.Optional(ThinkingSchema),
|
|
47
|
-
timeoutMinutes: Type.Optional(
|
|
48
|
-
Type.Integer({
|
|
49
|
-
minimum: MIN_TIMEOUT_MINUTES,
|
|
50
|
-
maximum: MAX_TIMEOUT_MINUTES,
|
|
51
|
-
}),
|
|
52
|
-
),
|
|
53
43
|
},
|
|
54
44
|
{ additionalProperties: false },
|
|
55
45
|
);
|
|
@@ -70,10 +60,6 @@ export const ResolvedAgentConfigSchema = Type.Object(
|
|
|
70
60
|
required: Type.Boolean(),
|
|
71
61
|
model: Type.String(),
|
|
72
62
|
thinking: ThinkingSchema,
|
|
73
|
-
timeoutMinutes: Type.Integer({
|
|
74
|
-
minimum: MIN_TIMEOUT_MINUTES,
|
|
75
|
-
maximum: MAX_TIMEOUT_MINUTES,
|
|
76
|
-
}),
|
|
77
63
|
},
|
|
78
64
|
{ additionalProperties: false },
|
|
79
65
|
);
|
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
* Used: When the owner invokes the resolve-findings tool.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { StringEnum } from '@earendil-works/pi-ai';
|
|
7
6
|
import type { ExtensionAPI } from '@earendil-works/pi-coding-agent';
|
|
8
7
|
import { Type } from 'typebox';
|
|
9
8
|
|
|
@@ -27,7 +26,7 @@ const FindingDecisionFields = {
|
|
|
27
26
|
const RejectFindingDecisionSchema = Type.Object(
|
|
28
27
|
{
|
|
29
28
|
...FindingDecisionFields,
|
|
30
|
-
decision:
|
|
29
|
+
decision: Type.Enum([FINDING_DECISIONS.REJECT] as const, { type: 'string' }),
|
|
31
30
|
reason: Type.String({ minLength: 1 }),
|
|
32
31
|
},
|
|
33
32
|
{
|
|
@@ -38,7 +37,7 @@ const RejectFindingDecisionSchema = Type.Object(
|
|
|
38
37
|
const FixCodeFindingDecisionSchema = Type.Object(
|
|
39
38
|
{
|
|
40
39
|
...FindingDecisionFields,
|
|
41
|
-
decision:
|
|
40
|
+
decision: Type.Enum([FINDING_DECISIONS.FIX_CODE] as const, { type: 'string' }),
|
|
42
41
|
},
|
|
43
42
|
{
|
|
44
43
|
additionalProperties: false,
|
|
@@ -48,7 +47,7 @@ const FixCodeFindingDecisionSchema = Type.Object(
|
|
|
48
47
|
const ReviseSpecFindingDecisionSchema = Type.Object(
|
|
49
48
|
{
|
|
50
49
|
...FindingDecisionFields,
|
|
51
|
-
decision:
|
|
50
|
+
decision: Type.Enum([FINDING_DECISIONS.REVISE_SPEC] as const, { type: 'string' }),
|
|
52
51
|
reason: Type.String({ minLength: 1, pattern: '\\S' }),
|
|
53
52
|
specChange: Type.String({ minLength: 1, pattern: '\\S' }),
|
|
54
53
|
},
|
|
@@ -20,6 +20,7 @@ import { refreshMaestroStatus } from '#maestro/status/refreshMaestroStatus.ts';
|
|
|
20
20
|
import type { MaestroPaths } from '#MaestroPaths.ts';
|
|
21
21
|
import {
|
|
22
22
|
assertDelegationResponse,
|
|
23
|
+
SUBAGENT_TIMEOUT_MS,
|
|
23
24
|
waitForDelegationResponse,
|
|
24
25
|
} from '#tools/utils/pi-subagent-delegation.ts';
|
|
25
26
|
import { resolveToolRunContext } from '#tools/utils/resolveToolRunContext.ts';
|
|
@@ -43,8 +44,6 @@ const RunBuilderToolParameters = Type.Object(
|
|
|
43
44
|
{ additionalProperties: false },
|
|
44
45
|
);
|
|
45
46
|
|
|
46
|
-
const MILLISECONDS_PER_MINUTE = 60_000;
|
|
47
|
-
|
|
48
47
|
type BuilderRunResult =
|
|
49
48
|
| {
|
|
50
49
|
outcome: typeof BUILDER_HANDOFF_STATUSES.DONE;
|
|
@@ -186,7 +185,7 @@ export const registerRunBuilderTool = (pi: ExtensionAPI): void => {
|
|
|
186
185
|
cwd: projectRoot,
|
|
187
186
|
model: config.builder.model,
|
|
188
187
|
thinking: config.builder.thinking,
|
|
189
|
-
timeoutMs:
|
|
188
|
+
timeoutMs: SUBAGENT_TIMEOUT_MS,
|
|
190
189
|
result: { kind: 'text' },
|
|
191
190
|
};
|
|
192
191
|
|
|
@@ -16,6 +16,7 @@ import { refreshMaestroStatus } from '#maestro/status/refreshMaestroStatus.ts';
|
|
|
16
16
|
import type { MaestroPaths } from '#MaestroPaths.ts';
|
|
17
17
|
import {
|
|
18
18
|
assertDelegationResponse,
|
|
19
|
+
SUBAGENT_TIMEOUT_MS,
|
|
19
20
|
waitForDelegationResponse,
|
|
20
21
|
} from '#tools/utils/pi-subagent-delegation.ts';
|
|
21
22
|
import { resolveToolRunContext } from '#tools/utils/resolveToolRunContext.ts';
|
|
@@ -37,8 +38,6 @@ const RunSimplifierToolParameters = Type.Object(
|
|
|
37
38
|
{ additionalProperties: false },
|
|
38
39
|
);
|
|
39
40
|
|
|
40
|
-
const MILLISECONDS_PER_MINUTE = 60_000;
|
|
41
|
-
|
|
42
41
|
const GIT_SKIP_WARNING = 'Simplifier skipped: Git repository unavailable.';
|
|
43
42
|
|
|
44
43
|
type GitReadinessInput = {
|
|
@@ -147,7 +146,7 @@ export const registerRunSimplifierTool = (pi: ExtensionAPI): void => {
|
|
|
147
146
|
cwd: projectRoot,
|
|
148
147
|
model: config.simplifier.model,
|
|
149
148
|
thinking: config.simplifier.thinking,
|
|
150
|
-
timeoutMs:
|
|
149
|
+
timeoutMs: SUBAGENT_TIMEOUT_MS,
|
|
151
150
|
result: { kind: 'text' },
|
|
152
151
|
};
|
|
153
152
|
|
|
@@ -17,6 +17,7 @@ import { refreshMaestroStatus } from '#maestro/status/refreshMaestroStatus.ts';
|
|
|
17
17
|
import type { MaestroPaths } from '#MaestroPaths.ts';
|
|
18
18
|
import {
|
|
19
19
|
assertDelegationResponse,
|
|
20
|
+
SUBAGENT_TIMEOUT_MS,
|
|
20
21
|
waitForDelegationResponse,
|
|
21
22
|
} from '#tools/utils/pi-subagent-delegation.ts';
|
|
22
23
|
import { resolveToolRunContext } from '#tools/utils/resolveToolRunContext.ts';
|
|
@@ -40,8 +41,6 @@ const RunVerifierToolParameters = Type.Object(
|
|
|
40
41
|
{ additionalProperties: false },
|
|
41
42
|
);
|
|
42
43
|
|
|
43
|
-
const MILLISECONDS_PER_MINUTE = 60_000;
|
|
44
|
-
|
|
45
44
|
type VerifierTerminalPhase =
|
|
46
45
|
| typeof WORKFLOW_PHASES.CANDIDATE_READY
|
|
47
46
|
| typeof WORKFLOW_PHASES.SIMPLIFIER_RUNNING
|
|
@@ -149,7 +148,7 @@ export const registerRunVerifierTool = (pi: ExtensionAPI): void => {
|
|
|
149
148
|
cwd: run.projectRoot,
|
|
150
149
|
model: config.verifier.model,
|
|
151
150
|
thinking: config.verifier.thinking,
|
|
152
|
-
timeoutMs:
|
|
151
|
+
timeoutMs: SUBAGENT_TIMEOUT_MS,
|
|
153
152
|
result: { kind: 'text' },
|
|
154
153
|
};
|
|
155
154
|
|
|
@@ -13,6 +13,9 @@ import {
|
|
|
13
13
|
|
|
14
14
|
// pi-subagents exports SubagentDelegationStatus as a type, not runtime values.
|
|
15
15
|
// TypeScript erases the type, so the adapter needs these constants for comparisons.
|
|
16
|
+
// Fixed deadline passed to pi-subagents in place of the removed per-agent timeout configuration.
|
|
17
|
+
export const SUBAGENT_TIMEOUT_MS = 9_999 * 60_000;
|
|
18
|
+
|
|
16
19
|
export const DELEGATION_STATUSES = {
|
|
17
20
|
COMPLETED: 'completed',
|
|
18
21
|
FAILED: 'failed',
|