ENGINE 34

SFS-E34-SOV · COMMITMENT CONTROLS · REV 2026-07-24 · PRODUCTION

PRODUCTION = runnable end-to-end, CI-backed, full test suite passing. All data fictional and seeded.

Subcontract SOV & Change Orders

Did the contract move only on approved paper, and does every billed figure re-derive from it?

A residential developer buys construction through subcontract commitments -- a contract with a schedule of values (SOV) breaking the price into lines, change orders that amend it, and a monthly pay application that bills against it line by line -- and every column on that chain is derived from a column beneath it and typed by hand somewhere. This engine reads the six artifacts a commitment billing record carries -- the commitment register, the change-order log, the schedule of values, the pay-application register, the committed-cost roster and the lien-release register -- and runs twenty-nine deterministic controls over them. Is the billing file complete and one of each artifact, are the commitment ids unique and their terms readable, and does the committed-cost roster tie the register and every revised contract re-derive as original plus net approved change orders. Does every change order name a registered commitment, number sequentially as #-N, carry a known status, and is no commitment born from a change order or misnamed off the project-vendor-count pattern. Do the SOV lines foot exactly to each original contract, does every pay-app line re-derive as previously billed plus this period with its percent as floored basis points, do the headers foot, and is the current request exactly completed minus previously billed. Is every line billed within its scheduled value at exact <=, does the balance to finish re-derive, is retention the contract rate on the request, do the sales tax and the payment due including tax re-derive, does each app open at the prior app's close with the sequence numbered 1..N and periods that advance, do the roster Total columns foot, and does every conditional lien release tie the certified payment due exactly once. It compares every figure with exact ==, tests the billing cap with exact <=, counts only approved change orders as moving the contract, and never writes to a source artifact.

A pay application is a page of derived columns, and none of the ways it goes wrong look wrong on the page. The contract drifts from its paper: a pending change order is counted as if approved, or a soft-cost credit is booked as a brand-new commitment instead of a #-N amendment, and the committed-cost roster no longer states what was actually signed. The billing chain breaks a line at a time: a completed-to-date that stops equalling previously billed plus this period, a line that quietly bills past its scheduled value, a month whose previously-billed no longer equals last month's total completed -- and the overbilling compounds under a header that still foots. And the money math is asserted rather than derived: retention that stops being the contract rate on the request, sales tax off the rate, a payment due that is not request minus retention plus tax, and a conditional release signed for an amount nobody recomputed. The engine rebuilds every derived figure from the base facts through the same billing kernel that produced the baseline and compares with exact ==, tests the per-line cap with exact <= because overbilling foots, counts only approved change orders as moving the contract, and ships a planted-defect file for every registered control. A line billed past its schedule, a contract moved on a pending order, or a release signed for the wrong amount stays invisible until someone recomputes the certificate the developer already paid on.

Run it Book a consultation

Architecture

functional block stack · static overview
Structural Precondition Commitment Register & Roster Change-Order Gate Schedule of Values Pay-App Arithmetic Billing-to-Date Cap Retention Sales Tax & Payment Due Pay-App Roll-Forward Portfolio Footing Conditional Release Cross-Tie substrate: seeded fictional data

Select a layer

Eleven control families run in registry order over each billing file. The first proves the others had something to read, because a control that passes on an absent artifact reports assurance it never performed.

Key specifications

at a glance
10,4121
Tests
the collected checks that pin this engine's behavior
292
Controls
independent rules run over every billing file
113
Families
groups of controls, each answering one question
304
Billing files
one clean baseline plus twenty-nine planted-defect files
65
Artifacts read
commitment register, change-order log, schedule of values, pay-application register, committed-cost roster, lien-release register
06
Tolerance
a figure a cent off the re-derivation is a break, not a rounding band

What it does for you

plain terms

A residential developer buys construction through subcontract commitments: a contract with a schedule of values breaking the price into lines, change orders that amend it, and a monthly pay application that bills against it line by line. Every column on that chain is derived from a column beneath it, and every one of them is typed by hand somewhere. Three failures hide inside that, and none of them look wrong on the page. The contract drifts from its paper: the revised commitment stops equalling original plus net approved change orders -- a pending order counted early, a soft-cost credit booked as a brand-new commitment instead of a #-N amendment -- and the committed-cost roster no longer states what was signed. The billing chain breaks a line at a time: a completed-to-date that stops equalling previously billed plus this period, a line that quietly bills past its scheduled value, a month whose previously billed no longer equals last month's total completed -- and the overbilling compounds under a header that still foots. The money math is asserted, not derived: retention off the contract rate, sales tax off the rate on the taxable request, a payment due that is not request minus retention plus tax, and a conditional release signed for an amount nobody recomputed. None of these are judgment calls. They are equalities and a cap -- a completed against previously billed plus this period with exact ==, a line completed against its scheduled value with exact <=, a revised contract against original plus net approved changes -- which a deterministic control settles better than a workbook inherited by whoever bills the job this month.

