@emiliosp/pi-maestro 0.11.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) hide show
  1. package/ADR.md +82 -23
  2. package/CHANGELOG.md +48 -28
  3. package/MISSION.md +2 -4
  4. package/README.md +55 -25
  5. package/TECH_STACK.md +3 -3
  6. package/agents/builder.md +53 -57
  7. package/agents/simplifier.md +79 -61
  8. package/agents/verifier.md +52 -64
  9. package/docs/configuration.md +1 -1
  10. package/docs/glossary.md +43 -40
  11. package/docs/subagent-integration.md +7 -8
  12. package/docs/workflow.md +137 -63
  13. package/extensions/maestro-subagent.ts +1 -0
  14. package/extensions/maestro.ts +60 -30
  15. package/package.json +38 -40
  16. package/src/MaestroPaths.ts +22 -35
  17. package/src/artifacts/builder-handoff/assertBuilderHandoff.ts +6 -15
  18. package/src/artifacts/builder-handoff/schema.ts +3 -6
  19. package/src/artifacts/simplifier-handoff/assertSimplifierHandoff.ts +3 -3
  20. package/src/artifacts/simplifier-handoff/schema.ts +1 -0
  21. package/src/artifacts/verifier-handoff/assertVerifierHandoff.ts +4 -10
  22. package/src/artifacts/verifier-handoff/schema.ts +3 -6
  23. package/src/artifacts/verifier-handoff/writeVerifierHandoff.ts +1 -3
  24. package/src/config/assertConfiguration.ts +3 -6
  25. package/src/config/defaults.ts +1 -5
  26. package/src/config/loadConfiguration.ts +4 -11
  27. package/src/config/schema.ts +1 -2
  28. package/src/ids/createSpecId.ts +1 -2
  29. package/src/ids/isValidSpecId.ts +1 -2
  30. package/src/maestro/checks/assertEnvironment.ts +19 -50
  31. package/src/maestro/instructions/getMaestroInstructions.ts +47 -26
  32. package/src/maestro/session/MaestroSessionState.ts +15 -0
  33. package/src/maestro/status/formatMaestroStatus.ts +4 -13
  34. package/src/maestro/status/refreshMaestroStatus.ts +3 -7
  35. package/src/specs/create.ts +14 -4
  36. package/src/specs/template.ts +10 -14
  37. package/src/tools/child/record-builder-handoff.ts +1 -0
  38. package/src/tools/child/record-simplifier-handoff.ts +4 -4
  39. package/src/tools/child/record-verifier-handoff.ts +2 -3
  40. package/src/tools/child/utils/resolveWorkflowContext.ts +1 -4
  41. package/src/tools/main/create-spec.ts +3 -2
  42. package/src/tools/main/mark-spec-ready.ts +2 -1
  43. package/src/tools/main/resolve-escalations.ts +1 -0
  44. package/src/tools/main/resolve-findings.ts +6 -20
  45. package/src/tools/main/run-builder.ts +37 -57
  46. package/src/tools/main/run-simplifier.ts +10 -20
  47. package/src/tools/main/run-verifier.ts +31 -55
  48. package/src/tools/utils/pi-subagent-delegation.ts +13 -22
  49. package/src/tools/utils/resolveToolRunContext.ts +2 -3
  50. package/src/utils/is-errno-exception.ts +1 -3
  51. package/src/utils/path-exists.ts +1 -0
  52. package/src/utils/path-strictly-within.ts +3 -6
  53. package/src/utils/path-within-or-equal.ts +1 -4
  54. package/src/utils/read-json.ts +1 -4
  55. package/src/utils/write-json.ts +1 -4
  56. package/src/workflow/builder/completeBuilderPass.ts +3 -2
  57. package/src/workflow/builder/prepareBuilderRun.ts +3 -8
  58. package/src/workflow/builder/resolveEscalations.ts +2 -6
  59. package/src/workflow/builder/utils/getWorkflowEventByBuilderHandoff.ts +1 -3
  60. package/src/workflow/simplifier/completeSimplifierPass.ts +2 -3
  61. package/src/workflow/spec/markSpecReady.ts +10 -4
  62. package/src/workflow/state/readWorkflowState.ts +2 -7
  63. package/src/workflow/state/schema.ts +5 -10
  64. package/src/workflow/state/writeWorkflowState.ts +1 -4
  65. package/src/workflow/transitions.ts +3 -11
  66. package/src/workflow/utils/assertSpecAcceptanceCriteria.ts +2 -1
  67. package/src/workflow/utils/getAgentRole.ts +1 -3
  68. package/src/workflow/verifier/completeVerifierPass.ts +1 -0
  69. package/src/workflow/verifier/resolveFindings.ts +9 -29
  70. package/src/workflow/verifier/utils/getWorkflowEventByVerifierHandoff.ts +5 -20
  71. package/templates/design.md +20 -0
  72. package/templates/proposal.md +23 -0
  73. package/templates/spec.md +21 -50
  74. package/ROADMAP.md +0 -319
