|
1 | | -// SPDX-License-Identifier: CC-BY-SA-4.0 |
2 | | -// Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
3 | | -= RSR Template Repo - Explainme |
4 | | -image:https://img.shields.io/badge/License-MPL_2.0-blue.svg[License: MPL-2.0,link="https://opensource.org/licenses/MPL-2.0"] |
5 | | - |
6 | | -:toc: |
| 1 | += EveryType - EXPLAINME |
| 2 | +How the README claims map to real files. |
| 3 | +:toc: left |
| 4 | +:sectnums: |
7 | 5 | :icons: font |
8 | 6 |
|
9 | | -This file explains how the key template claims map to real files. |
| 7 | +This file explains how EveryType’s main claims map to implementation files, proof boundaries, repository machinery, and caveats. |
| 8 | + |
| 9 | +The README is the public orientation. |
| 10 | + |
| 11 | +This file is the engineering account. |
| 12 | + |
| 13 | +== SystemET Layering |
| 14 | + |
| 15 | +Claim: EveryType implements the open-source kernel for SystemET, a five-layer stratified type theory. |
| 16 | + |
| 17 | +How this is implemented: |
| 18 | + |
| 19 | +* L0 runtime target lives under `src/` and target-specific backend modules. |
| 20 | +* L1 equality is implemented as normalization plus comparison, not a coercion calculus. |
| 21 | +* L2 resources are implemented through the graded-modal substrate and pluggable semiring machinery. |
| 22 | +* L3 guarded recursion is represented with `▶`. |
| 23 | +* L4 effects are currently an amber/open proof area under the TEA-erasure programme. |
| 24 | + |
| 25 | +Caveat: |
| 26 | + |
| 27 | +* The README describes the intended SystemET architecture. |
| 28 | +* The current implementation status is bounded by `AFFIRMATION.adoc`, `AUDIT.adoc`, and the test suite. |
| 29 | +* L4 TEA erasure is not to be described as complete until `OPEN-A` is closed. |
| 30 | + |
| 31 | +== Totality Gate |
| 32 | + |
| 33 | +Claim: At L1, type-level functions must terminate, so equality is conversion. |
| 34 | + |
| 35 | +How this is implemented: |
| 36 | + |
| 37 | +* The totality checker rejects non-terminating type-level computation. |
| 38 | +* Equality checking normalizes both sides and compares normal forms. |
| 39 | +* There is no System-Fc-style coercion language. |
| 40 | + |
| 41 | +Caveat: |
| 42 | + |
| 43 | +* The guarantee is only as strong as the implemented totality checker and the proof status recorded in `AFFIRMATION.adoc`. |
| 44 | +* Any accepted escape hatch must be documented as an assumption or unsafe boundary. |
| 45 | + |
| 46 | +== Structural Gate |
| 47 | + |
| 48 | +Claim: EveryType admits shallow structural projection but refuses deep co/contravariant rewriting. |
| 49 | + |
| 50 | +How this is implemented: |
| 51 | + |
| 52 | +* Rows, variants, refinements, and record-like products are handled through shallow CAR/CDR-style projection. |
| 53 | +* The permitted structural behaviour is projection from additive product structure. |
| 54 | +* Deep variance through function spaces, effects, resources, lifetimes, or linear positions is intentionally not admitted as a general rule. |
| 55 | + |
| 56 | +Caveat: |
| 57 | + |
| 58 | +* This is a design boundary, not an omission. |
| 59 | +* Contributions that reintroduce deep variance must justify why they do not recreate the Coherence Cliff. |
| 60 | + |
| 61 | +== Polarity Gate |
| 62 | + |
| 63 | +Claim: EveryType admits polarized casts, not true gradual `any`. |
| 64 | + |
| 65 | +How this is implemented: |
| 66 | + |
| 67 | +* Forward casts `A -> ?` are treated as lossless forgetting. |
| 68 | +* Backward casts `? -| A` are treated as lossy recovery attempts. |
| 69 | +* Lossy recovery is marked with a blame grade such as `!_{blame}`. |
| 70 | + |
| 71 | +Caveat: |
| 72 | + |
| 73 | +* There is no universal `any` that silently escapes the type system. |
| 74 | +* A backward cast is not magic. It is a graded loss event. |
| 75 | + |
| 76 | +== Pluggable Grades |
| 77 | + |
| 78 | +Claim: EveryType can express different disciplines by changing the L2 algebra. |
| 79 | + |
| 80 | +How this is implemented: |
| 81 | + |
| 82 | +* The checker is parameterised over a grade algebra. |
| 83 | +* Example grades include affine usage, costs, security lattices, probability-like grades, privacy budgets, and latency/billing products. |
| 84 | + |
| 85 | +Caveat: |
| 86 | + |
| 87 | +* A proposed grade must satisfy the laws required by the checker. |
| 88 | +* “Pick the algebra” does not mean arbitrary metadata. The algebra must support the relevant operations and ordering discipline. |
| 89 | + |
| 90 | +== TEA Erasure |
| 91 | + |
| 92 | +Claim: Total, effect-graded, affine handlers should erase when the TEA discipline proves them observationally harmless. |
| 93 | + |
| 94 | +How this is implemented: |
| 95 | + |
| 96 | +* TEA is treated as an L4 erasure target. |
| 97 | +* The intended condition is Total + Effect-graded + Affine. |
| 98 | +* Effects are not assumed free merely because they are typed. |
| 99 | + |
| 100 | +Caveat: |
| 101 | + |
| 102 | +* This is currently an open proof area. |
| 103 | +* The README must describe TEA erasure as a target or amber claim until the formal proof is complete. |
| 104 | + |
| 105 | +== Roles to Tropes |
| 106 | + |
| 107 | +Claim: EveryType replaces global roles and coercions with local finite trope transitions. |
| 108 | + |
| 109 | +How this is implemented: |
| 110 | + |
| 111 | +* Rather than proving global representational equality, EveryType represents state-indexed movement as `A@t1 -> A@t2 -> A@t3`. |
| 112 | +* Tropes are finite transition machines. |
| 113 | +* API protocols such as file handles, sockets, transactions, and streams can be modelled as finite movement through states. |
| 114 | + |
| 115 | +Caveat: |
| 116 | + |
| 117 | +* Tropes do not mean “all role problems are solved automatically.” |
| 118 | +* Each real API needs a finite machine and preservation story. |
| 119 | + |
| 120 | +== RSR Integration |
| 121 | + |
| 122 | +Claim: EveryType uses the Rhodium Standard Repository structure without making that infrastructure part of the language kernel. |
| 123 | + |
| 124 | +How this is implemented: |
| 125 | + |
| 126 | +* `0-AI-MANIFEST.a2ml` is the universal entry point for AI agents. |
| 127 | +* `.machine_readable/` stores project metadata, policies, anchors, contractiles, and agent-readable state. |
| 128 | +* `Justfile` provides the task surface. |
| 129 | +* `just validate` checks the repository shape. |
| 130 | +* `AFFIRMATION.adoc` records the dated honesty snapshot. |
| 131 | +* `AUDIT.adoc` acts as the release audit gate. |
| 132 | + |
| 133 | +Caveat: |
| 134 | + |
| 135 | +* RSR machinery is repository infrastructure. |
| 136 | +* It is not part of the EveryType type theory. |
| 137 | +* Passing RSR validation does not prove SystemET soundness. |
10 | 138 |
|
11 | 139 | == Central Session Protocol Authority |
12 | 140 |
|
13 | | -Claim: |
14 | | -Session protocols are centrally maintained and not duplicated in this template. |
| 141 | +Claim: Session protocols are centrally maintained and not duplicated in this repository. |
15 | 142 |
|
16 | 143 | How this is implemented: |
17 | 144 |
|
18 | | -* The local dispatcher (`session/dispatch.sh`) maps canonical commands to central |
19 | | - protocol paths in `standards/session-management-standards`. |
20 | | -* Local files (`session/custom-checks.k9`, `session/local-hooks.sh`, |
21 | | - `coordination.k9`) are integration-only. |
| 145 | +* `session/dispatch.sh` maps canonical commands to central protocol paths in `standards/session-management-standards`. |
| 146 | +* Local files such as `session/custom-checks.k9`, `session/local-hooks.sh`, and `coordination.k9` are integration-only. |
22 | 147 |
|
23 | 148 | Caveat: |
24 | 149 |
|
25 | | -* If `SESSION_STANDARDS_DIR` is unset and no adjacent standards checkout exists, |
26 | | - the dispatcher records the command but cannot resolve central checklist paths. |
| 150 | +* If `SESSION_STANDARDS_DIR` is unset and no adjacent standards checkout exists, the dispatcher records the command but cannot resolve central checklist paths. |
27 | 151 |
|
28 | 152 | == Canonical Command Surface |
29 | 153 |
|
30 | | -Claim: |
31 | | -Template bindings align to one canonical command model. |
| 154 | +Claim: Template bindings align to one canonical command model. |
32 | 155 |
|
33 | 156 | How this is implemented: |
34 | 157 |
|
35 | | -* `Justfile` provides thin aliases (`intake-repo`, `checkpoint-change`, |
36 | | - `verify-maintenance`, `verify-substantial`, `verify-release`, `close-planned`, |
37 | | - `close-urgent`, `recover-repo`, `handover-*`). |
| 158 | +* `Justfile` provides thin aliases such as: |
| 159 | + ** `intake-repo` |
| 160 | + ** `checkpoint-change` |
| 161 | + ** `verify-maintenance` |
| 162 | + ** `verify-substantial` |
| 163 | + ** `verify-release` |
| 164 | + ** `close-planned` |
| 165 | + ** `close-urgent` |
| 166 | + ** `recover-repo` |
| 167 | + ** `handover-*` |
| 168 | + |
38 | 169 | * Every alias calls `session/dispatch.sh` with canonical verb-object pairs. |
39 | 170 |
|
40 | 171 | Caveat: |
41 | 172 |
|
42 | | -* Recipes are wrappers only. They do not replace protocol content from |
43 | | - the central standards repo. |
| 173 | +* Recipes are wrappers only. |
| 174 | +* They do not replace protocol content from the central standards repository. |
44 | 175 |
|
45 | 176 | == Runtime State Is Local |
46 | 177 |
|
47 | | -Claim: |
48 | | -Session state is per-repository runtime output, not standards text. |
| 178 | +Claim: Session state is per-repository runtime output, not standards text. |
49 | 179 |
|
50 | 180 | How this is implemented: |
51 | 181 |
|
52 | | -* `session/dispatch.sh` writes command and continuity-core capture stubs to |
53 | | - `.session/LAST-CANONICAL-COMMAND.md` in the target repository path. |
| 182 | +* `session/dispatch.sh` writes command and continuity-core capture stubs to `.session/LAST-CANONICAL-COMMAND.md`. |
54 | 183 |
|
55 | 184 | Caveat: |
56 | 185 |
|
57 | | -* Runtime files are intentionally lightweight and require human/agent completion. |
| 186 | +* Runtime files are intentionally lightweight. |
| 187 | +* They require human or agent completion. |
58 | 188 |
|
59 | 189 | == Template Token Policy |
60 | 190 |
|
61 | | -Claim: |
62 | | -Placeholders are explicit template content until initialization. |
| 191 | +Claim: Placeholders are explicit template content until initialization. |
63 | 192 |
|
64 | 193 | How this is implemented: |
65 | 194 |
|
66 | | -* `README.adoc` and bootstrap recipes keep `{{TOKEN}}` placeholders visible. |
| 195 | +* Template files keep `{{TOKEN}}` placeholders visible. |
67 | 196 | * `just init` performs token replacement. |
68 | 197 |
|
69 | 198 | Caveat: |
70 | 199 |
|
71 | 200 | * Uninitialized placeholders must not be treated as project-specific truth. |
72 | 201 |
|
73 | | -== Dependency Updates (Dependabot) |
| 202 | +== Dependency Updates |
74 | 203 |
|
75 | | -Claim: |
76 | | -Dependency bumps land fast and safely, without manual chasing. |
| 204 | +Claim: Dependency bumps land fast and safely, without manual chasing. |
77 | 205 |
|
78 | 206 | How this is implemented: |
79 | 207 |
|
80 | | -* `dependabot.yml` watches the Dependabot-supported ecosystems the estate |
81 | | - actually uses: `github-actions`, `cargo`, `mix` (Elixir), `docker`. |
82 | | -* `dependabot-automerge.yml` auto-merges *every* bump (patch/minor/major, |
83 | | - security or routine) **once the required checks are green** — a broken bump |
84 | | - fails CI and stays open (you get an email); it never lands on a red `main`. |
| 208 | +* `dependabot.yml` watches supported ecosystems used by the estate: |
| 209 | + ** `github-actions` |
| 210 | + ** `cargo` |
| 211 | + ** `mix` |
| 212 | + ** `docker` |
| 213 | + |
| 214 | +* `dependabot-automerge.yml` auto-merges bumps only once required checks are green. |
85 | 215 |
|
86 | 216 | Caveat: |
87 | 217 |
|
88 | | -* Dependabot has **no Deno or Bun ecosystem**, and `pnpm` only rides under the |
89 | | - `npm` ecosystem (itself banned). For this Deno-first estate Dependabot cannot |
90 | | - watch the runtime dependencies; the `npm`/`pip` entries are retained only for |
91 | | - transitional/legacy manifests and are otherwise inert. Deno dependency |
92 | | - currency is managed via `deno.json`/`deno.lock`, not Dependabot. |
93 | | -* Do **not** add Dependabot as a ruleset *bypass* actor: that lets bumps skip |
94 | | - the required checks (secret-scanning, SAST), removing the safety gate and the |
95 | | - "it broke" signal. Auto-merge-on-green gives fast merges without it. |
| 218 | +* A broken bump fails CI and stays open. |
| 219 | +* It does not land on a red main. |
| 220 | +* Dependabot has no direct Deno or Bun ecosystem. |
| 221 | +* Do not add Dependabot as a ruleset bypass actor, because that lets bumps skip required checks. |
96 | 222 |
|
97 | | -== Julia Registry Packages — Standalone Repo Requirement |
| 223 | +== Julia Registry Packages |
98 | 224 |
|
99 | | -Claim: |
100 | | -If this template is used to create a Julia package, it must remain a standalone repository registered with the Julia package registry. |
| 225 | +Claim: If this template is used to create a Julia package, it must remain a standalone repository registered with the Julia package registry. |
101 | 226 |
|
102 | 227 | How this is implemented: |
103 | 228 |
|
104 | | -* Julia's package registry (General.jl or other) expects each package to be a standalone GitHub repository with `Project.toml` at the repository root. |
105 | | -* Installation via `Pkg.add()`, dependency resolution, and automated CI/CD all depend on this canonical structure. |
| 229 | +* Julia’s package registry expects each registered package to be a standalone repository. |
| 230 | +* `Project.toml` must live at the repository root. |
| 231 | +* `Pkg.add()`, dependency resolution, and package discovery depend on the canonical structure. |
106 | 232 |
|
107 | 233 | Caveat: |
108 | 234 |
|
109 | | -* Do NOT move this repository into a monorepo or subdirectory, as this breaks registry registration and package discoverability. |
110 | | -* Julia packages published to a registry must each remain a standalone top-level repository (registry registration and package discovery require it). |
111 | | -* Non-registry Julia packages can be organized differently if they are not published to any registry. |
| 235 | +* Do not move a registered Julia package into a monorepo subdirectory. |
| 236 | +* Non-registry Julia packages can be organized differently if they are not published to a registry. |
112 | 237 |
|
| 238 | +== Licence |
113 | 239 |
|
114 | | -== License |
| 240 | +Claim: The project uses split licensing. |
115 | 241 |
|
116 | | -This project is licensed under the Mozilla Public License, v. 2.0. See the `LICENSE` file for details. |
| 242 | +How this is implemented: |
| 243 | + |
| 244 | +* Code, configuration, and scripts use MPL-2.0. |
| 245 | +* Prose documentation uses CC-BY-SA-4.0. |
| 246 | +* Per-file SPDX headers are authoritative. |
| 247 | + |
| 248 | +Caveat: |
117 | 249 |
|
118 | | -SPDX-License-Identifier: CC-BY-SA-4.0 |
| 250 | +* The root `LICENSE` controls GitHub’s detected licence. |
| 251 | +* Documentation licensing must be preserved through explicit SPDX headers. |
0 commit comments