You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CLAUDE.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# jcodemunch-mcp — Project Brief
2
2
3
3
## Current State
4
+
- **Version:** 1.108.132 — **`receipt` surfaces the persistent lifetime savings meter.** `receipt` scans local Claude transcripts (cleared on reinstall → its windowed figure understates a heavy user; jjg's all-time transcript scan showed only 504 calls / $10.17 while his real cumulative was 34.3B tokens). Now also reads `_savings.json` under the index root (the per-call meter the MCP server writes on every call, survives Claude Code reinstalls) and reports lifetime tokens saved + dollar value at the selected model's INPUT rate, next to the windowed figure (shown even when the transcript window is empty). New `lifetime_meter(root=)` reader (honors CODE_INDEX_PATH; honest-None on absent/unreadable/zero); wired into `render_text` + `render_json` (`--export json` gains a `lifetime` block). Reconciles the "anemic transcript number vs big lifetime number" gap in ONE place — the fix for the Tim-presentation verifiability concern. New `TestLifetimeMeter` (9). NO INDEX_VERSION / wire change. (Related, NOT in the repo: jjg's personal `~/.claude/hooks/gsd-statusline.js` was corrected from `* 25.00` (Opus OUTPUT rate) to `* 5.00` (Opus INPUT) — input-token savings valued at input pricing; $857K→$171K, defensible.)
4
5
-**Version:** 1.108.131 — **`receipt`/`org-report``--model` choices derive from the price table (Fable now selectable).** v1.108.130 added Fable to `cli/receipt.py`'s `_MODEL_PRICES_USD_PER_MTOK`, but `server.py`'s CLI dispatcher had a DUPLICATE hardcoded `--model` choices list (`{sonnet,opus,haiku}`) that gated `receipt --model fable` before it reached receipt.py's own parser (jjg hit this on the installed editable src — the code was live, the dispatcher wasn't updated). Both the `receipt` and `org-report` subparsers now build `choices=sorted(_MODEL_PRICES_USD_PER_MTOK)` from the single price table (imported locally in `main()`), so any priced model is selectable and the CLI can't drift from the rates. New parametrized end-to-end test in `tests/test_receipt.py` runs the server CLI for every priced model + asserts none rejected. NO INDEX_VERSION / tool-count / wire change.
5
6
- **Version:** 1.108.130 — **`receipt` CLI price table updated to current Anthropic pricing (+ Fable 5).** Anthropic has reduced input pricing across the Opus line since these models launched; the `receipt` model input-price table (`cli/receipt.py` `_MODEL_PRICES_USD_PER_MTOK`) now tracks current published rates (Opus $5 / Sonnet $3 / Haiku $1) and adds **Claude Fable 5 ($10)** as a selectable model + alternate comparison line (both derive from the table). Source comment cites the dated pricing source (anthropic.com/pricing 2026-06-24); `tests/test_receipt.py` pins the table to it (+ a Fable test). `receipt` values measured token savings at the selected model's current rate; the underlying token savings are unchanged. **Does NOT feed the public token-savings counter, which stores tokens and values them at display time.** jcm's own `storage/token_tracker.PRICING` was already at $5. Sibling parity: jdoc v1.97.0 / jdata v1.19.0 update the same constants in their `token_tracker.PRICING` (feeds per-response `_meta.cost_avoided`). NO INDEX_VERSION / tool-count / wire change. **Framing note: this tracks a vendor price REDUCTION (Anthropic cut Opus input pricing since launch) — NOT a correction of an inflated figure. Never describe it as "overstating."**
6
7
- **Version:** 1.108.129 — **Keystone-protected structural compression for `get_ranked_context` (opt-in `compress=True`; clean-room F-15, competitor unnamed in shipped artifacts).** Renovates an entropy/relevance-guided context-selection idea into jcm's read-only/local/model-free idiom: an oversized symbol body is pruned toward a per-item soft cap so MORE relevant symbols fit the same `token_budget`. New `retrieval/entropy_prune.py` — `prune_source(source, max_tokens, count_tokens)` ranks lines by `line_signal` (normalized Shannon token-entropy × length-weight), keeps the highest-signal lines, and ALWAYS keeps `is_keystone` lines (control-flow/return/raise/yield/assert, signatures `def`/`class`/`@`/`func`/etc., operators `!=`/`==`/`->`/`=>`, and NL constraint cues `must`/`only if`/`unless`/`never`/`require`); dropped runs collapse to an honest `… N low-signal line(s) elided …` marker. O(L) — one token-cost measurement per line; `max_tokens` is a SOFT cap (keystone protection + elision markers can exceed it slightly; the outer `_pack_budget` still enforces the hard total). Wired into BOTH the default and `fusion=True` paths via shared `_compressing_get_tokens(base_get_tokens, token_budget, registry)` (constants `_COMPRESS_TARGET_ITEMS=8`/`_COMPRESS_MIN_ITEM_TOKENS=120`) + `_prune_fields()`; pruned items carry `source_pruned`/`source_kept_lines`/`source_elided_lines`/`source_total_lines`/`source_is_pruned_view`. **Default `compress=False` is byte-identical**; param compact-stripped (`_COMPACT_STRIP_PARAMS["get_ranked_context"]`) so `core_compact` unchanged; NO new tool, NO tool-count change, NO INDEX_VERSION bump. Live-index smoke: 1500-tok budget delivered 12 symbols vs 9 default (3 pruned), same total. New `tests/test_v1_108_129.py` (13); ruff clean; ranked-context/negative-evidence/schema-budget/dispatch-parity/server suites green (150). Origin: a clean-room F-15 renovation of an Atelier-family runtime's entropy/perplexity context-compression stage (competitor unnamed in shipped artifacts, [[feedback_no_competitor_names_in_shipped_artifacts]]; intel kept in session memory); the versus.php warn-box conceded their selection stage was ahead — this closes it.
0 commit comments