Parallel Subagent Dispatch
Goal
Dispatch early when an ordinary package is clear, bounded, non-trivial, matched to an available specialist, and permitted by the current adapter, or when a ready formal Agent-owned package requires its exact owner. Do not turn ordinary work into orchestration overhead. ROSE retains integration and final-verdict ownership.
Reference
Use references/agent-selection-matrix.md as the single shared aili-agent-selection/v1 source for assignment-shape classification and canonical role selection. Adapters own the mapping from a canonical Role ID to a runtime selector.
Trigger
Run this proactive delegation scan at the start of each non-trivial intent and again when changed evidence creates a new work split, and dispatch before duplicating the assignment directly when all ordinary specialist-preferred conditions hold: the package is clear and bounded, non-trivial, matches an available narrow specialist, and current permissions/capabilities permit it. Work directly only for trivial work, contract clarification or splitting, no matching specialist, permission/capability failure, overlapping ownership, or concrete negative benefit. Multi-file shape alone is not a dispatch reason.
Every dispatch operation must pass this benefit decision independently. A prior failure, partial result, empty result, or desire to continue is not by itself a reason to dispatch another operation.
For ordinary work, first classify the assignment shape and required capability, then select the narrowest matching canonical role from the matrix. Complexity, file count, and lifecycle phase alone neither require dispatch nor justify a broader role. A ready formal Agent-owned package is different: its declared canonical role is exact and does not pass through a new ordinary benefit decision.
Parallelism
- Choose concurrency from independent non-overlapping units, concrete benefit, suitable owners, and an explicit join plan; no fixed default count.
- Launch ready independent lanes together in the same Task message when the current adapter maps
subagent.dispatch to Task; otherwise use its equivalent single dispatch batch rather than serializing them.
- Parallel units must not edit the same files or depend on each other's output.
- If work overlaps or has a dependency, run it sequentially or keep it direct.
- Do not automatically add review, test, security, or coverage agents after implementation.
Work-package lifecycle
- One bounded work package has one declared canonical role, assignment, scope, forbidden scope, permission boundary, acceptance boundary, write scope, expected result, expected evidence, and terminal disposition.
- An adapter may realize a package with a fresh one-shot task or a persistent Agent identity. A persistent adapter may continue only while every package-defining field remains unchanged.
- A new requirement or package, expanded scope, material correction, different role or permissions, different write scope, changed acceptance boundary, or different verification claim requires a new dispatch or job.
- The current OpenCode Task adapter remains one-shot: each Task context is fresh and terminal, and an old
task_id is never resumed. This adapter behavior is not a universal shared-session requirement.
- Do not automatically retry after a failed, empty, blocked, or partial result; ROSE handles the bounded gap directly or reports the blocker.
- Subagents never nest or delegate. ROSE retains lifecycle, approval, integration, reconciliation, and final-verdict ownership.
Canonical packet protocol
Use .agents/skills/aili-delivery-flow/references/protocols/subagent-task-packet.md as the single source for exact packet fields and rules. Do not restate or maintain a local field schema in this skill.
Keep each packet bounded to the independently justified assignment. A packet narrows scope; it never expands effective permissions. Every subagent remains non-delegating.
For a formal package, copy its Package ID and exact canonical Role ID into the packet. general is not a canonical specialist and cannot own a formal package.
For A33, a packet/result carries one compact WT-001 reference for one declared repository/cwd. It never duplicates or rebinds root, key, identity, Git, approval, operation, risk, delta, rule, command/cwd, or containment authority. Target rules are re-read at dispatch, can only narrow, and same-level conflicts block. Artifacts stay with the owning target repository.
Canonical result protocol
Use .agents/skills/aili-delivery-flow/references/protocols/subagent-result.md as the single source for exact terminal result and finding fields. Do not restate or maintain a local result schema in this skill.
ROSE checks the canonical result evidence, resolves conflicts, and owns the lifecycle, integration, and final decision. Missing or empty evidence is not completion and does not authorize resume or an automatic fresh-session retry.
Stop
Do not dispatch when permission, scope, ownership, or independence is unclear. Ask the user only when the missing answer changes the task or authorization.