@emiliosp/pi-maestro 0.11.0 → 0.12.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 (73) hide show
  1. package/ADR.md +54 -22
  2. package/CHANGELOG.md +42 -28
  3. package/MISSION.md +2 -4
  4. package/README.md +53 -24
  5. package/ROADMAP.md +64 -64
  6. package/TECH_STACK.md +3 -3
  7. package/agents/builder.md +53 -57
  8. package/agents/simplifier.md +79 -61
  9. package/agents/verifier.md +52 -64
  10. package/docs/configuration.md +1 -1
  11. package/docs/glossary.md +43 -40
  12. package/docs/subagent-integration.md +7 -8
  13. package/docs/workflow.md +135 -62
  14. package/extensions/maestro-subagent.ts +1 -0
  15. package/extensions/maestro.ts +9 -30
  16. package/package.json +38 -39
  17. package/src/MaestroPaths.ts +22 -35
  18. package/src/artifacts/builder-handoff/assertBuilderHandoff.ts +6 -15
  19. package/src/artifacts/builder-handoff/schema.ts +3 -6
  20. package/src/artifacts/simplifier-handoff/assertSimplifierHandoff.ts +3 -3
  21. package/src/artifacts/simplifier-handoff/schema.ts +1 -0
  22. package/src/artifacts/verifier-handoff/assertVerifierHandoff.ts +4 -10
  23. package/src/artifacts/verifier-handoff/schema.ts +3 -6
  24. package/src/artifacts/verifier-handoff/writeVerifierHandoff.ts +1 -3
  25. package/src/config/assertConfiguration.ts +3 -6
  26. package/src/config/defaults.ts +1 -5
  27. package/src/config/loadConfiguration.ts +4 -11
  28. package/src/config/schema.ts +1 -2
  29. package/src/ids/createSpecId.ts +1 -2
  30. package/src/ids/isValidSpecId.ts +1 -2
  31. package/src/maestro/checks/assertEnvironment.ts +19 -50
  32. package/src/maestro/instructions/getMaestroInstructions.ts +45 -26
  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
package/ADR.md CHANGED
@@ -1,7 +1,6 @@
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
5
  Requirements and routine project rules belong in the [roadmap](ROADMAP.md) or other relevant documentation.
7
6
 
