ENGINE 14

SFS-E14-ICO · CONSOLIDATION CONTROLS · REV 2026-07-22 · PRODUCTION

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

Intercompany Reciprocity

Two sides, one balance

A development group is a tree of entities, not one company: a holding parent over a services arm that carries the payroll and a capital arm that guarantees the construction loans, plus a predevelopment entity that carries land while it is entitled. Cash moves between them constantly, and every move lands two entries on two sets of books kept by two people. This engine reads the artifacts the consolidation process emits and runs twenty-three deterministic controls over them: is the entity tree itself sound, does every due-from equal the due-to that faces it, does each closing balance roll forward from the transactions that moved it, does the cash come from the protocol-correct entity and flow down the ownership chain, and does the guarantor meet its liquidity covenant. It never funds, never sweeps and never writes to a source artifact.

The failure mode here lives between two entities, never inside one. Each company's own books foot; the break only surfaces at consolidation, when the intercompany balances are supposed to eliminate to zero and instead leave a residual nobody can source. By then the period is closed. A one-sided balance, a closing that quietly stopped tying to the ledger, an advance funded from the wrong arm of the group -- none of these move a single entity out of balance, which is exactly why a person closing one set of books cannot see them. The engine ships a planted-defect file for every registered control, so the benchmark is a command rather than a claim.

Run it Book a consultation

Architecture

functional block stack · static overview
Structural Precondition The Entity Tree Reciprocity Roll-Forward from the Ledger Funding Protocol Liquidity Covenants Governance substrate: seeded fictional data

Select a layer

Seven control families run in registry order over each period file. The first proves the others had something to read, and that every code they resolve exists.

Key specifications

at a glance
10,3101
Tests
the collected checks that pin this engine's behavior
232
Controls
independent rules run over every period file
73
Families
groups of controls, each answering one question
254
Period files
one clean baseline plus 24 planted-defect files, at least one per control
65
Artifacts read
register, protocol, ledger, due-from, due-to, liquidity
06
Tolerance
one cent between the two sides is a break, not a rounding band

What it does for you

plain terms

A development group runs as a tree of legal entities, and cash never stops moving between them: advances down the chain to fund predevelopment and overhead, repayments back up out of land sales, equity into projects. Each of those movements is booked twice, on two sets of books, by two people. The arithmetic on each set of books foots perfectly. Nothing inside any one company is out of balance. The break, when there is one, exists only in the space between two entities -- a due-from that one side carries larger than the due-to the other acknowledges, a closing balance that quietly stopped tying to the transactions that moved it, an advance funded from the capital arm when the protocol says it must come from the top parent. None of these move a single entity out of balance, so a person closing one company cannot see them; they surface only at consolidation, when the intercompany balances are supposed to eliminate to zero and instead leave a residual nobody can source, after the period is closed. These are not judgment calls. They are equalities: a due-from against a due-to, a closing against a roll-forward, a funding source against a rule -- which is what a deterministic control settles better than a controller reconciling one entity at a time.

The seeded demo runs every control over every period file7. The CLI generates 25 fictional period files -- one clean baseline and one carrying each planted defect -- then runs all 23 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.

A drift of one cent between the two sides8. A test moves a single due-to closing by one cent. The reciprocity control fires, and the pair-symmetry and roll-forward controls stay silent -- the balance is still two-sided and still ties to its own ledger, which is exactly why the drift is invisible on either entity alone and only a check spanning both finds it.

The group eliminates to zero9. A test sums every due-from closing and every due-to closing on the clean baseline and asserts the two totals are equal -- the property that makes the intercompany balances cancel on consolidation. It holds because every pair is reciprocal, which is the thing the registry is built to keep true.

Functional block diagram

engineering · each block links to its source
Functional block diagram of the Intercompany Reciprocity engine period files complete complete complete resolves resolves resolves balances findings findings findings findings findings findings findings Seeded Period Files StructuralPrecondition Entity Tree Reciprocity Roll-Forward Funding Protocol Liquidity Covenants Governance Entity Register Verdict and Findings SFS-E14-ICO · FUNCTIONAL BLOCK DIAGRAM · REV 2026-07-22

Plain terms

  • Seeded Period Files. fictional intercompany period files enter the control registry
  • Structural Precondition. is the file complete, and does every code it names exist
  • Entity Tree. is the ownership tree itself sound
  • Reciprocity. does every due-from equal the due-to that faces it
  • Roll-Forward. does the closing tie to the transactions that moved it
  • Funding Protocol. does the cash come from the right entity, region and direction
  • Liquidity Covenants. does the guarantor meet its floor, and is anyone off-target
  • Governance. is the ledger approved and are large advances surfaced
  • Entity Register. the entity tree every rule resolves codes against
  • Verdict and Findings. every finding, with the reason it exists, ends at a person

Engineering

  • Seeded Period Files. generate_corpus writes one clean baseline plus 24 planted-defect files, at least one for every registered control, 25 files in total. Only the entity tree, the protocol thresholds, the opening balances and the period transactions are stated; every closing balance, every due-to mirror and the ledger totals are derived.
  • Structural Precondition. Three controls. Fails a file missing any of the six artifact types or naming an entity the register does not carry, so no downstream rule holds vacuously.
  • Entity Tree. Three controls: unique codes, defined parents, and an acyclic chain that reaches the top parent.
  • Reciprocity. Three controls: every pair two-sided, matched pairs equal to the cent, and no entity holding a balance against itself.
  • Roll-Forward. Five controls tying each due-from closing to opening plus advances less repayments, with equity excluded and the ledger totals footing from their lines.
  • Funding Protocol. Four controls: equity from the Capital group, region-matched, Services and predevelopment funded from the top parent, and advances flowing down the chain.
  • Liquidity Covenants. Three controls over the guarantor minimum, non-negative cash, and the protocol target bands.
  • Governance. Two controls over ledger approval and a second-signature threshold on large advances.
  • Entity Register. Each entity's code, group, parent and region. Reciprocity, funding direction and funding source are all evaluated against this one authority.
  • Verdict and Findings. Findings roll up per period 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
generate the seeded fictional corpus, run all twenty-three 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 designintercompany_report.md, intercompany_report.json, samples/
python -m intercompany_engine samples
analyze an existing folder of period files without regenerating itper-file verdicts and findings0 PASS / 1 REVIEW / 2 FAIL / 3 usagenone unless --json or --md is passed
python -m intercompany_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
run the full test suite for this engine10310 passed0 when every test passesnone

Benchmarks

measured demo results
MeasureResult
Engine tests1010,310 tests collected
live collection from the engine directory
Registered controls1123 controls
counted from the registry, not from documentation
Planted defects1224 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.

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 positions into the documented consolidation review
One or more FLAG, no FAILREVIEWa human resolves each flag; an advance running up the chain, a cash target out of band, and a large advance awaiting a second signature all land here
One or more FAILFAILthe positions do not go to consolidation until the failing control is cleared

Operating limits

what it refuses to do

See it run

brand animation
Intercompany Reciprocity diagram: on the left an ownership tree of eight fictional legal entities, HOLD at the top over WCAP, SVCS and PRED, then NWCP, SWCP, NWSV and SWSV; on the right two facing ledger cards, a DUE-FROM schedule of positive amounts and a DUE-TO schedule of their exact negatives, joined by an equals sign and totalling plus and minus the same figure to show the balances eliminate to zero; and a footer strip reading 23 controls, 10,310 tests, read-only, SFS-E14-ICO.
The Intercompany Reciprocity engine tile states the thing that has to hold between two entities at once: a due-from on one set of books equal to the due-to on another, so the group eliminates to zero on consolidation.

Integration

how to run it

Distribution: public repository, MIT license.

Substantiation
  • 1python -m pytest --collect-only -q -o addopts= (intercompany-automation/)
  • 2len(intercompany_engine.engine.REGISTRY)
  • 3distinct rule-id prefixes in intercompany_engine.engine.REGISTRY
  • 4samples/*.json after python run.py
  • 5len(intercompany_engine.model.DOC_TYPES)
  • 6intercompany_engine/tests/test_control_semantics.py
  • 7python run.py (intercompany-automation/); output re-run on demand
  • 8intercompany_engine/tests/test_control_semantics.py::test_one_cent_of_drift_breaks_reciprocity
  • 9intercompany_engine/tests/test_control_semantics.py::test_group_intercompany_eliminates_to_zero
  • 10python -m pytest --collect-only -q -o addopts= (intercompany-automation/)
  • 11len(intercompany_engine.engine.REGISTRY)
  • 12len(intercompany_engine.generate.DEFECTS)
  • 13intercompany_engine/tests/test_planted_defects.py::test_every_registered_rule_has_a_planted_defect
  • 14intercompany-automation/README.md and intercompany_engine/tests/test_readonly_and_determinism.py
  • 15intercompany_engine/model.py DOC_TYPES
  • 16intercompany_engine/engine.py rec_amounts_reciprocal
  • 17intercompany_engine/engine.py fund_services_from_holdings
  • 18intercompany_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