@jerryan/pi-subagent-tools

extensionmaintained

Minimal pi extension: delegate, review, and explore via isolated subagent processes

by · v0.1.1 · published 1mo ago

$ pi install npm:@jerryan/pi-subagent-tools
downloads/mo
71
stars
0
last push
1mo ago
open issues
0

Signals

license: MITtestspi manifest: missinginstall size: —deps: 0peer deps: 0

Download trend

No downloads in the last 12 weeks.

README

@jerryan/pi-subagent-tools

A minimal pi extension for delegating work to isolated subagent processes. Three tools, one job each. The agent is a project manager — delegate by default, dive in only when necessary.

What makes this different?

Every subagent is a fresh pi process with an isolated context window. No agent definitions to write, no configuration files to maintain, no mode-switching parameters to misconfigure. Each tool's name is the contract:

  • review — always read-only, always in the current project. You can't forget to lock it down.
  • explore — always read-only, requires a target directory. Picks up the target project's settings, skills, and context.
  • delegate — general-purpose worker. Inherits the parent's tools and system prompt for optimal cache reuse. Optional CWD and skills.

Installation

pi install npm:@jerryan/pi-subagent-tools

The extension is available the next time you start a pi session.

Tools

review

Review code, diffs, or files in the current project. The reviewer is always read-only — it cannot modify files or execute commands.

ParameterTypeRequiredDescription
taskstringYesWhat to review
skillsstring[]NoSkills to load via --skill

explore

Map a project directory. The explorer runs in the target directory, picking up its .pi/settings.json, skills, AGENTS.md, and other context files. Always read-only.

ParameterTypeRequiredDescription
taskstringYesWhat to explore
cwdstringYesTarget project directory
skillsstring[]NoSkills to load via --skill

delegate

General-purpose worker. No tool filtering, no system prompt override — the subagent inherits the parent's full environment, enabling cache hits when used with context inheritance (future).

ParameterTypeRequiredDescription
taskstringYesTask to delegate
cwdstringNoWorking directory (defaults to parent's CWD)
skillsstring[]NoSkills to load via --skill
context"fresh" | "inherit"NoContext mode (not yet implemented)

Recursion guard

Subagents cannot spawn further subagents beyond one level:

Parent rolereviewexploredelegate
Parent (normal)
Delegate childRejects at runtime
Review / explore child

Related

  • pi-subagents — Feature-rich implementation with agent definitions, background runs, session forking, inter-process communication, and a full management UI. The definitive reference for what's possible, though possibly more than most workflows need.
  • pi-subagent-lite — Ultra-minimal (~250 lines). A single task tool with minimal context overhead.

License

MIT