Skip to content

Commit cf0fcdf

Browse files
WIP: AffineScript co-development — migration practice, frontier guide, verified cross-repo proofs (#531)
## What this is A co-development branch practising the idaptik **ReScript → AffineScript → wasm** migration *for real*, harvesting the lessons into the affinescript frontier-practices guide, and working out the proofs/conflicts that surface when AffineScript meets a real game. **Working agreement for this branch:** writes land in the **affinescript repo only**. Anything destined for another repo (idaptik, echo-types, standards) is staged as a reviewable, diff-able artefact under `proposals/` — never written into its home repo without review. ## Landed so far ### `proposals/echo-types/` — verified soundness proof ✅ A machine-checked Agda module, `EchoEncodingFaithfulness.agda`, that certifies the soundness of the **co-processor integerization** pattern ("the integer IS the X"): - **lossless half** — an injective host-boundary encoder makes the integer a faithful name (every fibre unique); - **lossy half** — a code collision provably destroys the distinction (no `decode` can type-check); - **the clamp-to-sentinel hazard** — the canonical "default bad input to `0`/`Open`" migration bug, exhibited as a *checked concrete instance* of localized controlled loss. Typechecks under `--safe --without-K` with Agda 2.6.3 + agda-stdlib 2.3, **zero postulates, zero funext**. Independently re-verified in-session. Reuses echo-types' existing `injective-fibres-proj-unique` / `no-section-of-collapsing-map` — adds no new primitive, only the migration-engineer packaging + worked `SecurityRank`-shaped instance. See `proposals/echo-types/README.adoc` for the land-it steps. ## Incoming (in progress) - `proposals/idaptik/` — a pure-integer coprocessor kernel migrated to `.affine` end-to-end, with its differential-parity harness (broad sweep → deep verified exemplar). - frontier-practices guide chapters — *co-processor integerization*, *differential parity as the acceptance bar*, the *String host-boundary ABI*, written for both human and agent readers. - `proposals/toolchain/` — the variable-string-backend gap, `--deno-esm` to retire the TS harnesses, compiler-emitted Echo boundary obligations, release-cadence coupling. - `proposals/standards/` — estate-standards implications. ## Toolchain note Built against the **github-only network policy** (crates.io / deno.land / opam.ocaml.org are 403-blocked; GitHub + ubuntu-archive reachable). Agda+stdlib, ocaml/dune, deno, and panic-attack are all installed and verified by routing every install around the block. Draft — will be updated as the streams land. https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s --- _Generated by [Claude Code](https://claude.ai/code/session_01WoKhFQePiRsAj7aqnxbG8s)_ Co-authored-by: Claude <noreply@anthropic.com>
1 parent 8d854cb commit cf0fcdf

3 files changed

Lines changed: 746 additions & 0 deletions

File tree

proposals/README.adoc

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
// SPDX-License-Identifier: MPL-2.0
2+
// SPDX-FileCopyrightText: 2025-2026 Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
3+
= AffineScript co-development proposals (cross-repo, staged for review)
4+
:toc: macro
5+
6+
toc::[]
7+
8+
== What this directory is
9+
10+
This tree holds **cross-repo proposals produced during AffineScript
11+
co-development that target a repo *other than* affinescript**. They are
12+
staged here — as real, diff-able files — because the working agreement
13+
for this session is *writes go to the affinescript repo only*; everything
14+
destined for idaptik, echo-types, standards, etc. is parked here for human
15+
review before it is applied to its home repo.
16+
17+
Each subdirectory is a self-contained proposal with its own `README.adoc`
18+
explaining what it is, where it belongs, how it was verified, and how to
19+
land it.
20+
21+
== Index
22+
23+
[cols="1,2,1,2",options="header"]
24+
|===
25+
| Subtree | Target repo | Status | What
26+
27+
| `echo-types/`
28+
| `hyperpolymath/echo-types`
29+
| *Verified*
30+
| `EchoEncodingFaithfulness.agda` — a machine-checked Agda module
31+
certifying the soundness of the "the integer IS the X" co-processor
32+
integerization pattern (lossless = injective; lossy = collision /
33+
clamp-to-sentinel). Typechecks under `--safe --without-K`, zero
34+
postulates.
35+
36+
| `idaptik/`
37+
| `hyperpolymath/idaptik`
38+
| _pending_
39+
| The kernel migration(s) (ReScript -> AffineScript) as a reviewable
40+
case-study / patch, with their differential-parity harnesses.
41+
42+
| `standards/`
43+
| `hyperpolymath/standards`
44+
| _pending_
45+
| Estate-standards implications: the co-processor integerization +
46+
differential-parity convention, the String host-boundary ABI, the
47+
github-only-network install recipe, the `--deno-esm` / TS-0
48+
exemption-table delta.
49+
50+
| `toolchain/`
51+
| `hyperpolymath/affinescript` (compiler/roadmap) + estate
52+
| _pending_
53+
| Compiler/toolchain implications harvested from dogfooding: the
54+
variable-string-backend gap, `--deno-esm` to retire the TS harnesses,
55+
compiler-emitted Echo boundary obligations, release-cadence coupling.
56+
|===
57+
58+
== Why staged-not-applied
59+
60+
Three reasons, all from the session's working agreement:
61+
62+
. *Review gate.* The owner wants to review anything touching repos other
63+
than affinescript before it lands.
64+
. *Honest provenance.* A staged proposal records exactly how it was
65+
produced and verified, so the receiving repo's maintainer can re-run
66+
the checks rather than trust a claim.
67+
. *No silent cross-repo drift.* Estate policy (see the standards repo's
68+
license + no-automated-edits guardrails) is firmly against bulk
69+
cross-repo sweeps; per-repo human acceptance is the rule.

0 commit comments

Comments
 (0)