I’ve been working on AI-powered JIT compilation recently, which in turn led me to test several “autonomous” AI coding agents for research. The pattern across the board is strikingly consistent: impressive demos masking a disappointing reality.
One agent took 9 hours to fix a simple configuration bug, blindly claiming “Fixed!” multiple times without ever actually validating its work. Another wasted 11 commits rewriting documentation when I had explicitly asked for a bug fix.
These failures aren’t just flukes; this is symptomatic of a fundamental problem: the industry is obsessed with building prompt orchestration when what we actually need right now is governed execution.
Prompts Are Suggestions. Hooks Are Enforcement.
The current generation of AI coding tools follows a simple pattern:
- User describes intent
- LLM generates code
- Write to file
- Ship it blind
- User discovers it doesn’t work (hopefully)
- Repeat (eventually)
This works for demos. It fails in production. Because LLMs don’t generate clean, correct, production-ready code on the first try. They generate verbose, messy, sometimes-broken code that looks right but hasn’t been validated.
The industry response has been “better prompts” and “bigger models.” But that’s optimizing the wrong layer. The problem isn’t the quality of generation. The problem is the absence of governance.
What I Built Instead
Over the past year I’ve been building LAIRD, a rogue-like that uses LLM-generated content for combat text, enemy descriptions, and now AI-Powered JIT Compilation for semantic modding. Players can type natural language like “set all XP rewards to a random number” and the game generates, validates, compiles, and executes governed code (in around a minute).
Here’s what that actually looks like:
csharp
// Player typed: "set to (random number between 0 and 9999) all XP rewards"
// LLM generated this class:
public class Mod_000024A4 : IGeneratedInterceptor
{
public string CommandType => "GainXPCommand";
public int Seed => 9380;
public bool ShouldIntercept(ModExecutionContext ctx)
{
return ctx.GetInt("XPAmount") > 0;
}
public InterceptResult Intercept(ModExecutionContext ctx)
{
int newXP = ctx.Roll(0, 9999);
ctx.SetInt("XPAmount", newXP);
return InterceptResult.Modified();
}
}
The Architecture: AI-Powered JIT Compilation
What I’ve built is a four-layer validation pipeline; it’s essentially an AI-powered JIT compiler for runtime code generation:
Layer 1: Semantic Compilation (LLM)
- Natural language -> C# source code
- Model-agnostic (works with Qwen 9B, Claude, GPT, whatever)
- LLM is the semantic frontend, not the execution layer
Layer 2: Static Analysis (Compile-Time)
- Roslyn Analyzer SKILL005 detects and removes unused local variables
- Other analysis rules enforce patterns and catch LLM mistakes
- Dead code stripped before compilation
Layer 3: Contract Validation (Compile-Time)
- Must implement
IGeneratedInterceptorinterface - Type-safe context access via
ModExecutionContext - Roslyn compilation enforces contracts
- Won’t compile if it violates the type system
Layer 4: Runtime Governance
ShouldIntercept()validation gate determines if code executes- Deterministic execution via seeded randomness
- Audit trails record what happened
- SKSE-style event interception for controlled hooks
This isn’t “better prompts.” This is a compiler pipeline where the LLM is the frontend semantic layer for modding and governance is enforced at every stage.
Example: How SKILL005 Works
LLMs love to generate unnecessary code. Here’s what the LLM originally generated for that XP mod:
csharp
int originalXP = ctx.GetInt("XPAmount"); // Never used!
int newXP = ctx.Roll(0, 9999);
ctx.SetInt("XPAmount", newXP);
SKILL005 is a static analysis rule that detects unused local variables. It flagged originalXP, and StripDeadLocals() removed it before compilation. The LLM generated messy code. The governance layer cleaned it up automatically.
This is one of several analysis passes. The full pipeline ensures that what ships to players is clean, validated, type-safe, and deterministic even though it started as stochastic output.
The Dijkstra Convergence
I built this architecture from first principles: game development requirements, production constraints, 30+ years of shipping code. I needed player mods to be safe, deterministic, and unable to break core game systems.
Only after building it did someone point me to Dijkstra’s EWD667 critique of natural language programming from 1978. He argued that natural language can’t work for programming because it lacks formal semantics, type safety, and verification capabilities.
His solution: don’t do it.
My accidental solution: just add constraints.
I independently converged on his requirements from a completely different domain. When two people solve the same problem independently and arrive at the same answer, that answer is probably correct. The semantic mod builder architecture isn’t arbitrary, it’s the necessary solution to governed LLM code generation.
The Moat: Why This Is Defensible
I’ve been asked what makes semantic mod builder defensible when basically anyone can call an LLM API. The answer is simple: the moat isn’t the generation, it’s the governance.
What’s hard to replicate:
- Contract system design (
IGeneratedInterceptor,ModExecutionContext) - Static analysis rules (SKILL005 and company)
- Deterministic execution architecture (seeded state)
- Runtime validation gates
- Audit trail system
- Making it all work together
What’s easy to adopt:
- Works with any LLM (model-agnostic)
- Natural language input (accessible to non-programmers)
- Players don’t see the complexity
- Just works (deterministic guarantees)
This is a moat, not a wall. Hard for competitors to replicate the governance architecture. Easy for users to use the results.
Compare to “proprietary workflow that is hard to replicate” – that’s a wall. It’s hard to replicate because it’s narrowly specific. It limits adoption rather than protecting market share. I never learned Assembly for the same reason: specificity that becomes a ceiling, not a foundation.
The Market Is Moving This Direction
While I’ve been building this, the market has been validating the approach:
NVIDIA backed Reflection AI at $2.5B (January 2026) – open source models, consumer deployment, local inference. Not closed APIs and no data center dependency.
Mistral raised €600M (December 2023 + follow-ons) – European AI company releasing open source models (Mistral 7B, Mixtral 8x7B, etc.). Valued at $6B+. Not betting on regulatory moat – betting on better open models.
The political landscape shifted – the regulatory capture bet (restrict models to “approved providers” charging premium prices) requires regulations that this administration won’t implement. NVIDIA just invested $2.5B ensuring they don’t. Jensen Huang met with the president and discussed chip controls, argued against restrictive AI regulations. CNBC reported he “hits regulation.”
I’m not building for the world where AI access is restricted to subsidized API providers at $500/month. I’m building for the world where governance runs locally on consumer hardware with model-agnostic primitives that work with whatever inference backend you choose.
That’s the bet NVIDIA just made with $2.5B. I made it a year ago with LlamaBrain.
What This Means
The industry is at a crossroads:
Path A: Regulatory Capture
- Restrict access to “advanced” models
- Approved providers charging premium pricing
- Dependency on centralized APIs
- Pray subsidized inference pricing continues (it wont)
Path B: Governed Local Execution
- Open source models improving rapidly
- Consumer hardware deployment
- One-time hardware cost vs perpetual API rental
- Governance as the differentiator, not model size
I chose Path B before I knew NVIDIA had too. That convergence suggests it’s the right bet.
The Proof of AI-Powered JIT Compilation
This isn’t theory. LAIRD is shipping soon. Players are going to be using semantic mods. The code I showed above is real, compiled, and executing deterministically in manual integration tests.
What’s Next for AI-Powered JIT Compilers
I’m already working on plans for the sequel to LAIRD. The first game will be releasing on itch very soon. I’m doing all of this on a 9B local model that can run on five year old hardware.
If you’re building AI coding tools and wondering why your agent takes 9 hours to fix simple bugs, the answer is governance. You’re generating without validating. Prompting without enforcing. Suggesting without governing. You might as well be spending tokens on a slot machine.
Prompts are suggestions. Hooks are enforcement.
I’ve built the hooks. They work. They’re shipping. And I can prove it.