Install
openclaw skills install @century0327/project-governance文件太多?AI忘上文?换会话麻烦?AI记错版本? 请给 AI 长期项目建立「项目记忆 + 文件索引 + 工作规则 + 版本记录」的治理系统。让 AI 换会话、换模型、甚至换 Agent 后,仍然能完美交接项目,而无需重新遍历或猜测。 包含:跨 Agent 的公共协议:VERSIONS.md / LESSONS.md / whitelist.json / blacklist.json / index.md ;适配器:SKILL.md / CLAUDE.md / AGENTS.md / .cursor/rules/ 。 适配TRAE,其他代理无法保证。 CLI 已通过 76 用例健壮性测试。
openclaw skills install @century0327/project-governance中文:给 AI 长期项目建立一套「项目记忆 + 文件索引 + 工作规则 + 版本记录」的管理系统,让 AI 换会话、换模型后仍能正确接着项目做,而不是重新猜项目。
这个 Skill 给项目增加 8 个东西:
核心目标:让 AI 换会话、换模型、甚至换 Agent 后,仍然能正确接着项目做,而不是重新猜项目。
Use this skill when:
Do NOT use this skill when:
Platform memory (e.g. Trae user profile / project memory) is a context source, not an authoritative fact store. Governance files are the project execution protocol. The two complement each other:
| Layer | What it answers |
|---|---|
| Platform memory | "What happened before / how does this user usually work" |
| Governance files | "How this project must work now, where files are, which version is authoritative" |
Authority priority when they conflict:
AGENTS.md, index.md, VERSIONS.md, registries)When memory and governance files disagree, governance wins. Durable conventions learned from memory must be settled into the governance files after human confirmation — memory alone never becomes the project's authority.
python scripts/governance.py init --project-dir /path/to/project --project-name "My Project"
Creates 11 governance files from templates/ (never overwrites existing files unless --force).
Edit the generated AGENTS.md: directory permission zones, autonomy levels, artifact placement rules, and project-specific rules under "Project Customization". Keep the universal Core Governance Rules as-is.
index.md → session_handoff.md → LESSONS.md; before generating parameters, read blacklist.json / whitelist.json.score > 0.85; never use permanent_ban: true; record new mistakes in LESSONS.md.session_handoff.md, index.md (file changes), CHANGELOG.md (decisions).python scripts/governance.py validate --project-dir /path/to/project # registries conform to schema
python scripts/governance.py index --project-dir /path/to/project # rebuild index.md map (links + notes)
python scripts/governance.py check --project-dir /path/to/project # health gate: files + registries + fresh index
AGENTS.md, index.md, VERSIONS.md, LESSONS.md, session_handoff.md, CHANGELOG.md, whitelist.json / blacklist.json) plus a validated, up-to-date index.init fails (invalid path, permission): report the exact failing command and reason; do not partially scaffold or guess.validate reports schema errors: fix the registry entries; never bypass validation.check fails (missing files / stale index): run index, then re-run check; if still failing, report to the human.| File | Purpose |
|---|---|
AGENTS.md | Project protocol: core governance rules, authority levels, first-run protocol, permission zones, trust boundary |
index.md + index_notes.json | Authoritative directory map with clickable links and short notes |
VERSIONS.md | Stable version index with human judgments |
LESSONS.md | AI error & correction log |
session_handoff.md | End-of-session handoff |
CHANGELOG.md | Decision & version history |
whitelist.json / blacklist.json | Verified / failed parameter registries |
ARCHITECTURE.md / PROJECT.md | Architecture & project card |
README.md — full package overview: Core / CLI / Skill-adapter structure, subcommands, limitations, Trae cold-start acceptance testtemplates/ — governance file templatesscripts/governance.py — init / validate / index / check CLIThis package is currently designed and tested primarily for Trae Skills. Other agents may use the generated governance files, but automatic Skill discovery/loading is not guaranteed outside Trae. The governance files and CLI are kept agent-neutral for future adapters.