|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## v0.12.0 — Scenario-keyed MEMORY.md index (auto-adopt template refresh) |
| 4 | + |
| 5 | +Auto-adopt (`claude-plugin/scripts/adopt.js`) now seeds MEMORY.md's sentinel |
| 6 | +block with a 5-row scenario→tool table in addition to the existing tool-name |
| 7 | +list. The always-loaded context gap this closes: Claude Code knew the 7+5 tool |
| 8 | +names but not the natural-language triggers ("who calls X?", "改 X 影响面") |
| 9 | +that should route to them, so sessions silently slid to `Grep` / `Read` when a |
| 10 | +code-graph tool would be more precise. The scenario phrases now live in the |
| 11 | +200-line-capped MEMORY.md itself, not a second-hop `plugin_code_graph_mcp.md`. |
| 12 | + |
| 13 | +### What changes |
| 14 | + |
| 15 | +Sentinel `<!-- code-graph-mcp:begin v1 -->...<!-- code-graph-mcp:end -->` grows |
| 16 | +from 3 lines to 9. Added block (nested under the existing index entry): |
| 17 | + |
| 18 | + - 场景速查(优先于 Grep): |
| 19 | + - 改 X 影响面 → `get_ast_node symbol=X include_impact=true`(或 CLI `code-graph-mcp impact X`) |
| 20 | + - 谁调用 X / X 被谁用 → `get_call_graph X` 或 `find_references X` |
| 21 | + - 看 X 源码 / 签名 → `get_ast_node symbol=X` |
| 22 | + - Y 模块长啥样 → `module_overview` 或 CLI `code-graph-mcp overview Y/` |
| 23 | + - 概念查询(不知精确名)→ `semantic_code_search "Z"`;字面匹配用 Grep |
| 24 | + |
| 25 | +### Migration — existing adopted projects |
| 26 | + |
| 27 | +`needsRefresh()` detects INDEX_LINE drift automatically; the sentinel block |
| 28 | +rewrites once on next SessionStart. No user action required. |
| 29 | + |
| 30 | +### Opt-out |
| 31 | + |
| 32 | +- Lock current MEMORY.md block against this refresh: `CODE_GRAPH_NO_TEMPLATE_REFRESH=1` (shipped in v0.11.0) |
| 33 | +- Disable auto-adopt entirely for new projects: `CODE_GRAPH_NO_AUTO_ADOPT=1` (shipped in v0.9.0) |
| 34 | +- Downgrade: reinstall `0.11.6` to restore the 3-line INDEX_LINE |
| 35 | + |
| 36 | +### Verification |
| 37 | + |
| 38 | +- `adopt.test.js`: 37/37 green — tests reference the `INDEX_LINE` constant, so the content extension is transparent. |
| 39 | +- `routing_bench`: 19/20 = 95.0% on `anthropic/claude-sonnet-4.5` via OpenRouter — unchanged from v0.11.6. This release doesn't touch `ToolRegistry` descriptions, which is what the bench measures; the adopted MEMORY.md lives outside the oracle's prompt. |
| 40 | + |
3 | 41 | ## v0.11.6 — Tool-description tightening (+5% routing P@1) + OpenRouter backend |
4 | 42 |
|
5 | 43 | First run of the routing-recall benchmark landed v0.11.4 at **P@1 = 18/20 = 90.0%** |
|
0 commit comments