@emiliosp/pi-maestro 0.10.1 → 0.11.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 (35) hide show
  1. package/ADR.md +53 -9
  2. package/CHANGELOG.md +73 -33
  3. package/MISSION.md +4 -2
  4. package/README.md +29 -14
  5. package/ROADMAP.md +114 -85
  6. package/TECH_STACK.md +12 -11
  7. package/agents/simplifier.md +214 -0
  8. package/agents/verifier.md +1 -16
  9. package/docs/configuration.md +27 -16
  10. package/docs/glossary.md +41 -36
  11. package/docs/subagent-integration.md +23 -13
  12. package/docs/workflow.md +102 -71
  13. package/extensions/maestro-subagent.ts +3 -1
  14. package/extensions/maestro.ts +10 -0
  15. package/package.json +1 -1
  16. package/src/MaestroPaths.ts +4 -0
  17. package/src/artifacts/simplifier-handoff/assertSimplifierHandoff.ts +56 -0
  18. package/src/artifacts/simplifier-handoff/readSimplifierHandoff.ts +29 -0
  19. package/src/artifacts/simplifier-handoff/schema.ts +26 -0
  20. package/src/config/assertConfiguration.ts +1 -1
  21. package/src/config/defaults.ts +7 -0
  22. package/src/config/loadConfiguration.ts +1 -0
  23. package/src/config/schema.ts +3 -0
  24. package/src/maestro/checks/assertEnvironment.ts +7 -3
  25. package/src/maestro/instructions/getMaestroInstructions.ts +16 -6
  26. package/src/maestro/status/formatMaestroStatus.ts +3 -0
  27. package/src/tools/child/record-simplifier-handoff.ts +73 -0
  28. package/src/tools/main/resolve-findings.ts +1 -1
  29. package/src/tools/main/run-simplifier.ts +182 -0
  30. package/src/tools/main/run-verifier.ts +5 -5
  31. package/src/workflow/roles.ts +2 -1
  32. package/src/workflow/simplifier/completeSimplifierPass.ts +57 -0
  33. package/src/workflow/state/schema.ts +4 -0
  34. package/src/workflow/transitions.ts +9 -1
  35. package/src/workflow/utils/getAgentRole.ts +5 -1
package/ADR.md CHANGED
@@ -1,7 +1,7 @@
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.
4
+ This file contains one numbered record per decision.
5
5
 
6
6
  Requirements and routine project rules belong in the [roadmap](ROADMAP.md) or other relevant documentation.
7
7
 
@@ -11,11 +11,12 @@ When a new decision replaces an accepted decision, add a new record, mark the ea
11
11
 
12
12
  ### Status
13
13
 
