Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

docs-gov

БесплатноЗапускает вложенные скриптыНе проверен

Installs a documentation governance architecture in a project and diagnoses what it is missing. Three actions: audit diagnoses the current state against seven…

xiaoba-devот xiaoba-dev758 установок в других каталогах

Об этом скилле

docs-gov

What the system actually does and what the team believes it does have diverged, and no measurement anywhere lets anyone see the divergence; every fix starts by making it visible. — the core diagnosis from a real project postmortem, and the master principle of this whole thing

The framework is distilled from the documentation system of a large protocol project (framework.md holds the criteria, including what was deliberately not ported). It is a program, not a style guide: the reasoning lives in incidents.md and in the tests — Of the 181 tests, 141 name the incident they guard against in their docstring, so every run restates it; the other 37 are positive cases (verifying that what shouldn't be reported isn't), with no incident to name.

Dependencies: python3 (3.10+, standard library only) and git. Running the self-tests needs pytest.

What it touches

Scope
Reads Only files inside the repository given by --root: .doc-governance.json, Markdown under the configured directories, files matched by contract_checks, and — for audit — root entry docs (CLAUDE.md, AGENTS.md, README.md, CONTRIBUTING.md, BRIEFING.md), .github/workflows/, scripts/, .claude/settings.json. Config paths must be repo-relative — absolute paths and .. are refused, and anything that resolves outside the repo through a symlink is skipped, never read.
Writes audit and check write nothing. Only init --yes writes, and only these: .doc-governance.json, scripts/governance.py, .githooks/pre-commit (+ a forwarding shim in .git/hooks/pre-commit if none exists), .claude/hooks/ (two scripts), their registration in .claude/settings.json, and a README.md template in the decision/plan directory if that directory is missing. Existing files are left alone; a pre-existing .claude/hooks/ script is registered only if it is byte-identical to the bundled one.
Runs git log / git rev-parse (read-only, fixed argument lists, no shell). The installed hooks run python3 scripts/governance.py check, git, jq, and find.
Persists The pre-commit gate blocks commits whose .md changes fail the checks; the Claude Code hooks block creating a new PLAN-*.md / TASK-*.md while checks are red, and report cascade problems after a decision record is edited. Remove them by deleting those files and the two entries in .claude/settings.json; skip once with git commit --no-verify.
Environment Reads HOME (to find the skill in the common install directories), and in the installed hooks CLAUDE_PROJECT_DIR and, for pre-commit's drift comparison only, DOC_GOVERNANCE_HOME. Nothing else. What init copies is always the governance.py you ran and the templates/ beside it (or, when running from a copy, the ones in a common install directory) — never something an environment variable points at; the plan printed before --yes shows the source file and its sha256.
Network None.

Document language: checks recognize both English and Chinese phrasing — deferred promises (“rewrite once X is confirmed”, “TODO: update after …”), Status: lines and | Status | table rows, ## Cascade memo sections, implementation-status labels (“deprecated”, “not yet implemented”, “planned”), source-of-truth declarations, and “before/after X, run Y” checkpoints. Detection is pattern-based: unusual phrasing can slip through, so treat a clean run as “nothing detected”, not proof.

Three actions

S=<skill dir>/governance.py          # e.g. ~/.claude/skills/docs-gov/governance.py

python3 $S audit --root .            # diagnose: each of the seven components present/partial/missing + what goes wrong without it
python3 $S init  --root .            # list what would be installed, change nothing
python3 $S init  --root . --yes      # install
python3 $S check --root .            # continuous checks (nine modes)
python3 $S check --root . pending    # run just that one

Run audit the first time you enter a project. It is read-only and changes no files; it outputs the project's governance maturity, plus which past incident each missing piece sets you up to repeat.

What audit checks (G1–G7, criteria in framework.md)

Component In one sentence
G1 Source-of-truth layering Is it written down who is authoritative for what?
G2 Decision record system Sequential numbering, an index, consistent metadata conventions
G3 Cascade discipline Which documents each decision lands in, verifiable item by item
G4 Planning system What is being done now and how far along it is + whether there is a second, abandoned answer (a scaffold ledger more than 30 days behind the repo)
G5 Checkpoints bound to actions Is it written down + is a device bound to it (written only in a doc = a sticky note)
G6 Gates Can both CI and local commits
Полный SKILL.md на ClawHub

Установить docs-gov в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

FAQ

Что делает скилл docs-gov?

Installs a documentation governance architecture in a project and diagnoses what it is missing. Three actions: audit diagnoses the current state against seven components (source-of-truth layering / decision records / cascade discipline / planning system / checkpoints bound to actions / gates / incident traceability); init installs what is missing (config, a script copy, a pre-commit gate, two Claude Code hooks, decision and plan templates); check keeps verifying that what the docs claim about reality still holds (TODOs left hanging too long, cascade memos never carried out, plan status that doesn't match reality, broken references, broken links, § section references pointing to the wrong place, missing index entries, broken tables, endpoints the docs declare but the code doesn't have). The framework was distilled from the documentation system of a large protocol project, and every check is tied to a real incident. ⚠️ init modifies the repository and installs hooks that keep running after the session ends (a git pre-commit gate and two Claude Code hooks that can block commits and new plan files); without --yes it only lists the planned changes. audit and check are read-only. Use only when the user explicitly asks about documentation governance in the current repository: "doc governance", "audit the docs against the code", "set up a documentation system for this project", "audit before I write a plan", "is the spec the single source of truth", or when a commit or file write was blocked by this skill's own gate output.

Как установить скилл docs-gov?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл docs-gov запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить docs-gov с