1-documentation — Claude Code rule for Markdown docs
The 1-documentation rule guides edits to project Markdown: it keeps decisions and useful commands while removing repetition and temporary records. It applies to selected files and folders.
MIT ★ 571 updated 2026-10-29
.claude/rules/1-documentation.mdWhat 1-documentation does
The rule covers README files, architecture documents, guides, and memory files at its configured paths. It asks the agent to edit lasting Markdown files individually, explain a project’s purpose, usage, and limits, and describe architecture through components, boundaries, flows, and invariants.
Edits should retain contracts, decisions and their rationale, procedures, linked anchors, and generator markers. The rule calls for trimming repeated material, narrated history, temporary evidence, and measured figures; diagrams can show relationships. It explicitly says not to invent performance requirements. For Claude Code, place the file at .claude/rules/1-documentation.md; other platforms use their own paths.
What it helps with
- trim a README while retaining its purpose and limits
- describe system components, boundaries, and flows
- remove repetition and temporary notes from project docs
- keep verification commands and links to canonical sources
Example prompts for the agent
- Revise
README.mdunder the documentation rule; retain its purpose, usage examples, and limits. - Reshape
ARCHITECTURE.mdto explain the components, boundaries, flows, and invariants. - Edit
docs/setup.md, keeping verification commands and linked anchors while removing temporary notes.
How to install 1-documentation
Manually: put the files in place
.claude/rules/1-documentation.mdThe paths frontmatter field limits the files
AGENTS.md
Codex reads AGENTS.md: paste the rule text there
Manually: put the files in place
.cursor/rules/1-documentation.mdcFrontmatter: description, globs, alwaysApply
Manually: put the files in place
.github/instructions/1-documentation.instructions.mdThe applyTo field sets which files it applies to
Manually: put the files in place
.devin/rules/1-documentation.mdManually: put the files in place
.clinerules/1-documentation.mdStep by step, with commands for each platform: AGENTS.md vs CLAUDE.md: what they are and which one to use
Questions about 1-documentation
How do I install 1-documentation in Claude Code?
Add the rule file at .claude/rules/1-documentation.md.
What does 1-documentation do?
It guides edits to Markdown files at configured paths, preserving decisions, procedures, and commands while cutting repetition and temporary material.
Which files does the rule cover?
It targets README, ARCHITECTURE, GUIDELINES, and CONTRIBUTING files, plus documents under docs/ and memory files under aidd_docs/memory/.
Source text
1-documentation.md · MIT
--- paths: - "**/README.md" - "**/ARCHITECTURE.md" - "docs/**/*.md" - "**/aidd_docs/memory/**/*.md" - "**/GUIDELINES.md" - "**/CONTRIBUTING.md" --- # Concise documentation - Edit durable, authored Markdown individually; exclude history, generated content and fixtures. - Architecture: components, boundaries, flows, invariants. README: purpose, usage, limits. - Use descriptive, hierarchical headings; include only relevant facts, once per document. - Preserve contracts, decisions, rationale, limits, procedures, linked anchors and generator markers. Keep memory safeguards self-contained; never invent performance requirements. - Remove filler, repetition, narrated history, dates, counters, ticket/run IDs, snapshots, temporary evidence and measured timings, ratios or comparisons. - Prefer diagrams for relationships and tables for roles; keep necessary prose concise. Retain required versions, constants and useful examples. - State actions and verification commands; link canonical sources for supporting details. - Read back: check section scope, preserved information, commands and links.
© ai-driven-dev · MIT · ai-driven-dev/framework