Repository navigation
chore(proofs): reconcile Grade 3 policy and proof status #47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
46c7964
chore(proofs): reconcile grade 3 policy and status
hyperpolymath 6810751
ci(proofs): surface canonical gate failures
hyperpolymath d403d1e
fix(ci): run proof diagnostics with bash
hyperpolymath 1eae9c7
fix(proofs): include generated control root
hyperpolymath bf9c75a
fix(proofs): document indexed match boundary
hyperpolymath 14081c0
docs(proofs): record Grade 3 receipt
hyperpolymath 995f4d1
docs(check): explain gate order and failure exit status
coderabbitai[bot] f71d3ea
fix(proofs): harden exact policy audits
hyperpolymath 209f00d
fix(policy): close lexical scan evasions
hyperpolymath File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,15 +3,15 @@ | |
| `epistemic-types` is a small, deliberately honest Agda formalization of | ||
| standpoint-indexed modal / epistemic / echo-like type formers. It | ||
| favours mathematical honesty over a large API. Contributions are | ||
| welcome, but the bar is **everything still type-checks under `--safe` | ||
| `--without-K`, with no shortcuts**. | ||
| welcome, but the bar is **everything still passes the canonical | ||
| `--safe --without-K --cubical-compatible` profile, with no shortcuts**. | ||
|
|
||
| - **Author:** Jonathan D.A. Jewell (hyperpolymath) | ||
| [[email protected]]([email protected]).uk | ||
| [[email protected].uk](mailto:[email protected]) | ||
|
|
||
| - **Version:** 0.1.0 (status: prototype) | ||
|
|
||
| - **Last updated:** 2026-06-15 | ||
| - **Last updated:** 2026-11-01 | ||
|
|
||
| ’’’’’ | ||
|
|
||
|
|
@@ -21,8 +21,8 @@ epistemic-types follows the estate-wide **Tri-Perimeter Contribution | |
| Framework (TPCF)** — graduated trust without gatekeeping: | ||
|
|
||
| - **Perimeter 1 — Core Systems (maintainers only).** The proof kernel: | ||
| `src/EpistemicTypes/*.agda` (Base, Access, Warrant, ProofTransport, | ||
| the EchoBridge/SurrealBridge), the `All.agda` wiring, and build | ||
| all 22 modules recursively under `src/EpistemicTypes/` (core, | ||
| applications, and Kripke semantics), the `All.agda` wiring, and proof | ||
| tooling. | ||
|
|
||
| - **Perimeter 2 — Expert Extensions (trusted contributors).** New | ||
|
|
@@ -35,9 +35,9 @@ Framework (TPCF)** — graduated trust without gatekeeping: | |
| ### Fork workflow | ||
|
|
||
| External contributors use the standard **fork**-and-pull-request | ||
| workflow: fork the repository, branch from `main`, run `just` `check` | ||
| (the full `--safe` `--without-K` type-check) locally, and open a PR. | ||
| Proofs are load-bearing — a red `agda` check blocks merge, and no | ||
| workflow: fork the repository, branch from `main`, run `just check` | ||
| (the policy gate, all positive modules, and all expected rejections) locally, | ||
| and open a PR. Proofs are load-bearing — a red `agda` check blocks merge, and no | ||
| `postulate` / `believe_me` shortcuts are accepted. | ||
|
|
||
| ## Build and check | ||
|
|
@@ -46,9 +46,10 @@ The combined proof and rejection gate must stay green: | |
|
|
||
| just check | ||
|
|
||
| This checks every source module (including `All.agda`) and runs | ||
| `tests/check-rejections.sh`. Deliberate rejection fixtures stay outside | ||
| the positive `All.agda` import graph. | ||
| This runs `tests/check-policy.sh`, checks all 22 source modules recursively, | ||
| and validates all 13 expected-rejection fixtures. Deliberate rejection | ||
| fixtures stay outside the positive `All.agda` import graph; coverage does not | ||
| depend on `All.agda` alone. | ||
|
|
||
| Requirements: | ||
|
|
||
|
|
@@ -61,9 +62,10 @@ Requirements: | |
| `check-canonical`; its dependencies stay outside the default core | ||
| gate. | ||
|
|
||
| `All.agda` imports every core module, so `just` `check` checks the whole | ||
| library. A change is not done until `just` `check` passes with no errors | ||
| and no warnings. | ||
| `All.agda` imports the full graph, but the gate also checks every source file | ||
| independently so an omitted aggregate import cannot hide a module. A change is | ||
| not done until `just check` passes with no errors and no warnings outside the | ||
| single documented `UnsupportedIndexedMatch` transport-computation category. | ||
|
|
||
| CI checks every source module, semantic rejection controls and pinned | ||
| canonical Echo correspondence. Proof and security gates must pass before | ||
|
|
@@ -84,13 +86,14 @@ merged. | |
| `BeliefModality`), so the assumption is visible at the type level | ||
| rather than smuggled in. | ||
|
|
||
| - **No standard library.** As above: `Agda.Builtin.*` and | ||
| `Agda.Primitive` only. | ||
| - **No standard library in core source.** As above: `Agda.Builtin.*`, | ||
| `Agda.Primitive`, and local modules only. The optional pinned integration is | ||
| a separate boundary. | ||
|
|
||
| - **`--safe` `--without-K`.** Every module compiles under `{-#` | ||
| `OPTIONS` `--safe` `--without-K` `#-}`. This rules out `postulate`, | ||
| unsafe pragmas, axiom K, and `--type-in-type`. Do not weaken these | ||
| options. | ||
| - **Complete strict profile.** Every first-party module starts with | ||
| `{-# OPTIONS --safe --without-K --cubical-compatible --exact-split | ||
| --no-sized-types --no-guardedness #-}`. The command line repeats the first | ||
| three canonical flags. Do not weaken or partially restate this profile. | ||
|
|
||
| - **No too-strong rules.** Keep the interfaces as weak as the proofs | ||
| allow. The base form `E` `:` `K` `→` `Set` `ℓ` `→` `Set` `ℓ` is a | ||
|
|
@@ -129,15 +132,15 @@ these separations when extending: | |
|
|
||
| ## Adding a module or lemma | ||
|
|
||
| 1. Put Agda source under `src/EpistemicTypes/` and add the new module | ||
| to the `import`/re-export list in `src/EpistemicTypes/All.agda` so | ||
| `just` `check` covers it. | ||
| 1. Put Agda source under `src/EpistemicTypes/` and wire it into | ||
| `src/EpistemicTypes/All.agda` where the full graph requires it. The | ||
| recursive gate will detect the new module; update the explicit 22-module | ||
| policy/metadata inventory in the same change rather than bypassing it. | ||
|
|
||
| 2. Open each module with `{-#` `OPTIONS` `--safe` `--without-K` `#-}`. | ||
| 2. Open each module with the exact complete strict `OPTIONS` line shown above. | ||
|
|
||
| 3. Keep modules small and single-purpose, mirroring the existing | ||
| layout: `Base`, `Warrant`, `Access`, `EchoBridge`, `SurrealBridge`, | ||
| `ProofTransport`, `ProofTransportExample`, `Examples`. | ||
| 3. Keep modules small and single-purpose, following the existing core, | ||
| `Applications/`, and `Kripke/` layout. | ||
|
|
||
| 4. State assumptions as interface fields, not postulates. Add lawful | ||
| instances only after the laws are proved or explicitly required as | ||
|
|
@@ -156,8 +159,9 @@ keep the Agda model and the machine-readable description in step. | |
| - **AsciiDoc (`.adoc`) is the default** for documentation. Update the | ||
| relevant `.adoc` file alongside any behavioural or interface change. | ||
|
|
||
| - Existing docs keep their current names: `README.adoc` and | ||
| `explainme.adoc`. Do **not** rename or duplicate them. | ||
| - Preserve exact current names and roles: `README.adoc` is the overview, | ||
| `explainme.adoc` the concise narrative, and `EXPLAINME.adoc` the detailed | ||
| claims/evidence ledger. | ||
|
|
||
| - Machine-readable descriptions live under `.machine_readable/` (a2ml + | ||
| Nickel/k9). a2ml files use the canonical TOML-like dialect: | ||
|
|
@@ -230,10 +234,9 @@ check. | |
|
|
||
| ## Licence note | ||
|
|
||
| The licence is owner-managed. Do **not** add `LICENSE`, | ||
| `SPDX-License-Identifier` headers, or copyright header lines in a PR. | ||
| The repo is currently SPDX-free and stays consistent; licensing is | ||
| handled separately by the owner. | ||
| The licence and existing SPDX declarations are owner-managed. Do **not** add, | ||
| remove, or alter licence files, SPDX identifiers, or copyright lines without | ||
| explicit owner instruction. | ||
|
|
||
| ’’’’’ | ||
|
|
||
|
|
@@ -242,8 +245,9 @@ handled separately by the owner. | |
| `epistemic-types` sits alongside (and should stay coherent with) these | ||
| estate repos: | ||
|
|
||
| - **echo-types** — Agda loss-with-residue formalism; `EchoBridge` | ||
| composes with it. Audit it before duplicating echo machinery here. | ||
| - **echo-types** — canonical proof-relevant Echo sibling. The optional pin | ||
| checks representation and one-way lowering; Echo is not a resource instance. | ||
| Audit it before duplicating Echo machinery here. | ||
|
|
||
| - **ephapax** — sibling formal language (four-layer redesign with echo | ||
| obligations). | ||
|
|
||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -6,13 +6,13 @@ project = "epistemic-types" | |
| repo = "hyperpolymath/epistemic-types" | ||
| version = "0.1.0" | ||
| status = "prototype" | ||
| last-updated = "2026-06-15" | ||
| last-updated = "2026-11-01" | ||
| author = "Jonathan D.A. Jewell (hyperpolymath) <[email protected]>" | ||
|
|
||
| [purpose] | ||
| summary = "Agda prototypes for standpoint-indexed modal, epistemic, and echo-like type formers." | ||
| stance = "Favours mathematical honesty over a large API." | ||
| detail = "A small, deliberately honest Agda formalization. Constructive; compiles under {-# OPTIONS --safe --without-K #-}. No postulates. No Agda standard library (built with 'agda --no-libraries', using only Agda.Builtin.* / Agda.Primitive)." | ||
| detail = "A small, deliberately honest Agda formalization. All first-party modules declare --safe --without-K --cubical-compatible --exact-split --no-sized-types --no-guardedness. Core source has no postulates, escape hatches or standard-library imports." | ||
| core-form = "E : K -> Set ℓ -> Set ℓ. E κ A reads 'A is epistemically available at standpoint κ'." | ||
| base-interface = "A plain indexed endofunctor (map only) — NOT a monad/comonad; no generic return/reflect." | ||
|
|
||
|
|
@@ -26,7 +26,7 @@ echo_distinction = "Echo values have explicit retention certificates; resource b | |
| no_collapse = "Do not collapse Echo C y and E κ A. Their composition is meaningful, but they are not the same modality." | ||
|
|
||
| [typecheck] | ||
| command = "bash tests/check-proofs.sh && bash tests/check-rejections.sh" | ||
| command = "bash tests/check-policy.sh && bash tests/check-proofs.sh && bash tests/check-rejections.sh" | ||
| just-target = "just check" | ||
| agda-version = "2.6.4.3" | ||
|
|
||
|
|
@@ -36,6 +36,6 @@ agda-version = "2.6.4.3" | |
| present = ["0-AI-MANIFEST.a2ml", "AGENTIC.a2ml", "ECOSYSTEM.a2ml", "META.a2ml", "NEUROSYM.a2ml", "PLAYBOOK.a2ml", "README.adoc", "STATE.a2ml"] | ||
|
|
||
| [invariants] | ||
| single-source-of-truth = "This directory is authoritative; no duplicate metadata in the root directory." | ||
| single-source-of-truth = "This directory is authoritative; the root 0-AI-MANIFEST.a2ml is a universal pointer and must agree with it." | ||
| no-stale-metadata = true | ||
| ci = "Proof and security workflows configured; see docs/ci-safety.adoc." | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,7 @@ repository = "hyperpolymath/epistemic-types" | |
| author = "Jonathan D.A. Jewell (hyperpolymath) <[email protected]>" | ||
| version = "0.1.0" | ||
| status = "prototype" | ||
| last-updated = "2026-06-15" | ||
| last-updated = "2026-11-01" | ||
|
|
||
| [agent-permissions] | ||
| can-edit-source = true # Agda modules under src/EpistemicTypes/ | ||
|
|
@@ -16,15 +16,17 @@ can-edit-machine-readable = true # .machine_readable/ (descriptiles, proof-tran | |
| can-edit-build = true # Justfile, epistemic-types.agda-lib, .gitignore | ||
| can-create-files = true | ||
| can-edit-license = false # LICENSE / SPDX are owner-manual — agents MUST NOT touch | ||
| can-add-spdx-headers = false # repo is intentionally SPDX-free; keep it consistent | ||
| can-add-spdx-headers = false # licensing declarations remain owner-managed | ||
|
|
||
| [agent-constraints] | ||
| # What AI agents must NOT do in this repository: | ||
| # Honesty discipline (the whole point of the library): | ||
| # - Never add a postulate. There are zero postulates and that is load-bearing. | ||
| # - Never weaken the pragma: keep {-# OPTIONS --safe --without-K #-} everywhere. | ||
| # - Never import an Agda standard library. Build stays `agda --no-libraries`; | ||
| # only Agda.Builtin.* and Agda.Primitive are permitted. | ||
| # - Never weaken the full strict pragma: --safe --without-K --cubical-compatible | ||
| # --exact-split --no-sized-types --no-guardedness. | ||
| # - Never import an Agda standard library into core source. Build stays | ||
| # `agda --no-libraries`; only Agda.Builtin.*, Agda.Primitive and local modules | ||
| # are permitted. The separately pinned CanonicalEcho integration is the exception. | ||
| # - Never introduce a too-strong rule. The base interface E : K -> Set ℓ -> Set ℓ | ||
| # is a plain indexed endofunctor (map only). Do NOT add a generic return, | ||
| # reflect, join, or extract that is not justified by an explicit field or proof. | ||
|
|
@@ -55,10 +57,10 @@ release-claim-requires-hard-pass = true | |
| [verification] | ||
| # The single source of truth for "does it hold". | ||
| command = "just check" | ||
| underlying = "bash tests/check-proofs.sh && bash tests/check-rejections.sh" | ||
| underlying = "bash tests/check-policy.sh && bash tests/check-proofs.sh && bash tests/check-rejections.sh" | ||
| agda-version = "2.6.4.3" | ||
| entrypoint = "src/EpistemicTypes/All.agda" | ||
| expected = "type-checks clean, no postulates, no warnings" | ||
| entrypoint = "scripts/check.sh (recursive source gate; All.agda is the aggregate module)" | ||
| expected = "22 source modules accepted, 13 intended rejections, strict profile/import/escape-hatch policy and planted-postulate control pass" | ||
|
|
||
| [automation-hooks] | ||
| # on-enter: Read 0-AI-MANIFEST.a2ml, then STATE.a2ml. | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At the still-pinned echo-types revision
46cd1a32d4dcf1020f01dd1aab41f816742da10e, the importedEchoandEchoResiduemodules do not declare the coinfective--cubical-compatibleoption. Enabling it here makes Agda flag those imports as non-compatible, and-W errorthen fails the canonical Echo workflow. Remove the option from the integration command and witness until the dependency is repinned to compatible sources, or update the pin together with this change.Useful? React with 👍 / 👎.