Skip to content

Commit abe6330

Browse files
committed
Remove legacy ReScript host; Deno + cartridges is the runtime surface
The repo began as ReScript Evangeliser. The engine has been re-pointed to the correspondence model (Idris2 ABI + Zig FFI + AffineScript host binding) with a Deno + cartridge-data runtime surface, so the legacy ReScript host — flagged by the governance anti-pattern check — is now removed. Removed: - All ReScript host sources: src/*.res, src/*.resi (Types, Glyphs, Narrative, Patterns, Scanner, Analyser, Output, Cli) and the six test/*_test.res suites - rescript.json, scripts/rescript-build.sh, and the ReScript Deno tasks/imports in deno.json (plus nodeModulesDir) - Dead .res/.resi entries in .gitignore / .editorconfig / .gitattributes - deno.lock from the index (it is .gitignored; regenerated locally) Replaced (Deno-only, no ReScript): - bin/evangeliser.js — offline CLI reading the cartridges (--kind / --find / --json) - test/run_all.js — cartridge invariant tests mirroring the Idris2 ABI (false-friend signature, residue direction, all six kinds) — 59 checks - Justfile build/watch/clean/install/test/stats/validate-structure recipes - deno.json tasks repointed (build = validate cartridges; gui; test) Docs/manifests now state the host is removed while KEEPING ReScript as a legacy *target* language in correspondence content (the vanished-`return` example, the cartridge target, the Form examples): README, EXPLAINME, ROADMAP, CLAUDE.md, .claude/CLAUDE.md, TOPOLOGY, TEST-NEEDS, Mustfile.epx, config.ncl, CHANGELOG, and .machine_readable/*. Verified locally with Deno 2.8.3: deno fmt --check, deno lint, deno task test (59/59), deno task build/validate (1/1 cartridges), CLI + GUI live probe all green. Licence files and SPDX headers left untouched. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01A1BaAhqxUjkgVb1yg1sZap
1 parent d5dc360 commit abe6330

48 files changed

Lines changed: 1213 additions & 4745 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.claude/CLAUDE.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
- **Model:** Concept / Form / Transition; six `CorrespondenceKind`s (cognate / false-friend / antonym / alien-realization / novel / vanished) as graded Echo fibres; classification runs per stratum. Carrier = Dyadic relation + Echo loss-with-residue (`proven-tests-and-benches` + `echo-types`).
99
- **Division of labour:** we build the engine + interface + vocabulary; the community authors per-language **cartridges** (`standards/cartridges/`).
1010

11-
Host: **ReScript today** (legacy host, being migrated; banned in *new* code per estate policy → AffineScript `.affine`). **AffineScript** is the future host and a first-class target (Zig FFI + Idris2 ABI seams).
11+
Host: **ReScript host removed** (2026-06) — ReScript remains only as a legacy *target* language in correspondence content (cartridges/examples), never host code. The current runtime surface is **Deno + cartridge data**; **AffineScript** is the future host and a first-class target (Zig FFI + Idris2 ABI seams).
1212

1313
When working here: classify-don't-translate; keep the no-shame voice; lead with the correspondence model (AffineScript is one first-class target/host, not the sole pitch); author-now / verify-in-CI when the toolchain is absent; **MPL-2.0 SPDX on new files, never relicense or sweep SPDX (licence-label drift is FLAG-ONLY to the owner)**.
1414

@@ -19,7 +19,7 @@ When working here: classify-don't-translate; keep the no-shame voice; lead with
1919
| Language/Tool | Use Case | Notes |
2020
|---------------|----------|-------|
2121
| **AffineScript** | Flagship target language; future host | Affine/linear types, borrow checker, QTT, WASM backend |
22-
| **ReScript** | Current host application code; legacy target | Compiles to JS, type-safe |
22+
| **ReScript** | Legacy *target* language only (host removed) | Appears in cartridges/examples; not host code |
2323
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
2424
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
2525
| **Zig** | FFI, C-ABI bridges, systems | Canonical FFI layer (per `0-AI-MANIFEST.a2ml`) |
@@ -28,7 +28,7 @@ When working here: classify-don't-translate; keep the no-shame voice; lead with
2828
| **Gleam** | Backend services | Runs on BEAM or compiles to JS |
2929
| **Elixir** | BEAM supervision and bot-role orchestration metadata | Support role only; not the host language or flagship target |
3030
| **Bash/POSIX Shell** | Scripts, automation | Keep minimal |
31-
| **JavaScript** | Only where ReScript/AffineScript cannot | MCP protocol glue, Deno APIs |
31+
| **JavaScript** | Only where AffineScript cannot (Deno glue) | Workspace server, CLI, cartridge tooling |
3232
| **Nickel** | Configuration language | For complex configs |
3333
| **Guile Scheme** | State/meta files | STATE.scm, META.scm, ECOSYSTEM.scm |
3434
| **Julia** | Batch scripts, data processing | Per RSR |
@@ -39,13 +39,13 @@ When working here: classify-don't-translate; keep the no-shame voice; lead with
3939

4040
| Banned | Replacement |
4141
|--------|-------------|
42-
| TypeScript | AffineScript (preferred) or ReScript |
42+
| TypeScript | AffineScript |
4343
| Node.js | Deno |
4444
| npm | Deno |
4545
| Bun | Deno |
4646
| pnpm/yarn | Deno |
4747
| Go | Rust or Zig |
48-
| Python | Julia/Rust/ReScript/AffineScript |
48+
| Python | Julia/Rust/AffineScript |
4949
| Java/Kotlin | Rust/Tauri/Dioxus |
5050
| Swift | Tauri/Dioxus |
5151
| React Native | Tauri/Dioxus |
@@ -56,40 +56,42 @@ When working here: classify-don't-translate; keep the no-shame voice; lead with
5656

5757
**No exceptions for Kotlin/Swift** - use Rust-first approach:
5858

59-
1. **Tauri 2.0+** - Web UI (ReScript/AffineScript) + Rust backend, MIT/Apache-2.0
59+
1. **Tauri 2.0+** - Web UI (AffineScript) + Rust backend, MIT/Apache-2.0
6060
2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0
6161

6262
Both are FOSS with independent governance (no Big Tech).
6363

6464
### Enforcement Rules
6565

66-
1. **No new TypeScript files** - Convert existing TS to AffineScript or ReScript
66+
1. **No new TypeScript files** - Convert existing TS to AffineScript
6767
2. **No package.json for runtime deps** - Use deno.json imports
6868
3. **No node_modules in production** - Deno caches deps automatically
6969
4. **No Go code** - Use Rust or Zig instead
70-
5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, ReScript/AffineScript for apps
70+
5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, AffineScript for apps
7171
6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
7272
7. **No V outside the V ecosystem** - Use Zig
7373

7474
### JavaScript Exemptions
7575

76-
JavaScript is allowed only when it is generated ReScript output, Deno/browser runtime glue, or a launcher bridge that cannot currently be written in AffineScript without losing operability.
76+
JavaScript is allowed only when it is Deno/browser runtime glue or a launcher bridge that cannot currently be written in AffineScript without losing operability. (The ReScript host has been removed, so there is no longer any generated-ReScript-output JS.)
7777

7878
| Path | Files | Rationale | Unblock condition |
7979
|------|-------|-----------|-------------------|
80-
| `bin/evangeliser.js` | 1 | Deno CLI shim importing compiled ReScript output | Replace when AffineScript host CLI is runnable directly |
81-
| `gui/server.js` | 1 | Local Deno HTTP bridge for the AffineScript GUI contract and compiled ReScript analyser | Replace when AffineScript-to-Deno/webview bridge is available |
80+
| `bin/evangeliser.js` | 1 | Deno CLI reading correspondence cartridges (offline fallback) | Replace when AffineScript host CLI is runnable directly |
81+
| `gui/server.js` | 1 | Local Deno HTTP bridge serving the workspace + cartridge API | Replace when AffineScript-to-Deno/webview bridge is available |
8282
| `gui/app.js` | 1 | Browser-side event/render bridge for the GUI shell | Replace when AffineScript DOM/TEA bridge can drive this UI directly |
83+
| `scripts/validate-cartridges.js` | 1 | Deno cartridge-schema validator (ajv) | Replace when AffineScript can host the validator |
84+
| `test/run_all.js` | 1 | Deno cartridge invariant tests | Replace when AffineScript test runner is runnable directly |
8385

8486
### TypeScript Exemptions
8587

8688
| Path | Files | Rationale | Unblock condition |
8789
|------|-------|-----------|-------------------|
88-
| `node_modules/` | generated | Deno-managed npm compatibility cache for ReScript tooling | Do not commit; local cache only |
90+
| _(none)_ | | No TypeScript in the repo. The former `node_modules/` ReScript-tooling cache is obsolete now the ReScript host is removed. | |
8991

9092
### BEAM / Elixir Roles
9193

92-
Elixir is a support-role language for BEAM supervision of automation and fleet orchestration. It is not a target language in this repo and must not displace the ReScript host or AffineScript flagship path.
94+
Elixir is a support-role language for BEAM supervision of automation and fleet orchestration. It is not a target language in this repo and must not displace the AffineScript host path.
9395

9496
| Role | Owner | Purpose | Boundary |
9597
|------|-------|---------|----------|

.editorconfig

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,6 @@ indent_size = 3
4141
[*.hs]
4242
indent_size = 2
4343

44-
[*.res]
45-
indent_size = 2
46-
47-
[*.resi]
48-
indent_size = 2
49-
5044
[*.ncl]
5145
indent_size = 2
5246

.gitattributes

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@
88
*.ex text eol=lf diff=elixir
99
*.exs text eol=lf diff=elixir
1010
*.jl text eol=lf
11-
*.res text eol=lf
12-
*.resi text eol=lf
11+
*.affine text eol=lf
12+
*.idr text eol=lf
13+
*.zig text eol=lf
1314
*.ada text eol=lf diff=ada
1415
*.adb text eol=lf diff=ada
1516
*.ads text eol=lf diff=ada
@@ -52,5 +53,3 @@ Containerfile text eol=lf
5253
# Lock files
5354
Cargo.lock text eol=lf -diff
5455
flake.lock text eol=lf -diff
55-
# Pending estate-wide policy: hide ReScript from primary-language detection.
56-
**/*.res linguist-detectable=false

