Context
Hypatia flags the Deno/TypeScript adapter code in two cartridges as cicd_rules/banned_language_file (critical), per the estate "no new TypeScript — convert to AffineScript" policy. This issue tracks the real fix: porting them to AffineScript.
Interim: the Hypatia finding is non-blocking baseline and is being left as-is — NOT exempted via .hypatia-ignore — so it stays visible as debt until this port lands.
Scope (~28 TS files, two cartridges)
cartridges/cross-cutting/orchestration/stack-orchestrator-mcp/adapter/ (12 files: types/parser/planner/executor/lsp_client/rollback + tests, deno.json). State: unwired scaffold — mod.js start() throws "adapter not implemented"; the TS is a WIP port from the archived Elixir in _source-archive/. Porting ≈ implementing the cartridge in AffineScript.
cartridges/domains/formal-verification/proof-lsp/adapter/ (16 files: server.ts + handlers + 4 prover backends agda/coq/isabelle/lean + tests). State: live (mod.js spawns adapter/server.ts as a Deno LSP server over stdio). Porting ≈ re-implementing working software — do this LAST.
Toolchain reality (assessed 2026-06-13)
- AffineScript lives at
hyperpolymath/affinescript (alpha). Rich stdlib (Deno, Http, Network, Ipc, json, io, testing, VscodeLanguageClient).
- The
.affine compiler is the OCaml/dune component (dune-project, affinescript.opam) — must be built (opam) and wired into CI to validate ports. The Rust affinescriptiser binary is a WASM-wrapper/manifest tool, not the source compiler.
- Alpha risk: self-documented miscompiles — effect handlers mis-lowered on 3 backends (affinescript#555), use-after-move soundness hole (affinescript#554). Porting live code onto this carries reliability risk; weigh against the v1 readiness ledger (affinescript#563).
Plan (pilot-first, de-risked)
- Stand up the OCaml
.affine compiler in cartridges CI (build + typecheck a sample).
- Pilot: port one leaf logic module of
stack-orchestrator-mcp (types → planner) to .affine, compile green. Establishes the pattern + proves the pipeline.
- Port the rest of
stack-orchestrator-mcp; port its tests.
- Port
proof-lsp last — first verify AffineScript stdlib covers LSP-over-stdio + subprocess spawning.
- Remove each TS file once its
.affine equivalent is green; cartridge entry stays mod.js.
Unblock conditions
- OCaml
.affine compiler wired into cartridges CI.
- AffineScript stable enough for live code (affinescript#563; #555/#554 resolved).
Refs: estate "no new TypeScript" policy (boj-server .claude/CLAUDE.md §TypeScript Exemptions).
https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa
Context
Hypatia flags the Deno/TypeScript adapter code in two cartridges as
cicd_rules/banned_language_file(critical), per the estate "no new TypeScript — convert to AffineScript" policy. This issue tracks the real fix: porting them to AffineScript.Interim: the Hypatia finding is non-blocking baseline and is being left as-is — NOT exempted via
.hypatia-ignore— so it stays visible as debt until this port lands.Scope (~28 TS files, two cartridges)
cartridges/cross-cutting/orchestration/stack-orchestrator-mcp/adapter/(12 files: types/parser/planner/executor/lsp_client/rollback + tests,deno.json). State: unwired scaffold —mod.jsstart()throws "adapter not implemented"; the TS is a WIP port from the archived Elixir in_source-archive/. Porting ≈ implementing the cartridge in AffineScript.cartridges/domains/formal-verification/proof-lsp/adapter/(16 files:server.ts+ handlers + 4 prover backends agda/coq/isabelle/lean + tests). State: live (mod.jsspawnsadapter/server.tsas a Deno LSP server over stdio). Porting ≈ re-implementing working software — do this LAST.Toolchain reality (assessed 2026-06-13)
hyperpolymath/affinescript(alpha). Rich stdlib (Deno,Http,Network,Ipc,json,io,testing,VscodeLanguageClient)..affinecompiler is the OCaml/dune component (dune-project,affinescript.opam) — must be built (opam) and wired into CI to validate ports. The Rustaffinescriptiserbinary is a WASM-wrapper/manifest tool, not the source compiler.Plan (pilot-first, de-risked)
.affinecompiler in cartridges CI (build + typecheck a sample).stack-orchestrator-mcp(types→planner) to.affine, compile green. Establishes the pattern + proves the pipeline.stack-orchestrator-mcp; port its tests.proof-lsplast — first verify AffineScript stdlib covers LSP-over-stdio + subprocess spawning..affineequivalent is green; cartridge entry staysmod.js.Unblock conditions
.affinecompiler wired into cartridges CI.Refs: estate "no new TypeScript" policy (boj-server
.claude/CLAUDE.md§TypeScript Exemptions).https://claude.ai/code/session_019tMcRS1Dm1nWjjYP4WvbJa