diff --git a/.claude/CLAUDE.md b/.claude/CLAUDE.md index 76e2e8c..23f8a44 100644 --- a/.claude/CLAUDE.md +++ b/.claude/CLAUDE.md @@ -74,7 +74,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/dependabot.yml b/.github/dependabot.yml index f4a7977..22cd4b0 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -13,7 +13,7 @@ updates: actions: patterns: - "*" - - package-ecosystem: "nix" + - package-ecosystem: "guix" directory: "/" schedule: interval: "weekly" diff --git a/.github/workflows/rescript-deno-ci.yml b/.github/workflows/rescript-deno-ci.yml index e00be7a..182866d 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] @@ -30,11 +30,11 @@ jobs: run: deno fmt --check - 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 run: deno check **/*.ts || true diff --git a/.machine_readable/contractiles/Justfile b/.machine_readable/contractiles/Justfile index b01e421..1ed2e72 100644 --- a/.machine_readable/contractiles/Justfile +++ b/.machine_readable/contractiles/Justfile @@ -380,7 +380,7 @@ doctor: check "just" just "1.25" check "git" git "2.40" check "Deno" deno "2.0" - check "ReScript (resc)" rescript "12.0" + check "AffineScript (resc)" affinescript "12.0" check "Zig" zig "0.13" # Optional tools if command -v panic-attack >/dev/null 2>&1; then diff --git a/0-AI-MANIFEST.a2ml b/0-AI-MANIFEST.a2ml index e936b5a..79b2040 100644 --- a/0-AI-MANIFEST.a2ml +++ b/0-AI-MANIFEST.a2ml @@ -53,14 +53,14 @@ Additional artefact: | Language/Tool | Use Case | Notes | |---------------|----------|-------| -| ReScript | Application code | Type-safe, compiles to JS | +| AffineScript | Application code | Type-safe, compiles to JS | | Deno | Runtime and package management | Replaces Node/npm/bun | | Rust | Systems, performance-critical, WASM | Preferred for CLI tools | | Tauri 2.0+ | Mobile apps (iOS/Android) | Rust backend + web UI | | Dioxus | Mobile apps (native UI) | Pure Rust, React-like | | Gleam | Backend services | BEAM or JS targets | | Bash/POSIX Shell | Automation scripts | Keep minimal | -| JavaScript | Only where ReScript cannot | MCP glue, Deno APIs | +| JavaScript | Only where AffineScript cannot | MCP glue, Deno APIs | | Nickel | Configuration | Complex config logic | | Guile Scheme | Metadata/state files | For all `.scm` artefacts | | Julia | Batch/data processing | Per RSR | @@ -71,13 +71,13 @@ Additional artefact: | Banned | Replacement | |--------|-------------| -| TypeScript | ReScript | +| TypeScript | AffineScript | | Node.js | Deno | | npm | Deno | | Bun | Deno | | pnpm/yarn | Deno | | Go | Rust | -| Python | Julia / Rust / ReScript | +| Python | Julia / Rust / AffineScript | | Java/Kotlin | Rust / Tauri / Dioxus | | Swift | Tauri / Dioxus | | React Native | Tauri / Dioxus | @@ -87,24 +87,24 @@ Additional artefact: A strict Rust-first approach applies. -- Use **Tauri 2.0+** for web UI (ReScript) + Rust backend. +- Use **Tauri 2.0+** for web UI (AffineScript) + Rust backend. - Use **Dioxus** for pure Rust native UI. Both are FOSS with independent governance. ## Enforcement Rules -- Do not create new TypeScript files; convert existing TS to ReScript. +- Do not create new TypeScript files; convert existing TS to AffineScript. - Do not use `package.json` for runtime dependencies; use `deno.json` imports. - Do not include `node_modules` in production; Deno handles dependency caching. - Do not use Go; use Rust. -- Do not use Python; use Julia (data/batch), Rust (systems), or ReScript (apps). +- Do not use Python; use Julia (data/batch), Rust (systems), or AffineScript (apps). - Do not use Kotlin/Swift; use Tauri 2.0+ or Dioxus for mobile. ## Package Management - Primary: Guix (`guix.scm`) -- Fallback: Nix (`flake.nix`) +- Fallback: Guix (`flake.guix`) - JavaScript dependencies: Deno (`deno.json` imports) ## Security Requirements 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/CHANGELOG.md b/CHANGELOG.md index eb9d6ac..e423d23 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,7 +20,7 @@ this project aims to follow [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - feat(safe-dom): add minimal SafeDOM package and runnable example (#26) -- feat(rescript): reconcile migration onto main +- feat(affinescript): reconcile migration onto main - feat(affinescript): step (a) — design lock-in for Node-bound packages (#16) - feat(react): pilot AffineScript port of Button per migration playbook (#15) - feat(stapeln): add selur-compose.toml Stapeln service definition diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d2bdfc1..d6cd604 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -6,8 +6,8 @@ Copyright (c) Jonathan D.A. Jewell git clone https://github.com/hyperpolymath/accessibility-everywhere.git cd accessibility-everywhere -# Using Nix (recommended for reproducibility) -nix develop +# Using Guix (recommended for reproducibility) +guix develop # Or using toolbox/distrobox toolbox create accessibility-everywhere-dev @@ -45,7 +45,7 @@ accessibility-everywhere/ ├── 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 ce47623..5d5257e 100644 --- a/EXPLAINME.adoc +++ b/EXPLAINME.adoc @@ -23,7 +23,7 @@ The browser extension (`tools/browser-extension/`) uses axe-core (Deque Systems) 2. **Lightweight Scan**: axe-core runs a WCAG scan (user selects A/AA/AAA), produces violation array 3. **Score Calculation**: Violations scored as violations / total violations checked 4. **Local Storage**: Results cached in browser's IndexedDB under `a11y-scores` database -5. **UI Render**: ReScript frontend renders violations table and score history chart +5. **UI Render**: AffineScript frontend renders violations table and score history chart **Code Evidence:** - Manifest parser at `tools/browser-extension/manifest.json` declares permissions for `activeTab`, `scripting`, `storage` @@ -59,7 +59,7 @@ ____ The testing dashboard (`tools/testing-dashboard/`) provides: -1. **Frontend Input**: User enters domain in `tools/testing-dashboard/src/Dashboard.res` (ReScript) +1. **Frontend Input**: User enters domain in `tools/testing-dashboard/src/Dashboard.res` (AffineScript) 2. **Scan Dispatch**: Frontend POST to `tools/monitoring-api/` with domain + WCAG level 3. **Queue**: API stores job in ArangoDB `scanning_queue` collection with status "pending" 4. **Background Worker**: A Node.js worker (`tools/monitoring-api/src/worker.js`) picks up jobs, spawns Puppeteer, calls axe-core @@ -104,13 +104,13 @@ The leaderboard has known limitations: |=== | Layer | Technology | Reason -| **Extension UI** | JavaScript (ES6) + TypeScript | Tight coupling to browser APIs; ReScript cannot target extension manifest directly -| **Frontend (Dashboard)** | ReScript + TEA | Type safety + simple state machine for forms +| **Extension UI** | JavaScript (ES6) + TypeScript | Tight coupling to browser APIs; AffineScript cannot target extension manifest directly +| **Frontend (Dashboard)** | AffineScript + TEA | Type safety + simple state machine for forms | **API Gateway** | Node.js + Express | Lightweight, good async/await for Puppeteer orchestration | **Scanner Core** | Puppeteer + axe-core | Industry standard (used by Lighthouse, WebAIM, Accessibility Checker) | **Database** | ArangoDB | Graph + document = flexible metadata + relationship queries | **Leaderboard Export** | JSON (static) | Immutable, cacheable, CDN-friendly -| **Frontend (Leaderboard)** | ReScript | Sortable table, reactive on new data +| **Frontend (Leaderboard)** | AffineScript | Sortable table, reactive on new data |=== --- @@ -126,7 +126,7 @@ The leaderboard has known limitations: | `tools/browser-extension/src/scanner.ts` | axe-core injection and result formatting | `tools/browser-extension/src/storage.ts` | IndexedDB schema and persistence layer | `tools/testing-dashboard/` | Public web dashboard for URL scanning and leaderboard display -| `tools/testing-dashboard/src/Dashboard.res` | ReScript TEA app (ReScript → JS) +| `tools/testing-dashboard/src/Dashboard.res` | AffineScript TEA app (AffineScript → JS) | `tools/testing-dashboard/public/leaderboard.schema.json` | JSON schema for leaderboard data | `tools/monitoring-api/` | REST API backend for scanning jobs | `tools/monitoring-api/src/api.ts` | Express routes for `/scan`, `/results`, `/health` @@ -149,7 +149,7 @@ The leaderboard has known limitations: | **ABI/FFI (Idris2 + Zig)** | Scanner FFI boundary (axe-core → native code if needed in future) | Planned for Phase 2: formal verification of WCAG criterion predicates -| **Hyperpolymath Language Policy** | ReScript for dashboard (no TypeScript), Node.js for API (exception: JS ecosystem tooling unavoidable) +| **Hyperpolymath Language Policy** | AffineScript for dashboard (no TypeScript), Node.js for API (exception: JS ecosystem tooling unavoidable) | Compliant; Node.js API transitioning to Deno in Phase 3 | **MPL-2.0 License** | Primary; fallback to MPL-2.0 for browser extension store requirements diff --git a/Justfile b/Justfile index b01e421..1ed2e72 100644 --- a/Justfile +++ b/Justfile @@ -380,7 +380,7 @@ doctor: check "just" just "1.25" check "git" git "2.40" check "Deno" deno "2.0" - check "ReScript (resc)" rescript "12.0" + check "AffineScript (resc)" affinescript "12.0" check "Zig" zig "0.13" # Optional tools if command -v panic-attack >/dev/null 2>&1; then diff --git a/RSR_OUTLINE.adoc b/RSR_OUTLINE.adoc index 78bed59..0537aeb 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/deno.json b/deno.json deleted file mode 100644 index 23e2972..0000000 --- a/deno.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@hyperpolymath/accessibility-everywhere", - "version": "1.0.0", - "license": "MIT", - "workspace": [ - "./tools/cli", - "./tools/github-action", - "./tools/monitoring-api", - "./tools/safe-dom", - "./tools/stale/packages/core", - "./tools/stale/packages/scanner" - ], - "tasks": { - "setup": "deno run --allow-read --allow-write --allow-net --allow-env scripts/setup-arangodb.js", - "dev": "deno run --watch mod.ts", - "build": "deno task build:cli && deno task build:safe-dom && deno task build:scanner", - "build:cli": "deno task --cwd tools/cli build", - "build:safe-dom": "deno task --cwd tools/safe-dom build", - "build:scanner": "deno task --cwd tools/stale/packages/scanner build", - "build:browser-extension": "echo 'tools/browser-extension is a Class C browser-extension package (host requires the npm-published archiver). Use the existing scripts in tools/browser-extension/.'", - "test": "deno test", - "lint": "deno lint", - "fmt": "deno fmt", - "docker:build": "docker compose build", - "docker:up": "docker compose up -d", - "docker:down": "docker compose down" - }, - "compilerOptions": { "strict": true }, - "fmt": { - "useTabs": false, - "lineWidth": 100, - "indentWidth": 2, - "singleQuote": false - } -} 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/tools/cli/deno.json b/tools/cli/deno.json deleted file mode 100644 index 1ab966d..0000000 --- a/tools/cli/deno.json +++ /dev/null @@ -1,21 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@accessibility-everywhere/cli", - "version": "1.0.0", - "license": "MIT", - "tasks": { - "build": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0", - "clean": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 clean", - "dev": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 -w" - }, - "imports": { - "rescript": "npm:rescript@^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "commander": "npm:commander@^11.0.0", - "chalk": "npm:chalk@^5.0.0", - "ora": "npm:ora@^7.0.0", - "cli-table3": "npm:cli-table3@^0.6.0", - "fs-extra": "npm:fs-extra@^11.0.0" - }, - "nodeModulesDir": "auto" -} diff --git a/tools/github-action/deno.json b/tools/github-action/deno.json deleted file mode 100644 index 0ba2b3b..0000000 --- a/tools/github-action/deno.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@accessibility-everywhere/github-action", - "version": "1.0.0", - "license": "MIT", - "tasks": { - "build": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0", - "clean": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 clean", - "dev": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 -w" - }, - "imports": { - "rescript": "npm:rescript@^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "@actions/core": "npm:@actions/core@^1.10.0", - "@actions/github": "npm:@actions/github@^6.0.0" - }, - "nodeModulesDir": "auto" -} diff --git a/tools/monitoring-api/deno.json b/tools/monitoring-api/deno.json deleted file mode 100644 index dfa610c..0000000 --- a/tools/monitoring-api/deno.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@accessibility-everywhere/monitoring-api", - "version": "1.0.0", - "license": "MIT", - "tasks": { - "build": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0", - "clean": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 clean", - "dev": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 -w", - "start": "deno run --allow-net --allow-read --allow-env src/Index.mjs" - }, - "imports": { - "rescript": "npm:rescript@^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0", - "express": "npm:express@^4.18.0", - "cors": "npm:cors@^2.8.0", - "helmet": "npm:helmet@^7.0.0", - "express-rate-limit": "npm:express-rate-limit@^7.0.0", - "compression": "npm:compression@^1.7.0", - "dotenv": "npm:dotenv@^16.0.0", - "joi": "npm:joi@^17.0.0", - "uuid": "npm:uuid@^9.0.0" - }, - "nodeModulesDir": "auto" -} diff --git a/tools/safe-dom/deno.json b/tools/safe-dom/deno.json deleted file mode 100644 index 60663fb..0000000 --- a/tools/safe-dom/deno.json +++ /dev/null @@ -1,16 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@accessibility-everywhere/safe-dom", - "version": "1.0.0", - "license": "MIT", - "tasks": { - "build": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0", - "clean": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 clean", - "dev": "deno run -A --node-modules-dir=auto npm:rescript@^12.0.0 -w" - }, - "imports": { - "rescript": "npm:rescript@^12.0.0", - "@rescript/core": "npm:@rescript/core@^1.6.0" - }, - "nodeModulesDir": "auto" -} diff --git a/tools/safe-dom/package-lock.json b/tools/safe-dom/package-lock.json deleted file mode 100644 index 72a1575..0000000 --- a/tools/safe-dom/package-lock.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "name": "safe-dom", - "lockfileVersion": 3, - "requires": true, - "packages": {} -} diff --git a/tools/stale/packages/core/deno.json b/tools/stale/packages/core/deno.json deleted file mode 100644 index 0a34cb1..0000000 --- a/tools/stale/packages/core/deno.json +++ /dev/null @@ -1,18 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@accessibility-everywhere/core", - "version": "1.0.0", - "license": "MIT", - "tasks": { - "build": "deno run -A --node-modules-dir=auto npm:rescript@^11.1.0", - "clean": "deno run -A --node-modules-dir=auto npm:rescript@^11.1.0 clean", - "dev": "deno run -A --node-modules-dir=auto npm:rescript@^11.1.0 -w" - }, - "imports": { - "rescript": "npm:rescript@^11.1.0", - "@rescript/core": "npm:@rescript/core@^1.5.0", - "arangojs": "npm:arangojs@^10.3.0", - "dotenv": "npm:dotenv@^16.0.0" - }, - "nodeModulesDir": "auto" -} diff --git a/tools/stale/packages/scanner/deno.json b/tools/stale/packages/scanner/deno.json deleted file mode 100644 index 69e3793..0000000 --- a/tools/stale/packages/scanner/deno.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - "$schema": "https://deno.land/x/deno/cli/schemas/config-file.v1.json", - "name": "@accessibility-everywhere/scanner", - "version": "1.0.0", - "license": "MIT", - "tasks": { - "build": "deno run -A --node-modules-dir=auto npm:rescript@^11.1.0", - "clean": "deno run -A --node-modules-dir=auto npm:rescript@^11.1.0 clean", - "dev": "deno run -A --node-modules-dir=auto npm:rescript@^11.1.0 -w" - }, - "imports": { - "rescript": "npm:rescript@^11.1.0", - "@rescript/core": "npm:@rescript/core@^1.5.0", - "axe-core": "npm:axe-core@^4.8.0", - "playwright": "npm:playwright@^1.40.0", - "puppeteer": "npm:puppeteer@^24.0.0" - }, - "nodeModulesDir": "auto" -} diff --git a/tools/stale/packages/stale/components/react/package.json b/tools/stale/packages/stale/components/react/package.json index 7e4a468..e3d8f35 100644 --- a/tools/stale/packages/stale/components/react/package.json +++ b/tools/stale/packages/stale/components/react/package.json @@ -6,18 +6,18 @@ "module": "src/Index.mjs", "type": "module", "scripts": { - "build": "rescript build", - "dev": "rescript build -w", - "clean": "rescript clean" + "build": "affinescript build", + "dev": "affinescript build -w", + "clean": "affinescript clean" }, "peerDependencies": { "react": "^18.0.0", "react-dom": "^18.0.0" }, "devDependencies": { - "rescript": "^11.1.0", - "@rescript/core": "^1.5.0", - "@rescript/react": "^0.13.0" + "affinescript": "^11.1.0", + "@affinescript/core": "^1.5.0", + "@affinescript/react": "^0.13.0" }, "keywords": [ "react", @@ -27,6 +27,6 @@ "components", "ui", "aria", - "rescript" + "affinescript" ] }