The seeded demo runs every control over every billing file7. The CLI generates thirty fictional billing files -- one clean baseline and one carrying each of the twenty-nine planted defects, on the fictional Brightwater Commons project -- then runs all twenty-nine controls over each. The clean file returns PASS with no flags; every defect file returns REVIEW or FAIL and names the control it tripped along with the reason that control exists.

Only an approved change order moves the contract, and the cap is per line8. One defect file counts the pending winter-protection order as if approved, and cmt_revised_rederives recomputes the net from the change-order log through the shared kernel -- approved orders only -- and fails. Another bills the electrical rough-in line to 90,000 against its scheduled value, and because the whole chain is re-derived, only cap_not_overbilled fires at exact <= while every footing figure stays consistent.

The billing chain is recomputed, not read back9. A defect file re-types this period's work on a concrete line after the completed column was footed, so completed-to-date no longer equals previously billed plus this period. line_completed_rederives rebuilds the figure as D+E and fails, proving the pay app is recomputed from the base facts beneath it rather than trusted as stated.

Functional block diagram

engineering · each block links to its source
Functional block diagram of the Subcontract SOV & Change Orders engine billing files billing files billing files billing files billing files billing files billing files billing files billing files billing files billing files resolves resolves resolves resolves resolves resolves resolves resolves resolves resolves findings findings findings findings Seeded Billing Files StructuralPrecondition Commitment & Roster Change-Order Gate Schedule of Values Pay-App Arithmetic Billing-to-Date Cap Retention Tax & Payment Due Pay-App Roll-Forward Portfolio Footing ConditionalRelease Tie Artifacts &Billing Kernel Verdict and Findings SFS-E34-SOV · FUNCTIONAL BLOCK DIAGRAM · REV 2026-07-24

Plain terms

  • Seeded Billing Files. fictional subcontract billing files enter the control registry
  • Structural Precondition. is the billing file complete, one of each artifact
  • Commitment & Roster. are the commitments sound and the roster re-derived
  • Change-Order Gate. does every change order clear the authorization and naming gate
  • Schedule of Values. do the SOV lines foot to the original contract
  • Pay-App Arithmetic. does every pay-app line and header re-derive
  • Billing-to-Date Cap. is every line within its scheduled value
  • Retention. is retention the contract rate on the request
  • Tax & Payment Due. do the sales tax and payment due re-derive
  • Pay-App Roll-Forward. does the billing sequence roll forward with no break
  • Portfolio Footing. do the roster Total columns foot
  • Conditional Release Tie. does the release tie the certified payment, exactly once
  • Artifacts & Billing Kernel. the six artifacts and shared kernel every rule resolves against
  • Verdict and Findings. every finding, with the reason it exists, ends at a person

Engineering

  • Seeded Billing Files. generate_corpus writes one clean baseline plus one planted-defect file for every registered control, thirty files in total, for fictional developers on the fictional Brightwater Commons project in the State of Marran. Only the commitments, the change orders, the SOV lines and each pay app's work-this-period figures are stated; previously billed, completed, percents, balances, the header and request / retention / tax / payment-due chain, the committed-cost roster and the conditional releases are re-derived through the same billing kernel the engine later recomputes with, so the relationships the engine tests are the same relationships that produced the data.
  • Structural Precondition. One control. FAILs a file missing any of the six artifact types or carrying a duplicate, so no downstream rule holds vacuously on absent evidence.
  • Commitment & Roster. Four controls: unique commitment ids, the required terms present, the roster tying the register, and every revised contract equal to original plus net approved change orders.
  • Change-Order Gate. Five controls: a registered commitment named, sequential #-N numbering, a known status, no commitment born from a change order, and an id that composes from project, vendor and sequential count.
  • Schedule of Values. Two controls: every SOV line unique and attributable to a registered commitment, and each commitment's lines footing with exact == to its original contract amount.
  • Pay-App Arithmetic. Five controls: valid line references, completed as D+E, the percent as floored basis points (a flag), the header footing to its lines, and the request as completed minus previously billed.
  • Billing-to-Date Cap. Two controls: no line billed past its scheduled value tested with exact <=, and a balance to finish that re-derives as scheduled minus completed.
  • Retention. Two controls: the rate on the standard 5% / 10% menu (a flag), and the retention held equal to the contract rate on the current request with truncating basis-point arithmetic.
  • Tax & Payment Due. Two controls: sales tax as the contract rate on the taxable request (which equals the request), and payment due including tax as request minus retention plus tax.
  • Pay-App Roll-Forward. Two controls: each app's previously billed equal to the prior app's total completed (the first at zero), and the app numbers 1..N with no gap or repeat and periods that advance.
  • Portfolio Footing. Two controls: the three Total columns footing from the commitment rows, and the revised total equal to original total plus changes total.
  • Conditional Release Tie. Two controls: exactly one conditional release per pay app, and each release signed for the certified payment due including tax.
  • Artifacts & Billing Kernel. The commitment register carries each commitment's id, vendor, project and vendor codes, origin, original contract and retention and tax rates; the change-order log carries each order's commitment, number, status and amount; the schedule of values carries the per-line scheduled values; the pay-application register carries each app's lines and header totals; the committed-cost roster carries the per-commitment revised amounts and the three Total columns; and the lien-release register carries the conditional release exchanged for each payment. Every commitment, change-order, SOV, line, cap, retention, tax, roll-forward, portfolio and lien control resolves against these through the shared billing kernel.
  • Verdict and Findings. Findings roll up per billing file: any FAIL is FAIL, FLAGs without FAILs are REVIEW, clean is PASS. The CLI exit code is the verdict, so a pipeline can gate on it. Reports carry no timestamps or absolute paths, which is what makes the committed report diffable.

