Government-Contracting Cost-Accounting
Compliance Engine

SHEET
01 / 01
REV
3.0
DATE
2026-07
TESTS
433 ✓

The regulations, encoded as working, audited software.

A local-first engine that turns FAR Part 31, SF 1408, the 2026 NDAA cost thresholds, ICS/ICE schedules, Eichleay, and standard-cost variance analysis into a tested calculation system — with an append-only, hash-chained audit trail underneath every number.

37
Tables
433
Tests · green
18
Migrations
27
Modules
CI ✓
MIT · Python 3.11+
Synthetic data — not for regulatory reliance

§01 · What it does

Eleven compliance domains, each encoded to the citation

Every module maps to a real regulatory reference and is exercised by a build phase and, where relevant, a CLI command.

FAR 31.205

Allowability filter

The five-part allowability test, stamped onto every transaction at capture as a structured vector — reasonableness, allocability, CAS/GAAP, the unallowable Chart-of-Accounts map, and contract-clause overrides.

Phase 2 · 18 FAR 31.205 categories seeded
SF 1408

Adequacy self-check

The six pre-award accounting-system criteria run as assertions against the live database — segregation, job-cost accumulation, pool allocation, unallowable exclusion, the close gate, and billing tie-out.

Phase 6 · govcon sf1408
CAS · TINA

Dated-threshold engine

CAS coverage tier and TINA applicability decided against the threshold in force on the award date — the 2026 NDAA resets ($2.5M→$10M TINA, $7.5M→$35M CAS) as versioned rules, evaluated per contract action.

Phase 7 · never a hard-coded scalar
FRINGE · OH · G&A

Indirect rate engine

Three-tier rate calculation with provisional-to-final true-up and fully-burdened cost. Every run stamps its inputs so any figure reproduces from its own record eighteen months later.

Phase 4 · reconstruct_run()
ICE A–O · §11

Schedules & period close

Ten ICS/ICE schedules generated as structured data, gated on a period-close mechanism whose three-way GL/JCL/billing reconciliation must pass before a period locks.

Phase 5 · govcon export 2026 G
TINA · 15.403-4

Defective-pricing sweep

The deterministic post-award sweep: each locked baseline assumption compared against subsequent ledger activity, one reproducible finding row per comparison — the log is the audit trail.

Phase 8 · certification gated on the sweep
CDA · EICHLEAY

Claims & delay damages

REA-vs-CDA comparator with the DFARS absolute-value certification test, plus the three-step Eichleay unabsorbed-overhead calculator — refusing to run on unreconciled inputs or undocumented entitlement.

Phase 9 · ABS(inc)+ABS(dec), never net
PBR · §13

Monitoring & deadlines

Provisional-billing-rate fluctuation monitoring during the year, and an audit-response simulator that escalates T-30/14/7/3/1 and blocks submission without a recorded management-review sign-off.

Phase 11 · the missed deadline is the real risk
CAS 407

Standard costing

Six textbook variance calculators — material price/usage, labor rate/efficiency, two-way overhead spending/volume — with one sign convention, computed independently of the allowability layer.

Phase 12 · standard − actual, positive = favorable
FAR 15.404

Proposal pricing analysis

The four proposal-evaluation determinations — price-vs-cost analysis, the subcontractor certified-data threshold keyed to TINA, weighted-guidelines profit (the DD-1547 / DFARS 215.404-71 factor ranges plus facilities capital), and cost realism rolling proposed costs up to a probable cost — each grounded to its subsection with its own reasons and caveats. The related facilities capital cost of money (DD Form 1861, FAR 31.205-10 / CAS 414) is computed as an allowable cost, distinct from the weighted-guidelines facilities-capital profit factor.

Phase 13 · probable cost, not proposed
CROSS-CUTTING

Hash-chained audit trail

Every write captured in a SHA-256 chained log — tamper-evident by construction, contiguity-checked, and verifiable on demand. The foundation the other ten modules are built on. Try tampering with it below ↓

Phase 1 · govcon audit verify

§02 · How it's built — the data flow

Compliance enforced at the edge, not at reporting time

A transaction is validated and classified the moment it's written. Click a stage to inspect it — by the time anything reaches a report, the rules have already held.

