clay-borg/tools
tegwick d382fd4555 T04: specs/SessionShape.md — compaction is the lever, not session length
The task's original premise was wrong and is recorded rather than
deleted. It was written to prescribe one task per session; measurement
says the variable is context, not turn count.

Measured:
  - compaction cut context 27x (542,991 -> 19,974) and cost/turn 3.1x;
    the 202 turns after C1 cost less than half the 136 before it
  - a turn costs $0.010 at 20k context and $0.270 at 540k
  - break-even for a compaction is 2-11 turns, so: compact whenever
    context exceeds ~300k and work remains
  - a fresh session is NOT free -- cold start floors at ~51k and must
    then re-read the artifacts a compact summary already holds (~66k).
    Prefer compaction to continue work; prefer a fresh session when the
    task changes, because then prior context is pure overhead.

cb-cost now emits SH-1..SH-3 so the targets come from the instrument
rather than from analysis, per InnerLoop v1.1. All three are UNMET
(mean context 232,982 vs 200,000; p90 492,042 vs 300,000; batching 7.8%
vs 20%) and are reported unmet rather than retargeted -- retargeting in
the commit that first measures is precisely what T07 exists to prevent.

Eighth error instance found while writing this: CB-WP-0001's claim that
"0 of 330 tool calls were batched" is wrong. 330 was the count of
single-call responses, not the total; 31 responses batched, covering 76
calls. It was carried into this workplan unverified. Trusted-arithmetic
class -- the one the T01 audit flagged as having no executable defence,
confirming that finding within hours of making it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-07-31 09:19:32 +02:00
..
__pycache__ T05: CB-EV-0002 — all 9 metrics met, and /compact measured at 3.1x 2026-07-31 08:51:50 +02:00
cb-sim CI: enforce every gate; close the silent-skip holes 2026-07-31 04:02:33 +02:00
cb-cost.py T04: specs/SessionShape.md — compaction is the lever, not session length 2026-07-31 09:19:32 +02:00
dep-weight.py T01: audit every InnerLoop rule, and make the checkable ones executable 2026-07-31 09:16:00 +02:00
loop-lint.py T01: audit every InnerLoop rule, and make the checkable ones executable 2026-07-31 09:16:00 +02:00
rule-coverage.py T01: audit every InnerLoop rule, and make the checkable ones executable 2026-07-31 09:16:00 +02:00