Skip to content

Commit 838f804

Browse files
docs(policy): ban ReScript explicitly and pin production installs (#726)
Adds ReScript to the BANNED table (canon bans it, destination AffineScript) and puts --frozen-lockfile on Enforcement Rule 3, so a lockfile mismatch fails the build instead of silently re-resolving. The inserted row mirrors this file's own TypeScript replacement cell rather than assuming the literal string "AffineScript", so bold, qualified and extra-column table variants keep their existing wording instead of being flattened. Enforcement Rule 1 is untouched: standards#655 records that collision as not resolvable unilaterally. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent 2027684 commit 838f804

1 file changed

Lines changed: 10 additions & 9 deletions

File tree

.claude/CLAUDE.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ The following files in `.machine_readable/` contain structured project metadata:
4949
| Language/Tool | Use Case | Notes |
5050
|---------------|----------|-------|
5151
| **AffineScript** (`.affine`) | Primary application code | Affine types, dependent types, row polymorphism, extensible effects; compiles to Wasm |
52-
| **Deno** | Runtime & package management | Replaces Node/npm/bun |
52+
| **Bun** | JS runtime & package management (tier 1) | Default for all new work. Runs compiled ESM/JS directly — no bundler step. Uses an npm-compatible `package.json` plus `bun.lock` — both are expected, not anti-patterns. |
5353
| **Rust** | Performance-critical, systems, WASM | Preferred for CLI tools |
5454
| **Tauri 2.0+** | Mobile apps (iOS/Android) | Rust backend + web UI |
5555
| **Dioxus** | Mobile apps (native UI) | Pure Rust, React-like |
@@ -74,12 +74,13 @@ The following files in `.machine_readable/` contain structured project metadata:
7474
| Banned | Replacement |
7575
|--------|-------------|
7676
| TypeScript | **AffineScript** |
77+
| ReScript | **AffineScript** |
7778
| (new files) | **AffineScript** (migration via #488) |
7879
| JavaScript (where the project has been meaningfully migrated to AffineScript) | **AffineScript** |
79-
| Node.js | Deno |
80-
| npm | Deno |
81-
| Bun | Deno |
82-
| pnpm/yarn | Deno |
80+
| Deno | Bun |
81+
| Node.js | Bun |
82+
| npm | Bun |
83+
| pnpm/yarn | Bun |
8384
| Go | Rust |
8485
| Python (general) | **AffineScript** / Rust / Julia |
8586
| Java/Kotlin | Rust / Tauri / Dioxus |
@@ -102,9 +103,9 @@ Both are FOSS with independent governance (no Big Tech).
102103
### Enforcement Rules
103104

104105
1. **No new TypeScript files** - Write new code in AffineScript (closed exemptions table below covers the residual `.d.ts` / Deno-test cases).
105-
2. **No new files** - As of 2026-05-25 policy refresh; AffineScript is the go-forward. Existing `.res` files stay until migrated via #488.
106-
3. **No package.json for runtime deps** - Use deno.json imports.
107-
4. **No node_modules in production** - Deno caches deps automatically.
106+
2. **No new ReScript files** - As of 2026-05-25 policy refresh; AffineScript is the go-forward. Existing `.res` files stay until migrated via #488.
107+
3. **Use `package.json` + `bun.lock` for JS runtime deps** - Bun is npm-compatible; a manifest is REQUIRED
108+
4. **`bun install --production --frozen-lockfile` for production deps** - resolved from `package.json` and pinned via `bun.lock`; `--frozen-lockfile` makes a lockfile mismatch a build failure rather than a silent re-resolve
108109
5. **No Go code** - Use Rust instead.
109110
6. **Python only for SaltStack** - All other Python must be rewritten.
110111
7. **No Kotlin/Swift for mobile** - Use Tauri 2.0+ or Dioxus.
@@ -164,7 +165,7 @@ Do not "migrate", rewrite, or delete `formal/*.v` as if it were V-lang.
164165

165166
- **Primary**: Guix (guix.scm)
166167
- **Fallback**: Guix (flake.guix)
167-
- **JS deps**: Deno (deno.json imports)
168+
- **JS deps**: Bun (`package.json` + `bun.lock`). Declare tooling as a devDependency and run `bunx --no-install --bun <tool>` — a bare `bunx <tool>` can fetch an unpinned package and may start Node via its shebang.
168169

169170
### Security Requirements
170171

0 commit comments

Comments
 (0)