Append-only audit trail — live inspector
Layer 1 · sayTyped service errorA friendly, explanatory exception fires first in normal use — it tells you what broke and how to fix it.
Layer 2 · refuseDatabase triggerA RAISE(ABORT) trigger backstops the rule against raw SQL — the guarantee holds even if the app is bypassed.
Layer 3 · proveQueryable audit recordThe hash-chained trail shows who/what/when with before-and-after — the evidence a DCAA reviewer would ask for.
Phase 0–1
Ledger schema + audit trail
Phase 2
FAR 31 allowability
Phase 3
Modified-CAS consistency
Phase 4
Indirect rate engine
Phase 5
ICE + period close
Phase 6
SF 1408 self-check
Phase 7–8
CAS/TINA + sweep
Phase 9
REA/CDA + Eichleay
Phase 10–12
Polish · PBR · std cost

§03 · How to run it

Clone, sync, and watch it prove itself

Everything runs locally on SQLite with zero configuration. The demo builds a synthetic contractor from scratch and takes it through the whole pipeline.

quick start
$ uv sync                              # Python 3.11+, managed by uv$ uv run pytest                        # 433 tests — one per business rule$ uv run python scripts/demo.py        # end-to-end synthetic world → demo_out/$ govcon serve --demo                  # the guided web workbench (+ /api/ask if a key is set)$ govcon rules show CAS_COVERAGE        # read the rules-as-data decision table$ govcon watch scan                    # Federal-Register suggestions for human review
command tour
$ uv run govcon sf1408            # SF 1408 six-criteria self-check$ uv run govcon audit verify      # recompute the audit-trail hash chain$ uv run govcon contract 1        # one contract, inception to present$ uv run govcon export 2026 G     # render a schedule (--format md|xlsx)$ uv run govcon reverify          # regulatory re-verification watch list$ uv run govcon about             # the tool's own limitations, stated plainly

Database defaults to sqlite:///govcon.db — override anything with the GOVCON_DB_URL environment variable.

§04 · Why it's trustworthy

Built to be defended under audit

Dated regulatory thresholds — try it

award date: 2025

Every dollar figure carries its effective date, source citation, and legal status. Drag the award date — the engine picks the threshold in force, never a hard-coded scalar.

202420252026
TINA — certified cost or pricing data
CAS — full-coverage trigger
Rule in force

Penny-exact by construction

Decimal end to end via a custom SQLAlchemy type that stays lossless on SQLite — floats are rejected at the bind boundary, not tolerated.

Every number reproduces

Rate runs, Eichleay claims, and TINA sweeps store their inputs, so any historical figure recomputes from its own record — proven by tests that mutate the world afterward.

2 + 3

Adversarially stress-tested

A four-agent adversarial pass found and fixed two critical and three high-severity bugs in the author's own tool — each pinned by a regression test.

§05 · Beyond v1 — enterprise & AI

From a CLI engine to an explainable, adaptable tool

The core stays deterministic and grounded; these layers make it usable by anyone, adaptable when regulation moves, and honest about what an AI can and cannot do.

Guided web workbench

govcon serve puts a browser UI over the same pure services — enter a contract, get the CAS/TINA determination with reasons, caveats, and the citation, explained in plain language. Self-contained, WCAG 2.2 AA.

Rules as data

The CAS coverage order and TINA exception ladder live as versioned, dated, append-only decision tables, not hard-coded logic — 239-case parity against a frozen oracle proves identical behaviour. Regulation changes shape via a reviewed migration, never a silent edit.

Learn in the flow

A plain-English glossary, six worked scenarios that run live against the engine, and five persona depths (Newcomer → Auditor) surface exactly as much of the reasoning as each reader needs.

Regulation watch

A Federal-Register watcher records rule changes as suggestions for a human to verify — never auto-applied. Its first live scan caught the CAS-to-GAAP final rule (effective 2026-08-07).

Multi-user ready

Per-workspace database isolation, a verified dual-backend port to PostgreSQL (26 plpgsql triggers, advisory-locked audit chain), and optional per-user JWT auth — every audit row attributed to a cryptographically verified actor, not a spoofable header. Authentication and real data stay separate switches: still advisory, synthetic-data only.

Grounded AI assistant

