Doc Architect
Design and generate a portable Triple-Layer AGENTS.md documentation set that reflects the project’s real structure and constraints.
Modularize Instructions (Token Economy): Avoid consolidating all AI/dev guidance into a single CLAUDE.md. Prefer smaller, focused docs (e.g., docs/setup.md, docs/api.md, docs/workflows.md) and reference them only when needed.
Core Outcome
Produce three aligned AGENTS.md files:
- Root AGENTS.md: Project identity, tech stack, global standards
- Data AGENTS.md: Data integrity rules and schema governance
- Planning AGENTS.md: Spec-driven development workflow
Trigger Phrases
The skill should activate when the user asks to:
- Standardize project documentation
- Generate agent files
Standard Operating Procedure (SOP)
Scan the workspace
- Inspect the root for identifiers (README, PROJECT_BRIEF, TECH_STACK, ARCHITECTURE, CLAUDE, package.json, composer.json, *.sln, pyproject.toml).
- Locate likely data directories (database/, schema/, migrations/, sql/, db/).
- Locate planning/documentation directories (docs/, docs/plans/, planning/, specs/).
- Identify module/area entry points (menus, docs, feature folders) to group specs.
Identify the environment
- Determine primary language (PHP/C#/Python or other).
- Determine DB type (MySQL/PostgreSQL/SQLite/SQL Server/other).
- Determine deployment environment (Docker/Kubernetes/shared hosting/cloud).
Set up plan grouping (first-time)
- Create
docs/plans/<module>/ subdirectories for each discovered module/area.
- Update
docs/plans/AGENTS.md with the current module list.
- Keep
docs/plans/AGENTS.md updated whenever plans are added or their status changes.
- Maintain a folder map at the top of
docs/plans/AGENTS.md and update it when requested.
- Note that developers can add new folders and update the list manually.
Generate Triple-Layer docs
- Use the templates in templates/root-agents.md.template, templates/data-agents.md.template, and templates/plan-agents.md.template.
- Populate with real findings and pull constraints from references/logic-library.md as needed.
- Create files at:
- Root: AGENTS.md at project root
- Data: database/schema/AGENTS.md (or best-fit schema directory)
- Planning: docs/plans/AGENTS.md (or best-fit planning directory)
Bundled Resources
- protocols/workflow.md: 3-step workflow used during generation
- templates/root-agents.md.template: Root AGENTS.md template
- templates/data-agents.md.template: Data AGENTS.md template
- templates/plan-agents.md.template: Planning AGENTS.md template
- references/logic-library.md: Domain constraint library for reuse
Common Pitfalls
- Do not invent tech stacks. Only infer from files found in the workspace.
- Do not place AGENTS.md in arbitrary locations; follow the best-fit paths above.
- Do not include contradictory rules across the three layers.
Quick Example
If a project uses Laravel + MySQL with docs/plans and database/schema:
- Root: AGENTS.md → PHP/Laravel, MySQL, deployment standards
- Data: database/schema/AGENTS.md → referential integrity, no-delete rules
- Plans: docs/plans/AGENTS.md → spec.md format and workflow steps
1---2name: doc-architect-43description: Generate Triple-Layer AGENTS.md documentation by scanning a project for its tech stack, data directory, and planning directory. Use when the user asks to standardize project documentation, generate agent files, or create AGENTS.md guides.4---56# Doc Architect78Design and generate a portable Triple-Layer AGENTS.md documentation set that reflects the project’s real structure and constraints.910**Modularize Instructions (Token Economy):** Avoid consolidating all AI/dev guidance into a single CLAUDE.md. Prefer smaller, focused docs (e.g., docs/setup.md, docs/api.md, docs/workflows.md) and reference them only when needed.1112## Core Outcome1314Produce three aligned AGENTS.md files:1516- **Root AGENTS.md**: Project identity, tech stack, global standards17- **Data AGENTS.md**: Data integrity rules and schema governance18- **Planning AGENTS.md**: Spec-driven development workflow1920## Trigger Phrases2122The skill should activate when the user asks to:2324- Standardize project documentation25- Generate agent files2627## Standard Operating Procedure (SOP)28291. **Scan the workspace**30 - Inspect the root for identifiers (README, PROJECT_BRIEF, TECH_STACK, ARCHITECTURE, CLAUDE, package.json, composer.json, \*.sln, pyproject.toml).31 - Locate likely data directories (database/, schema/, migrations/, sql/, db/).32 - Locate planning/documentation directories (docs/, docs/plans/, planning/, specs/).33 - Identify module/area entry points (menus, docs, feature folders) to group specs.34352. **Identify the environment**36 - Determine primary language (PHP/C#/Python or other).37 - Determine DB type (MySQL/PostgreSQL/SQLite/SQL Server/other).38 - Determine deployment environment (Docker/Kubernetes/shared hosting/cloud).39403. **Set up plan grouping (first-time)**41 - Create `docs/plans/<module>/` subdirectories for each discovered module/area.42 - Update `docs/plans/AGENTS.md` with the current module list.43 - Keep `docs/plans/AGENTS.md` updated whenever plans are added or their status changes.44 - Maintain a folder map at the top of `docs/plans/AGENTS.md` and update it when requested.45 - Note that developers can add new folders and update the list manually.46474. **Generate Triple-Layer docs**48 - Use the templates in [templates/root-agents.md.template](templates/root-agents.md.template), [templates/data-agents.md.template](templates/data-agents.md.template), and [templates/plan-agents.md.template](templates/plan-agents.md.template).49 - Populate with real findings and pull constraints from [references/logic-library.md](references/logic-library.md) as needed.50 - Create files at:51 - **Root**: AGENTS.md at project root52 - **Data**: database/schema/AGENTS.md (or best-fit schema directory)53 - **Planning**: docs/plans/AGENTS.md (or best-fit planning directory)5455## Bundled Resources5657- [protocols/workflow.md](protocols/workflow.md): 3-step workflow used during generation58- [templates/root-agents.md.template](templates/root-agents.md.template): Root AGENTS.md template59- [templates/data-agents.md.template](templates/data-agents.md.template): Data AGENTS.md template60- [templates/plan-agents.md.template](templates/plan-agents.md.template): Planning AGENTS.md template61- [references/logic-library.md](references/logic-library.md): Domain constraint library for reuse6263## Common Pitfalls6465- Do not invent tech stacks. Only infer from files found in the workspace.66- Do not place AGENTS.md in arbitrary locations; follow the best-fit paths above.67- Do not include contradictory rules across the three layers.6869## Quick Example7071If a project uses Laravel + MySQL with docs/plans and database/schema:7273- Root: AGENTS.md → PHP/Laravel, MySQL, deployment standards74- Data: database/schema/AGENTS.md → referential integrity, no-delete rules75- Plans: docs/plans/AGENTS.md → spec.md format and workflow steps