Ideas · Governance

Governed by Design: The U.S. Constitution as an OpenVerb System

What if a government were software? Model the three branches as actors, their powers as verbs and the Constitution as policy, then pass a bill through it yourself.

Last reviewed

A thought experiment, for fun and for learning. This is a simplified model of U.S. federal constitutional procedure. It is not legal advice, it leaves out a great deal, and OpenVerb is not affiliated with or used by any government. It describes institutions and procedures only, not any official, party or policy.

OpenVerb is described as a governed execution layer: an actor may only do what it has been granted, under rules that are written down, and every action leaves a record. Read that sentence again and it describes something much older than software. It describes a constitutional government.

So let's take the idea literally. If the United States federal government were an OpenVerb system, what would its verbs be? What would its policy say? And what would happen if you tried to pass a bill through it?

The mapping

The parallels are closer than they first look:

In governmentIn OpenVerb
Enumerated powers: what each branch may doThe verb library. If a power is not listed, it cannot be called.
The House, the Senate, the President, the courtsActors, each with a role
Separation of powersRole-based permissions on every verb
Checks and balancesPolicies where one actor's verb depends on another actor's action
The Constitution's procedural rulesThe policy engine
Judicial reviewValidation that can reverse an action after the fact
Constitutional amendmentsA new version of the library
The Congressional Record, the Federal RegisterReceipts: the public record of every action
The three branches as actors calling verbs through an OpenVerb runtime whose policy is the Constitution, with receipts going to the public record.CongressHouse · Senatevote_on_bill · override · impeachPresidentExecutivesign · veto · nominate · pardonCourtsJudiciaryreview_law (in a real case)OpenVerb runtimePolicy = the Constitutionwho may act · in what order · by what marginVerb library = enumerated powersus.federal v1.0.0 · amended by new versionsReceipts = the public recordwho did what, when, and whether it was allowed
The three branches as actors. Every action passes through the same policy and leaves a receipt.

The verbs: enumerated powers

The Constitution works much like a verb library. Article I lists what Congress may do, Article II what the President may do, Article III what the courts may decide. The Tenth Amendment then reserves everything not delegated to the federal government to the states, or to the people. In OpenVerb terms: if a verb is not in the library, no actor can call it.

Here is the model's library. Every verb belongs to a branch, and every one cites the clause it comes from:

VerbWho may call itSource
congress.introduce_billhouse, senateArt. I, §7, cl. 1
house.vote_on_billhouseArt. I, §7, cl. 2
senate.vote_on_billsenateArt. I, §7, cl. 2; Art. I, §3, cl. 4
house.vote_to_overridehouseArt. I, §7, cl. 2
senate.vote_to_overridesenateArt. I, §7, cl. 2
house.impeachhouseArt. I, §2, cl. 5
senate.try_impeachmentsenateArt. I, §3, cl. 6
senate.confirm_nominationsenateArt. II, §2, cl. 2
senate.consent_to_treatysenateArt. II, §2, cl. 2
congress.propose_amendmenthouse, senateArt. V
states.ratify_amendmentstatesArt. V
president.sign_billpresidentArt. I, §7, cl. 2
president.veto_billpresidentArt. I, §7, cl. 2
president.take_no_actionpresidentArt. I, §7, cl. 2
president.nominatepresidentArt. II, §2, cl. 2
president.grant_pardonpresidentArt. II, §2, cl. 1
court.review_lawcourtArt. III; Marbury v. Madison (1803)

Each entry is an ordinary OpenVerb definition:

us.federal (excerpt)
{
  "namespace": "us.federal",
  "version": "1.0.0",
  "verbs": [
    {
      "id": "president.veto_bill",
      "summary": "Return a presented bill to its originating chamber with objections.",
      "inputSchema": { "type": "object", "properties": { "objections": { "type": "string" } } },
      "policy": { "rolesAllowed": ["president"] },
      "source": "Art. I, §7, cl. 2"
    },
    {
      "id": "senate.vote_to_override",
      "summary": "Override a veto with two-thirds of the Senate.",
      "policy": { "rolesAllowed": ["senate"] },
      "source": "Art. I, §7, cl. 2"
    }
  ]
}

You can download the full library as JSON.

The policy: the Constitution's rules