Instruction set

every public command
CommandOperationOutputExitArtifacts
python run.py
regenerate the seeded fictional corpus, run all twenty-nine controls, write both reportsper-file verdicts and every actionable finding, then the overall verdict2 for the bundled corpus, which carries a planted defect for every control by designsov_report.json, sov_report.md, samples/
python -m sov_engine samples
analyze an existing folder of billing files without regenerating itper-file verdicts and findings0 PASS / 1 REVIEW / 2 FAIL / 3 usagenone unless --json or --md is passed
python -m sov_engine samples --generate --quiet
regenerate the corpus and print only the overall verdicta single verdict line0 PASS / 1 REVIEW / 2 FAIL / 3 usagesamples/
python -m pytest sov_engine/tests -q
run the full test suite for this engine10412 passed0 when every test passesnone

Benchmarks

measured demo results
MeasureResult
Engine tests1010,412 tests collected
live collection from the engine directory
Registered controls1129 controls
counted from the registry, not from documentation
Planted defects1229 defect files
every registered control has at least one file that trips it
Control coverage13100 percent of controls with a planted defect
no control ships without a file demonstrating it firing

Control characteristics

engineering

Plain terms

The engine has no write path and therefore no autonomy to gate. It produces findings; a person decides whether a pay application is certified and whether a contract, a change order or a release is corrected.

Engineering

Deterministic envelope. seeded fictional inputs, read-only operation, offline default mode.

Demo gate. FAIL on the bundled corpus, by design -- it carries a planted defect for every registered control

SeverityVerdictAction
No findings above PASSPASScarry the mechanically clean billing file into the documented sign-off and payment review
One or more FLAG, no FAILREVIEWa human resolves each flag; a stated percent-complete that does not re-derive and a retention rate off the standard 5% / 10% menu both land here
One or more FAILFAILthe figure is not certified until the failing control is cleared -- a line billed past its schedule, a contract moved on a pending order, a broken roll-forward, a release that does not tie, or a figure that does not recompute

Operating limits

what it refuses to do

See it run

control architecture
Corporate control-gate architecture for Subcontract SOV & Change Orders: a transaction passes through authorization, rule validation, evidence matching, and human release before verified reporting.
The Subcontract SOV & Change Orders engine tile states the question that has to hold line by line: every schedule of values foots to its contract, the revised commitment moves only on approved change orders numbered as #-N, every pay-app column re-derives from the base facts, no line bills past its scheduled value, and the conditional release ties the certified payment due exactly once.

Integration

how to run it

Distribution: public repository, MIT license.

python run.py
python -m pytest sov_engine/tests -q
Source on GitHub Engine README All tests, by engine Run in Codespaces
Substantiation
  • 1python -m pytest --collect-only -q -o addopts= (sov-commitment-automation/)
  • 2len(sov_engine.engine.REGISTRY)
  • 3distinct rule-id prefixes in sov_engine.engine.REGISTRY
  • 4samples/*.json after python run.py
  • 5len(sov_engine.model.DOC_TYPES)
  • 6sov_engine/tests boundary tests on the cent and the <= billing cap
  • 7python run.py (sov-commitment-automation/); sov_engine/tests planted-defect suite
  • 8sov_engine/generate.py DEFECTS net_changes_wrong -> cmt_revised_rederives; line_overbilled -> cap_not_overbilled
  • 9sov_engine/generate.py DEFECTS line_completed_wrong -> line_completed_rederives
  • 10python -m pytest --collect-only -q -o addopts= (sov-commitment-automation/)
  • 11len(sov_engine.engine.REGISTRY)
  • 12len(sov_engine.generate.DEFECTS)
  • 13sov_engine/tests: every registered rule has a planted defect
  • 14sov-commitment-automation/README.md and sov_engine read-only / determinism tests
  • 15sov_engine/model.py DOC_TYPES
  • 16sov_engine/engine.py line_, cap_ and co_ families
  • 17sov_engine/engine.py lien_ family and model.py scope note
  • 18sov_engine/generate.py and sov_engine/engine.py ret_ / tax_ families

Show us where the hours go.

One conversation: you describe the work that consumes your team's month; we tell you plainly what this engine can take over, what it can't, and what a scoped first phase would cost. Your people keep approval authority.

Book a free consultation