Four surfaces over one kernel — ask, tutor (taught at your persona depth), draft-rule, and draft-narrative — each calls the deterministic engine as a tool and never decides. A grounding verifier withholds any number or citation the engine didn't return; the authoritative determination is always shown beside the prose, and streams over SSE as it resolves. Rule-drafting can apply nothing — it only proposes a human-reviewed migration.

§06 · Say it in plain English

Every term on this page, without the jargon

Government cost accounting has its own language. Each entry below gives the plain-English meaning, why it matters, and a concrete example — the dotted-underlined terms elsewhere on this page jump straight here.

20 of 20 terms
The rules of the game
FAR Part 31The federal rulebook deciding which costs the government pays back — and which come out of your pocket.

Companies on government contracts can't bill everything they spend. FAR Part 31 sorts every cost into allowable (the government reimburses it) and unallowable (the company eats it — things like entertainment, lobbying, or alcohol).

Why it matters

Billing unallowable costs, even by accident, means paying the money back later — sometimes with penalties — when an auditor finds it.

Example
A $50,000 legal bill can go either way: fees for negotiating a fair price adjustment are billable; fees for suing the government are not. This engine tags every cost as billable-or-not the moment it's entered, against 18 pre-loaded "never billable" categories.
The five-part allowability testFive questions every cost must answer before it counts as billable.

Before a cost is billable it must pass five checks: Is the amount sensible? Does it belong to this contract, or to shared overhead? Is it booked under the right accounting rules? Is it on the government's never-billable list? And does this contract's fine print say otherwise?

Why it matters

Deciding this months later, from memory, is how mistakes happen. Answering all five at the moment the cost is recorded makes the answer part of the permanent record.

Example
The engine stamps the five answers onto every transaction as it's saved — like a customs stamp in a passport. Nothing enters unstamped: even raw database edits are blocked.
SF 1408The government's checklist for "is your accounting system good enough to win this contract?"

Before awarding certain contracts, the government checks whether a company's accounting system is designed correctly — six checks such as "do you keep each contract's costs separate from overhead?" and "do the books tie out to what you billed?" It tests the design, not whether you've ever made a mistake.

Why it matters

Fail it and you can't win cost-reimbursable government work at all. It's the entry ticket.

Example
govcon sf1408 runs all six checks against the live database and answers pass or fail — the same walkthrough a government reviewer does, runnable on demand.
CAS — Cost Accounting StandardsExtra bookkeeping rules that switch on once contracts get big.

Above certain contract sizes, the government requires standardized accounting methods so companies can't shuffle costs to their advantage. "Modified" coverage means four core rules apply; "full" coverage means all of them — plus a formal filed description of how you do your accounting (the DS-1, below).

Why it matters

As of July 2026 the triggers are $35 million (modified) and $100 million (full) per contract — set by a 2026 law, though the detailed regulation implementing it is still a draft. Honest reporting says so.

Example
Win a $50M contract → four core standards apply. Win a $110M contract → everything applies, and the disclosure-statement obligation kicks in. The engine decides from the award date and dollar value, and always says how settled the rule it used is.
TINA — certified cost dataAbove a certain price, you must show your homework — and swear it's accurate.

For large negotiated contracts, the company must hand over the cost data behind its price and certify it is accurate, complete, and current. If that data turns out wrong, the government can take money back (see defective pricing, below).

Why it matters

The bar keeps moving: $2 million historically, $2.5 million from late 2025, and $10 million from July 2026. Which bar applies depends on the date — using the wrong one is a common, expensive error.

Example
An $8M task order in August 2026 needs no certified data — the bar that day is $10M. The identical order in June 2026 would have needed it (bar: $2.5M). The engine picks the bar in force on the exact date; there is no hard-coded number anywhere.
Dated thresholds & their legal statusEvery dollar limit in the engine knows when it applies — and how "final" the rule behind it is.

Government dollar limits change over time, and the rules behind them aren't equally settled: some are laws, some are finished regulations, some are still drafts, some are temporary Defense-Department workarounds ("class deviations"), and some are last year's number carried forward because this year's update was formally skipped.

Why it matters

Presenting a draft rule as settled law is exactly the kind of error auditors flag. Trustworthy software tells you how solid each number is, not just the number.

