@emiliosp/pi-maestro 0.10.1 → 0.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/ADR.md +94 -18
- package/CHANGELOG.md +87 -33
- package/MISSION.md +4 -4
- package/README.md +66 -22
- package/ROADMAP.md +141 -112
- package/TECH_STACK.md +12 -11
- package/agents/builder.md +53 -57
- package/agents/simplifier.md +232 -0
- package/agents/verifier.md +52 -79
- package/docs/configuration.md +27 -16
- package/docs/glossary.md +47 -39
- package/docs/subagent-integration.md +22 -13
- package/docs/workflow.md +207 -103
- package/extensions/maestro-subagent.ts +4 -1
- package/extensions/maestro.ts +15 -26
- package/package.json +38 -39
- package/src/MaestroPaths.ts +26 -35
- package/src/artifacts/builder-handoff/assertBuilderHandoff.ts +6 -15
- package/src/artifacts/builder-handoff/schema.ts +3 -6
- package/src/artifacts/simplifier-handoff/assertSimplifierHandoff.ts +56 -0
- package/src/artifacts/simplifier-handoff/readSimplifierHandoff.ts +29 -0
- package/src/artifacts/simplifier-handoff/schema.ts +27 -0
- package/src/artifacts/verifier-handoff/assertVerifierHandoff.ts +4 -10
- package/src/artifacts/verifier-handoff/schema.ts +3 -6
- package/src/artifacts/verifier-handoff/writeVerifierHandoff.ts +1 -3
- package/src/config/assertConfiguration.ts +4 -7
- package/src/config/defaults.ts +8 -5
- package/src/config/loadConfiguration.ts +5 -11
- package/src/config/schema.ts +4 -2
- package/src/ids/createSpecId.ts +1 -2
- package/src/ids/isValidSpecId.ts +1 -2
- package/src/maestro/checks/assertEnvironment.ts +21 -48
- package/src/maestro/instructions/getMaestroInstructions.ts +59 -30
- package/src/maestro/status/formatMaestroStatus.ts +7 -13
- package/src/maestro/status/refreshMaestroStatus.ts +3 -7
- package/src/specs/create.ts +14 -4
- package/src/specs/template.ts +10 -14
- package/src/tools/child/record-builder-handoff.ts +1 -0
- package/src/tools/child/record-simplifier-handoff.ts +73 -0
- package/src/tools/child/record-verifier-handoff.ts +2 -3
- package/src/tools/child/utils/resolveWorkflowContext.ts +1 -4
- package/src/tools/main/create-spec.ts +3 -2
- package/src/tools/main/mark-spec-ready.ts +2 -1
- package/src/tools/main/resolve-escalations.ts +1 -0
- package/src/tools/main/resolve-findings.ts +7 -21
- package/src/tools/main/run-builder.ts +37 -57
- package/src/tools/main/run-simplifier.ts +172 -0
- package/src/tools/main/run-verifier.ts +34 -58
- package/src/tools/utils/pi-subagent-delegation.ts +13 -22
- package/src/tools/utils/resolveToolRunContext.ts +2 -3
- package/src/utils/is-errno-exception.ts +1 -3
- package/src/utils/path-exists.ts +1 -0
- package/src/utils/path-strictly-within.ts +3 -6
- package/src/utils/path-within-or-equal.ts +1 -4
- package/src/utils/read-json.ts +1 -4
- package/src/utils/write-json.ts +1 -4
- package/src/workflow/builder/completeBuilderPass.ts +3 -2
- package/src/workflow/builder/prepareBuilderRun.ts +3 -8
- package/src/workflow/builder/resolveEscalations.ts +2 -6
- package/src/workflow/builder/utils/getWorkflowEventByBuilderHandoff.ts +1 -3
- package/src/workflow/roles.ts +2 -1
- package/src/workflow/simplifier/completeSimplifierPass.ts +56 -0
- package/src/workflow/spec/markSpecReady.ts +10 -4
- package/src/workflow/state/readWorkflowState.ts +2 -7
- package/src/workflow/state/schema.ts +9 -10
- package/src/workflow/state/writeWorkflowState.ts +1 -4
- package/src/workflow/transitions.ts +12 -12
- package/src/workflow/utils/assertSpecAcceptanceCriteria.ts +2 -1
- package/src/workflow/utils/getAgentRole.ts +6 -4
- package/src/workflow/verifier/completeVerifierPass.ts +1 -0
- package/src/workflow/verifier/resolveFindings.ts +9 -29
- package/src/workflow/verifier/utils/getWorkflowEventByVerifierHandoff.ts +5 -20
- package/templates/design.md +20 -0
- package/templates/proposal.md +23 -0
- package/templates/spec.md +21 -50
package/templates/spec.md
CHANGED
|
@@ -1,69 +1,40 @@
|
|
|
1
1
|
# <id>: <short, outcome-oriented title>
|
|
2
2
|
|
|
3
|
-
> After owner approval, this specification is the contract for the builder and verifier.
|
|
4
|
-
|
|
5
3
|
<!--
|
|
6
|
-
|
|
7
|
-
State each requirement once
|
|
8
|
-
Use the topics below as guidance
|
|
9
|
-
Leave
|
|
4
|
+
Define required behavior, not motivation or implementation. See proposal.md for scope and design.md, when present, for approved technical decisions.
|
|
5
|
+
Write for the owner. State each requirement once and keep its acceptance criteria immediately below it.
|
|
6
|
+
Use the topics below as guidance. Omit empty subsections and these instructions.
|
|
7
|
+
Leave test code, fixtures, mocks, and commands to the builder. Keep execution evidence in handoffs.
|
|
10
8
|
-->
|
|
11
9
|
|
|
12
|
-
##
|
|
13
|
-
|
|
14
|
-
<Briefly describe the problem, who is affected, and the intended outcome.>
|
|
15
|
-
|
|
16
|
-
### Out of scope
|
|
17
|
-
|
|
18
|
-
<Name related changes that are explicitly excluded.>
|
|
19
|
-
|
|
20
|
-
## 2. Requirements and constraints
|
|
10
|
+
## Requirements
|
|
21
11
|
|
|
22
|
-
<
|
|
12
|
+
<Give each requirement its own ### REQ<number>: <title> heading and a unique, stable ID. Document only behavior or constraints this change adds, modifies, or removes, with relevant measurable limits, edge cases, and error handling. Existing behavior must continue working unless explicitly changed or removed; do not list unchanged behavior as requirements. Do not copy repository or agent instructions.>
|
|
23
13
|
|
|
24
|
-
<
|
|
14
|
+
<Give each requirement exactly one Delta value: added, modified, or removed. Keep requirements organized by topic, not by delta category. For modified or removed requirements, add a brief Before description only when useful. Verify the previous behavior from repository evidence; do not invent it or repeat the whole old requirement. State the complete required outcome, including the required absence and any agreed replacement or error behavior for removals. Keep the same pre-change baseline during revisions.>
|
|
25
15
|
|
|
26
|
-
|
|
16
|
+
<Each requirement must have Verified by with Markdown links to its acceptance criteria, using their actual heading anchors. When an existing test covers the exact starting conditions, action, and expected result, link its file relative to spec.md and give the exact scenario name instead of creating a duplicate criterion. Keep criteria for partial or uncertain coverage. A requirement can reference both criteria and tests; check their combined coverage.>
|
|
27
17
|
|
|
28
|
-
<
|
|
18
|
+
<Write each requirement-associated AC once, immediately below its primary requirement, with a #### AC<number>: <title> heading. Other requirements can link to it without duplication. A relevant regression AC without an associated changed requirement can instead use a ### AC<number>: <title> heading under an optional ## Regression checks section, with the same probe, expected result, and example fields. Do not invent a REQ or Delta field for it. Include only regressions relevant to this change, not an inventory of existing behavior, and omit the section when unnecessary.>
|
|
29
19
|
|
|
30
|
-
|
|
20
|
+
<Number ACs continuously from AC1 across the whole document, including nested and standalone regression criteria. During review, remove criteria already covered exactly by existing tests and update numbering and affected links. Keep required behavior documented when a requirement-associated criterion is omitted; omitting a standalone regression criterion does not require creating a requirement.>
|
|
31
21
|
|
|
32
|
-
|
|
22
|
+
### REQ1: <short required behavior>
|
|
33
23
|
|
|
34
|
-
<
|
|
24
|
+
Delta: <added | modified | removed>
|
|
35
25
|
|
|
36
|
-
|
|
37
|
-
2. API specification: changed operations, permissions, inputs, outputs, errors, side effects, and delivery guarantees.
|
|
38
|
-
3. Prototype and user interaction: link prototypes and identify approved states and interactions. Distinguish illustrative content from requirements.
|
|
39
|
-
4. External integrations: affected services, failure behavior, and retries.
|
|
40
|
-
5. Security and privacy: access rules, sensitive data, retention, and trust boundaries.
|
|
41
|
-
6. Compatibility and migration: compatibility limits, migration, rollout, and rollback requirements.
|
|
42
|
-
7. Monitoring and observability: required signals, alerts, and ownership.
|
|
26
|
+
<Describe the requirement once, including relevant boundary conditions and required failure or recovery behavior.>
|
|
43
27
|
|
|
44
|
-
|
|
28
|
+
Verified by: [AC1](#ac1-short-observable-claim)
|
|
45
29
|
|
|
46
|
-
|
|
30
|
+
#### AC1: <short observable claim>
|
|
47
31
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
### AC1: <short observable claim>
|
|
53
|
-
|
|
54
|
-
1. Coverage: <success | failure | unchanged>
|
|
55
|
-
2. Probe: <starting conditions and action or observation, without prescribing test implementation>
|
|
56
|
-
3. Expected result: <observable and measurable outcome>
|
|
57
|
-
4. Example: <specific starting conditions, concrete input or action, and exact expected result for this probe, not a restatement of the claim>
|
|
32
|
+
1. Probe: <starting conditions and action or observation, without prescribing test implementation>
|
|
33
|
+
2. Expected result: <observable and measurable outcome>
|
|
34
|
+
3. Example: <specific starting conditions, concrete input or action, and exact expected result, not a restatement of the claim>
|
|
58
35
|
|
|
59
36
|
<!--
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Expected result: The saved title is still present.
|
|
64
|
-
Example: An item's title is "Draft". Change it to "Ready", save, and reopen the item. The title is "Ready".
|
|
65
|
-
|
|
66
|
-
The builder and verifier each run every probe.
|
|
67
|
-
The builder chooses executable checks. The verifier checks their coverage independently.
|
|
68
|
-
Keep execution evidence in handoffs, not in this spec.
|
|
37
|
+
Each AC has one observable claim, a probe, an expected result, and a concrete example.
|
|
38
|
+
Describe relevant valid actions, invalid actions, and regressions directly through those fields, without a separate classification label.
|
|
39
|
+
The builder and verifier each run every probe independently. The builder chooses executable checks; the verifier checks their coverage independently.
|
|
69
40
|
-->
|