.github/workflows/rsr-antipattern.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ jobs:
165165
- name: Check for tsconfig
166166
run: |
167167
if [ -f "tsconfig.json" ]; then
168-
echo "❌ tsconfig.json detected - use ReScript instead"
168+
echo "❌ tsconfig.json detected - use AffineScript instead"
169169
exit 1
170170
fi
171171
echo "✅ No tsconfig.json"

.github/workflows/ts-blocker.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ jobs:
2727
NEW_JS=$(git diff --name-only --diff-filter=A HEAD~1 2>/dev/null | grep -E '\.(js|jsx)$' | grep -v '\.res\.js$' | grep -v '\.gen\.' | grep -v 'node_modules' | grep -v '^bin/evangeliser\.js$' | grep -v '^gui/server\.js$' | grep -v '^gui/app\.js$' || true)
2828
2929
if [ -n "$NEW_TS" ] || [ -n "$NEW_JS" ]; then
30-
echo "❌ New TS/JS files detected outside documented Deno/ReScript bridge exemptions."
30+
echo "❌ New TS/JS files detected outside documented Deno bridge exemptions."
3131
[ -n "$NEW_TS" ] && echo "$NEW_TS"
3232
[ -n "$NEW_JS" ] && echo "$NEW_JS"
3333
exit 1
3434
fi
35-
echo "✅ ReScript policy enforced"
35+
echo "✅ JS/TS bridge policy enforced"

