docs: 发布 Context Compaction v2 调研与详细设计 - #34
Conversation
There was a problem hiding this comment.
🟢 Approval recommended
The changes are documentation-only additions that are internally consistent with the PR scope and do not introduce runtime, build, or test-impacting modifications.
Pull request overview
This PR publishes two new documentation artifacts that capture the completed research snapshot and the detailed v2 design for Context Compaction, to serve as references for the separate implementation work tracked in Issue #33. It fits into the codebase as design/research inputs (not product code) that justify and specify the intended future kernel behavior around semantic checkpoints, recent-turn retention, and authoritative context re-projection.
Changes:
- Add a research snapshot comparing context/compaction mechanisms across Codex, Claude Code, and Pi, plus corroborating evidence from the repository’s SWE-bench Django run artifacts.
- Add a detailed proposed implementation design for “Context Compaction v2” (semantic checkpoint v2, incremental repeated compaction, safe cut points, authoritative context layering, failure atomicity, and observability).
File summaries
| File | Description |
|---|---|
| docs/research/context-compaction-systems.md | Research snapshot + comparative analysis and local SWE-bench evidence to motivate v2 design decisions. |
| docs/design/context-compaction-v2.md | Detailed v2 design spec defining invariants, data model fields, repeated-compaction semantics, and acceptance/closure gates tied to #33. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
better-er
left a comment
There was a problem hiding this comment.
LGTM. docs-only, frozen; hash/blob/references all independently verified.
关联:#33(Relates to #33)
本 PR 的边界
本 PR 仅把已经完成的 Context Compaction 系统调研与 v2 详细设计存入仓库,供实现者、审阅者和后续学习引用。Issue #33 已作为独立的
ready-for-agent实现 Ticket;本 PR 不包含产品代码、测试实现、构建产物或实现完成声明,也不请求在本次 custody 中合并。两份文档保留冻结内容,不做翻译、改写、格式化或措辞优化。其中文说明是用户明确批准保留的学习材料。
文档
docs/design/context-compaction-v2.md68D98856D2407B160BC73A84E57672ABD16B5DA8E6788732A1825DF82907DF7Daaca366958a916f49b46ee11481b169978a1dd82docs/research/context-compaction-systems.md7B9A7544232C5880FF4862C077E03400489C3D46B51DE650028D5F0D0662D21E7e7beef2cfd4d66e8da8cb6735083dd6fcc8b2bfGit 身份与检查
dae4237029f0fdaf95a0064ad5f2a17be827db54d42eeb5913ebb3cb248a773138b19b696ee527b13c7eb54cbebea6d89cfb51bc593d2a9ed0faec6bgit diff --check通过DEEPSEEK_API_KEYassignment 或用户绝对路径泄漏后续
实现工作应以 Issue #33 的完整 scope、门禁和 post-merge 双实例真实验收要求为准。本 PR 只是研究/设计发布,不替代实现、测试、Provider 验收或官方 Harness 结果。Issue #33 保持 OPEN。
English appendix
Relates to #33. This PR publishes research and detailed design documents only. Issue #33 is the separate ready-for-agent implementation ticket. No product implementation, implementation tests, build artifacts, or completion claim are included, and this custody operation does not request or authorize merging.
The two frozen files are preserved byte-for-byte:
docs/design/context-compaction-v2.md(18,464 bytes, SHA-25668D98856D2407B160BC73A84E57672ABD16B5DA8E6788732A1825DF82907DF7D, blobaaca366958a916f49b46ee11481b169978a1dd82) anddocs/research/context-compaction-systems.md(25,852 bytes, SHA-2567B9A7544232C5880FF4862C077E03400489C3D46B51DE650028D5F0D0662D21E, blob7e7beef2cfd4d66e8da8cb6735083dd6fcc8b2bf).Exact Git identity: base
dae4237029f0fdaf95a0064ad5f2a17be827db54, headd42eeb5913ebb3cb248a773138b19b696ee527b1, one ordinary commit, two added paths, 589 additions, stable patch-id3c7eb54cbebea6d89cfb51bc593d2a9ed0faec6b. Issue #33 remains open for implementation and its separate post-merge acceptance gates.