Files
ECC/skills
robinryuk b620c0d605 fix(skills): correct the headroom guidance in context-budget
Both reviewers were right and the original guidance was self-contradictory: it said
attachments are charged to the context window, then told the report to exclude them
when stating remaining room.

Greptile's P1 is the sharper half — after a compaction, pre-compaction turns remain in
the JSONL while the model's active context holds only the summary, so counting
persisted bytes misreports headroom in the other direction too.

The section now says plainly that a transcript is a durable log, not a view of the
context window, and that remaining room must not be reported from its size. The
number is framed as a cost signal instead: scaffolding is rebuilt on every reconnect,
so trimming a component saves tokens once per reconnect rather than once per session.

Snippet fixes: emits an explicit >40% warning with one decimal place rather than
leaving the threshold in prose, guards a missing transcript, exits cleanly on an empty
one, counts bytes rather than characters, and treats a malformed line as conversation
instead of crashing. Verified against all four cases.
2026-08-19 09:27:26 +07:00
..