Skip to content

[campaign] TypeScript → AffineScript estate migration (UMBRELLA) #239

Open

Description

@hyperpolymath

Campaign overview

Estate-wide migration of TypeScript to AffineScript, parallel to the completed V→Zig sweep (2026-05-28) but at very different scale.

State: IN-FLIGHT. Multi-session campaign, ~50-80 PRs across ~38 repos.

Scope safety: only hyperpolymath/ repos that are non-fork (owner-only + shared-with-son). Upstream forks (rescript, servers, repos-monorepo, linguist) are carve-outs.

4-layer architecture

LAYER 1 - POLICY & ENFORCEMENT COMPLETE

LAYER 2 - STDLIB BINDING CAPACITY EXPANDING

LAYER 3 - PHYSICAL FILE PORTS (~285 files / 38 repos)

LAYER 4 - PARALLEL DEPENDENCY: AS bindings top-50 roadmap

  • Plugin-host APIs needed before plugin-repo ports can land

Step issues

Dependency graph

step 1 LANDED -> step 2 LANDED -> step 3 (~ done) -> step 4-A (#326) + step 4-B (#327) -> step 4-C (#243) -> step 4-D -> step 5

step 6 (host bindings, parallel) -> step 7 (plugin repos)

Cross-references

  • GitHub Projects board: https://github.com/users/hyperpolymath/projects/35 (Hyperpolymath Master Roadmap)
  • Memory tracker: project_estate_ts_to_affinescript_2026_05_28.md
  • 2026-05-31 session: session_2026_05_31_ts_to_as_step3_closure.md
  • AS bindings parallel: project_affinescript_bindings_top50_roadmap.md
  • V-lang precedent (completed 2026-05-28): project_estate_vlang_remediation_2026_05_28.md
  • Layer-1 PRs: hypatia#375, hypatia#378, standards#235, standards#238, standards#247, reposystem#82

Scale summary

Activity

  1. added
    documentationDocs, prose, diagrams, READMEs, ADRs
    meta:campaignCoordinated multi-repo push with a defined end state
    meta:umbrellaParent issue aggregating child issues
    governancePolicy, rulesets, standards, compliance, and their enforcement
    on May 28, 2026
  2. 6 remaining items

  3. hyperpolymath commented on May 31, 2026

    @hyperpolymath
    OwnerAuthor

    STEP 4-A/4-B PRs now armed (2026-05-31 PM)

    sub-issue PR state
    #326 STEP 4-A binary I/O affinescript#507 auto-merge SQUASH armed; 24 CI queued
    #327 STEP 4-B random + perf.now affinescript#509 auto-merge SQUASH armed; 24 CI queued
    #242 STEP 3 stdlib fill (predecessor) affinescript#504 auto-merge SQUASH armed; 24 CI queued

    3 sibling PRs queued — file sections are disjoint enough that natural merge order is #504 → #507 → #509 with mechanical rebases (no symbol-level conflicts). After all three land, STEP 4-C (#243 per-repo ports) becomes the critical path — first realistic ports: raze-tui's 6 binary-ABI test files (unblocked by #507), bofig's property/bench files (unblocked by #509), bofig's unit/e2e/aspect files (no extra binding needed).

  4. hyperpolymath commented on Jun 1, 2026

    @hyperpolymath
    OwnerAuthor

    Status update — AS stdlib codegen landed; campaign waypoint shift (2026-06-01) 📌

    For the campaign umbrella tracking here:

    What landed (sourced):

    • affinescript#522 (2026-06-01) — Sqlite.affine codegen foundation; first stdlib extern with full Deno-ESM lowering + tests end-to-end.
    • affinescript#504 (2026-06-01) — 6 Deno-ESM stdlib externs (stat helpers, byte ops, importMetaUrl) + wildcard-let codegen fix; closes 6 of 10 STEP-3 gaps in standards#242.
    • affinescript#463 (2026-05-30) — non-ASCII Unicode escape emit in Deno-ESM.
    • affinescript#421 — stdlib/json v0.3 via hpm-json-rsr Zig FFI.

    What this means for the campaign:

    Action: No new mass-port being kicked off from this post — surfacing the status so campaign waypoints stay accurate. Dependent sub-tickets can re-evaluate parking once they verify their specific blockers are in the "now-closed" set above.

    🤖 Cross-estate AS-status sweep on 2026-06-01.

  5. hyperpolymath commented on Aug 25, 2026

    @hyperpolymath
    OwnerAuthor

    🔨 Owner ruling 2026-08-25 — AffineScript governs. This campaign stays LIVE.

    This issue was blocked on a genuine contradiction between two canonical documents:

    • LANGUAGE-POLICY.adoc §1.2 (since 2026-07-29): "TypeScript is permitted under Bun … the former 'use ReScript instead' rule is retired"
    • .claude/CLAUDE.md (the file agents read first): bans TypeScript in favour of AffineScript

    .claude/CLAUDE.md flagged the conflict against itself on 2026-08-07 and deliberately left it for an owner ruling rather than picking a side.

    The owner has now ruled: AffineScript governs. LANGUAGE-POLICY.adoc §1.2 was the error.

    What this means concretely

    Runtime Bun, tier 1, unchanged — the §1 ordering was never in dispute
    Language AffineScript for new application code; TypeScript only where AffineScript cannot reach (the narrow, transitional MCP-glue / runtime-API carve-out JavaScript already holds)
    ReScript ban uncontested; migration destination is AffineScript

    The withdrawn text ran the runtime and language questions together. Separating them makes both documents coherent without touching Bun's position.

    Why I am recording this here

    I triaged this issue as a close-as-stale candidate on the strength of §1.2, and put the question to the owner before acting. Had I not asked, I would have closed a live campaign. Recording the ruling in-thread so the next reader — human or agent — does not repeat that reasoning from the same evidence.

    One correction to the record

    §1.2 justified retiring the rule by pointing at ts-blocker.yml being structurally incapable of failing (20 of 20 runs green; never once fired). That measurement is correct and stands. But it is evidence about the gate, not about the rule — a broken enforcement mechanism says nothing about whether the policy it failed to enforce was right. The remedy for a fake gate is to repair it and verify it both ways, not to withdraw the policy.

    Correction PR: #632

  6. added
    migrationPorting between languages or toolchains (e.g. -> AffineScript)
    and removed on Aug 26, 2026
  7. hyperpolymath commented on Aug 27, 2026

    @hyperpolymath
    OwnerAuthor

    Re-measured 2026-08-27 — 95 files in 9 repos, and 72 of those are deliberate

    claimed measured
    .ts/.tsx remaining ~285 95
    repos 38 9

    No node_modules / vendor / deps hits at all — the census is clean.

    72 of the 95 are proven's published polyglot bindings — bindings/typescript/src 36, bindings/deno/src 28, bindings/assemblyscript/src 7. That is a deliberate consumer surface, not migration debt.

    Excluding those: 23 files in 8 repos, largest metadatastician/stapeln 7 and metadatastician/svalinn 5 — both now in the other org.

    Step status

    Closed: #240, #241, #242, #245, #326, #327 — and #243, #244, #246 closed today on measured zero counts.

    ⚠️ Those closures stand (nothing left to port) but see #664: some tiers reached zero by deletion, and this campaign's metric cannot tell that apart from completion.

    Recommend: this umbrella is effectively complete at 23 genuine files. Close it or rescope to those 23.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationDocs, prose, diagrams, READMEs, ADRsgovernancePolicy, rulesets, standards, compliance, and their enforcementmeta:campaignCoordinated multi-repo push with a defined end statemeta:recurringRecurs on a schedule or by trigger; never finally closedmeta:umbrellaParent issue aggregating child issuesmigrationPorting between languages or toolchains (e.g. -> AffineScript)priority:p3Low - nice to havescope:estateAffects many or all repos across the estate

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions