name: docs-setup description: Initializes and manages the project's documentation structure. Follows the "in‑repository knowledge store" pattern, using AGENTS.md as the map and docs/ as the system of record. Use for project docs initialization, design docs, and product specs. argument-hint: "[init | add-design-doc | add-spec | sync]"
Project Documentation Structure Management Skill
Core Principles
This skill follows the principle of progressive disclosure:
- •
AGENTS.mdacts as a map, not an encyclopedia - •It is designed so that agents can discover detailed information themselves
- •All detailed content is organized under the
docs/directory
Commands
init — Initialize documentation structure
Creates the full documentation structure in the project root.
- •Inspect the existing project structure (package.json, go.mod, Cargo.toml, etc.)
- •Create the following directory tree:
code
AGENTS.md ARCHITECTURE.md docs/ ├── design-docs/ │ ├── index.md │ └── core-beliefs.md ├── product-specs/ │ └── index.md ├── references/ ├── DESIGN.md ├── FRONTEND.md ├── PLANS.md
- •Populate each file with initial content tailored to the project context
- •Use this skill's
templates/directory as the source of templates
Important: Do not overwrite existing files. Only create missing ones.
add-design-doc <title> — Add a design document
- •Create a new design doc under
docs/design-docs/ - •Convert the title to kebab‑case for the filename (e.g. "User authentication flow" →
user-auth-flow.md) - •Add an entry to
docs/design-docs/index.md - •Start the status as
draft - •Template: templates/design-doc.md
add-spec <title> — Add a product spec
- •Create a new spec under
docs/product-specs/ - •Add an entry to
docs/product-specs/index.md - •Template: templates/product-spec.md
sync — Verify documentation consistency
- •Check that all links in
AGENTS.mdpoint to real files - •Ensure
docs/design-docs/index.mdlists all existing design docs - •Report broken links and inconsistencies
AGENTS.md authoring guidelines
AGENTS.md is the main entry point for agents. Follow these rules:
- •Keep it short: Under 500 lines. Link out to details.
- •Act as a map: Focus on "what lives where".
- •Required sections:
- •Project overview (2–3 sentences)
- •Tech stack
- •Directory structure summary
- •Documentation navigation (links to files under
docs/) - •Core rules (≤ 5 invariant rules)
- •Avoid: Implementation details, full API references, long code examples
ARCHITECTURE.md authoring guidelines
- •Describe the system's domains and package/layer structure
- •Clearly document dependency directions and boundaries
- •Prefer ASCII diagrams or Mermaid syntax for visuals
- •Summarize each major module's responsibility in 1–2 sentences
Additional resources
- •Templates for each document type: see the templates/ directory
- •Good examples: see the examples/ directory