@@ -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
+ [R-03](ROADMAP.md#r-03-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 R-21. Supersedes [ADR-001](#adr-001-keep-the-workflow-independent-of-git).
103
97
 
104
98
  ### Context
105
99
 
@@ -125,9 +119,47 @@ 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
+ [R-21](ROADMAP.md#r-21-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/).
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
3
3
  This file summarizes meaningful changes to the codebase, including behavior, data formats, architecture, and development tools. Git tags identify version boundaries;
4
4
  GitHub Releases are not required.
5
5
 
6
+ ## 0.12.0
7
+
8
+ 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
9
+ existing test scenarios. Review checks complete coverage and current links, including during revisions. Approval validation and `handoff` formats remain unchanged.
10
+ 2. Added per-requirement `Delta` labels: `added`, `modified`, and `removed`. Modified or removed behavior can include a brief, evidence-based `Before` description when
11
+ useful. Requirements state the complete required outcome; unchanged behavior remains implicit. Approval validation and `handoff` formats remain unchanged.
12
+ 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
13
+ read it. Creation returns the new document paths; approval requires the proposal. Historical documents are not migrated.
14
+ 4. Placed requirement-associated `acceptance criteria` under their requirements as level-four headings. Relevant standalone regression criteria use level-three headings
15
+ under optional `Regression checks`, without inventing unchanged requirements. Both forms share global numbering and are required in `handoffs`. Workflow phases and
16
+ saved report formats remain unchanged.
17
+ 5. Removed the `Coverage` classification field from current `acceptance criteria`. Each criterion retains its `probe`, `expected result`, and example. Standalone
18
+ regression checks remain identified by their section; validation and report formats are unchanged.
19
+
6
20
  ## 0.11.0
7
21
 
8
22
  1. Added the `simplifier` after successful verification or rejection of all current `findings`, without another approval or verification cycle.
@@ -18,8 +32,8 @@ GitHub Releases are not required.
18
32
 
19
33
  ## 0.10.0
20
34
 
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).
35
+ 1. Saved complete `owner` decision batches in their original `handoffs` before changing phase, including when the `spec` requires revision. See
36
+ [PR #38](https://github.com/emilioSp/pi-maestro/pull/38).
23
37
  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
38
  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
39
  `drafting-spec`.
@@ -30,24 +44,24 @@ GitHub Releases are not required.
30
44
 
31
45
  ## 0.9.5
32
46
 
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).
47
+ 1. Added a shared check that requires every approved `spec` criterion ID in `builder` and `verifier` `handoffs`. See
48
+ [PR #37](https://github.com/emilioSp/pi-maestro/pull/37).
35
49
  2. Missing IDs reject submission before saving a report or changing phase. Extra report IDs remain allowed, and existing report validation is unchanged.
36
50
  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
51
  4. Added unit tests for extraction and one missing-ID integration test per role.
38
52
 
39
53
  ## 0.9.4
40
54
 
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).
55
+ 1. Added numbering validation to `spec` approval. Matched `acceptance criterion` headings must start at `AC1` and continue without gaps. See
56
+ [PR #36](https://github.com/emilioSp/pi-maestro/pull/36).
43
57
  2. Invalid numbering rejects approval before saving the workflow and leaves all saved files unchanged. No matching headings still permits approval.
44
58
  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
59
  before starting the `builder`.
46
60
 
47
61
  ## 0.9.3
48
62
 
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).
63
+ 1. Added a parent `pi-subagents` availability check during activation. A matching successful version 1 `ping` reply is required within 2000 ms. See
64
+ [PR #35](https://github.com/emilioSp/pi-maestro/pull/35).
51
65
  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
66
  The check makes no automatic retry.
53
67
  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 +69,23 @@ GitHub Releases are not required.
55
69
 
56
70
  ## 0.9.2
57
71
 
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.
72
+ 1. Added code-quality review to `verifier` guidance for code affected by the approved change when applicable `AGENTS.md` directives exist. See
73
+ [PR #34](https://github.com/emilioSp/pi-maestro/pull/34). All existing verification duties remain unchanged.
60
74
  2. Required instruction-violation `findings` to identify the instruction file, quote the rule, and explain the violating code through existing evidence fields.
61
75
  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
76
 
63
77
  ## 0.9.1
64
78
 
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).
79
+ 1. Added a brief introduction and an invitation to ask how `Maestro` works to the successful activation notice. See
80
+ [PR #33](https://github.com/emilioSp/pi-maestro/pull/33).
67
81
  2. Preserved the configured agent details and UI-only activation. Activation does not add session history or start a model request.
68
82
  3. Added absolute paths to the installed README and documentation directory in active instructions. `Maestro` reads relevant documentation on demand without automatically
69
83
  loading its contents.
70
84
 
71
85
  ## 0.9.0
72
86
 
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).
87
+ 1. Breaking: `builder` reports now support only `done` and `escalation`. Reportable technical problems use the existing `owner` `escalation` process. See
88
+ [PR #32](https://github.com/emilioSp/pi-maestro/pull/32).
75
89
  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
90
  3. No migrations, compatibility readers, or deprecated aliases are provided. `Artifact` versions remain `1.0.0`.
77
91
 
@@ -82,8 +96,8 @@ GitHub Releases are not required.
82
96
 
83
97
  ## 0.7.3
84
98
 
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).
99
+ 1. Added Oxlint rules for `given ... when ... then ...` test titles, `const` usage, unnecessary `else` branches, type aliases, and ESM imports. See
100
+ [PR #31](https://github.com/emilioSp/pi-maestro/pull/31).
87
101
  2. Updated `oxlint-anti-slop` from `0.3.3` to `0.3.6`.
88
102
  3. Updated 106 test titles to match the naming rule without changing test logic.
89
103
 
@@ -96,15 +110,15 @@ GitHub Releases are not required.
96
110
 
97
111
  ## 0.7.1
98
112
 
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).
113
+ 1. Documented the project mission, current tech stack, `owner` responsibilities, roadmap, and codebase change history. See
114
+ [PR #30](https://github.com/emilioSp/pi-maestro/pull/30).
101
115
  2. Replaced `TODO.md` with the roadmap and included the four project constitution documents in the npm package.
102
116
  3. Updated documentation audits to compare all current documentation and the project constitution with the working tree without requesting a comparison baseline.
103
117
 
104
118
  ## 0.7.0
105
119
 
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).
120
+ 1. Stored multiple `escalation` questions and `owner` resolutions inside numbered `builder` `handoffs`. Earlier `handoffs` remain available as history. See
121
+ [PR #27](https://github.com/emilioSp/pi-maestro/pull/27).
108
122
  2. Breaking: replaced `maestro_open_escalation` and `maestro_resolve_escalation` with `maestro_record_builder_handoff` and `maestro_resolve_escalations`. Done `handoffs`
109
123
  require `escalations: []`. Standalone `escalation` storage was removed without migration or compatibility readers. `Artifact` versions remain `1.0.0`.
110
124
  3. Added LCOV coverage reports and Codecov uploads from CI. See [PR #28](https://github.com/emilioSp/pi-maestro/pull/28).
@@ -118,8 +132,8 @@ session history and model context. See [PR #26](https://github.com/emilioSp/pi-m
118
132
 
119
133
  ## 0.6.0
120
134
 
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).
135
+ 1. Removed Git requirements, checkpoints, and automatic commits from the workflow. `Maestro` uses Pi's project directory and saved workflow phase. See
136
+ [PR #25](https://github.com/emilioSp/pi-maestro/pull/25).
123
137
  2. Retained numbered `builder` and `verifier` `handoffs` and explicit `owner` `finding` decisions. Removed workflow revision counters and writer locks.
124
138
  3. Breaking: changed `artifact` formats, `handoff` paths, and tool results without migration or compatibility readers. Removed revision and commit fields. `Artifact`
125
139
  versions remain `1.0.0`. Interrupted and older workflows require manual `owner` handling.
@@ -171,8 +185,8 @@ Enabled inheritance of global instructions for `builder` and `verifier` agents,
171
185
 
172
186
  ## 0.3.0
173
187
 
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).
188
+ Clarified `Maestro`, `builder`, and `verifier` responsibilities, `spec` and prototype revisions, permitted experiments, evidence requirements, and cleanup. See
189
+ [PR #21](https://github.com/emilioSp/pi-maestro/pull/21).
176
190
 
177
191
  ## 0.2.0
178
192
 
@@ -180,8 +194,8 @@ Moved TypeBox to peer dependencies and loosened Pi peer dependency version const
180
194
 
181
195
  ## 0.1.2
182
196
 
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).
197
+ 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
198
+ [PR #20](https://github.com/emilioSp/pi-maestro/pull/20).
185
199
 
186
200
  Breaking: renamed `maestro_launch_builder` and `maestro_launch_verifier` to `maestro_run_builder` and `maestro_run_verifier`. Renamed the corresponding workflow events
187
201
  from `launch-*` to `run-*`.
@@ -189,5 +203,5 @@ from `launch-*` to `run-*`.
189
203
  ## 0.1.1
190
204
 
191
205
  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).
206
+ `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
207
+ [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,27 @@ 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. The `owner` controls later review, commits, pull requests, and merging.
104
133
 
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.
134
+ The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state. Saved
135
+ files do not automatically restore or resume an incomplete workflow. The `owner` handles it manually.
107
136
 
108
137
  ## Configuration
109
138