package/ADR.md CHANGED
@@ -1,9 +1,8 @@
1
1
  # Architecture decision records
2
2
 
3
- An Architecture Decision Record (ADR) explains an important architectural choice, its context, and its consequences.
4
- This file contains one numbered record per decision.
3
+ An Architecture Decision Record (ADR) explains an important architectural choice, its context, and its consequences. This file contains one numbered record per decision.
5
4
 
6
- Requirements and routine project rules belong in the [roadmap](ROADMAP.md) or other relevant documentation.
5
+ Requirements and routine project rules belong in the [roadmap](https://linear.app/emilio-spatola/team/MAESTRO/overview) or other relevant documentation.
7
6
 
8
7
  When a new decision replaces an accepted decision, add a new record, mark the earlier record as superseded, and link both records.
9
8
 
@@ -31,8 +30,8 @@ manual `owner` handling.
31
30
 
32
31
  ### Evidence
33
32
 
34
- [Commit deae41c](https://github.com/emilioSp/pi-maestro/commit/deae41ce66a3f2c76859209c44165e7ddd0f3a72), [Changelog 0.6.0](CHANGELOG.md#060),
35
- and [workflow completion](docs/workflow.md#workflow-completion).
33
+ [Commit deae41c](https://github.com/emilioSp/pi-maestro/commit/deae41ce66a3f2c76859209c44165e7ddd0f3a72), [Changelog 0.6.0](CHANGELOG.md#060), and
34
+ [workflow completion](docs/workflow.md#workflow-completion).
36
35
 
37
36
  ## ADR-002: Store escalation decisions in builder handoffs
38
37
 
@@ -59,8 +58,8 @@ There are no migration procedures, fallback readers, or deprecated aliases. `Art
59
58
 
60
59
  ### Evidence
61
60
 
62
- [Repository-only specification](.specs/20261008-132344-store-escalations-in-builder-handoffs/spec.md), [Commit dda6eb5](https://github.com/emilioSp/pi-maestro/commit/dda6eb5b3ab76ba175112c3c565c70be747d7344),
63
- and [escalation workflow](docs/workflow.md#escalations).
61
+ [Repository-only specification](.specs/20261008-132344-store-escalations-in-builder-handoffs/spec.md),
62
+ [Commit dda6eb5](https://github.com/emilioSp/pi-maestro/commit/dda6eb5b3ab76ba175112c3c565c70be747d7344), and [escalation workflow](docs/workflow.md#escalations).
64
63
 
65
64
  ## ADR-003: Route builder failures through owner escalations
66
65
 
@@ -70,36 +69,31 @@ Accepted. Implemented.
70
69
 
71
70
  ### Context
72
71
 
73
- The `owner` must decide how work continues after a reportable technical problem.
74
- The workflow also needs a simpler model with two `builder` outcomes.
72
+ The `owner` must decide how work continues after a reportable technical problem. The workflow also needs a simpler model with two `builder` outcomes.
75
73
 
76
74
  ### Decision
77
75
 
78
- The `builder` reports only `done` or `escalation`.
79
- Reportable technical failures use the existing `escalation` process.
80
- The `owner` decides how to proceed instead of reaching a terminal failure phase.
76
+ The `builder` reports only `done` or `escalation`. Reportable technical failures use the existing `escalation` process. The `owner` decides how to proceed instead of
77
+ reaching a terminal failure phase.
81
78
 
82
79
  ### Consequences
83
80
 
84
- Reuse the existing tools, numbered `handoffs`, and batch decisions.
85
- Individual `probe` results retain `failed` as a valid value.
81
+ Reuse the existing tools, numbered `handoffs`, and batch decisions. Individual `probe` results retain `failed` as a valid value.
86
82
 
87
- Execution and protocol errors without a valid saved result still stop the workflow.
88
- This decision adds no automatic recovery.
83
+ Execution and protocol errors without a valid saved result still stop the workflow. This decision adds no automatic recovery.
89
84
 
90
85
  This breaking MVP change has no migrations, compatibility readers, deprecated aliases, or dedicated legacy-format tests.
91
86
 
92
87
  ### Evidence
93
88
 
94
- [Specification](.specs/20261013-101454-route-builder-failures-through-owner-escalations/spec.md)
95
- and [R-03](ROADMAP.md#r-03-route-builder-failures-through-owner-escalations).
89
+ [Specification](.specs/20261013-101454-route-builder-failures-through-owner-escalations/spec.md) and
90
+ [MAESTRO-7](https://linear.app/emilio-spatola/issue/MAESTRO-7/route-builder-failures-through-owner-escalations).
96
91
 
97
92
  ## ADR-004: Require Git only for the simplifier
98
93
 
99
94
  ### Status
100
95
 
101
- Accepted. Implemented through R-21.
102
- Supersedes [ADR-001](#adr-001-keep-the-workflow-independent-of-git).
96
+ Accepted. Implemented through MAESTRO-24. Supersedes [ADR-001](#adr-001-keep-the-workflow-independent-of-git).
103
97
 
104
98
  ### Context
105
99
 
@@ -125,9 +119,74 @@ without an error. The skip transition is defined in `src/workflow/transitions.ts
125
119
  Activation does not predict whether simplification will be skipped. The same readiness decision applies after successful verification and after the `owner` rejects all
126
120
  current `findings`. Rejected `findings` retain their reasons and do not become passed verification.
127
121
 
128
- The `simplifier` uses Git to select all staged, unstaged, and untracked code changes, including pre-existing changes.
129
- There is no spec-specific starting commit or `builder` file list. Required caller updates can include initially unchanged files.
122
+ The `simplifier` uses Git to select all staged, unstaged, and untracked code changes, including pre-existing changes. There is no spec-specific starting commit or
123
+ `builder` file list. Required caller updates can include initially unchanged files.
130
124
 
131
125
  ### Evidence
132
126
 
133
- [R-21](ROADMAP.md#r-21-add-a-simplifier-with-one-clear-purpose-per-agent) and the [specification](.specs/20261016-090319-add-a-dedicated-simplifier-after-verification/spec.md).
127
+ [MAESTRO-24](https://linear.app/emilio-spatola/issue/MAESTRO-24/add-a-simplifier-with-one-clear-purpose-per-agent) and the
128
+ [specification](.specs/20261016-090319-add-a-dedicated-simplifier-after-verification/spec.md).
129
+
130
+ ## ADR-005: Approve a specification document set as one contract
131
+
132
+ ### Status
133
+
134
+ Accepted. Implemented.
135
+
136
+ ### Context
137
+
138
+ Combining motivation, behavior, and technical decisions in one `spec.md` made the document difficult to navigate. The `owner` selected separate documents by purpose, with
139
+ `acceptance criteria` next to their requirements rather than collected at the end.
140
+
141
+ ### Decision
142
+
143
+ Each new `spec` has required `proposal.md` for motivation and scope and `spec.md` for behavior and `acceptance criteria`. `Maestro` creates `design.md` only when
144
+ significant approved technical decisions need recording. Routine implementation choices remain with the `builder`.
145
+
146
+ One `GREEN FLAG` approves all present documents together. The entire set and its prototypes remain frozen during agent execution. Revision uses the existing
147
+ `drafting-spec` flow and renewed approval of the complete set. No per-document approval or new workflow phase is introduced.
148
+
149
+ Requirements keep level-three `REQ` headings. Their `acceptance criteria` use level-four AC headings. Relevant standalone regression criteria use level-three AC headings
150
+ under an optional `Regression checks` section, without a requirement or `Delta` field. All criteria share continuous numbering across the document. Shared criteria are
151
+ defined once and linked from other requirements.
152
+
153
+ ### Consequences
154
+
155
+ Creation saves the proposal and behavioral `spec`, returns their paths and the optional design path, and leaves design creation to drafting. Approval requires the
156
+ proposal. All three agent roles read every present document and must not create or modify a design after approval.
157
+
158
+ Freezing continues to rely on agent instructions, without a file-hash manifest or file locks. Saved workflow and `handoff` formats are unchanged. Level-three standalone
159
+ regression AC headings and nested level-four headings are both recognized. Historical `specs` are not migrated; older drafts need manual `owner` handling before new
160
+ approval.
161
+
162
+ ### Evidence
163
+
164
+ [Document workflow](docs/workflow.md#specification-documents), [creation](src/specs/create.ts), [approval](src/workflow/spec/markSpecReady.ts), and
165
+ [templates](templates/).
166
+
167
+ ## ADR-006: Maintain the roadmap in Linear
168
+
169
+ ### Status
170
+
171
+ Accepted. Implemented.
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).
package/CHANGELOG.md CHANGED
@@ -3,6 +3,26 @@
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.0
7
+
8
+ 1. Automatically turn off `Maestro` after successfully delivering the final summary of a completed workflow, including when Git is unavailable and simplification is
9
+ skipped. Clear live tools, status, instructions, and active `spec` selection while preserving saved workflow files and other extensions. See
10
+ [MAESTRO-26](https://linear.app/emilio-spatola/issue/MAESTRO-26).
11
+
12
+ ## 0.12.0
13
+
14
+ 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
15
+ existing test scenarios. Review checks complete coverage and current links, including during revisions. Approval validation and `handoff` formats remain unchanged.
16
+ 2. Added per-requirement `Delta` labels: `added`, `modified`, and `removed`. Modified or removed behavior can include a brief, evidence-based `Before` description when
17
+ useful. Requirements state the complete required outcome; unchanged behavior remains implicit. Approval validation and `handoff` formats remain unchanged.
18
+ 3. Split new `specs` into required `proposal.md` and `spec.md`, with optional `design.md`. One `GREEN FLAG` approves and freezes the present document set; all agent roles
19
+ read it. Creation returns the new document paths; approval requires the proposal. Historical documents are not migrated.
20
+ 4. Placed requirement-associated `acceptance criteria` under their requirements as level-four headings. Relevant standalone regression criteria use level-three headings
21
+ under optional `Regression checks`, without inventing unchanged requirements. Both forms share global numbering and are required in `handoffs`. Workflow phases and
22
+ saved report formats remain unchanged.
23
+ 5. Removed the `Coverage` classification field from current `acceptance criteria`. Each criterion retains its `probe`, `expected result`, and example. Standalone
24
+ regression checks remain identified by their section; validation and report formats are unchanged.
25
+
6
26
  ## 0.11.0
7
27
 
8
28
  1. Added the `simplifier` after successful verification or rejection of all current `findings`, without another approval or verification cycle.
@@ -18,8 +38,8 @@ GitHub Releases are not required.
18
38
 
19
39
  ## 0.10.0
20
40
 
21
- 1. Saved complete `owner` decision batches in their original `handoffs` before changing phase, including when the `spec` requires revision.
22
- See [PR #38](https://github.com/emilioSp/pi-maestro/pull/38).
41
+ 1. Saved complete `owner` decision batches in their original `handoffs` before changing phase, including when the `spec` requires revision. See
42
+ [PR #38](https://github.com/emilioSp/pi-maestro/pull/38).
23
43
  2. Added `revise-spec` decisions for `verifier` `findings`, with the owner's reason and agreed requirement change. Revision takes priority over code fixes and rejections.
24
44
  3. Unified both revision paths through `drafting-spec`, with renewed `GREEN FLAG` before separate approval and another `builder` `run`. Approval is allowed only from
25
45
  `drafting-spec`.
@@ -30,24 +50,24 @@ GitHub Releases are not required.
30
50
 
31
51
  ## 0.9.5
32
52
 
33
- 1. Added a shared check that requires every approved `spec` criterion ID in `builder` and `verifier` `handoffs`.
34
- See [PR #37](https://github.com/emilioSp/pi-maestro/pull/37).
53
+ 1. Added a shared check that requires every approved `spec` criterion ID in `builder` and `verifier` `handoffs`. See
54
+ [PR #37](https://github.com/emilioSp/pi-maestro/pull/37).
35
55
  2. Missing IDs reject submission before saving a report or changing phase. Extra report IDs remain allowed, and existing report validation is unchanged.
36
56
  3. Reused the raw heading rule `^### AC(\d+):`, including leading zeros and matching lines inside code blocks. No matching headings impose no new restriction.
37
57
  4. Added unit tests for extraction and one missing-ID integration test per role.
38
58
 
39
59
  ## 0.9.4
40
60
 
41
- 1. Added numbering validation to `spec` approval. Matched `acceptance criterion` headings must start at `AC1` and continue without gaps.
42
- See [PR #36](https://github.com/emilioSp/pi-maestro/pull/36).
61
+ 1. Added numbering validation to `spec` approval. Matched `acceptance criterion` headings must start at `AC1` and continue without gaps. See
62
+ [PR #36](https://github.com/emilioSp/pi-maestro/pull/36).
43
63
  2. Invalid numbering rejects approval before saving the workflow and leaves all saved files unchanged. No matching headings still permits approval.
44
64
  3. Added `Maestro` guidance to correct only numbering and affected references, then retry with the existing `GREEN FLAG`. No additional `owner` approval is required
45
65
  before starting the `builder`.
46
66
 
47
67
  ## 0.9.3
48
68
 
49
- 1. Added a parent `pi-subagents` availability check during activation. A matching successful version 1 `ping` reply is required within 2000 ms.
50
- See [PR #35](https://github.com/emilioSp/pi-maestro/pull/35).
69
+ 1. Added a parent `pi-subagents` availability check during activation. A matching successful version 1 `ping` reply is required within 2000 ms. See
70
+ [PR #35](https://github.com/emilioSp/pi-maestro/pull/35).
51
71
  2. Failed or invalid replies, emission errors, and timeouts prevent activation. The error includes "Maestro flow requires pi-subagents installed in the Pi environment."
52
72
  The check makes no automatic retry.
53
73
  3. Preserved existing activation checks, UI-only notices, and unchanged session history. The availability check starts no agent, makes no model request, and does not run
@@ -55,23 +75,23 @@ GitHub Releases are not required.
55
75
 
56
76
  ## 0.9.2
57
77
 
58
- 1. Added code-quality review to `verifier` guidance for code affected by the approved change when applicable `AGENTS.md` directives exist.
59
- See [PR #34](https://github.com/emilioSp/pi-maestro/pull/34). All existing verification duties remain unchanged.
78
+ 1. Added code-quality review to `verifier` guidance for code affected by the approved change when applicable `AGENTS.md` directives exist. See
79
+ [PR #34](https://github.com/emilioSp/pi-maestro/pull/34). All existing verification duties remain unchanged.
60
80
  2. Required instruction-violation `findings` to identify the instruction file, quote the rule, and explain the violating code through existing evidence fields.
61
81
  3. Skip only the added review when files or code-quality directives are absent. Missing directives and personal style preferences do not produce `findings`.
62
82
 
63
83
  ## 0.9.1
64
84
 
65
- 1. Added a brief introduction and an invitation to ask how `Maestro` works to the successful activation notice.
66
- See [PR #33](https://github.com/emilioSp/pi-maestro/pull/33).
85
+ 1. Added a brief introduction and an invitation to ask how `Maestro` works to the successful activation notice. See
86
+ [PR #33](https://github.com/emilioSp/pi-maestro/pull/33).
67
87
  2. Preserved the configured agent details and UI-only activation. Activation does not add session history or start a model request.
68
88
  3. Added absolute paths to the installed README and documentation directory in active instructions. `Maestro` reads relevant documentation on demand without automatically
69
89
  loading its contents.
70
90
 
71
91
  ## 0.9.0
72
92
 
73
- 1. Breaking: `builder` reports now support only `done` and `escalation`. Reportable technical problems use the existing `owner` `escalation` process.
74
- See [PR #32](https://github.com/emilioSp/pi-maestro/pull/32).
93
+ 1. Breaking: `builder` reports now support only `done` and `escalation`. Reportable technical problems use the existing `owner` `escalation` process. See
94
+ [PR #32](https://github.com/emilioSp/pi-maestro/pull/32).
75
95
  2. Removed the terminal `builder` failure phase and event. Execution errors and missing or invalid saved results still stop the workflow without automatic recovery.
76
96
  3. No migrations, compatibility readers, or deprecated aliases are provided. `Artifact` versions remain `1.0.0`.
77
97
 
@@ -82,8 +102,8 @@ GitHub Releases are not required.
82
102
 
83
103
  ## 0.7.3
84
104
 
85
- 1. Added Oxlint rules for `given ... when ... then ...` test titles, `const` usage, unnecessary `else` branches, type aliases, and ESM imports.
86
- See [PR #31](https://github.com/emilioSp/pi-maestro/pull/31).
105
+ 1. Added Oxlint rules for `given ... when ... then ...` test titles, `const` usage, unnecessary `else` branches, type aliases, and ESM imports. See
106
+ [PR #31](https://github.com/emilioSp/pi-maestro/pull/31).
87
107
  2. Updated `oxlint-anti-slop` from `0.3.3` to `0.3.6`.
88
108
  3. Updated 106 test titles to match the naming rule without changing test logic.
89
109
 
@@ -96,15 +116,15 @@ GitHub Releases are not required.
96
116
 
97
117
  ## 0.7.1
98
118
 
99
- 1. Documented the project mission, current tech stack, `owner` responsibilities, roadmap, and codebase change history.
100
- See [PR #30](https://github.com/emilioSp/pi-maestro/pull/30).
119
+ 1. Documented the project mission, current tech stack, `owner` responsibilities, roadmap, and codebase change history. See
120
+ [PR #30](https://github.com/emilioSp/pi-maestro/pull/30).
101
121
  2. Replaced `TODO.md` with the roadmap and included the four project constitution documents in the npm package.
102
122
  3. Updated documentation audits to compare all current documentation and the project constitution with the working tree without requesting a comparison baseline.
103
123
 
104
124
  ## 0.7.0
105
125
 
106
- 1. Stored multiple `escalation` questions and `owner` resolutions inside numbered `builder` `handoffs`. Earlier `handoffs` remain available as history.
107
- See [PR #27](https://github.com/emilioSp/pi-maestro/pull/27).
126
+ 1. Stored multiple `escalation` questions and `owner` resolutions inside numbered `builder` `handoffs`. Earlier `handoffs` remain available as history. See
127
+ [PR #27](https://github.com/emilioSp/pi-maestro/pull/27).
108
128
  2. Breaking: replaced `maestro_open_escalation` and `maestro_resolve_escalation` with `maestro_record_builder_handoff` and `maestro_resolve_escalations`. Done `handoffs`
109
129
  require `escalations: []`. Standalone `escalation` storage was removed without migration or compatibility readers. `Artifact` versions remain `1.0.0`.
110
130
  3. Added LCOV coverage reports and Codecov uploads from CI. See [PR #28](https://github.com/emilioSp/pi-maestro/pull/28).
@@ -118,8 +138,8 @@ session history and model context. See [PR #26](https://github.com/emilioSp/pi-m
118
138
 
119
139
  ## 0.6.0
120
140
 
121
- 1. Removed Git requirements, checkpoints, and automatic commits from the workflow. `Maestro` uses Pi's project directory and saved workflow phase.
122
- See [PR #25](https://github.com/emilioSp/pi-maestro/pull/25).
141
+ 1. Removed Git requirements, checkpoints, and automatic commits from the workflow. `Maestro` uses Pi's project directory and saved workflow phase. See
142
+ [PR #25](https://github.com/emilioSp/pi-maestro/pull/25).
123
143
  2. Retained numbered `builder` and `verifier` `handoffs` and explicit `owner` `finding` decisions. Removed workflow revision counters and writer locks.
124
144
  3. Breaking: changed `artifact` formats, `handoff` paths, and tool results without migration or compatibility readers. Removed revision and commit fields. `Artifact`
125
145
  versions remain `1.0.0`. Interrupted and older workflows require manual `owner` handling.
@@ -171,8 +191,8 @@ Enabled inheritance of global instructions for `builder` and `verifier` agents,
171
191
 
172
192
  ## 0.3.0
173
193
 
174
- Clarified `Maestro`, `builder`, and `verifier` responsibilities, `spec` and prototype revisions, permitted experiments, evidence requirements, and cleanup.
175
- See [PR #21](https://github.com/emilioSp/pi-maestro/pull/21).
194
+ Clarified `Maestro`, `builder`, and `verifier` responsibilities, `spec` and prototype revisions, permitted experiments, evidence requirements, and cleanup. See
195
+ [PR #21](https://github.com/emilioSp/pi-maestro/pull/21).
176
196
 
177
197
  ## 0.2.0
178
198
 
@@ -180,8 +200,8 @@ Moved TypeBox to peer dependencies and loosened Pi peer dependency version const
180
200
 
181
201
  ## 0.1.2
182
202
 
183
- Pinned `verifier` comparisons to a fixed `candidate` checkpoint rather than the current HEAD's parent. This checkpoint mechanism was later removed in `0.4.0`.
184
- See [PR #20](https://github.com/emilioSp/pi-maestro/pull/20).
203
+ Pinned `verifier` comparisons to a fixed `candidate` checkpoint rather than the current HEAD's parent. This checkpoint mechanism was later removed in `0.4.0`. See
204
+ [PR #20](https://github.com/emilioSp/pi-maestro/pull/20).
185
205
 
186
206
  Breaking: renamed `maestro_launch_builder` and `maestro_launch_verifier` to `maestro_run_builder` and `maestro_run_verifier`. Renamed the corresponding workflow events
187
207
  from `launch-*` to `run-*`.
@@ -189,5 +209,5 @@ from `launch-*` to `run-*`.
189
209
  ## 0.1.1
190
210
 
191
211
  First tagged baseline with `/maestro`, `spec` creation and approval, and foreground `builder` and `verifier` `runs`. The `owner` decides `escalation` questions and
192
- `verifier` `findings`. The workflow ends at `candidate-ready`, leaving final review to the `owner`. See [PR #14](https://github.com/emilioSp/pi-maestro/pull/14)
193
- and [PR #13](https://github.com/emilioSp/pi-maestro/pull/13).
212
+ `verifier` `findings`. The workflow ends at `candidate-ready`, leaving final review to the `owner`. See [PR #14](https://github.com/emilioSp/pi-maestro/pull/14) and
213
+ [PR #13](https://github.com/emilioSp/pi-maestro/pull/13).
package/MISSION.md CHANGED
@@ -1,9 +1,7 @@
1
1
  # Mission
2
2
 
3
3
  `Maestro` uses spec-driven development to improve quality when coding with agents. It guides the `owner` to define requirements and think through a feature before writing
4
- code.
5
- It provides a clear path from an approved `spec` to verified code and manages agent coordination for the `owner`.
4
+ code. It provides a clear path from an approved `spec` to verified code and manages agent coordination for the `owner`.
6
5
 
7
6
  The `owner` remains responsible for final code review, pull requests, and merging. The `owner` also provides and maintains the project's development checks and
8
- instructions, including linters, tests, anti-slop checks, and `AGENTS.md`.
9
- `Maestro` and its agents use these checks and instructions.
7
+ instructions, including linters, tests, anti-slop checks, and `AGENTS.md`. `Maestro` and its agents use these checks and instructions.
package/README.md CHANGED
@@ -8,11 +8,11 @@ Pi extension for a spec-driven multiagent development workflow.
8
8
 
9
9
  ## The idea
10
10
 
11
- A `specification` (`spec`) describes one reversible change.
12
- The `builder` implements it.
13
- An independent `verifier` checks every `acceptance criterion`.
14
- A `simplifier` then refactors accepted code without changing behavior.
15
- The `owner` performs the final review.
11
+ - A `specification` (`spec`) describes one reversible change.
12
+ - The `builder` implements it.
13
+ - An independent `verifier` checks every `acceptance criterion`.
14
+ - A `simplifier` then refactors accepted code without changing behavior.
15
+ - The `owner` performs the final review.
16
16
 
17
17
  Five principles hold the workflow together:
18
18
 
@@ -22,10 +22,43 @@ Five principles hold the workflow together:
22
22
  4. The `owner` decides requirements, scope, and unresolved questions.
23
23
  5. Each agent has one and only one role. Specific and with clear instruction.
24
24
 
25
+ ## Inspirations
26
+
27
+ Pi Maestro is inspired by concepts from [OpenSpec](https://github.com/Fission-AI/OpenSpec) and [GitHub Spec Kit](https://github.com/github/spec-kit). It adapts those
28
+ concepts to a sequential multiagent workflow in Pi.
29
+
30
+ The following official sources document the conceptual references. The links point to fixed revisions so the cited content remains inspectable.
31
+
32
+ 1. **The `specification` drives the code.** [Spec Kit's philosophy][spec-kit-philosophy] treats the `specification` as the primary `artifact` and code as its expression.
33
+ In `Maestro`, the approved `spec` defines a working contract for the `builder` and `verifier`.
34
+ 2. **Describe behavior, not routine implementation choices.** [OpenSpec's schema][openspec-schema] defines a `specification` as a behavior contract, not an implementation
35
+ plan. `Maestro` records required behavior, constraints, and approved architectural decisions in the `spec`, leaving routine implementation choices to the `builder`.
36
+ 3. **Use concrete, testable scenarios.** [OpenSpec's schema][openspec-schema] pairs requirements with scenarios; [Spec Kit's template][spec-kit-template] uses
37
+ Given/When/Then acceptance scenarios. Each `Maestro` `acceptance criterion` includes a `probe`, an `expected result`, and a concrete example.
38
+ 4. **Clarify requirements progressively.** [Spec Kit's clarify command][spec-kit-clarify] asks one question at a time and integrates accepted answers into the
39
+ `specification`. `Maestro` likewise asks one focused question, waits for the owner's answer, and updates the `spec` before asking the next question.
40
+ 5. **Review requirements separately from testing code.** [Spec Kit's checklist command][spec-kit-checklist] evaluates requirements for completeness, clarity, consistency,
41
+ and measurability, not implementation correctness. Before approval, `Maestro` reviews the `spec` for consistency, missing decisions, measurable outcomes, and
42
+ reproducible scenarios. The later `verifier` checks the implementation independently.
43
+ 6. **Separate motivation, behavior, and design.** [OpenSpec's schema][openspec-schema] separates these concerns and calls for `design.md` only when significant technical
44
+ decisions need recording, including reasons, alternatives, and risks.
45
+ 7. **Make requirement changes explicit.** [OpenSpec's schema][openspec-schema] distinguishes added, modified, removed, and renamed requirements. `Maestro` adapts this
46
+ concept with one `Delta` field per requirement: `added`, `modified`, or `removed`. Each requirement states the complete required outcome.
47
+ 8. **Make requirement coverage traceable.** [Spec Kit's analyze command][spec-kit-analyze] maps requirements to implementation tasks and identifies coverage gaps.
48
+ `Maestro` applies a related principle to verification: each requirement has a `Verified by` field linking to its `acceptance criteria`, existing tests covering exact
49
+ scenarios, or both. The mapping connects requirements to verification.
50
+
51
+ [openspec-schema]: https://github.com/Fission-AI/OpenSpec/blob/6d04a1b58dedc95729d34e4f223d9d483aae210a/schemas/spec-driven/schema.yaml
52
+ [spec-kit-philosophy]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/spec-driven.md
53
+ [spec-kit-template]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/spec-template.md
54
+ [spec-kit-clarify]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/commands/clarify.md
55
+ [spec-kit-checklist]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/commands/checklist.md
56
+ [spec-kit-analyze]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/commands/analyze.md
57
+
25
58
  ## The roles
26
59
 
27
60
  | Role | Responsibility |
28
- |--------------|-------------------------------------------------------------------------------------------------------------------------|
61
+ | ------------ | ----------------------------------------------------------------------------------------------------------------------- |
29
62
  | `Owner` | Brings the problem, approves the `spec`, decides questions and `findings`, and reviews the final code. |
30
63
  | `Maestro` | Works directly with the `owner`, prepares the `spec`, runs the other agents, records decisions, and summarizes results. |
31
64
  | `Builder` | Implements the approved `spec` and checks each `acceptance criterion`. |
@@ -79,31 +112,28 @@ The `owner` follows this workflow:
79
112
  5. Reviews `verifier` `findings` and chooses an action for every `finding`.
80
113
  6. Reads Maestro's summary at `candidate-ready` and performs the final review.
81
114
 
82
- `Maestro` starts the `verifier` after a successful `builder` `run`.
83
- All three agents run in the foreground: Pi waits for each `run` to finish and `Maestro` shows the current phase in Pi's status, while `pi-subagents` FleetView and
84
- `/subagents-fleet` show agent activity and transcripts.
115
+ `Maestro` starts the `verifier` after a successful `builder` `run`. All three agents run in the foreground: Pi waits for each `run` to finish and `Maestro` shows the
116
+ current phase in Pi's status, while `pi-subagents` FleetView and `/subagents-fleet` show agent activity and transcripts.
85
117
 
86
- The `owner` must not edit product files while the workflow runs.
87
- `Maestro` can perform temporary experiments with `owner` agreement during `spec` preparation and permitted revisions. See [Workflow](docs/workflow.md#spec-approval).
118
+ The `owner` must not edit product files while the workflow runs. `Maestro` can perform temporary experiments with `owner` agreement during `spec` preparation and
119
+ permitted revisions. See [Workflow](docs/workflow.md#spec-approval).
88
120
 
89
121
  An `escalation` asks the `owner` to decide an implementation question, and a `finding` records a technical issue reported by the `verifier`. The `owner` discusses both
90
- with `Maestro`, never directly with the `builder` or `verifier`.
91
- `Maestro` records all current `escalation` answers or `finding` decisions in the active `handoff` before changing phase.
122
+ with `Maestro`, never directly with the `builder` or `verifier`. `Maestro` records all current `escalation` answers or `finding` decisions in the active `handoff` before
123
+ changing phase.
92
124
 
93
- If any decision requires a `spec` change, the workflow returns to `drafting-spec` before the `owner` and `Maestro` revise the same `spec`.
94
- The `owner` reviews the revised `spec` and replies `GREEN FLAG` again.
95
- `Maestro` records renewed approval separately before another `builder` `run`.
125
+ If any decision requires a `spec` change, the workflow returns to `drafting-spec` before the `owner` and `Maestro` revise the same `spec`. The `owner` reviews the revised
126
+ `spec` and replies `GREEN FLAG` again. `Maestro` records renewed approval separately before another `builder` `run`.
96
127
 
97
- After successful verification or rejection of all `findings`, `Maestro` starts the `simplifier`.
98
- Only this step requires Git. If Git readiness cannot be confirmed, `Maestro` warns and skips simplification.
99
- The `simplifier` selects all uncommitted code changes, including pre-existing staged, unstaged, and untracked files.
128
+ After successful verification or rejection of all `findings`, `Maestro` starts the `simplifier`. Only this step requires Git. If Git readiness cannot be confirmed,
129
+ `Maestro` warns and skips simplification. The `simplifier` selects all uncommitted code changes, including pre-existing staged, unstaged, and untracked files.
100
130
 
101
- The workflow ends at `candidate-ready`. Rejected `findings` retain their reasons and accepted failures can remain.
102
- Maestro's summary separates independent verification from the later simplifier's report.
103
- The `owner` controls later review, commits, pull requests, and merging.
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. After the final summary finishes successfully, `Maestro` automatically turns off. The `owner` controls later review, commits, pull
133
+ requests, and merging.
104
134
 
105
- The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state.
106
- Saved files do not automatically restore or resume an incomplete workflow. The `owner` handles it manually.
135
+ The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state. Saved
136
+ files do not automatically restore or resume an incomplete workflow. The `owner` handles it manually.
107
137
 
108
138
  ## Configuration
109
139
 
@@ -123,6 +153,6 @@ The reading order is:
123
153
 
124
154
  1. [Mission](MISSION.md): purpose, scope, and `owner` responsibilities.
125
155
  2. [Tech stack](TECH_STACK.md): runtime technologies and development tools.
126
- 3. [Roadmap](ROADMAP.md): completed outcomes and planned priorities.
156
+ 3. [Roadmap](https://linear.app/emilio-spatola/team/MAESTRO/overview): completed outcomes and planned priorities maintained in Linear.
127
157
  4. [Changelog](CHANGELOG.md): meaningful codebase changes and breaking changes.
128
158
  5. [Architecture decision records](ADR.md): architectural choices, context, consequences, and evidence.
package/TECH_STACK.md CHANGED
@@ -4,12 +4,12 @@
4
4
  `dist/` directory.
5
5
 
6
6
  | Technology | Use |
7
- |--------------------------------|---------------------------------------------------------------------------------------------------|
7
+ | ------------------------------ | ------------------------------------------------------------------------------------------------- |
8
8
  | TypeScript | Application code and static type checks with `tsc --noEmit`. |
9
9
  | Node.js | Runtime. |
10
10
  | Pi | Extension host, agent APIs, and terminal interface. |
11
11
  | `pi-subagents` | `Builder`, `verifier`, and `simplifier` execution and activity tracking. |
12
12
  | TypeBox | Schemas and runtime validation for configuration, workflow state, tool inputs, and agent reports. |
13
13
  | Vitest with coverage | Unit tests, integration tests, and code coverage. |
14
- | Biome | Formatting and lint checks. |
15
- | Oxlint with `oxlint-anti-slop` | Additional lint and anti-slop checks. |
14
+ | Oxfmt | Formatting |
15
+ | Oxlint with `oxlint-anti-slop` | Linting and additional anti-slop checks. |