Example
The $10M certified-data bar is technically a temporary Defense-Department workaround — in force, but the permanent regulation hasn't caught up. Every answer the engine gives carries that fine print automatically. Try the slider above: 2026's numbers arrive with a different status chip than 2025's.
DS-1 disclosure statementA formal, filed description of exactly how your company does its accounting.

Once a company crosses into full CAS coverage (a $100M+ contract), it must file a DS-1: a document describing precisely how it estimates costs, spreads overhead, depreciates equipment, and so on. From then on the company is held to its own description.

Why it matters

Change your accounting method after filing and you may owe the government whatever the change cost it. The DS-1 turns "our practices" from folklore into a binding document.

Example
The engine flips a disclosure-required flag the moment a contract determination crosses the full-coverage line.
Executive compensation capA legal ceiling on how much of any one person's pay can be billed to the government.

A company may pay its executives whatever it likes — but only a capped amount per person, per year, can be charged to government contracts. The cap is set annually: $646,000 for 2024, $671,000 for 2025.

Why it matters

Every dollar of pay above the cap must be carved out of billings. Miss it and it's a guaranteed audit finding.

Example
The engine warns at 80% and 90% of the cap and automatically reroutes anything over 100% to "unallowable." The 2026 cap hadn't been officially published as of July 2026 — so the engine refuses to guess: it flags the gap rather than inventing a number.
How costs actually work
Direct vs indirect costCosts you can point at one contract, vs costs shared by everything.

A direct cost belongs to one specific contract — an engineer's hours on Project X, parts bought for it. An indirect cost keeps the whole company running — rent, HR, the finance team — and must be shared across all contracts by a formula.

Why it matters

Mixing these up is the fastest way to overbill one customer and underbill another. Keeping them separate is the very first thing the SF 1408 checks.

Example
$50K of engineering labor on contract ABC = direct. $120K of office rent = indirect, spread over every contract through the overhead rate.
Fringe, Overhead & G&A ratesThree percentage "markups" that fairly share company-wide costs across contracts.

Shared costs are distributed through three stacked rates: Fringe (benefits — health insurance, payroll taxes — as a percentage of wages), Overhead (the cost of doing the work — facilities, supervision), and G&A (the cost of running the company — executives, accounting, HR).

Why it matters

These rates decide what a $100 hour of labor really costs the government — often $150+ once the stack is applied. An error compounds across every invoice.

Example
With 20% fringe, 25% overhead, and 10% G&A, $100 of direct labor becomes $165 fully loaded ($100 × 1.20 × 1.25 × 1.10 — each rate stacks on the last). The engine derives each rate from the actual ledger and stamps the inputs, so any rate can be re-computed from its own record years later.
Provisional vs final rates (the true-up)You bill all year on estimated rates, then square up when the real numbers land.

Nobody knows the true overhead rate until the year ends, so companies bill using estimates ("provisional" rates), then compute the real ("final") rates from actual costs — and settle the difference. That settling is the true-up.

Why it matters

Bill at 24% all year when the real rate turns out to be 22%, and you owe the government the difference on every invoice you sent.

Example
The engine computes both, and its monthly monitoring flags mid-year drift — actuals running well under or over the estimate — so the surprise surfaces in November, not at the audit.
Standard costing & variancesCompare what things should have cost against what they did — six standard ways.

Set a standard ("this part should take 2 lbs of material at $10/lb and 3 hours at $20/hr"), then measure the six classic gaps between plan and reality: material price and usage, labor rate and efficiency, overhead spending and volume.

Why it matters

Variances tell you why a job cost more — paid too much, used too much, or worked too slowly — instead of just "it cost more."

Example
Bought material at $9.50 against a $10 standard → a favorable price variance. Used 2,100 lbs where 2,000 was standard → an unfavorable usage variance. One sign convention everywhere: positive = good.
Filings & claims
Incurred Cost Submission (ICE schedules)The giant annual reconciliation package every cost-reimbursable contractor owes the government.

Six months after year-end, contractors file a package proving what they actually spent, what rates that implies, and that everything ties together. "ICE" is the government auditors' standard spreadsheet format — schedules labeled A through O (this engine generates ten of them).

Why it matters

It's how a year of estimated billing gets squared with reality — and it's the single document auditors mine hardest for findings.

