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 (#363)
## Summary
Refreshes the `.claude/CLAUDE.md` language-policy tables to reflect the
estate policy delivered in-session 2026-05-25. Mirrors the
machine-enforced side in **hypatia#318** (CicdRules `@blocked_patterns`
updates + MPL-1.0 added to `@wrong_licenses`).
## Changes
- **Top-of-section banner** pinned to 2026-05-25 capturing the headline
policy change.
- **ALLOWED** table: AffineScript promoted from absent → "Primary
application code" row.
- **LEGACY** (new table): ReScript / JavaScript moved here with explicit
"no new occurrences" disposition + migration-tool reference (#57).
- **BANNED** table updates:
- TypeScript → **AffineScript** (was ReScript)
- ReScript (new files) → **AffineScript** (via #57 migration assistant)
- JavaScript (in projects meaningfully migrated) → **AffineScript**
- Python (general) → **AffineScript / Rust / Julia** (was ReScript/Rust)
- **MPL-1.0** → **MPL-2.0** (new explicit row)
- **MPL-1.0-or-later** → **MPL-2.0** (new explicit row)
- **Exemption section** renamed `TypeScript Exemptions` → `TypeScript /
JavaScript Exemptions` (JS now has the same posture).
- **Enforcement rule 2** added: No new ReScript files (existing stays
until migrated via #57).
- **Enforcement rule 8** added: MPL-1.0 / MPL-1.0-or-later are
non-conforming, rewrite to MPL-2.0.
- Tauri 2.0+ description: "Web UI (ReScript) + Rust backend" → "Web UI
(AffineScript) + Rust backend".
## Approved exemptions preserved
`.d.ts` declaration files, `affinescript-deno-test/*.ts`, the
`affinescript-cli/mod.js` shim, and `editors/vscode/test/*.js` — all
remain in the carve-out table further down in CLAUDE.md. The policy
refresh tightens the **default** posture; it does not retroactively
invalidate documented exemptions.
## Migration ramp realism
This repo's compiler-host tooling itself uses ReScript-derived patterns.
Migration happens opportunistically via `tools/res-to-affine/` — not as
a sweep.
Closes-Refs hypatia#318 (machine-enforced side of this policy).
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: .claude/CLAUDE.md
+34-19Lines changed: 34 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,62 +15,77 @@ 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). **Jekyll is banned**; the canonical estate SSG is `hyperpolymath/casket-ssg` (Haskell). This repo already migrated via `.github/workflows/casket-pages.yml`.
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 |
|**Jekyll** (`jekyll.yml`, `jekyll-gh-pages.yml`, `_config.yml`, `Gemfile`) |**`hyperpolymath/casket-ssg`** (Haskell SSG, owner's own tool). This repo already migrated — see `.github/workflows/casket-pages.yml` for the canonical pattern. Hypatia flags Jekyll filenames as `jekyll_workflow_detected` / `jekyll_gh_pages_workflow_detected` / `jekyll_config_detected` / `gemfile_detected`. |
52
65
53
66
### Mobile Development
54
67
55
68
**No exceptions for Kotlin/Swift** - use Rust-first approach:
56
69
57
-
1.**Tauri 2.0+** - Web UI (ReScript) + Rust backend, MIT/Apache-2.0
70
+
1.**Tauri 2.0+** - Web UI (AffineScript) + Rust backend, MIT/Apache-2.0
58
71
2.**Dioxus** - Pure Rust native UI, MIT/Apache-2.0
59
72
60
73
Both are FOSS with independent governance (no Big Tech).
61
74
62
75
### Enforcement Rules
63
76
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
77
+
1.**No new TypeScript files** - Write new code in AffineScript (closed exemptions table below covers the residual `.d.ts` / Deno-test cases).
78
+
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.
79
+
3.**No package.json for runtime deps** - Use deno.json imports.
80
+
4.**No node_modules in production** - Deno caches deps automatically.
81
+
5.**No Go code** - Use Rust instead.
82
+
6.**Python only for SaltStack** - All other Python must be rewritten.
83
+
7.**No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus.
84
+
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
85
71
-
### TypeScript Exemptions (Approved)
86
+
### TypeScript / JavaScript Exemptions (Approved)
72
87
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:
88
+
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