.gitignore

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,6 @@ erl_crash.dump
3737
*.jl.mem
3838
/Manifest.toml
3939

40-
# ReScript
41-
/lib/bs/
42-
/lib/
43-
/.bsb.lock
44-
*.res.js
45-
*.bs.js
46-
.merlin
47-
!/test/run_all.js
48-
4940
# Deno
5041
deno.lock
5142
.deno/

.machine_readable/6a2/META.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ decisions = [
1515
"ADR-1 Classify, don't translate — name the CorrespondenceKind + residue; no universal translator, no Curry-Howard-fidelity goal",
1616
"ADR-2 Carrier = Dyadic relation + Echo loss-with-residue (proven-tests-and-benches + echo-types); invariant-path is the governance front-end",
1717
"ADR-3 Engine vs cartridge — we build the engine/interface/vocabulary; per-language facts are cartridges (standards/cartridges)",
18-
"ADR-4 Host ReScript -> AffineScript (Zig FFI + Idris2 ABI seams); ReScript banned in new code",
18+
"ADR-4 Host ReScript -> AffineScript (Zig FFI + Idris2 ABI seams); ReScript host removed (Deno + cartridges interim), retained only as a legacy target language",
1919
"ADR-5 Emit into PanLL (octads -> VeriSimDB -> panels); not itself the IDE",
2020
"ADR-6 Knot-theory framing is an aspirational lens, not a literal computation",
2121
]

