Imported from zhongjis/pi-config (
agents/AGENTS.md). Install upstream withnpx skills add zhongjis/pi-config --skill agents. Copyright stays with the author.
Purpose
Callable Subagent definitions and their bounded delegation contracts.
Ownership
- This document owns all agent definitions in this directory.
- Mode Agent prompts belong to ../modes/.
- Runtime loading and enforcement belong to ../extensions/subagents/.
Local Contracts
- You MUST follow the frontmatter guide.
- You MUST preserve role boundaries in the orchestration guide.
- You MUST align tool allowlists with each agent's stated role.
- Read-only consultants MUST NOT receive mutating tools; bash requires runtime guarding.
allow_nestingon a Subagent enables onlydelegate_research; itsallow_delegation_toMUST list read-only research Subagents (ADR 0007).extensions:MUST list only extensions that provide the agent's tools or shape them: the bash stack (better-bash-tool,rtk,direnv) for agents withbash,filter-outputsfor every agent with tools, andprofilesfor agents with external research tools. NEVER list the runner-injectedsmart-tool-guards,session-local, orfast.tools:MUST start from+@all; its built-in line grants only the needed built-in tools, e.g.-@builtin, +read, +bashfor read-only agents.- Mode frontmatter, not guide tables, authorizes mode-scoped delegation.
- Custom Subagents MUST use
prompt_mode: system_instructionsto inherit global/project AGENTS.md without parent identity, subject to runtime isolation. - Frontmatter
descriptionis model-visible routing text; it MUST state the same duty boundary as the prompt body. - Kua Fu/Hou Tu routing prose MUST remain consistent with callable-agent descriptions.
- Model fallback chains MUST use
cliproxyapiinstead ofopenai-codexfor Codex models.
Work Guidance
- You SHOULD keep routing descriptions specific to worker capability.
- Preserve Jintong's general-worker boundary and Juling's complex-worker boundary; their prompts own evidence-based routing and implementation duties.
- Worker outcomes MUST be
COMPLETED,PARTIAL, orBLOCKED; a wrap-up request or exhausted budget before the task's acceptance checks pass yieldsPARTIALwith a last-green anchor. Packet sizing and interruption handling belong to mode prompts and the subagents extension; worker prompts MUST NOT restate them. - You MUST preserve orchestrator-owned verification and final acceptance. Kua Fu's gate-review finish gate assigns Spec review to
direnjieand Standards review totaishangthrough their diff-review paragraphs; both advise and never edit. Jintong's prompt owns outcome-based test selection and smaller-alternative escalation without weakening mandated acceptance or safety checks. - Huayan is a read-only screenshot-grounded UI reviewer; Yunu owns fixes, visual-context use and the visual QA handoff. The orchestrator retains browser QA, code-quality review, and acceptance.
Verification
- You MUST use the frontmatter guide's verification checklist after definition edits.
- Agent definition loading coverage:
pnpm exec vitest run --project unit extensions/subagents/test/tool-scope-golden.test.ts.
Child DOX Index
- None; this document owns all definitions and remaining files here.
