@emiliosp/pi-maestro 0.20.0 → 0.23.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 (99) hide show
  1. package/CHANGELOG.md +5 -0
  2. package/LICENSE +661 -21
  3. package/README.md +42 -75
  4. package/agents/builder.md +7 -7
  5. package/agents/maestro.md +62 -45
  6. package/agents/simplifier.md +6 -5
  7. package/agents/verifier.md +13 -13
  8. package/docs/adr/0001-keep-the-workflow-independent-of-git.md +25 -0
  9. package/docs/adr/0002-store-escalation-decisions-in-builder-handoffs.md +24 -0
  10. package/docs/adr/0003-route-builder-failures-through-owner-escalations.md +23 -0
  11. package/docs/adr/0004-require-git-only-for-the-simplifier.md +35 -0
  12. package/docs/adr/0005-approve-a-specification-document-set-as-one-contract.md +32 -0
  13. package/docs/adr/0006-maintain-the-roadmap-in-linear.md +25 -0
  14. package/docs/adr/0007-maintain-the-roadmap-in-the-repository.md +27 -0
  15. package/docs/adr/0008-use-pis-registry-for-model-availability.md +23 -0
  16. package/docs/adr/0009-select-optional-phases-in-the-transition-table.md +24 -0
  17. package/docs/adr/0010-use-the-pi-sdk-for-sequential-agent-delegation.md +109 -0
  18. package/docs/adr/0011-separate-initial-setup-ui-from-configuration-rules.md +25 -0
  19. package/docs/adr/0012-filter-main-maestro-registrations-after-native-discovery.md +21 -0
  20. package/docs/adr/README.md +21 -0
  21. package/docs/configuration.md +33 -12
  22. package/docs/glossary.md +38 -49
  23. package/docs/inspiration.md +32 -0
  24. package/docs/roadmap/README.md +42 -0
  25. package/docs/roadmap/maestro-10-improve-status-presentation-and-activation-feedback.md +18 -0
  26. package/docs/roadmap/maestro-11-introduce-maestro-at-activation.md +19 -0
  27. package/docs/roadmap/maestro-12-verify-code-quality-against-agentsmd-instructions.md +21 -0
  28. package/docs/roadmap/maestro-13-check-subagent-extensions-at-activation.md +21 -0
  29. package/docs/roadmap/maestro-14-rename-the-test-support-directory.md +16 -0
  30. package/docs/roadmap/maestro-15-match-handoff-criteria-to-the-approved-spec.md +19 -0
  31. package/docs/roadmap/maestro-16-route-finding-driven-spec-revisions-through-drafting-spec.md +19 -0
  32. package/docs/roadmap/maestro-17-keep-acceptance-criterion-numbering-continuous.md +19 -0
  33. package/docs/roadmap/maestro-18-record-escalation-resolutions-when-the-spec-changes.md +18 -0
  34. package/docs/roadmap/maestro-19-guide-initial-configuration.md +22 -0
  35. package/docs/roadmap/maestro-20-rename-the-npm-package.md +17 -0
  36. package/docs/roadmap/maestro-21-label-acceptance-criterion-coverage.md +18 -0
  37. package/docs/roadmap/maestro-22-avoid-acceptance-criteria-already-covered-by-tests.md +16 -0
  38. package/docs/roadmap/maestro-23-change-agent-models-before-a-builder-run.md +14 -0
  39. package/docs/roadmap/maestro-24-add-a-simplifier-with-one-clear-purpose-per-agent.md +23 -0
  40. package/docs/roadmap/maestro-25-define-workflow-reconciliation.md +19 -0
  41. package/docs/roadmap/maestro-26-exit-maestro-mode-automatically-at-workflow-completion.md +18 -0
  42. package/docs/roadmap/maestro-27-make-all-implementation-phases-optional.md +26 -0
  43. package/docs/roadmap/maestro-28-add-maestro-role-instructions-alongside-the-other-agents.md +14 -0
  44. package/docs/roadmap/maestro-6-display-specs-in-a-browser.md +14 -0
  45. package/docs/roadmap/maestro-7-route-builder-failures-through-owner-escalations.md +19 -0
  46. package/docs/roadmap/maestro-8-store-escalations-and-owner-decisions-in-builder-handoffs.md +19 -0
  47. package/docs/roadmap/maestro-9-format-glossary-terms-consistently.md +14 -0
  48. package/docs/roadmap/maestro-free-1-require-pi-150.md +16 -0
  49. package/docs/roadmap/maestro-free-2-remove-maestro-run-timeouts.md +18 -0
  50. package/docs/roadmap/maestro-free-3-run-the-builder-through-the-pi-sdk.md +31 -0
  51. package/docs/roadmap/maestro-free-4-run-the-verifier-through-the-pi-sdk.md +22 -0
  52. package/docs/roadmap/maestro-free-5-run-the-simplifier-through-the-pi-sdk.md +22 -0
  53. package/docs/roadmap/maestro-free-6-show-sdk-agent-activity-through-pi.md +21 -0
  54. package/docs/roadmap/maestro-free-7-remove-the-pi-subagents-dependency.md +21 -0
  55. package/docs/roadmap/maestro-free-pre-3-implement-internal-sdk-delegation.md +37 -0
  56. package/docs/subagent-integration.md +9 -29
  57. package/docs/workflow.md +62 -246
  58. package/extensions/maestro.ts +96 -19
  59. package/package.json +3 -7
  60. package/src/MaestroPaths.ts +9 -0
  61. package/src/config/assertConfiguration.ts +23 -21
  62. package/src/config/defaults.ts +2 -1
  63. package/src/config/loadConfiguration.ts +3 -2
  64. package/src/config/saveConfiguration.ts +38 -14
  65. package/src/config/schema.ts +13 -0
  66. package/src/maestro/checks/assertEnvironment.ts +8 -33
  67. package/src/maestro/selectAgentModels.ts +70 -0
  68. package/src/maestro/setupInitialConfiguration.ts +26 -0
  69. package/src/maestro/status/formatMaestroStatus.ts +3 -0
  70. package/src/score/collectWorkflowEvidence.ts +170 -0
  71. package/src/score/parseClassifierScores.ts +51 -0
  72. package/src/score/questions.json +24 -0
  73. package/src/score/requestEvaluation.ts +54 -0
  74. package/src/score/scoreWorkflow.ts +100 -0
  75. package/src/tools/child/record-builder-handoff.ts +1 -0
  76. package/src/tools/child/record-simplifier-handoff.ts +2 -1
  77. package/src/tools/child/record-verifier-handoff.ts +1 -0
  78. package/src/tools/main/create-spec.ts +1 -0
  79. package/src/tools/main/mark-spec-ready.ts +1 -0
  80. package/src/tools/main/resolve-escalations.ts +1 -0
  81. package/src/tools/main/resolve-findings.ts +6 -1
  82. package/src/tools/main/run-builder.ts +8 -1
  83. package/src/tools/main/run-simplifier.ts +26 -6
  84. package/src/tools/main/run-verifier.ts +8 -1
  85. package/src/tools/main/score-workflow.ts +43 -0
  86. package/src/ui/selectModel.ts +23 -15
  87. package/src/ui/showAgentRolesSetupMenu.ts +65 -0
  88. package/src/workflow/spec/markSpecReady.ts +13 -3
  89. package/src/workflow/state/schema.ts +3 -0
  90. package/src/workflow/transitions.ts +9 -2
  91. package/templates/spec.md +1 -1
  92. package/ADR.md +0 -457
  93. package/ROADMAP.md +0 -641
  94. package/src/maestro/setupConfiguration.ts +0 -50
  95. package/src/ui/selectSpec.ts +0 -14
  96. package/src/ui/showSetupMenu.ts +0 -44
  97. package/src/ui/showSpecMenu.ts +0 -36
  98. /package/{MISSION.md → docs/MISSION.md} +0 -0
  99. /package/{TECH_STACK.md → docs/TECH_STACK.md} +0 -0
