Skip to main content

Module budget

Module budget 

Source
Expand description

Deterministic prompt budget fitting (Definition 4, resolved decision 11).

Optional sections drop in increasing priority order, ties broken by section id, until the estimate fits the token budget. Required sections never drop. If the required sections alone exceed the budget, compilation fails closed. The dropped-section set is therefore a pure function of the inputs; it enters the program digest and the ledger.

Structs§

BudgetFit
The outcome of one deterministic fit.

Functions§

fit_budget
Fit sections to token_budget under accountant.