docs

A single-source-of-truth rule set for project documentation. It explains that files such as README.md, AGENTS.md, and CLAUDE.md are generated from source files under docs/ rather than edited directly.

In plain words
What is it for?
Use it when changing project documentation. It helps locate the correct source file, understand the documentation pipeline, and regenerate the final files with make docs.
Why use it?
It prevents changes from being overwritten during documentation generation and keeps the generated files consistent with their sources.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/hiromaily/docs-ssot/docs
Clone the repo
git clone --depth 1 https://github.com/hiromaily/docs-ssot

Made for: Cursor.

Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 1,308 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.01308
Opus 5 $0.00000 $0.00654
Sonnet 5 $0.00000 $0.00262
Haiku 4.5 $0.00000 $0.00131

Measured yesterday against content hash 2d6651deb6ea, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

docs scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/docs.mdc · 174 lines

How it starts

The opening of the file, as written. The whole thing — 174 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Documentation Rules for docs-ssot

SSOT Principle: Only Edit Source Files

This project generates documentation from source files. The pipeline is:

template/docs/**/*.md  +  template/*.tpl.md  +  docsgen.yaml
                          ↓
              docs-ssot build (make docs)
                          ↓
          README.md / AGENTS.md / CLAUDE.md

Generated Files — Never Edit Directly

The following are build artifacts and must NOT be modified:

  • README.md
  • AGENTS.md
  • CLAUDE.md

If you need to change content in these files, find the source file under docs/ that contains that section and edit it there, then run make docs.


Source Files — Where to Make Changes

All documentation content lives under docs/. Edit files here:

Directory Purpose
docs/01_project/ Project overview, vision, background
docs/02_product/ Product concept and feature descriptions
docs/03_architecture/ System architecture, pipeline, diagrams
docs/04_development/ Setup, testing, linting guides
docs/05_ai/ AI tool-specific instructions (Claude, Cursor, Codex, etc.)
docs/06_reference/ Commands reference, directory structure

Templates — Structure Only

Template files in template/ define document structure using include directives. Modify templates only to change document structure (add/remove/reorder sections), not content.

template/README.tpl.md
template/AGENTS.tpl.md
template/CLAUDE.tpl.md

Adding New Content

  1. Create or edit the appropriate file under docs/.
  2. If it's a new file, add an include directive in the relevant template/*.tpl.md:
    <!-- @include: docs/XX_category/new-file.md -->
    
  3. Run make docs to regenerate output files.
  4. Commit both the source file and regenerated outputs together.

Include Directive Format

Include directives follow the VitePress style:

<!-- @include: path/to/file.md -->

Read the full file on GitHub · 174 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 174 lines · 0 tokens per session scan A 2d6651deb6ea

Subscribe to this mod's changes

docs is a cursor rule published in the GitHub repository hiromaily/docs-ssot (2 stars, last pushed 4mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,308 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.