Repository navigation
Description
Follow-up from the recovery-and-budget slice of claude-code-adapter-verification-first (docs/codev/task/claude-code-adapter-verification-first/recovery-and-budget-implementation-plan.md, Decision 1). Authorized by Martin Urban 2026-09-12 as a separately-tracked item rather than blocking that slice.
The finding. The parent plan's original research measured ~9,698 tokens across five always-on sources at d13e0a9, ratcheted to a 7,500-token ceiling. Slices 1 and 3 tracked byte deltas for two of those five sources (ai-agent-guidelines.md, AGENTS.md) in their own ledgers, but .claude/CLAUDE.md, skill descriptions, and agent descriptions were never re-measured against the ceiling after the baseline.
tests/test_instruction_budget.py (added in the recovery-and-budget slice) now measures all five sources in bytes and found the real total is 34,389 bytes, against a ceiling of 33,100 bytes derived from the original baseline's own bytes-per-token ratio (42,818 bytes / 9,698 tokens). That test's ceiling assertion (test_total_is_at_or_under_the_ratcheted_ceiling) is currently @unittest.skip-ed with this reasoning, so it does not block CI; the other two tests in that file (non-increase from a recorded baseline, baseline accuracy) are green.
Why this wasn't fixed in that slice. The slice's own new hooks (SessionStart, PreCompact, statusLine, isolation) license at most ~300 bytes of legitimate retirement (the "Say where things stand" bullet in ai-agent-guidelines.md is only ~294 bytes total). Retiring ~1,289 bytes would require cutting prose unrelated to what that slice actually built, which is exactly the kind of unscoped change the plan's own retirement discipline exists to prevent.
What this issue is for: either (a) a dedicated pass through .codev/for-ai/ai-agent-guidelines.md, AGENTS.md, and .claude/CLAUDE.md to find real, honest retirement opportunities and bring the total back under 33,100 bytes, or (b) revisiting whether the byte/token conversion ratio is the right way to enforce this at all -- it's a derived proxy from one snapshot, not a real tokenizer run, and a real token count might already be under 7,500. Un-skip test_total_is_at_or_under_the_ratcheted_ceiling once either resolves it, or update the ceiling deliberately if that's the outcome.
Activity
test(claude-code-adapter): hook tests, CHANGELOG, completion evidence