ENGINE 38
SFS-E38-SRG · CAPITAL AUTHORIZATION · REV 2026-07-24 · PRODUCTION
PRODUCTION = runnable end-to-end, CI-backed, full test suite passing. All data fictional and seeded.
Capital Spending Request Gate
Was capital committed only after its gate, and does every standard re-derive?
A developer commits capital to a project only through an ordered sequence of Investment Committee phase gates, and every Spending Request that opens a gate has to conform to a written set of underwriting standards -- dollar triggers that demand approval before the first spend, contingency floors, a standard growth assumption, prescribed fee formulas, a phase-indexed estimate basis and deliverable matrix, and a comparison basis that switches once feasibility is waived. This engine reads the nine artifacts the request record carries -- the project profile, the approval log, the spend ledger, the cost budget, the deliverable checklist, the bid schedule, the plan comparison, the gate summary and the event log -- and runs twenty-nine deterministic controls over them. Is the package complete and the review date legible, did the cumulative pursuit-cost, the first non-refundable-deposit and the cumulative refundable-deposit triggers each fire only after the Initial Commitment approval, were the five phase gates well-formed and entered in date order with no phase skipped and the current phase itself approved, does the stated gate summary recompute from the approvals and the checklist, is every prior-phase deliverable complete on the estimate basis the phase prescribes, do the hard and soft contingencies meet their regional floors to the cent with the construction-start site/vertical split footing, is the growth assumption the standard default or documented, do the CM Fee, the Development Fee, the total and every plan-comparison variance re-derive, is the comparison basis on the right side of the feasibility-waiver switch, did every interim-trigger event produce an interim request, and is the construction-start bid coverage at its threshold with a bindable GMP where the delivery model requires one. It compares every figure with exact == and tests every floor cross-multiplied in integer cents, holds the trigger breach against the approval date so approval on the breach date satisfies the gate and one day later does not, and never writes to a source artifact.
A capital Spending Request looks like the most reviewed document a developer produces: a bound package with an approval log, a footed cost budget and a gate summary that says every phase cleared. That is exactly why it drifts. None of the ways it goes wrong look wrong in a bound package. Pursuit costs accumulate past their trigger, or a deposit goes non-refundable, before the Initial Commitment Request was ever approved -- and by the time the package is assembled the approval that is in it post-dates the spend it was supposed to authorize. A contingency sits a cent under the floor, a fee is stated a little off its formula, the growth assumption departs from the standard with no market support documented, the comparison still points at the template after feasibility was waived -- each figure plausible, none re-derived. And the gate summary calls every phase cleared on a determination nobody rebuilt from the approvals and the deliverable checklist underneath it. The engine re-derives the cumulative spend in date order to find the exact entry that crossed each trigger and holds it against the approval date, tests every floor cross-multiplied in integer cents so a contingency met to the cent passes and a cent under fails, rebuilds every phase's gate-cleared flag through the same standards kernel that produced the data, ships a planted-defect file for every registered control, and states its benchmark as a command rather than a claim. Capital committed before its gate, a standard drifted a cent off its formula, or a gate summary asserted rather than recomputed is invisible until someone rebuilds the request the committee already approved.
Architecture
functional block stack · static overviewSelect a layer
Ten control families run in registry order over each request package. The first proves the others had something to read and that the review date is legible, because a control that passes on absent evidence reports assurance it never performed.
Key specifications
at a glanceWhat it does for you
plain termsA developer commits capital to a project only through an ordered sequence of Investment Committee phase gates, and every Spending Request that opens a gate must conform to a written set of underwriting standards: dollar triggers that demand an approval before the first dollar is spent, contingency floors, a standard growth assumption, prescribed fee formulas, a phase-indexed estimate basis and deliverable matrix, and a comparison basis that switches once feasibility is waived. Whether the investment itself is worth making is genuine business judgment, and no control here opines on it. Three failures hide inside a bound package, and none of them look wrong. Pursuit costs accumulate past their trigger, or a deposit goes non-refundable, before the Initial Commitment Request was ever approved -- and by the time the package is assembled the approval that is in it post-dates the spend it was supposed to authorize. A contingency sits a cent under the floor, a fee is stated a little off its formula, the growth assumption departs from the standard with no market support documented, the comparison still points at the template after feasibility was waived -- each figure plausible, none re-derived. And the gate summary calls every phase cleared on a determination nobody rebuilt from the approvals and the deliverable checklist underneath it. None of these are judgment calls. They are date gates on a running total, equalities to the cent, floors cross-multiplied in integers, membership tests and re-derivations -- which a deterministic control settles better than a bound package inherited by whoever assembles the request this cycle.
The seeded demo runs every control over every request package7. The CLI generates thirty-one fictional request packages -- one clean baseline and thirty carrying a single planted defect each -- 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.
The trigger and the floor are boundary-exact8. The dollar trigger is a date gate on a running total and the contingency floor is a cross-multiplied equality. One defect file adds a pursuit invoice that pre-dates the Initial Commitment approval, carrying the cumulative total past the trigger on its own and tripping trg_ic_before_pursuit_spend; another drops the site contingency one cent under its construction-start floor and trips cty_hard_floor, while a contingency met to the cent passes -- proving each gate is settled at its boundary, not within a tolerance band.
The gate summary is recomputed, not read back9. A defect file flips a stated gate-cleared flag in the summary without changing the approvals or the checklist beneath it. seq_gate_summary_recomputes rebuilds every phase's determination from the approval log and the deliverable checklist through the shared standards kernel and fails on the one that disagrees, proving the summary is recomputed from the evidence rather than trusted as stated.
Functional block diagram
engineering · each block links to its sourcePlain terms
- Seeded Request Packages. fictional capital Spending Request packages enter the control registry
- Structural Precondition. is the request package complete and the review date legible
- Dollar Triggers. did each dollar trigger fire only after the IC approval
- Ordered Phase Gates. were the five gates entered in order and does the summary recompute
- Deliverable Matrix & Estimate Basis. is the checklist satisfied and the estimate basis right for the phase
- Contingency Floors. do the contingencies meet their regional floors to the cent
- Growth Assumption. is the growth assumption standard or documented
- Fee Formulas & Total. do the fees, the total and every variance re-derive
- Comparison Basis & Template Calendar. is the comparison basis right for the waiver and the template current
- Interim-Request Events. did every interim-trigger event produce an interim request
- Construction-Start Bid Coverage. is bid coverage at 80% with a bindable GMP where required
- Profile, Log, Budget & Standards. the artifacts and policy constants every rule resolves against
- Verdict and Findings. every finding, with the reason it exists, ends at a person
Engineering
- Seeded Request Packages. generate_corpus writes one clean baseline plus one planted-defect file for every registered control, thirty-one files in total. Only the profile, the approvals, the spend ledger, the cost stack, the checklist, the bid schedule and the comparison figures are stated as base facts; the CM and Development Fees and the footed total (the Development Fee solved as an integer fixed point of its own formula), the per-phase gate summary, and every plan-comparison variance are re-derived through the same standards kernel the engine later recomputes with, so the relationships the engine tests are the relationships that produced the data.
- Structural Precondition. One control. FAILs a file missing any of the nine artifact types or carrying a duplicate, and an unreadable as_of review date every calendar test is measured to, so no downstream rule holds vacuously on absent evidence.
- Dollar Triggers. Three controls: the cumulative pursuit-cost, the first non-refundable-deposit and the cumulative refundable-deposit triggers, each re-derived in date order and held against the Initial Commitment approval date with an approval on the breach date treated as satisfied.
- Ordered Phase Gates. Five controls: well-formed phase and approval rows, adjacent approvals in date order, no phase skipped, the current phase approved, and the stated gate summary rebuilt from the approvals and the checklist through the shared kernel.
- Deliverable Matrix & Estimate Basis. Five controls: known and unique checklist rows, every prior-phase deliverable complete, current-phase outstanding work flagged, and the estimate basis the one the current phase prescribes.
- Contingency Floors. Four controls: the hard and soft contingencies at their regional floors cross-multiplied in integer cents, the construction-start site/vertical split footing to the totals, and the separate Vanterre escalation reserve in place.
- Growth Assumption. One control: the revenue and cost growth assumptions are the standard 300 bps / 300 bps default, or a documented market-supported alternative the standards permit.
- Fee Formulas & Total. Four controls: the CM Fee at 1.5% of hard cost, the Development Fee at 3% of total-less-financing, the total footing to its seven components, and every plan-comparison variance as project minus plan, each compared with exact ==.
- Comparison Basis & Template Calendar. Two controls: the comparison basis matches the feasibility-waiver switch, and a template-basis comparison stands on the January/June refresh in force at the review date rather than a stale one.
- Interim-Request Events. Two controls: every logged event carries a known interim-trigger type, and each links to an interim request that is actually an interim approval in the approval log.
- Construction-Start Bid Coverage. Two controls, in effect only at construction start: at least 80% of hard cost or of cost line items competitively bid by GC model, cross-multiplied in integers, and a bindable GMP held by an owner-GC project.
- Profile, Log, Budget & Standards. The project profile carries the region, GC model, current phase and growth assumptions; the approval log carries every phase and interim approval with its date; the spend ledger carries each dated, trigger-sensitive spend; the cost budget carries the cost stack, contingencies, fees and estimate basis; the deliverable checklist, bid schedule, plan comparison, gate summary and event log carry the derived determinations. Every trigger, sequence, deliverable, contingency, fee, calendar, event and bid control resolves against these through the shared standards kernel, which holds the trigger thresholds, the floors, the fee rates and the growth default once.
- Verdict and Findings. Findings roll up per request package: 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 -- a change in the diff means a change in the controls, not a change in when the report was run.
Instruction set
every public command| Command | Operation | Output | Exit | Artifacts |
|---|---|---|---|---|
python run.py | regenerate the seeded fictional corpus, run all twenty-nine controls, write both reports | per-file verdicts and every actionable finding, then the overall verdict | 2 for the bundled corpus, which carries a planted defect for every control by design | srg_report.json, srg_report.md, samples/ |
python -m spending_engine samples | analyze an existing folder of request packages without regenerating it | per-file verdicts and findings | 0 PASS / 1 REVIEW / 2 FAIL / 3 usage | none unless --json or --md is passed |
python -m spending_engine samples --generate --quiet | regenerate the corpus and print only the overall verdict | a single verdict line | 0 PASS / 1 REVIEW / 2 FAIL / 3 usage | samples/ |
python -m pytest spending_engine/tests -q | run the full test suite for this engine | 10424 passed | 0 when every test passes | none |
Benchmarks
measured demo results| Measure | Result |
|---|---|
| Engine tests10 | 10,424 tests collected live collection from the engine directory |
| Registered controls11 | 29 controls counted from the registry, not from documentation |
| Planted defects12 | 30 defect files every registered control has at least one file that trips it |
| Control coverage13 | 100 percent of controls with a planted defect no control ships without a file demonstrating it firing |
Control characteristics
engineeringPlain terms
The engine has no write path and therefore no autonomy to gate. It produces findings; a person decides whether capital is committed and whether a phase gate is cleared.
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
| Severity | Verdict | Action |
|---|---|---|
| No findings above PASS | PASS | carry the mechanically clean request package into the documented Investment Committee sign-off |
| One or more FLAG, no FAIL | REVIEW | a human resolves each flag; a current-phase deliverable still outstanding and a plan-comparison template past its refresh both land here |
| One or more FAIL | FAIL | the figure or gate is not carried into the commitment until the failing control is cleared -- capital committed before its trigger, a phase out of sequence, a contingency under the floor, a fee that does not re-derive, or a gate summary that does not recompute |
- Read-only: request packages are parsed and never written back, so the engine cannot introduce the break it reports.
- Integer cents throughout, compared with exact == and floors tested cross-multiplied in integers; there is no tolerance band, and a cent under a floor is reported as a break.
- A figure that should be integer cents or basis points but is not produces an AMOUNT_INVALID finding contained to the one row it was read on, rather than being coerced into the number the engine is meant to audit.
- One standards kernel: the controls and the generator share spending_engine.standards, so a determination cannot disagree with the data that produced it.
- The dollar triggers and the contingency floors are boundary-exact: an approval dated on the breach date satisfies the trigger and a contingency met to the cent meets the floor, each one day or one cent short a failure.
- Deterministic and byte-stable: same inputs produce the same findings in the same order, with no timestamps or absolute paths in any output.
- Absent evidence is never a passing control; a missing artifact fails completeness rather than letting the controls that read it pass unread.
Operating limits
what it refuses to do- The engine never approves a Spending Request, commits capital, files an interim request, or writes to a source artifact. It reads the request package and stops.14
- It reads the nine artifacts the request record emits. It does not connect to a general ledger, an accounts-payable system, a bid platform or the Investment Committee's minutes.15
- It proves the package conforms to the written underwriting standards -- triggers, floors, sequence, membership and re-derivations -- not that the investment is worth making or that a bid is genuinely competitive. That judgment is the Investment Committee's.16
- It re-derives every figure at the fictional policy constants the standards carry -- the trigger thresholds, the contingency floors, the fee rates and the growth default; it does not decide whether those standards are the correct ones for the developer or the market.17
- It takes the approval, spend and deliverable records at face value: it confirms the package foots, sequences and re-derives, not that a spend actually occurred or that a deliverable's content is adequate. All shipped data is fictional and the underwriting period is set in a fictional future.18
See it run
control architecture
Integration
how to run itDistribution: public repository, MIT license.
- 1python -m pytest --collect-only -q -o addopts= (spending-gate-automation/)
- 2len(spending_engine.engine.REGISTRY)
- 3distinct rule-id prefixes in spending_engine.engine.REGISTRY
- 4samples/*.json after python run.py
- 5len(spending_engine.model.DOC_TYPES)
- 6spending_engine/tests boundary tests on the cent and the trigger/approval date
- 7python run.py (spending-gate-automation/); spending_engine/tests planted-defect suite
- 8spending_engine/generate.py DEFECTS pursuit_spend_before_ic / hard_contingency_below_floor
- 9spending_engine/generate.py DEFECTS gate_summary_wrong -> seq_gate_summary_recomputes
- 10python -m pytest --collect-only -q -o addopts= (spending-gate-automation/)
- 11len(spending_engine.engine.REGISTRY)
- 12len(spending_engine.generate.DEFECTS)
- 13spending_engine/tests: every registered rule has a planted defect
- 14spending-gate-automation/README.md and spending_engine read-only / determinism tests
- 15spending_engine/model.py DOC_TYPES
- 16spending_engine/engine.py module docstring and the README scope line
- 17spending_engine/standards.py
- 18spending_engine/generate.py
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