← ClaudeAtlas

context-budget-plannerlisted

Estimate the implementation phase's token footprint from spec, test plan, and affected files; recommend compaction before context starvation.
Eliyce/paqad-ai · ★ 4 · AI & Automation · score 76
Install: claude install-skill Eliyce/paqad-ai
## What It Does Predicts the token footprint of the upcoming implementation phase before it starts. Reads spec size, test plan size, affected module docs, and known changed files; sums their token cost using the per-line weights in the heuristics reference; compares against the available budget; and recommends compaction when the estimate would push the session into the Amber or Red tier. The point is to catch starvation before it happens, not after compaction has already evicted decisions mid-task. ## Use This When Use this once at the boundary between planning and implementation in the graduated and full lanes — after acceptance criteria and test plan exist, before the first source file is opened. Skip in the fast lane; the overhead is not justified for low-complexity work. ## Inputs - Read the active spec at `spec_path` first. - Read `test_plan_path` when supplied. - Read each module doc in `affected_module_doc_paths` only enough to compute its line count. - Read `references/budget-heuristics.md` before applying any threshold so the per-line weights and tier boundaries stay consistent across runs. ## Procedure 1. Determine the project's model context window (from project profile) and committed tokens (default 200000 / 30000 if not declared). 2. Pick per-line weights from `references/budget-heuristics.md` (or `assets/weights.default.txt` if the project has none yet). 3. Pipe `<weight> <path>` rows into `scripts/estimate-tokens.sh --available <N> --committed <N>` — i