feat(a-sounder-constitution): typed civic contagion simulator — rights as transition constraints#29
Merged
Conversation
… as transition constraints) A Plague Inc.-style civic simulator where the "pathogen" is a constitutional doctrine and the central thesis is that RIGHTS ARE TYPE CONSTRAINTS ON LEGAL STATE TRANSITIONS, not resources. - src/constitution.js: the type checker. Under a SOUND constitution, coercive downgrades (Person -> Property, Emergency -> PermanentPower, ...) are UNREPRESENTABLE; liberty restrictions require a discharged proof obligation. Under an UNSOUND one every coercive move is a permitted total function that books hidden legitimacy debt. - src/engine.js: a deterministic typed cellular automaton — regions, mobile doctrine "gliders", neighbour diffusion, exogenous shocks, and outcome classification (caste / authoritarian / collapse / sclerosis / free / rights-preserving resilience). Coercive effects are routed through the type checker, so the same strategy diverges purely by constitution. - web/: zero-dependency canvas simulator. The type-checker log makes the thesis visible (✗ unrepresentable vs ✓ permitted/domination). - sim/compare.mjs: headless, quantitative sound-vs-unsound demonstration. - tests/: node --test suite (12 tests) pinning mechanics and thesis-level behaviour. - formal/Constitution.idr: the static certificate — the sound Person type has no Property inhabitant (soundNeverProperty), sound standing transitions are rank-monotone (soundMonotone), and lawful coercion demands proofs. - docs/, README.adoc, MOTIVATION.adoc, 0.1-AI-MANIFEST.a2ml: design, type-theory, glider catalogue, near-miss/novelty survey, and graduation path. Verified: `node --test` (12/12) and `node sim/compare.mjs` pass. The Idris2 module is written to compile clean but is not yet CI-checked (no idris2 here). Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015w8C1xaGwiDcHHjfuxHBd6
hyperpolymath
added a commit
that referenced
this pull request
Jun 19, 2026
…mpliance (#30) ## Unblock `openssf-compliance` (pre-existing template debt) The `openssf-compliance` CI check fails **repo-wide** (on `main` too, and it surfaced on #29) because two RSR-template files still carry unfilled `{{PLACEHOLDER}}` tokens. This is pre-existing scaffolding debt, unrelated to any feature work — split out from #29 into its own reviewable PR as requested. ### Changes - **`.github/SECURITY.md`** — fill `PROJECT_NAME` / `OWNER` / `REPO` / `SECURITY_EMAIL` / `CURRENT_YEAR` with the repo's own established values (security contact `j.d.a.jewell@open.ac.uk`, matching the canonical root `SECURITY.md`); remove the "delete before publishing" template-instruction block; drop the unused **PGP** sections (this project uses email-only disclosure — the root `SECURITY.md` has no PGP); add the SPDX header for consistency with the rest of the tree. - **`.machine_readable/ECOSYSTEM.a2ml`** — fill `REPO_DESCRIPTION`, and correct the stale `name "katagoria"` → `"ideas-to-alphas"` (matching `STATE.a2ml` after the repo rename). ### Verification Replicated the CI placeholder scan locally over every required file: ``` 0 required files contain placeholder tokens .github/SECURITY.md: 375 lines (> 10 required) no stray {{ tokens remain in the edited files ``` No code, dependencies, or feature behaviour touched — governance/template files only. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_015w8C1xaGwiDcHHjfuxHBd6 --- _Generated by [Claude Code](https://claude.ai/code/session_015w8C1xaGwiDcHHjfuxHBd6)_ Co-authored-by: Claude <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Sounder Constitution
A new research proof-of-concept in
a-sounder-constitution/: a Plague Inc.-style civic simulator where the "pathogen" is a constitutional doctrine, norm, fear, right, or type error.This sits squarely in the incubator's remit: the load-bearing claim is type-theoretic, it ships an Idris2 formalization alongside an executable model, and it has a graduation path toward
typell.What's here
src/constitution.jsPerson -> Property,Emergency -> PermanentPower, etc. areUNREPRESENTABLE; liberty restrictions need a discharged proof obligation. Unsound permits every coercive move and books hidden legitimacy debt.src/engine.jsweb/✗ unrepresentablevs✓ permitted (domination)).sim/compare.mjstests/node --testsuite (12 tests) pinning mechanics and thesis-level behaviour.formal/Constitution.idrPersontype has noPropertyinhabitant (soundNeverProperty), sound standing transitions are rank-monotone (soundMonotone), and lawful coercion demands proofs.docs/,README.adoc,MOTIVATION.adoc,0.1-AI-MANIFEST.a2mlThe result (hold strategy fixed, vary only the constitution —
npm run sim)Unsound buys order by domination (legitimacy/trust → 0, huge hidden debt); sound refuses the coercive moves at the type level (tens of thousands "blocked") so domination never happens. In Reconstruction, the rights patch only "takes" under a sound constitution — under unsound the pre-existing caste can't be undone.
How to run
Verification done in this environment
node --test— 12/12 passnode sim/compare.mjs— produces the contrast aboveui.jspassesnode --checkformal/Constitution.idris written to compile clean (%default total, nobelieve_me) but is not yet run throughidris2here (none on PATH) — flagged as pending informal/README.adoc, per the repo's blocker convention.🤖 Generated with Claude Code
https://claude.ai/code/session_015w8C1xaGwiDcHHjfuxHBd6
Generated by Claude Code