Imported from zhongjis/pi-config (
modes/AGENTS.md). Install upstream withnpx skills add zhongjis/pi-config --skill modes. Copyright stays with the author.
Purpose
Mode Agent prompts, model-family variants, and active-mode skills.
Ownership
- README.md owns prompt construction.
- This document owns shared mode docs and runtime links.
- MODEL-FAMILIES.md owns the rationale for matching prompt style to model family.
- Children own their family prompts, variants, skills, and supporting assets.
- The active mode set is
kuafu,fuxi, andhoutu. - Runtime discovery and switching belong to ../extensions/modes/.
Local Contracts
- You MUST follow frontmatter semantics.
mode.mdsupplies frontmatter and the default body.- Kua Fu/Hou Tu
tools:MUST grantimagegen; Fu Xi MUST NOT: generation writes files and spends subscription quota. - Mode
tools:MUST start from+@alland subtract only tools the model can reach on its own. MUST NOT subtract command-gated tools, which an extension activates only from a user command. - Kua Fu/Hou Tu
tools:MUST grantagent_graph,get_agent_result, andresolve_agent_graph_gate; Fu Xi MUST NOT grantagent_graphorresolve_agent_graph_gate. Existing delegation and role restrictions still apply. - Kua Fu/Hou Tu MUST allow
wenchang,chengfengandsimaqiandelegation so saved agent graphs that use them pass graph delegation preflight. - Mode model fallback chains MUST use
cliproxyapiinstead ofopenai-codexfor Codex models. gpt.mdreplaces only the body; it MUST be self-contained.- Absent GPT variants inherit the default body.
gemini.mdis a body-only corrective overlay on the default.- Kua Fu/Hou Tu default, GPT, and Gemini routing prose MUST match model-visible descriptions in
agents/*.md. - Preserve the general/complex worker distinction owned by Jintong and Juling across both families; their prompts own the evidence-based routing boundary.
- Kua Fu/Hou Tu MAY delegate standalone prose to Cangjie; Fu Xi owns plan prose and MUST NOT delegate to Cangjie.
- Runtime discovers only the active mode's existing skills; bodies load on demand.
- Kua Fu/Hou Tu families MUST assign workers focused regression and file-local lint/format; parent owns package/global integration after relevant writers finish. Checks sharing mutable databases MUST NOT overlap without established isolation.
- Parent MUST read changed files, review the full applicable diff, and inspect actual command/scope/output/exit status, NEVER summaries alone. Evidence is reusable only while relevant source/dependencies/configuration/environment/external state remain valid.
- Parent MUST obtain appropriate final executable integration evidence for combined changes; worker passes alone are insufficient. Run missing, invalidated, diagnostic, or explicitly required checks, NEVER delegation/phase-only repetitions; repairs invalidate affected previously passing checks.
- Parent QA MUST cover changed user-visible surfaces and affected interactions; valid parent QA/integration evidence MAY be reused.
- Future push hooks MUST NOT approve earlier completion; verification NEVER authorizes pushing.
Work Guidance
- You MUST audit final injected prompts, not source files alone.
- You MUST preserve prompt audit requirements.
- Prompt audits MUST preserve behavior unless a concrete issue or explicitly approved behavior change justifies alteration; deduplication MUST preserve mandated workflows.
Verification
- Family coverage:
pnpm exec vitest run --project unit extensions/modes/test/config-loader.test.ts. - Runtime-sensitive edits:
pnpm exec vitest run --project integration test/integration/modes.integration.test.ts.
Child DOX Index
- fuxi/AGENTS.md — thin planner prompts and authoritative planning skill.
- kuafu/AGENTS.md — build-orchestrator family maintenance and authorization contracts.
- houtu/AGENTS.md — approved-plan execution family maintenance and completion gates.
