pi-herdr-agents 1.5.0 → 1.6.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 +9 -9
- package/CHANGELOG.md +50 -1
- package/CONTEXT.md +69 -176
- package/README.md +130 -99
- package/RELEASING.md +1 -1
- package/agents/adversarial-reviewer.md +2 -4
- package/config.json.example +6 -0
- package/docs/README.md +41 -36
- package/docs/adr/0002-agent-workflow-skill-runtime-taxonomy.md +2 -0
- package/docs/adr/0003-installable-role-packs.md +12 -2
- package/docs/adr/0004-require-active-user-approval-for-workflow-execution.md +2 -0
- package/docs/adr/0005-parent-owns-workflow-script-authority.md +2 -0
- package/docs/adr/0006-limit-v1-execution-effects-to-isolated-worktrees.md +2 -0
- package/docs/adr/0007-require-fresh-review-for-workflow-scripts.md +2 -0
- package/docs/adr/0009-remove-workflow-subsystem.md +30 -0
- package/docs/adr/0010-persistent-specialists-as-session-generations.md +29 -0
- package/docs/orchestrated-review-workflow-plan.md +7 -3
- package/docs/worktree-subagents.md +3 -3
- package/package.json +3 -3
- package/pi-extension/subagents/completion.ts +42 -14
- package/pi-extension/subagents/herdr.ts +39 -0
- package/pi-extension/subagents/index.ts +929 -1037
- package/pi-extension/subagents/launch.ts +64 -0
- package/pi-extension/subagents/lifecycle.ts +3 -1
- package/pi-extension/subagents/persistent-config.ts +114 -0
- package/pi-extension/subagents/session.ts +528 -3
- package/pi-extension/subagents/subagent-done.ts +145 -0
- package/pi-extension/subagents/supervision-config.ts +81 -0
- package/pi-extension/subagents/supervision.ts +258 -0
- package/pi-extension/subagents/terminal.ts +8 -0
- package/pi-extension/subagents/type-guards.ts +4 -0
- package/pi-extension/subagents/wake.ts +102 -0
- package/skills/orchestrate/SKILL.md +65 -210
- package/skills/orchestrate/adversarial-review-example.js +58 -211
- package/skills/orchestrate/adversarial-review.md +69 -246
- package/pi-extension/subagents/workflow-worker.js +0 -73
- package/pi-extension/subagents/workflow.ts +0 -1201
package/AGENTS.md
CHANGED
|
@@ -4,7 +4,7 @@ These instructions apply to humans and coding agents changing `pi-herdr-agents`.
|
|
|
4
4
|
|
|
5
5
|
## What this package is
|
|
6
6
|
|
|
7
|
-
`pi-herdr-agents` (Pi Herdr Agents) is a Pi extension that launches asynchronous Pi child agents
|
|
7
|
+
`pi-herdr-agents` (Pi Herdr Agents) is a Pi extension that launches asynchronous Pi child agents exclusively in Herdr. Ordinary runs use dedicated Herdr panes/tabs. 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
9
|
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
10
|
|
|
@@ -12,12 +12,12 @@ The extension is fire-and-forget: `subagent` returns an acknowledgement, and com
|
|
|
12
12
|
|
|
13
13
|
- [`README.md`](./README.md) — canonical installation, API, configuration, lifecycle, and agent-authoring reference
|
|
14
14
|
- [`docs/README.md`](docs/README.md) — map of shipped contracts, active design, ADRs, and background research
|
|
15
|
-
- [`CONTEXT.md`](CONTEXT.md) — workflow
|
|
15
|
+
- [`CONTEXT.md`](CONTEXT.md) — workflow-domain glossary; read it before changing orchestration design
|
|
16
16
|
- [`docs/adr/0003-installable-role-packs.md`](docs/adr/0003-installable-role-packs.md) — installable role-pack discovery, precedence, and collision contract
|
|
17
17
|
- [`docs/worktree-subagents.md`](docs/worktree-subagents.md) — canonical worktree operating, review, recovery, and cleanup guide
|
|
18
18
|
- [`RELEASING.md`](RELEASING.md) — release checks and publishing procedure
|
|
19
19
|
|
|
20
|
-
Bundled role prompts live in [`agents/`](agents/). The native `/skill:orchestrate`
|
|
20
|
+
Bundled role prompts live in [`agents/`](agents/). The native `/skill:orchestrate` public-review fan-out skill lives at [`skills/orchestrate/SKILL.md`](skills/orchestrate/SKILL.md). The `/plan` orchestration prompt lives at [`pi-extension/subagents/plan-skill.md`](pi-extension/subagents/plan-skill.md).
|
|
21
21
|
|
|
22
22
|
## Code map
|
|
23
23
|
|
|
@@ -25,15 +25,16 @@ Bundled role prompts live in [`agents/`](agents/). The native `/skill:orchestrat
|
|
|
25
25
|
- `pi-extension/subagents/herdr.ts` — Herdr CLI argument construction and response parsing
|
|
26
26
|
- `pi-extension/subagents/terminal.ts` — terminal adapter used by the lifecycle
|
|
27
27
|
- `pi-extension/subagents/lifecycle.ts`, `status.ts`, `activity.ts` — process/turn state and widget projection
|
|
28
|
+
- `pi-extension/subagents/wake.ts`, `supervision.ts`, `supervision-config.ts` — file wake-ups, shared pane reconciliation, polling fallback, and supervision configuration
|
|
29
|
+
- `pi-extension/subagents/persistent-config.ts` — strict persistent-specialist cap configuration
|
|
28
30
|
- `pi-extension/subagents/completion.ts`, `session.ts`, `subagent-done.ts` — child completion, transcript handling, `caller_ping`, and `subagent_done`
|
|
29
|
-
- `
|
|
30
|
-
- `CONTEXT.md` — domain glossary and validated prototype evidence for active design
|
|
31
|
+
- `CONTEXT.md` — orchestration-domain glossary
|
|
31
32
|
- `docs/adr/` — hard-to-reverse architectural decisions
|
|
32
33
|
- `docs/research/` — evidence and alternatives, never the shipped contract
|
|
33
34
|
- `test/test.ts` — unit tests for public subagent extension seams
|
|
34
|
-
- `test/workflow.test.ts` — unit tests for workflow preparation, execution, and cancellation
|
|
35
35
|
- `test/package-skill.test.js` — bundled skill and package manifest contract test
|
|
36
36
|
- `test/integration/` — real Herdr and Pi lifecycle tests using the deterministic provider by default
|
|
37
|
+
- `test/bench/supervision-bench.mjs` — manual isolated-Herdr supervision transport benchmark; raw samples stay in `/tmp/issue29-bench/`
|
|
37
38
|
|
|
38
39
|
## Worktree contract
|
|
39
40
|
|
|
@@ -72,8 +73,7 @@ When behavior changes, update every affected surface in the same commit:
|
|
|
72
73
|
- `/plan` orchestration policy → `pi-extension/subagents/plan-skill.md`
|
|
73
74
|
- contributor/release verification → this file, `.pi/skills/run-integration-tests/SKILL.md`, or `RELEASING.md`
|
|
74
75
|
- domain terminology → `CONTEXT.md`
|
|
75
|
-
- hard-to-reverse
|
|
76
|
-
- active orchestrated-review design → `docs/orchestrated-review-workflow-plan.md`
|
|
76
|
+
- hard-to-reverse orchestration trade-offs → the relevant ADR; do not create an ADR for every design question
|
|
77
77
|
- architectural evidence and alternatives only → research docs, clearly marked when later decisions supersede them
|
|
78
78
|
|
|
79
79
|
Do not copy the full worktree guide into every role prompt. Keep canonical detail in the guide and add only the role-specific rule an agent needs while running.
|
|
@@ -105,7 +105,7 @@ Use `PI_TEST_MODEL="openai-codex/gpt-5.6-luna" PI_TEST_TIMEOUT=180000 npm run te
|
|
|
105
105
|
Before committing:
|
|
106
106
|
|
|
107
107
|
- inspect `git status` and the final diff;
|
|
108
|
-
- confirm the package preview includes `CHANGELOG.md`, `skills/orchestrate/SKILL.md`, `skills/orchestrate/adversarial-review.md`, `skills/orchestrate/adversarial-review-example.js`,
|
|
108
|
+
- confirm the package preview includes `CHANGELOG.md`, `skills/orchestrate/SKILL.md`, `skills/orchestrate/adversarial-review.md`, and `skills/orchestrate/adversarial-review-example.js`, while excluding `pi-extension/subagents/workflow-worker.js`, plans, journals, sessions, prototypes, generated evidence, and local config;
|
|
109
109
|
- run `npm pack --dry-run` when package contents or documentation paths changed;
|
|
110
110
|
- confirm that no generated plans, journals, sessions, provider configuration, test scripts, or review artifacts are staged; and
|
|
111
111
|
- confirm that no accidental empty directory exists at the repository root:
|
package/CHANGELOG.md
CHANGED
|
@@ -7,7 +7,55 @@ 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
|
-
## [v1.
|
|
10
|
+
## [v1.6.0](https://github.com/giuseppecrj/pi-herdr-agents/compare/v1.5.1...v1.6.0)
|
|
11
|
+
|
|
12
|
+
### Merged
|
|
13
|
+
|
|
14
|
+
- feat: event-driven supervision with file wake-ups and batched reconciliation (#29) [`#39`](https://github.com/giuseppecrj/pi-herdr-agents/pull/39)
|
|
15
|
+
- fix(subagents): never downgrade a queued reconciliation to a wake [`#29`](https://github.com/giuseppecrj/pi-herdr-agents/pull/29)
|
|
16
|
+
- feat: persistent subagents with turn-based task delivery (#32) [`#37`](https://github.com/giuseppecrj/pi-herdr-agents/pull/37)
|
|
17
|
+
- fix(subagents): fail closed after an unconfirmed persistent stop [`#32`](https://github.com/giuseppecrj/pi-herdr-agents/pull/32)
|
|
18
|
+
- fix(subagents): close persistent delivery and stop-retry edge cases [`#32`](https://github.com/giuseppecrj/pi-herdr-agents/pull/32)
|
|
19
|
+
- refactor!: remove the workflow subsystem (#31) [`#36`](https://github.com/giuseppecrj/pi-herdr-agents/pull/36)
|
|
20
|
+
- refactor!: remove the workflow subsystem [`#31`](https://github.com/giuseppecrj/pi-herdr-agents/pull/31)
|
|
21
|
+
|
|
22
|
+
### Commits
|
|
23
|
+
|
|
24
|
+
- feat(subagents): turn-based task delivery for persistent specialists (#32) [`820a7dc`](https://github.com/giuseppecrj/pi-herdr-agents/commit/820a7dcebf5cf1b2d36435c39388702d238410f1)
|
|
25
|
+
- feat(subagents): file wake-ups and batched supervision reconciliation (#29) [`cbd42ed`](https://github.com/giuseppecrj/pi-herdr-agents/commit/cbd42ed0df09276d0859436e53657c6af9ba848d)
|
|
26
|
+
- feat(subagents): subagent_stop, specialist cap, and crash notices (#32) [`73267af`](https://github.com/giuseppecrj/pi-herdr-agents/commit/73267afbd279f8796dd8b13b92a16de6aba65562)
|
|
27
|
+
- feat(subagents): subagent_send and specialist visibility (#32) [`5542341`](https://github.com/giuseppecrj/pi-herdr-agents/commit/554234161a25c5868b1b6744a05914d816a61823)
|
|
28
|
+
- fix(subagents): retain persistent task and stop evidence (#32) [`154bc1f`](https://github.com/giuseppecrj/pi-herdr-agents/commit/154bc1f202e3e90e0a42ef5687964c69bbbbc68e)
|
|
29
|
+
- test(integration): persistent specialist lifecycle coverage (#32) [`526ae46`](https://github.com/giuseppecrj/pi-herdr-agents/commit/526ae46ffe56205919d8eb6f1ba94020c2e4d378)
|
|
30
|
+
- feat(subagents): supervision benchmark and docs (#29) [`97fb7a3`](https://github.com/giuseppecrj/pi-herdr-agents/commit/97fb7a3b6b2445faa452fce7d72008cf8173adc5)
|
|
31
|
+
- test(integration): event-driven supervision fault coverage (#29) [`f9d2603`](https://github.com/giuseppecrj/pi-herdr-agents/commit/f9d260388c8e494da6d70bb524341f1ba2edd637)
|
|
32
|
+
- fix(subagents): keep legacy polling honest and close supervision handles (#29) [`256a32c`](https://github.com/giuseppecrj/pi-herdr-agents/commit/256a32c572e8c7349e8faa820d8c9cc9f5f11395)
|
|
33
|
+
- fix(subagents): enforce single-task busy state for persistent specialists (#32) [`c2fa33f`](https://github.com/giuseppecrj/pi-herdr-agents/commit/c2fa33f5a367ca7b79ab9635ef9d41f1ea165c31)
|
|
34
|
+
- fix(subagents): scope pane snapshots to registered owners and confirm absence (#29) [`c73a132`](https://github.com/giuseppecrj/pi-herdr-agents/commit/c73a13211f743dc881c506226f457c6a5045e41b)
|
|
35
|
+
- feat(subagents): persistent specialist docs, glossary, and integration coverage (#32) [`e0f052d`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e0f052da7b717a9c4c21ae1d83172acb1a27452c)
|
|
36
|
+
- fix(subagents): guard terminal evidence against racing semantic records (#29) [`f2e41f7`](https://github.com/giuseppecrj/pi-herdr-agents/commit/f2e41f74f185c13a89b49301e226e04948d4c088)
|
|
37
|
+
- fix(subagents): type-safe validation for persistent sidecar, ledger, and config parsing [`fe81be5`](https://github.com/giuseppecrj/pi-herdr-agents/commit/fe81be5ca76eba504ff59fcf46ba3e9499753a70)
|
|
38
|
+
- fix(orchestrate): parse review reports out of wrapped public delivery [`9f11918`](https://github.com/giuseppecrj/pi-herdr-agents/commit/9f11918a407be39388999feeee16970e9d888105)
|
|
39
|
+
- fix(subagents): close stopped persistent specialist panes (#32) [`8d0b6e7`](https://github.com/giuseppecrj/pi-herdr-agents/commit/8d0b6e7e9703fd7416e8ddc0ffb97dc26d48ab6b)
|
|
40
|
+
- docs(context): define child wake-up signal and result delivery terms [`a3c159e`](https://github.com/giuseppecrj/pi-herdr-agents/commit/a3c159e2056d13be5697494a13bcb84bdcf92bab)
|
|
41
|
+
- docs(subagents): clarify persistent help requests (#32) [`16e9363`](https://github.com/giuseppecrj/pi-herdr-agents/commit/16e9363180cf49b5e03003f5ea1e57b38ac8adbd)
|
|
42
|
+
|
|
43
|
+
## [v1.5.1](https://github.com/giuseppecrj/pi-herdr-agents/compare/v1.5.0...v1.5.1) - 2026-09-05
|
|
44
|
+
|
|
45
|
+
### Merged
|
|
46
|
+
|
|
47
|
+
- Fix subagent lifecycle, resume permissions, and failure reporting [`#30`](https://github.com/giuseppecrj/pi-herdr-agents/pull/30)
|
|
48
|
+
|
|
49
|
+
### Commits
|
|
50
|
+
|
|
51
|
+
- fix(subagents): preserve capabilities across resume (#26) [`9b46c5c`](https://github.com/giuseppecrj/pi-herdr-agents/commit/9b46c5c612c299ca9bb2ad3b6511b0af53438814)
|
|
52
|
+
- fix(subagents): preserve model failure evidence and fallback delivery (#24) [`a6366ee`](https://github.com/giuseppecrj/pi-herdr-agents/commit/a6366eea08ec6679535f3f4fa9dbd6c9201254e9)
|
|
53
|
+
- fix(roles): reject malformed capability declarations (#27) [`0d263b8`](https://github.com/giuseppecrj/pi-herdr-agents/commit/0d263b8867e1708288302e0f9a5c9b806c810345)
|
|
54
|
+
- fix(workflows): join child cleanup before terminal delivery (#25) [`e928817`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e9288172b8037b39ed04107ad0729292ea596a8f)
|
|
55
|
+
- test(integration): assert cwd and session delivery structurally (#28) [`ec277ff`](https://github.com/giuseppecrj/pi-herdr-agents/commit/ec277ff9ddf4b309edb1f12942acac68ee295eb2)
|
|
56
|
+
- chore: release v1.5.1 [`ebef265`](https://github.com/giuseppecrj/pi-herdr-agents/commit/ebef2657b0b21177373868d83d66965fdf77febd)
|
|
57
|
+
|
|
58
|
+
## [v1.5.0](https://github.com/giuseppecrj/pi-herdr-agents/compare/v1.4.2...v1.5.0) - 2026-09-05
|
|
11
59
|
|
|
12
60
|
### Merged
|
|
13
61
|
|
|
@@ -28,6 +76,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|
|
28
76
|
- feat: allow disabling bundled agent roles [`e866ade`](https://github.com/giuseppecrj/pi-herdr-agents/commit/e866ade49f35c7bd51931c1e216fd9749abca2e8)
|
|
29
77
|
- fix: distinguish role-pack replacements from bundled warnings [`d4452c8`](https://github.com/giuseppecrj/pi-herdr-agents/commit/d4452c8994c61607d2c1d1259679c1b7f7be8780)
|
|
30
78
|
- fix: address evaluation validator review findings [`406d1ab`](https://github.com/giuseppecrj/pi-herdr-agents/commit/406d1ab9e1a129d336ed0b850508d335b130e156)
|
|
79
|
+
- chore: release v1.5.0 [`d77714c`](https://github.com/giuseppecrj/pi-herdr-agents/commit/d77714c79123db91d4741838587b4851527c4615)
|
|
31
80
|
|
|
32
81
|
## [v1.4.2](https://github.com/giuseppecrj/pi-herdr-agents/compare/v1.4.1...v1.4.2) - 2026-08-31
|
|
33
82
|
|
package/CONTEXT.md
CHANGED
|
@@ -1,189 +1,82 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
This context defines language for the shipped first-flow workflow runtime and deferred follow-up. [`README.md`](./README.md) is authoritative for shipped behavior; [`docs/orchestrated-review-workflow-plan.md`](./docs/orchestrated-review-workflow-plan.md) records the shipped implementation and deferred work. The workflow coordinates existing subagent roles without becoming a general-purpose workflow engine.
|
|
1
|
+
# Orchestration glossary
|
|
4
2
|
|
|
5
3
|
## Language
|
|
6
4
|
|
|
7
|
-
**Feature-delivery workflow**:
|
|
8
|
-
A bounded, user-approved plan that coordinates work needed to deliver one feature and ends in reviewable evidence.
|
|
9
|
-
_Avoid_: General task graph, orchestrator agent
|
|
10
|
-
|
|
11
|
-
**Workflow script**:
|
|
12
|
-
The per-run `workflow.js` containing a runner-validated JSON metadata block and the user-approved executable strategy.
|
|
13
|
-
_Avoid_: Execution plan, generic script, inferred policy
|
|
14
|
-
|
|
15
|
-
**Workflow metadata**:
|
|
16
|
-
The JSON block at the start of a workflow script that the runner parses and validates before loading any executable JavaScript.
|
|
17
|
-
_Avoid_: Evaluated metadata, inferred policy
|
|
18
|
-
|
|
19
|
-
**Approved runtime**:
|
|
20
|
-
A mandatory exact `provider/model` reference and thinking level declared in workflow metadata; every execution node must resolve to one of these approved runtimes. Missing values fail preparation rather than inheriting parent or role defaults. All subagent and workflow execution is Pi-backed.
|
|
21
|
-
_Avoid_: Runtime tiers, external CLI adapter, silent fallback, inherited runtime
|
|
22
|
-
|
|
23
5
|
**Pi subagent runtime**:
|
|
24
|
-
The single execution path for fresh and resumed children. `launchPiSubagent()`
|
|
6
|
+
The single execution path for fresh and resumed children. `launchPiSubagent()`
|
|
7
|
+
owns the complete Pi and Herdr launch transaction; completion uses Pi sidecar
|
|
8
|
+
evidence first and the terminal exit marker as fallback.
|
|
25
9
|
_Avoid_: Runtime dispatch, adapter registry, split launch ownership
|
|
26
10
|
|
|
27
|
-
**
|
|
28
|
-
An
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
**Run journal**:
|
|
32
|
-
The runner-owned append-only `run.jsonl` that starts with approval binding the workflow-script hash, canonical repository identity, and committed base, then records observed node calls and results. Exactly one terminal event contains the bounded runtime envelope; a following delivery event references it without duplicating the task result.
|
|
33
|
-
_Avoid_: User-authored plan, mutable audit log, duplicated result
|
|
34
|
-
|
|
35
|
-
**Terminal lifecycle**:
|
|
36
|
-
Completed read and review panes close after result capture while child session files and run evidence remain. Writer-worktree retention belongs to a deferred writer workflow.
|
|
37
|
-
_Avoid_: Retaining every clean pane, deleting review evidence
|
|
38
|
-
|
|
39
|
-
**Restart boundary**:
|
|
40
|
-
Workflow ownership survives Pi lifecycle transitions handled inside the same process, including `/reload`. A full process restart performs interruption reconciliation only: it marks a stale run interrupted, retains sessions, journals, branches, and worktrees as evidence, and requires a newly approved run. There is no replay, restart of children, cleanup, or history surface.
|
|
41
|
-
_Avoid_: Automatic replay, durable workflow manager, lost-artifact claim
|
|
42
|
-
|
|
43
|
-
**Execution artifact directory**:
|
|
44
|
-
The project-local `.pi/plans/<run>/` directory that keeps its workflow script and run journal together.
|
|
45
|
-
_Avoid_: Session-only state, runner-global artifacts
|
|
46
|
-
|
|
47
|
-
**Execution run**:
|
|
48
|
-
One immutable orchestration attempt with its own unique artifact directory; a retry or revised plan creates a new run that can reference its predecessor. Approval binds the canonical repository root, Git common directory, and committed base SHA. Read-only execution nodes share a run-owned checkout pinned to that identity.
|
|
49
|
-
_Avoid_: Overwritten feature directory, mutable run history, parent-checkout reads, SHA-only repository ambiguity
|
|
50
|
-
|
|
51
|
-
**Execution source**:
|
|
52
|
-
A user-selected PRD, ticket set, URL, or combination that the orchestration skill reads before preparation. Local paths must resolve inside the approved repository; remote or tracker content is materialized into the exact approved script or prompt evidence rather than fetched by workflow children. Metadata source strings are provenance, not runtime read authority.
|
|
53
|
-
_Avoid_: Required ticket conversion, fixed ticket graph, runtime refetch, path escape
|
|
54
|
-
|
|
55
|
-
**Orchestration skill**:
|
|
56
|
-
The user-facing native Pi skill bundled with this package that accepts an execution source, derives a workflow script, and invokes the runner only after approval. Its adversarial branch is a disclosed procedure in the same skill, not another engine or role.
|
|
57
|
-
_Avoid_: Extension command, separate skill package, raw runner API, child-authored workflow
|
|
58
|
-
|
|
59
|
-
**Adversarial review procedure**:
|
|
60
|
-
The preferred `orchestrate` branch for exact approved review: two routine or three distinct-lens high-risk discovery reviewers, candidate-dependent cross-family verification, then fresh synthesis. It uses the existing runner and SDK.
|
|
61
|
-
_Avoid_: Fixed `3 + 3 + 1`, confidence vote, new workflow engine
|
|
62
|
-
|
|
63
|
-
**Compatibility review coordinator**:
|
|
64
|
-
The transitional `adversarial-reviewer` role for public asynchronous child launches. It stays open across automatic result steers, counts terminal child envelopes by name, and calls `subagent_done` only after synthesis. Its Bash-enabled inspection contract is behavioral rather than an enforced read-only capability boundary.
|
|
65
|
-
_Avoid_: Preferred hardened path, enforced read-only runner, auto-exit coordinator
|
|
66
|
-
|
|
67
|
-
**Source resolution**:
|
|
68
|
-
The orchestration skill reads an execution source through capabilities already available to the parent; the extension has no built-in tracker client and stops when the source is inaccessible.
|
|
69
|
-
_Avoid_: Required tracker integration, silent fallback
|
|
70
|
-
|
|
71
|
-
**Execution node**:
|
|
72
|
-
A bounded planned subagent run that may cover one, part of one, or several source tickets while retaining source traceability. The shipped first flow accepts only `kind: "review"`; `read` and `write` remain deferred kinds for later workflows.
|
|
73
|
-
_Avoid_: Ticket, untracked child run, inferred effect, first-flow read/write node
|
|
74
|
-
|
|
75
|
-
**Review node**:
|
|
76
|
-
A declared workflow execution identity that pins one role, exact runtime, and
|
|
77
|
-
thinking level. Node IDs are unique within a workflow; several nodes can use
|
|
78
|
-
the same role.
|
|
79
|
-
_Avoid_: Role identity, implicit runtime, duplicate-role prohibition
|
|
80
|
-
|
|
81
|
-
**Writer lane (deferred)**:
|
|
82
|
-
A possible later single write node and retained worktree; it is not part of the first review-only workflow and requires separate evidence and approval.
|
|
83
|
-
_Avoid_: First-flow writer, parallel writers, shared-checkout writer
|
|
84
|
-
|
|
85
|
-
**Read-only fan-out**:
|
|
86
|
-
The shipped first flow runs bounded parallel review nodes, then one fresh synthesis node. A later writer workflow may define separate pre-write and post-write review stages.
|
|
87
|
-
_Avoid_: Unbounded fan-out, first-flow writer, reviewing through a writer
|
|
88
|
-
|
|
89
|
-
**Code-oriented orchestration**:
|
|
90
|
-
The parent writes JavaScript against a narrow capability API so intermediate subagent results stay in code and only the final useful result returns to the parent context, similar in shape to Cloudflare Code Mode.
|
|
91
|
-
_Avoid_: Direct parent turn per child result, broad generated tool API, security-equivalence claim
|
|
11
|
+
**Child wake-up signal**:
|
|
12
|
+
An internal indication that prompts fresh inspection of an owned child. It does
|
|
13
|
+
not itself establish completion, failure, or a help request.
|
|
14
|
+
_Avoid_: Completion result, user alert
|
|
92
15
|
|
|
93
|
-
**
|
|
94
|
-
The
|
|
95
|
-
|
|
16
|
+
**Child result delivery**:
|
|
17
|
+
The parent-facing handoff of a child run's observed outcome and available
|
|
18
|
+
evidence. Receiving it does not establish that the work is correct or accepted.
|
|
19
|
+
_Avoid_: Wake-up signal, acceptance
|
|
96
20
|
|
|
97
|
-
**
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
The explicit success-or-failure value returned by `agent()`, preserving output, retryability, session reference, and any Git handoff without collapsing operational failure to `null`.
|
|
103
|
-
_Avoid_: Nullable result, prose-only failure
|
|
104
|
-
|
|
105
|
-
**Runtime envelope**:
|
|
106
|
-
The runner-owned final wrapper containing only operational facts such as run ID, terminal runtime state, returned task result, and a runtime error when present.
|
|
107
|
-
_Avoid_: Review verdict, delivery semantics, task-specific state machine
|
|
108
|
-
|
|
109
|
-
**Task result**:
|
|
110
|
-
Any JSON-compatible value returned by `workflow.js`; the parent-authored script chooses its task-specific shape and vocabulary.
|
|
111
|
-
_Avoid_: Global verdict enum, mandatory review receipt type, workflow DSL
|
|
112
|
-
|
|
113
|
-
**Workflow runtime**:
|
|
114
|
-
A native Node Worker thread containing the restricted `vm` that executes an approved workflow script with only the Workflow SDK. The Worker protects Pi's main event loop from accidental asynchronous infinite loops; neither the Worker nor `vm` is a security boundary.
|
|
115
|
-
_Avoid_: Main-thread workflow execution, untrusted-code sandbox, normal Node module execution
|
|
116
|
-
|
|
117
|
-
**First-flow effect boundary**:
|
|
118
|
-
An execution node may only inspect or review one runner-owned detached checkout pinned to the approved repository identity and committed head. The parent materializes the changed-file inventory and unified diff or complete before/after evidence, including deleted and base-only content. A node cannot write files, create commits, mutate the parent checkout, integrate work, or mutate external systems.
|
|
119
|
-
_Avoid_: Writer node, head-only diff inference, ticket mutation, deployment, publishing, messaging, PR action, late-bound base
|
|
21
|
+
**Legacy external CLI role**:
|
|
22
|
+
An old role definition that contains `cli`. Discovery reports a migration
|
|
23
|
+
diagnostic, and launch fails before Herdr creates a pane or worktree. Remove
|
|
24
|
+
`cli` and `cli-model`, then select the model through Pi provider/model routing.
|
|
25
|
+
_Avoid_: Silent Pi reinterpretation, compatibility adapter
|
|
120
26
|
|
|
121
|
-
**
|
|
122
|
-
|
|
123
|
-
|
|
27
|
+
**Public review fan-out**:
|
|
28
|
+
A parent procedure that materializes pinned evidence, launches fresh public
|
|
29
|
+
reviewer subagents, receives automatic result delivery, and synthesizes every
|
|
30
|
+
outcome. Reviewers use ordinary panes and do not poll for completion.
|
|
31
|
+
_Avoid_: Hidden child runner, approval gate, parentless aggregation
|
|
32
|
+
|
|
33
|
+
**Pinned review evidence**:
|
|
34
|
+
The parent-captured repository identity, base and head SHAs, task/spec text,
|
|
35
|
+
provenance, changed-file inventory, complete diff, and deleted or base-only
|
|
36
|
+
content supplied to reviewers. Dirty state is included only when explicitly
|
|
37
|
+
captured and fingerprinted.
|
|
38
|
+
_Avoid_: Moving-checkout inference, head-only deleted-content review
|
|
39
|
+
|
|
40
|
+
**Role allowlist**:
|
|
41
|
+
The `tools:` inline comma-separated role-frontmatter scalar passed to Pi for a
|
|
42
|
+
public child. It is the enforced capability boundary available to a reviewer.
|
|
43
|
+
`read,bash` is not read-only because Bash can mutate files.
|
|
44
|
+
_Avoid_: Shell-as-read-only claim, implicit capability grant
|
|
124
45
|
|
|
125
46
|
**Finding record**:
|
|
126
|
-
A
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
_Avoid_:
|
|
132
|
-
|
|
133
|
-
**Review-policy boundary**:
|
|
134
|
-
The bundled skill authors review fan-out and synthesis, and exact-script approval binds that task strategy; the runner enforces operational capabilities and evidence without a fixed review receipt or data-flow state machine.
|
|
135
|
-
_Avoid_: Hidden task semantics, runner-certified review completeness
|
|
136
|
-
|
|
137
|
-
**Review workflow**:
|
|
138
|
-
The first product flow: an approved JavaScript run fans out to fresh read-only reviewers, retains every explicit result, then sends every outcome through a synthesis projection to one fresh reviewer.
|
|
139
|
-
_Avoid_: Parent-scheduled review nodes, filtered result, prose-only aggregation
|
|
140
|
-
|
|
141
|
-
**Review synthesis**:
|
|
142
|
-
The final fresh read-only review node that receives exact materialized source evidence and identity-stripped projections for every discovery and verification outcome, preserves finding provenance, resolves claims from evidence, and returns one task-specific result. Reviewer aliases and a predetermined report order reduce identity/order cues while the approval packet and journal retain auditable runtime provenance.
|
|
143
|
-
_Avoid_: Filtered failures, raw identity metadata, mechanical worst-verdict rule, confidence voting, parent-side synthesis
|
|
144
|
-
|
|
145
|
-
**Parent-guided recovery**:
|
|
146
|
-
Current runtime child failures are explicit non-retryable evidence. The parent can approve a new smaller workflow for missing coverage. The bundled skill also contains one dormant same-node replacement branch, used only when a required failure explicitly has `retryable: true`; it never infers retryability from prose or runtime error text.
|
|
147
|
-
_Avoid_: Error-text retry classification, silent model fallback, unbounded retries
|
|
47
|
+
A bounded review record with a stable ID, claimed P0–P3 severity, nullable
|
|
48
|
+
confirmed severity, separate provenance, evidence status (`reproduced`,
|
|
49
|
+
`trace-backed`, or `unverified`), preconditions, reproduction or trace, expected
|
|
50
|
+
and actual behavior, impact, and minimal fix. An unverified potential P0/P1 is
|
|
51
|
+
a candidate for verification, not a certified finding.
|
|
52
|
+
_Avoid_: Confidence gate, provenance-as-severity, vote count
|
|
148
53
|
|
|
149
54
|
**Incomplete review**:
|
|
150
|
-
A review
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
_Avoid_:
|
|
168
|
-
|
|
169
|
-
**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
### JavaScript review workflow — validated
|
|
180
|
-
|
|
181
|
-
- **Question:** Can JavaScript await real Pi-backed Herdr children internally, fan review out, synthesize every final result, and return one value without public subagent steers?
|
|
182
|
-
- **Primary source:** branch `prototype/js-review-workflow`, commit `4622e08731d31ccda1c33eb01cff5610d86d0166`
|
|
183
|
-
- **Run:** `npm run prototype:review-workflow`
|
|
184
|
-
- **Observed:** three parallel Luna reviewers and one Luna synthesizer completed; the prototype's synthetic replacement is historical evidence only and is not part of the shipped flow; every real child used only read-only tools; no child result entered the parent session; completed panes closed; the exact-base shared checkout was disposed; sessions and a 15-event journal remained.
|
|
185
|
-
- **VM result:** `agent.constructor(...)` reached the host `process`, confirming that Node `vm` is not a security boundary.
|
|
186
|
-
- **Event-loop result:** a separate Node 26.3 probe showed that the VM timeout stops a synchronous infinite loop but not one started after `await`; production workflow code must run in a terminable Worker thread rather than Pi's main event loop.
|
|
187
|
-
- **Self-hosting result:** child `pi -ne -e subagent-done.ts` avoided duplicate loading of the repository and globally installed subagent extensions.
|
|
188
|
-
- **Answered later:** cancel-all is shipped as `herdr_workflow cancel` under a process-global terminal gate: active panes capture Herdr process identities before close, checkout dispose requires confirmed exit, and unconfirmed termination retains the checkout and ends `failed` with `cancel_termination_failed`.
|
|
189
|
-
- **Not answered:** writer review visibility; typed retryability remains deferred, while real launch-failure classification is covered by the shipped workflow failure envelope and same-process `/reload` ownership is covered by the process-global workflow owner.
|
|
55
|
+
A review outcome for drift, failure, missing or truncated evidence, malformed
|
|
56
|
+
output, coverage gaps, or unresolved serious candidates. A child-reported
|
|
57
|
+
`INCOMPLETE` propagates to the parent result.
|
|
58
|
+
_Avoid_: Hidden missing coverage, certified uncertainty
|
|
59
|
+
|
|
60
|
+
**Persistent specialist**:
|
|
61
|
+
A logical subagent that retains one policy-bound Pi session between sequential
|
|
62
|
+
tasks until it is stopped or crashes.
|
|
63
|
+
_Avoid_: Immortal process, reusable pane
|
|
64
|
+
|
|
65
|
+
**Session generation**:
|
|
66
|
+
One concrete Pi session serving a persistent specialist's logical identity.
|
|
67
|
+
_Avoid_: Logical specialist, revived session
|
|
68
|
+
|
|
69
|
+
**Task outcome**:
|
|
70
|
+
The recorded terminal result for one persistent-specialist task, including
|
|
71
|
+
`delivered`, `rejected-busy`, or a stop-pending task's eventual terminal state.
|
|
72
|
+
_Avoid_: Assumed completion, replay candidate
|
|
73
|
+
|
|
74
|
+
**Delivery ledger**:
|
|
75
|
+
The append-only evidence record of persistent task dispatch and terminal
|
|
76
|
+
outcomes for one session generation.
|
|
77
|
+
_Avoid_: Work queue, mutable task list
|
|
78
|
+
|
|
79
|
+
**Worktree lease**:
|
|
80
|
+
The lifetime-exclusive binding between a persistent specialist generation and
|
|
81
|
+
one managed worktree, when that specialist writes in a worktree.
|
|
82
|
+
_Avoid_: Rebindable checkout, shared worktree ownership
|