governance

A project-governance command that scans an existing codebase and creates or updates four Chinese documentation files describing its rules, structure, status, and history.

In plain words
What is it for?
Generating or updating CLAUDE.md, CLAUDEMAP.md, PROJECTSTATUS.md, and PROJECTLOG.md, optionally maintaining a thin AGENTS.md bridge, updating a selected path, or appending one project-log entry.
Why use it?
It keeps project documentation based on the real repository and reduces duplicated or conflicting information as the code changes.

Command

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 commands/seekers2001/docs-governance/governance
Clone the repo
git clone --depth 1 https://github.com/Seekers2001/docs-governance
Per session 62 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 534 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.00062 $0.00534
Opus 5 $0.00031 $0.00267
Sonnet 5 $0.00012 $0.00107
Haiku 4.5 $0.00006 $0.00053

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

Security

Grade A, and why

governance 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 2d 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.

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.

commands/governance.md · 25 lines

What it actually says

调用 docs-governor 子 agent 对当前工作目录的项目做活文档治理。

分工:本命令面向已有代码的项目;全新空项目请用 /governance-init(day-0 骨架)。

用户参数(可选):$ARGUMENTS

  • 不带参数:对整个项目做一次完整治理(侦察 + 生成/更新四件套)。
  • 带路径:只针对该子目录/模块更新地图与状态。
  • log: 一句话:只往 PROJECT_LOG.md 追加一条记录,不动其他文件。

执行要求:

  1. 先让 docs-governor 侦察项目真实结构,不要照模板瞎填
  2. 已存在的治理文件增量更新,不推翻重写;PROJECT_LOG.md 只追加。
  3. 严守四件套非重叠纪律:每个事实只写一处。
  4. 产物全部中文。
  5. 项目使用 Codex、已有 AGENTS.md 或用户要求跨宿主兼容时:从 templates/AGENTS.example.md 生成或增量维护薄桥接,不复制 CLAUDE.md / MAP 内容。
  6. 若项目是 git 仓且 .git/hooks/pre-commit 不存在:问用户要不要装 pre-commit 护栏(templates/pre-commit.example,固化"代码改动必须同批带一行流水账")。
  7. 识别可选载体但不强制创建:稳定领域术语 → CONTEXT.md;难回退技术决策 → docs/adr/;任务与排期 → 项目已有 Issue Tracker。不要把三者塞进 STATUS 或 LOG 数据库。
  8. scripts/project-log-index.py status 按事件数检查 LOG;超过 200 条只报告并建议先复盘,未经确认不归档。
  9. 干完汇报:建/改了哪几份文件、关键内容、怎么验收。不要谎报"完成"。
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. 2d ago First seen · 25 lines · 62 tokens per session scan A 0a919021c68e

Subscribe to this mod's changes

governance is a command published in the GitHub repository Seekers2001/docs-governance (11 stars, last pushed 20d ago), licensed MIT. It adds 62 tokens to every session and 534 once invoked, about $0.0003 per session on Opus 5. 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.