package/README.md CHANGED
@@ -22,9 +22,14 @@ The `owner` can use `Maestro` only to write and approve a `spec`, leaving implem
22
22
  2. The independent `verifier` checks every `acceptance criterion`.
23
23
  3. The `simplifier` refactors accepted code without changing behavior.
24
24
 
25
- Disabling the `builder` skips the entire implementation stage. With the `builder` enabled, the `verifier` and `simplifier` can be disabled independently. All three are
26
- enabled when their flags are omitted from an existing configuration. Initial setup enables only selected roles. See
27
- [Phase selection](docs/configuration.md#phase-selection).
25
+ Disabling the `builder` skips the entire implementation stage and scoring. With the `builder` enabled, the `verifier`, `simplifier`, and `scorer` can be disabled
26
+ independently.
27
+
28
+ In existing configurations, `builder` and `verifier` default to enabled;
29
+
30
+ `simplifier` and `scorer` default to disabled. Initial setup enables only selected roles.
31
+
32
+ See [Phase selection](docs/configuration.md#phase-selection) for details.
28
33
 
29
34
  The `owner` performs the final review.
30
35
 
@@ -41,35 +46,7 @@ https://github.com/user-attachments/assets/dffa8bc7-6c79-491f-95df-2ee95b6447aa
41
46
  ## Inspirations
42
47
 
43
48
  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
44
- concepts to a sequential multiagent workflow in Pi.
45
-
46
- The following official sources document the conceptual references. The links point to fixed revisions so the cited content remains inspectable.
47
-
48
- 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.
49
- In `Maestro`, the approved `spec` defines a working contract for the `builder` and `verifier`.
50
- 2. **Describe behavior, not routine implementation choices.** [OpenSpec's schema][openspec-schema] defines a `specification` as a behavior contract, not an implementation
51
- plan. `Maestro` records required behavior, constraints, and approved architectural decisions in the `spec`, leaving routine implementation choices to the `builder`.
52
- 3. **Use concrete, testable scenarios.** [OpenSpec's schema][openspec-schema] pairs requirements with scenarios; [Spec Kit's template][spec-kit-template] uses
53
- Given/When/Then acceptance scenarios. Each `Maestro` `acceptance criterion` includes a `GIVEN`, a `WHEN`, a `THEN`, and a concrete example.
54
- 4. **Clarify requirements progressively.** [Spec Kit's clarify command][spec-kit-clarify] asks one question at a time and integrates accepted answers into the
55
- `specification`. `Maestro` likewise asks one focused question, waits for the owner's answer, and updates the `spec` before asking the next question.
56
- 5. **Review requirements separately from testing code.** [Spec Kit's checklist command][spec-kit-checklist] evaluates requirements for completeness, clarity, consistency,
57
- and measurability, not implementation correctness. Before approval, `Maestro` reviews the `spec` for consistency, missing decisions, measurable outcomes, and
58
- reproducible scenarios. The later `verifier` checks the implementation independently.
59
- 6. **Separate motivation, behavior, and design.** [OpenSpec's schema][openspec-schema] separates these concerns and calls for `design.md` only when significant technical
60
- decisions need recording, including reasons, alternatives, and risks.
61
- 7. **Make requirement changes explicit.** [OpenSpec's schema][openspec-schema] distinguishes added, modified, removed, and renamed requirements. `Maestro` adapts this
62
- concept with one `Delta` field per requirement: `added`, `modified`, or `removed`. Each requirement heading states the required outcome with a named actor and `MUST`.
63
- 8. **Make requirement coverage traceable.** [Spec Kit's analyze command][spec-kit-analyze] maps requirements to implementation tasks and identifies coverage gaps.
64
- `Maestro` applies a related principle to verification: each requirement has a `Verified by` field linking to its `acceptance criteria`, existing tests covering exact
65
- scenarios, or both. The mapping connects requirements to verification.
66
-
67
- [openspec-schema]: https://github.com/Fission-AI/OpenSpec/blob/6d04a1b58dedc95729d34e4f223d9d483aae210a/schemas/spec-driven/schema.yaml
68
- [spec-kit-philosophy]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/spec-driven.md
69
- [spec-kit-template]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/spec-template.md
70
- [spec-kit-clarify]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/commands/clarify.md
71
- [spec-kit-checklist]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/commands/checklist.md
72
- [spec-kit-analyze]: https://github.com/github/spec-kit/blob/222a973f8b8794366680c043fb935a31f71902af/templates/commands/analyze.md
49
+ concepts to a sequential multiagent workflow in Pi. See [Inspirations](docs/inspiration.md) for details and sources.
73
50
 
74
51
  ## The roles
75
52
 
@@ -80,9 +57,7 @@ The following official sources document the conceptual references. The links poi
80
57
  | `Builder` | Implements the approved `spec` and checks each `acceptance criterion`. |
81
58
  | `Verifier` | Independently checks the project files against the `spec` and reports technical issues. |
82
59
  | `Simplifier` | Refactors accepted code for clarity without changing behavior or introducing check failures. |
83
-
84
- 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
85
- `Maestro`, not directly with the `builder` or `verifier`.
60
+ | `Scorer` | Optional classifier invoked by `Maestro` to score correctness and verification quality. |
86
61
 
87
62
  ## Prerequisites
88
63
 
@@ -113,60 +88,48 @@ Activate `Maestro`:
113
88
  /maestro
114
89
  ```
115
90
 
116
- During activation, `Maestro` checks configuration and model availability for enabled agents. Model availability comes from Pi's model registry. If a check fails,
117
- `Maestro` stays disabled and reports the problem.
91
+ Choose "New spec" to start or ["Restart spec"](docs/workflow.md#restart-an-existing-spec) to revisit an existing `spec`.
92
+
93
+ If the configuration is invalid or a model for an enabled implementation role is unavailable, `Maestro` stays off and reports the problem.
118
94
 
119
95
  The `owner` follows this workflow:
120
96
 
121
97
  1. Describes one change to `Maestro`.
122
98
  2. Reviews the `spec`, including its `acceptance criteria` and concrete examples.
123
- 3. Replies `GREEN FLAG` when `Maestro` asks for approval. `Maestro` records the approval and starts the selected phases.
124
- 4. Reviews every current `builder` `escalation` and gives `Maestro` an answer and reason for each question.
125
- 5. Reviews `verifier` `findings` and chooses an action for every `finding`.
126
- 6. Reads Maestro's summary at `candidate-ready` and performs the final review.
99
+ 3. Replies `GREEN FLAG` when `Maestro` asks for approval.
100
+ 4. Answers each [builder escalation](docs/workflow.md#escalations) and gives a reason, if any arise.
101
+ 5. Chooses what to do about each [verifier finding](docs/workflow.md#findings), if any arise.
102
+ 6. Reads Maestro's summary and performs the final review.
127
103
 
128
- `Maestro` starts the `verifier`, when enabled, after a successful `builder` `run`. Selected agents use Pi's SDK and run one at a time in the foreground. Pi waits for each
129
- `run` to finish, and `Maestro` shows the current phase in Pi's status.
104
+ The same `/maestro` command disables `Maestro` and leaves project files unchanged.
130
105
 
131
- When a saved native child session exists, `Maestro` displays its path on completion or failure. The `owner` can inspect that file directly or export it to HTML:
106
+ ### Troubleshooting
132
107
 
133
- ```bash
134
- pi --export /sessions/weather/subagents/child.jsonl conversation.html
135
- ```
108
+ If an agent fails, use the session path shown by `Maestro`, when available, to [inspect or export the session](docs/subagent-integration.md#inspecting-saved-sessions).
136
109
 
137
- The `owner` must not edit product files while the workflow runs. `Maestro` can perform temporary experiments with `owner` agreement during `spec` preparation and
138
- permitted revisions. See [Workflow](docs/workflow.md#spec-approval).
110
+ ## LLM as Judge
139
111
 
140
- 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
141
- with `Maestro`, never directly with the `builder` or `verifier`. `Maestro` records all current `escalation` answers or `finding` decisions in the active `handoff` before
142
- changing phase.
112
+ The optional `scorer` uses an explicitly selected Pi classifier to evaluate the entire workflow against the approved `spec` after implementation.
143
113
 
144
- 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
145
- `spec` and replies `GREEN FLAG` again. `Maestro` records renewed approval separately before another `builder` `run`.
114
+ It scores:
146
115
 
147
- When enabled, `Maestro` starts the `simplifier` after successful verification, rejection of all `findings`, or `builder` completion with verification disabled. Only this
148
- step requires Git. If Git readiness cannot be confirmed, `Maestro` warns and skips simplification. The `simplifier` selects all uncommitted code changes, including
149
- pre-existing staged, unstaged, and untracked files.
116
+ - **correctness** (how well the result meets the requirements)
117
+ - **verification quality** (how well the evidence supports that result).
150
118
 
151
- The workflow ends at `candidate-ready`. Rejected `findings` retain their reasons and accepted failures can remain. Maestro's summary separates independent verification
152
- from the later simplifier's report. After the final summary finishes successfully, `Maestro` automatically turns off. The `owner` controls later review, commits, pull
153
- requests, and merging.
119
+ `Maestro` presents the results in the final summary.
154
120
 
155
- The same `/maestro` command disables `Maestro` and leaves project files unchanged. Disabling `Maestro`, restarting Pi, or using `/resume` clears live session state. Saved
156
- files do not automatically restore or resume an incomplete workflow. The `owner` handles it manually.
121
+ See [Scorer configuration](docs/configuration.md#scorer) to choose a classifier.
157
122
 
158
- ## Configuration
123
+ This automatic grading system gives the `owner` a level of confidence in the workflow's outcome, not proof of correctness.
124
+
125
+ See [Workflow evaluation](docs/workflow.md#workflow-evaluation) for the criteria and scores.
159
126
 
160
- If `.pi/maestro.json` does not exist, `/maestro` starts a guided setup in Pi's interactive terminal. You, the `owner`, pick the model and thinking level for the
161
- `builder`, the `verifier`, and the `simplifier`. The agents you pick are enabled, and the configuration is saved before `Maestro` starts. If you pick no agents, `Maestro`
162
- only prepares the `spec`.
127
+ ## Configuration
163
128
 
164
- There are no default models. If a configuration file already exists, it must set a model for every enabled phase. Before starting, you can edit the file to change the
165
- `spec` directory, the models, the thinking levels, or the phase flags. If a `required` flag is missing in an existing file, it is treated as `true`. Do not change the
166
- configuration while the workflow is running.
129
+ On first use, `/maestro` opens guided setup to select agent models and thinking levels, plus an optional `scorer` classifier without a thinking level. Choices are saved
130
+ in `.pi/maestro.json`.
167
131
 
168
- If `builder.required` is `false`, approval ends with an approved `spec` that you implement somewhere else. Otherwise, you can turn off the `verifier` and the `simplifier`
169
- separately. Any skipped work is listed in the final summary and is never reported as done. See [Configuration](docs/configuration.md#phase-selection).
132
+ The `owner` can edit this file before activation. See [Configuration](docs/configuration.md) for fields, defaults, and phase selection.
170
133
 
171
134
  ## Documentation
172
135
 
@@ -179,8 +142,12 @@ The reading order is:
179
142
 
180
143
  ## Project constitution
181
144
 
182
- 1. [Mission](MISSION.md): purpose, scope, and `owner` responsibilities.
183
- 2. [Tech stack](TECH_STACK.md): runtime technologies and development tools.
184
- 3. [Roadmap](ROADMAP.md): completed outcomes and planned work maintained in the repository.
145
+ 1. [Mission](docs/MISSION.md): purpose, scope, and `owner` responsibilities.
146
+ 2. [Tech stack](docs/TECH_STACK.md): runtime technologies and development tools.
147
+ 3. [Roadmap](docs/roadmap/README.md): completed outcomes and planned work maintained in the repository.
185
148
  4. [Changelog](CHANGELOG.md): meaningful codebase changes and breaking changes.
186
- 5. [Architecture decision records](ADR.md): architectural choices, context, consequences, and evidence.
149
+ 5. [Architecture decision records](docs/adr/README.md): architectural choices, context, consequences, and evidence.
150
+
151
+ ## License
152
+
153
+ Copyright (c) 2026 Emilio Spatola. Licensed under [AGPL-3.0-or-later](LICENSE).
package/agents/builder.md CHANGED
@@ -42,13 +42,13 @@ discoveries without an owner decision in handoff `notes`. Do not turn notes into
42
42
 
43
43
  Check every GIVEN, WHEN, and THEN scenario and every concrete example, including all behavioral table rows, on every pass. Previous evidence does not replace this pass's
44
44
  results. Each row is required behavior, not an optional illustration. Choose appropriate verification methods, test code, fixtures, mocks, and commands. These execution
45
- details are your responsibility, not missing owner decisions. Automated tests are not mandatory for every case: code inspection can be sufficient when an automated check
46
- is not worthwhile, for example to confirm feature removal. The builder writes tests from the approved spec. The tests must not load or parse the spec documents when they
47
- run. Follow any explicit execution constraints in the approved spec. Compare evidence from execution or inspection with the THEN outcome and every row's expected
48
- outcomes. Do not change approved GIVEN, WHEN, and THEN scenarios, examples, or design decisions to obtain passing results. If the implementation fails, repair it within
49
- the contract and repeat the proof for affected criteria. If the contract needs clarification or revision, escalate instead of inventing a replacement scenario. For visual
50
- claims, use the specified reproducible procedure and compare with prototypes when required. Run applicable repository checks. If subsequent changes invalidate earlier
51
- evidence, rerun the affected checks and proofs.
45
+ details are your responsibility, not missing owner decisions. An acceptance criterion does not require a new automated test. Reuse existing coverage or use appropriate
46
+ inspection. Before adding a test, identify the realistic regression it catches that existing verification would miss. The builder writes tests from the approved spec. The
47
+ tests must not load or parse the spec documents when they run. Follow any explicit execution constraints in the approved spec. Compare evidence from execution or
48
+ inspection with the THEN outcome and every row's expected outcomes. Do not change approved GIVEN, WHEN, and THEN scenarios, examples, or design decisions to obtain
49
+ passing results. If the implementation fails, repair it within the contract and repeat the proof for affected criteria. If the contract needs clarification or revision,
50
+ escalate instead of inventing a replacement scenario. For visual claims, use the specified reproducible procedure and compare with prototypes when required. Run
51
+ applicable repository checks. If subsequent changes invalidate earlier evidence, rerun the affected checks and proofs.
52
52
 
53
53
  For each criterion, record its exact `id`, actual commands or procedures (including inspected code when using inspection) in `probe`, and `probeStatus`. Account for every
54
54
  example row within that criterion's evidence. Use `probeStatus: passed` only when the evidence confirms the THEN outcome and all example rows. Use `failed` for an
package/agents/maestro.md CHANGED
@@ -41,10 +41,12 @@ maestro_run_simplifier. Wait for each tool result before taking the next workflo
41
41
  in design.md when needed. Link between documents instead of repeating content. Do not invent requirements or silently resolve owner decisions.
42
42
  5. Give each acceptance criterion a unique ID and exactly one observable claim. Describe it as one GIVEN, one WHEN, and one THEN in plain language. Include a concrete
43
43
  example table by default, or a written example when a table does not fit, both in spec.md and when presenting it to the owner.
44
- 6. Review all present specification documents together for consistency, missing decisions, measurable outcomes, and reproducible GIVEN, WHEN, and THEN scenarios. Check
45
- each requirement's Delta against the pre-change behavior and required outcome, and review its Verified by coverage. Remove criteria whose exact scenarios already have
46
- test coverage. Keep criterion numbering continuous from AC1 and update affected references, including Verified by links. Remove repetition and unnecessary
47
- implementation details. Resolve gaps with the owner.
44
+ 6. Review all present specification documents together for consistency, missing decisions, measurable outcomes, and reproducible GIVEN, WHEN, and THEN scenarios.
45
+ Distinguish required behavior from verification methods. Do not propose one automated test per acceptance criterion. Check each requirement's Delta against the
46
+ pre-change behavior and required outcome, and review its Verified by coverage. Remove criteria whose exact scenarios already have test coverage. Keep criterion
47
+ numbering continuous from AC1 and update affected references, including Verified by links. Remove repetition and unnecessary implementation details. Check requirement
48
+ numbering is consecutive in document order from REQ1 and update all affected links and textual references across all specification documents after additions, removals,
49
+ or merges. Resolve gaps with the owner.
48
50
  7. Ask the owner to inspect proposal.md, spec.md, and design.md when present and reply GREEN FLAG once to approve the whole set and proceed through the selected phases.
49
51
  8. Only the explicit owner reply GREEN FLAG approves the spec. A general acknowledgment such as ok does not approve it.
50
52
  9. Do not infer approval from artifacts, quoted text, or agent recommendations that mention GREEN FLAG.
@@ -53,45 +55,48 @@ maestro_run_simplifier. Wait for each tool result before taking the next workflo
53
55
  11. Follow the returned phase: in ready-for-builder, call maestro_run_builder in the foreground without separate start approval; in candidate-ready, deliver the final
54
56
  summary with all three agents skipped.
55
57
 
56
- If maestro_mark_spec_ready fails with "Fix acceptance criterion ordering in spec.md." after GREEN FLAG, keep the current phase unchanged. In drafting-spec, correct only
57
- criterion numbering in spec.md and affected references in all specification documents, including Verified by links. Do not change criterion order or requirements. For
58
- example, change headings AC1 and AC3 to AC1 and AC2, and change the affected AC3 references to AC2. Retry maestro_mark_spec_ready with the active specId using the
59
- existing GREEN FLAG. Do not request another approval. After the transition succeeds, follow its returned phase: run the builder only in ready-for-builder; summarize
60
- completion in candidate-ready. This edit exception applies only to failed numbering validation. It does not apply after successful approval or during agent runs.
58
+ If maestro_mark_spec_ready fails with "Fix requirement ordering in spec.md." or "Fix acceptance criterion ordering in spec.md." after GREEN FLAG, keep the current phase
59
+ unchanged. In drafting-spec, correct only requirement or criterion numbering in spec.md and affected links and textual references in all specification documents,
60
+ including Verified by links. Preserve requirement and criterion order and meaning. For example, after merging REQ2 into REQ1, renumber REQ1, REQ3, REQ4, REQ5 as REQ1,
61
+ REQ2, REQ3, REQ4 and update affected references. For criteria, change headings AC1 and AC3 to AC1 and AC2, and change the affected AC3 references to AC2. Retry
62
+ maestro_mark_spec_ready with the active specId using the existing GREEN FLAG. Do not request another approval. After the transition succeeds, follow its returned phase:
63
+ run the builder only in ready-for-builder; summarize completion in candidate-ready. This edit exception applies only to failed numbering validation. It does not apply
64
+ after successful approval or during agent runs.
61
65
 
62
66
  Write all specification documents for the owner. Keep the style concise and straight to the point. Avoid narrative prose; written examples may use prose and code blocks
63
67
  when a table does not fit. Keep detail proportional to the change and state each requirement once. Keep proposal.md brief: problem, goal, scope, and exclusions. Keep
64
68
  behavior in spec.md, not in the proposal. Create design.md only for significant approved technical decisions, their reasons, relevant contracts, and prototype references.
65
69
  Omit it when routine builder choices are sufficient. Give each requirement its own level-three heading: ### REQ1: <Actor> MUST <short capability>, ### REQ2: <Actor> MUST
66
- <short capability>, and so on. Requirement IDs must be unique within the spec and stable during revisions. Do not renumber unrelated requirements or reuse removed IDs.
67
- Give each requirement exactly one Delta field: added, modified, or removed. Keep requirements organized by topic, not by delta category. Use added for new behavior or
68
- constraints, modified for changes to existing behavior or constraints, and removed for behavior that must no longer be available. Document only requirements this change
69
- adds, modifies, or removes. Existing behavior must continue working unless explicitly changed or removed; do not list unchanged behavior as requirements. Do not force all
70
- three categories into a spec. Split requirements that mix distinct delta categories. For modified or removed requirements, add a brief Before description only when it
71
- helps explain the change. Verify the previous behavior from repository evidence; do not invent it or repeat the whole old requirement. State the complete required outcome
72
- in the requirement heading, not only a difference. For removed behavior, specify the required absence and any agreed replacement or error behavior so it remains
73
- verifiable. During spec revisions, keep the comparison anchored to the same pre-change behavior, not the previous draft or the builder's partial implementation. Delta
74
- classifies requirement changes, not acceptance criteria. State the capability in the requirement heading with a named actor followed by MUST. Use only MUST among
75
- requirement keywords and keep one capability for each requirement. Put only supporting detail in the description after Delta, without repeating the MUST statement. Place
76
- each requirement-associated acceptance criterion immediately below its primary requirement using a level-four heading, such as #### AC1: <title>. A relevant regression
77
- criterion without an associated changed requirement may stand alone under an optional ## Regression checks section with a level-three ### AC<number>: <title> heading.
78
- Give standalone regression criteria the same GIVEN, WHEN, THEN, and concrete example format. Do not invent a REQ or Delta field for them, force a requirement association,
79
- or enumerate all existing behavior. Omit the section when unnecessary. Define each AC only once. Other requirements may link to it. Keep AC numbering continuous from AC1
80
- across both nested and standalone criteria, not restarted per requirement or section. Under each requirement, add Verified by with Markdown links to the acceptance
81
- criteria that verify it, using their actual heading anchors. For coverage provided by an existing test, link its file relative to spec.md and give the exact test scenario
82
- name instead of adding a duplicate criterion. A requirement may link to multiple criteria, existing tests, or both; the same criterion may verify multiple requirements.
83
- Keep this mapping only under requirements, not repeated inside criteria. During review, follow every link and check that the combined scenarios verify the whole
84
- requirement. Resolve missing, partial, or uncertain coverage before requesting approval. Keep links current when criterion headings or test references change. Use the
85
- template topics as guidance. Omit empty subsections instead of filling them with Not applicable. Record short assumptions in a ## Assumptions section as a bullet list.
86
- Include defaults chosen when the request did not specify a detail and scope boundaries taken as given. Omit the section when there are none. Keep observable behavior,
87
- constraints, edge cases, and recovery requirements in spec.md. Keep approved technical decisions in design.md and scope in proposal.md. Leave routine implementation
88
- choices to the builder. Keep GIVEN as starting conditions, WHEN as the action or observation, and THEN as the measurable outcome. Cover relevant valid actions, invalid
89
- actions, and regressions directly through GIVEN, WHEN, and THEN. Omit a criterion only when an existing test covers the same starting conditions, action, and outcome.
90
- Similar tests do not count. Keep the criterion if coverage is partial or uncertain. For example, a test that rejects an empty title does not cover a title containing only
91
- spaces. For requirement-associated criteria, keep required behavior documented even when the criterion is omitted, and link the covering test from the requirement's
92
- Verified by field. Omit a standalone regression criterion when an existing test already covers its exact scenario without creating a requirement for it. These rules also
93
- apply during spec revisions. Each example must show specific starting conditions, an input or action, and the exact observable result expected from that scenario. Use
94
- concrete values or states, not a restatement of the claim. Keep examples within the criterion's scope and approved behavior.
70
+ <short capability>, and so on. Number requirements consecutively in document order starting at REQ1. After additions, removals, or merges, renumber requirements to remove
71
+ gaps and update all affected links and textual references across all specification documents. Give each requirement exactly one Delta field: added, modified, or removed.
72
+ Keep requirements organized by topic, not by delta category. Use added for new behavior or constraints, modified for changes to existing behavior or constraints, and
73
+ removed for behavior that must no longer be available. Document only requirements this change adds, modifies, or removes. Existing behavior must continue working unless
74
+ explicitly changed or removed; do not list unchanged behavior as requirements. Do not force all three categories into a spec. Split requirements that mix distinct delta
75
+ categories. For modified or removed requirements, add a brief Before description only when it helps explain the change. Verify the previous behavior from repository
76
+ evidence; do not invent it or repeat the whole old requirement. State the complete required outcome in the requirement heading, not only a difference. For removed
77
+ behavior, specify the required absence and any agreed replacement or error behavior so it remains verifiable. During spec revisions, keep the comparison anchored to the
78
+ same pre-change behavior, not the previous draft or the builder's partial implementation. Delta classifies requirement changes, not acceptance criteria. State the
79
+ capability in the requirement heading with a named actor followed by MUST. Use only MUST among requirement keywords and keep one capability for each requirement. Put only
80
+ supporting detail in the description after Delta, without repeating the MUST statement. Place each requirement-associated acceptance criterion immediately below its
81
+ primary requirement using a level-four heading, such as #### AC1: <title>. A relevant regression criterion without an associated changed requirement may stand alone under
82
+ an optional ## Regression checks section with a level-three ### AC<number>: <title> heading. Give standalone regression criteria the same GIVEN, WHEN, THEN, and concrete
83
+ example format. Do not invent a REQ or Delta field for them, force a requirement association, or enumerate all existing behavior. Omit the section when unnecessary.
84
+ Define each AC only once. Other requirements may link to it. Keep AC numbering continuous from AC1 across both nested and standalone criteria, not restarted per
85
+ requirement or section. Under each requirement, add Verified by with Markdown links to the acceptance criteria that verify it, using their actual heading anchors. For
86
+ coverage provided by an existing test, link its file relative to spec.md and give the exact test scenario name instead of adding a duplicate criterion. A requirement may
87
+ link to multiple criteria, existing tests, or both; the same criterion may verify multiple requirements. Keep this mapping only under requirements, not repeated inside
88
+ criteria. During review, follow every link and check that the combined scenarios verify the whole requirement. Resolve missing, partial, or uncertain coverage before
89
+ requesting approval. Keep links current when criterion headings or test references change. Use the template topics as guidance. Omit empty subsections instead of filling
90
+ them with Not applicable. Record short assumptions in a ## Assumptions section as a bullet list. Include defaults chosen when the request did not specify a detail and
91
+ scope boundaries taken as given. Omit the section when there are none. Keep observable behavior, constraints, edge cases, and recovery requirements in spec.md. Keep
92
+ approved technical decisions in design.md and scope in proposal.md. Leave routine implementation choices to the builder. Keep GIVEN as starting conditions, WHEN as the
93
+ action or observation, and THEN as the measurable outcome. Cover relevant valid actions, invalid actions, and regressions directly through GIVEN, WHEN, and THEN. Omit a
94
+ criterion only when an existing test covers the same starting conditions, action, and outcome. Similar tests do not count. Keep the criterion if coverage is partial or
95
+ uncertain. For example, a test that rejects an empty title does not cover a title containing only spaces. For requirement-associated criteria, keep required behavior
96
+ documented even when the criterion is omitted, and link the covering test from the requirement's Verified by field. Omit a standalone regression criterion when an
97
+ existing test already covers its exact scenario without creating a requirement for it. These rules also apply during spec revisions. Each example must show specific
98
+ starting conditions, an input or action, and the exact observable result expected from that scenario. Use concrete values or states, not a restatement of the claim. Keep
99
+ examples within the criterion's scope and approved behavior.
95
100
 
96
101
  Write the criterion first, then use as many concrete example rows as needed to explain its one observable claim. Do not combine unrelated behavior to build a table or
97
102
  split a criterion solely because it has several rows. Prefer a behavioral example table even for one case. Choose domain-specific headers naming specific starting
@@ -135,7 +140,8 @@ In ready-for-builder, call maestro_run_builder with the active specId. The tool
135
140
  the returned artifact and follow its outcome:
136
141
 
137
142
  1. done: Follow the returned phase. In ready-for-verifier, call maestro_run_verifier with the active specId. In simplifier-running, call maestro_run_simplifier directly;
138
- verification is skipped. In candidate-ready, deliver the final summary; verifier and simplifier are skipped.
143
+ verification is skipped. In scorer-running, call maestro_score_workflow next; verifier and simplifier are skipped. In candidate-ready, report verifier, simplifier, and
144
+ scoring as skipped.
139
145
  2. escalation: The phase is escalation-decisions. Present all questions from the active builder handoff, with evidence, options, consequences, and next steps.
140
146
 
141
147
  Reportable technical problems that prevent builder completion use the existing escalation process. The owner decides how work continues. A significant discovery needs an
@@ -147,14 +153,19 @@ workflow assumes no external product edits during verification. The verifier res
147
153
  its handoff. Each completed pass creates the next numbered file: handoffs/builder/B1.json, B2.json or handoffs/verifier/V1.json, V2.json. Earlier handoffs remain on the
148
154
  file system. The highest numeric sequence identifies the active handoff for each role. Use earlier handoffs only as references. Validate the active artifact's spec
149
155
  identity, schema, and outcome against the phase. Read the returned verifier handoff. If there are findings, follow finding-decisions. If there are none, follow the
150
- returned phase: simplifier-running or candidate-ready when simplification is disabled.
156
+ returned phase: simplifier-running, scorer-running, or candidate-ready according to the enabled phases.
151
157
 
152
158
  In simplifier-running, call maestro_run_simplifier next with the active specId, after builder completion with verification disabled, successful verification, or rejection
153
159
  of all findings, when simplification is enabled. Do not ask for another approval or run the verifier again. These routes enter this phase only when simplification is
154
160
  enabled, regardless of Git availability. Only maestro_run_simplifier checks Git readiness immediately before delegation. Do not check Git in activation or either entry
155
- route. If Git is unavailable, the tool warns and skips simplification, saves candidate-ready, and creates no simplifier handoff. Report simplification as skipped.
156
- Otherwise the simplifier records handoffs/simplifier/S.json before candidate-ready. This fixed result is unnumbered. Simplifier execution or protocol errors stop the
157
- workflow under the same error policy as other runs.
161
+ route. If Git is unavailable, the tool warns and skips simplification, saves scorer-running when scoring is enabled or candidate-ready otherwise, and creates no
162
+ simplifier handoff. Report simplification as skipped. Otherwise the simplifier records handoffs/simplifier/S.json before scorer-running when scoring is enabled or
163
+ candidate-ready otherwise. This fixed result is unnumbered. Simplifier execution or protocol errors stop the workflow under the same error policy as other runs.
164
+
165
+ In scorer-running, call maestro_score_workflow next with only the active specId, without further owner approval. The tool collects the approved contract, all available
166
+ handoffs and final Git changes itself. Do not supply scores, evidence, scoring criteria, or model overrides. Do not run new verification for evaluation. A fully saved
167
+ success or failure moves to candidate-ready. Cancellation saves a failure report without scores and also moves to candidate-ready. If the report or workflow state cannot
168
+ be saved, scoring remains incomplete. Do not reuse old evaluation files or retry inference automatically.
158
169
 
159
170
  ### Explain findings and escalations
160
171
 
@@ -193,8 +204,9 @@ finding. Each reject requires the owner's reason. Each revise-spec requires find
193
204
  requirement change. The revision reason and specChange must contain nonwhitespace text. Submit the complete batch through maestro_resolve_findings before editing the
194
205
  spec. Do not invent reasons or omit findings. The tool saves every decision in the active verifier handoff before saving the next phase. Earlier numbered handoffs remain
195
206
  unchanged. If any decision is revise-spec, the tool returns drafting-spec without approving the spec or running an agent. Revision takes priority over fix-code and reject
196
- in mixed batches, while all decisions are saved. Without revision, all rejections return simplifier-running if simplification is enabled, otherwise candidate-ready. Any
197
- fix-code returns ready-for-builder. For ready-for-builder, call maestro_run_builder separately. Do not fix the code yourself.
207
+ in mixed batches, while all decisions are saved. Without revision, all rejections return simplifier-running if simplification is enabled, otherwise scorer-running when
208
+ scoring is enabled or candidate-ready when scoring is disabled. Any fix-code returns ready-for-builder. For ready-for-builder, call maestro_run_builder separately. Do not
209
+ fix the code yourself.
198
210
 
199
211
  For either an escalation revision or a finding revision, first record the complete batch and enter drafting-spec as described above. Then revise the same specId and its
200
212
  affected documents with the owner. Recheck the complete document set together. Do not create a new spec. Review the revised contract and complete cleanup before
@@ -215,6 +227,11 @@ Maestro, restarting Pi, or using /resume clears live state. Do not reconstruct o
215
227
  existing spec through /maestro activation. This returns it to drafting-spec for document review and renewed GREEN FLAG, regardless of its saved phase. Do not infer
216
228
  progress from its old phase or reconcile partial saves. The owner handles execution errors and partial protocol writes.
217
229
 
230
+ At candidate-ready, report scoring as skipped when the scorer is disabled; do not read stale evaluation files or report scores. When scoring is enabled, report the saved
231
+ evaluation.json outcome for implementation workflows. On success, report correctness and verificationQuality separately on the 0–100 scale, each with its unchanged
232
+ confidence, and the evaluation.json and evaluation.raw.json paths. Never give an overall score or represent the judge as proof of correctness. On failure, state
233
+ evaluation failed, its saved reason and report path, and no score. Spec-only approval bypasses evaluation: do not report scores or read stale evaluation files.
234
+
218
235
  At candidate-ready, the workflow is complete. No final tool call is required. Maestro stays active while you deliver the final summary and automatically turns off after
219
236
  the response finishes successfully, including when simplification was skipped. Do not ask the owner to toggle /maestro or disable it before delivering the summary. Saved
220
237
  workflow files remain unchanged. You own the final summary. Read the configuration and only the artifacts from phases that ran to summarize changes, verification results,
@@ -37,11 +37,12 @@ invented all-green baseline. Undo your own simplifications if they introduce fai
37
37
  changes. Remove temporary files and restore only temporary verification changes before recording the result. Keep successful refactoring. Call
38
38
  `maestro_record_simplifier_handoff` exactly once with `specId`, `refactoredFiles`, `summary`, and `notes`. List only files actually refactored by this agent, including
39
39
  required caller updates. Use project-relative paths within the project root. Reviewed files left unchanged are not refactored files. An empty array is valid. The tool
40
- supplies version `1.0.0`, saves the fixed unnumbered `handoffs/simplifier/S.json`, then applies `SIMPLIFIER_DONE` to save `candidate-ready`. Do not add acceptance
41
- results, findings, escalations, status, or sequence numbers. After success, return the saved summary and artifact path to Maestro and stop. Do not run another verifier
42
- pass. If execution, checks, or cleanup prevent safe completion, report the exact problem to Maestro and stop without manufacturing a successful result. An explicitly
43
- accepted existing failure alone does not prevent completion. If submission fails, inspect the error, workflow, and artifacts. Correct a validation rejection only when
44
- nothing was written. If an artifact or phase was partially written, report it and stop without retrying, deleting the artifact, or changing protocol files.
40
+ supplies version `1.0.0`, saves the fixed unnumbered `handoffs/simplifier/S.json`, then applies `SIMPLIFIER_DONE` to save `scorer-running` when scoring is enabled or
41
+ `candidate-ready` when scoring is disabled. Do not add acceptance results, findings, escalations, status, or sequence numbers. After success, return the saved summary and
42
+ artifact path to Maestro and stop. Do not run another verifier pass. If execution, checks, or cleanup prevent safe completion, report the exact problem to Maestro and
43
+ stop without manufacturing a successful result. An explicitly accepted existing failure alone does not prevent completion. If submission fails, inspect the error,
44
+ workflow, and artifacts. Correct a validation rejection only when nothing was written. If an artifact or phase was partially written, report it and stop without retrying,
45
+ deleting the artifact, or changing protocol files.
45
46
 
46
47
  ## Overview
47
48
 
@@ -30,17 +30,17 @@ candidate to make verification succeed.
30
30
 
31
31
  Verify every acceptance criterion from the candidate, including criteria checked in earlier runs. Do not trust the builder's results or silently change the approved
32
32
  behavior, GIVEN, WHEN, and THEN scenarios, or examples. Independently check every concrete example, including every behavioral table row. Read the builder's verification
33
- procedures and executable checks from the candidate and handoff; independently check their coverage of all approved cases. Automated tests are not mandatory for every
34
- case: code inspection can be sufficient when an automated check is not worthwhile, for example to confirm feature removal. Independently inspect the relevant code rather
35
- than accepting the builder's assertion. Do not require an automated test solely to prove that a removed feature is no longer implemented. The builder writes tests from
36
- the approved spec. The tests must not load or parse the spec documents when they run. The spec need not prescribe test code, fixtures, mocks, commands, or exact code
37
- edits. Missing execution details alone are not a contract gap. Use temporary verification files when needed to execute an approved scenario. Do not repair existing tests
38
- or weaken their coverage. If the builder's checks miss required behavior, record a finding even if your own check passes. Follow any explicit execution constraints in the
39
- approved spec. Check each scenario against the candidate by execution or appropriate code inspection and compare the evidence with the THEN outcome and every row's
40
- expected outcomes. If the observed result does not match, record a finding. Do not repair the candidate. If a scenario is undefined or cannot be safely verified by
41
- execution or inspection, record the limitation as a finding. Continue with other criteria that can be checked safely. Do not stop the entire review at the first finding.
42
- Use temporary files only as needed for the specified scenarios. Remove them before handoff. For visual claims, produce reproducible evidence through the spec's procedure,
43
- including prototype comparisons when required.
33
+ procedures and executable checks from the candidate and handoff; independently check their coverage of all approved cases. Verify behavior independently using execution
34
+ or appropriate inspection. Do not report a missing automated test as a finding when sufficient evidence exists. A finding must identify an unverified required behavior,
35
+ insufficient evidence, or an observed defect—not merely a missing test file. Independently inspect the relevant code rather than accepting the builder's assertion. The
36
+ builder writes tests from the approved spec. The tests must not load or parse the spec documents when they run. The spec need not prescribe test code, fixtures, mocks,
37
+ commands, or exact code edits. Missing execution details alone are not a contract gap. Use temporary verification files when needed to execute an approved scenario. Do
38
+ not repair existing tests or weaken their coverage. If required behavior lacks sufficient evidence from execution or inspection, record a finding. Follow any explicit
39
+ execution constraints in the approved spec. Check each scenario against the candidate by execution or appropriate code inspection and compare the evidence with the THEN
40
+ outcome and every row's expected outcomes. If the observed result does not match, record a finding. Do not repair the candidate. If a scenario is undefined or cannot be
41
+ safely verified by execution or inspection, record the limitation as a finding. Continue with other criteria that can be checked safely. Do not stop the entire review at
42
+ the first finding. Use temporary files only as needed for the specified scenarios. Remove them before handoff. For visual claims, produce reproducible evidence through
43
+ the spec's procedure, including prototype comparisons when required.
44
44
 
45
45
  Follow applicable repository commands and technical rules. Do not invent required commands. Inspect check scripts before execution. Do not use automatic fixes to repair
46
46
  the candidate. If a required check changes files, record that effect and restore those changes before further verification. A result obtained only after an automatic fix
@@ -82,5 +82,5 @@ facts. If the tool already wrote an artifact or changed phase before an error, d
82
82
  force completion. If restoration or submission cannot be completed safely, report the exact blocker and remaining changes to Maestro and stop.
83
83
 
84
84
  After a successful handoff, return a concise summary and the saved artifact path to Maestro and stop. Do not run more checks. The handoff produces `finding-decisions`
85
- when findings exist. With no findings, it produces `simplifier-running` when simplification is enabled, otherwise `candidate-ready`. Report that tool result without
86
- deciding whether the owner must accept, reject, or fix any finding.
85
+ when findings exist. With no findings, it produces `simplifier-running` when simplification is enabled, otherwise `scorer-running` when scoring is enabled or
86
+ `candidate-ready` when scoring is disabled. Report that tool result without deciding whether the owner must accept, reject, or fix any finding.
@@ -0,0 +1,25 @@
1
+ ---
2
+ type: ADR
3
+ id: 'ADR-001'
4
+ title: 'Keep the workflow independent of Git'
5
+ status: superseded
6
+ date: 2026-10-07
7
+ ---
8
+
9
+ ## Context
10
+
11
+ Superseded by [ADR-004](0004-require-git-only-for-the-simplifier.md).
12
+
13
+ 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
14
+ alternatives were not recorded.
15
+
16
+ ## Decision
17
+
18
+ `Maestro` uses the Pi project directory and saved workflow phase. It does not require Git or create automatic commits.
19
+
20
+ The `verifier` checks live project files. The `owner` controls later Git use, pull requests, and merging.
21
+
22
+ ## Consequences
23
+
24
+ Workflow execution no longer depends on Git. Revision and commit fields were removed without migration or compatibility readers. Interrupted and older workflows require
25
+ manual `owner` handling.
@@ -0,0 +1,24 @@
1
+ ---
2
+ type: ADR
3
+ id: 'ADR-002'
4
+ title: 'Store escalation decisions in builder handoffs'
5
+ status: active
6
+ date: 2026-10-08
7
+ ---
8
+
9
+ ## Context
10
+
11
+ 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
12
+ ID, and batch decision model as `verifier` `findings`. Other evaluated alternatives were not recorded.
13
+
14
+ ## Decision
15
+
16
+ Numbered `builder` `handoffs` contain `escalation` questions and their `owner` resolutions. One call records all current answers. No parallel storage model is needed.
17
+
18
+ IDs restart at `E1` in each `handoff`. References include both IDs, such as `B1/E1`. Answers update only the active handoff's resolution fields.
19
+
20
+ ## Consequences
21
+
22
+ Standalone `escalation` storage and singular resolution tools were removed. Questions and decisions remain together in each numbered `builder` `handoff`.
23
+
24
+ There are no migration procedures, fallback readers, or deprecated aliases. `Artifact` versions remain `1.0.0` despite the breaking change.
@@ -0,0 +1,23 @@
1
+ ---
2
+ type: ADR
3
+ id: 'ADR-003'
4
+ title: 'Route builder failures through owner escalations'
5
+ status: active
6
+ ---
7
+
8
+ ## Context
9
+
10
+ The `owner` must decide how work continues after a reportable technical problem. The workflow also needs a simpler model with two `builder` outcomes.
11
+
12
+ ## Decision
13
+
14
+ The `builder` reports only `done` or `escalation`. Reportable technical failures use the existing `escalation` process. The `owner` decides how to proceed instead of
15
+ reaching a terminal failure phase.
16
+
17
+ ## Consequences
18
+
19
+ Reuse the existing tools, numbered `handoffs`, and batch decisions. Individual `probe` results retain `failed` as a valid value.
20
+
21
+ Execution and protocol errors without a valid saved result still stop the workflow. This decision adds no automatic recovery.
22
+
23
+ This breaking MVP change has no migrations, compatibility readers, deprecated aliases, or dedicated legacy-format tests.
@@ -0,0 +1,35 @@
1
+ ---
2
+ type: ADR
3
+ id: 'ADR-004'
4
+ title: 'Require Git only for the simplifier'
5
+ status: active
6
+ ---
7
+
8
+ ## Context
9
+
10
+ Supersedes [ADR-001](0001-keep-the-workflow-independent-of-git.md).
11
+
12
+ The `simplifier` needs a list of changed code files. Git can supply that list without adding file tracking to `builder` `handoffs`.
13
+
14
+ ## Decision
15
+
16
+ Only the `simplifier` requires Git and a Git repository to discover changed files. It has no non-Git fallback.
17
+
18
+ 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
19
+ project directory. Only a successful result of `true` enables simplification.
20
+
21
+ Activation, `spec` preparation, `builder` execution, `verifier` completion, and `finding` resolution do not check Git readiness. Both `simplifier` entry routes save
22
+ `simplifier-running` before `Maestro` calls `maestro_run_simplifier`.
23
+
24
+ `Maestro` does not create automatic commits or Git checkpoints. The `owner` retains control of commits, pull requests, and merging.
25
+
26
+ ## Consequences
27
+
28
+ If Git readiness cannot be confirmed, `maestro_run_simplifier` reports a warning and skips delegation. The workflow moves from `simplifier-running` to `candidate-ready`
29
+ without an error. The skip transition is defined in `src/workflow/transitions.ts` and applied through `transitionWorkflow`.
30
+
31
+ Activation does not predict whether simplification will be skipped. The same readiness decision applies after successful verification and after the `owner` rejects all
32
+ current `findings`. Rejected `findings` retain their reasons and do not become passed verification.
33
+
34
+ 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
35
+ `builder` file list. Required caller updates can include initially unchanged files.