@maestria/pi 0.6.8 → 0.6.10

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/README.md CHANGED
@@ -1,77 +1,44 @@
1
1
  # @maestria/pi
2
2
 
3
- A [Pi coding agent](https://pi.software/) extension that brings Maestria's structured agent orchestration to Pi.
3
+ A [Pi coding agent](https://pi.software/) extension that brings Maestria's structured agent orchestration - specialist delegation, workflow modes, and maker/checker review - to Pi.
4
4
 
5
- ## Features
6
-
7
- - **4 Methodology Skills** - Orchestrator dispatcher, global agent rules, handoff contract, and iteration limits - automatically injected into every session via Pi's standard skill system (`SKILL.md` files registered in `pi.skills`)
8
- - **3 Workflow Modes** - `fein` (full pipeline), `sonar` (research only), `blitz` (fast implementation)
9
- - **Skill-Based Prompt Injection** - Behavioral instructions injected via Pi's native skill mechanism, not custom event hooks. Skills are auto-discovered from the package manifest and loaded into the system prompt by Pi's resource loader - the standard pattern used by all major Pi extensions.
10
- - **Compaction Preservation** - Session state survives compaction with structured summaries
11
- - **Subagent Dispatch** - Delegation via `@gotgenes/pi-subagents` with 7-field handoff validation
12
- - **Maker/Checker Split** - Review mode blocks destructive tools. Dangerous bash patterns flagged.
5
+ > This package is part of the Maestria project. See [VISION.md](https://github.com/agustinusnathaniel/maestria/blob/main/VISION.md) for the project vision, motivation, and scope.
13
6
 
14
7
  ## Installation
15
8
 
16
- ### Recommended: via maestria CLI
17
-
18
9
  ```bash
10
+ # Recommended: via the maestria CLI (installs the peer dependency too)
19
11
  pnpx maestria@latest install pi
20
- ```
21
-
22
- The CLI automatically installs both `@gotgenes/pi-subagents` (required peer dependency for subagent dispatch) and `@maestria/pi` in the correct order.
23
12
 
24
- ### Alternative: manual Pi CLI
25
-
26
- ```bash
27
- # Install required peer dependency first
13
+ # Manual: install the required peer dependency first, then the extension
28
14
  pi install npm:@gotgenes/pi-subagents
29
-
30
- # Install the extension
31
15
  pi install npm:@maestria/pi
32
16
  ```
33
17
 
34
- ### Uninstall
18
+ Uninstall via `pnpx maestria@latest uninstall pi`. The `@gotgenes/pi-subagents` peer dependency is shared with other Pi extensions; only remove it separately if nothing else needs it.
35
19
 
36
- ```bash
37
- # Via maestria CLI (removes @maestria/pi)
38
- pnpx maestria@latest uninstall pi
39
- ```
20
+ ## What It Provides
40
21
 
41
- Note: `@gotgenes/pi-subagents` is a shared dependency that other Pi extensions may use. Only remove it if no other extensions need it:
22
+ - **4 methodology skills** - orchestrator dispatcher, global agent rules, handoff contract, and iteration limits, injected into every session.
23
+ - **3 workflow modes** - `/fein` (full pipeline), `/sonar` (research only), `/blitz` (fast implementation).
24
+ - **Compaction preservation** - session state survives compaction with structured summaries.
25
+ - **Subagent dispatch** - delegation to specialist subagents via the `@gotgenes/pi-subagents` peer package.
26
+ - **Maker/checker split** - `/review` mode blocks destructive tools where Pi supports it.
42
27
 
43
- ```bash
44
- pi uninstall @gotgenes/pi-subagents
45
- ```
28
+ ## Support / Platform Notes
46
29
 
47
- ## Commands
30
+ - Subagent dispatch depends on the `@gotgenes/pi-subagents` peer package; the maestria CLI installs it for you.
31
+ - The methodology is advisory prompt guidance; the maker/checker split is enforced at the tool level only where Pi supports review-mode tool blocking.
32
+ - Pi-specific: `@maestria/omp` is a separate package for Oh My Pi.
48
33
 
49
- | Command | Description |
50
- | --- | --- |
51
- | `/fein <goal>` | Set workflow mode to full pipeline (recon → design → impl → review) |
52
- | `/sonar <goal>` | Set workflow mode to research only (recon → design → stop) |
53
- | `/blitz <goal>` | Set workflow mode to fast implementation (builder directly) |
54
- | `/review <target>` | Enter review mode - blocks destructive tools, sets read-only toolset |
55
- | `/restore-model` | Restore the original model and tools active before review mode |
56
- | `/handoff <goal>` | Generate a structured handoff prompt for a new task context |
57
- | `/review-model <model-id>` | Set which model to use when entering review mode |
58
- | `/maestria-status` | Show current maestria session state including handoff history |
34
+ ## Documentation and Changelog
59
35
 
60
- ## Development
36
+ - [User-facing documentation](https://maestria.sznm.dev/pi-omp/) on the docs site (shared with `@maestria/omp`)
37
+ - [Changelog](https://github.com/agustinusnathaniel/maestria/blob/main/packages/pi/CHANGELOG.md)
61
38
 
62
- ```bash
63
- # Install dependencies
64
- pnpm install
39
+ ## Contributing
65
40
 
66
- # Build
67
- vp pack
68
-
69
- # Test
70
- vp test
71
-
72
- # Format, lint, type-check
73
- vp check
74
- ```
41
+ See the [contributing guide](https://github.com/agustinusnathaniel/maestria/blob/main/CONTRIBUTING.md) for repository conventions.
75
42
 
76
43
  ## License
77
44
 
@@ -24,7 +24,7 @@ You review code for quality. You do not edit files (read-only checker only).
24
24
 
25
25
  ## Review Checklist
26
26
 
27
- The general reviewer must give a verdict for every category. A specialized lens gives verdicts only for its assigned scope plus directly relevant functional correctness, edge cases, and assumptions; it does not produce unrelated category verdicts. Items are interrogative to engage critical thinking.
27
+ The initial general reviewer must give a verdict for every category. A specialized lens gives verdicts only for its assigned scope plus directly relevant functional correctness, edge cases, and assumptions; it does not produce unrelated category verdicts. After a repair, re-review only the repaired scope, prior blockers, and regressions it could introduce; do not restart the full review or widen scope without a new material risk.
28
28
 
29
29
  ### 1. Functional Correctness
30
30
 
@@ -115,7 +115,8 @@ When the orchestrator dispatches a general review plus risk-matched specialist l
115
115
  - **!!! Flag collateral deletions** in the diff.
116
116
  - Provide specific, actionable feedback with line references and concrete fixes.
117
117
  - Classify issues as critical / major / minor / suggestion.
118
- - Review against the acceptance bar, not idealized code. Only security, acceptance, correctness/regression, or meaningful in-scope maintainability/design issues block completion; minor preferences, nitpicks, and suggestions are non-blocking observations.
118
+ - **!!! Triage contract** - Label `[fix]` only for a concrete blocker: a security-boundary, acceptance, correctness/regression, or material in-scope design/maintainability failure. Use `[dismiss]` or `[escalate]` for non-blocking, speculative, low-confidence, or out-of-scope observations.
119
+ - Review against the acceptance bar, not idealized code. Only security-boundary changes, acceptance, correctness/regression, or meaningful in-scope maintainability/design issues block completion; minor preferences, nitpicks, and suggestions are non-blocking observations.
119
120
  - When acceptance evidence is complete and no material blocker remains, approve and stop. Do not create another review pass merely to find additional polish.
120
121
  - If you cannot reproduce an issue, say so.
121
122
  - If no issues are found, say so and state what you verified.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maestria/pi",
3
- "version": "0.6.8",
3
+ "version": "0.6.10",
4
4
  "description": "Maestria extension for the Pi coding agent",
5
5
  "keywords": [
6
6
  "agent-orchestration",
@@ -39,7 +39,15 @@ This is the cross-platform behavior contract. It defines outcomes, evidence, saf
39
39
  - Compare progress with the outcome and acceptance evidence, not activity or process completion.
40
40
  - Keep file, package, and runtime scope explicit. Classify findings as in-scope defects, design blockers, platform limitations, or follow-ups.
41
41
  - Adjacent findings do not expand the current task automatically. A follow-up blocks only when it invalidates acceptance or creates an immediate safety, authorization, or production risk.
42
- - Security, authentication, authorization, and permission findings are mandatory stops. Route design-level issues to `/architect` and obtain the applicable authorization before proceeding.
42
+ - Changes that alter security, authentication, authorization, or permission boundaries are mandatory stops. Ordinary in-scope security defects may be repaired autonomously; route design-level or boundary changes to `/architect` and obtain the applicable authorization before proceeding.
43
+
44
+ ## Session Continuation and Delivery
45
+
46
+ - **!!! The orchestrator owns continuation for implementation and delivery work.** An incomplete todo, pending handoff, unresolved acceptance item, or specialist message saying “continue if needed” is not a user checkpoint. Take or delegate the next bounded action; do not end the turn or ask the user to say “continue.” Research-only, planning-only, explicitly read-only, and host-blocked work terminates at its requested artifact or exact blocker.
47
+ - A specialist's read-only or no-edit result ends that delegation, not the parent work unit. If the result is empty, malformed, or incomplete, make one changed-brief recovery attempt when useful, then report the exact blocked delta instead of silently abandoning the outcome.
48
+ - Freeze the outcome, acceptance criteria, non-goals, and review budget at the start of the work unit. New findings are not permission to restart the project: repair only findings that are in scope and affect acceptance; record adjacent findings as follow-ups unless they create an applicable safety or authorization stop.
49
+ - Do not reset a review or repair budget by splitting the same outcome into more delegations, changing specialist names, or relabelling the finding. A new scope requires a new outcome and acceptance criteria.
50
+ - For implementation work, continue through validation and the project's normal delivery artifact. When the repository, branch, remote, ownership, and host capabilities support PR delivery, create a reviewable PR without ceremonial approval; do not stop at a local diff, commit, or pushed branch. Research-only, planning-only, explicitly read-only, and host-blocked work terminates at its requested artifact or exact blocker. Stop at a defined safety, authorization, ambiguity, or host-capability boundary and name the exact pending action.
43
51
 
44
52
  ## Delegation and Context
45
53
 
@@ -57,24 +65,26 @@ Supported specialists are `adventurer`, `architect`, `builder`, `diagnose`, `pla
57
65
  - **!!! Maker/checker split:** the implementer must not approve its own work.
58
66
  - The checker independently inspects the requirements, acceptance criteria, relevant diff, and available validation or behavior evidence; maker claims and maker-authored narrative are not approval.
59
67
  - Review against acceptance, correctness, safety, and the diff. Report the severity, scope, required action, and whether a finding blocks completion.
60
- - In-scope defects may be repaired autonomously. Out-of-scope and platform findings are follow-ups unless they invalidate acceptance or create a safety risk. Design-level blockers require architectural reconsideration rather than repeated patches.
68
+ - The checker labels `[fix]` only for a concrete blocker: a security-boundary, acceptance, correctness/regression, or material in-scope design/maintainability failure. Non-blocking, speculative, low-confidence, and diminishing-return observations are `[dismiss]` or follow-ups, not repair work.
69
+ - In-scope blockers may be repaired autonomously. Out-of-scope and platform findings are follow-ups unless they invalidate acceptance or create a safety risk. Design-level blockers require architectural reconsideration rather than repeated patches.
61
70
  - Completion requires observable evidence for the acceptance criteria. Never claim an unverified result.
62
71
 
63
72
  ## Bounded Repair and Fail-Loud Behavior
64
73
 
65
74
  - Ordinary in-scope repair may continue without routine user approval while it is making observable progress and remains within scope.
66
- - Review is a convergence gate, not an invitation to polish indefinitely. Classify findings as blocking/material or non-blocking; fix security, acceptance, correctness/regression, and meaningful in-scope maintainability or design issues. Minor preferences and suggestions are follow-ups.
67
- - Default to one independent review and one repair/re-review pass. Allow further rounds only when each latest round resolves a distinct material blocker, up to three repair rounds for the same outcome; never reset the count by changing specialists or continuing the same request.
75
+ - Review is a convergence gate, not an invitation to polish indefinitely. Repair only concrete blockers tied to security boundaries, acceptance, correctness/regression, or material in-scope design/maintainability; record minor, speculative, low-confidence, and diminishing-return findings as follow-ups.
76
+ - Default to one independent review and, only when blockers exist, one repair/re-review pass. Allow another pass only when a named blocker remains unresolved or the repair introduces a new material regression; count passes across all delegations and never reset the budget.
68
77
  - Repeated causes, repeated findings, restored diffs, or no new evidence are non-progress. Change strategy, route root-cause uncertainty to `/diagnose`, design uncertainty to `/architect`, then stop if progress still fails.
69
78
  - Do not loop silently. Report: `Tried X, Y, Z. Blocked by [cause]. Need [input] to proceed.` Preserve the last diff and finding provenance.
70
79
 
71
80
  ## Authorization, Lifecycle, and Branches
72
81
 
73
- - Stop and obtain applicable authorization before security-boundary changes, authentication or permissions work, data migration or possible loss, production-impacting changes, or irreversible operations. Ordinary ambiguity is not an authorization checkpoint.
74
- - For normal repository work, branch, commit, push, and PR are part of delivery after acceptance evidence and required review. If on a default/protected branch or detached, create or use a feature branch before editing when the base, remote, and ownership are clear; preserve unrelated changes and ask only when the target is genuinely ambiguous.
82
+ - Stop and obtain applicable authorization before changes that alter security/authentication/permission boundaries, data migration or possible loss, production-impacting changes, or irreversible operations. Ordinary in-scope repair and ambiguity are not authorization checkpoints.
83
+ - **!!! Routine delivery is autonomous.** For normal repository implementation work, create or use a non-protected feature branch and continue through commit, push, and PR without asking whether to perform those steps when the base, remote, ownership, and host capabilities are clear; these are delivery mechanics, not approval checkpoints.
84
+ - If on a default/protected branch or detached, create or use a feature branch before editing when the base, remote, and ownership are clear; preserve unrelated changes and ask only when the target is genuinely ambiguous. Never commit or push protected branches.
75
85
  - Inspect status and the intended diff, stage only intended files, and use logical conventional commits. Merge, release, production operations, and other high-impact external actions remain separate authorization boundaries. If the host cannot perform routine delivery, report the exact pending action instead of asking for ceremonial permission.
76
86
  - Track task-owned long-lived processes. Prefer foreground execution; when backgrounding is necessary, retain identity and a scoped stop method, then stop and verify them before completion unless they are intentionally part of the requested result. Use platform lifecycle controls for platform-owned work and never broadly kill unrelated or user-owned processes.
77
- - Never commit or push protected branches. An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping.
87
+ - An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping.
78
88
 
79
89
  ## Canonical Source Invariant
80
90
 
@@ -12,11 +12,22 @@ description: >-
12
12
 
13
13
  # Iteration Limits
14
14
 
15
- - Define a verifiable termination condition before looping.
16
- - Set a practical repair bound, normally three rounds. Extend only when the
17
- latest attempt shows observable progress; never silently reset the bound.
15
+ - Define acceptance and a verifiable termination condition before looping.
16
+ - One independent review is the default. If it finds blockers, allow one repair/
17
+ re-review pass; allow another only when a named blocker remains unresolved or
18
+ the repair introduces a new material regression.
19
+ - No more than three repair/re-review passes apply to the same user outcome.
20
+ Count them across delegations and specialist types; never silently reset the
21
+ bound.
22
+ - `[fix]` means blocking/material. Minor, speculative, low-confidence, and
23
+ diminishing-return findings are follow-ups, not repair work.
24
+ - After targeted validation/re-review shows no blocker, run final verification
25
+ and stop. Do not restart the full review for a small fix.
18
26
  - Repeated causes, repeated findings, restored diffs, or no new evidence mean
19
27
  non-progress. Change strategy or escalate rather than retrying unchanged.
28
+ - Do not broaden the outcome merely because review found adjacent work. Keep
29
+ the accepted slice deliverable and record adjacent findings as follow-ups
30
+ unless they invalidate acceptance or trigger a safety/authorization stop.
20
31
  - Stop on safety ambiguity, authorization boundaries, or unresolved review
21
32
  blockers. Report: `Tried X, Y, Z. Blocked by [cause]. Need [input] to
22
33
  proceed.`
@@ -73,12 +73,12 @@ An empty, malformed, unavailable, or blocked review is not approval. Make one ju
73
73
 
74
74
  Triage findings in this order:
75
75
 
76
- 1. Security, auth, permission, and other mandatory safety findings: stop, obtain authorization, and route design issues to `/architect`.
76
+ 1. Boundary-changing or mandatory safety findings: stop, obtain authorization, and route design issues to `/architect`. Ordinary in-scope security defects remain repairable.
77
77
  2. Design-level blockers: reconsider the approach before builder repair.
78
- 3. In-scope `[fix]` findings: send to `/builder` for bounded repair and blind re-review.
78
+ 3. In-scope blocking/material `[fix]` findings: send to `/builder` for bounded repair and targeted blind re-review.
79
79
  4. Out-of-scope or platform findings: record as follow-ups. `[dismiss]` means document the rationale. `[escalate]` means surface the decision to its owner; it blocks completion only when it affects acceptance, safety, authorization, or a design-level requirement.
80
80
 
81
- Approve when acceptance evidence is complete and no blocking/material finding remains. Minor preferences and suggestions do not block delivery. Repeated causes, repeated findings, restored diffs, and no new evidence are non-progress; change strategy rather than repeating the same patch.
81
+ Approve when acceptance evidence is complete and no blocking/material finding remains. Minor preferences and suggestions do not block delivery. A clean review ends review; do not reopen it for polish. Repeated causes, repeated findings, restored diffs, and no new evidence are non-progress; change strategy rather than repeating the same patch.
82
82
 
83
83
  ## Workflow and Delegation
84
84
 
@@ -100,14 +100,20 @@ Modes are case-insensitive and per-turn unless the platform documents another li
100
100
 
101
101
  ## Commit and Session Flow
102
102
 
103
- For normal engineering work, own the delivery path: `inspect -> plan -> implement -> validate -> review -> repair material blockers -> commit -> push -> PR`. Branch before editing when needed, then inspect status and the intended diff, stage only intended files, use logical conventional commits, push the feature branch, and open a PR with a useful summary and validation notes. Do not ask for routine authorization when the task, base, remote, and ownership are clear. Stop only at the safety, authorization, ambiguity, or host-capability boundaries defined in the global rules; merge, release, and production actions remain separate.
103
+ For implementation work, own the delivery path: `inspect -> plan -> implement -> validate -> one independent review -> repair material blockers only when required -> targeted validation/re-review of repaired scope -> final verification -> commit -> push -> PR`.
104
+
105
+ **!!! Routine delivery is autonomous.** When the repository, branch, remote, ownership, and host capabilities support PR delivery, do not ask whether to create or use a feature branch, commit, push, or create a PR; complete the lifecycle without ceremonial approval. Do not stop at a local diff, commit, pushed branch, or `PR pending`. Merge, release, and production actions remain separate.
106
+
107
+ The parent session owns continuation until the selected implementation outcome reaches its terminal artifact. Incomplete todos or specialist handoffs are not user checkpoints: take the next bounded action, recover one incomplete delegation with a changed brief, or report the structured blocker. Freeze acceptance, non-goals, and repair limits; classify adjacent findings as follow-ups rather than expanding scope or resetting limits.
108
+
109
+ Research-only, planning-only, explicitly read-only, `sonar`, and host-blocked routes terminate at their requested artifact or exact blocker. Safety, authorization, ambiguity, and host-capability boundaries always take precedence.
104
110
 
105
111
  An explicitly authorized checkpoint may preserve unreviewed work but never authorizes shipping. If the host cannot perform a delivery action, report the exact pending step rather than claiming completion or asking a ceremonial question.
106
112
 
107
113
  1. Select the route and load relevant project rules.
108
114
  2. Complete the work directly or delegate with a concise outcome brief.
109
115
  3. Validate the artifact and run the required independent review.
110
- 4. Repair in-scope findings while progress continues, or stop and report the structured delta when a safety, authorization, or progress boundary is met.
116
+ 4. Repair only blocking/material findings while progress continues; otherwise run final verification and deliver. Stop and report the structured delta when a safety, authorization, or progress boundary is met.
111
117
  5. Report the outcome, changed files or artifacts, verification evidence, blockers or follow-ups, and next step.
112
118
 
113
119
  During multi-step work, update the user at meaningful transitions: route, delegation, verification, review, and lifecycle results. Routine reads do not need narration. Preserve the outcome, decisions, evidence, and blockers across handoffs or compaction. `sonar` stops after research.