Commit 7f3681a
chore: migrate language policy from ReScript to AffineScript estate-wide (#35)
## Summary
Migrate the estate language policy from "TypeScript → ReScript" to
"TypeScript / ReScript → AffineScript → typed-wasm" across CI rules,
contractile rules, agent-facing policy docs, templates, and a stale
migration guide.
This is the wider sweep promised in PR #34's body, now landed.
## Per-user directive (2026-04-30)
> "yes 1 yes 2 yes 3 yes and drop 4 change .res is out all .ts to
.affine now 5 affinescript-config-present replaces"
## What changed
### CI rule workflows
| File | Change |
|---|---|
| `.github/workflows/ts-blocker.yml` | Renamed concept to "TypeScript /
JavaScript / ReScript Blocker"; added `.res` to forbidden patterns;
replaced "Use ReScript instead" / "ReScript policy enforced" with "Use
AffineScript instead" / "AffineScript policy enforced"; dropped the
`.res.js$` JS exclusion (no longer needed once `.res` is banned). |
| `.github/workflows/rsr-antipattern.yml` | Added a new "Check for
ReScript" step blocking `.res` files; added a new "Check for
rescript.json" step; updated all "use ReScript instead" messages to "use
AffineScript instead"; allowed-list now `AffineScript, Deno, WASM, Rust,
OCaml, Haskell, Guile/Scheme`. |
| `.github/workflows/language-policy.yml` | Added a new "Check for
ReScript files" step; updated "Use ReScript instead" / "Rewrite in
Rust/ReScript" → AffineScript; switched `.scm` references to `.a2ml` in
the Required Files check (per the `.a2ml`-canonical rule confirmed in PR
#33); added `affine` to SPDX-header file extensions. |
| `a2ml/actions/validate/.github/workflows/ts-blocker.yml` | Same shape
as top-level. |
| `a2ml/actions/validate/.github/workflows/rsr-antipattern.yml` | Same
shape as top-level. |
| `consent-aware-http/.github/workflows/ts-blocker.yml` | Same shape as
top-level. |
### Canonical machine-readable rule
| File | Change |
|---|---|
| `hypatia-rules/rsr-self-compliance.a2ml` | `@forbidden_files`: updated
`.ts` reason to point at AffineScript; added new `**/*.res` entry.
(Supersedes PR #34's narrower one-line fix; that PR can be closed in
favour of this one.) |
### Contractile rules
| File | Change |
|---|---|
| `.machine_readable/contractiles/must/Mustfile.a2ml` | Renamed
`rescript-json-present` → `affinescript-config-present` (checks for
`affinescript.toml` or `dune-project` instead of `rescript.json`);
updated `no-unsafe-coerce` to scan `.affine` (not `.res`) since `.res`
is now banned and AffineScript has no equivalent escape hatch by design;
added new `no-rescript` rule mirroring `no-typescript`; updated
`no-typescript` and `no-python` replacement messages to AffineScript. |
### Agent-facing policy
| File | Change |
|---|---|
| `.claude/CLAUDE.md` | Allowed-languages table: ReScript row →
AffineScript row; ReScript-as-fallback note in JS row →
AffineScript-as-fallback. Banned-languages table: TypeScript replacement
is now AffineScript; new ReScript row added (banned 2026-04-30). Mobile
section + enforcement rules updated. Note paragraph at end now mentions
four banned categories (Python, V-lang, ATS2, ReScript). |
| `consent-aware-http/.claude/CLAUDE.md` | Same shape (sub-project
copy). |
| `ai-instruction/sonnet.md` | Language-policy hard-rule line now lists
AffineScript first; ReScript added to no-list. |
### Tier / Replacement docs
| File | Change |
|---|---|
| `0-ai-gatekeeper-protocol/RSR_OUTLINE.adoc` | Tier-1 list: ReScript →
AffineScript; "TypeScript/JavaScript (use ReScript)" →
"TypeScript/JavaScript/ReScript (use AffineScript)". |
| `0-ai-gatekeeper-protocol/repo-guardian-fs/RSR_OUTLINE.adoc` | Same. |
| `consent-aware-http/RSR_OUTLINE.adoc` | Same. |
### Templates
| File | Change |
|---|---|
| `a2ml-templates/META.a2ml.template` | `code-style` common-values
comment: `rescript` → `affinescript`. |
| `a2ml-templates/AGENTIC.a2ml.template` | `languages` allowed list:
drop `rescript`, add `affinescript`. `banned` list: add `rescript`. |
### Roadmap / migration
| File | Change |
|---|---|
| `agentic-a2ml/docs/ROADMAP.adoc` | "ReScript template (Tier 1)" →
"AffineScript template (Tier 1)" in the templates phase. |
| `consent-aware-http/.migration/PYTHON_TO_RUST_RESCRIPT.md` | DELETED.
|
| `consent-aware-http/.migration/PYTHON_TO_RUST_AFFINESCRIPT.adoc` |
NEW. Rewritten content: Python → Rust(+SPARK) / AffineScript directly
(no ReScript hop); also converted from `.md` → `.adoc` per the
doc-format rule (PR `rsr-template-repo#28`). |
## Files deliberately *not* changed (legitimate ReScript references)
- `.machine_readable/bot_exclusion_registry.a2ml` — references
`hyperpolymath/rescript` (the ReScript compiler fork repo). Legitimate.
- `.gitignore` lines for ReScript build artifacts — kept as transitional
defence; existing repos still have `.res` build output to ignore until
migrations complete.
- `Dustfile.a2ml` `no-tracked-rescript-build` — language-agnostic build
hygiene rule.
- `consent-aware-http/SCOPE.adoc:54` — factual statement about an
existing impl.
- `0-ai-gatekeeper-protocol/repo-guardian-fs/README.adoc` — names of
real ReScript libraries that some downstream repos still consume.
- `agentic-a2ml/examples/web-project-deno.json` — example showing how to
set up ReScript+Deno; left as-is for transitional reference. Could add a
parallel AffineScript example in a follow-up if desired.
## Relationship to other open PRs
- **PR #33** (`.scm` → `.a2ml` + `17 → @required_workflows` + `.md` →
`.adoc` for REQUIRED-FILES) — independent doc-drift fixes. No conflict.
- **PR #34** (`.scm` → `.a2ml` + ReScript → AffineScript in
`@forbidden_files` reason) — *superseded by this PR*. Close #34 in
favour of this one. The `.ts` reason update is included here, plus the
`.res` ban it didn't have.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent e87a048 commit 7f3681a
19 files changed
Lines changed: 193 additions & 109 deletions
File tree
- .claude
- .github/workflows
- .machine_readable/contractiles/must
- 0-ai-gatekeeper-protocol
- repo-guardian-fs
- a2ml-templates
- a2ml/actions/validate/.github/workflows
- agentic-a2ml/docs
- ai-instruction
- consent-aware-http
- .claude
- .github/workflows
- .migration
- hypatia-rules
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
| 35 | + | |
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
| 58 | + | |
58 | 59 | | |
59 | 60 | | |
60 | 61 | | |
61 | 62 | | |
62 | 63 | | |
63 | | - | |
| 64 | + | |
64 | 65 | | |
65 | 66 | | |
66 | 67 | | |
| |||
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
73 | | - | |
| 74 | + | |
| 75 | + | |
74 | 76 | | |
75 | 77 | | |
76 | 78 | | |
| |||
87 | 89 | | |
88 | 90 | | |
89 | 91 | | |
90 | | - | |
| 92 | + | |
91 | 93 | | |
92 | 94 | | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
96 | 98 | | |
97 | | - | |
| 99 | + | |
98 | 100 | | |
99 | 101 | | |
100 | 102 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
30 | 41 | | |
31 | 42 | | |
32 | 43 | | |
| |||
41 | 52 | | |
42 | 53 | | |
43 | 54 | | |
44 | | - | |
| 55 | + | |
45 | 56 | | |
46 | 57 | | |
47 | 58 | | |
| |||
139 | 150 | | |
140 | 151 | | |
141 | 152 | | |
142 | | - | |
143 | | - | |
144 | | - | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
145 | 157 | | |
146 | | - | |
| 158 | + | |
147 | 159 | | |
148 | 160 | | |
149 | 161 | | |
| |||
159 | 171 | | |
160 | 172 | | |
161 | 173 | | |
162 | | - | |
| 174 | + | |
163 | 175 | | |
164 | 176 | | |
165 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | 3 | | |
5 | | - | |
6 | | - | |
| 4 | + | |
| 5 | + | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
| |||
28 | 27 | | |
29 | 28 | | |
30 | 29 | | |
31 | | - | |
| 30 | + | |
32 | 31 | | |
33 | 32 | | |
34 | | - | |
| 33 | + | |
35 | 34 | | |
36 | 35 | | |
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
40 | 51 | | |
41 | 52 | | |
42 | 53 | | |
| |||
67 | 78 | | |
68 | 79 | | |
69 | 80 | | |
70 | | - | |
| 81 | + | |
71 | 82 | | |
72 | 83 | | |
73 | 84 | | |
74 | 85 | | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
75 | 94 | | |
76 | 95 | | |
77 | 96 | | |
| |||
86 | 105 | | |
87 | 106 | | |
88 | 107 | | |
89 | | - | |
| 108 | + | |
90 | 109 | | |
91 | 110 | | |
92 | | - | |
| 111 | + | |
93 | 112 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
| 15 | + | |
16 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
17 | 20 | | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | | - | |
| 31 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
71 | | - | |
72 | | - | |
73 | | - | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
| 101 | + | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
124 | 129 | | |
125 | | - | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
149 | | - | |
| 149 | + | |
150 | 150 | | |
151 | 151 | | |
152 | 152 | | |
| |||
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | | - | |
| 169 | + | |
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
60 | | - | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
64 | 64 | | |
65 | 65 | | |
66 | 66 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
30 | | - | |
| 30 | + | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| |||
0 commit comments