A verb says what can be done. The policy says who may do it, when, and in what order. Most of the Constitution's procedural text translates directly:

  • Separation of powers. The President cannot cast a House vote, and a court cannot veto a bill. In the model, that is a role check on every verb.
  • The Origination Clause. Bills for raising revenue must start in the House (Art. I, §7, cl. 1).
  • Presentment. Only a bill passed by both chambers reaches the President, who may sign it, veto it, or let ten days pass, Sundays excepted. If Congress is in session it becomes law without a signature; if Congress has adjourned, it is a pocket veto (Art. I, §7, cl. 2).
  • Overrides. A vetoed bill returns to the chamber where it began, which reconsiders it first. Two-thirds of each chamber can override (Art. I, §7, cl. 2).
  • Ties. The Vice President votes in the Senate only to break a tie (Art. I, §3, cl. 4).
  • Advice and consent. Nominations need a Senate majority; treaties need two-thirds of senators present (Art. II, §2, cl. 2).
  • Impeachment. The House impeaches by majority; conviction in the Senate needs two-thirds of members present. The pardon power does not reach cases of impeachment.
  • Cases and controversies. Federal courts decide real disputes; they do not hand out advisory opinions on laws nobody has challenged.

As code, it is one function with the same signature as the OpenVerb runtime's policy engine:

usFederalPolicy (abridged)
// Same signature as @openverb/runtime's policy engine.
export async function usFederalPolicy(verb, actor, context) {
  // Separation of powers: each verb belongs to a branch.
  if (!verb.policy.rolesAllowed.some((r) => actor.roles.includes(r))) {
    return deny('separation_of_powers', `${verb.id} belongs to ${verb.policy.rolesAllowed}`)
  }

  const bill = context.bill
  switch (verb.id) {
    case 'congress.introduce_bill':
      // Origination Clause, Art. I, §7, cl. 1
      if (context.revenue && !actor.roles.includes('house')) {
        return deny('origination_clause', 'Bills for raising revenue must originate in the House.')
      }
      break

    case 'president.sign_bill':
    case 'president.veto_bill':
      // Presentment Clause: only a bill passed by both chambers reaches the President.
      if (bill?.status !== 'awaiting_president') return deny('not_presented', '…')
      break

    case 'house.vote_to_override':
    case 'senate.vote_to_override':
      // A veto returns to the chamber where the bill began; it reconsiders first.
      if (bill?.origin !== chamberOf(verb) && bill?.override[bill.origin] !== 'passed') {
        return deny('origin_reconsiders_first', '…')
      }
      break

    case 'court.review_law':
      // Courts decide actual cases; no advisory opinions.
      if (!context.caseBefore) return deny('no_case', '…')
      break
  }
  return { decision: 'allow', reasons: ['enumerated_power'] }
}

One design choice is worth noticing. The policy decides whether an actor may act now: is it their power, and is it their turn? The vote count is the handler's job, because a vote that fails is still a legitimate exercise of power. Losing a vote is not the same as being denied the right to vote.

Policies come in layers

Not every rule is in the Constitution. Each chamber writes its own rules, and some of the most consequential live there: under the Senate's Rule XXII, ending debate on most legislation takes three-fifths of senators, which is why 60 votes matters so much in practice. In OpenVerb you would model that as a second policy, owned by the Senate and evaluated after the constitutional one.

Judicial review is layered differently again. The Constitution never states it outright; it was established by precedent in Marbury v. Madison (1803). Software systems are full of rules like that: not in the original spec, but enforced because a decision made them binding.

A bill becomes law, as verb calls

Here is a real run of the model. A tax bill is started in the wrong chamber, moved, passed, vetoed, and overridden. Each line is what the policy actually returned:

  1. deniedThe Senate tries to start a tax billcongress.introduce_bill

    origination_clause: Bills for raising revenue must originate in the House (Art. I, §7, cl. 1).

  2. okThe House introduces it insteadcongress.introduce_bill
  3. okThe House passes it, 228–207house.vote_on_bill
  4. okThe Senate passes it, 52–48senate.vote_on_bill
  5. okThe President vetoes itpresident.veto_bill
  6. deniedThe Senate tries to override firstsenate.vote_to_override

    origin_reconsiders_first: A veto returns to the chamber where the bill began; the house reconsiders first.

  7. okThe House overrides, 292–143house.vote_to_override
  8. okThe Senate overrides, 68–32senate.vote_to_override