14
- Accepted. Recorded date: 2026-10-07. Implemented in `0.6.0`.
14
+ Superseded by [ADR-004](#adr-004-require-git-only-for-the-simplifier). Recorded date: 2026-10-07. Implemented in `0.6.0`.
15
15
 
16
16
  ### Context
17
17
 
18
- The previous workflow required Git and used checkpoints and automatic commits. The recorded reason for removing that approach was to simplify the project. Other evaluated alternatives were not recorded.
18
+ The previous workflow required Git and used checkpoints and automatic commits. The recorded reason for removing that approach was to simplify the project. Other evaluated
19
+ alternatives were not recorded.
19
20
 
20
21
  ### Decision
21
22
 
@@ -25,11 +26,13 @@ The `verifier` checks live project files. The `owner` controls later Git use, pu
25
26
 
26
27
  ### Consequences
27
28
 
28
- Workflow execution no longer depends on Git. Revision and commit fields were removed without migration or compatibility readers. Interrupted and older workflows require manual `owner` handling.
29
+ Workflow execution no longer depends on Git. Revision and commit fields were removed without migration or compatibility readers. Interrupted and older workflows require
30
+ manual `owner` handling.
29
31
 
30
32
  ### Evidence
31
33
 
32
- [Commit deae41c](https://github.com/emilioSp/pi-maestro/commit/deae41ce66a3f2c76859209c44165e7ddd0f3a72), [Changelog 0.6.0](CHANGELOG.md#060), and [workflow completion](docs/workflow.md#workflow-completion).
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
36
 
34
37
  ## ADR-002: Store escalation decisions in builder handoffs
35
38
 
@@ -39,7 +42,8 @@ Accepted. Recorded date: 2026-10-08. Implemented in `0.7.0`.
39
42
 
40
43
  ### Context
41
44
 
42
- The previous approach stored `escalations` in standalone files and used singular resolution tools. The recorded reason for replacing it was to use the same storage, local ID, and batch decision model as `verifier` `findings`. Other evaluated alternatives were not recorded.
45
+ The previous approach stored `escalations` in standalone files and used singular resolution tools. The recorded reason for replacing it was to use the same storage, local
46
+ ID, and batch decision model as `verifier` `findings`. Other evaluated alternatives were not recorded.
43
47
 
44
48
  ### Decision
45
49
 
@@ -55,7 +59,8 @@ There are no migration procedures, fallback readers, or deprecated aliases. `Art
55
59
 
56
60
  ### Evidence
57
61
 
58
- [Repository-only specification](.specs/20261008-132344-store-escalations-in-builder-handoffs/spec.md), [Commit dda6eb5](https://github.com/emilioSp/pi-maestro/commit/dda6eb5b3ab76ba175112c3c565c70be747d7344), and [escalation workflow](docs/workflow.md#escalations).
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).
59
64
 
60
65
  ## ADR-003: Route builder failures through owner escalations
61
66
 
@@ -86,4 +91,43 @@ This breaking MVP change has no migrations, compatibility readers, deprecated al
86
91
 
87
92
  ### Evidence
88
93
 
89
- [Specification](.specs/20261013-101454-route-builder-failures-through-owner-escalations/spec.md) and [R-03](ROADMAP.md#r-03-route-builder-failures-through-owner-escalations).
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).
96
+
97
+ ## ADR-004: Require Git only for the simplifier
98
+
99
+ ### Status
100
+
101
+ Accepted. Implemented through R-21.
102
+ Supersedes [ADR-001](#adr-001-keep-the-workflow-independent-of-git).
103
+
104
+ ### Context
105
+
106
+ The `simplifier` needs a list of changed code files. Git can supply that list without adding file tracking to `builder` `handoffs`.
107
+
108
+ ### Decision
109
+
110
+ Only the `simplifier` requires Git and a Git repository to discover changed files. It has no non-Git fallback.
111
+
112
+ The Git readiness decision belongs only inside `maestro_run_simplifier`, before delegation. The tool checks readiness with `git rev-parse --is-inside-work-tree` in the
113
+ project directory. Only a successful result of `true` enables simplification.
114
+
115
+ Activation, `spec` preparation, `builder` execution, `verifier` completion, and `finding` resolution do not check Git readiness. Both `simplifier` entry routes save
116
+ `simplifier-running` before `Maestro` calls `maestro_run_simplifier`.
117
+
118
+ `Maestro` does not create automatic commits or Git checkpoints. The `owner` retains control of commits, pull requests, and merging.
119
+
120
+ ### Consequences
121
+
122
+ If Git readiness cannot be confirmed, `maestro_run_simplifier` reports a warning and skips delegation. The workflow moves from `simplifier-running` to `candidate-ready`
123
+ without an error. The skip transition is defined in `src/workflow/transitions.ts` and applied through `transitionWorkflow`.
124
+
125
+ Activation does not predict whether simplification will be skipped. The same readiness decision applies after successful verification and after the `owner` rejects all
126
+ current `findings`. Rejected `findings` retain their reasons and do not become passed verification.
127
+
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.
130
+
131
+ ### Evidence
132
+
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).
package/CHANGELOG.md CHANGED
@@ -1,55 +1,77 @@
1
1
  # Changelog
2
2
 
3
- This file summarizes meaningful changes to the codebase, including behavior, data formats, architecture, and development tools. Git tags identify version boundaries; GitHub Releases are not required. Version-only changes and routine maintenance are omitted.
3
+ This file summarizes meaningful changes to the codebase, including behavior, data formats, architecture, and development tools. Git tags identify version boundaries;
4
+ GitHub Releases are not required.
4
5
 
5
- ## Unreleased
6
+ ## 0.11.0
7
+
8
+ 1. Added the `simplifier` after successful verification or rejection of all current `findings`, without another approval or verification cycle.
9
+ 2. Added Git-only readiness and file discovery for simplification. If Git is unavailable, the workflow warns and completes without delegation.
10
+ 3. Added independent `simplifier` configuration, activation checks and presentation, running status, and the fixed `handoffs/simplifier/S.json` result.
11
+ 4. Removed the extra code-quality review from the verifier's instructions. The `simplifier` preserves accepted behavior without introducing check failures.
12
+
13
+ ## 0.10.1
6
14
 
7
15
  1. Added `success`, `failure`, and `unchanged` coverage labels to the `spec` template and `Maestro` guidance. Approval validation and `handoff` formats remain unchanged.
8
- 2. Required `Maestro` to inspect existing tests before writing `acceptance criteria` and remove criteria whose exact scenarios already have coverage. Requirements remain documented in the `spec`.
16
+ 2. Required `Maestro` to inspect existing tests before writing `acceptance criteria` and remove criteria whose exact scenarios already have coverage. Requirements remain
17
+ documented in the `spec`.
9
18
 
10
19
  ## 0.10.0
11
20
 
12
- 1. Saved complete `owner` decision batches in their original `handoffs` before changing phase, including when the `spec` requires revision. See [PR #38](https://github.com/emilioSp/pi-maestro/pull/38).
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).
13
23
  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.
14
- 3. Unified both revision paths through `drafting-spec`, with renewed `GREEN FLAG` before separate approval and another `builder` `run`. Approval is allowed only from `drafting-spec`.
24
+ 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
+ `drafting-spec`.
15
26
  4. Renamed workflow events to identify `builder` and `owner` actions. Both revision paths share `OWNER_REQUEST_SPEC_REVISION`.
16
27
  5. Breaking: supply the required boolean `specChangeRequired` when calling `maestro_resolve_escalations`.
17
- 6. Breaking: saved decision phases are now `escalation-decisions` and `finding-decisions`. Existing workflows using older names require manual `owner` handling. No automatic migration is provided.
28
+ 6. Breaking: saved decision phases are now `escalation-decisions` and `finding-decisions`. Existing workflows using older names require manual `owner` handling. No
29
+ automatic migration is provided.
18
30
 
19
31
  ## 0.9.5
20
32
 
21
- 1. Added a shared check that requires every approved `spec` criterion ID in `builder` and `verifier` `handoffs`. See [PR #37](https://github.com/emilioSp/pi-maestro/pull/37).
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).
22
35
  2. Missing IDs reject submission before saving a report or changing phase. Extra report IDs remain allowed, and existing report validation is unchanged.
23
36
  3. Reused the raw heading rule `^### AC(\d+):`, including leading zeros and matching lines inside code blocks. No matching headings impose no new restriction.
24
37
  4. Added unit tests for extraction and one missing-ID integration test per role.
25
38
 
26
39
  ## 0.9.4
27
40
 
28
- 1. Added numbering validation to `spec` approval. Matched `acceptance criterion` headings must start at `AC1` and continue without gaps. See [PR #36](https://github.com/emilioSp/pi-maestro/pull/36).
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).
29
43
  2. Invalid numbering rejects approval before saving the workflow and leaves all saved files unchanged. No matching headings still permits approval.
30
- 3. Added `Maestro` guidance to correct only numbering and affected references, then retry with the existing `GREEN FLAG`. No additional `owner` approval is required before starting the `builder`.
44
+ 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
+ before starting the `builder`.
31
46
 
32
47
  ## 0.9.3
33
48
 
34
- 1. Added a parent `pi-subagents` availability check during activation. A matching successful version 1 `ping` reply is required within 2000 ms. See [PR #35](https://github.com/emilioSp/pi-maestro/pull/35).
35
- 2. Failed or invalid replies, emission errors, and timeouts prevent activation. The error includes "Maestro flow requires pi-subagents installed in the Pi environment." The check makes no automatic retry.
36
- 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 when turning `Maestro` off.
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).
51
+ 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
+ The check makes no automatic retry.
53
+ 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
54
+ when turning `Maestro` off.
37
55
 
38
56
  ## 0.9.2
39
57
 
40
- 1. Added code-quality review to `verifier` guidance for code affected by the approved change when applicable `AGENTS.md` directives exist. See [PR #34](https://github.com/emilioSp/pi-maestro/pull/34). All existing verification duties remain unchanged.
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.
41
60
  2. Required instruction-violation `findings` to identify the instruction file, quote the rule, and explain the violating code through existing evidence fields.
42
61
  3. Skip only the added review when files or code-quality directives are absent. Missing directives and personal style preferences do not produce `findings`.
43
62
 
44
63
  ## 0.9.1
45
64
 
46
- 1. Added a brief introduction and an invitation to ask how `Maestro` works to the successful activation notice. See [PR #33](https://github.com/emilioSp/pi-maestro/pull/33).
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).
47
67
  2. Preserved the configured agent details and UI-only activation. Activation does not add session history or start a model request.
48
- 3. Added absolute paths to the installed README and documentation directory in active instructions. `Maestro` reads relevant documentation on demand without automatically loading its contents.
68
+ 3. Added absolute paths to the installed README and documentation directory in active instructions. `Maestro` reads relevant documentation on demand without automatically
69
+ loading its contents.
49
70
 
50
71
  ## 0.9.0
51
72
 
52
- 1. Breaking: `builder` reports now support only `done` and `escalation`. Reportable technical problems use the existing `owner` `escalation` process. See [PR #32](https://github.com/emilioSp/pi-maestro/pull/32).
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).
53
75
  2. Removed the terminal `builder` failure phase and event. Execution errors and missing or invalid saved results still stop the workflow without automatic recovery.
54
76
  3. No migrations, compatibility readers, or deprecated aliases are provided. `Artifact` versions remain `1.0.0`.
55
77
 
@@ -60,39 +82,47 @@ This file summarizes meaningful changes to the codebase, including behavior, dat
60
82
 
61
83
  ## 0.7.3
62
84
 
63
- 1. Added Oxlint rules for `given ... when ... then ...` test titles, `const` usage, unnecessary `else` branches, type aliases, and ESM imports. See [PR #31](https://github.com/emilioSp/pi-maestro/pull/31).
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).
64
87
  2. Updated `oxlint-anti-slop` from `0.3.3` to `0.3.6`.
65
88
  3. Updated 106 test titles to match the naming rule without changing test logic.
66
89
 
67
90
  ## 0.7.2
68
91
 
69
92
  1. Renamed the constitution files to `MISSION.md`, `TECH_STACK.md`, `ROADMAP.md`, and `CHANGELOG.md`. Updated their links, package file list, and audit references.
70
- 2. Applied consistent inline code formatting to glossary terms across the documentation. Recorded the formatting rule and its exclusions in `AGENTS.md` and the documentation audit skill.
93
+ 2. Applied consistent inline code formatting to glossary terms across the documentation. Recorded the formatting rule and its exclusions in `AGENTS.md` and the
94
+ documentation audit skill.
71
95
  3. Used `spec` consistently for the approved change document and removed the redundant glossary entry.
72
96
 
73
97
  ## 0.7.1
74
98
 
75
- 1. Documented the project mission, current tech stack, `owner` responsibilities, roadmap, and codebase change history. See [PR #30](https://github.com/emilioSp/pi-maestro/pull/30).
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).
76
101
  2. Replaced `TODO.md` with the roadmap and included the four project constitution documents in the npm package.
77
102
  3. Updated documentation audits to compare all current documentation and the project constitution with the working tree without requesting a comparison baseline.
78
103
 
79
104
  ## 0.7.0
80
105
 
81
- 1. Stored multiple `escalation` questions and `owner` resolutions inside numbered `builder` `handoffs`. Earlier `handoffs` remain available as history. See [PR #27](https://github.com/emilioSp/pi-maestro/pull/27).
82
- 2. Breaking: replaced `maestro_open_escalation` and `maestro_resolve_escalation` with `maestro_record_builder_handoff` and `maestro_resolve_escalations`. Done `handoffs` require `escalations: []`. Standalone `escalation` storage was removed without migration or compatibility readers. `Artifact` versions remain `1.0.0`.
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).
108
+ 2. Breaking: replaced `maestro_open_escalation` and `maestro_resolve_escalation` with `maestro_record_builder_handoff` and `maestro_resolve_escalations`. Done `handoffs`
109
+ require `escalations: []`. Standalone `escalation` storage was removed without migration or compatibility readers. `Artifact` versions remain `1.0.0`.
83
110
  3. Added LCOV coverage reports and Codecov uploads from CI. See [PR #28](https://github.com/emilioSp/pi-maestro/pull/28).
84
111
 
85
112
  Reload `Maestro` extensions before starting new workflows so sessions use the updated tools.
86
113
 
87
114
  ## 0.6.2
88
115
 
89
- Added phase icons, theme colors, and display-only shortening of long `spec` IDs. Successful activation shows the configured agent settings in a UI-only notice, outside session history and model context. See [PR #26](https://github.com/emilioSp/pi-maestro/pull/26).
116
+ Added phase icons, theme colors, and display-only shortening of long `spec` IDs. Successful activation shows the configured agent settings in a UI-only notice, outside
117
+ session history and model context. See [PR #26](https://github.com/emilioSp/pi-maestro/pull/26).
90
118
 
91
119
  ## 0.6.0
92
120
 
93
- 1. Removed Git requirements, checkpoints, and automatic commits from the workflow. `Maestro` uses Pi's project directory and saved workflow phase. See [PR #25](https://github.com/emilioSp/pi-maestro/pull/25).
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).
94
123
  2. Retained numbered `builder` and `verifier` `handoffs` and explicit `owner` `finding` decisions. Removed workflow revision counters and writer locks.
95
- 3. Breaking: changed `artifact` formats, `handoff` paths, and tool results without migration or compatibility readers. Removed revision and commit fields. `Artifact` versions remain `1.0.0`. Interrupted and older workflows require manual `owner` handling.
124
+ 3. Breaking: changed `artifact` formats, `handoff` paths, and tool results without migration or compatibility readers. Removed revision and commit fields. `Artifact`
125
+ versions remain `1.0.0`. Interrupted and older workflows require manual `owner` handling.
96
126
 
97
127
  ## 0.5.2
98
128
 
@@ -100,21 +130,25 @@ Reverted the `spec` question-dependency instructions introduced in `0.5.1`. See
100
130
 
101
131
  ## 0.5.1
102
132
 
103
- Added instructions to resolve prerequisite decisions before asking dependent `spec` questions and to review unresolved decisions before approval. These instructions were reverted in `0.5.2`.
133
+ Added instructions to resolve prerequisite decisions before asking dependent `spec` questions and to review unresolved decisions before approval. These instructions were
134
+ reverted in `0.5.2`.
104
135
 
105
136
  ## 0.5.0
106
137
 
107
- Removed breakage checks from `specs`, `handoffs`, validation, and agent instructions. Breakage checks temporarily introduced faults to test error detection. `Acceptance criteria` retain `probes`, `expected results`, and concrete examples. See [PR #24](https://github.com/emilioSp/pi-maestro/pull/24).
138
+ Removed breakage checks from `specs`, `handoffs`, validation, and agent instructions. Breakage checks temporarily introduced faults to test error detection.
139
+ `Acceptance criteria` retain `probes`, `expected results`, and concrete examples. See [PR #24](https://github.com/emilioSp/pi-maestro/pull/24).
108
140
 
109
141
  Breaking: `handoffs` no longer accept `breakageStatus`. Older `handoffs` containing that field must be regenerated. `Artifact` versions remain `1.0.0`.
110
142
 
111
143
  ## 0.4.5
112
144
 
113
- Required a concrete example in every `acceptance criterion`, both in the `spec` and when presenting it to the `owner`. Examples identify starting conditions, an action, and the expected observable result.
145
+ Required a concrete example in every `acceptance criterion`, both in the `spec` and when presenting it to the `owner`. Examples identify starting conditions, an action,
146
+ and the expected observable result.
114
147
 
115
148
  ## 0.4.4
116
149
 
117
- Expanded Maestro's explanations of `findings` and `escalations` with code evidence, concrete examples, available choices, and their consequences. The `owner` retains control of each decision.
150
+ Expanded Maestro's explanations of `findings` and `escalations` with code evidence, concrete examples, available choices, and their consequences. The `owner` retains
151
+ control of each decision.
118
152
 
119
153
  ## 0.4.3
120
154
 
@@ -122,7 +156,8 @@ Removed explicit `builder` and `verifier` tool allowlists and enabled inherited
122
156
 
123
157
  ## 0.4.2
124
158
 
125
- Made breakage checks optional when the approved `spec` did not require them. Required acceptance `probes` remained mandatory. Breakage checks were later removed in `0.5.0`. See [PR #23](https://github.com/emilioSp/pi-maestro/pull/23).
159
+ Made breakage checks optional when the approved `spec` did not require them. Required acceptance `probes` remained mandatory. Breakage checks were later removed in
160
+ `0.5.0`. See [PR #23](https://github.com/emilioSp/pi-maestro/pull/23).
126
161
 
127
162
  ## 0.4.1
128
163
 
@@ -136,7 +171,8 @@ Enabled inheritance of global instructions for `builder` and `verifier` agents,
136
171
 
137
172
  ## 0.3.0
138
173
 
139
- Clarified `Maestro`, `builder`, and `verifier` responsibilities, `spec` and prototype revisions, permitted experiments, evidence requirements, and cleanup. See [PR #21](https://github.com/emilioSp/pi-maestro/pull/21).
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).
140
176
 
141
177
  ## 0.2.0
142
178
 
@@ -144,10 +180,14 @@ Moved TypeBox to peer dependencies and loosened Pi peer dependency version const
144
180
 
145
181
  ## 0.1.2
146
182
 
147
- 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 [PR #20](https://github.com/emilioSp/pi-maestro/pull/20).
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).
148
185
 
149
- Breaking: renamed `maestro_launch_builder` and `maestro_launch_verifier` to `maestro_run_builder` and `maestro_run_verifier`. Renamed the corresponding workflow events from `launch-*` to `run-*`.
186
+ Breaking: renamed `maestro_launch_builder` and `maestro_launch_verifier` to `maestro_run_builder` and `maestro_run_verifier`. Renamed the corresponding workflow events
187
+ from `launch-*` to `run-*`.
150
188
 
151
189
  ## 0.1.1
152
190
 
153
- First tagged baseline with `/maestro`, `spec` creation and approval, and foreground `builder` and `verifier` `runs`. The `owner` decides `escalation` questions and `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 [PR #13](https://github.com/emilioSp/pi-maestro/pull/13).
191
+ 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).
package/MISSION.md CHANGED
@@ -1,7 +1,9 @@
1
1
  # Mission
2
2
 
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 code.
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.
4
5
  It provides a clear path from an approved `spec` to verified code and manages agent coordination for the `owner`.
5
6
 
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 instructions, including linters, tests, anti-slop checks, and `AGENTS.md`.
7
+ 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`.
7
9
  `Maestro` and its agents use these checks and instructions.
package/README.md CHANGED
@@ -8,7 +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. The `builder` implements it. An independent `verifier` checks every `acceptance criterion`. 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.
12
16
 
13
17
  Five principles hold the workflow together:
14
18
 
@@ -20,14 +24,16 @@ Five principles hold the workflow together:
20
24
 
21
25
  ## The roles
22
26
 
23
- | Role | Responsibility |
24
- |---|---|
25
- | `Owner` | Brings the problem, approves the `spec`, decides questions and `findings`, and reviews the final code. |
26
- | `Maestro` | Works directly with the `owner`, prepares the `spec`, runs the other agents, records decisions, and summarizes results. |
27
- | `Builder` | Implements the approved `spec` and checks each `acceptance criterion`. |
28
- | `Verifier` | Independently checks the project files against the `spec` and reports technical issues. |
27
+ | Role | Responsibility |
28
+ |--------------|-------------------------------------------------------------------------------------------------------------------------|
29
+ | `Owner` | Brings the problem, approves the `spec`, decides questions and `findings`, and reviews the final code. |
30
+ | `Maestro` | Works directly with the `owner`, prepares the `spec`, runs the other agents, records decisions, and summarizes results. |
31
+ | `Builder` | Implements the approved `spec` and checks each `acceptance criterion`. |
32
+ | `Verifier` | Independently checks the project files against the `spec` and reports technical issues. |
33
+ | `Simplifier` | Refactors accepted code for clarity without changing behavior or introducing check failures. |
29
34
 
30
- An `escalation` asks the `owner` to decide an implementation question. A `finding` records a technical issue reported by the `verifier`. The `owner` discusses both with `Maestro`, not directly with the `builder` or `verifier`.
35
+ An `escalation` asks the `owner` to decide an implementation question. A `finding` records a technical issue reported by the `verifier`. The `owner` discusses both with
36
+ `Maestro`, not directly with the `builder` or `verifier`.
31
37
 
32
38
  ## Prerequisites
33
39
 
@@ -35,7 +41,7 @@ An `escalation` asks the `owner` to decide an implementation question. A `findin
35
41
  2. Node.js 26 or later.
36
42
  3. Pi 1.0.0 or later.
37
43
  4. `pi-subagents` installed and enabled in Pi.
38
- 5. Access to the configured `builder` and `verifier` models.
44
+ 5. Access to the configured `builder`, `verifier`, and `simplifier` models.
39
45
  6. A project directory that Pi trusts.
40
46
 
41
47
  ## Installation
@@ -74,26 +80,35 @@ The `owner` follows this workflow:
74
80
  6. Reads Maestro's summary at `candidate-ready` and performs the final review.
75
81
 
76
82
  `Maestro` starts the `verifier` after a successful `builder` `run`.
77
- Both 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 `/subagents-fleet` show agent activity and transcripts.
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.
78
85
 
79
86
  The `owner` must not edit product files while the workflow runs.
80
87
  `Maestro` can perform temporary experiments with `owner` agreement during `spec` preparation and permitted revisions. See [Workflow](docs/workflow.md#spec-approval).
81
88
 
82
- 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 with `Maestro`, never directly with the `builder` or `verifier`.
89
+ 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`.
83
91
  `Maestro` records all current `escalation` answers or `finding` decisions in the active `handoff` before changing phase.
84
92
 
85
93
  If any decision requires a `spec` change, the workflow returns to `drafting-spec` before the `owner` and `Maestro` revise the same `spec`.
86
94
  The `owner` reviews the revised `spec` and replies `GREEN FLAG` again.
87
95
  `Maestro` records renewed approval separately before another `builder` `run`.
88
96
 
89
- The workflow ends at `candidate-ready`. Rejected `findings` retain their reasons. Later changes are outside the completed verification. The `owner` controls any later Git use, pull request, and merge.
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.
90
100
 
91
- The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state.
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.
104
+
105
+ The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state.
92
106
  Saved files do not automatically restore or resume an incomplete workflow. The `owner` handles it manually.
93
107
 
94
108
  ## Configuration
95
109
 
96
- `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 levels, or timeouts. See [Configuration](docs/configuration.md).
110
+ `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
111
+ levels, or timeouts. See [Configuration](docs/configuration.md).
97
112
 
98
113
  ## Documentation
99
114