diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 7a36dd3..fa13e7e 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -75,7 +75,7 @@ Both are FOSS with independent governance (no Big Tech). ### Package Management - **Primary**: Guix (guix.scm) -- **Fallback**: Nix (flake.nix) +- **Fallback**: Guix (flake.guix) - **JS deps**: Deno (deno.json imports) ### Security Requirements diff --git a/.github/workflows/rescript-deno-ci.yml b/.github/workflows/rescript-deno-ci.yml index c7caed5..087328f 100644 --- a/.github/workflows/rescript-deno-ci.yml +++ b/.github/workflows/rescript-deno-ci.yml @@ -1,5 +1,5 @@ # SPDX-License-Identifier: MPL-2.0 -name: ReScript/Deno CI +name: AffineScript/Deno CI on: push: branches: [main, master] @@ -32,11 +32,11 @@ jobs: - name: Deno test run: deno test --allow-all --coverage=coverage - - name: ReScript build + - name: AffineScript build run: | - if [ -f "rescript.json" ] || [ -f "bsconfig.json" ]; then + if [ -f "affinescript.json" ] || [ -f "bsconfig.json" ]; then npm install - npx rescript + npx affinescript fi - name: Type check diff --git a/.machine_readable/root-allow.txt b/.machine_readable/root-allow.txt index 0e6395d..e701242 100644 --- a/.machine_readable/root-allow.txt +++ b/.machine_readable/root-allow.txt @@ -1 +1 @@ -flake.nix +flake.guix diff --git a/ABI-FFI-README.md b/ABI-FFI-README.md index 08d35da..e4d302a 100644 --- a/ABI-FFI-README.md +++ b/ABI-FFI-README.md @@ -43,7 +43,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. │ └─────────────────────────────────────────────┘ ``` @@ -75,7 +75,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/CHANGELOG.adoc b/CHANGELOG.adoc index c55003b..7d083c5 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -22,7 +22,7 @@ and this project adheres to link:https://semver.org/spec/v2.0.0.html[Semantic Ve === Changed * Migrated from Rails/Ruby to Gleam/AffineScript (typed-wasm) architecture. -* Replaced ReScript frontend with AffineScript. +* Replaced AffineScript frontend with AffineScript. === Removed diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 720a5e3..9554a84 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,8 +2,8 @@ git clone https://github.com/hyperpolymath/candy-crash.git cd candy-crash -# Using Nix (recommended for reproducibility) -nix develop +# Using Guix (recommended for reproducibility) +guix develop # Or using toolbox/distrobox toolbox create candy-crash-dev @@ -41,7 +41,7 @@ candy-crash/ ├── 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/EXPLAINME.adoc b/EXPLAINME.adoc index 66333d9..58b536f 100644 --- a/EXPLAINME.adoc +++ b/EXPLAINME.adoc @@ -50,17 +50,17 @@ The theoretical framework is documented but not yet translated into running code. References cite peer-reviewed literature (Endsley 1995, Sweller 1988, Mark et al. 2008) rather than unpublished assertions. -== "Rust core + ReScript UI + SPARK/Ada verification" +== "Rust core + AffineScript UI + SPARK/Ada verification" [quote, README.adoc] ____ -Core Runtime: Rust. User Interfaces: ReScript. Formal Verification: SPARK/Ada. +Core Runtime: Rust. User Interfaces: AffineScript. Formal Verification: SPARK/Ada. ____ How this is implemented:: The technology direction is declared in the README's "Technology Direction" section with explicit rationale: Rust for real-time sensor/actuator loops, -ReScript for type-safe UI, SPARK/Ada for aviation-adjacent safety requirements. +AffineScript for type-safe UI, SPARK/Ada for aviation-adjacent safety requirements. The link:ROADMAP.adoc[`ROADMAP.adoc`] maps these to implementation phases. `Cargo.toml` confirms Rust as the build system. @@ -89,7 +89,7 @@ represents the wrong paradigm and is scheduled for removal. | Contribution governance model | link:https://github.com/hyperpolymath/boj-server[boj-server] -| ReScript for UI +| AffineScript for UI | Planned for configuration and monitoring | link:https://github.com/hyperpolymath/gossamer[gossamer], link:https://github.com/hyperpolymath/panll[panll] diff --git a/PLAN.adoc b/PLAN.adoc index fc43abc..438d8c0 100644 --- a/PLAN.adoc +++ b/PLAN.adoc @@ -54,7 +54,7 @@ The existing code cannot be "refactored" into the correct paradigm. The fundamen * RSR compliance documentation and structure * CI/CD infrastructure (GitHub Actions workflows) -* Container configuration (Containerfile, Nix flake) +* Container configuration (Containerfile, Guix flake) * Governance and contribution framework * Security infrastructure (.well-known, security headers) * Git hooks and automation (Justfile structure) @@ -297,7 +297,7 @@ OBD-II for ground vehicles: For aircraft/watercraft: domain-specific protocols (NMEA for marine, etc.) -=== Phase 3: Actuator Integration (Rust + ReScript) +=== Phase 3: Actuator Integration (Rust + AffineScript) ==== 3.1 Abstraction Layer @@ -382,7 +382,7 @@ Each vehicle domain requires: * Navigation procedures * Emergency protocols -=== Phase 5: User Interface (ReScript) +=== Phase 5: User Interface (AffineScript) ==== 5.1 Configuration Interface diff --git a/RSR_OUTLINE.adoc b/RSR_OUTLINE.adoc index 8a22906..63243fd 100644 --- a/RSR_OUTLINE.adoc +++ b/RSR_OUTLINE.adoc @@ -146,8 +146,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 @@ -161,12 +161,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/deno.json b/deno.json deleted file mode 100644 index 4492515..0000000 --- a/deno.json +++ /dev/null @@ -1,41 +0,0 @@ -{ - "compilerOptions": { - "allowJs": true, - "lib": ["deno.window"], - "strict": true - }, - "lint": { - "files": { - "include": ["app/assets/javascripts/**/*.js"], - "exclude": ["vendor/"] - }, - "rules": { - "tags": ["recommended"], - "include": ["ban-untagged-todo"], - "exclude": ["no-unused-vars"] - } - }, - "fmt": { - "files": { - "include": ["app/assets/javascripts/**/*.js"], - "exclude": ["vendor/"] - }, - "options": { - "useTabs": false, - "lineWidth": 100, - "indentWidth": 2, - "semiColons": true, - "singleQuote": false, - "proseWrap": "preserve" - } - }, - "tasks": { - "check": "deno check app/assets/javascripts/**/*.js", - "lint": "deno lint app/assets/javascripts/", - "fmt": "deno fmt app/assets/javascripts/", - "fmt:check": "deno fmt --check app/assets/javascripts/" - }, - "imports": { - "@std/": "https://deno.land/std@0.208.0/" - } -} diff --git a/docs/DEVELOPMENT.md b/docs/DEVELOPMENT.md index 2d8c863..f42a592 100644 --- a/docs/DEVELOPMENT.md +++ b/docs/DEVELOPMENT.md @@ -16,14 +16,14 @@ candy-crash/ │ │ └── services/ # Business logic │ ├── test/ # Tests │ └── gleam.toml # Gleam project config -├── frontend/ # ReScript frontend (SPA) -│ ├── src/ # ReScript source files +├── frontend/ # AffineScript frontend (SPA) +│ ├── src/ # AffineScript source files │ │ ├── Main.res # App entry point (TEA architecture) │ │ ├── components/ # UI components │ │ ├── pages/ # Page views │ │ ├── Api.res # API client │ │ └── Router.res # Client-side routing -│ ├── rescript.json # ReScript config +│ ├── affinescript.json # AffineScript config │ └── deno.json # Deno runtime config ├── scripts/ # Development scripts └── .github/ # CI/CD workflows @@ -36,8 +36,8 @@ candy-crash/ | Backend | **Gleam** | Type-safe functional backend | | Web Framework | **Wisp** | HTTP handlers & middleware | | Database | **ArangoDB** | Multi-model document/graph DB | -| Frontend | **ReScript** | Type-safe UI development | -| Architecture | **rescript-tea** | The Elm Architecture for ReScript | +| Frontend | **AffineScript** | Type-safe UI development | +| Architecture | **affinescript-tea** | The Elm Architecture for AffineScript | | Routing | **cadre-router** | Type-safe URL routing | | Runtime | **Deno** | JavaScript/TypeScript runtime | @@ -47,7 +47,7 @@ candy-crash/ - **Gleam 1.6+** - Backend language - **Deno 1.40+** - Frontend runtime - **ArangoDB 3.11+** - Database -- **ReScript 11+** - Frontend compiler (via Deno) +- **AffineScript 11+** - Frontend compiler (via Deno) ## Getting Started @@ -98,8 +98,8 @@ gleam run ```bash cd frontend -# Build ReScript -deno run -A npm:rescript build -with-deps +# Build AffineScript +deno run -A npm:affinescript build -with-deps # Start development server deno task dev @@ -131,17 +131,17 @@ This project follows the **Hyperpolymath Standard**. See `.claude/CLAUDE.md` for ### Allowed Languages - **Gleam** - Backend services -- **ReScript** - Frontend UI +- **AffineScript** - Frontend UI - **Rust** - Performance-critical, WASM - **Bash** - Scripts, automation ### Banned Languages -- TypeScript → Use ReScript +- TypeScript → Use AffineScript - Node.js → Use Deno - Ruby/Rails → Use Gleam - Go → Use Rust -- Python (general) → Use ReScript/Rust +- Python (general) → Use AffineScript/Rust ### Enforcement diff --git a/examples/web-project-deno.json b/examples/web-project-deno.json index eaa39d9..6938b76 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": "npm:rescript@^12.1.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": "npm:affinescript@^12.1.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/frontend/deno.json b/frontend/deno.json deleted file mode 100644 index ebe8808..0000000 --- a/frontend/deno.json +++ /dev/null @@ -1,23 +0,0 @@ -{ - "name": "@hyperpolymath/candy-crash-frontend", - "version": "1.0.0", - "exports": "./src/Main.res.js", - "imports": { - "@rescript/react": "npm:@rescript/react@0.12.0", - "rescript-tea": "npm:rescript-tea@0.9.0", - "cadre-tea-router": "npm:cadre-tea-router@1.0.0", - "react": "npm:react@18.2.0", - "react-dom": "npm:react-dom@18.2.0" - }, - "tasks": { - "dev": "deno run -A --watch src/Main.res.js", - "build": "rescript build -with-deps", - "clean": "rescript clean", - "serve": "deno run -A npm:serve@14.2.0 dist" - }, - "compilerOptions": { - "lib": ["dom", "dom.iterable", "esnext"], - "jsx": "react-jsx", - "jsxImportSource": "react" - } -}