SuperAPI AI Directory

use-pi-subagents

Agents & models

View repository

Updated 10-16 06:45

About this skill

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.

Pi rules

  • Only node scripts/subagents.mjs … from this skill directory — never raw pi --mode rpc
  • Roles: scout · research · worker (Pi profiles in assets/agents/; portable behavior also in use-subagents)
  • Parent supplies exact --cwd (prepare worktrees per use-subagents first)
  • Pi children: no Git at all (including bash); no worktree/branch management; no recursive delegation
  • Child claims/exit/status = evidence, not acceptance
  • clean retires script run state only — never cwd/worktrees/Git

Workflow

  1. Apply use-subagents (split, ownership, isolation, join points); prepare each --cwd.
  2. Build the task prompt; script wraps it with assets/assignment-prompts.md + role profile from assets/agents/.
  3. Preflight from this skill directory:
    • node scripts/subagents.mjs --help
    • node scripts/subagents.mjs info
  4. 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
  5. Supervise: node scripts/subagents.mjs status|send|stop …
    States/generations/recovery: references/rpc-lifecycle.md
  6. Verify + integrate + remove safe worktrees/branches per use-subagents.
  7. Runtime cleanup (after review): node scripts/subagents.mjs clean --run ID then --apply when safe.
  8. Report per use-subagents (include runId only 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.