SKILL.md
Use Pi Subagents
Pi RPC launcher only. Load/follow use-subagents for delegation, split, assignment shape, worktrees/Git, verify, workspace cleanup, and reporting.
This skill is how to start and supervise Pi RPC children via [scripts/subagents.mjs](scripts/subagents.mjs).
Pi rules
- Only
node scripts/subagents.mjs …from this skill directory — never rawpi --mode rpc - Roles: scout · research · worker (Pi profiles in [
assets/agents/](assets/agents/); portable behavior also inuse-subagents) - Parent supplies exact
--cwd(prepare worktrees peruse-subagentsfirst) - Pi children: no Git at all (including bash); no worktree/branch management; no recursive delegation
- Child claims/exit/status = evidence, not acceptance
cleanretires script run state only — never cwd/worktrees/Git
Workflow
- Apply
use-subagents(split, ownership, isolation, join points); prepare each--cwd. - Build the task prompt; script wraps it with [
assets/assignment-prompts.md](assets/assignment-prompts.md) + role profile from [assets/agents/](assets/agents/). - Preflight from this skill directory:
- node scripts/subagents.mjs --help - node scripts/subagents.mjs info
- Launch:
node scripts/subagents.mjs run --role <scout|research|worker> (--assignment FILE|--prompt TEXT) --cwd PATH --timeout MS [--async]
- blocking default; --async only for independent lanes
- Supervise:
node scripts/subagents.mjs status|send|stop …
States/generations/recovery: [references/rpc-lifecycle.md](references/rpc-lifecycle.md)
- Verify + integrate + remove safe worktrees/branches per
use-subagents. - Runtime cleanup (after review):
node scripts/subagents.mjs clean --run IDthen--applywhen safe. - Report per
use-subagents(includerunIdonly if needed).
Failure
Unproven ownership, permissions, identity, liveness, or cwd provenance → stop. Retain ambiguous runtime/state; report runId, last state, cwd, next safe inspection step. No force-kill of unverified PIDs.