Skip to content

[campaign #254] STEP 2 — TRIAGE TOOLING: automated JS-API-surface classifier (LOAD-BEARING) #266

Description

@hyperpolymath

Part of #254. Blocked by step 1.

Goal

Build the triage tool that makes the rest of this campaign tractable. Without it, the migration is open-ended: 1,609+ .js/.jsx files cannot be hand-classified at scale. The tool enumerates JS API surface per file, cross-checks against the current AffineScript stdlib catalog, and outputs three buckets so STEPs 3-5 can proceed by data rather than by guess.

This is the LOAD-BEARING step — every downstream step depends on its output.

Inventory note

Umbrella body lists "1,609 .js/.jsx files" from the 2026-05-28 inventory. A fresh find on 2026-05-30 returned 1,724 with similar excludes. Treat 1,609 as informational only; the triage tool must re-enumerate with documented excludes (record exclude-list in tool docstring or sibling config file) so the bucket counts are reproducible.

Acceptance

  • Tool enumerates JS API surface per file (acorn-style AST walk preferred; simple regex sufficient for v0 — record choice in tool docs)
  • Cross-checks surface against the current AffineScript stdlib catalog (Deno.affine, json.affine, collections.affine, string.affine, Vscode.affine, etc.)
  • Outputs three buckets per file: portable now / blocked on binding X / keep as JS
  • For the blocked on binding X bucket: tool emits the specific missing binding name so STEP 4 can group by binding
  • For the keep as JS bucket: tool emits the carve-out class (1-8 from [campaign] Unnecessarily-JavaScript → AffineScript estate migration (UMBRELLA) #254) that applies
  • Bucket counts published as a comment on [campaign] Unnecessarily-JavaScript → AffineScript estate migration (UMBRELLA) #254 (totals + per-repo breakdown for top-20 repos)
  • Triage script committed to a documented path. Suggested location: standards/scripts/js-triage/ (or equivalent under hypatia repo if that's the better seam — record decision in commit message)
  • Documented exclude-list reproducible: re-running the enumeration yields the same file count given the same excludes
  • Per-PR ownership gate on the standards/hypatia PR that lands the tool

Definition of done

The comment on #254 makes the next two steps obvious: STEP 3 has a concrete file list (portable-now bucket), STEP 4 has a concrete binding-gap list (grouped by missing AS binding).

Sequencing

Blocks: STEPs 3, 4, 5 all consume this tool's output.
Blocked by: STEP 1 (carve-out taxonomy from :javascript_detected rule is the source of truth for the keep as JS bucket classification).

Activity

  1. hyperpolymath commented on May 30, 2026

    @hyperpolymath
    OwnerAuthor

    Inventory drift reconciled 2026-05-30:

    Conclusion: 1,609 figure is sound to ~2% precision. STEP 2 triage tool MUST re-enumerate at run-time and publish bucket counts on #254 — do not trust the snapshot for batch sizing.

  2. hyperpolymath commented on May 30, 2026

    @hyperpolymath
    OwnerAuthor

    📚 Documentation landed in PR #314 — docs/migrations/js-to-affinescript/README.adoc §STEP 2 captures the classifier spec:

    Still owed (LOAD-BEARING): the tool itself. This issue stays open until the classifier lands.

  3. hyperpolymath commented on May 30, 2026

    @hyperpolymath
    OwnerAuthor

    Closing per the 2026-05-30 documentation pass — the canonical campaign doc landed in PR #314. Implementation work (Hypatia rule, classifier tool, ports, bindings, re-triage cycles) can be tracked in fresh issues or referenced from the doc as it proceeds.

  4. added
    migrationPorting between languages or toolchains (e.g. -> AffineScript)
    and removed on Aug 26, 2026
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

    meta:campaignCoordinated multi-repo push with a defined end statemigrationPorting between languages or toolchains (e.g. -> AffineScript)

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions