Methodology
Models draft. Code computes. People approve.
Three boundaries keep the fleet defensible: arithmetic runs in a tested engine, uncertain fields route to a person by a threshold enforced in code, and nothing ships without approval.
Where each kind of work happens
Model
Reads documents, classifies, extracts, retrieves sources, writes prose.
Returns null rather than guess. Every field carries a confidence and a citation.
Engine
Every number: taxable income, SE tax, safe harbor, depreciation.
Called as compute_tax. Deterministic, cited, unit-tested. The model quotes it; it never recomputes it.
Person
Reviews routed fields, signs off on the workpaper.
requireHumanApproval is a code gate. No prompt can skip it.
The tax engine
Six rules for numbers a reviewer can trust.
@taxline/tax-engine is a dependency-free TypeScript package shared by the site’s calculators and the agent service.
Pure functions
No I/O, no clock, no randomness. Same inputs, same outputs — in the browser, in the service, in tests.
One table per year
Every indexed figure lives in years/2026.ts with its citation. Adding a year is a data change, not a code change.
Round where the form rounds
Half away from zero to the cent at each published line; the Tax Table midpoint rule below $100,000; whole dollars where the IRS allows.
Coerce, never NaN
Bad or empty input becomes 0 and is shown as 0. A field the fleet could not extract stays null and blocks the computation instead.
Trace every line
Each result is a list of lines with value, operands, form line, and authority — the workpaper is the output, not a rendering of it.
Test against the source
Expected values are worked from the IRS tables by hand. The MACRS table is re-derived from first principles and checked to the hundredth.
Confidence routing
The threshold is a line in code, not a request in a prompt.
Each extracted field carries a confidence c in [0, 1]. The routing rule is the same in the service (assess_confidence) and the offline demo.
A missing value or a missing score routes to review: absence is never treated as confidence.
Raising τ sends more to people and fewer errors through; lowering it does the reverse. The explorer below runs this on the demo queue.
Threshold explorer
16 fields from the demo intake queue. Drag τ to see what routes to a person.
- To review
- —
- Pass
- —
| Document | Field | Confidence | Route |
|---|---|---|---|
| acme_w2_2024.pdf | Employer | 0.93 | — |
| acme_w2_2024.pdf | EIN | 0.98 | — |
| acme_w2_2024.pdf | Wages · box 1 | 0.99 | — |
| acme_w2_2024.pdf | Federal w/h · box 2 | 0.98 | — |
| acme_w2_2024.pdf | State w/h · box 17 | 0.65 | — |
| acme_w2_2024.pdf | Local code · box 20 | 0.39 | — |
| 1099-nec_batch.pdf | Payer | 0.93 | — |
| 1099-nec_batch.pdf | Payer TIN | 0.96 | — |
| 1099-nec_batch.pdf | Nonemployee comp · box 1 | 0.97 | — |
| 1099-nec_batch.pdf | Federal w/h · box 4 | 0.99 | — |
| depr_schedule.xlsx | Total basis | 0.99 | — |
| depr_schedule.xlsx | Current-year depr | 0.98 | — |
| depr_schedule.xlsx | §179 election | 0.99 | — |
| vendor_invoices_q1.pdf | Invoices | 0.96 | — |
| vendor_invoices_q1.pdf | Total | 0.71 | — |
| vendor_invoices_q1.pdf | Deductible (est.) | 0.58 | — |
Sources
Where every figure comes from.
Figures were transcribed from the primary source on 2026-10-17. The knowledge base re-reviews and content-hashes its sources on a monthly cadence (npm run refresh-kb).
Check the math yourself.
Every calculator shows its workpaper. Change an input and watch each line move.