feat: real-time Token Savings panel and tiktoken cross-check
Surfaces the context_savings metadata introduced in 2.3.4 as a boxed multi-line panel on the CLI, so humans (not just MCP-side LLM agents) see how much context the graph kept out of the window. - `format_context_savings_panel()` in context_savings.py renders the panel with a per-category breakdown (Functions / Tests / Risk / Other) that sums exactly to the graph response size — no padding, no rounding. - `--verify` flag on `detect-changes` and `update --brief` cross-checks the displayed numbers against tiktoken's cl100k_base tokenizer (the GPT-4 family). Calibration in docs/REPRODUCING.md shows the chars/4 approximation stays within +0.5% of real tokens in aggregate across 222 mixed-language source files. - `update --brief` is new: incremental update plus the same risk panel in one command. Distinct from `detect-changes --brief` (read-only against the existing graph). - `code-review-graph embed` CLI subcommand for explicit shell-level access to embedding generation. Previously only reachable via MCP. - `_get_version()` now falls back to package `__version__` when importlib.metadata can't find the dist-info (iCloud / OneDrive edge case). Tests updated to assert the panel structure instead of the old one-line "Estimated context saved:" format. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
T
Tirth Kanani committed
1356a8b722650699fa68fbcbc14290f79348ad1b
Parent: ef640c1