pi-herdr-agents 2.0.4 → 3.0.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/AGENTS.md +20 -14
- package/CHANGELOG.md +63 -1
- package/CONTEXT.md +86 -32
- package/README.md +262 -141
- package/RELEASING.md +4 -2
- package/config.json.example +0 -3
- package/docs/README.md +38 -15
- package/docs/adr/0001-btw-ephemeral-side-questions.md +1 -1
- package/docs/adr/0002-agent-workflow-skill-runtime-taxonomy.md +1 -1
- package/docs/adr/0003-installable-role-packs.md +21 -13
- package/docs/adr/0009-remove-workflow-subsystem.md +1 -1
- package/docs/adr/0011-explicit-worktree-cleanup.md +1 -1
- package/docs/adr/0012-adopt-maestro-seams-in-repo.md +45 -0
- package/docs/adr/0013-pack-neutral-execution-host.md +63 -0
- package/docs/adr/0014-operator-cancel-terminal-intent.md +134 -0
- package/docs/worktree-subagents.md +10 -6
- package/maestro/adapters/fake/fake-harness-adapter.ts +263 -0
- package/{pi-extension/subagents/activity.ts → maestro/adapters/pi/activity-file.ts} +15 -72
- package/{pi-extension/subagents → maestro/adapters/pi/child}/subagent-done.ts +30 -3
- package/{pi-extension/subagents → maestro/adapters/pi}/completion.ts +4 -4
- package/{pi-extension/subagents → maestro/adapters/pi}/launch.ts +388 -285
- package/maestro/adapters/pi/model-registry.ts +46 -0
- package/maestro/adapters/pi/pi-harness-adapter.ts +701 -0
- package/maestro/adapters/pi/process-identity.ts +303 -0
- package/{pi-extension/subagents → maestro/adapters/pi}/session.ts +1 -13
- package/maestro/adapters/pi/task-model-init.ts +55 -0
- package/maestro/core/activity.ts +29 -0
- package/maestro/core/config/model-config.ts +473 -0
- package/{pi-extension/subagents → maestro/core/config}/pane-config.ts +4 -6
- package/{pi-extension/subagents → maestro/core/config}/persistent-config.ts +4 -6
- package/{pi-extension/subagents → maestro/core/config}/role-config.ts +15 -10
- package/{pi-extension/subagents → maestro/core/config}/supervision-config.ts +4 -6
- package/{pi-extension/subagents → maestro/core/config}/task-model-init.ts +45 -58
- package/maestro/core/config/task-model-types.ts +22 -0
- package/maestro/core/harness-adapter.ts +117 -0
- package/maestro/core/index.ts +3 -0
- package/{pi-extension/subagents → maestro/core}/lifecycle.ts +27 -126
- package/maestro/core/roles/discovery.ts +555 -0
- package/{pi-extension/subagents/runtime-routing.ts → maestro/core/routing.ts} +36 -43
- package/maestro/core/shell.ts +3 -0
- package/{pi-extension/subagents → maestro/core}/status.ts +3 -7
- package/{pi-extension/subagents → maestro/core}/supervision.ts +1 -1
- package/maestro/core/surface-provider.ts +185 -0
- package/maestro/core/types.ts +449 -0
- package/maestro/core/worktree-cleanup.ts +374 -0
- package/maestro/core/worktree.ts +93 -0
- package/maestro/runtime/index.ts +44 -0
- package/maestro/runtime/pi-run-session.ts +1210 -0
- package/maestro/runtime/run-session.ts +801 -0
- package/maestro/runtime/surface-retention.ts +6 -0
- package/maestro/runtime/task-model-init.ts +22 -0
- package/maestro/runtime/worktree-operations.ts +627 -0
- package/maestro/surfaces/fake/fake-surface-provider.ts +311 -0
- package/maestro/surfaces/herdr/herdr-surface-provider.ts +200 -0
- package/{pi-extension/subagents → maestro/surfaces/herdr}/herdr.ts +65 -14
- package/{pi-extension/subagents → maestro/surfaces/herdr}/terminal.ts +7 -5
- package/package.json +10 -9
- package/pi-extension/subagents/config-path.ts +5 -1
- package/pi-extension/subagents/index.ts +848 -1805
- package/pi-extension/subagents/model-registry.ts +46 -0
- package/skills/pi-herdr-agents/SKILL.md +276 -0
- package/agents/adversarial-reviewer.md +0 -153
- package/agents/planner.md +0 -87
- package/agents/poteto.md +0 -32
- package/agents/reviewer.md +0 -132
- package/agents/scout.md +0 -105
- package/agents/visual-tester.md +0 -234
- package/agents/worker.md +0 -121
- package/docs/review-evaluation.md +0 -183
- package/pi-extension/subagents/model-config.ts +0 -305
- package/pi-extension/subagents/plan-skill.md +0 -280
- package/pi-extension/subagents/worktree-cleanup.ts +0 -789
- package/skills/orchestrate/SKILL.md +0 -91
- package/skills/orchestrate/adversarial-review-example.js +0 -400
- package/skills/orchestrate/adversarial-review.md +0 -87
- /package/{pi-extension/subagents → maestro/core/config}/type-guards.ts +0 -0
- /package/{pi-extension/subagents → maestro/core}/wake.ts +0 -0
package/AGENTS.md
CHANGED
|
@@ -6,6 +6,8 @@ These instructions apply to humans and coding agents changing `pi-herdr-agents`.
|
|
|
6
6
|
|
|
7
7
|
`pi-herdr-agents` (Pi Herdr Agents) is a Pi extension that launches asynchronous Pi child agents exclusively in Herdr. Ordinary runs group child panes in extension-owned `Agents` tabs by default. Writing tasks may opt into one isolated Herdr-managed Git worktree per branch. Legacy role definitions that request an external CLI fail before Herdr creates resources.
|
|
8
8
|
|
|
9
|
+
The package is a pack-neutral execution host: it ships no agent roles and no planning or review workflows. Its only skill is `pi-herdr-agents`, a general operating guide for the host; do not add methodology or workflow skills here. Roles come from project or global definitions and separately installed role packs. Do not add bundled roles, a privileged default pack, or name-keyed workflow behavior; see [ADR-0013](docs/adr/0013-pack-neutral-execution-host.md).
|
|
10
|
+
|
|
9
11
|
The extension is fire-and-forget: `subagent` returns an acknowledgement, and completion is delivered to the parent automatically. Never add polling guidance that tells callers to sleep, tail sessions, or repeatedly check status.
|
|
10
12
|
|
|
11
13
|
## Read these first
|
|
@@ -14,26 +16,30 @@ The extension is fire-and-forget: `subagent` returns an acknowledgement, and com
|
|
|
14
16
|
- [`docs/README.md`](docs/README.md) — map of shipped contracts, active design, ADRs, and background research
|
|
15
17
|
- [`CONTEXT.md`](CONTEXT.md) — workflow-domain glossary; read it before changing orchestration design
|
|
16
18
|
- [`docs/adr/0003-installable-role-packs.md`](docs/adr/0003-installable-role-packs.md) — installable role-pack discovery, precedence, and collision contract
|
|
19
|
+
- [`docs/adr/0013-pack-neutral-execution-host.md`](docs/adr/0013-pack-neutral-execution-host.md) — role-free host ownership, removed commands, and `roles.bundled` deprecation
|
|
17
20
|
- [`docs/worktree-subagents.md`](docs/worktree-subagents.md) — canonical worktree operating, review, recovery, and cleanup guide
|
|
18
21
|
- [`RELEASING.md`](RELEASING.md) — release checks and publishing procedure
|
|
19
22
|
|
|
20
|
-
|
|
23
|
+
Former bundled roles, `/plan`, its plan skill, and `/skill:orchestrate` now belong to the separately maintained `pi-herdr-roles` and `pi-herdr-pstack` packs. `/iterate`, `/btw`, and `/btw-close` were removed. Do not reintroduce them here.
|
|
21
24
|
|
|
22
25
|
## Code map
|
|
23
26
|
|
|
24
|
-
- `pi-extension/subagents/index.ts` — public tools/commands,
|
|
25
|
-
- `pi-extension/subagents/
|
|
26
|
-
- `
|
|
27
|
-
- `
|
|
28
|
-
- `
|
|
29
|
-
- `
|
|
30
|
-
- `pi
|
|
27
|
+
- `pi-extension/subagents/index.ts` — Pi composition root: public tools/commands, role-pack event bridge, host policy, widgets, and parent delivery
|
|
28
|
+
- `pi-extension/subagents/model-registry.ts`, `config-path.ts` — permanent host-local SDK capability glue and configuration-path conventions
|
|
29
|
+
- `maestro/core/` — seam interfaces and types; activity/lifecycle/status projection, routing, wake-ups, and supervision
|
|
30
|
+
- `maestro/core/roles/discovery.ts`, `maestro/core/config/` — role parsing/discovery, injected-directory config loaders, and task-model init prompt construction
|
|
31
|
+
- `maestro/core/worktree.ts`, `worktree-cleanup.ts` — manifest schema/state, handoff types, and cleanup eligibility/formatting
|
|
32
|
+
- `maestro/adapters/pi/` — `PiHarnessAdapter`, launch transactions, completion evidence, session I/O, activity files, SDK model glue, and task-model registry projection
|
|
33
|
+
- `maestro/adapters/pi/child/subagent-done.ts` — child protocol: `caller_ping`, `subagent_done`, and activity recording
|
|
34
|
+
- `maestro/surfaces/herdr/` — `HerdrSurfaceProvider`, Herdr CLI driver, and terminal scripts/placement
|
|
35
|
+
- `maestro/runtime/` — `RunSession`, Pi composition, run ownership, controls/retries, observation, delivery-gated cleanup, worktree operations/handoff, and task-model init composition
|
|
36
|
+
- `maestro/adapters/fake/`, `maestro/surfaces/fake/`, `test/maestro/` — conformance fakes, seam tests, and the dependency-rule test
|
|
31
37
|
- `CONTEXT.md` — orchestration-domain glossary
|
|
32
|
-
- `docs/adr/` — hard-to-reverse architectural decisions
|
|
38
|
+
- `docs/adr/` — hard-to-reverse architectural decisions; [ADR-0012](docs/adr/0012-adopt-maestro-seams-in-repo.md) records the maestro seams decision
|
|
33
39
|
- `docs/research/` — evidence and alternatives, never the shipped contract
|
|
34
40
|
- `test/test.ts` — unit tests for public subagent extension seams
|
|
35
|
-
- `test/package-
|
|
36
|
-
- `test/integration/` — real Herdr and Pi lifecycle tests using the deterministic provider by default
|
|
41
|
+
- `test/package-manifest.test.js` — package manifest and pack-neutral package-content contract test
|
|
42
|
+
- `test/integration/` — real Herdr and Pi lifecycle tests using the deterministic provider by default; `test/integration/agents/` holds test-only role fixtures, including the multi-wave `test-coordinator`
|
|
37
43
|
- `test/bench/supervision-bench.mjs` — manual isolated-Herdr supervision transport benchmark; raw samples stay in `/tmp/issue29-bench/`
|
|
38
44
|
|
|
39
45
|
## Worktree contract
|
|
@@ -69,8 +75,8 @@ When behavior changes, update every affected surface in the same commit:
|
|
|
69
75
|
- public tool parameters, role-pack protocol, or lifecycle → `README.md`
|
|
70
76
|
- role-pack discovery, precedence, or collision policy → `docs/adr/0003-installable-role-packs.md`
|
|
71
77
|
- worktree behavior, handoff, recovery, or cleanup → `docs/worktree-subagents.md`
|
|
72
|
-
-
|
|
73
|
-
-
|
|
78
|
+
- role prompts, `/plan`, and review-workflow methodology → the owning role pack, not this repository
|
|
79
|
+
- the `PI_SUBAGENT_ID` child-context hint → `README.md` and `CONTEXT.md`
|
|
74
80
|
- contributor/release verification → this file, `.pi/skills/run-integration-tests/SKILL.md`, or `RELEASING.md`
|
|
75
81
|
- domain terminology → `CONTEXT.md`
|
|
76
82
|
- hard-to-reverse orchestration trade-offs → the relevant ADR; do not create an ADR for every design question
|
|
@@ -105,7 +111,7 @@ Use `PI_TEST_MODEL="openai-codex/gpt-5.6-luna" PI_TEST_TIMEOUT=180000 npm run te
|
|
|
105
111
|
Before committing:
|
|
106
112
|
|
|
107
113
|
- inspect `git status` and the final diff;
|
|
108
|
-
- confirm the package preview includes `CHANGELOG.md`, `
|
|
114
|
+
- confirm the package preview includes `CHANGELOG.md`, `README.md`, `config.json.example`, and `pi-extension/subagents/index.ts`, contains no `agents/` resources, no `skills/` resources other than the host-owned `skills/pi-herdr-agents/SKILL.md`, and no `pi-extension/subagents/plan-skill.md`, and excludes `pi-extension/subagents/workflow-worker.js`, plans, journals, sessions, prototypes, generated evidence, local config, and `openspec/`;
|
|
109
115
|
- run `npm pack --dry-run` when package contents or documentation paths changed; durable configuration is `$PI_CODING_AGENT_DIR/herdr-agents/config.json`, never package-root `config.json` (move old files manually or re-run `/subagents-init`);
|
|
110
116
|
- confirm that no generated plans, journals, sessions, provider configuration, test scripts, or review artifacts are staged; and
|
|
111
117
|
- confirm that no accidental empty directory exists at the repository root:
|
package/CHANGELOG.md
CHANGED
|
@@ -7,12 +7,74 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
9
9
|
|
|
10
|
-
## [
|
|
10
|
+
## [v3.0.0](https://github.com/giuseppecrj/pi-herdr-agents/compare/v2.0.5...v3.0.0)
|
|
11
|
+
|
|
12
|
+
### Merged
|
|
13
|
+
|
|
14
|
+
- Add subagent_cancel for ordinary managed subagents [`#73`](https://github.com/giuseppecrj/pi-herdr-agents/pull/73)
|
|
15
|
+
- Add the pi-herdr-agents operating skill [`#72`](https://github.com/giuseppecrj/pi-herdr-agents/pull/72)
|
|
16
|
+
- Conditional task-model writes with expectedConfigRevision [`#71`](https://github.com/giuseppecrj/pi-herdr-agents/pull/71)
|
|
17
|
+
- Pack-neutral execution host: move bundled roles and workflows to optional packs [`#70`](https://github.com/giuseppecrj/pi-herdr-agents/pull/70)
|
|
18
|
+
|
|
19
|
+
### Commits
|
|
20
|
+
|
|
21
|
+
- refactor: compose Pi runs through owned sessions [`e9f8039`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e9f803992894d304c4eb5b7608ab6cce4464ee16)
|
|
22
|
+
- refactor: complete maestro core and dependency boundaries [`2ae8ba5`](https://github.com/giuseppecrj/pi-herdr-agents/commit/2ae8ba57b07d2f77b01363fe175f3b9084ebf6eb)
|
|
23
|
+
- feat!: ship a pack-neutral execution host [`e262c58`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e262c584f54a7c8d60eb1fa5510f47c1299e3801)
|
|
24
|
+
- refactor: establish maestro seams and route Herdr surfaces [`20e5f2a`](https://github.com/giuseppecrj/pi-herdr-agents/commit/20e5f2aee1bebedf22f3b2e78dbf9b5a11f466ef)
|
|
25
|
+
- refactor: route Pi child protocol through harness adapter [`891a533`](https://github.com/giuseppecrj/pi-herdr-agents/commit/891a533d517b4edc86dda19dc99476198741ea89)
|
|
26
|
+
- chore: target Pi 1.0.0 dev dependencies [`a32e02f`](https://github.com/giuseppecrj/pi-herdr-agents/commit/a32e02ff4fed38f0d02a875ed6769f01266577e3)
|
|
27
|
+
- fix: judge worktree cancel by launch-verified process identity [`37d8c62`](https://github.com/giuseppecrj/pi-herdr-agents/commit/37d8c62496aa7e4a421ca3e13d4dfeb8265a151a)
|
|
28
|
+
- feat: add subagent_cancel for ordinary managed subagents [`05e53b8`](https://github.com/giuseppecrj/pi-herdr-agents/commit/05e53b87d3a7d7724f5d784b9eab5e51a1d33a79)
|
|
29
|
+
- fix: bound worktree cancel by its deadline and judge late-captured identity [`f146db2`](https://github.com/giuseppecrj/pi-herdr-agents/commit/f146db2738a0c7fb557e73eaaff90b2845076553)
|
|
30
|
+
- updates [`2b0a187`](https://github.com/giuseppecrj/pi-herdr-agents/commit/2b0a187aedbe2421c2966989cbff5e9c7adf1cc8)
|
|
31
|
+
- feat: conditional task model config writes [`b04906b`](https://github.com/giuseppecrj/pi-herdr-agents/commit/b04906b6d6d0f81ac23a64753a5aec2b506c6423)
|
|
32
|
+
- fix: require owned-process exit evidence and settle cancel edge cases [`3572b4f`](https://github.com/giuseppecrj/pi-herdr-agents/commit/3572b4f40dc004db83a90708234962ec7c10412b)
|
|
33
|
+
- docs: add maestro seams design spec [`ce886f3`](https://github.com/giuseppecrj/pi-herdr-agents/commit/ce886f3660e9a995546904e625ca66a7ec55b9bb)
|
|
34
|
+
- docs: record completed in-repo maestro seams [`d7291c2`](https://github.com/giuseppecrj/pi-herdr-agents/commit/d7291c26daa1b9aacdf0640fdccc27cab2dd0de8)
|
|
35
|
+
- docs: replace subagent-lifecycle with general pi-herdr-agents operating skill [`7121f33`](https://github.com/giuseppecrj/pi-herdr-agents/commit/7121f33e9abe4a25f075dc1e2f96e10a90bc1004)
|
|
36
|
+
- docs: add subagent-lifecycle host skill [`bfce217`](https://github.com/giuseppecrj/pi-herdr-agents/commit/bfce2177984a7b5fededc2b3a7fe255cc966e46c)
|
|
37
|
+
- fix: keep a failed SIGTERM to a live identity unconfirmed and drop overdue provider answers [`4a3992d`](https://github.com/giuseppecrj/pi-herdr-agents/commit/4a3992d865eeb0a11a23350ff4de92dd892e30c2)
|
|
38
|
+
- docs: fix host operating skill review findings and packaging wording [`bbeb580`](https://github.com/giuseppecrj/pi-herdr-agents/commit/bbeb580a5fb38d780209babcd8b5f7848b8543e2)
|
|
39
|
+
- docs(skill): document subagent_cancel in host operating guide [`7a3508c`](https://github.com/giuseppecrj/pi-herdr-agents/commit/7a3508cfe886b5f7932bdf77d3d3a516d2a7dfcd)
|
|
40
|
+
- test(integration): scope the untouched-pane check to the runner's own workspace [`fa483ea`](https://github.com/giuseppecrj/pi-herdr-agents/commit/fa483ea918f862da35162ca4d73ae6191288fa99)
|
|
41
|
+
- docs: scope the pack-neutral claim to roles and workflows [`e75bea8`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e75bea84a79218c9367ea5a165cbab161e2fb217)
|
|
42
|
+
- fix: declare pi.skills so the lifecycle skill actually loads [`5b45e7f`](https://github.com/giuseppecrj/pi-herdr-agents/commit/5b45e7fb17080fe7b5d1d7e675d234fc140ed144)
|
|
43
|
+
- docs(skill): cancel confirmation on absent pane; split requested vs unconfirmed guidance [`787f633`](https://github.com/giuseppecrj/pi-herdr-agents/commit/787f633f49a540a38665f76300d725037a4aaa45)
|
|
44
|
+
- docs: correct subagent_done applicability in the host guide [`ea4602c`](https://github.com/giuseppecrj/pi-herdr-agents/commit/ea4602ce728348a42a332ac091380cc8552663ea)
|
|
45
|
+
- docs: persistent interactive exception and thinking omission wording [`2692c51`](https://github.com/giuseppecrj/pi-herdr-agents/commit/2692c511696ffde339b235bbd146654ecc29562d)
|
|
46
|
+
- Merge pull request #69: in-repo maestro seams [`c2177df`](https://github.com/giuseppecrj/pi-herdr-agents/commit/c2177dff835da44937e614e8a03d0405d442e848)
|
|
47
|
+
|
|
48
|
+
## [v2.0.5](https://github.com/giuseppecrj/pi-herdr-agents/compare/v2.0.4...v2.0.5) - 2026-09-28
|
|
49
|
+
|
|
50
|
+
### Merged
|
|
51
|
+
|
|
52
|
+
- test(worktrees): fix path assertions and clarify cleanup scope [`#65`](https://github.com/giuseppecrj/pi-herdr-agents/pull/65)
|
|
53
|
+
- fix(worktrees): support launches from linked checkouts [`#64`](https://github.com/giuseppecrj/pi-herdr-agents/pull/64)
|
|
54
|
+
- fix(subagents): accept null worktree for strict tool clients [`#57`](https://github.com/giuseppecrj/pi-herdr-agents/pull/57)
|
|
55
|
+
- fix(subagents): interactive mode time [`#62`](https://github.com/giuseppecrj/pi-herdr-agents/pull/62)
|
|
56
|
+
|
|
57
|
+
### Commits
|
|
58
|
+
|
|
59
|
+
- perf(startup): skip worktree inventory during session init [`8de2447`](https://github.com/giuseppecrj/pi-herdr-agents/commit/8de24470cb53fd345979cfe501a10645202403e0)
|
|
60
|
+
- chore: release v2.0.5 [`ada6018`](https://github.com/giuseppecrj/pi-herdr-agents/commit/ada60185600383a207bb2a24e43d9b66b9ed8288)
|
|
61
|
+
- test(worktrees): make quoting expectations independent [`a526824`](https://github.com/giuseppecrj/pi-herdr-agents/commit/a526824dcffd97fa09b158fba5cae05ff75fc100)
|
|
62
|
+
- Merge commit '5fc2ea04b52a03df35b246cef6cb524516d34350' into maint/pr57-null-render-type [`e6fe747`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e6fe747d5df44789df1e8fd42b585d4dbc36a144)
|
|
63
|
+
- fix(worktrees): keep in-scope inventory rows visible [`41639a7`](https://github.com/giuseppecrj/pi-herdr-agents/commit/41639a7673e7a48c28e34e3f3f079c02f6454264)
|
|
64
|
+
- refactor(cleanup): remove unused inventory notice [`330cc96`](https://github.com/giuseppecrj/pi-herdr-agents/commit/330cc9669eff14358e9eea8999f024e0ebfe4187)
|
|
65
|
+
- docs: make worktree inventory on-demand [`e946dba`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e946dba9ca246c15e581f35c098ccf88f003c4f9)
|
|
66
|
+
- fix nullable worktree render args [`afc50bc`](https://github.com/giuseppecrj/pi-herdr-agents/commit/afc50bc6e96005f3a36c3e29a17be36f99d81845)
|
|
67
|
+
|
|
68
|
+
## [v2.0.4](https://github.com/giuseppecrj/pi-herdr-agents/compare/v2.0.3...v2.0.4) - 2026-09-22
|
|
11
69
|
|
|
12
70
|
### Merged
|
|
13
71
|
|
|
14
72
|
- perf: batch persistent delivery ledger reads [`#58`](https://github.com/giuseppecrj/pi-herdr-agents/pull/58)
|
|
15
73
|
|
|
74
|
+
### Commits
|
|
75
|
+
|
|
76
|
+
- chore: release v2.0.4 [`4cacc1a`](https://github.com/giuseppecrj/pi-herdr-agents/commit/4cacc1a65c3cb8627f05264b61684a8089cb7512)
|
|
77
|
+
|
|
16
78
|
## [v2.0.3](https://github.com/giuseppecrj/pi-herdr-agents/compare/v2.0.2...v2.0.3) - 2026-09-21
|
|
17
79
|
|
|
18
80
|
### Commits
|
package/CONTEXT.md
CHANGED
|
@@ -3,11 +3,48 @@
|
|
|
3
3
|
## Language
|
|
4
4
|
|
|
5
5
|
**Pi subagent runtime**:
|
|
6
|
-
The single execution path for fresh and resumed children
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
The single real execution path for fresh and resumed children, coordinated by a
|
|
7
|
+
run session through the Pi harness adapter. `launchPiSubagent()` still owns each
|
|
8
|
+
complete launch transaction; completion uses Pi sidecar evidence first and the
|
|
9
|
+
terminal exit marker as fallback.
|
|
9
10
|
_Avoid_: Runtime dispatch, adapter registry, split launch ownership
|
|
10
11
|
|
|
12
|
+
**Harness adapter**:
|
|
13
|
+
An object implementing the core interface for child launch, observation,
|
|
14
|
+
completion evidence, and controls. Pi is the only real implementation; the fake
|
|
15
|
+
is for conformance tests.
|
|
16
|
+
_Avoid_: Runtime selector, adapter registry, external CLI compatibility
|
|
17
|
+
|
|
18
|
+
**Surface provider**:
|
|
19
|
+
An object implementing the core interface for panes, commands, inspection, and
|
|
20
|
+
worktree surfaces. Herdr is the only real implementation; the fake is for
|
|
21
|
+
conformance tests.
|
|
22
|
+
_Avoid_: Supported multiplexer catalog, harness adapter, security sandbox
|
|
23
|
+
|
|
24
|
+
**Run session**:
|
|
25
|
+
The runtime owner coordinating launched attempts, retries, observations,
|
|
26
|
+
settlement, and delivery-gated surface cleanup. Pi composition supplies the
|
|
27
|
+
real adapter, provider, and session I/O.
|
|
28
|
+
_Avoid_: Pi session file, persistent specialist identity, historical run registry
|
|
29
|
+
|
|
30
|
+
**Composition root**:
|
|
31
|
+
The Pi host entry point that registers tools and commands, supplies current
|
|
32
|
+
launch inputs and host policy, renders status, and delivers parent results.
|
|
33
|
+
Runtime composition constructs adapters and providers behind its operations.
|
|
34
|
+
_Avoid_: Direct adapter dispatch, duplicated launch owner, workflow engine
|
|
35
|
+
|
|
36
|
+
**Dependency rule**:
|
|
37
|
+
The test-enforced import boundaries between core, adapters, surfaces, runtime,
|
|
38
|
+
and the Pi host. Core stays harness-neutral; the host consumes core and runtime
|
|
39
|
+
without direct adapter or surface imports.
|
|
40
|
+
_Avoid_: Runtime authorization, package split, hidden compatibility re-export
|
|
41
|
+
|
|
42
|
+
**Conformance suite**:
|
|
43
|
+
Shared seam-contract tests applied to an in-memory fake and the real
|
|
44
|
+
implementation. Fake coverage is local; real Pi and Herdr coverage uses the
|
|
45
|
+
deterministic integration suite.
|
|
46
|
+
_Avoid_: Second supported harness, fake-only behavior proof, release certification
|
|
47
|
+
|
|
11
48
|
**Child wake-up signal**:
|
|
12
49
|
An internal indication that prompts fresh inspection of an owned child. It does
|
|
13
50
|
not itself establish completion, failure, or a help request.
|
|
@@ -18,6 +55,22 @@ The parent-facing handoff of a child run's observed outcome and available
|
|
|
18
55
|
evidence. Receiving it does not establish that the work is correct or accepted.
|
|
19
56
|
_Avoid_: Wake-up signal, acceptance
|
|
20
57
|
|
|
58
|
+
**Operator cancel**:
|
|
59
|
+
A parent's `subagent_cancel` of one ordinary managed run. Its terminal intent is
|
|
60
|
+
recorded before any abort, kill, or await, so no fallback, retry, or recovery
|
|
61
|
+
follows. The run settles with one cancelled result only after its owned process
|
|
62
|
+
or pane termination is confirmed; unconfirmed termination keeps it live for a
|
|
63
|
+
retry, and shutdown suppression of it is not a cancellation. A natural result
|
|
64
|
+
taken first stays authoritative.
|
|
65
|
+
_Avoid_: Interrupt, suppression, persistent stop, pane-close fallback
|
|
66
|
+
|
|
67
|
+
**Process identity**:
|
|
68
|
+
A managed worktree child's Pi process named by immutable kernel facts (PID,
|
|
69
|
+
start time, boot, and PID namespace), recorded by the child at launch and
|
|
70
|
+
verified by the parent against the Herdr pane. A worktree cancel signals and
|
|
71
|
+
judges exit only by it.
|
|
72
|
+
_Avoid_: argv match, foreground process, shell visibility
|
|
73
|
+
|
|
21
74
|
**No-progress advisory**:
|
|
22
75
|
An internal warning that an active child shows no durable progress in its session
|
|
23
76
|
JSONL or activity snapshot. It is advisory only and never changes the child's
|
|
@@ -30,18 +83,34 @@ diagnostic, and launch fails before Herdr creates a pane or worktree. Remove
|
|
|
30
83
|
`cli` and `cli-model`, then select the model through Pi provider/model routing.
|
|
31
84
|
_Avoid_: Silent Pi reinterpretation, compatibility adapter
|
|
32
85
|
|
|
33
|
-
**
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
86
|
+
**Pack-neutral host**:
|
|
87
|
+
This package as an execution host that ships no agent roles and no planning or
|
|
88
|
+
review workflows. Its only skill, `pi-herdr-agents`, is a general operating guide for its own
|
|
89
|
+
control tools. Role packs and project or global definitions supply every
|
|
90
|
+
named role. An empty catalog is valid, and bare launches need no role.
|
|
91
|
+
_Avoid_: Default role set, privileged pack, starter workflow
|
|
92
|
+
|
|
93
|
+
**Role pack**:
|
|
94
|
+
A separately installed Pi package that registers role definitions through the
|
|
95
|
+
`pi-herdr-subagents:roles:discover:v1` event. Registered packs form the whole
|
|
96
|
+
package layer below global and project definitions; duplicate names across
|
|
97
|
+
packs are disabled. A pack owns its roles' workflows, skills, prerequisites, and
|
|
98
|
+
workflow glossary.
|
|
99
|
+
_Avoid_: Bundled layer, protected fallback, load-order winner
|
|
100
|
+
|
|
101
|
+
**Child-context hint**:
|
|
102
|
+
The `PI_SUBAGENT_ID` environment variable set for every fresh or resumed child
|
|
103
|
+
this extension launches, and absent from `/worktree` handoff sessions. It
|
|
104
|
+
distinguishes delegated children from user sessions for tool registration and
|
|
105
|
+
pack state decisions. Nested processes inherit it, so it is not a security
|
|
106
|
+
boundary.
|
|
107
|
+
_Avoid_: Authentication token, permission check, second child protocol
|
|
108
|
+
|
|
109
|
+
**Deprecated role setting**:
|
|
110
|
+
A valid legacy `roles.bundled` boolean, accepted as a no-op and reported once per
|
|
111
|
+
parent extension load. Malformed values remain configuration errors. The
|
|
112
|
+
extension never rewrites user configuration.
|
|
113
|
+
_Avoid_: Bundled-role toggle, automatic migration
|
|
45
114
|
|
|
46
115
|
**Role allowlist**:
|
|
47
116
|
The `tools:` inline comma-separated role-frontmatter scalar passed to Pi for a
|
|
@@ -49,20 +118,6 @@ public child. It is the enforced capability boundary available to a reviewer.
|
|
|
49
118
|
`read,bash` is not read-only because Bash can mutate files.
|
|
50
119
|
_Avoid_: Shell-as-read-only claim, implicit capability grant
|
|
51
120
|
|
|
52
|
-
**Finding record**:
|
|
53
|
-
A bounded review record with a stable ID, claimed P0–P3 severity, nullable
|
|
54
|
-
confirmed severity, separate provenance, evidence status (`reproduced`,
|
|
55
|
-
`trace-backed`, or `unverified`), preconditions, reproduction or trace, expected
|
|
56
|
-
and actual behavior, impact, and minimal fix. An unverified potential P0/P1 is
|
|
57
|
-
a candidate for verification, not a certified finding.
|
|
58
|
-
_Avoid_: Confidence gate, provenance-as-severity, vote count
|
|
59
|
-
|
|
60
|
-
**Incomplete review**:
|
|
61
|
-
A review outcome for drift, failure, missing or truncated evidence, malformed
|
|
62
|
-
output, coverage gaps, or unresolved serious candidates. A child-reported
|
|
63
|
-
`INCOMPLETE` propagates to the parent result.
|
|
64
|
-
_Avoid_: Hidden missing coverage, certified uncertainty
|
|
65
|
-
|
|
66
121
|
**Persistent specialist**:
|
|
67
122
|
A logical subagent that retains one policy-bound Pi session between sequential
|
|
68
123
|
tasks until it is stopped or crashes.
|
|
@@ -156,9 +211,8 @@ model family than the author. For ordinary review, prefer a different
|
|
|
156
211
|
authenticated model family. When no other authenticated model family is
|
|
157
212
|
available, ordinary review may use a same-family reviewer in a fresh standalone
|
|
158
213
|
session. Disclose that this review is context-isolated, not cross-family
|
|
159
|
-
independent. Cross-family verification
|
|
160
|
-
|
|
161
|
-
boundary; project policy may separately require a
|
|
214
|
+
independent. Cross-family verification must not use this fallback. Family is
|
|
215
|
+
the independence boundary; project policy may separately require a
|
|
162
216
|
different provider.
|
|
163
217
|
_Avoid_: Generic tier, reviewer-family enforcement, per-step routing
|
|
164
218
|
|