v0.11.0 — auto-refresh adopted decision table on version drift
Migration note
v0.10.0 trimmed tools/list to 7 core tools in the Rust binary but left already-adopted projects with a stale 12-tool decision table in `plugin_code_graph_mcp.md` + `MEMORY.md`, because `maybeAutoAdopt()` short-circuited on `isAdopted() == true` and never refreshed. v0.11.0 closes this loop so binary, index pointer, and decision table all move together on upgrade.
What changes on upgrade
- Auto-refresh on drift — when a project is already adopted but the shipped template hash ≠ the project's copy (or the sentinel block content ≠ current `INDEX_LINE`), the next plugin SessionStart refreshes both. One-time stderr notice: `[code-graph] Refreshed decision table to latest shipped version.`
- Source template synced to 7-core/5-hidden surface. Fresh `/plugin install` + first adopt now produces correct content.
- `INDEX_LINE` constant synced so the `MEMORY.md` sentinel block matches the target file.
Opt-out
- `CODE_GRAPH_NO_TEMPLATE_REFRESH=1` in `~/.claude/settings.json` env — locks your local edits; refresh path becomes a no-op. Does not affect first-adopt.
- `CODE_GRAPH_NO_AUTO_ADOPT=1` — still gates first-adopt (unchanged from v0.9.0).
- `code-graph-mcp unadopt` — unchanged.
Why this matters
Without v0.11.0, an already-adopted v0.8.x/v0.9.x user who upgrades to v0.10.x gets mixed state: binary serves 7 tools, but MEMORY.md + decision table still instruct the LLM to route through all 12 as peers. Functionally nothing breaks (hidden tools remain callable by name), but decision guidance is misaligned. v0.11.0 makes the three surfaces converge.
Tests
8 new cases in `adopt.test.js` cover drift detection, refresh path, opt-out, and no-gratuitous-refresh. 37/37 adopt + 13/13 session-init + 335/335 cargo test green.
Full Changelog: v0.10.0...v0.11.0