agent-docs
When to use
Use this skill when:
- Navigating the documentation structure to find relevant information
- Creating or updating agent documentation after changes
- Setting up documentation for a new module or package
- Understanding what documentation exists and where
Do NOT use when:
- Creating code or making technical changes (use coding skills)
- Looking for coding guidelines (use
guidelinesskill)
Documentation hierarchy
The documentation is organized in layers, from cross-project to module-specific:
Layer 1: `.augment/` — Cross-project (identical in all repos)
.augment/
├── rules/ ← Always-active rules (coding, docker, scope, language, etc.)
├── commands/ ← Slash commands (fix-ci, create-pr, quality-fix, etc.)
├── skills/ ← Reusable skill definitions (coder, code-refactoring, etc.)
├── contexts/ ← Shared contexts about the agent system itself
├── templates/ ← Templates for features, roadmaps, contexts
└── guidelines/ ← Coding guidelines by language
└── php/ ← PHP guidelines (controllers, eloquent, patterns, etc.)
Purpose: Universal agent behavior that applies to ALL projects and packages.
Language: English.
Key rule: This directory is identical across repos. Never add project-specific content here.
Templates are the single source of truth for document structure — never store templates in agents/.
Layer 2: `AGENTS.md` — Project-level entry point
Located in the project root. Contains:
- Project description and tech stack
- Development setup (Docker, env files, Makefile targets)
- Testing conventions
- Quality tool configuration
- Links to
./agents/for detailed docs
Purpose: First file an agent reads. Provides the full project context.
Not every project has this — packages may only have ./agents/.
Layer 3: `.github/copilot-instructions.md` — Coding standards
Located in .github/. Contains:
- Architecture rules
- PHP coding standards
- Naming conventions
- ORM & database rules (Laravel example: Eloquent)
- API development rules
Purpose: Coding standards shared with GitHub Copilot and other AI tools.
Not every project has this — check if it exists before referencing it.
Layer 4: `agents/overrides/` — Project-level overrides
agents/overrides/
├── rules/ ← Override .augment/rules/*.md
├── skills/ ← Override .augment/skills/*/SKILL.md
├── commands/ ← Override .augment/commands/*.md
├── guidelines/ ← Override .augment/guidelines/**/*.md
└── templates/ ← Override .augment/templates/*.md
Purpose: Project-specific customizations of shared .augment/ resources (which are delivered as a package).
Mechanism: Each override file has a Mode header — extend (additive) or replace (full swap).
Key rule: Never modify .augment/ directly — always use overrides for project-specific needs.
See: .augment/contexts/override-system.md for naming conventions and format.
Layer 5: `./agents/` — Project-specific documentation
agents/
├── database-setup.md ← DB architecture, connections, tenancy
├── testing.md ← Test suites, conventions, seeders
├── dto.md ← DTO patterns and base classes
├── services-and-repos.md ← Service layer conventions
├── overrides/ ← Project-level overrides (see Layer 4)
├── features/ ← Feature plans (project-wide)
│ └── {feature-name}.md
├── roadmaps/ ← Multi-step change plans
│ └── {roadmap-name}.md
│ └── current.md
└── contexts/ ← Context documents (codebase area snapshots)
└── {context-name}.md
Purpose: Project-specific architecture, conventions, and domain knowledge.
Structure rule: Structural docs directly in agents/, features/roadmaps in subdirectories.
Templates live in .augment/templates/, NOT in agents/ subdirectories.
Layer 6: `{module_root}/{Module}/{agent_folder}/` — Module-specific documentation
{module_root} comes from modules.root_paths and {agent_folder} from
modules.agent_folder in .agent-project-settings.yml. Discover via
scripts/_lib/agent_settings.ts::enumerate_modules(). Common shapes:
Laravel app/Modules/{Module}/agents/, Symfony src/Bundle/{Bundle}/agents/,
monorepo packages/{Pkg}/agents/.
{module_root}/{Module}/ ← e.g. app/Modules/ClientSoftware/
├── {agent_folder}/ ← e.g. agents/
│ ├── module-description.md
│ ├── features/ ← Module-scoped feature plans
│ │ └── {feature-name}.md
│ ├── roadmaps/ ← Module-scoped roadmaps
│ │ └── {roadmap-name}.md
│ └── contexts/ ← Module-scoped context documents
│ └── {context-name}.md
└── Docs/
└── technical-docs.md
Purpose: Documentation scoped to a specific module.
When to create: When a module has its own conventions, complex domain logic, or active roadmaps.
Layer 7: `Docs/` — Technical documentation
Docs/ ← Project-level technical docs
{module_root}/{Module}/Docs/ ← Module-level technical docs
Purpose: Technical documentation for humans (setup guides, architecture diagrams, API docs).
Difference from agents/: Docs/ is for human readers, agents/ is optimized for AI agents.
Layer 8: Package documentation
{package-root}/
├── agents/
│ ├── package-description.md
│ └── roadmaps/
└── AGENTS.md (optional)
Purpose: Same structure as projects, but for Composer packages.
Reading order
When starting work, read documentation in this order:
AGENTS.md(if it exists) — project overview.github/copilot-instructions.md(if it exists) — coding standardsagents/overrides/— check for project-level overrides of skills/rules/commands./agents/— project-specific docs relevant to the task{module_root}/{Module}/{agent_folder}/— if working on a module (resolved viamodules.root_paths+modules.agent_folder; Laravel:app/Modules/{Module}/agents/, Symfony:src/Bundle/{Bundle}/agents/, monorepo:packages/{Pkg}/agents/)agents/features/or module{agent_folder}/features/— if related feature plan existsagents/roadmaps/or module{agent_folder}/roadmaps/— if continuing existing work
Procedure: Create or update agent docs
- Identify trigger — What changed? (see table below)
- Locate target — Find the correct file in the documentation hierarchy.
- Update content — Edit or create the doc. English only in
.mdfiles. - Verify — Confirm the doc is consistent with surrounding files and cross-references are valid.
| Trigger | Action |
|---|---|
| New module created | Create {module_root}/{Module}/{agent_folder}/ with module description (Laravel example: app/Modules/{Module}/agents/) |
| Significant multi-step change | Ask user about creating a roadmap in agents/roadmaps/ |
| New convention introduced | Update relevant doc in ./agents/ or .augment/guidelines/ |
| Database schema changed | Update agents/reference/docs/database-setup.md |