How each authority can maintain its own regulations in its own repository, discovered through a registry.
Dutch legislation is produced by many authorities: Parliament, ministers, 342 municipalities, 12 provinces, 21 water boards. Maintaining all regulations in a single repository does not match this reality.
The federated corpus model lets each authority maintain their own regulations in their own Git repository. The engine discovers and loads laws from all sources through a registry.
A corpus-registry.yaml file lists all regulation sources:
Each source declares:
gemeente_code: GM0363 for Amsterdam)The engine merges laws from all registered sources into a single corpus at load time. Scope information is used to filter: when executing for a person in Amsterdam, only Amsterdam’s municipal ordinances apply.
The implements mechanism from Inversion of Control works across repositories. Amsterdam’s afstemmingsverordening (in Amsterdam’s repo) can implement open terms from the Participatiewet (in the central repo). The engine does not care which repository a file came from.
Developers can add a corpus-registry.local.yaml (gitignored) at the project root to add personal sources during development. It extends the main registry without affecting the shared configuration.
A common use case is wiring a sibling checkout of a private corpus repository into the editor without copying files or committing paths:
Paths in local.path resolve relative to the project root; absolute paths also work.
After adding sources or changing files in an external source, re-run node frontend/scripts/copy-laws.js (or restart the frontend so the predev hook fires) to refresh frontend/public/data/.
Credentials for private repositories are stored separately from the manifest. The registry uses auth_ref identifiers that map to environment variables (CORPUS_AUTH_{ID}_TOKEN) or a corpus-auth.yaml file. No secrets in the manifest itself.
Municipalities can edit, validate, and submit their regulations through the web editor without needing a development environment. The editor writes directly to the appropriate GitHub repository via the Contents API, creating branches and pull requests.
implements works across repositoriesAn exploration by Bureau Architectuur of the Dutch Ministry of the Interior into the possibilities of transparent, executable legislation.
Bureau Architectuur
Ministry of the Interior and Kingdom Relations