Skip to content

chore(hypatia-rules): use AffineScript not ReScript in @forbidden_files reason#34

Closed
hyperpolymath wants to merge 2 commits intomainfrom
chore/rsr-rule-rescript-to-affinescript
Closed

chore(hypatia-rules): use AffineScript not ReScript in @forbidden_files reason#34
hyperpolymath wants to merge 2 commits intomainfrom
chore/rsr-rule-rescript-to-affinescript

Conversation

@hyperpolymath
Copy link
Copy Markdown
Owner

Summary

Update the @forbidden_files rationale in hypatia-rules/rsr-self-compliance.a2ml to point at AffineScript as the TypeScript replacement, per the current estate language policy.

What changed

hypatia-rules/rsr-self-compliance.a2ml line 58:

 - glob: "**/*.ts"
-  reason: "TypeScript banned — use ReScript"
+  reason: "TypeScript banned — use AffineScript (RS/TS/JS → AffineScript → typed-wasm per estate language defaults)"

Why

The current estate-wide language policy (per the user's stated default) is:

  • RS / TS / JS → AffineScript → typed-wasm (NOT ReScript). Opportunistic migration; exceptions for explicitly-RS systems and RS adapter shims.
  • Rust → Rust/SPARK for boundary kernels.

The rsr-self-compliance.a2ml @required_workflows rule was already correct, but the @forbidden_files reason text still pointed at ReScript as the replacement language. This PR aligns the canonical machine-readable rule with the policy.

Scope deliberately not in this PR

A grep across hyperpolymath/standards surfaced ~20 other files with "use ReScript" / npm:rescript / @rescript/core / "Use ReScript instead" text in CI-rule, workflow, contractile, template, and sub-project doc contexts. Those need their own discussion before bulk replacement, because:

  1. Some references are legitimate (e.g. bot_exclusion_registry.a2ml referencing hyperpolymath/rescript — the ReScript compiler fork — is correct as-is; ReScript-specific reference implementations in consent-aware-http/ and 0-ai-gatekeeper-protocol/ describe what currently exists).
  2. Migration text (e.g. consent-aware-http/.migration/PYTHON_TO_RUST_RESCRIPT.md) needs renaming, not just s/ReScript/AffineScript/.
  3. Some sub-projects carry their own .github/workflows/ts-blocker.yml copies; those need synchronised updates and possibly a single source of truth.

Filing a separate audit + PR for the wider sweep is the cleaner path. This focused PR fixes the canonical machine-readable rule first; broader prose/workflow drift gets its own scope conversation.

🤖 Generated with Claude Code

hyperpolymath and others added 2 commits April 30, 2026 16:21
1. .meta/REQUIRED-FILES: .scm -> .a2ml for 6a2 metadata files.
   The 'Mandatory SCM Files' table listed META.scm/STATE.scm/etc., but
   the canonical extension is .a2ml. .scm is reserved for Guix-related
   files only (guix.scm, .guix-channel). Confirmed by user 2026-04-30
   and consistent with this repo's own .machine_readable/6a2/*.a2ml.

2. .meta/REQUIRED-FILES.md -> .adoc.
   Per the hyperpolymath convention (AsciiDoc by default, Markdown only
   for files GitHub's community-health rules special-case by name),
   internal documentation goes in .adoc.

3. 'all 17 RSR workflows' / '19 CI workflows' -> reference the canonical
   machine-readable @required_workflows rule.
   The actual list lives in hypatia-rules/rsr-self-compliance.a2ml and
   currently names 4 workflows (hypatia-scan, mirror, scorecard,
   rsr-antipattern). Several prose docs claimed 17 or 19. Replacing the
   hard count with a reference to the rule keeps the prose durable.

Affects:
  immaculate-guide/IMMACULATE-GUIDE.adoc (lines 130, 267)
  toolchain-readiness-grades/TOOLCHAIN-READINESS-GRADES.adoc (228, 443)
  toolchain-readiness-grades/TOOLCHAIN-READINESS-GRADES.a2ml (line 56)
  toolchain-readiness-grades/SELF-ASSESSMENT.adoc (line 74)
  component-readiness-grades/SELF-ASSESSMENT.adoc (line 32)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
…es reason

Estate-wide language policy: RS/TS/JS -> AffineScript -> typed-wasm.
The @required_workflows rule was already correct, but the
@forbidden_files reason text still pointed at ReScript as the
replacement. This focused fix aligns the canonical rule with the policy.

Wider sweep (~20 files with similar 'use ReScript' / npm:rescript text
in workflows / contractile rules / templates / sub-projects) is
deliberately NOT in this PR — some references are legitimate (the
ReScript compiler fork, existing reference implementations) and require
case-by-case judgement.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@chatgpt-codex-connector
Copy link
Copy Markdown

Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits.
Credits must be used to enable repository wide code reviews.

@hyperpolymath
Copy link
Copy Markdown
Owner Author

Superseded by #35 — that PR includes this fix plus the wider ReScript→AffineScript sweep + new .res ban. Closing here in favour of #35.

hyperpolymath added a commit that referenced this pull request Apr 30, 2026
…ide (#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>
@hyperpolymath hyperpolymath deleted the chore/rsr-rule-rescript-to-affinescript branch April 30, 2026 17:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant