Skip to content

Subagents

tmdgusya edited this page Apr 5, 2026 · 1 revision

Subagents

The extension includes a built-in subagent system that spawns pi CLI subprocesses (pi --mode json -p --no-session).

Agent Catalog

Exploration

Agent Description
explorer Fast codebase exploration and investigation (read-only)
planner Implementation planning and architecture design (read-only)

Execution

Agent Description
worker General purpose execution agent with full tool access
plan-compliance Pre-task compliance check — verifies predecessor outputs and file state
plan-worker Plan execution worker — follows plan steps, writes code, runs tests, commits
plan-validator Independent plan task validator — judges codebase against task goals under information barrier

Reviewers (Ultraplan)

Agent Perspective
reviewer-feasibility Technical viability, effort estimation, spike candidates
reviewer-architecture Interfaces, data flow, incremental deliverability
reviewer-risk Integration risk, ambiguity, regressions, recovery cost
reviewer-dependency Ordering constraints, file conflicts, parallelization
reviewer-user-value Delivery ordering, demo-ability, abort points

Cleanup

Agent Description
slop-cleaner Post-execution cleanup — removes LLM-specific patterns while preserving behavior

Agent Discovery

Agents are .md files with YAML frontmatter:

---
name: scout
description: Fast reconnaissance agent
model: haiku
tools: read,glob,grep
---
You are a fast scout agent.

Locations:

  • User agents: ~/.pi/agent/agents/*.md
  • Project agents: .pi/agents/*.md (overrides user agents)
  • Bundled agents: shipped with the extension

Discipline Injection

worker and plan-worker agents automatically receive Karpathy Rules — behavioral guardrails that enforce surgical changes, assumption verification, and scope discipline.

After successful worker or plan-worker runs, the slop-cleaner is automatically spawned to clean up AI-generated code smells.

Information Barrier (plan-validator)

The plan-validator agent operates under an information barrier:

  • It never sees the execution context
  • Its prompt is built directly from the plan file, not from the LLM-composed task
  • This ensures independent, unbiased validation

Clone this wiki locally