.machine_readable/6a2/PLAYBOOK.a2ml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ last-updated = "2026-06-18"
88
project = "nextgen-languages-evangeliser"
99

1010
[deployment]
11-
# Host: ReScript today (compiles to JS, run under Deno); AffineScript after the
12-
# Phase-3 host port. Surfaces: Deno CLI (bin/evangeliser.js) and the browser
13-
# GUI (gui/server.js + gui/app.js).
11+
# Host: ReScript host removed — interim surface is Deno + cartridge data;
12+
# AffineScript after the host port. Surfaces: Deno CLI (bin/evangeliser.js,
13+
# reads cartridges) and the browser GUI (gui/server.js + gui/app.js).
1414
# method = "ci-triggered"
1515
# target = "library + cli + browser-gui"
1616

.machine_readable/META.a2ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
(adr-1 "Classify, don't translate — the engine names the kind of cross-language correspondence (CorrespondenceKind) and its residue; it is not a universal translator and claims no Curry-Howard fidelity")
1111
(adr-2 "Formal carrier = Dyadic relation + Echo loss-with-residue (proven-tests-and-benches Dyadic.idr + hyperpolymath/echo-types); invariant-path is the governance front-end")
1212
(adr-3 "Engine vs cartridge — we build the general engine, interface and vocabulary; per-language facts are authored as cartridges (standards/cartridges)")
13-
(adr-4 "Host moves ReScript -> AffineScript with Zig FFI + Idris2 ABI seams; ReScript banned in new code per estate policy")
13+
(adr-4 "Host moves ReScript -> AffineScript with Zig FFI + Idris2 ABI seams; the ReScript host has been removed (Deno + cartridges is the interim surface), ReScript retained only as a legacy target language")
1414
(adr-5 "The engine emits into PanLL (octads -> VeriSimDB -> panels); it is not itself the IDE")
1515
(adr-6 "Knot-theory framing is an aspirational lens, not a literal computation — documented honestly"))
1616
(development-practices

.machine_readable/STATE.a2ml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -19,23 +19,24 @@
1919

2020
(current-position
2121
(phase "Re-point: cross-language correspondence engine + abstraction-model pivot")
22-
(overall-completion 58)
22+
(overall-completion 66)
2323
(working-features
2424
"Correspondence-model design spec (docs/theory/CORRESPONDENCE-MODEL.adoc) — merged"
2525
"Standards/machine-readable hygiene (6a2 manifests, panic-attack gate, eNSAID config) — merged"
26-
"Scanner + Analyser detection engine (ReScript host)"
27-
"Narrative generation (no-shame voice)"
28-
"Makaton-inspired glyph view-layer"
29-
"CLI: scan / patterns / legend / stats"
30-
"RAW/FOLDED/GLYPHED view layers; plain/markdown/html outputs"))
26+
"Idris2 ABI spine (Carrier.idr + Correspondence.idr) — typechecks; Zig FFI mirror; AffineScript host binding"
27+
"Cartridge contract (JSON-Schema) + reference pack (one correspondence per CorrespondenceKind)"
28+
"Browser multi-pane workspace (index / forms / classification; five overlay view-layers) — merged"
29+
"Offline CLI (Deno; reads cartridges): --kind / --find / --json"
30+
"Cartridge invariant tests (Deno; mirrors Abi.Correspondence)"
31+
"Legacy ReScript host removed — runtime surface is Deno + cartridges"))
3132

