Formula before interface
Each calculator begins as a pure TypeScript function with explicit units, cross-field constraints and edge behaviour. Finance calculations use decimal arithmetic where binary floating-point rounding could materially change currency results. Investment projections distinguish effective annual return assumptions from nominal loan rates. Reference and edge tests are written before a page is treated as complete.
Source hierarchy
Government departments, statutes, regulators, universities, standards bodies and original research are preferred. A dated local ruleset records when a source was effective and when it was reviewed. Secondary sources may help discovery but do not control a sensitive formula.
- Show effective and review dates near changing rules.
- Generate university variants only for genuinely different documented formulas.
- Keep fuel price and toll values manual.
- Treat currency reference data as dated and user-overridable, never live.
- Use regulator, standards-body and original-research references where a primary source exists.
Rounding and examples
Intermediate finance values retain high precision and are rounded only for display. Whole material packs, bricks, tiles and break-even units round upward where partial units are not purchaseable. Worked examples use synthetic inputs and make no performance or eligibility claim.
Corrections
A correction should include the formula or source that changed, affected routes, effective date, tests added and review date. Material corrections should be logged before deployment rather than silently changing a result.