doc-governance

doc-governance is a skill for Claude Code from manhua-man/harness-coding-protocol. It costs 85 tokens per session (2,616 once invoked), scanned B, original, MIT.

A set of rules and checks for keeping a repository's human documentation accurate and organized. It treats one document as the source for shared facts and separates current information from lessons and validation records.

In plain words
What is it for?
Use it to audit documentation, find fact drift and broken references, decide which documents should stay, and bring the repository's docs back into agreement.
Why use it?
It helps prevent conflicting documentation, stale claims, duplicate pages, and project material being stored in the wrong place.

Skill for Claude Code

Written for Claude Code: shipped in a Claude Code plugin. Also seen: mentions CLAUDE.md; mentions AGENTS.md.

Part of the harness-coding-protocol plugin — 4 skills, 4 commands shipped together

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 skills/manhua-man/harness-coding-protocol/doc-governance
Any agent
npx skills add manhua-man/harness-coding-protocol --skill doc-governance
Clone the repo
git clone --depth 1 https://github.com/manhua-man/harness-coding-protocol

Made for: Claude Code.

Or install harness-coding-protocol, the plugin that ships this one along with the rest of its 4 skills, 4 commands.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for doc-governance

README.md
[![agentmods](https://agentmods.dev/badge/skills/manhua-man/harness-coding-protocol/doc-governance.svg)](https://agentmods.dev/skills/manhua-man/harness-coding-protocol/doc-governance)
Your own site
<a href="https://agentmods.dev/skills/manhua-man/harness-coding-protocol/doc-governance"><img src="https://agentmods.dev/badge/skills/manhua-man/harness-coding-protocol/doc-governance.svg" alt="Measured on agentmods" height="20"></a>
Per session 85 Skills are progressive disclosure: only the name and description are preloaded; the body loads when the skill is used.
When invoked 2,616 The whole file, excluding the scripts and references it only reads on demand.
Security scan B 1 finding. 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.1 $0.00085 $0.02616
Opus 5 $0.00043 $0.01308
Sonnet 5 $0.00017 $0.00523
Haiku 4.5 $0.00009 $0.00262

Measured 6d ago against content hash 7174f817459a, method: parsed. Prices are Anthropic first-party input rates as of 2026-09-06, from the pricing page.

Security

Grade B, and why

doc-governance scanned grade B with 1 finding 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 6d ago.

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.

Recursive force deletemediumDestructive command

rm -rf with a variable or a broad path is one typo away from removing the wrong tree.

- 未跟踪的(在 .gitignore / 从未 add)→ `rm -rf` 物理删除,不占 git。

Downgraded: this mod is about security review, or the phrase is quoted, so it is likely naming the pattern rather than instructing it.

ai-ide/skills/doc-governance/SKILL.md · 130 lines

How it starts

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

Doc Governance (文档治理)

文档是负债,不是资产。每份文档都在向每次改动收税——税就是"同步它"的认知成本。 治理的目标不是"文档好看",而是让文档的税最低:进场的人 5 分钟看懂现状,改动的人不用为文档付双重成本。

核心理念(先于一切方法)

  1. 真值单源 (Single Source of Truth):可验证的事实(版本、路径、模型、命令、测试数)只写在一个文件里(如 AGENTS.md / FACTS.md),其他文档一律指针引用,不复制。复制 = 漂移,漂移 = 未来某天 AI 按错的数字干活。
  2. 按生命周期分层,不按主题分层:文档按"它回答什么问题"归类——当前真理 / 实战经验 / 验证基线。不要按"系统模块"或"业务域"分类,那是代码的活。
  3. 项目内容与系统文档分离docs/ 只放系统/管线文档。项目生产内容(剧本、分镜、对白、系列设定)归 projects/<项目>/docs/,跟着项目走,不进系统文档空间。
  4. 死文档直接删除,不建 archive:git 历史就是存档。只有极少数有独立审计/决策价值的才保留,其余 git rm 干净利落。
  5. 诚实标注,禁止膨胀文案:mock 测试就是 mock,写 UNIT_ONLY;冻结就是冻结,写 FROZEN 之后不许再改。文档吹的每一句牛,都会变成后人踩的坑。

治理流程(Audit → Design → Converge)

Mode 1: Audit(只审不改)

A. 找事实漂移(最优先,P0):

  • 文档声称的数字 vs 实测:跑测试、跑 git log、数文件,拿证据对质文档
  • 例:AGENTS.md 写 "45/45 全通",实测 50 个 —— 多源事实已经各说各话。
  • 例:BUILD_INFO 写 "50_PASSED_REAL_INTEGRATION",实测 0.76s 的 mock 测试 —— 膨胀文案。

B. 找幽灵引用

  • grep 文档/CLI 里提到的文件名,ls 看是否真实存在。
  • 例:CLI choices 接受 fast_preview,但 pipelines/ 下根本没有这个文件 —— 幽灵选项。

C. 找冻结失效

  • 声明 "FROZEN" 后 git log 是否还有功能性提交?有 = 冻结是装饰,不是状态。

D. 找重复与混层

  • 同名/近名文档并存(如 ARCHITECTURE.md vs system_architecture.md)—— 确认是"当前实现 vs 长期愿景"还是纯重复,重复就合并。
  • 当前真理文档里混着执行历史/日期日志 —— 拆出去。
  • 过程记录(迁移说明、施工过程、原始参考)躺在主目录 —— 标记为死文档。

输出:审计报告(P0/P1/P2 分级 + 每项证据:文件:行号)。

Mode 2: Design(设计目标结构)

生命周期分层模型(核心理念,非强制目录名):

docs/
├── README.md        # 导航索引:组织理念 + 使用约定 + 目录路由
├── 01-<当前真理>/    # 活的契约:架构、规范、标准、路线图(现在是什么)
├── 02-<经验沉淀>/    # 实战教训、学习笔记(我们学到什么)
└── 03-<验证基线>/    # 测试报告、上游快照、审计记录(我们验证过什么)

约束:

  • 目录只建"有真实边界"的:单份文档不建目录;空目录/单文件目录拍平。
  • README 只导航不复制内容:路由读者到文件,不重复文件内容。
  • 语言/命名跟仓库走:仓库是中文就中文,别硬套英文编号。
  • 复刻理念,不复刻目录:别的仓库的 02-项目架构/03-功能模块/ 是它的项目结构,你的项目结构要由你的内容决定。用户说"参考理念",不是让你抄文件夹名。

Mode 3: Converge(执行收敛)

  1. 改代码:删幽灵选项/特判(CLI choices、registry 别名),先让代码和现实一致。
  2. 收敛真值:选定一个真值文件,其余文档改指针引用;测试数这类会漂移的数字改成"pytest 全绿"这类不再漂移的表述。
  3. 合并重复:确认重复后合并成一份,git rm 另一份。
  4. 删死文档git rm 过程记录,不留 archive 目录(git 历史就是 archive)。
  5. 分离项目内容:项目文档 git mvprojects/<项目>/docs/
  6. 同步所有引用:README、AGENTS.md、CLAUDE.md 的路径/数字一起改,不留断链。

Read the full file on GitHub · 130 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. 6d ago First seen · 130 lines · 85 tokens per session scan B 7174f817459a

Subscribe to this mod's changes

doc-governance is a skill published in the GitHub repository manhua-man/harness-coding-protocol (5 stars, last pushed 3d ago), licensed MIT. It adds 85 tokens to every session and 2,616 once invoked, about $0.0004 per session on Opus 5. A static security scan graded it B with 1 finding (recursive force delete). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.

Related

Other skills, from other repositories

investigate

Manage structured investigations with multi-agent evidence collection, synthesis, tagging, and PHI sanitization. Use when user says "start an investigation", "root cause analysis", or "collect evidence about X". Subcommands: new, run, collect, synthesize, close, status, list, search. Do NOT use for casual debugging or…

john-wilmes/claude-agentic-coding-playbook · 82 tokens

playbook

Analyze your Claude Code configuration and suggest improvements based on the agentic coding playbook. Use when user says "audit my config", "check my setup", or "improve my CLAUDE.md". Works on both global and project-level CLAUDE.md files. Do NOT use for application configuration — only for Claude Code setup.

john-wilmes/claude-agentic-coding-playbook · 70 tokens

checkpoint

Save all work, update memory, commit, push, and prepare to end the session. Use when user says "save my work", "wrap up", or "I'm done for now". Use at natural breakpoints or when context is getting large.

john-wilmes/claude-agentic-coding-playbook · 52 tokens

create-project

Scaffold a new project with git, .gitignore, CLAUDE.md, AGENTS.md, GitHub repo, and memory directory. Use when user says "start a new project", "create a repo", or "scaffold an app". Creates the project as a sibling to the .claude/ config directory.

john-wilmes/claude-agentic-coding-playbook · 69 tokens

learn

Capture a lesson as a structured knowledge entry. Use when you discover a non-obvious bug, workaround, or pattern worth preserving for future sessions. Use when user says "remember this", "save this lesson", or "this is worth noting".

john-wilmes/claude-agentic-coding-playbook · 51 tokens

promote

Promote a project-level lesson to global scope so it's available across all projects. Use when user says "make this global", "share this across projects", or "promote this lesson". Use when a lesson discovered in one project would benefit others.

john-wilmes/claude-agentic-coding-playbook · 53 tokens