Skip to content

The role pack

sb ships the pi-herdr-agents roles its agents run as: worker, scout, planner, reviewer, visual-tester, and adversarial-reviewer, in roles/. A fifth extension entry, src/rolepack.ts, registers that folder on pi-herdr-agents’ discovery event (pi-herdr-subagents:roles:discover:v1, API version 1) in every pi, subagents included, and drops it at session_shutdown. pi-herdr-roles carries the same names, so the two would collide and pi-herdr-agents would disable those roles: uninstall it. A global (~/.pi/agent/agents/) or project role of the same name still wins over the pack.

Each role’s tools: line becomes the child’s tool allowlist. worker and adversarial-reviewer have none and run with every tool. /boss roles-check [folder] compares every listed name with the tools of the session it runs in, plus caller_ping and subagent_done, which only a child has. A name the session lacks fails, and so does a name only a parent has: sb’s own tools (PARENT_ONLY in src/tools.ts, all registered outside a child) and pi-herdr-agents’ worktree_list and worktree_remove. It reads sb’s own roles/ by default, starts no process, and refuses in a session started with --tools or --exclude-tools, whose tool list is narrowed.