Parallel Agent
This is a thin local policy layer for Pi. It decides whether and how to split work; the installed pi-subagents skill is the source of truth for APIs, roles, execution controls, and detailed recipes.
Before dispatching
- Read the installed
pi-subagents skill completely.
- Follow its router to the relevant reference: prompting/roles, execution controls, multi-lane orchestration, or constraints/recipes.
- Run
subagent({ action: "list" }) and use only executable, non-disabled, session-allowed agents; capability ceilings or allowlists can still reject a launch.
- Do not invent or restate runtime behavior when the installed documentation already defines it.
Decide whether to parallelize
Parallelize only when each lane has a distinct problem domain and can proceed without another lane's result or shared mutable state. Typical cases include unrelated bugs, independent subsystem reconnaissance, separate review angles, or local context plus external research.
Do not parallelize a coupled investigation, dependent sequence, overlapping source seam, or tasks that would edit the same state. Understand the shared root cause first.
Local invariants
- The parent Agent owns orchestration, synthesis, approval, and final acceptance.
- Use
workflowScript; use runs.all for independent lanes and runs.run for dependent stages, following the installed pi-subagents documentation.
- Use
fresh for independent lanes. Use fork only when inherited parent decisions are required and its documented session prerequisites are satisfied.
- For cross-repository work, name the repository, explicit
cwd, authority boundary, and expected output path.
- Before multiple mutation-capable lanes, record a lane board with
repo/cwd, authority, claimed files or contract, isolation path, validation gate, and handoff. One repo/cwd or worktree has one writer; concurrent mutation requires explicit worktree isolation.
- Planning or review output is evidence, not approval. A worker receives only the parent-approved
acceptedScope and must not infer extra fixes.
- Ordinary child agents do not launch more subagents. Escalate product, architecture, scope, authority, merge, release, or publication decisions to the parent.
- The parent reads every result, checks changed files and conflicts, runs relevant validation (preferably from a fresh context), and reports failures and residual risks honestly.
Minimal lane guidance
Use the narrowest role described by the installed pi-subagents documentation: local reconnaissance, external research, advisory decision review, read-only review, or approved implementation. Do not duplicate that role catalog here; read the official reference when choosing.
Use three standard shapes:
- Read-only fanout — independent scouts/reviewers answer distinct questions; parent synthesizes.
- Research fanout — local repository context and external primary-source research proceed independently; parent decides after comparing evidence.
- Staged implementation — parallel read-only planning → parent-approved
acceptedScope → one writer → parallel read-only validation.
Handoff and failure
Ask every child for a concise handoff containing: status, findings, changedFiles, validation, and remainingRisks. Use the installed pi-subagents artifact/output mechanisms for large reports instead of copying them into every prompt.
A partial failure remains a result: preserve successful independent lanes, report failed lanes, and continue only where safe. Do not silently discard failures or retry indefinitely.
This skill is locally maintained for Chasen's Pi setup. Keep it focused on local policy; consult the installed pi-subagents documentation rather than copying its API details here.
1---2name: parallel-agent3description: Use when 2 or more genuinely independent tasks can proceed concurrently without shared mutable state.4---56# Parallel Agent78This is a thin local policy layer for Pi. It decides **whether and how to split work**; the installed `pi-subagents` skill is the source of truth for APIs, roles, execution controls, and detailed recipes.910## Before dispatching11121. Read the installed `pi-subagents` skill completely.132. Follow its router to the relevant reference: prompting/roles, execution controls, multi-lane orchestration, or constraints/recipes.143. Run `subagent({ action: "list" })` and use only executable, non-disabled, session-allowed agents; capability ceilings or allowlists can still reject a launch.154. Do not invent or restate runtime behavior when the installed documentation already defines it.1617## Decide whether to parallelize1819Parallelize only when each lane has a distinct problem domain and can proceed without another lane's result or shared mutable state. Typical cases include unrelated bugs, independent subsystem reconnaissance, separate review angles, or local context plus external research.2021Do not parallelize a coupled investigation, dependent sequence, overlapping source seam, or tasks that would edit the same state. Understand the shared root cause first.2223## Local invariants2425- The parent Agent owns orchestration, synthesis, approval, and final acceptance.26- Use `workflowScript`; use `runs.all` for independent lanes and `runs.run` for dependent stages, following the installed `pi-subagents` documentation.27- Use `fresh` for independent lanes. Use `fork` only when inherited parent decisions are required and its documented session prerequisites are satisfied.28- For cross-repository work, name the repository, explicit `cwd`, authority boundary, and expected output path.29- Before multiple mutation-capable lanes, record a lane board with `repo/cwd`, authority, claimed files or contract, isolation path, validation gate, and handoff. One `repo/cwd` or worktree has one writer; concurrent mutation requires explicit worktree isolation.30- Planning or review output is evidence, not approval. A worker receives only the parent-approved `acceptedScope` and must not infer extra fixes.31- Ordinary child agents do not launch more subagents. Escalate product, architecture, scope, authority, merge, release, or publication decisions to the parent.32- The parent reads every result, checks changed files and conflicts, runs relevant validation (preferably from a fresh context), and reports failures and residual risks honestly.3334## Minimal lane guidance3536Use the narrowest role described by the installed `pi-subagents` documentation: local reconnaissance, external research, advisory decision review, read-only review, or approved implementation. Do not duplicate that role catalog here; read the official reference when choosing.3738Use three standard shapes:39401. **Read-only fanout** — independent scouts/reviewers answer distinct questions; parent synthesizes.412. **Research fanout** — local repository context and external primary-source research proceed independently; parent decides after comparing evidence.423. **Staged implementation** — parallel read-only planning → parent-approved `acceptedScope` → one writer → parallel read-only validation.4344## Handoff and failure4546Ask every child for a concise handoff containing: `status`, `findings`, `changedFiles`, `validation`, and `remainingRisks`. Use the installed `pi-subagents` artifact/output mechanisms for large reports instead of copying them into every prompt.4748A partial failure remains a result: preserve successful independent lanes, report failed lanes, and continue only where safe. Do not silently discard failures or retry indefinitely.4950This skill is locally maintained for Chasen's Pi setup. Keep it focused on local policy; consult the installed `pi-subagents` documentation rather than copying its API details here.