Cross-Plan Coordination
Goal
Prevent plans/native-backend from cloning LLVM wiring or target/ABI policy, and
freeze the separate compiled-codegen versus runtime-execution selector axes used by
plans/bytecode-vm.
Context
At plan creation, plans/native-backend proposed mirroring oric’s LLVM wiring
with compile_to_native_* twins, while plans/bytecode-vm proposed a competing
BackendChoice name for execution selection. Those source contracts are now
amended: native-backend consumes the shared codegen interface, and bytecode-vm owns
the separate ExecutionBackend axis. This section preserves the mechanical
dependency and pins those resolved decisions so later execution cannot regress to
the historical forks.
Implementation sketch
- Via the sanctioned plan-corpus API (never a raw metadata edit), verify or add a
cross_plan_needsentry onplans/native-backend’s driver-integration section referencing this plan’ss-90024726section. The owning orchestrator executes the structural mutation. - Keep
plans/native-backend’s driver integration onori_codegen::CodegenBackendover explicitExecutableProgram + TargetSpec + CompiledLayoutPlan. Backend-private BIR/MIR remains internal; typed native-object or complete-WASM finalization returns the commonEmittedArtifact, sooricdoes not grow native-specific orchestration. - Require
plans/bytecode-vmto useExecutionBackend { Vm, Compiled(CodegenBackendChoice) }for run/test routing.CodegenBackendChoice { Llvm, Native }remains scoped to compiled codegen, and the VM never implements it.
Spec references
.claude/rules/routing.md §5 (cross-plan ordering primitives); state-discipline.md §5 (plan-altering changes edited same-turn as the decision).
Work items
- Verify the sanctioned
cross_plan_needsedge on native-backend driver integration and pin its explicit input plus typed artifact-finalization conformance toori_codegen::CodegenBackend; reject orchestration, layout, ABI, or post-codegen artifact forks. - Freeze the
ExecutionBackendversusCodegenBackendChoiceownership split inplans/bytecode-vmand add an architecture pin proving VM is not accepted by compiled-codegen dispatch.