# Subagent Authority And Safety

Subagents are off by default. Use them only when **both** conditions are true:

1. The user explicitly asks for subagents or parallel agent work for the current
   task. A request to audit, review, be thorough, or work faster is not consent.
2. The current host/runtime permissions allow subagents. Tool availability alone
   is not permission; system, developer, repository, and user rules still apply.

If either condition is absent, **do not use subagents**. Do the work in the lead
agent. When both conditions are satisfied, follow every rule below before
creating a worker.

## Required Rules

- **At most three.** Create no more than three child agents for the task, and
  use fewer whenever one agent can do the work adequately.
- **One level only.** Subagents **must not spawn** subagents or delegate further.
  The lead agent is the only agent allowed to create and coordinate workers.
- **Bound every assignment.** Give each child one concrete, independent task;
  avoid duplicate searches and overlapping write ownership.
- **Tracking branches for parallel writers.** Before fan-out, the lead calls
  `prd_open_tracking_branch` once per worker and commits the separate files under
  `.prd_plugin/state/tracking-branches/`. Each worker calls only
  `prd_update_tracking_branch` on its assigned `DBR-*`; it never edits canonical
  state or `.prd_plugin/ids/registry.json`. After worker branches are merged, the
  lead calls `prd_promote_tracking_branch` serially. Canonical state promotion and
  ID allocation remain single-writer and duplicate-safe. Launch each worker with
  `PRD_WORKER_SESSION=1`, `PRD_TRACKING_BRANCH_ID=<DBR-*>`, and
  `PRD_TRACKING_BRANCH_OWNER=<owner>` so the runtime enforces the assignment.
- **Isolate parallel file edits.** Give each agent its own git worktree, or
  partition the work so no two agents touch the same files, then merge back
  through the lead. See `project-git-workflow` for worktree discipline.
- **Spawned worker sessions must opt out of the stop guard.** Headless child
  sessions (`claude -p` workers, advisor consults) inherit the repo's Stop hooks;
  set `PRD_STOP_GUARD=off` alongside `PRD_WORKER_SESSION=1`,
  `PRD_TRACKING_BRANCH_ID`, and `PRD_TRACKING_BRANCH_OWNER` in the child
  environment. The first prevents goal conscription; the remaining variables
  enforce the assigned tracking branch and canonical-state boundary.
- **Every agent inherits the floor.** Subagents are bound by the same consent
  floor, grounding, no-timescale, test-first, and verification rules as the lead.
  Parallelism never skips a gate or authorizes push, merge, force-push, publish,
  other-repo edits, or secret commits beyond the governing autonomy policy.
- **The method still applies.** Team work is still tracked through durable IDs,
  verified with current evidence before completion, and closed through the same
  configured project workflow.
