docs-governance plugin
面向长期 AI 协作项目的知识、决策与验证治理:把 Agent 的一次性工作沉淀为可继承、可验证、可持续演进的项目能力。
How to install the docs-governance plugin
Run both commands inside Claude Code. The first adds the marketplace once; the second installs the plugin.
/plugin marketplace add qshanx/docs-governance
/plugin install docs-governance@docs-governanceWhat's inside docs-governance
16 parts read from the plugin's own files.
Commands 8
Run as /docs-governance:name- /docs-governance:contract
契约式前后端协作。先判断单会话多 agent 还是多终端异步两种模式,再以 CONTRACT.md 指向的机器契约为唯一来源协调各端开发、做集成对账,防字段漂移。
- /docs-governance:governance
对已配置治理的当前项目做日常活文档维护——扫描真实结构,按需增量更新治理文档与 Codex 的 AGENTS.md 薄桥接。首次配置请用 /governance-setup,全中文。
- /docs-governance:governance-audit[spine|context|adr|artifacts|full,默认 full]
只读审计当前项目的文档治理质量与产物链接完整性;先跑确定性检查,只有通过后再判断职责、语义与证据漂移,不修改任何文件。
- /docs-governance:governance-init[目标项目、讨论资料或配置范围]
/governance-setup 的兼容别名;新项目、讨论后项目与已有项目共用同一配置流程。
- /docs-governance:governance-retro[可选:起始日期 YYYY-MM-DD,默认全量]
复盘 PROJECT_LOG.md——统计哪个模块出错最多、哪类错误重复、标准变更几次;重复 TOP 的错误输出为"该下沉成 lint/测试"的候选清单。LOG 从流水账变资产。
- /docs-governance:governance-setup[目标项目、讨论资料或配置范围]
统一配置新项目、讨论后项目或已有项目的产品文档包与 Agent 入口;先识别资料与授权,再编排专项 Skill,保留现有主源。
- /docs-governance:governance-sync[本阶段完成了什么]
阶段收尾时同步项目治理文档:根据实际 diff 查漏补缺脊柱、CONTEXT、ADR、CONTRACT、TESTS 与 REGRESSION,并核对 Issue Tracker 引用。
- /docs-governance:regression-audit[init | 模块名 | 留空=按 git 改动自动定位]
模块回归审计——改完代码后照 REGRESSION.md 台账跑"本模块+全部下游"的验收命令,退出码终审,防"改一个模块悄悄弄坏其他模块"。带 init 参数时扫 import 关系生成台账草稿。
Agents 7
Call as @agent-docs-governance:name- @agent-docs-governance:backend-devsonnet
后端开发工人。只在后端目录里开发,接口实现一律以 CONTRACT.md 指向的机器契约为准(只读,不许改),并为接口写"返回必须符合契约"的校验测试(provider verification)。可在单会话里被 contract-director 派活,也可在自己的终端独立跑、只通过契约文件异步协作。想改接口形状时提"契约变更请求"给契约拥有者,绝不偷偷改实现。
- @agent-docs-governance:contract-directorsonnet
契约拥有者 / 集成对账者。唯一拥有并维护 CONTRACT.md(端与端的数据接口契约),先定契约,最后做集成对账。支持单会话多 agent(派活)和多终端各自跑(契约当异步媒介、不在线派活)两种模式。当项目分前端/后端或多个服务、需要各端照同一份接口开发、防字段漂移导致集成炸掉时使用。它不写业务代码,只守契约、(必要时)派活、对账。
- @agent-docs-governance:docs-auditorsonnet
Use this agent for read-only documentation audits. General requests such as 审计现有文档 or 检查文档治理漂移 use docs-audit; explicit /governance-audit calls or compatibility scopes use the legacy audit mode.
- @agent-docs-governance:docs-governorsonnet
项目文档 setup 编排与活文档治理执行者。首次配置新项目、讨论后项目或已有项目时,按共享 Skill 协调产品文档与 Agent 入口;维护期按需增量更新治理载体,不固定铺满四件套。
- @agent-docs-governance:frontend-devsonnet
前端开发工人。只在前端目录里开发,数据接口一律以 CONTRACT.md 指向的机器契约为准(只读,不许改)。可在单会话里被 contract-director 派活,也可在自己的终端独立跑、只通过契约文件跟其他端异步协作。需要契约里没有的字段时,提"契约变更请求"给契约拥有者,绝不自己假设接口形状。
- @agent-docs-governance:product-docs-managersonnet
产品文档管理员。用户要求登记原始材料、整理产品认知与规划、维护需求池与单需求、关联版本及验收复盘,或统一需求编号、来源和生效基线时使用。复用已有产品资料和任务入口,不代替产品负责人批准需求。
- @agent-docs-governance:regression-auditorsonnet
模块回归审计员。读 REGRESSION.md 回归台账,定位本次改动涉及的模块,跑"本模块 + 全部下游"的回归验收命令,以退出码为终审,输出红绿审计摘要。只跑只报不修代码。在大项目改完一个模块、需要确认没牵连其他模块时使用(/regression-audit 触发)。
Hooks 1
Runs on these events- Stopcommand
No description in the file.
Using docs-governance in Claude Code
Type a command in a Claude Code session:
/docs-governance:contract
/docs-governance:governance
/docs-governance:governance-audit [spine|context|adr|artifacts|full,默认 full]Ask for an agent by name:
@agent-docs-governance:backend-dev
@agent-docs-governance:contract-directorUpdate, turn off or remove
- Update the plugin (shell)
- claude plugin update docs-governance@docs-governance
- Refresh the marketplace
- /plugin marketplace update docs-governance
- Turn it off for now
- /plugin disable docs-governance@docs-governance
- Remove it
- /plugin uninstall docs-governance@docs-governance
docs-governance plugin questions
How do I install the docs-governance plugin?
In Claude Code run /plugin marketplace add qshanx/docs-governance, then /plugin install docs-governance@docs-governance.
What does the docs-governance plugin include?
docs-governance bundles 8 commands, 7 agents, hooks.
What commands does the docs-governance plugin add?
It adds /docs-governance:contract, /docs-governance:governance, /docs-governance:governance-audit, /docs-governance:governance-init, /docs-governance:governance-retro, /docs-governance:governance-setup +2. Run them in Claude Code with the plugin prefix, for example /docs-governance:contract.
Which agents come with docs-governance?
backend-dev, contract-director, docs-auditor, docs-governor, frontend-dev, product-docs-manager +1. Call one with @agent-docs-governance:backend-dev.
How do I update or remove the docs-governance plugin?
Update it with claude plugin update docs-governance@docs-governance in your shell, or from the Installed tab of /plugin. Remove it with /plugin uninstall docs-governance@docs-governance.