Agent Doc Stack is a lightweight, agent-first documentation architecture that defines where truth lives and how coding agents generate, update, and enforce docs with minimal tokens and zero drift.
This repository contains the Agent Doc Stack v1.0 specification and a single initialization prompt used to apply the framework to any codebase.
Agent Doc Stack is a contract-based documentation specification for AI-assisted software development.
It defines:
- Canonical documentation locations
- Strict rules for how agents read, write, and update docs
- Writing standards optimized for token efficiency
- Enforcement rules to prevent documentation drift
This is a specification, not a template or a tool.
It works across modern coding agents including Claude Code, Codex CLI, Cursor, and Copilot Agent.
Agent Doc Stack standardizes documentation into a small, predictable set of files.
README.md
ARCHITECTURE.md
docs/
app-workflows.md
dev-workflows.md
agent-tools.md # optional (MCP / tool access)
features/
_template.md
<feature>.md
AGENTS.md
CLAUDE.md
plans/
_template.md
YYYY-MM-DD-short-title.md
Each file has a single, well-defined responsibility.
Agents are explicitly instructed where to read, write, and update documentation as code changes.
This repository includes:
The authoritative Agent Doc Stack v1.0 specification.
A reusable prompt that instructs a coding agent to initialize or normalize documentation in a repository using the spec.
You should already be inside the repository whose documentation you want to create or fix.
Typical workflow:
- Open the target repository in your coding agent.
- Run the
initialization-prompt.md. - Allow the agent to fetch and read the Agent Doc Stack specification directly from GitHub.
- Answer clarifying questions if the agent requests missing information.
The agent will:
- Treat the current folder as the repository root
- Follow the Agent Doc Stack rules exactly
- Generate, update, or clean documentation without inventing behavior
- Ask questions when information is unclear or unavailable
You do not need to copy this repository into your project.
The canonical framework lives in:
agent-doc-stack.md
All structure, rules, and behavior are defined there.
This file is the single source of truth.
As coding agents take on more responsibility, documentation must be:
- Predictable
- Enforceable
- Low-noise
- Safe from hallucination and drift
Agent Doc Stack treats documentation as a system contract, not prose.
Agent Doc Stack follows semantic versioning.
- The current version is defined in
agent-doc-stack.md - Patch releases clarify wording without changing behavior
- Minor releases may add rules while remaining backward compatible
- Major releases may introduce breaking changes
Repositories that require strict stability should pin behavior to a specific version.