chore: migrate language policy from ReScript to AffineScript estate-wide#35
Merged
hyperpolymath merged 2 commits intomainfrom Apr 30, 2026
Merged
Conversation
Per user directive 2026-04-30: '.res is out, all .ts to .affine now;
affinescript-config-present replaces.'
CI rule workflows (.github/workflows/ + a2ml-action duplicates):
- ts-blocker.yml: extend to also block .res; messages -> AffineScript
- rsr-antipattern.yml: new ReScript-block step + new rescript.json
block step; allowed/blocked lists updated
- language-policy.yml: new ReScript-block step; replace 'use ReScript'
with 'use AffineScript'; switch .scm to .a2ml in required-files;
add 'affine' to SPDX-header extensions
Canonical rule (hypatia-rules/rsr-self-compliance.a2ml):
- @forbidden_files: .ts reason -> AffineScript; new .res entry
Contractile rules (.machine_readable/contractiles/must/Mustfile.a2ml):
- rescript-json-present -> affinescript-config-present
- no-typescript / no-python messages -> AffineScript
- new no-rescript rule
- no-unsafe-coerce now scans .affine (was .res)
Agent-facing policy (.claude/CLAUDE.md + sonnet.md + consent-aware-http
copy): ReScript replaced by AffineScript in allowed/banned tables;
ReScript explicitly added to banned list (2026-04-30).
RSR_OUTLINE.adoc (3 copies): Tier-1 'ReScript' -> 'AffineScript';
prohibited 'TypeScript/JavaScript (use ReScript)' -> 'TypeScript/
JavaScript/ReScript (use AffineScript)'.
a2ml-templates/{META,AGENTIC}.a2ml.template: drop rescript, add
affinescript; rescript added to banned list.
agentic-a2ml/docs/ROADMAP.adoc: ReScript template -> AffineScript template.
consent-aware-http/.migration/PYTHON_TO_RUST_RESCRIPT.md DELETED;
replaced by .../PYTHON_TO_RUST_AFFINESCRIPT.adoc with rewritten content
(no ReScript intermediate hop) and .md->.adoc per doc-format rule.
Supersedes the narrower PR #34. Files deliberately not touched are
listed in the PR body (bot exclusion registry, .gitignore artefacts,
language-agnostic build hygiene rules, factual references).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hyperpolymath
added a commit
that referenced
this pull request
May 1, 2026
…idue formalism Adds Agda to Tier-1 alongside the existing Tier-1 set in three RSR_OUTLINE.adoc copies (with the ReScript -> AffineScript and Rust -> Rust(+SPARK) updates from PR #35 inlined to avoid build conflict). Adds two new rows to .claude/CLAUDE.md: - Agda (formal verification, foundational/type-theoretic) - echo-types library (canonical loss-with-residue formalism; cite from hyperpolymath/echo-types rather than reinventing) Reframes Idris2 row from 'sole option' to 'primary, ABI-style proofs' since Agda now formally complements it. Updates ai-instruction/sonnet.md hard-rules language-policy line to list AffineScript first, include Agda explicitly, ban ReScript, and reference RS/TS/JS -> AffineScript -> typed-wasm. Coordinates with: hyperpolymath/echo-types#29 (.scm -> .a2ml + Justfile fix) hyperpolymath/echo-types#30 (RSR floor scaffolding) #33 (REQUIRED-FILES doc-drift fix) #35 (ReScript -> AffineScript sweep; line-overlap with this PR; mechanical rebase at merge) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
hyperpolymath
added a commit
that referenced
this pull request
May 1, 2026
…idue formalism (#36) ## Summary Recognise **Agda** as a Tier-1 language and **`hyperpolymath/echo-types`** as the canonical loss-with-residue formalism in the agent-facing policy and tier docs. ## What changed ### Tier-1 list (3 RSR_OUTLINE.adoc copies) ```diff - * **Tier 1** (Gold): Rust, Elixir, Zig, Ada, Haskell, ReScript + * **Tier 1** (Gold): Rust(+SPARK), Elixir, Zig, Ada, Haskell, AffineScript, Agda ``` Adds Agda alongside the existing tier. Replaces ReScript with AffineScript and qualifies Rust as Rust(+SPARK), tracking the broader ReScript→AffineScript migration in PR #35 (this PR's diff includes those updates so the file builds without conflict; #35 may need a rebase but the resolutions are mechanical). Files updated: - `0-ai-gatekeeper-protocol/RSR_OUTLINE.adoc` line 149 - `0-ai-gatekeeper-protocol/repo-guardian-fs/RSR_OUTLINE.adoc` line 149 - `consent-aware-http/RSR_OUTLINE.adoc` line 149 ### Agent-facing language policy (`.claude/CLAUDE.md`) Adds two new rows to the allowed-languages table: ``` | **Agda** | Formal verification (foundational / type-theoretic constructions) | Used by hyperpolymath/echo-types ... | | **echo-types library** | Loss-with-residue formalism (Agda) | hyperpolymath/echo-types — canonical formalisation of Echo f y := Σ (x : A) , (f x ≡ y) ... | ``` Reframes Idris2 from "Formal verification (sole option)" to "Formal verification (primary, ABI-style proofs)" since Agda now formally complements it for foundational constructions where Idris2's specific dependent-type idiom isn't the right tool. ### `ai-instruction/sonnet.md` The hard-rules language-policy line now lists AffineScript first, includes Agda explicitly, bans ReScript, and references the AffineScript→typed-wasm direction: ```diff - - <Language policy: ReScript / Rust / Deno / Zig / Idris2 / Gleam; no - TypeScript, Node, npm/bun/yarn, Go, general Python> + - <Language policy: AffineScript / Rust(+SPARK) / Deno / Zig / Idris2 / Agda / Gleam; no + TypeScript, ReScript, Node, npm/bun/yarn, Go, general Python (RS/TS/JS → AffineScript → typed-wasm; Agda for foundational proofs incl. echo-types)> ``` ## Why Echo-types (`hyperpolymath/echo-types`) is an active, well-developed Agda formalisation that the `coord-mcp` TODO file already aspires to dogfood. Until now, the standards' policy docs name only Idris2 as the ecosystem's formal-verification language, which understates Agda's role for the foundational-construction track. This PR makes the actual two-prover posture explicit. The echo-types row is added because the canonical fiber/echo construction `Echo f y := Σ (x : A) , (f x ≡ y)` should not be re-derived in downstream design docs and proofs — they should cite the library. Naming it explicitly in CLAUDE.md prevents accidental reinvention. ## Coordinated companion PRs - `hyperpolymath/echo-types#29` — `.scm` → `.a2ml` 6a2 file rename + Justfile `make` → `just`. (Bringing echo-types into compliance with the canonical extension rule.) - `hyperpolymath/echo-types#30` — RSR template floor (23 new files: githealth + RSR docs + dotfiles + 4 mandatory workflows + contractiles + stapeln). (Bringing echo-types to file-presence floor.) - `#33` — `.scm` → `.a2ml` doc fix in REQUIRED-FILES.adoc + workflow-count drift fix. - `#35` — ReScript → AffineScript estate-wide sweep. (Some line-overlap with this PR; mechanical rebase at merge.) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)
What changed
CI rule workflows
.github/workflows/ts-blocker.yml.resto 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.resis banned)..github/workflows/rsr-antipattern.yml.resfiles; added a new "Check for rescript.json" step; updated all "use ReScript instead" messages to "use AffineScript instead"; allowed-list nowAffineScript, Deno, WASM, Rust, OCaml, Haskell, Guile/Scheme..github/workflows/language-policy.yml.scmreferences to.a2mlin the Required Files check (per the.a2ml-canonical rule confirmed in PR #33); addedaffineto SPDX-header file extensions.a2ml/actions/validate/.github/workflows/ts-blocker.ymla2ml/actions/validate/.github/workflows/rsr-antipattern.ymlconsent-aware-http/.github/workflows/ts-blocker.ymlCanonical machine-readable rule
hypatia-rules/rsr-self-compliance.a2ml@forbidden_files: updated.tsreason to point at AffineScript; added new**/*.resentry. (Supersedes PR #34's narrower one-line fix; that PR can be closed in favour of this one.)Contractile rules
.machine_readable/contractiles/must/Mustfile.a2mlrescript-json-present→affinescript-config-present(checks foraffinescript.tomlordune-projectinstead ofrescript.json); updatedno-unsafe-coerceto scan.affine(not.res) since.resis now banned and AffineScript has no equivalent escape hatch by design; added newno-rescriptrule mirroringno-typescript; updatedno-typescriptandno-pythonreplacement messages to AffineScript.Agent-facing policy
.claude/CLAUDE.mdconsent-aware-http/.claude/CLAUDE.mdai-instruction/sonnet.mdTier / Replacement docs
0-ai-gatekeeper-protocol/RSR_OUTLINE.adoc0-ai-gatekeeper-protocol/repo-guardian-fs/RSR_OUTLINE.adocconsent-aware-http/RSR_OUTLINE.adocTemplates
a2ml-templates/META.a2ml.templatecode-stylecommon-values comment:rescript→affinescript.a2ml-templates/AGENTIC.a2ml.templatelanguagesallowed list: droprescript, addaffinescript.bannedlist: addrescript.Roadmap / migration
agentic-a2ml/docs/ROADMAP.adocconsent-aware-http/.migration/PYTHON_TO_RUST_RESCRIPT.mdconsent-aware-http/.migration/PYTHON_TO_RUST_AFFINESCRIPT.adoc.md→.adocper the doc-format rule (PRrsr-template-repo#28).Files deliberately not changed (legitimate ReScript references)
.machine_readable/bot_exclusion_registry.a2ml— referenceshyperpolymath/rescript(the ReScript compiler fork repo). Legitimate..gitignorelines for ReScript build artifacts — kept as transitional defence; existing repos still have.resbuild output to ignore until migrations complete.Dustfile.a2mlno-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
.scm→.a2ml+17 → @required_workflows+.md→.adocfor REQUIRED-FILES) — independent doc-drift fixes. No conflict..scm→.a2ml+ ReScript → AffineScript in@forbidden_filesreason) — superseded by this PR. Close chore(hypatia-rules): use AffineScript not ReScript in @forbidden_files reason #34 in favour of this one. The.tsreason update is included here, plus the.resban it didn't have.🤖 Generated with Claude Code