governance-sync

A project wrap-up command that compares recent changes with the project’s governance documents and updates the documents that are affected.

In plain words
What is it for?
It is for synchronising project maps, status files, logs, contracts, context notes, architecture decisions, specifications, tests, and regression records after a work phase.
Why use it?
It helps prevent documentation from falling behind the code, such as missing interface, test, dependency, or decision records.

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-sync
Clone the repo
git clone --depth 1 https://github.com/Seekers2001/docs-governance
Per session 43 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 484 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.00043 $0.00484
Opus 5 $0.00022 $0.00242
Sonnet 5 $0.00009 $0.00097
Haiku 4.5 $0.00004 $0.00048

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

Security

Grade A, and why

governance-sync 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-sync.md · 31 lines

What it actually says

调用 docs-governor 子 agent,对当前工作目录做一次阶段收尾同步

用户参数(可选):$ARGUMENTS

  • 不带参数:根据当前项目状态、最近变更和治理文档做查漏补缺。
  • 带一句话:把这句话作为本阶段完成事项,例如 完成答题点亮链路
  • contract:重点检查本阶段是否需要同步 CONTRACT.md

执行要求:

  1. 先读 living-docs-governance skill 和 references/governance-sync-matrix.md
  2. 盘点本阶段变化:会话上下文、最近修改文件、项目结构、已有四件套。
  3. 按矩阵判断应同步哪些文件:
    • 结构变化 → CLAUDE_MAP.md
    • 健康/风险/待删 → PROJECT_STATUS.md
    • 长期硬规则 → CLAUDE.md
    • 有意义事件 → PROJECT_LOG.md
    • 接口字段变化 → CONTRACT.md
    • 领域术语变化 → CONTEXT.md(若已启用)
    • 难回退技术决策 → docs/adr/
    • 成功标准与证据 → Spec/Issue + TESTS.md
    • 模块行为与下游命令 → REGRESSION.md
  4. 能确定的当前真相直接增量更新;不确定的列入“待用户确认”,不要编。
  5. 对照 change-impact 的计划影响与实际 diff,报告超范围改动、未验证项和临时兼容逻辑。
  6. PROJECT_LOG.md 只追加;只有超过 200 条且用户确认时,才用确定性脚本原样归档。
  7. 交付时列出:实际改了哪些文档、每份为什么改、哪些没改、哪些需要人工确认。
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 · 31 lines · 43 tokens per session scan A 92fe8b33bc43

Subscribe to this mod's changes

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