Final status of H.R. 101: law. And every step, including the two that were refused, left a receipt like this one:

receipt
{
  "executionId": "exec_0008",
  "verbId": "senate.vote_to_override",
  "verbVersion": "1.0.0",
  "timestamp": "2026-01-06T15:00:07.000Z",
  "actorId": "senate",
  "tenantId": "us-federal",
  "status": "ok",
  "durationMs": 0
}

Try it yourself

Introduce a bill and move it through Congress, the President and the courts. Change the vote counts, veto it, try to override with one vote short of two-thirds, or let the President sit on it while Congress adjourns. Then try the red buttons and watch the policy refuse.

Bill simulator

Congress

House vote (of 435)

Senate vote (of 100)

Veto override (two-thirds)

President

Try overstepping

Courts

Try overstepping

The simulator runs entirely in your browser, using the same policy function and verb library shown above.

Same verbs, different policy

Here is where the model earns its keep. Other democracies use much of the same vocabulary: introduce a bill, vote on it, give it assent, review it in court. What differs is the policy.

Take the United Kingdom. The government is formed by whoever commands the confidence of the House of Commons, so the Prime Minister and ministers sit in the legislature: one actor holds both legislative and executive roles, which the U.S. policy forbids. The House of Lords can usually delay a bill but not block it outright, under the Parliament Acts 1911 and 1949. Royal Assent has not been refused since 1708. And UK courts cannot strike down an Act of Parliament; under the Human Rights Act 1998, the higher courts can instead declare a law incompatible with protected rights and leave the remedy to Parliament.

RuleUnited States (this model)United Kingdom
Can one actor be legislature and executive?NoYes: ministers sit in Parliament
Can the upper chamber block a bill?Yes: the Senate must pass itGenerally only delay it
Can the head of state refuse a bill?Yes: veto, subject to overrideRoyal Assent, by convention always given
Can courts set aside a law?Yes, in a real caseNo; they can declare incompatibility

Swap the policy and you have a different system of government, without rewriting a single verb. That is the same separation OpenVerb gives software: the vocabulary of actions stays stable, and the rules about who may use them can change.

Why this matters for AI

Constitutional government is, among other things, a long experiment in giving power to actors without letting any one of them do whatever it wants. Powers are listed. Procedures are written down. Some actions need a second actor's consent. Everything is recorded. Mistakes can be reviewed and reversed.

Those are exactly the properties we need when we give AI agents the ability to act in our software. An agent should only be able to call the capabilities it was granted. Risky actions should need a person's confirmation. Every action should leave a record someone can audit. And the rules should be readable by the people who are subject to them, not buried in a prompt.

We did not invent governed power for software. We are borrowing an old idea, and it has held up for a long time. The same runtime that runs this model can run a CRM assistant that cannot email a customer without confirmation, and the same reasoning sits behind the idea that your application agent needs governed capabilities.

Wiring the model into the real runtime takes a few lines:

with @openverb/runtime
import { createRuntime } from '@openverb/runtime'

const runtime = createRuntime({
  verbs: usFederalLibrary.verbs,
  policy: usFederalPolicy,   // the Constitution
  handlers,                  // what each branch actually does
  onReceipt: publishToRecord // the public record
})

What this model leaves out

A great deal: state governments, committees, conference committees, the full rules of each chamber, quorum, emergency powers, the many ways courts decline to hear a case, and the informal norms that make any constitution work in practice. Real government is not a state machine, and nothing here should be read as a claim about how any particular decision should come out. The point is narrower: the shape of constitutional government (granted powers, written procedure, mutual checks and a public record) is the shape of a well-governed execution layer.

OpenVerb Sandbox

Paste a Verb Library JSON schema here to define what actions the AI can perform.

Ask the AI to perform a task. It will use the vocabulary defined in your library.

The AI proposes a structured action based on your library vocabulary.

Waiting for prompt...

OpenVerb Core intercepts the AI's action and validates it before execution.

Verb exists in library
Payload matches JSON Schema
Policy requirements passed
Inputs valid and sanitized

The validated action is routed to the application backend for execution.

Waiting...

OpenVerb Core generates an execution receipt for full auditability.

Waiting for execution...