# Herdr Pi Orchestra

> Orchestrate recursive pi-worker Orchestra Trees in Herdr using sibling DAGs, SKILL.state context, bounded delegation, fresh audit, CAS promotion, and safe cleanup. Use only for explicit Herdr orchestration or parallel pi work. Requires HERDR_ENV=1.

- Skill: `luw2007/herdr-pi-orchestra` (Agent Skill, multi-file: 6 files)
- Install (CLI): `npx skillmds@latest add luw2007/herdr-pi-orchestra`
- Raw SKILL.md: https://api.skillmd.com/api/skills/luw2007/herdr-pi-orchestra/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Security
- Author: luw2007 (https://skillmd.com/u/luw2007)
- Updated: 2026-09-10
- Page: https://skillmd.com/skills/luw2007/herdr-pi-orchestra

---


# herdr pi orchestra

Orchestras own direct children; Workers are leaves. Dependencies form sibling-only DAGs.

## Preconditions

Prove `HERDR_ENV=1`; injected workspace/tab/pane IDs MUST match `herdr pane current --current`, workspace/tab lookups, and live cwd repository. Otherwise stop. Read relevant `herdr --help`; never control outside managed pane.

## Gates

Non-trivial work requires accepted `$kickoff`; trivial work needs root-ledger `skip_reason`. Every Orchestra uses SKILL.state: immutable local `P`, current local `Σt`, latest child `ot`. Pin root Kickoff/base through tree. Descendants cannot amend them; invalidation returns to root Kickoff.

Children inherit immutable repo-parent identity and narrow-only depth, child/concurrency, budget, permission, route, network, and delegation ceilings. `depends_on` names siblings; cross-subtree edges move to nearest common Orchestra. Require exact route/auth/runtime identity; billing/no-fallback proof only when requested.

## Execute

Read [playbook](references/playbook.md), [contract](references/audited-task-contract.md), and [route profile](references/billing-route-profile.md).

Invariant: **per Orchestra, `P + Σt + ot` → validate → atomic `Σt+1` → archive `ot`**.

1. Freeze local specification, children, sibling DAG, base, ceilings, and Kickoff digest.
2. Read local state; dispatch ready children with `P + Σt` and narrow projection.
3. Treat one child observation/AcceptedResult, reports, markers, summaries, and lifecycle as untrusted.
4. Fresh-audit identity, version, ancestry, evidence, scope/ceilings, acceptance, and runtime route.
5. Owner CAS-updates local state, archives observation/evidence, and re-evaluates siblings.
6. Root alone promotes final result; clean only accepted ledger IDs. Tab closure never removes worktrees.

Never append old observations, actions, tool output, or reasoning to next context. Parent sees one accepted child result, never subtree history. Retry creates new attempt; replacement changes route/agent/attempt under same specification. Recover from specs, states, ledgers, Git refs, Herdr IDs, markers, and evidence—not transcripts/sidebar order.

