|
| 1 | +<!-- |
| 2 | +SPDX-License-Identifier: MPL-2.0 |
| 3 | +Copyright (c) Jonathan D.A. Jewell <j.d.a.jewell@open.ac.uk> |
| 4 | +--> |
1 | 5 | # CLAUDE.md - AI Assistant Instructions |
2 | 6 |
|
3 | 7 | ## Language Policy (Hyperpolymath Standard) |
|
6 | 10 |
|
7 | 11 | | Language/Tool | Use Case | Notes | |
8 | 12 | |---------------|----------|-------| |
9 | | -| **ReScript** | Primary application code | Compiles to JS, type-safe | |
| 13 | +| **AffineScript** | Primary application code | Affine-typed, compiles to typed-wasm or Deno-ESM | |
10 | 14 | | **Deno** | Runtime & package management | Replaces Node/npm/bun | |
11 | 15 | | **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools | |
12 | 16 | | **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI | |
13 | 17 | | **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like | |
14 | 18 | | **Gleam** | Backend services | Runs on BEAM or compiles to JS | |
15 | 19 | | **Bash/POSIX Shell** | Scripts, automation | Keep minimal | |
16 | | -| **JavaScript** | Only where ReScript cannot | MCP protocol glue, Deno APIs | |
| 20 | +| **JavaScript** | Only where AffineScript cannot | MCP protocol glue, Deno APIs | |
17 | 21 | | **Nickel** | Configuration language | For complex configs | |
18 | 22 | | **Guile Scheme** | State/meta files | .machine_readable/6a2/STATE.a2ml, .machine_readable/6a2/META.a2ml, .machine_readable/6a2/ECOSYSTEM.a2ml | |
19 | 23 | | **Julia** | Batch scripts, data processing | Per RSR | |
|
24 | 28 |
|
25 | 29 | | Banned | Replacement | |
26 | 30 | |--------|-------------| |
27 | | -| TypeScript | ReScript | |
| 31 | +| TypeScript | AffineScript | |
28 | 32 | | Node.js | Deno | |
29 | 33 | | npm | Deno | |
30 | 34 | | Bun | Deno | |
31 | 35 | | pnpm/yarn | Deno | |
32 | 36 | | Go | Rust | |
33 | | -| Python | Julia/Rust/ReScript | |
| 37 | +| Python | Julia/Rust/AffineScript | |
34 | 38 | | Java/Kotlin | Rust/Tauri/Dioxus | |
35 | 39 | | Swift | Tauri/Dioxus | |
36 | 40 | | React Native | Tauri/Dioxus | |
|
40 | 44 |
|
41 | 45 | **No exceptions for Kotlin/Swift** - use Rust-first approach: |
42 | 46 |
|
43 | | -1. **Tauri 2.0+** - Web UI (ReScript) + Rust backend, MIT/Apache-2.0 |
| 47 | +1. **Tauri 2.0+** - Web UI (AffineScript) + Rust backend, MIT/Apache-2.0 |
44 | 48 | 2. **Dioxus** - Pure Rust native UI, MIT/Apache-2.0 |
45 | 49 |
|
46 | 50 | Both are FOSS with independent governance (no Big Tech). |
47 | 51 |
|
48 | 52 | ### Enforcement Rules |
49 | 53 |
|
50 | | -1. **No new TypeScript files** - Convert existing TS to ReScript |
| 54 | +1. **No new TypeScript files** - Convert existing TS to AffineScript |
51 | 55 | 2. **No package.json for runtime deps** - Use deno.json imports |
52 | 56 | 3. **No node_modules in production** - Deno caches deps automatically |
53 | 57 | 4. **No Go code** - Use Rust instead |
54 | | -5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, ReScript for apps |
| 58 | +5. **No Python anywhere** - Use Julia for data/batch, Rust for systems, AffineScript for apps |
55 | 59 | 6. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus |
56 | 60 |
|
57 | 61 | ### Package Management |
|
0 commit comments