3233
(route-to-mvp
3334
(milestones
3435
(m0 (status "complete") (items "Correspondence-model spec: Concept/Form/Transition + six kinds + Dyadic/Echo carrier"))
3536
(m1 (status "complete") (items "Standards/repo hygiene: 6a2 manifests, panic-attack gate, eNSAID config"))
36-
(m2 (status "in-progress") (items "Identity re-point" "Abstraction-model pivot: Concept/Form/Transition + CorrespondenceKind in src"))
37-
(m3 (status "pending") (items "Browser multi-pane GUI + overlay view-layers + HAS accessibility"))
38-
(m4 (status "gated") (items "AffineScript host port (.res -> .affine) + Zig FFI + Idris2 ABI seams"))
37+
(m2 (status "in-progress") (items "Identity re-point" "Abstraction-model pivot: Concept/Form/Transition + CorrespondenceKind as cartridge facts"))
38+
(m3 (status "complete") (items "Browser multi-pane GUI + overlay view-layers + HAS accessibility"))
39+
(m4 (status "gated") (items "AffineScript host application (ReScript host removed; Zig FFI + Idris2 ABI seams authored)"))
3940
(m5 (status "pending") (items "Cartridge contract + 2nd language pack"))
4041
(m6 (status "pending") (items "Idris2/Echo witnesses + benches + PanLL octad emission"))))
4142

@@ -45,9 +46,11 @@
4546
"Licence-label drift to flag to owner (PMPL badge / 'Palimpsest License (MPL-2.0)' / ROADMAP 'MPL-2.0-or-later') vs MPL-2.0 SPDX — FLAG-ONLY, manual")
4647

4748
(critical-next-actions
48-
"Abstraction-model pivot: recast Types/Patterns/Narrative/Analyser to Concept/Form/Transition + CorrespondenceKind"
49-
"Browser multi-pane GUI surface")
49+
"Port the legacy pattern catalogue into cartridge facts (Concept/Form/Transition + CorrespondenceKind)"
50+
"Author a second language pack to prove engine-agnosticism"
51+
"Begin the AffineScript host application against the Idris2 ABI / Zig FFI seams")
5052

5153
(session-history
5254
(2026-04-16 "Phase 0 decisions locked; Phase 1 started")
53-
(2026-06-18 "Re-point: correspondence-model spec merged (#19); standards hygiene merged (#20); identity re-point")))
55+
(2026-06-18 "Re-point: correspondence-model spec merged (#19); standards hygiene merged (#20); identity re-point")
56+
(2026-06-27 "ABI/FFI/host spine + multi-pane GUI merged; legacy ReScript host removed (Deno + cartridges)")))

0 commit comments

Comments
 (0)