r-doc: Project documentation governance
SkillDocs & knowledgeGovern project documentation when a user asks to initialize, audit, repair, or maintain AGENTS.md, docs/, indexes, plans, requirements, design, APIs, testing, releases, or deployment records, or when a change affects public behavior, interfaces, configuration, architecture, deployment, or documented project rules. Do not activate for code-only edits with no documentation impact; do not replace business-code implementation.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the r-doc: Project documentation governance skill
What this skill tells your AI
The instructions your AI receives, as published by riesaexe/r-doc in skills/r-doc/SKILL.md and read by ahel’s review.
Purpose
Maintain project documentation as a navigable, reviewable knowledge base with low context cost: have maintainers or AI agents read the project-root AGENTS.md first, then load only the minimum document set required for the current task through the indexes.
This is a project-level documentation standard, not a business-code implementation standard. The project's documentation hierarchy never overrides system instructions, the user's current request, or higher-level tool rules.
When to use
Use this skill automatically in the following situations, or whenever the user explicitly invokes $r-doc:
- Initializing a project, organizing project knowledge, or completing missing documentation entry points;
- Working with plans, requirements, design, architecture decisions, APIs, testing, releases, deployment, rules, or process documents;
- Changing code, configuration, interfaces, data models, processes, deployment, or architecture;
- Checking documentation synchronization during code review, before merging, before release, or during maintenance;
- Finding missing, stale, duplicated, conflicting, broken, or incorrectly loaded documentation.
Do not start the full documentation-governance workflow for a purely local code refactor that does not affect public behavior, data, configuration, architecture, or project rules.
Activation gate
Implicit activation is intentionally supported, but apply this gate before doing substantial work. Continue only when at least one condition is true:
- The user explicitly invokes
$r-docor asks for documentation governance; - The task creates or changes public behavior, interfaces, configuration, data formats, architecture, processes, deployment, release behavior, or project rules;
- The task asks to initialize, index, audit, repair, synchronize, review, or publish project documentation.
Do not turn an unrelated code edit into a documentation project merely because the repository contains AGENTS.md or docs/.
Non-negotiable constraints
- Scope work to the project root. Prefer the Git root; for non-Git projects, use the project root explicitly identified by the user.
- The project root must contain
AGENTS.mdanddocs/README.md. Complex topic directories must also use a fixedREADME.mdas their index. - Keep
AGENTS.mdlimited to the project overview, scope, quick start, context-loading order, key directories, commands, mandatory rules, prohibitions, task routes, and thedocs/index. Link detailed knowledge fromdocs/instead. - Keep each topic document focused on one subject. Split mixed, hard-to-locate, or overlong topics. Do not create empty documents just to fill a directory.
- Keep documentation synchronized with code, configuration, interfaces, processes, deployment, and decision changes. Record important constraints, pitfalls, and non-obvious decisions.
- Never write secrets, tokens, passwords, sensitive personal information, or real values that could bypass security controls. Stop writing and report suspected sensitive information.
- Merge non-destructively when
AGENTS.md,docs/, or existing documents are present: preserve facts and history instead of overwriting or deleting them. Report conflicts and propose a single source of truth. - By default, modify only documents, indexes, templates, metadata, and documentation comments. Read code and Git diffs only to determine documentation impact; do not modify business code.
- Do not treat file existence as documentation completion. Check indexes, links, status, relationships, and consistency of affected content.
Standard workflow
Choose a lightweight or complete workflow according to the task, but complete every relevant check for high-impact work:
- Identify the current development stage, task scope, and document types that may be affected.
- Read the project-root
AGENTS.mdif it exists,docs/README.md, relevant nestedREADME.mdindexes, project-level.r-doc.yaml, and documents directly related to the task. - Inspect project structure, Git status/diff, and relevant code. Read only the code needed to determine documentation impact.
- Build a document inventory and mark missing, stale, unindexed, broken, status-invalid, duplicated, conflicting, or suspiciously sensitive content.
- Ask necessary clarification questions, then provide a focused modification plan. Do not write, move, archive, or configure documentation before the plan is confirmed.
- Create or update
AGENTS.md, indexes, topic documents, metadata, and project configuration according to the plan. Mechanical index, link, and date updates may be automated after confirmation. - Run the deterministic helpers in
scripts/when the target environment can execute them. At minimum, runaudit_docs.py --root <project-root>; use--strictfor release or merge gates. If a helper cannot run, perform the equivalent checks and report the limitation. - Verify context-loading order, index coverage, links, metadata, relationships, stage gates, and sensitive-content checks.
- Produce a governance report covering scope, findings, completed updates, blockers, non-blockers, verification evidence, and whether the current stage gate is satisfied.
For stage checklists, read references/lifecycle-checklists.md. For the complete operating workflow, read references/workflow.md. For deterministic checks and temporary-project QA, read references/verification.md. For safe structural repairs, read references/repair.md. For concrete scenarios and common pitfalls, read references/examples.md and references/pitfalls.md. For version-to-version adoption notes, read references/migration-matrix.md. For cross-agent behavior evaluation, read references/agent-evaluation.md and run its evidence validator when evaluation artifacts are available. Package tests do not replace transcript-and-diff evaluation against a real agent.
60-second path
- Explicitly invoke
$r-docor confirm that the change has documentation impact. - Read
AGENTS.md,docs/README.md, and the relevant topic index. - Preview safe structural repairs with
python scripts/repair_docs.py --root <project-root>. - After confirmation, apply only the displayed repairs with
--apply, then runaudit_docs.py --strict. - Report automated results separately from semantic conflicts and decisions that still need confirmation.
Document structure and indexes
Use this default structure and preserve a reasonable existing structure whenever possible:
AGENTS.md
docs/
└── README.md
Add topic directories such as requirements/, design/, decisions/, api/, testing/, releases/, or operations/ only when needed. Each topic directory's README.md must define its scope, list its documents, state the recommended reading order, and link to the parent index and specific documents. Use references/templates/AGENTS.md when the project needs a new root entrypoint, and use references/templates/README.template.md for nested indexes. The root AGENTS.md must link to docs/README.md.
The recommended context-loading order is:
AGENTS.md
→ docs/README.md
→ relevant topic README.md
→ target document
→ supplementary documents explicitly linked by the target
Status, relationships, and conflicts
Topic documents normally use this lifecycle:
draft → proposed → active → superseded → archived
When documentation disagrees with code, tests, or other documents, state the intended behavior, current behavior, conflict location, and decision that requires confirmation. Do not automatically rewrite the implementation into the standard or let the newest file erase other facts.
For metadata rules, read references/metadata-schema.md. For project-level overrides, read references/project-config.md.
Minimum report standard
Every final governance report must include:
Current stage and inspection scope
Findings (missing, stale, conflicting, broken, or sensitive content)
Completed documentation updates
Remaining blockers and non-blockers
Verification methods and results
Current documentation stage gate: satisfied / not satisfied
Use templates only when they reduce repeated work. Read references/templates/README.md first, then choose a template for the project type and current task. Do not generate batches of empty documents.
Signals
- GitHub stars
- 30
- Forks
- 1
- Last commit
- Sep 2026
ahel review
K6low
bundled executables the agent is told to run
Automated review, not a security audit. Ruleset v1+k2.
Advanced
- Catalog kind
- skill
- Gateway key
r-doc- Source
- github.com/riesaexe/r-doc