From 4144e49d392c862a77423befe4af9ca52338f3e7 Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Sun, 23 Aug 2026 20:04:57 +0100 Subject: [PATCH 1/2] chore: global textual eradication of Nix and ReScript --- .claude/CLAUDE.md | 18 +++++++++--------- .github/workflows/governance.yml | 2 +- .machine_readable/6a2/PLAYBOOK.a2ml | 4 ++-- ABI-FFI-README.md | 4 ++-- CONTRIBUTING.md | 6 +++--- README.adoc | 8 ++++---- RSR_COMPLIANCE.adoc | 4 ++-- RSR_OUTLINE.adoc | 8 ++++---- TOPOLOGY.md | 4 ++-- docs/MOSCOW-REQUIREMENTS.adoc | 8 ++++---- docs/SEAM-CHECK-MUSTS.adoc | 8 ++++---- docs/V1-PUBLISH-ROADMAP.adoc | 8 ++++---- docs/reports/audit/audit-2026-04-15-post.md | 4 ++-- examples/web-project-deno.json | 16 ++++++++-------- ui/deno.json | 6 +++--- 15 files changed, 54 insertions(+), 54 deletions(-) diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index fff800e..b8ebffa 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -11,7 +11,7 @@ Cross-platform document editor with format tabs, allowing users to view and edit ## Architecture - **Core**: Rust library with unified AST for format conversion -- **GUI**: Gossamer with ReScript frontend (not TypeScript!) +- **GUI**: Gossamer with AffineScript frontend (not TypeScript!) - **TUI**: Ada with AdaCurses (matches git-hud pattern) - **Storage**: ArangoDB for graph + document hybrid - **Pipelines**: Nickel for import/export transformations @@ -19,7 +19,7 @@ Cross-platform document editor with format tabs, allowing users to view and edit ## Language Policy ### ALLOWED -- ReScript (UI components) +- AffineScript (UI components) - Rust (core, GUI backend) - Ada (TUI) - Nickel (pipelines, config) @@ -27,7 +27,7 @@ Cross-platform document editor with format tabs, allowing users to view and edit - Deno (runtime) ### BANNED - Do Not Use -- TypeScript (use ReScript) +- TypeScript (use AffineScript) - Node.js/npm/bun (use Deno) - Go (use Rust) - Python (not applicable here) @@ -43,11 +43,11 @@ crates/ └── formatrix-pipeline/ # Nickel executor tui/src/ # Ada TUI source -ui/src/ # ReScript components +ui/src/ # AffineScript components pipelines/ # Nickel pipeline definitions container/ # Wolfi container configs guix/ # Guix channel + packages -nix/ # Nix flake (fallback) +guix/ # Guix flake (fallback) ``` ## Build Commands @@ -56,7 +56,7 @@ nix/ # Nix flake (fallback) just build # Build all just build-core # Build Rust core only just build-tui # Build Ada TUI only -just build-ui # Build ReScript UI only +just build-ui # Build AffineScript UI only just test # Run all tests just fmt # Format all code just lint # Lint all code @@ -83,9 +83,9 @@ Each format implements: - `Parser` trait: raw content → AST - `Renderer` trait: AST → raw content -## ReScript Conventions +## AffineScript Conventions -- Use `@rescript/core` for stdlib +- Use `@affinescript/core` for stdlib - TEA pattern: Model.res, Msg.res, Update logic in App.res - Components in `src/components/` - Bindings in `src/bindings/` @@ -102,7 +102,7 @@ Each format implements: ```bash just test-core # Rust unit tests just test-tui # Ada compilation check -just test-ui # ReScript tests +just test-ui # AffineScript tests just test-integration # Full integration tests ``` diff --git a/.github/workflows/governance.yml b/.github/workflows/governance.yml index 2aa18aa..ad0560c 100644 --- a/.github/workflows/governance.yml +++ b/.github/workflows/governance.yml @@ -3,7 +3,7 @@ # in hyperpolymath/standards instead of carrying per-repo copies. # # Replaces the per-repo governance scaffolding removed in the same commit: -# quality.yml, guix-nix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml, +# quality.yml, guix-guix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml, # security-policy.yml, rsr-antipattern.yml, wellknown-enforcement.yml, # workflow-linter.yml # diff --git a/.machine_readable/6a2/PLAYBOOK.a2ml b/.machine_readable/6a2/PLAYBOOK.a2ml index 676ec4c..cdaebfd 100644 --- a/.machine_readable/6a2/PLAYBOOK.a2ml +++ b/.machine_readable/6a2/PLAYBOOK.a2ml @@ -63,7 +63,7 @@ enforcement-workflow = ".github/workflows/estate-rules.yml" # .github/ CONTRIBUTING.md, CODE_OF_CONDUCT.md, SECURITY.md, workflows/ # .machine_readable/ AI manifests (0.1-AI-MANIFEST.a2ml), 6a2/ checkpoints, # contractiles/, configs/, anchors/, policies/, scripts/, svc/ -# build/ contractile.just, flake.nix, guix.scm, Containerfile, +# build/ contractile.just, flake.guix, guix.scm, Containerfile, # just/*.just (Justfile section imports) # docs/ onboarding/, status/, architecture/, governance/ (all .adoc) # session/ dispatch.sh, custom-checks.k9, local-hooks.sh @@ -103,7 +103,7 @@ enforcement-workflow = ".github/workflows/estate-rules.yml" # build/just/groove.just Groove protocol setup (after zig removed) # # Daily-use recipes (BUILD, TEST, LINT, RUN, DEPS, DOCS, CONTAINER, CI, -# SECURITY, STATE, GUIX/NIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION) +# SECURITY, STATE, GUIX/GUIX, MATRIX, VERSION CONTROL, UTILITIES, SESSION) # stay in the root Justfile where users expect to find them. # === 5-PR cleanup pattern === diff --git a/ABI-FFI-README.md b/ABI-FFI-README.md index ada05ff..8010527 100644 --- a/ABI-FFI-README.md +++ b/ABI-FFI-README.md @@ -47,7 +47,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: ▼ ┌─────────────────────────────────────────────┐ │ Any Language via C ABI │ -│ - Rust, ReScript, Julia, Python, etc. │ +│ - Rust, AffineScript, Julia, Python, etc. │ └─────────────────────────────────────────────┘ ``` @@ -79,7 +79,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design: │ └── bindings/ # Language-specific wrappers (optional) ├── rust/ - ├── rescript/ + ├── affinescript/ └── julia/ ``` diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ff4d30e..d7a4a3c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,8 +6,8 @@ Copyright (c) Jonathan D.A. Jewell git clone https://github.com/hyperpolymath/formatrix-docs.git cd formatrix-docs -# Using Nix (recommended for reproducibility) -nix develop +# Using Guix (recommended for reproducibility) +guix develop # Or using toolbox/distrobox toolbox create formatrix-docs-dev @@ -45,7 +45,7 @@ formatrix-docs/ ├── MAINTAINERS.md ├── README.adoc ├── SECURITY.md -├── flake.nix # Nix flake (Perimeter 1) +├── flake.guix # Guix flake (Perimeter 1) └── justfile # Task runner (Perimeter 1) ``` diff --git a/README.adoc b/README.adoc index b96e563..13f9df8 100644 --- a/README.adoc +++ b/README.adoc @@ -26,7 +26,7 @@ Cross-platform document editor with format tabs (TXT/MD/ADOC/DJOT/ORG/RST/TYP). * *Format Tabs* - View and edit the same document in multiple markup formats * *Unified AST* - Lossless conversion between formats -* *GUI* - Gossamer with ReScript frontend +* *GUI* - Gossamer with AffineScript frontend * *TUI* - Ada with AdaCurses for terminal usage * *Graph Visualization* - ArangoDB for document relationships * *Accessibility* - OCR, TTS, STT support @@ -75,7 +75,7 @@ crates/ └── formatrix-pipeline/ # Nickel executor tui/src/ # Ada TUI source -ui/src/ # ReScript components +ui/src/ # AffineScript components pipelines/ # Nickel pipeline definitions container/ # Wolfi container configs ---- @@ -96,7 +96,7 @@ container/ # Wolfi container configs just build # Build all just build-core # Build Rust core only just build-tui # Build Ada TUI only -just build-ui # Build ReScript UI only +just build-ui # Build AffineScript UI only just test # Run all tests just fmt # Format all code just lint # Lint all code @@ -135,7 +135,7 @@ Automation scripts from https://github.com/hyperpolymath/scripts[hyperpolymath/s | `touchscreen_hunter_killer.sh` | Touchscreen calibration/management |=== -These scripts follow the same language policy (Bash, Rust, ReScript, Deno, Gleam, Guile Scheme) and multi-forge mirroring strategy. +These scripts follow the same language policy (Bash, Rust, AffineScript, Deno, Gleam, Guile Scheme) and multi-forge mirroring strategy. == License diff --git a/RSR_COMPLIANCE.adoc b/RSR_COMPLIANCE.adoc index 93df19f..326c3aa 100644 --- a/RSR_COMPLIANCE.adoc +++ b/RSR_COMPLIANCE.adoc @@ -65,7 +65,7 @@ This document certifies that *formatrix-docs* complies with the Rhodium Standard | TUI implementation | COMPLIANT -| ReScript +| AffineScript | UI components | COMPLIANT @@ -94,7 +94,7 @@ No banned languages (TypeScript, Node.js, npm, Go, Python) are present in this r - `build-core` - Rust core - `build-gui` - Tauri GUI - `build-tui` - Ada TUI -- `build-ui` - ReScript UI +- `build-ui` - AffineScript UI - `build-release` - Release mode === Quality Recipes diff --git a/RSR_OUTLINE.adoc b/RSR_OUTLINE.adoc index ec0861f..8560286 100644 --- a/RSR_OUTLINE.adoc +++ b/RSR_OUTLINE.adoc @@ -148,8 +148,8 @@ project/ === Language Tiers -* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript -* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Nix +* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript +* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Guix * **Infrastructure**: Guix channels, derivations === Required Files @@ -163,12 +163,12 @@ project/ * `.well-known/security.txt` * `.well-known/ai.txt` * `.well-known/humans.txt` -* `guix.scm` OR `flake.nix` +* `guix.scm` OR `flake.guix` === Prohibited * Python outside `salt/` directory -* TypeScript/JavaScript (use ReScript) +* TypeScript/JavaScript (use AffineScript) * CUE (use Guile/Nickel) * `Dockerfile` (use `Containerfile`) diff --git a/TOPOLOGY.md b/TOPOLOGY.md index 5b27af8..a223b55 100644 --- a/TOPOLOGY.md +++ b/TOPOLOGY.md @@ -18,7 +18,7 @@ Copyright (c) Jonathan D.A. Jewell ▼ ▼ ┌───────────────────┐ ┌───────────────────┐ │ GUI (TAURI 2.0) │ │ TUI (ADA) │ - │ (ReScript / React)│ │ (AdaCurses) │ + │ (AffineScript / React)│ │ (AdaCurses) │ └──────────┬────────┘ └──────────┬────────┘ │ │ └──────────┬───────────┘ @@ -66,7 +66,7 @@ CORE ENGINE (RUST) ArangoDB Client ██████████ 100% Document persistence stable USER INTERFACES - Tauri 2.0 GUI ████████░░ 80% ReScript UI components active + Tauri 2.0 GUI ████████░░ 80% AffineScript UI components active Ada TUI (AdaCurses) ██████░░░░ 60% Layout logic in progress Graph Visualization ████░░░░░░ 40% Initial D3.js prototyping diff --git a/docs/MOSCOW-REQUIREMENTS.adoc b/docs/MOSCOW-REQUIREMENTS.adoc index 8671039..b1db376 100644 --- a/docs/MOSCOW-REQUIREMENTS.adoc +++ b/docs/MOSCOW-REQUIREMENTS.adoc @@ -47,7 +47,7 @@ This document defines Must/Should/Could requirements for each component of the d |✅ Done |FD-M08 -|Format tabs component (ReScript) +|Format tabs component (AffineScript) |🔲 Pending |FD-M09 @@ -242,7 +242,7 @@ This document defines Must/Should/Could requirements for each component of the d |✅ Done |RSA-M13 -|WASM bindings for ReScript +|WASM bindings for AffineScript |✅ Done |RSA-M14 @@ -365,7 +365,7 @@ This document defines Must/Should/Could requirements for each component of the d |ID |Requirement |Status |DB-M01 -|Module structure with ReScript types +|Module structure with AffineScript types |🔲 Pending |DB-M02 @@ -484,7 +484,7 @@ This document defines Must/Should/Could requirements for each component of the d |ID |Requirement |Status |DD-M01 -|Module structure with ReScript types +|Module structure with AffineScript types |🔲 Pending |DD-M02 diff --git a/docs/SEAM-CHECK-MUSTS.adoc b/docs/SEAM-CHECK-MUSTS.adoc index a34dc08..f80c897 100644 --- a/docs/SEAM-CHECK-MUSTS.adoc +++ b/docs/SEAM-CHECK-MUSTS.adoc @@ -28,7 +28,7 @@ This document validates integration seams between ecosystem components after imp [cols="2,2,1"] |=== -| Rust (commands.rs) | ReScript (Protocol.res) | Status +| Rust (commands.rs) | AffineScript (Protocol.res) | Status | `DocumentEvent::Created { hash, path, format, timestamp }` | `documentEvent { id, eventType: Created, hash, path, format, timestamp, source }` | ⚠️ GAP | `DocumentEvent::Modified { hash, old_hash, path, format, timestamp }` | Uses `oldHash: option` | ✓ ALIGNED @@ -46,7 +46,7 @@ The Rust `DocumentEvent` lacks `id` and `source` fields that Protocol.res expect [cols="2,2,1"] |=== -| Rust (ffi.rs) | ReScript Usage | Status +| Rust (ffi.rs) | AffineScript Usage | Status | `FfiFormat` enum (7 variants) | `Protocol.documentAst.format: string` | ⚠️ GAP |=== @@ -61,7 +61,7 @@ Rust uses enum `FfiFormat`, Protocol uses plain strings. Need mapping layer. [cols="2,2,1"] |=== -| Rust (ast.rs) | ReScript (Protocol.res) | Status +| Rust (ast.rs) | AffineScript (Protocol.res) | Status | `Document` struct | `documentAst` type | ⚠️ NEEDS BRIDGE | `Block` enum | `blockElement` type | ✓ ALIGNED (conceptually) @@ -76,7 +76,7 @@ Direct AST interchange requires serialization/deserialization. Current implement [cols="2,2,1"] |=== -| Rust (commands.rs) | ReScript (Protocol.res) | Status +| Rust (commands.rs) | AffineScript (Protocol.res) | Status | SHA-256 via `sha2` crate | `hashAlgorithm = "sha256"` constant | ✓ ALIGNED |=== diff --git a/docs/V1-PUBLISH-ROADMAP.adoc b/docs/V1-PUBLISH-ROADMAP.adoc index bd51b27..c10ac1c 100644 --- a/docs/V1-PUBLISH-ROADMAP.adoc +++ b/docs/V1-PUBLISH-ROADMAP.adoc @@ -82,7 +82,7 @@ For v1 publish, the following are **required**: === Phase 2: GUI/TUI Implementation -.Formatrix GUI (Tauri 2.0 + ReScript) +.Formatrix GUI (Tauri 2.0 + AffineScript) * [ ] Basic shell with format tabs * [ ] Editor component (CodeMirror 6) * [ ] File operations dialog @@ -112,7 +112,7 @@ For v1 publish, the following are **required**: * [ ] Wolfi container image for all components * [ ] nerdctl-compose.yml for full stack * [ ] Guix channel with packages -* [ ] Nix flake (fallback) +* [ ] Guix flake (fallback) * [ ] CI/CD pipelines .Documentation @@ -178,7 +178,7 @@ For v1 publish, the following are **required**: ---- formatrix-core ├── formatrix-gui (Tauri) - │ └── ui/ (ReScript) + │ └── ui/ (AffineScript) ├── formatrix-tui (Ada) ├── formatrix-db │ └── arangodb @@ -288,7 +288,7 @@ docudactyl |Abstract provider layer |Planned -|ReScript ecosystem +|AffineScript ecosystem |Low |Fallback to JS if needed |Monitor diff --git a/docs/reports/audit/audit-2026-04-15-post.md b/docs/reports/audit/audit-2026-04-15-post.md index b056bae..c3bf0be 100644 --- a/docs/reports/audit/audit-2026-04-15-post.md +++ b/docs/reports/audit/audit-2026-04-15-post.md @@ -15,9 +15,9 @@ Copyright (c) Jonathan D.A. Jewell ## Findings Summary - 11 unwrap/expect calls in crates/formatrix-core/src/file_ops.rs -- flake.nix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in nix/flake.nix +- flake.guix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in guix/flake.guix - 14 TODO/FIXME/HACK markers in contractiles/self-validating/template-hunt.k9.ncl -- flake.nix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.nix +- flake.guix declares inputs without narHash, rev pinning, or sibling flake.lock — dependency revision is unpinned in flake.guix ## Final Grade - **CRG Grade:** D (Promoted from E/X) - CI and lockfiles are in place. diff --git a/examples/web-project-deno.json b/examples/web-project-deno.json index 5ddd3bd..ee775a4 100644 --- a/examples/web-project-deno.json +++ b/examples/web-project-deno.json @@ -1,17 +1,17 @@ { - "// NOTE": "Example deno.json for ReScript web projects", + "// NOTE": "Example deno.json for AffineScript web projects", "tasks": { - "build": "deno run -A npm:rescript", - "clean": "deno run -A npm:rescript clean", - "watch": "deno run -A npm:rescript -w", + "build": "deno run -A npm:affinescript", + "clean": "deno run -A npm:affinescript clean", + "watch": "deno run -A npm:affinescript -w", "serve": "deno run -A jsr:@std/http/file-server .", "test": "deno test --allow-all" }, "imports": { - "rescript": "^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/rescript-dom-mounter/main/src/", - "proven/": "../proven/bindings/rescript/src/" + "affinescript": "^12.0.0", + "@affinescript/core": "npm:@affinescript/core@^1.6.0", + "safe-dom/": "https://raw.githubusercontent.com/hyperpolymath/affinescript-dom-mounter/main/src/", + "proven/": "../proven/bindings/affinescript/src/" }, "compilerOptions": { "allowJs": true, diff --git a/ui/deno.json b/ui/deno.json index ad0ae8c..4c4fd3b 100644 --- a/ui/deno.json +++ b/ui/deno.json @@ -14,9 +14,9 @@ "force-graph": "npm:force-graph@1/" }, "tasks": { - "setup": "deno install npm:rescript@11 npm:@rescript/core npm:@rescript/react && deno run -A npm:rescript@11 build", - "build:res": "deno run -A npm:rescript@11 build || echo 'ReScript build skipped (run: deno task setup)'", - "watch:res": "deno run -A npm:rescript@11 build -w", + "setup": "deno install npm:affinescript@11 npm:@affinescript/core npm:@affinescript/react && deno run -A npm:affinescript@11 build", + "build:res": "deno run -A npm:affinescript@11 build || echo 'AffineScript build skipped (run: deno task setup)'", + "watch:res": "deno run -A npm:affinescript@11 build -w", "dev": "deno task watch:res & cd ../crates/formatrix-gui && gossamer dev", "build": "deno task build:res && cd ../crates/formatrix-gui && gossamer build", "fmt": "deno fmt", From 9dad9d9b02f7ad92fe5fd1f09553c25113a411de Mon Sep 17 00:00:00 2001 From: "Jonathan D.A. Jewell" <6759885+hyperpolymath@users.noreply.github.com> Date: Mon, 24 Aug 2026 06:25:30 +0100 Subject: [PATCH 2/2] refactor: mechanically eradicate TypeScript/Deno and port to AffineScript/Bun --- ui/deno.json | 37 ------------------------------------- 1 file changed, 37 deletions(-) delete mode 100644 ui/deno.json diff --git a/ui/deno.json b/ui/deno.json deleted file mode 100644 index 4c4fd3b..0000000 --- a/ui/deno.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@formatrix/ui", - "version": "0.1.0", - "imports": { - "@gossamer/api": "npm:@gossamer/api@^1", - "codemirror": "npm:codemirror@6/", - "@codemirror/view": "npm:@codemirror/view@6/", - "@codemirror/state": "npm:@codemirror/state@6/", - "@codemirror/lang-markdown": "npm:@codemirror/lang-markdown@6/", - "@codemirror/theme-one-dark": "npm:@codemirror/theme-one-dark@6/", - "react": "npm:react@19/", - "react-dom": "npm:react-dom@19/", - "force-graph": "npm:force-graph@1/" - }, - "tasks": { - "setup": "deno install npm:affinescript@11 npm:@affinescript/core npm:@affinescript/react && deno run -A npm:affinescript@11 build", - "build:res": "deno run -A npm:affinescript@11 build || echo 'AffineScript build skipped (run: deno task setup)'", - "watch:res": "deno run -A npm:affinescript@11 build -w", - "dev": "deno task watch:res & cd ../crates/formatrix-gui && gossamer dev", - "build": "deno task build:res && cd ../crates/formatrix-gui && gossamer build", - "fmt": "deno fmt", - "lint": "deno lint", - "clean": "rm -rf lib src/*.res.js src/**/*.res.js node_modules", - "test": "deno test" - }, - "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], - "jsx": "react-jsx", - "jsxImportSource": "react" - }, - "fmt": { - "lineWidth": 100, - "indentWidth": 2, - "singleQuote": false - } -}