Disclaimer. Independent open-source prototype. Not affiliated with, endorsed by, or representing any government, department, agency, or initiative — including SPRIND, the Agentic State paper authors (Ilves, Kilian, Parazzoli, Peixoto, Velsberg), or any of the seven jurisdictions used as illustrative case studies. The agentic-state GitHub organization is an independent implementation effort whose name signals framework alignment, not authorship or endorsement. Legislative text is publicly available law interpreted by the author for illustrative purposes only — not authoritative operational guidance.
v0.4.0 · Law-as-Code · Apache 2.0

Statute meets System.

GovOps is an open public-good reference implementation of Law as Code: legislation translated into deterministic, auditable, jurisdiction-aware software with full provenance from decision back to source authority. Behaviour changes are configuration writes, not deploys. A case evaluated against 2025 still resolves with 2025's substrate after the rules change in 2026.

7 jurisdictions 2 programs 6 locales 640 backend tests Cross-browser E2E Apache 2.0
GovOps home page — three registers, one record. Agent-drafted policy, human-ratified by ministers and councils, citizen-auditable through diffable signed change history.
The product home — three registers (agent-drafted, human-ratified, citizen-auditable) summarise the v2.0 thesis. Captured 2026-04-29 from the live dev server.
Who · What it gives you

If you are…

GovOps is a working MVP demo other contributors can fork to build whatever else they need — not a production multi-tenant platform. Five entry points:

AudienceWhat you get
Policy / legal team Configure-without-deploy. Change a statutory threshold by drafting a new dated ConfigValue record with citation + rationale. Dual approval. Full audit. Effective dates honour the statute's calendar, not yours.
→ docs/design/LAW-AS-CODE.md
Citizen Self-screen for a benefit. Estimate eligibility without creating a case, without storing PII, without an audit row. The citizen sees the same rule trace the officer would see.
→ See the /screen route
Auditor Every recommendation traces back. Decision → Rule → ConfigValue → Citation → Authority → Jurisdiction, with the exact substrate values that were in effect on the evaluation date.
→ /api/cases/{id}/audit
Government / contributor Fork the repo, drop in your jurisdiction's YAML, run. Seven reference jurisdictions × six locales already shipped. Adding an eighth costs one YAML tree + one Python registration + four demo cases.
→ CONTRIBUTING.md
Researcher / SPRIND-curious A working reference against the SPRIND "Law as Code" framework's five elements, plus a sixth GovOps adds (the interpretive apparatus — including LLM prompts — is itself versioned configuration).
→ SPRIND mapping
Proof · Real captures + clickable mock demo

See it working

PNGs captured by Playwright against the live v2 dev server (Vite + TanStack + shadcn, parchment-on-ink). Click any image to open a static mock demo of that page — interactivity is disabled in the snapshot; a real hosted live demo ships in v2.1 (≈1 week). Source PNGs are in screenshots/v2/.

Build · How it was implemented

The substrate underneath

Every parameter the engine resolves — age threshold, residency minimum, accepted statuses, calculation coefficients, UI labels, even the LLM prompts — lives as a dated ConfigValue record under lawcode/. The engine queries resolve(key, evaluation_date, jurisdiction_id) instead of reading a constant. Old evaluations stay reproducible because the substrate is dated, not destructive.

Backend

Python · FastAPI · Pydantic

  • Deterministic rule engine (7 rule types incl. typed-AST calculation)
  • Embedded SQLite for substrate persistence (ADR-010)
  • Schema-validated YAML in CI (21 files · 564 records)
  • Ed25519 federation pipeline (ADR-009)
  • 423 tests on Python 3.10 / 3.11 / 3.12
Frontend

Vite · TanStack · shadcn

  • React 19 + TanStack Start (SSR, flat routes)
  • Tailwind v4 + shadcn/ui + react-intl (ICU)
  • 23 routes, 6 locales × ~498 keys
  • Dark + light themes; parchment-on-ink palette
  • Cross-browser Playwright + axe (Chromium / Firefox / WebKit)
Process

12 phases · 28 ADRs

  • Built in ~16 weeks of evening / weekend work, solo
  • Every load-bearing decision recorded as an ADR
  • PLAN.md tracks phases + accepted backlog
  • Conventional Commits; CI matrix on every PR
  • Apache 2.0 — open public-good posture preserved
Framework · SPRIND Law-as-Code mapping

Five SPRIND elements + a sixth

SPRIND's "Law as Code" initiative names five foundational elements for digital legal infrastructure. GovOps implements all five and adds a sixth that SPRIND does not yet articulate. Full element-by-element code mapping in docs/design/LAW-AS-CODE.md.

Element 1 · Binding schema for executable legal norms

JSON Schema for ConfigValue records and lawcode/ file shape; CI gate rejects malformed YAML.

schema/configvalue-v1.0.json · schema/lawcode-v1.0.json · scripts/validate_lawcode.py
Element 2 · Open-source legal-coding editors

Working editor for the legal code: search, timeline, diff, draft, dual-approval, prompt admin.

web/src/routes/config.* · web/src/routes/encode.*
Element 3 · AI-powered legal-coding processes

Statute text in → candidate rules out (LLM-assisted) → human review → commit-ready YAML.

src/govops/encoder.py · src/govops/yaml_emitter.py
Element 4 · Central repository of the official legal code

Versioned lawcode/ tree per jurisdiction; federation lets a second repo publish a peer jurisdiction with Ed25519 signing.

lawcode/{ca,br,es,fr,de,ua,jp}/config/ · src/govops/federation.py
Element 5 · Training and capacity building

Implementation guide, training curriculum, certification program, RFP template, partner program — all Apache 2.0, all forkable.

docs/ecosystem/{implementation-guide,training-curriculum,certification-program,rfp-template,partner-program}.md
Element 6 (added) · Versioned interpretive apparatus

The prompts the AI uses, the labels operators read, and the engine thresholds are themselves dated ConfigValue records — same schema, same approval flow as the rules. The interpretive layer is configuration, not code.

lawcode/global/prompts.yaml · src/govops/config.py
Contribute · Five ways in

Where to start

Sorted by return on effort. Adding a jurisdiction is the highest-value contribution; native-speaker translation review is the most accessible to non-developers. Full guide in CONTRIBUTING.md.

PathEffortSkillsStart here
Add a jurisdiction (new country) ~1 day Domain knowledge of one country's benefit law Issue template
Second program in an existing jurisdiction ~1 week Domain knowledge of a non-pension benefit Issue template
Native-speaker i18n review ~1 hour per locale Native fluency in fr / pt-BR / es-MX / de / uk Issue template
Add a rule type to the engine ~1 day Python + tests CONTRIBUTING § engine
Federate a peer repo with its own jurisdiction ~1 week Python + Ed25519 signing ADR-009
Quickstart · Two terminals

Run it locally

v2.0 has two surfaces during local dev — the modern v2 UI on :8080 (what's in the screenshots above) and a legacy Jinja fallback on :8000. v2.1 will collapse these into one Docker container; for now they're separate processes.

# One-time setup
git clone https://github.com/agentic-state/GovOps-LaC.git
cd GovOps-LaC
pip install -e ".[dev]"

# Terminal 1 — backend API + legacy Jinja UI
govops-demo                            # http://127.0.0.1:8000

# Terminal 2 — the v2 React/TanStack/shadcn UI
cd web && npm install && npm run dev   # http://localhost:8080  ← visit this

pytest -q                              # 423 tests (in a third terminal if you want)