Endoskeletal
Describe the company. Let it run.
Endoskeletal is a language for describing a software company precisely enough that people, programs and AI agents can run it together. You write who holds which seats, what the company wants, which rules are in force and who may change them. The compiler checks it, explains it back in plain English, and draws it as the org tree and circuits you see below.
module northwind.core @ 1.0.0 import lib.org @ 2.* as org import lib.agents @ 1.* as ag import lib.realization @ 1.* as rz scope Northwind : org.Organization { persona NorthwindCo position CEO : org.Owner { cardinality 1 } position VPEng : org.Officer { cardinality 1 } scope Platform : org.Team in Northwind { position OnCall : org.Member { cardinality 2.. } position Deployer : org.Member { eligible when self is ag.Program } } scope Product : org.Team in Northwind { position PM : org.Officer { cardinality 1 } position Triage : org.Member { eligible when self is ag.ModelBased } } intent ApiUp : org.SLO { maintain holds ops.availability(Api) >= 99.95 % hard } use rz.RealizationEnvelope( holder = Deployer, requirement = Api, operation = eng.Deploy, admissible = c.risk = "low" and holds ci.passed(c) ) as AutoShip use org.Approval( approver = VPEng, subject = eng.Change, threshold = c.risk = "high", deadline = 4 h, escalateTo = CEO ) as Review}
change #481 · risk low · CI passed → AutoShip valid → deployed
What you write, what you get
A real circuit: the observability bill
A provider changes its log-ingest price and Northwind's observability bill heads 38 % over budget. Nobody files a ticket. Watch seven separate responsibilities resolve it: observation, finance, research, security, a council vote, platform and verification. Each act can only be performed by one seat, and one seat tries to act outside its role.
The Verifier, a different program, checks coverage: all 212 services reporting within 48 hours. The rollback obligation lapses. The new forecast is 9,800 USD, and the budget holds.
- The Monitor, a program, reports log ingest at 41 TB this month, and the vendor's invoice at its new rate. Both are claims, each with a source and an expiry.
- FinanceBot projects Observability at 18,600 USD against a 13,500 USD budget. The projected breach is true, so ObsBudget opens a commitment: a proposal within 5 days, or debug-level ingest is throttled.
- The Architect, an agent, owes the proposal. It searches 212 compositions and shortlists three: sampling at the collector, a self-hosted collector writing to object storage with a query engine, and a second vendor.
- Research runs as an Experiment with its own 400 USD budget and a 7-day limit, probing only what each provider's terms permit. The self-hosted design measures p95 query at 1.8 s for 9,800 USD a month.
- The logs contain customer personal data, so moving them needs a security clearance. The SecurityLead, who proposed nothing, clears it on one condition: the collector scrubs PII before storage.
- InfraCouncil votes on the proposal and its evidence. Finance approves, Ops approves, Product rejects over the cost of migrating dashboards. Two of three within 24 hours: the vote carries.
- The Architect tries to bind the new realization itself. Misfire: the Architect's seat is incompatible with the CTO's, so the seat that proposes can't bind. The attempt is recorded and changes nothing.
- The CTO binds. That is valid now, because the vote carried and security cleared. The Deployer, a program, executes the cut-over. It may execute, but never bind or verify.
- The Verifier, a different program, checks coverage: all 212 services reporting within 48 hours. The rollback obligation lapses. The new forecast is 9,800 USD, and the budget holds.
| seat | observe | forecast | propose | research | clear | vote | bind | execute | verify |
|---|---|---|---|---|---|---|---|---|---|
| Monitorprogram | may | ||||||||
| FinanceBotprogram | may | ||||||||
| Architectagent | may | may | forbidden: incompatible with SecurityLead | forbidden: incompatible with CTO | forbidden: incompatible with Verifier | ||||
| SecurityLeadperson | may | ||||||||
| InfraCouncil3 people | may | ||||||||
| CTOperson | forbidden: a binder may not propose | may | |||||||
| Deployerprogram | may | forbidden: incompatible with Verifier | |||||||
| Verifierprogram | forbidden: a verifier may not execute | may |
Who may do what. ● holds the power or duty; ✕ is forbidden by an incompatibility or a separation rule. Every act in the circuit belongs to exactly one seat.
The rules behind it
use fin.Budget(
scope = Platform,
resource = econ.Money,
limit = 13_500 USD per month,
reserve = 1_000 USD,
window = month,
orElse = ops.Throttle(level = "debug")
) as ObsBudget
norm ProposeOnBreach {
obligation of Architect to persona
when holds fin.projected-breach(ObsBudget)
aim within 5 d: occurred assert(arch.Proposal(_, Observability)) by Architect
}
use rz.ExperimentPower(
holder = Architect,
pattern = Experiment,
budget = 400 USD,
duration = 7 d
) as Research
norm EgressReview {
obligation of SecurityLead to persona
when p is arch.Proposal and holds data.contains-pii(p.moves)
aim within 3 d: occurred decide(clear | refuse, p) by SecurityLead
}
norm CouncilVote {
power of InfraCouncil to decide vote-approve | vote-reject about arch.Proposal
}
norm BindObservability {
power of CTO to bind | unbind _ about Observability
when p is arch.Proposal
and count decide(vote-approve, p) by InfraCouncil over 24 h >= 2
and occurred decide(clear, p) by SecurityLead
level collective
}
norm VerifyCutover {
obligation of Verifier to persona
when occurred execute(rz.CutOver(Observability, r))
aim within 48 h: occurred derive(ops.coverage(r)) by Verifier
or-else Rollback
}
position Architect : org.Member {
eligible when self is ag.Autonomous
incompatible with CTO, SecurityLead, Verifier
}
position Verifier : org.Member {
eligible when self is ag.Program
incompatible with Deployer
}A compiler, pointed at an organization
A compiler turns something written for people into something a machine can run. Along the way it rejects programs that can't mean anything, infers what the programmer left unsaid, and chooses the cheapest of many equivalent instruction sequences for the exact chip in front of it. The programmer never picks registers.
Endoskeletal's compiler does the same jobs for a company. The program is the specification. The machine is everything available to run it: people, programs, models and providers, each with measured costs and limits. Two differences matter: it never stops compiling, because that machine changes every week, and it proposes but never binds, because an organization has to consent to what runs it.
Classic compilerEndoskeletal
- sourceC, Rust, Java.esk specneeds, rules
- parsesyntax treeparserecords
- type checkreject nonsensecheckfelicity: E W U
- infertypes from usagederiveneeds from the rules
- optimizeas-if rulesearchequivalent designs
- selectCPU cost modelrankthe org's own objective
- link→ binarybindby a party with authority
↻ When evidence changes, it goes back to “derive” and compiles again.
Text description of this diagram
Two rows of seven stages. A classic compiler: source, parse, type check, infer types, optimize under the as-if rule, select instructions with a cost model of the CPU, link into a binary. The Endoskeletal compiler: the .esk specification, parse into records, felicity check, derive needs from norms and intents, search for equivalent realizations, rank them by the organization's own objective, and bind by a party with authority. Dotted lines pair each stage with its counterpart. A loop from bind back to derive shows that the Endoskeletal compiler reruns whenever evidence changes.
What compilers have always done, and how each job maps to an organization.
You write the need. The compiler works out the rest.
A specification never names a vendor, a product or a model. Below is an enterprise audit trail declared with no properties at all. The compiler derives nine from the rules and intents around it, including three that design reviews routinely miss. It then tests 31 offers and 212 compositions against measured evidence, not against what providers say about themselves.
Written in the spec → derived by the compiler
intent AuditExportenterprise contract § 6.1- append p99 ≤ 150 ms
- query p95 ≤ 2 s recent · ≤ 60 s older
claim ops.event-rateobserved · 30-day peak × 1.5- throughput ≥ 2,100 events/s
norm RecordsRetainedSOC 2 CC7.2 · not defeasible- retention ≥ 7 years
- single-party delete impossible, even for our adminsoften missed
norm AuditIntegrityenterprise contract § 6.3- tamper evidence verifiable by the customeroften missed
norm TenantResidencyDPA § 4 · constitutional- jurisdiction tenant region, every copy and backupoften missed
fin.Budget PlatformShareweighted by intent Frugal- cost ≤ 1,200 USD per month
norm ExitReadinessconstitutional- exit ≤ 5 days to another realization
Text description of this diagram
Seven statements in the specification imply the nine properties of AuditTrail. Properties marked “often missed” are ones a design review commonly overlooks.
- intent AuditExport (enterprise contract § 6.1) → append p99 ≤ 150 ms, query p95 ≤ 2 s recent · ≤ 60 s older
- claim ops.event-rate (observed · 30-day peak × 1.5) → throughput ≥ 2,100 events/s
- norm RecordsRetained (SOC 2 CC7.2 · not defeasible) → retention ≥ 7 years, single-party delete impossible, even for our admins
- norm AuditIntegrity (enterprise contract § 6.3) → tamper evidence verifiable by the customer
- norm TenantResidency (DPA § 4 · constitutional) → jurisdiction tenant region, every copy and backup
- fin.Budget PlatformShare (weighted by intent Frugal) → cost ≤ 1,200 USD per month
- norm ExitReadiness (constitutional) → exit ≤ 5 days to another realization
| candidate | terms | append | throughput | retention | delete | tamper | jurisdiction | query recent | query older | cost | exit |
|---|---|---|---|---|---|---|---|---|---|---|---|
| A Locked object storage + queue + embedded queryequivalent | T: standard use | T: 24 ms, to the existing queue | T: 9,000/s measured | T: compliance-mode lock, 7 y | T: lock binds the root account too | T: daily Merkle root sent to each tenant | T: EU and US buckets, replication off · provider says “multi-region by default”: switched off and verified | T: 1.4 s over tenant/day partitions | T: 3.1 s | T: 410 USD | T: 2 d, open columnar files |
| B Search cluster we already run (90 d) + an email-journaling archiveequivalent | T: § 3.4 permits application-generated records | T: 31 ms, to the existing queue | T: 5,500/s | T: WORM from ingest, 7 y | T: archive is write-once from ingest | T: RFC 3161 receipt per record | T: EU and US data centres, subprocessors listed | T: 0.6 s from the cluster | T: 4.2 s · provider says “search in milliseconds”: measured 4.2 s, still inside 60 s | T: 430 USD (one archive seat per tenant) | T: 4 d, EML + JSON export |
| C Customer-held buckets, for tenants who opt inequivalent | T: BYOB addendum signed by the tenant | T: 24 ms, to the existing queue | T: 9,000/s | T: tenant lock policy, checked daily | T: Northwind holds no delete right at all | T: the customer holds the records | T: the tenant's own region | T: 1.9 s via a delegated read role | T: 3.6 s | T: 60 USD for 38 tenants | T: 0 d, they already have it |
| D Two providers, two roots, held by incompatible seatsequivalent | T: standard use | T: 29 ms | T: 7,000/s | T: governance lock at both providers | T: needs both roots; no party may hold both | T: cross-provider hash comparison, published | T: EU at both providers | T: 1.6 s | T: 3.4 s | T: 380 USD | T: 1 d |
| E Managed audit-log servicefails | T: standard use | T: 40 ms | T: 20,000/s | T: 7 y plan | T: immutable plan | T: signed exports | F: US support subprocessor has read access · provider says “EU data residency” | T: 0.4 s | T: 0.9 s | F: 3,400 USD | T: 3 d |
| F Our observability vendor's log archive (already under contract)fails | T: standard use | T: 60 ms | T: 50,000/s | T: archive tier, 7 y | F: an account admin can purge | F: nothing the customer can check | T: EU site available | T: 0.8 s, hot tier | F: rehydration takes 4–9 h · provider says “searchable archives” | T: 220 USD | T: 2 d |
| G Append-only table in the primary Postgresfails | T: standard use | T: 6 ms | T: 3,000/s | T: by policy | F: a superuser can drop the table | F: nothing the customer can check | T: EU and US clusters | T: 1.1 s | T: 12 s | T: 90 USD | T: 1 d |
| H A provider's new “immutable tables” (preview)unknown · not permitted | N: preview terms exclude production data | T: 35 ms | N: no independent observation | N: says 7 y; no evidence · provider says “WORM compliance” | N: no evidence · provider says “cannot be deleted” | N: unknown | T: EU region | T: 1.0 s | N: unmeasured | T: 300 USD | N: unknown |
A Locked object storage + queue + embedded query equivalent
- ✓terms permit this use standard use
- ✓append p99 ≤ 150 ms 24 ms, to the existing queue
- ✓throughput ≥ 2,100/s 9,000/s measured
- ✓retention ≥ 7 y compliance-mode lock, 7 y
- ✓single-party delete impossible lock binds the root account too
- ✓customer-verifiable tamper evidence daily Merkle root sent to each tenant
- ✓jurisdiction of all copies EU and US buckets, replication offprovider says “multi-region by default”: switched off and verified
- ✓query p95 ≤ 2 s (≤ 90 d) 1.4 s over tenant/day partitions
- ✓query p95 ≤ 60 s (older) 3.1 s
- ✓cost ≤ 1,200 USD/mo 410 USD
- ✓exit ≤ 5 d 2 d, open columnar files
B Search cluster we already run (90 d) + an email-journaling archive equivalent
- ✓terms permit this use § 3.4 permits application-generated records
- ✓append p99 ≤ 150 ms 31 ms, to the existing queue
- ✓throughput ≥ 2,100/s 5,500/s
- ✓retention ≥ 7 y WORM from ingest, 7 y
- ✓single-party delete impossible archive is write-once from ingest
- ✓customer-verifiable tamper evidence RFC 3161 receipt per record
- ✓jurisdiction of all copies EU and US data centres, subprocessors listed
- ✓query p95 ≤ 2 s (≤ 90 d) 0.6 s from the cluster
- ✓query p95 ≤ 60 s (older) 4.2 sprovider says “search in milliseconds”: measured 4.2 s, still inside 60 s
- ✓cost ≤ 1,200 USD/mo 430 USD (one archive seat per tenant)
- ✓exit ≤ 5 d 4 d, EML + JSON export
C Customer-held buckets, for tenants who opt in equivalent
- ✓terms permit this use BYOB addendum signed by the tenant
- ✓append p99 ≤ 150 ms 24 ms, to the existing queue
- ✓throughput ≥ 2,100/s 9,000/s
- ✓retention ≥ 7 y tenant lock policy, checked daily
- ✓single-party delete impossible Northwind holds no delete right at all
- ✓customer-verifiable tamper evidence the customer holds the records
- ✓jurisdiction of all copies the tenant's own region
- ✓query p95 ≤ 2 s (≤ 90 d) 1.9 s via a delegated read role
- ✓query p95 ≤ 60 s (older) 3.6 s
- ✓cost ≤ 1,200 USD/mo 60 USD for 38 tenants
- ✓exit ≤ 5 d 0 d, they already have it
D Two providers, two roots, held by incompatible seats equivalent
- ✓terms permit this use standard use
- ✓append p99 ≤ 150 ms 29 ms
- ✓throughput ≥ 2,100/s 7,000/s
- ✓retention ≥ 7 y governance lock at both providers
- ✓single-party delete impossible needs both roots; no party may hold both
- ✓customer-verifiable tamper evidence cross-provider hash comparison, published
- ✓jurisdiction of all copies EU at both providers
- ✓query p95 ≤ 2 s (≤ 90 d) 1.6 s
- ✓query p95 ≤ 60 s (older) 3.4 s
- ✓cost ≤ 1,200 USD/mo 380 USD
- ✓exit ≤ 5 d 1 d
E Managed audit-log service fails
- ✓terms permit this use standard use
- ✓append p99 ≤ 150 ms 40 ms
- ✓throughput ≥ 2,100/s 20,000/s
- ✓retention ≥ 7 y 7 y plan
- ✓single-party delete impossible immutable plan
- ✓customer-verifiable tamper evidence signed exports
- ✗jurisdiction of all copies US support subprocessor has read accessprovider says “EU data residency”
- ✓query p95 ≤ 2 s (≤ 90 d) 0.4 s
- ✓query p95 ≤ 60 s (older) 0.9 s
- ✗cost ≤ 1,200 USD/mo 3,400 USD
- ✓exit ≤ 5 d 3 d
F Our observability vendor's log archive (already under contract) fails
- ✓terms permit this use standard use
- ✓append p99 ≤ 150 ms 60 ms
- ✓throughput ≥ 2,100/s 50,000/s
- ✓retention ≥ 7 y archive tier, 7 y
- ✗single-party delete impossible an account admin can purge
- ✗customer-verifiable tamper evidence nothing the customer can check
- ✓jurisdiction of all copies EU site available
- ✓query p95 ≤ 2 s (≤ 90 d) 0.8 s, hot tier
- ✗query p95 ≤ 60 s (older) rehydration takes 4–9 hprovider says “searchable archives”
- ✓cost ≤ 1,200 USD/mo 220 USD
- ✓exit ≤ 5 d 2 d
G Append-only table in the primary Postgres fails
- ✓terms permit this use standard use
- ✓append p99 ≤ 150 ms 6 ms
- ✓throughput ≥ 2,100/s 3,000/s
- ✓retention ≥ 7 y by policy
- ✗single-party delete impossible a superuser can drop the table
- ✗customer-verifiable tamper evidence nothing the customer can check
- ✓jurisdiction of all copies EU and US clusters
- ✓query p95 ≤ 2 s (≤ 90 d) 1.1 s
- ✓query p95 ≤ 60 s (older) 12 s
- ✓cost ≤ 1,200 USD/mo 90 USD
- ✓exit ≤ 5 d 1 d
H A provider's new “immutable tables” (preview) unknown · not permitted
- ?terms permit this use preview terms exclude production data
- ✓append p99 ≤ 150 ms 35 ms
- ?throughput ≥ 2,100/s no independent observation
- ?retention ≥ 7 y says 7 y; no evidenceprovider says “WORM compliance”
- ?single-party delete impossible no evidenceprovider says “cannot be deleted”
- ?customer-verifiable tamper evidence unknown
- ✓jurisdiction of all copies EU region
- ✓query p95 ≤ 2 s (≤ 90 d) 1.0 s
- ?query p95 ≤ 60 s (older) unmeasured
- ✓cost ≤ 1,200 USD/mo 300 USD
- ?exit ≤ 5 d unknown
✓ true on evidence✗ false? unknownprovider claim contradicted by measurement
Four designs are equivalent, and none of them is the one an experienced architect would sketch first: a compliance-locked object store fed by a queue you already run; your search cluster plus an email-journaling archive; the customer's own bucket; and two ordinary stores whose root keys sit in seats the org chart declares incompatible. See all four, and how the engine chooses among them.
Watch it work through real situations
Four situations from one month at a SaaS company. Step through the log: each entry says who acted, in what capacity, and why the engine accepted, held or refused it. The strip above each log shows who carried the work at each step, a program, a model, or a person.
Crystallized logic meets a product launch
Support tickets at Northwind are labelled by a program distilled from four months of LLM decisions. It handles 96 % of tickets at under a tenth of a cent each and abstains on the rest. On Tuesday, Billing v2 ships.
- Tue 10:00eventDeployer · program
eng.Release(billing-v2)executed through AutoShip.A routine low-risk release. Nothing about triage has changed yet.
- Tue 11:40scriptedTriageProgram Abstains on 214 of 690 tickets (31 %) as outside its envelope; they route to the model-based triager.
The envelope is the region of input the program was distilled from. Tickets about proration and invoice previews fall outside it, so the program declines instead of guessing. Abstaining is a valid act. Mislabelling is not.
- Tue 11:41reasoningTriage · LLM Labels the 214 abstained tickets, at 0.041 USD each.
The stochastic path was never removed, only bypassed. It takes back exactly the inputs the program can't cover, so the capability's accuracy ≥ 0.9 keeps holding while cost per ticket rises.
- Tue 11:41claimengine
ai.OutOfEnvelope(TriageProgram)asserted. The Envelope norm opens a commitment on the Architect, due in 7 days.A rising abstention rate is evidence that the program's world has moved. The pattern turns that into an owned obligation with a deadline, not a dashboard someone might notice.
- Tue 12:05reasoningArchitect · agent Clusters the abstained tickets into three new intents (proration dispute, invoice preview, seat downgrade) and drafts rules for them.
Naming categories nobody has written down yet is reasoning work. Its output is a proposal in the log, not a change to production.
- Tue 12:06valid actArchitect · agent
bind shadow TriageProgram v5. Valid under TriageCrystal.Shadow.A shadow sees every live ticket and its labels are compared with the LLM's, but never used. The Architect may do this alone because a shadow can't act.
- Thu–Monclaimengine
ai.ShadowAgreement(v5)rises 0.88 → 0.93 → 0.97 over 2,900 tickets.Agreement is a claim with a source and an expiry like any other. It must reach 0.95 before promotion is even possible.
- Mon 09:30misfireArchitect · agent
bind TriageProgram v5→ misfire: the power to promote belongs to the OpsLead.The seat that wrote the rules can't promote them. The attempt is recorded and changes nothing.
- Mon 09:44personOpsLead · person
bind TriageProgram v5. Valid: status T and agreement 0.97 ≥ 0.95.Promotion is a collective-level act by a different seat, conditioned on evidence that is current.
- Mon 09:45scriptedTriageProgram v5 Abstention back to 4 %; 0.0009 USD per ticket. Envelope commitment discharged on day 6 of 7.
Scripted logic covers the new world, and reasoning returns to the edges.
Outcome. Accuracy never dropped below 0.9. The reasoning share rose from 4 % to 31 % for six days and fell back. No person wrote a triage rule; one person approved one promotion.
The rules behind it
requires capability TicketTriage {
operation triage(t : Entity) -> label : Claim
property accuracy >= 0.9
property cost-per-invocation <= 0.10 USD
for SupportResponsive
}
use rz.Crystallize(
holder = Architect,
requirement = TicketTriage,
promoteBy = OpsLead
) as TriageCrystalA production credential leaks at night
A deploy token for the production API is pushed to a public fork at 02:14. The on-call engineer is asleep; the Ops agent is not. Two different acts are needed, and they need different authority.
- 02:14:07eventsecret scanner · vendor
sec.exposed(tok-prod-deploy)reported by the code host's secret scanning.Exposure reports from the code host are trusted at T by the org's SecretTrust policy, so the clock starts without anyone confirming.
- 02:14:07scriptedengine Norm RotateExposed fires: a commitment on Ops to rotate within 30 minutes, or else on OnCall.
A standing obligation, written once. The deadline sits on a seat, not a person.
- 02:14:40reasoningOps · agent Assesses blast radius: token scoped to deploys of Api, last used 01:58 from CI, three services read it.
Reasoning over logs and the dependency graph. The assessment is an entity in the log that later acts can cite.
- 02:15:08valid actOps · agent
execute sec.Rotate(tok-prod-deploy). Valid inside RotationEnvelope; the three services pick up the new token.Rotating a credential the org can reissue is inside the agent's envelope, so nobody is woken. The exposed token has been dead for 61 seconds.
- 02:19:30reasoningOps · agent Finds the fork also holds
.env.stagingwith 41 tokens from the same CI runner, 12 of them used by customer webhooks. Proposes change #7741: revoke all 41.A broader act with a broader blast radius: revoking now would break 12 customer integrations at 2 a.m.
- 02:19:31misfireOps · agent
decide approve #7741→ misfire: NoSelfApproval, the author of a change can't approve it.The prohibition is not defeasible. The agent isn't trusted less than a person; nobody may approve their own change.
- 02:19:31scriptedengine RevokeReview opens on the VPEng: customer-affecting revocation, decide within 4 h or escalate to the CEO. Paged.
The threshold is part of the approval pattern: affecting customers routes to a person.
- 02:20:02unknownengine
sec.exploitable(staging tokens)is unknown. UnknownExploitability commitment on the SecurityLead, 7 days.Nobody knows yet whether staging tokens reach customer data. Unknown is not treated as safe, or as breached; it gets an owner.
- 02:44:15personVPEng · person Approves a narrower change: revoke the 29 internal tokens now; rotate the 12 webhook tokens with a 24-hour overlap.
Valid under RevokeReview. Judgment about customer impact at 2 a.m. is what the person was woken for.
- 09:10:00claimSecurityLead · person
sec.exploitable = Ffor the staging tokens: no path to production data.SecurityDisclosure is constitutional and not tradeable. Had this come back T, a disclosure within 3 days would be owed whatever the roadmap said.
Outcome. The production token was dead 61 seconds after exposure. The broad revoke that would have broken 12 customers never ran. One person woke once, for the one decision that needed a person.
The rules behind it
norm RotateExposed {
obligation of Ops to persona
when holds sec.exposed(k) and k is sec.Credential
aim within 30 min: occurred execute(sec.Rotate(k)) by Ops
or-else RotateByHand
}
use rz.RealizationEnvelope(
holder = Ops,
requirement = Secrets,
operation = sec.Rotate,
admissible = holds sec.reissuable(a.k)
) as RotationEnvelope
use org.Approval(
approver = VPEng,
subject = sec.Revocation,
threshold = r.affects-customers,
deadline = 4 h,
escalateTo = CEO
) as RevokeReview
use org.SegregationOfDuties(
act = decide(approve, c),
subject = eng.Change,
separate = { c.author }
) as NoSelfApprovalTwo trusted sources disagree about the budget
Day 22 of the month. Northwind's opex budget is 560,000 USD, and its or-else is a spending freeze. The cloud bill export and the FinOps tool, both trusted, give different forecasts.
- 06:00claimcloud bill export
fin.forecast(OpexBudget) = 583,400 USD: over the limit.A trusted source says the freeze should fire.
- 06:02claimFinOps tool · program
fin.forecast(OpexBudget) = 541,900 USD: under the limit.Another trusted source says it shouldn't.
- 06:02contradictedengine
fin.over-limit(OpexBudget)is B: contradicted.Neither source wins by default. The freeze needs the claim to be T, and B is not T, so nothing freezes. But anything that needs headroom to be T is also not admissible.
- 06:02scriptedengine ForecastContest opens on the FinanceLead, due in 3 days.
Every contradiction gets an owner and a deadline.
- 10:15misfireOps · agent
execute ops.Scale(Search, 8 → 10)→ not admissible: SearchEnvelope needsfin.headroom ≥ 1,800 USD, which is B.The agent isn't stopped by a spending rule. It's stopped because it can't show it's allowed. The request is held, not dropped.
- 10:16reasoningFinance · agent Reconciles line items: the bill export counts a 41,500 USD committed-use credit both as applied and as pending. Proposes 552,100 USD.
Reasoning across two ledgers. The output is a proposal with evidence attached, not a fact.
- 11:02personFinanceLead · person
derive fin.forecast = 552,100 USD, citing the reconciliation. The contest resolves and over-limit is F.A person resolves it, on the record, with evidence other readers can check.
- 11:02valid actengine Headroom is 7,900 USD and T. The held Scale(10) is re-evaluated and executes.
Nothing was lost while the question was open. The held act simply became admissible.
- 11:05claimArchitect · agent Publishes to the pool: “bill export double-counts pending commit credits”, with the reconciliation as evidence.
Learn once, apply everywhere: other organizations import it under their own trust policy and never hit the same contradiction.
Outcome. No freeze on bad evidence, and no silent overspend. One person made one decision, five hours after the conflict appeared. The fix became evidence other companies can use.
The rules behind it
use fin.Budget(
scope = Northwind,
resource = econ.Money,
limit = 560_000 USD per month,
reserve = 40_000 USD,
window = month,
orElse = gov.Freeze(except = { Const.Materialize, SecurityDisclosure })
) as OpexBudget
use ev.TrustPolicy(
source-kind = fin.BillingSource,
base = T,
vocab = { fin.forecast }
) as BillingTrust
use ev.ContestResolution(
owner = FinanceLead,
vocab = fin.forecast,
deadline = 3 d
) as ForecastContest
use rz.RealizationEnvelope(
holder = Ops,
requirement = Search,
operation = ops.Scale,
admissible = holds fin.headroom(OpexBudget) >= a.delta
) as SearchEnvelopeA reorg lands in the middle of the week
Platform (nine people, two agents) splits into Platform and DevEx. There are 37 open commitments, four powers and an on-call rotation that all have to land somewhere, with work in flight.
- Mon 10:00personVPEng · person Proposes an amendment:
scope DevEx : org.Team in Engineering, moving four positions and the CI repositories.Creating a scope is constitutional here, so it needs ratification by the CEO.
- Mon 10:00scriptedcompiler Explains the diff: 31 commitments move by subject (CI and tooling → DevEx, runtime → Platform); 6 are ambiguous. On-call stays valid: Platform keeps 3 of a minimum 2.
Consequences are computed before anything is in force.
- Mon 10:01reasoningArchitect · agent Proposes owners for the six ambiguous commitments, with reasons. “Quarantine flaky tests: CI subject, but it blocks deploys → DevEx, Platform watching.”
Judgment calls, proposed as data, reviewable line by line.
- Mon 11:30personCEO · person Ratifies. In force at 14:00.
An effective time, not an effective intention.
- Mon 14:00eventengine The amendment is in force. Four people are now members of DevEx and 36 commitments have new bearers.
Nobody moved tickets by hand. Bearers follow from the rules.
- Mon 14:03misfireDana · DevEx Approves PR #9120 on the Api runtime → misfire: at 14:03 she no longer holds Platform's review power. Her laptop synced at 14:20.
The log is bitemporal: it records when she acted and when it learned about it. Authority is checked at the time of the act.
- Mon 14:03scriptedengine PR #9120 re-requests review from Platform reviewers. Its deploy clock is unchanged.
A stale approval is caught, not silently counted.
- Mon 14:10unknownengine One commitment, “rotate the CI signing key”, has no computable owner. Reassign opens on the VPEng, due in 1 day.
An unknown owner is itself an owned problem.
- Tue 09:00personVPEng · person Assigns it to DevEx.
The last loose end is closed on the record.
Outcome. No commitment was lost or duplicated, and one stale approval was caught instead of counted. The whole reorg is one diff you can replay to any minute.
The rules behind it
norm ReviewCode {
power of Platform.Reviewer to decide approve | reject about eng.Change
when c.repo in Platform.repos
}
norm Reassign {
obligation of VPEng to persona
when unknown org.owner(k) and k is Commitment
aim within 1 d: occurred assign(k, _) by VPEng
}evidencescriptedreasoningpersonuncertainblocked
Ten kinds of thing
Every specification compiles to records of ten kinds. Teams, workflows, tickets, approvals, budgets, KPIs, databases, agents and LLMs are configurations of these ten.
Four ideas that make it work
- The log is the only state. Who holds what, which commitments are open, which facts hold, which provider is bound: all computed from one append-only, bitemporal log. Any past moment can be rebuilt exactly.
- Authority is computed. Every act is checked against the powers in force for that party, in that seat, at that instant. An act without authority is recorded as a misfire and changes nothing.
- Unknown is a first-class answer. Facts are four-valued and evidence expires. Nothing unknown is ever treated as true, and every unknown gets an owner.
- Learn once, apply everywhere. What one organization proves about a provider, a pattern or a distilled piece of judgment can be published as evidence and imported by others, under their own trust rules. How pooling works.