# Context: Robust Pi subagent workflow for Nimrod

## Source Ticket

- `tickets/active/2026-06-03-robust-pi-subagents.md`

## Goal

Create a robust subagent mechanism for Nimrod/QRSPI work so specialized agents run with isolated context instead of relying only on role-pass discipline inside one conversation.

## Why

The current conversation is already accumulating context. The user correctly identified that true subagent isolation is a major part of QRSPI-style context management.

## Known Facts

- Pi supports project-local extensions under `.pi/extensions/`.
- Pi supports custom tools and slash commands from extensions.
- Pi's documentation says Pi skips built-in subagents by default.
- Pi's examples include `examples/extensions/subagent/`, which spawns separate `pi` subprocesses using JSON mode.
- Nimrod already has QRSPI adaptation docs and artifact templates.

## Constraints

- Use project-local extensions for Nimrod-specific behavior.
- Avoid changing Pi internals.
- Prefer a safe MVP before write-capable worker agents.
- Keep durable artifacts in `tickets/artifacts/<ticket-id>/`.
- Require confirmation for project-local agent prompts/tooling when appropriate.

## Acceptance Criteria

- We can run at least scout/research/planner/reviewer-style isolated agents for Nimrod work.
- Main conversation receives compressed markdown results, not every explored detail.
- Outputs can be written into QRSPI artifacts.
- Safety boundaries are documented.
