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.
npx agentmods add commands/seekers2001/docs-governance/governance-initgit clone --depth 1 https://github.com/Seekers2001/docs-governanceWhat 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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5 | $0.00067 | $0.01494 |
| Opus 5 | $0.00034 | $0.00747 |
| Sonnet 5 | $0.00013 | $0.00299 |
| Haiku 4.5 | $0.00007 | $0.00149 |
Grade A, and why
governance-init 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 60 lines — stays where its author put it; the contents beside it link to each section on GitHub.
给当前工作目录的全新项目搭 day-0 治理骨架。
分工(别用错命令):项目已有代码 → 用 /governance(扫描真实结构生成/更新四件套);空项目从零起步 → 用本命令。本命令刻意只生成最小脊柱,不铺满目录和可选文档——渐进式采用,见 living-docs-governance skill。
用户参数:$ARGUMENTS(项目名 / 技术栈 / 模块划分)。缺什么就逐项问,不要猜技术栈。
生成什么
1. CLAUDE.md(宪法,≤60 行)
以 templates/CLAUDE.example.md 为骨架(读取时机分级 / 硬规则少而精 / 路标),按本项目填充,并加入以下 day-0 段落:
- 治理硬约束(放最前):更新任何文件 / 新建文件 / 改业务规则前,必须读取并执行
docs/governance.md;无视 = 违反章程,必须重做。 - 验证(按技术栈生成,禁止照抄别的语言):如 Python 项目
python -m py_compile+ruff check;Node 项目npx tsc --noEmit+npm test;改主程序后跑最小启动命令。 - Git 规则(自动执行 + 硬禁单):
- 自动执行:初始化后
git init+ 首提;文档生成后、模块验证通过后、修 bug 后按型提交;commit message 用英文。 - 硬禁单(绝对禁止自动执行):
git add -A/git add .(只 add 具体文件)、git push(人工触发)、git reset --hard、git push -f、git branch -D、git checkout -- .、git commit --amend、git rebase -i。
- 自动执行:初始化后
- 代码完成后检查(强制):跑本项目验证命令 → 精简一遍再验证 → 有审查手段就审查(CRITICAL 必须修)→ 对照
docs/{模块}-spec.md验收标准逐条核对 → 按docs/governance.md§2 步骤 3.5 做实际运行验证(产物型任务必检产物本身)→ 全过才 commit,没过不许 commit。 - 失败自检(强制):操作失败不要直接重试,先答三问——缺信息?缺工具?缺约束?→ 告诉用户缺什么。
- 文档结构指路:
docs/{模块}-spec.md(需求/验收标准)、docs/{模块}-plan.md(方案/已知坑)、references/(已验证参考实现)。references/ 触发规则:遇外部 API / 复杂转换 / 图像文件批处理等高不确定实现,先建 references/ 最小跑通版,再写正式代码;禁止从纯文字描述直接实现。
1.5 AGENTS.md(Codex 薄桥接)
若用户使用 Codex,或希望项目同时兼容 Claude Code 与 Codex,则从 templates/AGENTS.example.md 生成根目录 AGENTS.md。它只指向共享章程 CLAUDE.md、STATUS 红线和按需 MAP,不复制规则或目录树。
2. docs/governance.md
从 templates/governance.example.md 复制,只替换 {项目名称},placeholder 留给项目演化中填。不要内嵌改写模板正文。
3. PROJECT_LOG.md
照 templates/PROJECT_LOG.example.md 的格式建新文件,只留一行:## [今天日期] init | /governance-init 项目初始化。示例行不要抄进去。
4. 必要目录(不建空壳)
只创建当前技术栈和已确认模块马上要使用的目录。docs/ 因 docs/governance.md 已自然存在;src/、tests/、references/、logs/、output/ 等没有首个文件时不要预建。运行产物目录一旦出现就加入 .gitignore。
5. pre-commit 护栏
把插件 templates/pre-commit.example 的内容写入 .git/hooks/pre-commit 并 chmod +x(安装形态不同找不到模板文件时,按其要点生成:代码改动必须同批 staged 一行 PROJECT_LOG;测试/文档/治理文件豁免;拦截时给可复制的补账命令)。
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.
- 3d ago First seen · 60 lines · 67 tokens per session scan A b616e5279712
governance-init is a command published in the GitHub repository Seekers2001/docs-governance (11 stars, last pushed 20d ago), licensed MIT. It adds 67 tokens to every session and 1,494 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.
Other commands, from other repositories
speckit.git.commit
Auto-commit changes after a Spec Kit command completes.
commit-all
Group all changes semantically and commit each group separately.
commit
Based on the above changes, create a single git commit.
commit
Safe git commit practices for MindRoom.
commit
智能生成 Git 提交信息并提交.
commit
Create a Conventional Commit with signoff.