v0.9.0 — token optimization
Fixes the token-leak audit's top findings. Backward compatible; defaults unchanged.
- Edit-retry cache reuse — a plan-missing retry reads the cached user prefix (~0.1×) instead of re-paying the whole ~19k-token prompt (retry input ~10% of before).
- Executor spec_lock cached once — moved into a shared cached system suffix, read on every page instead of re-sent per page; the fan-out warms the cache before parallelizing (~2.1× → ~1×).
- Input caps — strategist source cap (
EDIT2DOCS_STRATEGIST_SOURCE_CHAR_CAP) and edit_doc outline windowing (400 paras: ~85% cut), preservingpara Naddresses. - Retry-severity tiering — cosmetic layout violations no longer drive full-page re-generations.
- Per-role model tiering (
EDIT2DOCS_MODEL_{PLANNER,WRITER,STRATEGIST,EXECUTOR}), auto-streaming for large outputs, honest cache accounting, per-stage cost visibility.
842 tests. Requires Python >=3.12, contextifier>=0.4.0.