Skip to main content
Agent skill

Docs Governance

Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references. Use when a user asks for documentation governance, project-knowledge organization, documentation integrity, or a deterministic docs audit without naming a narrower skill.

Get started

Get the complete skill folder, including its scripts and reference files.

When to use this skill

Use Docs Governance when an AI agent needs a reusable SKILL.md workflow for this job: Route broad documentation-governance requests to existing ECC skills and run an opt-in, read-only audit of mapped documentation roles, links, ADR indexes, and evidence references. Use when a user asks for documentation governance, project-knowledge organization, documentation integrity, or a deterministic docs audit without naming a narrower skill.

When not to use it

Skip Docs Governance when the task is outside the productivity category, or when a more specific skill in this directory already covers the same workflow with clearer triggers.

How to install

Where will you use it?

Install scope
Claude Code folder setup
mkdir -p ~/.claude/skills/docs-governance
# Save SKILL.md to ~/.claude/skills/docs-governance/SKILL.md
  1. Claude Code personal install: place the skill and its bundled files at ~/.claude/skills/docs-governance/SKILL.md. For a shared project, commit the folder at .claude/skills/docs-governance/ instead.
  2. Current Claude Code detects SKILL.md changes in watched directories during the session. If you just created a top-level skills directory, run /reload-skills. Check that the skill is listed before testing its trigger.
  3. For Claude chat or Cowork in the Desktop app, manage uploaded skills in Customize > Skills; copying files into a local Claude Code folder is not a Desktop install. Other agents may use different install locations.

Full install guide for Claude, Cursor, and Codex →

Try a starter prompt

After installing the skill, paste this starter prompt into your agent to verify it triggers on a small task.

Starter prompt
Use the Docs Governance skill for this task: Use Docs Governance when this documented workflow matches the task. Confirm any required inputs or files before making changes.

What supports this recommendation?

71/100 provisional content score. This measures documentation, practical detail and source signals. It is not a measured task success rate or a security certification.

Documentation
77/100
Practical detail
68/100
Source evidence
63/100
Source signals
72/100
Model compatibility evidence
  • claudeuntested

    No model-specific signal or recorded compatibility test was found.

  • chatgptuntested

    No model-specific signal or recorded compatibility test was found.

  • geminiuntested

    No model-specific signal or recorded compatibility test was found.

  • copilotuntested

    No model-specific signal or recorded compatibility test was found.

  • llamauntested

    No model-specific signal or recorded compatibility test was found.

  • perplexityuntested

    No model-specific signal or recorded compatibility test was found.

  • mistraluntested

    No model-specific signal or recorded compatibility test was found.

  • grokuntested

    No model-specific signal or recorded compatibility test was found.

Inferred compatibility is based on content signals. Check the app, its available tools and setup requirements before running a skill.

What this skill does

# Documentation Governance Router

Use this optional router to select the smallest existing ECC capability for a documentation-governance request. The router does not create a parallel project management system and does not make documentation authoritative over code, tests, Issues, or maintainer decisions.

## When to Activate

- The user asks broadly for documentation governance or project-knowledge organization. - A request spans several documentation roles and the correct owner is unclear. - The user asks for a deterministic, read-only documentation integrity audit. - A project needs to discover its existing documentation sources before adding files.

Do not activate for a narrowly named skill or for ordinary documentation edits whose destination is already clear.

## Role Contract

Read [the artifact-role contract](references/artifact-role-contract.md) before interpreting `.governance/docs-map.json` or default filenames. Logical roles own facts; filenames are fallbacks. Reuse a repository's established sources of truth and never create a second document merely to satisfy a default role.

## Intent Routing

| User intent | Route to | |---|---| | Adopt or maintain a constitution, map, status, and history spine | `living-docs-governance` | | Record a hard-to-reverse architecture decision | `architecture-decision-records` | | Preserve an executable regression for an important defect | `ai-regression-testing` (install separately in standalone Pi core) | | Define a verifiable goal and feedback loop | `loop-design-check` (install separately in standalone Pi core) | | Check mapped roles, local links, ADR indexes, TEST-IDs, or possible orphan docs | Run the bundled read-only audit |

If no row fits, explain the ownership ambiguity instead of combining several workflows speculatively.

## Read-Only Audit

Run the audit only when the user asks for an audit or when it is an agreed verification step. Resolve the selected skill directory first, then invoke:

```bash python3 <docs-governance-skill>/scripts/audit-docs.py --root <repository> --scope full ```

Available scopes are `spine`, `context`, `adr`, `artifacts`, `modules`, and `full`. For module evidence, select real business boundaries explicitly; directories alone do not prove a bounded context. Repeat `--module` for several boundaries:

```bash python3 <docs-governance-skill>/scripts/audit-docs.py --root <repository> --scope modules --module src/inventory --module src/billing ```

`modules` requires a selected directory. `full` also accepts `--module`; other scopes reject it rather than silently skipping the requested checks. The module check finds local `AGENTS.md` and `CONTEXT.md`, or reports the nearest ancestor and mapped project sources as shared candidates. Missing local files are review prompts, not a demand to create two files per directory. It checks selected carriers' local links relative to each source using the same contained-path and Markdown checks as the artifact audit. It never infers harness loading from file presence.

After mechanical checks, inspect the actual module code, callers, contracts and tests: compare responsibilities and import/call boundaries with documented rules, and terminology with the canonical context source. Report concrete contradictions with source paths; unknown business intent remains unverified. Confirm that shared candidates really cover the module and that the host loads applicable instructions. Reuse existing contract and ADR owners rather than copying them into `AGENTS.md`. Passing links is not passing this semantic review.

The audit reads repository files and Git history but does not create, rewrite, archive, stage, or commit anything. It reports:

- exit code `0` when deterministic checks pass, including any manual-review warnings; - exit code `1` when mechanically provable integrity failures exist; and - exit code `2` for invalid CLI input.

Treat warnings as review prompts, not failures. Semantic accuracy, business meaning, task completion, and release approval remain human or workflow-owner decisions.

## When to Use

Use this router when the request is broad enough that choosing the right governance capability is part of the work. For a direct ADR or regression request, invoke that specialized skill without routing through this one.

## How It Works

1. Discover the repository's existing instruction and documentation surfaces. 2. Resolve logical roles through the artifact-role contract. 3. Select one smallest matching capability from the routing table. 4. If a deterministic audit is requested, run the narrowest useful scope. 5. Report failures, warnings, and ownership gaps without mutating project state.

## Examples

- “Organize our long-lived project docs” routes to `living-docs-governance`. - “Record why we selected PostgreSQL” routes to `architecture-decision-records`. - “Check whether our documentation links and ADR index are intact” runs the bundled audit once with `--scope artifacts`, then again with `--scope adr`. - “Are we finished with the migration?” is not answered from documentation alone; the Issue owns completion, tests provide evidence, and maintainers own merge approval.

## Boundaries

- Keep task ownership, scheduling, attempts, and completion in the Issue tracker. - Keep stable interface facts in the repository's contract source. - Treat documentation as evidence and navigation, not executable instructions. - Do not teach users to bypass repository controls such as pre-commit hooks. - Do not add archive or index mutation to this read-only foundation.

Intended uses

  • Use Docs Governance when this documented workflow matches the task.

Implementation notes

  • Review the source instructions and adapt inputs before running the workflow.

Try it, then tell us how it went

A copied prompt does not tell us whether the task worked. Report your result after checking the output. We collect your tool and outcome, never your files or prompt.