initial commit

This commit is contained in:
2026-05-11 17:20:02 -04:00
commit 9956b65e17
9 changed files with 5199 additions and 0 deletions

31
README.md Normal file
View File

@@ -0,0 +1,31 @@
# pi-subagents
Pi extension that registers a `subagent` tool. Subagents are defined by markdown prompts in `prompts/*.md`.
## Prompt format
```md
---
name: scout
description: Fast codebase reconnaissance
approved_tools:
- read
- bash
---
System prompt for the subagent goes here.
```
- `approved_tools` / `allowed_tools` is whitelist mode: the subagent receives only those tools.
- `denied_tools` is blacklist mode: the subagent inherits currently active tools except those tools and `subagent` itself.
- Do not define whitelist and blacklist fields together; the extension rejects ambiguous configs.
## Tool usage
```json
{
"agent": "scout",
"task": "Find where authentication middleware is registered"
}
```
The extension spawns an isolated `pi --mode json -p --no-session` subprocess with the prompt appended as system instructions and `--tools` set to the resolved tool list.