Example
govcon export 2026 G generates Schedule G — the month-by-month proof that the ledgers tie out — straight from the books.
Period close & three-way reconciliationEach month gets locked — but only after three sets of books agree to the penny.

Before a month can close, three views of the same money must match: the general ledger (all spending), the job-cost ledger (spending by contract), and what was actually billed. If they agree, the month locks and can never be silently edited. If not, it stays open until fixed.

Why it matters

Reports built on unreconciled books inherit whatever error sits upstream. Locking closed months prevents the "quiet fix" auditors distrust most.

Example
June: the ledger says $85K on contract ABC, the job-cost ledger says $85K, and $80K was billed (within basis) → the month may close. Any later correction must be a new, visible entry — never an edit.
Defective pricing & the sweepAfter the handshake, check: did we know something we didn't tell them?

If certified cost data turns out to have been wrong, that's defective pricing. A "sweep" is the self-audit: take every assumption in the proposal and comb the books for anything that happened before the price was agreed that contradicts it.

Why it matters

Government auditors run this exact exercise after award. Running it on yourself first — and keeping the log — is the defense.

Example
The proposal assumed $50K for a part; before the price was agreed, the books show a $55K purchase of that part → flagged. The engine logs every comparison it made, including the ones that found nothing, so the sweep itself is provable.
REA vs CDA claimTwo roads when a contract change costs you money: negotiate, or formally dispute.

An REA (request for equitable adjustment) is the cooperative route — "this change cost us more; let's adjust the price." A CDA claim is the legal route — a formal dispute with statutory deadlines and interest. Both need an executive's certification above certain dollar lines ($350K for REAs, $100K for claims).

Why it matters

The certification math trips people: you add the sizes of the increases and the decreases — |+$300K| + |-$80K| = $380K — never the net ($220K). Netting understates the total and skips a legally required certification.

Example
The engine computes the total the correct way by construction. For claims at or below $100K, it derives the government's 60-day response deadline from the date the claim lands; for larger claims the contracting officer must set a firm decision date instead.
Eichleay formulaThe court-approved math for what a delay cost you in home-office overhead.

When the government freezes work but keeps you on standby, headquarters costs keep burning with no work to absorb them. Eichleay is the only formula federal courts accept for that damage: your contract's share of overhead → per day → times the delay days.

Why it matters

Courts also demand strict preconditions — a government-caused delay, being kept on standby, and being unable to take replacement work. A number without those proven is worthless.

Example
The contract billed $200K of the company's $1M total during performance, with $150K of home-office overhead → the contract's share is $30K. Across 300 performance days that's $100 per day; a 45-day delay = $4,500. The engine refuses to compute from unreconciled books and flags any unproven precondition.
Who's checking — and the proof
DCAA vs DCMAOne agency audits you; a different one actually decides.

DCAA are the government's auditors: they examine your books, question costs, and write reports — but can't make binding decisions. DCMA administers contracts: its contracting officers read those reports and issue the decisions that actually bind both sides.

Why it matters

Knowing which one you're facing changes the play: you persuade DCAA with records; you settle with DCMA.

Example
DCAA questions $50K of bonuses in your annual submission → DCMA's officer reads the report, settles at $25K, and issues the binding decision.
Provisional-billing-rate monitoringWatch your estimated rates all year, so drift never becomes an audit surprise.

Because you bill on estimated rates all year (see provisional vs final, above), someone should check every month whether reality is drifting from the estimate — and write the explanation down while it's fresh.

Why it matters

The auditor's question is always "you were 9% under plan in November — why?" The winning answer is a note written in November.

Example
The engine compares actual year-to-date overhead against the estimate each month and opens an "explain this" note whenever drift passes a set point (5% by default — an adjustable knob, not a legal figure).
Hash-chained audit trailEvery change to the books gets a tamper-proof fingerprint, chained to the one before it.

Every write to the ledger is recorded with a cryptographic fingerprint (a SHA-256 hash) that also bakes in the previous record's fingerprint — forming a chain. Alter or delete any historical record and every fingerprint after it stops matching. There is no way to quietly rewrite history.

Why it matters

"Trust me" doesn't survive an audit. "Run the verify command and check the chain yourself" does.

Example
It's the interactive demo on this page — go tamper with entry 05 in the chain above and watch every later link break in red.