Repository navigation
refactor: 精简托管合同与 MCP 指令中的重复协议 - #69
Merged
Merged
Conversation
托管合同保留路由、来源归属与安全边界,项目索引只留短边界并指向服务端指令; MCP 指令删去与合同重复的路由全文和偏好归属规则,以及工具描述已承载的回执说明, 项目索引的首写、Git 与发布细则只保留一份压缩版本。合同版本升至 8,预留 0.10.5。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
压缩 mcp_instructions 的项目索引段落时丢掉了“规范远端”限定,使规则变成只要存在 某个已发布的 Release tag 即可记录版本,fork 发布的 tag 可能被误记为上游项目的发布; 这与同 PR 保留的 docs/architecture.md 中“canonical remote”边界以及改前的托管合同的 表述不一致。改为只在规范远端的已发布 Release 指向包含该成果的 tag commit 时记录版本。
复核指出压缩时同时丢掉了“或直接真源”条件:改前合同与 docs/architecture.md 均要求 在没有持久远端或直接真源时才回退到本机路径,否则会把仍有持久直接真源的项目 Authority 降级为本机路径。此处恢复该限定。
Owner
Author
评审记录(codex-review-gate)
findings 与处理
验证与 CI
剩余风险
|
…l-text # Conflicts: # keepygaga/version.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
背景
多 Agent 讨论会(Codex、Grok、Antigravity、CodeBuddy、Claude)的共识是精简 Keepygaga 而不是去掉它。最大的浪费是同一套协议在托管合同和 MCP instructions 里各写了一遍。本 PR 只处理共识中不破坏接口兼容的两项:协议去重,以及把项目规程移出全局合同。
改动
docs/agent-contract.md:保留路由、来源归属和安全边界;项目索引只留短边界(每个项目一条 Fact、只认已核验的整合成果、本地分支/PR/安装版本不算进展、不另建冲突的重复页面),并指向服务端指令。CONTRACT_VERSION7 → 8,各宿主repair后会更新托管块。keepygaga/mcp_instructions.md:删去与合同重复的路由全文和偏好归属规则,以及各工具描述里已有的"applied 后不要再 read 验证"说明;项目索引的首次写入、Git 核验与发布细则压缩后只保留这一份。docs/agent-contract.mdkeepygaga/mcp_instructions.md与原计划的偏差
原计划是把项目规程放进
create/add/update的工具描述。test_mcp_schema要求工具描述总长不超过 2,400 字符,因为部分宿主每轮都会带上全部工具描述;复制 3 份约 2.8KB,比原来合同里那段还贵。所以改成只在 server instructions 里保留一份,合同里留关键边界兜底。不在范围内
8 个工具与 schema 不变;不改 Hook 事件投影;不删每轮 REMINDER;不动 Vault 数据。
验证
uv run ruff check .、uv run pyright:通过uv run pytest -q:362 passed, 4 skippeduv run python scripts/smoke_mcp_server.py:通过uv build后运行scripts/check_distribution.py:distribution inventory okruff format --check报的 5 个文件格式问题在本 PR 之前就存在,未改动。🤖 Generated with Claude Code