Files
hakorune/docs/private/roadmap/phases/phase-20.28/CLAUDE_SPEC.md

1.6 KiB
Raw Blame History

Phase20.28 — Claude Handoff Spec

Scope

  • Lock down SSOT normalize policy; enforce in runner + interpreter.
  • Harden Builder/Optimizer (effects and order) to avoid DCE/reorder bugs.
  • Expand Core mir_call coverage (Array/String day1); Map remains pluginonly.
  • GateC parity (file/pipe × plugins ON/OFF) with quiet/rc symmetry.
  • Add a minimal selfhost smoke.

Work Items

  1. Normalize policy
  • Runner (GateC final fallback): only normalize Method/ModuleFunction → Extern when allow_gate_c_plugins=true.
  • Interpreter (handle_call/Method): when plugins_disabled(), skip static/runtime extern routing and use execute_method_call directly.
  • Doc a decision table for SSOT (plugins=ON/OFF).
  1. Builder/Optimizer
  • Ensure JSON carries effects for mutating calls; when absent, default as WRITE.
  • Emit singlepass JSON preserving MIR order; remove any postponed Copy emission.
  • Canaries: ifdiamond + set→compare dependency.
  1. Core mir_call
  • Positive coverage: Array get/set/push/pop/size via HostSlot/Plugin; ring0(Array) only as last resort.
  • String primitives: length/substring/indexOf/lastIndexOf/replace — bounds checks + stable tags.
  • Negative coverage: Closure callee; bad receiver; missing args.
  1. GateC parity + bootstrap
  • file/pipe × plugins ON/OFF — assert quiet/noise and rc consistency.
  • Add docs/guides/selfhost-bootstrap.md with env toggles and stepbystep.
  • Add minimal selfhost smoke that compiles a tiny program via lang→JSON→Core.

Acceptance

  • All new canaries green; no regression in existing quick/core suite.
  • Docs updated; toggles clearly listed with defaults and aliases.