// Automatically invoked when user wants to create or update project documentation (README.md, CLAUDE.md, AGENTS.md). Triggers include document project, create docs, update docs, setup documentation, generate README, create AGENTS.md. Creates token-efficient documentation structure with business-focused README (overview, business model, differentiators, roadmap), minimal CLAUDE.md entry point, and comprehensive AGENTS.md technical guidelines. Orchestrates 3-4 parallel Explore agents to analyze codebase patterns, naming conventions, antipatterns, and project structure. Generates compact directory trees in Quick Reference instead of verbose architecture sections. Checks for existing documentation first and uses as base for updates. Idempotent and safe for multiple runs.
| name | docs-for-agents |
| description | Automatically invoked when user wants to create or update project documentation (README.md, CLAUDE.md, AGENTS.md). Triggers include document project, create docs, update docs, setup documentation, generate README, create AGENTS.md. Creates token-efficient documentation structure with business-focused README (overview, business model, differentiators, roadmap), minimal CLAUDE.md entry point, and comprehensive AGENTS.md technical guidelines. Orchestrates 3-4 parallel Explore agents to analyze codebase patterns, naming conventions, antipatterns, and project structure. Generates compact directory trees in Quick Reference instead of verbose architecture sections. Checks for existing documentation first and uses as base for updates. Idempotent and safe for multiple runs. |
Creates or updates comprehensive project documentation with token-efficient structure optimized for Claude Code agents.
Generates three core documentation files:
Before any analysis:
README.md exists → read and use as base if presentCLAUDE.md exists → preserve references if presentAGENTS.md exists → use structure as foundation if presentDetermine operation mode:
Inform user which mode is active before proceeding.
If README.md exists:
If README.md missing:
README.md Focus:
Deploy 3 Explore agents (medium thoroughness) in parallel using Task tool.
Agent prompts: See agent-prompts.md for detailed instructions for each agent:
Each agent receives:
agent-prompts.mdCreate/Update only these files:
NO additional directories - all technical information consolidated into AGENTS.md
Documentation templates: See templates/ directory for complete templates:
templates/CLAUDE.md - Minimal entry point structuretemplates/AGENTS.md - Complete technical guidelines structuretemplates/README.md - Business-focused documentation structureFollow all templates closely to ensure consistency and token efficiency.
Key points:
@README.md and @AGENTS.md syntax for file referencesApply these principles:
When updating existing documentation:
Verify:
Provide summary: