TransitAI Core

Exploration · governance

An agreement a machine can check.

Can a data-sharing agreement be written so that a lawyer and an engineer read the same document, and so that its operative clauses compile into rules the exchange checks on every request? A template, a worked instance for fare data, and twenty test requests run against a real policy engine.

The worked instance is Agency A sharing fare transactions with the regional authority for twelve months: the revenue team for revenue split, the planning team for origin and destination. Grants are made by label, not by field name. A field added later with the same label is covered; one relabelled stricter falls out without an amendment.

Compilation produces three things: a schema that fixes the vocabulary for the whole federation, eight federation-wide prohibitions that no agreement can override, and six permits generated from the instance. The engine denies by default and a prohibition always beats a permit.

Two consequences fell out of the data model rather than needing rules. Effective date, expiry and revocation are attributes of the agreement, so revoking is flipping a flag. A critical-field change creates a new contract version that no permit names, so requests against it are refused until an amendment is compiled.

Restricted fields
Never raw. Aggregated above the minimum group size, pseudonymised under a named keyed scheme with monthly rotation, or inside a named clean room
Change control
Informational change: logged. Important: minor version, 30 days' notice. Critical: major version, 90 days' notice, and an amendment
Cannot be machine-checked
Whether the stated purpose is the real one, re-identification outside the system, deletion after expiry, incident notice. These live in audit review and the signed text
Holds only if
The exchange is the single path. The policy point can check only what the enforcement point tells it

Open governance calls. The planning team receives a pseudonymised card code with dates and times, which the privacy exploration shows is still a trail. Whether planning should instead work only in the clean room is a decision, not a technicality. The minimum group size in the instance is ten, taken from that exploration.

Caveats. A design exercise, not legal drafting: no governing law, liability or privacy-statute clauses. Only the fare contract is compiled, though the template and schema are dataset-neutral. The full template, the instance, the policies and the test fixtures are in explorations/agreement-to-policy/.

↑ ↓ to move · ↵ to open · esc to close