You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(claude): refresh language-policy tables for 2026-05-25 estate policy
Estate policy refresh delivered 2026-05-25 (in-session, owner-confirmed):
* AffineScript is the primary application language going forward
(this repo is its home).
* ReScript moves from "primary application code" to LEGACY — existing
.res files stay until migrated via tools/res-to-affine/ (#57); new
.res files are banned.
* TypeScript replacement updated: was "use ReScript", now "use
AffineScript". Same for JavaScript in projects that have been
meaningfully migrated.
* MPL-1.0 + MPL-1.0-or-later are banned; rewrite to MPL-2.0 in both
code (SPDX headers) and docs whenever encountered.
Changes to .claude/CLAUDE.md:
* Added a top-of-section policy-refresh banner pinned to 2026-05-25.
* Promoted AffineScript to the primary application language row.
* Demoted ReScript and JavaScript into a new LEGACY table with
explicit "no new occurrences" disposition.
* Updated BANNED table: TypeScript → AffineScript (was ReScript),
Python → AffineScript/Rust/Julia (was ReScript/Rust), added
explicit MPL-1.0 / MPL-1.0-or-later rows.
* Renamed the exemption table from "TypeScript Exemptions" to
"TypeScript / JavaScript Exemptions" since JS now has the same
posture; cross-reference Hypatia's scanner-suppression mechanism.
* Added a new enforcement rule (No new ReScript files) and updated
the Tauri 2.0+ line to say "Web UI (AffineScript)".
This mirrors the Hypatia rule changes landing in hypatia#318 (CicdRules
`@blocked_patterns` updates + MPL-1.0 in `@wrong_licenses`). Repo
CLAUDE.md is the human-readable source of truth; the Hypatia rules
are the machine-enforced version.
Approved exemptions (.d.ts files, affinescript-deno-test/*.ts, the
affinescript-cli/mod.js shim, editors/vscode/test/*.js) stay honoured
via the existing exemption-table rows further down in this file.
Closes-Refs hypatia#318 (machine-enforced side of this policy).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+33-19Lines changed: 33 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,62 +15,76 @@ The following files in `.machine_readable/` contain structured project metadata:
15
15
16
16
## Language Policy (Hyperpolymath Standard)
17
17
18
+
> **Policy refresh 2026-05-25**: AffineScript is now the primary application language across the estate (this is its home repo). ReScript / TypeScript / meaningfully-migrated JavaScript are banned going forward — write new code in AffineScript. Existing ReScript stays in place as legacy until the `.res → .affine` migration assistant (#57) walks the corpus. MPL-1.0 / MPL-1.0-or-later are banned; rewrite to MPL-2.0 wherever encountered (code + docs).
19
+
18
20
### ALLOWED Languages & Tools
19
21
20
22
| Language/Tool | Use Case | Notes |
21
23
|---------------|----------|-------|
22
-
|**ReScript**| Primary application code |Compiles to JS, type-safe|
|**Ada**| Safety-critical systems | Where required |
36
37
37
-
### BANNED - Do Not Use
38
+
### LEGACY — exists in tree, but write no new occurrences
39
+
40
+
| Language | Status | Disposition |
41
+
|----------|--------|-------------|
42
+
|**ReScript** (`.res`, `.resi`) | Legacy — pre-2026-05-25 | Migrate via `tools/res-to-affine/` (#57) when touching adjacent code; do not add new `.res` files. |
43
+
|**JavaScript** (`.js`, `.cjs`, `.mjs`) | Legacy / carve-outs only | Approved runtime-exemption carve-outs (see below) remain; net-new JS in a project already migrated to AffineScript is banned. |
44
+
45
+
### BANNED — Do Not Use (write zero new occurrences)
38
46
39
47
| Banned | Replacement |
40
48
|--------|-------------|
41
-
| TypeScript | ReScript |
49
+
| TypeScript |**AffineScript**|
50
+
| ReScript (new files) |**AffineScript** (migration via #57) |
51
+
| JavaScript (where the project has been meaningfully migrated to AffineScript) |**AffineScript**|
42
52
| Node.js | Deno |
43
53
| npm | Deno |
44
54
| Bun | Deno |
45
55
| pnpm/yarn | Deno |
46
56
| Go | Rust |
47
-
| Python (general) | ReScript/Rust |
48
-
| Java/Kotlin | Rust/Tauri/Dioxus |
49
-
| Swift | Tauri/Dioxus |
50
-
| React Native | Tauri/Dioxus |
51
-
| Flutter/Dart | Tauri/Dioxus |
57
+
| Python (general) |**AffineScript** / Rust / Julia |
**No exceptions for Kotlin/Swift** - use Rust-first approach:
56
68
57
-
1.**Tauri 2.0+** - Web UI (ReScript) + Rust backend, MIT/Apache-2.0
69
+
1.**Tauri 2.0+** - Web UI (AffineScript) + Rust backend, MIT/Apache-2.0
58
70
2.**Dioxus** - Pure Rust native UI, MIT/Apache-2.0
59
71
60
72
Both are FOSS with independent governance (no Big Tech).
61
73
62
74
### Enforcement Rules
63
75
64
-
1.**No new TypeScript files** - Convert existing TS to ReScript
65
-
2.**No package.json for runtime deps** - Use deno.json imports
66
-
3.**No node_modules in production** - Deno caches deps automatically
67
-
4.**No Go code** - Use Rust instead
68
-
5.**Python only for SaltStack** - All other Python must be rewritten
69
-
6.**No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus
76
+
1.**No new TypeScript files** - Write new code in AffineScript (closed exemptions table below covers the residual `.d.ts` / Deno-test cases).
77
+
2.**No new ReScript files** - As of 2026-05-25 policy refresh; AffineScript is the go-forward. Existing `.res` files stay until migrated via #57.
78
+
3.**No package.json for runtime deps** - Use deno.json imports.
79
+
4.**No node_modules in production** - Deno caches deps automatically.
80
+
5.**No Go code** - Use Rust instead.
81
+
6.**Python only for SaltStack** - All other Python must be rewritten.
82
+
7.**No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus.
83
+
8.**MPL-1.0 / MPL-1.0-or-later are non-conforming** - Rewrite to MPL-2.0 in SPDX headers and LICENSE files when encountered (Hypatia's `validate_license` flags both).
70
84
71
-
### TypeScript Exemptions (Approved)
85
+
### TypeScript / JavaScript Exemptions (Approved)
72
86
73
-
The "no new TypeScript" rule has seven approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires TypeScript:
87
+
The "no new TypeScript" / "no new JavaScript" rules have approved exemptions in this repo. These paths are *not* policy violations — they are documented carve-outs because the file format or downstream consumer requires the source language. They are honoured by Hypatia's scanner via path-based exemption + the per-repo CLAUDE.md exemption tables.
0 commit comments