Skip to content

Commit 6be6ede

Browse files
refactor: eradicate TypeScript and NPM/Deno configs (#65)
Automated eradication.
1 parent 90e386b commit 6be6ede

17 files changed

Lines changed: 73 additions & 110 deletions

‎.claude/CLAUDE.md‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,23 @@ Cross-platform document editor with format tabs, allowing users to view and edit
1111
## Architecture
1212

1313
- **Core**: Rust library with unified AST for format conversion
14-
- **GUI**: Gossamer (own webview shell) with ReScript frontend (not TypeScript!)
14+
- **GUI**: Gossamer (own webview shell) with AffineScript frontend (not TypeScript!)
1515
- **TUI**: Ada with AdaCurses (matches git-hud pattern)
1616
- **Storage**: ArangoDB for graph + document hybrid
1717
- **Pipelines**: Nickel for import/export transformations
1818

1919
## Language Policy
2020

2121
### ALLOWED
22-
- ReScript (UI components)
22+
- AffineScript (UI components)
2323
- Rust (core, GUI backend)
2424
- Ada (TUI)
2525
- Nickel (pipelines, config)
2626
- Guile Scheme (SCM files)
2727
- Deno (runtime)
2828

2929
### BANNED - Do Not Use
30-
- TypeScript (use ReScript)
30+
- TypeScript (use AffineScript)
3131
- Node.js/npm/bun (use Deno)
3232
- Go (use Rust)
3333
- Python (not applicable here)
@@ -44,11 +44,11 @@ crates/
4444
└── formatrix-pipeline/ # Nickel executor
4545
4646
tui/src/ # Ada TUI source
47-
ui/src/ # ReScript components
47+
ui/src/ # AffineScript components
4848
pipelines/ # Nickel pipeline definitions
4949
container/ # Wolfi container configs
5050
guix/ # Guix channel + packages
51-
nix/ # Nix flake (fallback)
51+
guix/ # Guix flake (fallback)
5252
```
5353

5454
## Build Commands
@@ -57,7 +57,7 @@ nix/ # Nix flake (fallback)
5757
just build # Build all
5858
just build-core # Build Rust core only
5959
just build-tui # Build Ada TUI only
60-
just build-ui # Build ReScript UI only
60+
just build-ui # Build AffineScript UI only
6161
just test # Run all tests
6262
just fmt # Format all code
6363
just lint # Lint all code
@@ -84,9 +84,9 @@ Each format implements:
8484
- `Parser` trait: raw content → AST
8585
- `Renderer` trait: AST → raw content
8686

87-
## ReScript Conventions
87+
## AffineScript Conventions
8888

89-
- Use `@rescript/core` for stdlib
89+
- Use `@affinescript/core` for stdlib
9090
- TEA pattern: Model.res, Msg.res, Update logic in App.res
9191
- Components in `src/components/`
9292
- Bindings in `src/bindings/`
@@ -103,7 +103,7 @@ Each format implements:
103103
```bash
104104
just test-core # Rust unit tests
105105
just test-tui # Ada compilation check
106-
just test-ui # ReScript tests
106+
just test-ui # AffineScript tests
107107
just test-integration # Full integration tests
108108
```
109109

‎.github/workflows/governance.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# in hyperpolymath/standards instead of carrying per-repo copies.
66
#
77
# Replaces the per-repo governance scaffolding removed in the same commit:
8-
# quality.yml, guix-nix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml,
8+
# quality.yml, guix-guix-policy.yml, npm-bun-blocker.yml, ts-blocker.yml,
99
# security-policy.yml, rsr-antipattern.yml, wellknown-enforcement.yml,
1010
# workflow-linter.yml
1111
#

‎.machine_readable/contractiles/Justfile‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ info:
5050
# BUILD & COMPILE
5151
# ═══════════════════════════════════════════════════════════════════════════════
5252

53-
# Build all components (Rust + Ada + ReScript)
53+
# Build all components (Rust + Ada + AffineScript)
5454
build: build-core build-gui build-tui build-ui
5555
@echo "All components built!"
5656

@@ -91,9 +91,9 @@ build-tui:
9191
fi
9292
cd tui && gprbuild -P formatrix_tui.gpr -XMODE=debug
9393
94-
# Build ReScript UI
94+
# Build AffineScript UI
9595
build-ui:
96-
@echo "Building ReScript UI..."
96+
@echo "Building AffineScript UI..."
9797
@cd ui && deno task build:res 2>&1 | tail -5
9898

9999
# Build in release mode
@@ -128,7 +128,7 @@ test-tui: build-tui
128128
@echo "Testing formatrix-tui..."
129129
@[ -f tui/bin/formatrix-tui ] && echo "TUI binary exists" || echo "SKIP: TUI not built (missing dependencies)"
130130

131-
# Test ReScript UI
131+
# Test AffineScript UI
132132
test-ui:
133133
@echo "Testing UI..."
134134
cd ui && deno task test 2>/dev/null || echo "UI tests not configured yet"
@@ -376,7 +376,7 @@ state-phase:
376376
@grep -oP '\(phase\s+\.\s+\K[^)]+' STATE.scm 2>/dev/null | head -1 || echo "unknown"
377377

378378
# ═══════════════════════════════════════════════════════════════════════════════
379-
# GUIX & NIX
379+
# GUIX & GUIX
380380
# ═══════════════════════════════════════════════════════════════════════════════
381381

382382
# Enter Guix development shell (primary)
@@ -387,9 +387,9 @@ guix-shell:
387387
guix-build:
388388
guix build -f guix/formatrix.scm
389389

390-
# Enter Nix development shell (fallback)
391-
nix-shell:
392-
@if [ -f "nix/flake.nix" ]; then cd nix && nix develop; else echo "No flake.nix"; fi
390+
# Enter Guix development shell (fallback)
391+
guix-shell:
392+
@if [ -f "guix/flake.guix" ]; then cd guix && guix develop; else echo "No flake.guix"; fi
393393

394394
# ═══════════════════════════════════════════════════════════════════════════════
395395
# RELEASE

‎ABI-FFI-README.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
4747
▼
4848
┌─────────────────────────────────────────────┐
4949
│ Any Language via C ABI │
50-
│ - Rust, ReScript, Julia, Python, etc. │
50+
│ - Rust, AffineScript, Julia, Python, etc. │
5151
└─────────────────────────────────────────────┘
5252
```
5353

@@ -79,7 +79,7 @@ This library follows the **Hyperpolymath RSR Standard** for ABI and FFI design:
7979
│
8080
└── bindings/ # Language-specific wrappers (optional)
8181
├── rust/
82-
├── rescript/
82+
├── affinescript/
8383
└── julia/
8484
```
8585

‎CONTRIBUTING.md‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk>
66
git clone https://github.com/hyperpolymath/docmatrix.git
77
cd docmatrix
88

9-
# Using Nix (recommended for reproducibility)
10-
nix develop
9+
# Using Guix (recommended for reproducibility)
10+
guix develop
1111

1212
# Or using toolbox/distrobox
1313
toolbox create docmatrix-dev
@@ -45,7 +45,7 @@ docmatrix/
4545
├── MAINTAINERS.md
4646
├── README.adoc
4747
├── SECURITY.md
48-
├── flake.nix # Nix flake (Perimeter 1)
48+
├── flake.guix # Guix flake (Perimeter 1)
4949
└── justfile # Task runner (Perimeter 1)
5050
```
5151

‎EXPLAINME.adoc‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ ____
1111
Cross-platform document editor with format tabs (TXT/MD/ADOC/DJOT/ORG/RST/TYP). Unified AST enables lossless conversion between formats. Gossamer GUI + Ada TUI. Graph visualization via ArangoDB, OCR/TTS/STT accessibility, Nickel pipelines for import/export.
1212
____
1313

14-
Three components orchestrate this: Rust formatrix-core (parsers/renderers), Gossamer GUI (ReScript), Ada TUI. A unified AST allows viewing the same document in 7 different markup languages, each a lossless round-trip.
14+
Three components orchestrate this: Rust formatrix-core (parsers/renderers), Gossamer GUI (AffineScript), Ada TUI. A unified AST allows viewing the same document in 7 different markup languages, each a lossless round-trip.
1515

1616
== Two Verifiable Claims from How-It-Works
1717

@@ -25,11 +25,11 @@ Three components orchestrate this: Rust formatrix-core (parsers/renderers), Goss
2525

2626
=== Claim 2: Gossamer GUI Routes Document Tabs to Correct Renderer
2727

28-
**Location**: `/var/mnt/eclipse/repos/docmatrix/ui/src/app.res` (ReScript Gossamer GUI)
28+
**Location**: `/var/mnt/eclipse/repos/docmatrix/ui/src/app.res` (AffineScript Gossamer GUI)
2929

30-
**How verified**: The GUI is a ReScript TEA application that loads a document (via ArangoDB), parses it in the primary format, then stores the AST. When the user clicks a format tab (MD, ADOC, DJOT, etc.), the app calls the appropriate `Renderer::render(ast)` and updates the editor view. README (§Features) documents 7 formats; `app.res` has a `FormatTab` selector that dispatches to format-specific renderers in the formatrix-core library. Tests verify tab switching preserves content.
30+
**How verified**: The GUI is a AffineScript TEA application that loads a document (via ArangoDB), parses it in the primary format, then stores the AST. When the user clicks a format tab (MD, ADOC, DJOT, etc.), the app calls the appropriate `Renderer::render(ast)` and updates the editor view. README (§Features) documents 7 formats; `app.res` has a `FormatTab` selector that dispatches to format-specific renderers in the formatrix-core library. Tests verify tab switching preserves content.
3131

32-
**Caveat**: ReScript/JavaScript type checking doesn't catch bugs where a renderer is misconfigured; validation happens at runtime when user clicks tab.
32+
**Caveat**: AffineScript/JavaScript type checking doesn't catch bugs where a renderer is misconfigured; validation happens at runtime when user clicks tab.
3333

3434
== Dogfooded Across The Account
3535

@@ -50,8 +50,8 @@ The formatrix-core library uses the hyperpolymath ABI/FFI standard for OCR/TTS b
5050
| `crates/formatrix-core/src/traits.rs` | Parser and Renderer traits used by all format modules
5151
| `crates/formatrix-db/src/lib.rs` | ArangoDB client; stores documents and relationships
5252
| `crates/formatrix-pipeline/src/lib.rs` | Nickel executor for import/export transformations
53-
| `ui/src/app.res` | ReScript Gossamer GUI app (TEA pattern); format tab switching, editor
54-
| `ui/src/components/` | ReScript components: editor, tabs, toolbar, preview
53+
| `ui/src/app.res` | AffineScript Gossamer GUI app (TEA pattern); format tab switching, editor
54+
| `ui/src/components/` | AffineScript components: editor, tabs, toolbar, preview
5555
| `tui/src/main.adb` | Ada TUI entry point using Terminal_Interface.Curses
5656
| `tui/src/tui.adb` | Ada TUI widget management (windows, input, rendering)
5757
| `Containerfile` | Wolfi container; includes all build dependencies

‎Justfile‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ info:
5151
# BUILD & COMPILE
5252
# ═══════════════════════════════════════════════════════════════════════════════
5353

54-
# Build all components (Rust + Ada + ReScript)
54+
# Build all components (Rust + Ada + AffineScript)
5555
build: build-core build-gui build-tui build-ui
5656
@echo "All components built!"
5757

@@ -92,9 +92,9 @@ build-tui:
9292
fi
9393
cd tui && gprbuild -P formatrix_tui.gpr -XMODE=debug
9494
95-
# Build ReScript UI
95+
# Build AffineScript UI
9696
build-ui:
97-
@echo "Building ReScript UI..."
97+
@echo "Building AffineScript UI..."
9898
@cd ui && deno task build:res 2>&1 | tail -5
9999

100100
# Build in release mode
@@ -129,7 +129,7 @@ test-tui: build-tui
129129
@echo "Testing formatrix-tui..."
130130
@[ -f tui/bin/formatrix-tui ] && echo "TUI binary exists" || echo "SKIP: TUI not built (missing dependencies)"
131131

132-
# Test ReScript UI
132+
# Test AffineScript UI
133133
test-ui:
134134
@echo "Testing UI..."
135135
cd ui && deno task test 2>/dev/null || echo "UI tests not configured yet"
@@ -377,7 +377,7 @@ state-phase:
377377
@grep -oP '\(phase\s+\.\s+\K[^)]+' STATE.scm 2>/dev/null | head -1 || echo "unknown"
378378

379379
# ═══════════════════════════════════════════════════════════════════════════════
380-
# GUIX & NIX
380+
# GUIX & GUIX
381381
# ═══════════════════════════════════════════════════════════════════════════════
382382

383383
# Enter Guix development shell (primary)
@@ -388,9 +388,9 @@ guix-shell:
388388
guix-build:
389389
guix build -f guix/formatrix.scm
390390

391-
# Enter Nix development shell (fallback)
392-
nix-shell:
393-
@if [ -f "nix/flake.nix" ]; then cd nix && nix develop; else echo "No flake.nix"; fi
391+
# Enter Guix development shell (fallback)
392+
guix-shell:
393+
@if [ -f "guix/flake.guix" ]; then cd guix && guix develop; else echo "No flake.guix"; fi
394394

395395
# ═══════════════════════════════════════════════════════════════════════════════
396396
# RELEASE

‎README.adoc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Cross-platform document editor with format tabs (TXT/MD/ADOC/DJOT/ORG/RST/TYP).
2626

2727
* *Format Tabs* - View and edit the same document in multiple markup formats
2828
* *Unified AST* - Lossless conversion between formats
29-
* *GUI* - Gossamer with ReScript frontend
29+
* *GUI* - Gossamer with AffineScript frontend
3030
* *TUI* - Ada with AdaCurses for terminal usage
3131
* *Graph Visualization* - ArangoDB for document relationships
3232
* *Accessibility* - OCR, TTS, STT support
@@ -75,7 +75,7 @@ crates/
7575
└── formatrix-pipeline/ # Nickel executor
7676
7777
tui/src/ # Ada TUI source
78-
ui/src/ # ReScript components
78+
ui/src/ # AffineScript components
7979
pipelines/ # Nickel pipeline definitions
8080
container/ # Wolfi container configs
8181
----
@@ -96,7 +96,7 @@ container/ # Wolfi container configs
9696
just build # Build all
9797
just build-core # Build Rust core only
9898
just build-tui # Build Ada TUI only
99-
just build-ui # Build ReScript UI only
99+
just build-ui # Build AffineScript UI only
100100
just test # Run all tests
101101
just fmt # Format all code
102102
just lint # Lint all code
@@ -135,7 +135,7 @@ Automation scripts from https://github.com/hyperpolymath/scripts[hyperpolymath/s
135135
| `touchscreen_hunter_killer.sh` | Touchscreen calibration/management
136136
|===
137137

138-
These scripts follow the same language policy (Bash, Rust, ReScript, Deno, Gleam, Guile Scheme) and multi-forge mirroring strategy.
138+
These scripts follow the same language policy (Bash, Rust, AffineScript, Deno, Gleam, Guile Scheme) and multi-forge mirroring strategy.
139139

140140
== License
141141

‎RSR_COMPLIANCE.adoc‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ This document certifies that *formatrix-docs* complies with the Rhodium Standard
6565
| TUI implementation
6666
| COMPLIANT
6767

68-
| ReScript
68+
| AffineScript
6969
| UI components
7070
| COMPLIANT
7171

@@ -94,7 +94,7 @@ No banned languages (TypeScript, Node.js, npm, Go, Python) are present in this r
9494
- `build-core` - Rust core
9595
- `build-gui` - Tauri GUI
9696
- `build-tui` - Ada TUI
97-
- `build-ui` - ReScript UI
97+
- `build-ui` - AffineScript UI
9898
- `build-release` - Release mode
9999

100100
=== Quality Recipes

‎RSR_OUTLINE.adoc‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,8 @@ project/
148148

149149
=== Language Tiers
150150

151-
* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript
152-
* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Nix
151+
* **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, AffineScript
152+
* **Tier 2** (Silver): Nickel, Racket, Guile Scheme, Guix
153153
* **Infrastructure**: Guix channels, derivations
154154

155155
=== Required Files
@@ -163,12 +163,12 @@ project/
163163
* `.well-known/security.txt`
164164
* `.well-known/ai.txt`
165165
* `.well-known/humans.txt`
166-
* `guix.scm` OR `flake.nix`
166+
* `guix.scm` OR `flake.guix`
167167

168168
=== Prohibited
169169

170170
* Python outside `salt/` directory
171-
* TypeScript/JavaScript (use ReScript)
171+
* TypeScript/JavaScript (use AffineScript)
172172
* CUE (use Guile/Nickel)
173173
* `Dockerfile` (use `Containerfile`)
174174

0 commit comments

Comments
 (0)