<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
  <title>Doug Mealing — Writing</title>
  <subtitle>Essays on AI-first development, metadata-driven architecture, and what I&#39;m building.</subtitle>
  <link href="https://dougmealing.com/feed.xml" rel="self" />
  <link href="https://dougmealing.com/" />
  <updated>2026-06-15T00:00:00Z</updated>
  <id>https://dougmealing.com/</id>
  <author>
    <name>Doug Mealing</name>
  </author>
  <entry>
    <title>The mind that writes the model</title>
    <link href="https://dougmealing.com/writing/the-mind-that-writes-the-model/" />
    <updated>2026-06-15T00:00:00Z</updated>
    <id>https://dougmealing.com/writing/the-mind-that-writes-the-model/</id>
    <content type="html">&lt;h2&gt;I. The question the last essay left open&lt;/h2&gt;
&lt;p&gt;The &lt;a href=&quot;https://dougmealing.com/writing/llm-writes-the-model/&quot;&gt;last essay&lt;/a&gt; argued that the durable thing an AI should author isn&#39;t code and isn&#39;t a flow in someone&#39;s fixed vocabulary — it&#39;s the typed &lt;em&gt;model&lt;/em&gt; the application is generated from. Validate the model, generate the disposable code, keep the escape hatches. I stand by all of it.&lt;/p&gt;
&lt;p&gt;But stating it that cleanly leaves a question hanging that I&#39;ve been circling for a while, and it&#39;s the one this essay is about. &lt;em&gt;Who&lt;/em&gt; writes the model? In essay four the author is &amp;quot;the LLM&amp;quot; — one forward pass, one shot at getting the declaration right. That&#39;s fine for a one-time scaffold. It is nowhere near enough for what I actually want, which is software that an AI can &lt;strong&gt;build, and then keep evolving&lt;/strong&gt; as it learns what works. A single stateless model call can author a model once. It cannot maintain one. It forgets everything the moment it returns.&lt;/p&gt;
&lt;p&gt;So this essay is the other half of the bet, and it&#39;s more of a hint at what I&#39;m exploring than a victory lap on something finished. If metadata is the durable model, the interesting frontier isn&#39;t just &lt;em&gt;generating&lt;/em&gt; it once — it&#39;s putting a system in the author&#39;s seat that has memory, that learns from outcomes, and that reasons about what it knows. That&#39;s the project I&#39;ve been building alongside MetaObjects. It&#39;s called Draagon AI, and the two together are the actual thing.&lt;/p&gt;
&lt;h2&gt;II. What everyone is actually building&lt;/h2&gt;
&lt;p&gt;Look at the current generation of &amp;quot;AI builds your app&amp;quot; tools through this lens and a pattern jumps out: &lt;strong&gt;they all author once and forget.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The code-gen builders (essay four&#39;s Camp A) generate a pile of code from a prompt and discard the reasoning that produced it. The flow builders (Camp B) assemble a graph of fixed nodes and discard everything except the graph. Even the agent frameworks — the AutoGPT lineage, the plan-and-execute loops — mostly spin up a fresh context, run a task, and throw the working state away when they&#39;re done. There&#39;s no persistent model of what was built, no memory of what failed last time, no mechanism to notice that two decisions contradict each other, no way for the system to get &lt;em&gt;better&lt;/em&gt; at building the next thing because it built the last one.&lt;/p&gt;
&lt;p&gt;The artifact survives; the mind that made it evaporates. And so every build starts from zero, every mistake is available to be made again, and &amp;quot;the AI built it&amp;quot; means &amp;quot;the AI emitted it once and walked away.&amp;quot; That&#39;s not how anything that has to improve over time actually works.&lt;/p&gt;
&lt;h2&gt;III. The two halves I&#39;ve been building&lt;/h2&gt;
&lt;p&gt;I&#39;ve spent twenty-five years on one half of this without realizing it was half of anything: &lt;strong&gt;MetaObjects&lt;/strong&gt; — the typed-metadata spine, the codegen across five languages, the runtime, the drift &lt;code&gt;verify&lt;/code&gt;, the prompt pillar. The governable model. The thing essay four says the AI should author.&lt;/p&gt;
&lt;p&gt;The other half is the part I&#39;d been treating as a separate problem: a &lt;strong&gt;cognitive layer&lt;/strong&gt; that sits between an application and the LLM and gives it the things a raw model call lacks — persistent memory that learns from outcomes, a belief system that reconciles contradictions instead of storing both, and principled action selection that reasons about uncertainty rather than pattern-matching a plausible next step. (I&#39;ll keep the inside of that layer for another essay — there&#39;s real machinery in there, and some of it is the part I&#39;m least interested in handing to competitors. The point for now is the &lt;em&gt;shape&lt;/em&gt;, not the internals.) It turns a stateless text generator into something that maintains a model of the world and updates it as it goes.&lt;/p&gt;
&lt;p&gt;For a long time I built those two as if they were unrelated — one&#39;s a metadata framework, one&#39;s an agent architecture. They&#39;re not unrelated. One is the &lt;strong&gt;model&lt;/strong&gt;; the other is the &lt;strong&gt;mind that authors and maintains the model&lt;/strong&gt;. Essay four is the seam between them.&lt;/p&gt;
&lt;h2&gt;IV. Mastery: the AI builds a capability, as a model&lt;/h2&gt;
&lt;p&gt;Here&#39;s the concrete version, and it starts where most of my concrete versions start — with the game I&#39;ve been &lt;a href=&quot;https://dougmealing.com/writing/the-prompt-is-code/&quot;&gt;building characters for&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A developer says: &lt;em&gt;&amp;quot;Build me a D&amp;amp;D game master.&amp;quot;&lt;/em&gt; In the system I&#39;m describing, that isn&#39;t a code-gen prompt. It kicks off a loop that researches the domain, designs the behavior, generates the prompts, validates them, and &lt;strong&gt;iterates until the system&#39;s own model says the thing is coherent and mature&lt;/strong&gt; — not until a single pass returns. I&#39;ve been calling the result a &lt;em&gt;mastery&lt;/em&gt;: a complete, self-contained capability — its behaviors, its prompts, its tools, its knowledge, its tests — composed from a natural-language description.&lt;/p&gt;
&lt;p&gt;And the part that makes it fit this series: what the loop produces isn&#39;t an opaque blob. It&#39;s &lt;strong&gt;typed metadata&lt;/strong&gt; — the same kind of declared model MetaObjects already generates databases, APIs, and prompts from. So a mastery is &lt;code&gt;verify&lt;/code&gt;-able before it runs. It&#39;s diffable. It&#39;s portable. It&#39;s regenerable into idiomatic code in any of five languages. The cognitive system is the &lt;em&gt;author&lt;/em&gt;; the metadata is the &lt;em&gt;artifact&lt;/em&gt;; &lt;code&gt;verify&lt;/code&gt; is the &lt;em&gt;gate&lt;/em&gt;. When the developer later says &amp;quot;the combat damage rules are wrong,&amp;quot; the system doesn&#39;t need to be told what to re-edit — it detects the conflict against what it believed, figures out what cascades from the correction, and the next iteration flows toward the disturbance on its own.&lt;/p&gt;
&lt;p&gt;That is dynamic, metadata-driven app creation: not &amp;quot;type a prompt, get a frozen app,&amp;quot; but a cognitive agent that &lt;em&gt;authors a living model&lt;/em&gt;, validates it, generates from it, and keeps evolving it as it learns — with a governable spine underneath the whole time so the evolution is bounded and inspectable instead of a black box drifting in production.&lt;/p&gt;
&lt;h2&gt;V. Why the two together is the bet&lt;/h2&gt;
&lt;p&gt;Either half alone is interesting. Together they&#39;re the thing I actually believe in.&lt;/p&gt;
&lt;p&gt;MetaObjects without the cognitive author is a very good metadata framework that a human (or a one-shot LLM) drives. Draagon AI without the governable model is a clever agent that builds things you can&#39;t fully inspect, validate, or regenerate — Camp A&#39;s chaos with a better memory. But &lt;strong&gt;a cognitive system authoring a typed, validatable model&lt;/strong&gt; is the combination that has the property I care about most: &lt;em&gt;schema-safe evolution.&lt;/em&gt; The AI gets to remember, learn, and rebuild — and every change it proposes passes through &lt;code&gt;verify&lt;/code&gt; against a typed model before it touches anything real. The mind is free to evolve the system; the spine keeps the evolution honest.&lt;/p&gt;
&lt;p&gt;That&#39;s the autonomy slider from essay four made concrete. You can turn the AI&#39;s authority up — let it research, design, and compose a whole capability unsupervised — &lt;em&gt;because&lt;/em&gt; what it produces is a small, typed, reviewable model gated by validation, sitting on top of regenerable code. Crank it down and the cost is near zero, because the durable thing was the model all along. You can&#39;t run that slider over a pile of generated code or a frozen flow. You can run it over a model a mind maintains.&lt;/p&gt;
&lt;h2&gt;VI. Where this is heading&lt;/h2&gt;
&lt;p&gt;I want to be honest about what&#39;s shipped and what&#39;s horizon. MetaObjects is real and in production — the model, the codegen, the runtime, the prompt pillar, the drift gate. The cognitive layer is further along than a sketch and earlier than a launch. And &amp;quot;a cognitive system that authors and continuously evolves a governable metadata model&amp;quot; is the direction I&#39;m building toward, not a box you can buy today. This essay is the hint, not the announcement.&lt;/p&gt;
&lt;p&gt;But I&#39;ve stopped thinking of MetaObjects and Draagon AI as two projects. They&#39;re the two halves of one bet: that the future of software isn&#39;t an AI that writes code you can&#39;t govern, and isn&#39;t a tool that fills in blanks it can&#39;t escape — it&#39;s a &lt;em&gt;mind that authors a model&lt;/em&gt;, where the mind can learn and the model can be trusted. The model is the asset. The mind is the author. Validation is the contract between them.&lt;/p&gt;
&lt;p&gt;That&#39;s what I&#39;m exploring. The next essays will get more specific about how the mind half actually works — the work, as always, not the rhetoric.&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;This is the fifth essay in a series. The &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;first&lt;/a&gt; was the drift problem; the &lt;a href=&quot;https://dougmealing.com/writing/ai-stack-missing-architecture/&quot;&gt;second&lt;/a&gt; placed the metadata layer against the AI stack; the &lt;a href=&quot;https://dougmealing.com/writing/the-prompt-is-code/&quot;&gt;third&lt;/a&gt; showed the prompt is the same spine; the &lt;a href=&quot;https://dougmealing.com/writing/llm-writes-the-model/&quot;&gt;fourth&lt;/a&gt; argued the AI should author the model. This one names the mind I want in the author&#39;s seat. My writing lives at &lt;a href=&quot;https://dougmealing.com/writing/&quot;&gt;dougmealing.com/writing&lt;/a&gt;, and I&#39;m always up for a conversation about any of this — &lt;a href=&quot;https://dougmealing.com/#contact&quot;&gt;drop me a note&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The LLM should write the model, not the code</title>
    <link href="https://dougmealing.com/writing/llm-writes-the-model/" />
    <updated>2026-06-15T00:00:00Z</updated>
    <id>https://dougmealing.com/writing/llm-writes-the-model/</id>
    <content type="html">&lt;h2&gt;I. The work, not the rhetoric — again&lt;/h2&gt;
&lt;p&gt;The last essay &lt;a href=&quot;https://dougmealing.com/writing/the-prompt-is-code/&quot;&gt;turned the lens onto the prompt&lt;/a&gt; — the artifact the AI &lt;em&gt;reads&lt;/em&gt; — and argued it&#39;s code, so it deserves the same architecture the rest of your code finally got: a typed payload, a deterministic render, drift caught at build time. This essay turns the lens onto a bigger question that&#39;s been sitting underneath the whole series, and that the entire AI-builder industry is now sprinting at from two different directions: &lt;em&gt;what should the AI write?&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Not &amp;quot;should AI write software&amp;quot; — that argument is over; it does, every day, in my stack and yours. The question is what artifact the AI should produce. Because the artifact you let the model author is the artifact you have to live with. And right now the industry has split into two camps, neither of which is the one I&#39;d bet a decade on.&lt;/p&gt;
&lt;h2&gt;II. Camp A: the LLM writes the code&lt;/h2&gt;
&lt;p&gt;This is the loud camp. Lovable, v0, Bolt, Replit&#39;s agent — you describe an app, the model writes the code, you get a running thing in minutes. It is genuinely impressive, and it is the most &lt;em&gt;expressive&lt;/em&gt; possible target: code is Turing-complete, so there is nothing the model can&#39;t, in principle, produce. Want a weird animation, a bespoke pricing rule, a one-off integration? The model just writes it.&lt;/p&gt;
&lt;p&gt;The expressiveness is exactly the problem. What you get back is an opaque pile of code. It runs — until it doesn&#39;t — and when it doesn&#39;t, you are debugging a system no human designed, with no source of truth above the code that tells you what it was &lt;em&gt;supposed&lt;/em&gt; to be. There&#39;s nothing to diff against. There&#39;s nothing to validate before it runs. Change one thing and the model happily rewrites three files in locally-coherent, globally-divergent ways — the exact &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;AI drift&lt;/a&gt; I started this series on, now industrialized into a product category. The artifact is the code, and the code is ungovernable. You can read it, but you can&#39;t &lt;em&gt;reason about the system&lt;/em&gt; from it, because the system is only ever implied by a hundred-thousand tokens of generated detail.&lt;/p&gt;
&lt;p&gt;I&#39;ve built on this substrate enough to know its ceiling. It&#39;s fantastic for a demo, a prototype, the first weekend of an idea. It is a liability the moment the thing has to survive a second engineer, a refactor, a compliance review, or a year.&lt;/p&gt;
&lt;h2&gt;III. Camp B: the LLM writes the config&lt;/h2&gt;
&lt;p&gt;The quieter camp saw Camp A&#39;s governance problem and over-corrected. Here the model doesn&#39;t write code at all — it writes &lt;em&gt;configuration&lt;/em&gt;, or &lt;em&gt;flows&lt;/em&gt;, in a constrained vocabulary the platform fully controls. Dify, Langflow, n8n: the AI assembles a graph of pre-defined nodes. Google&#39;s recent generative-UI work, A2UI, has the model emit a UI described in a fixed component vocabulary the client knows how to render. The model fills in a structure; it never authors the structure.&lt;/p&gt;
&lt;p&gt;This is safe and inspectable in exactly the ways Camp A isn&#39;t. A flow is a small declarative artifact you can read, diff, and reason about. A generative UI made of known components can&#39;t render a security hole the renderer doesn&#39;t already permit. The blast radius is bounded because the vocabulary is bounded.&lt;/p&gt;
&lt;p&gt;And that bound is the whole problem. You are locked to the platform&#39;s node set, the platform&#39;s component library, the platform&#39;s idea of what an application &lt;em&gt;is&lt;/em&gt;. The moment your real requirement falls outside the vocabulary — the custom rule, the integration nobody built a node for, the behavior the component library can&#39;t express — you are stuck. There&#39;s no escape hatch into general-purpose code, because the entire safety story depended on there not being one. Camp B traded expressiveness for governance and discovered, predictably, that you need both.&lt;/p&gt;
&lt;h2&gt;IV. The seam nobody is selling: the LLM writes the &lt;em&gt;model&lt;/em&gt;&lt;/h2&gt;
&lt;p&gt;Camp A: maximally expressive, ungovernable. Camp B: governable, boxed in. Stated that way, the seam between them is obvious — and it&#39;s the one I&#39;ve spent twenty-five years building the substrate for without realizing it was the answer to this specific question.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Have the AI author the model.&lt;/strong&gt; Not the code. Not a flow in someone&#39;s fixed vocabulary. The typed metadata — the durable spine — that the application is &lt;em&gt;generated from&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;Walk the loop:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;The LLM writes typed metadata.&lt;/strong&gt; An entity, its fields, its relationships, its sources, a projection, a prompt&#39;s payload, an API surface. Declarative, typed, far smaller than the code it implies. This is the artifact the model authors — and it&#39;s an artifact a model is &lt;em&gt;good&lt;/em&gt; at authoring, because it&#39;s structured and bounded in shape while still describing real software.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;&lt;code&gt;verify&lt;/code&gt; gates it before it runs.&lt;/strong&gt; This is the move neither camp has. The metadata is validated — every reference resolves, every type is real, every required slot is filled, the relationships are coherent — &lt;em&gt;before a line of code is generated or executed.&lt;/em&gt; Camp A validates by running and seeing what breaks. Camp B validates by refusing to let you express anything risky. The model-authoring approach validates the &lt;strong&gt;declaration&lt;/strong&gt;: you catch the hallucinated field, the dangling reference, the impossible relationship at author time, on a small artifact, with a precise error — not at runtime in a pile of code, and not by being forbidden from expressing it.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Deterministic codegen produces the disposable per-language code.&lt;/strong&gt; Once the model is valid, idiomatic code falls out of it — Drizzle/Zod/Fastify for TypeScript, EF Core for C#.NET, Spring for Java, Pydantic/FastAPI for Python, Exposed for Kotlin — the same generators I&#39;ve written about, byte-checked against each other by a conformance harness. The model didn&#39;t hand-write any of it. The code is &lt;em&gt;output&lt;/em&gt;, and output is regenerable.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Turing-complete escape hatches cover the rest.&lt;/strong&gt; The ~20% the model genuinely can&#39;t express — the custom SQL view, the regex from outside the metadata, the real business logic — is hand-written code that lives in seams the generated code leaves open. Camp B has no answer here; this approach has the full power of the language exactly where you need it, &lt;em&gt;and&lt;/em&gt; a governed spine everywhere you don&#39;t.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;That&#39;s the unification: &lt;strong&gt;Camp A&#39;s expressiveness (real code, escape hatches) with Camp B&#39;s governance (a small, validatable, inspectable declaration) — and neither camp&#39;s fatal compromise.&lt;/strong&gt; The metadata is the asset; the code is regenerable; the LLM is the author of the model, not of an opaque pile of code.&lt;/p&gt;
&lt;h2&gt;V. Why metadata is the right thing to author&lt;/h2&gt;
&lt;p&gt;The deeper reason this works isn&#39;t ergonomic — it&#39;s that metadata is a fundamentally better &lt;em&gt;asset&lt;/em&gt; than generated code, on every property that matters once a system has to live past its first week:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s validatable.&lt;/strong&gt; A typed declaration can be checked against rules before it runs. A pile of code can only be checked by running it. (&lt;code&gt;verify&lt;/code&gt;, above.)&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s walkable.&lt;/strong&gt; Metadata is a graph — entities reference entities, payloads reference fields, APIs reference projections. You can traverse it, query it, reason over the whole estate. Generated code is a graph too, but an implicit one you have to &lt;em&gt;reconstruct&lt;/em&gt; by parsing; the metadata graph is explicit by construction.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s portable.&lt;/strong&gt; The same model generates idiomatic code in five languages. The code is, by definition, language-specific and non-portable — that&#39;s what makes it idiomatic. The portable thing is the spine above it.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s multi-tenant-able.&lt;/strong&gt; You can overlay tenant-specific or variant-specific metadata on a base model and regenerate, without forking the code — the pattern a pharmaceutical regulatory platform I worked on used twenty years ago to customize per customer without code changes. You cannot meaningfully overlay one pile of generated code on another.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;It&#39;s diffable.&lt;/strong&gt; A change to the model is a small, reviewable diff in a pull request — &lt;em&gt;this field&#39;s type changed, this relationship was added.&lt;/em&gt; The same change expressed as a code regeneration is a large diff across many files where the signal drowns in the noise. The metadata diff is the semantic change; the code diff is its shadow.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Generated code has none of these properties and was never supposed to. It&#39;s the disposable artifact. The whole argument of this series is that the durable layer has to live &lt;em&gt;above&lt;/em&gt; the code, and the AI-builder question is just that argument pointed at authorship: &lt;strong&gt;make the AI write the durable layer, not the disposable one.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;VI. One mechanism, three render targets&lt;/h2&gt;
&lt;p&gt;Here&#39;s the part that convinced me the seam is real and not just a nice story — and it ties straight back to &lt;a href=&quot;https://dougmealing.com/writing/the-prompt-is-code/&quot;&gt;the prompt essay&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;A data model, a &lt;em&gt;prompt&lt;/em&gt;, and a &lt;em&gt;UI&lt;/em&gt; are the same shape.&lt;/p&gt;
&lt;p&gt;Each one is a declarative template that renders a typed payload to a target, where every reference in the template must resolve against the payload&#39;s type:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A &lt;strong&gt;data model&lt;/strong&gt; renders a typed entity to a &lt;em&gt;persistence and API target&lt;/em&gt; — tables, DTOs, routes. Every field reference must resolve to a real field.&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;prompt&lt;/strong&gt; renders a typed payload to a &lt;em&gt;text target&lt;/em&gt; — the string the model reads. Every &lt;code&gt;{{variable}}&lt;/code&gt; must resolve to a real field on the payload. (This is exactly the fourth pillar I built into MetaObjects: payload-as-projection, external text, deterministic render, drift caught at build time.)&lt;/li&gt;
&lt;li&gt;A &lt;strong&gt;UI&lt;/strong&gt; renders a typed payload to a &lt;em&gt;visual target&lt;/em&gt; — a form, a grid, a view. Every bound field must resolve to a real field. This is where Camp B&#39;s generative-UI instinct is &lt;em&gt;right&lt;/em&gt; — a UI should be a declarative artifact over a known shape — except the shape shouldn&#39;t be a fixed component vocabulary you can&#39;t extend. It should be your typed model, with the same escape hatches everywhere else has.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;One mechanism — &lt;em&gt;typed payload + declarative template + reference-resolution + deterministic render&lt;/em&gt; — pointed at three different render targets. The same &lt;code&gt;verify&lt;/code&gt; that proves a prompt&#39;s variables resolve proves a UI&#39;s bindings resolve and a data model&#39;s references resolve. The same drift gate covers all three. I didn&#39;t design it this way on purpose; I built the projection-and-render machinery for entities and database views, and discovered the prompt payload was the identical shape. The UI binding is the third instance of the same pattern. When an abstraction pays for itself three times in domains you didn&#39;t design it for, it&#39;s not a coincidence — it&#39;s the seam.&lt;/p&gt;
&lt;p&gt;To be clear about where this stands: the data-model and prompt render targets ship today. The &lt;em&gt;UI-binding&lt;/em&gt; render target — having the LLM author a typed view declaration the same way it authors an entity or a payload — is where I see this heading, not something I&#39;m claiming as done. But the architecture already implies it. The mechanism is built; the third target is a matter of pointing it.&lt;/p&gt;
&lt;h2&gt;VII. The industry is arriving at the same place in its own words&lt;/h2&gt;
&lt;p&gt;This isn&#39;t a lonely position. The people thinking hardest about this are circling the same conclusion from different vocabularies.&lt;/p&gt;
&lt;p&gt;The Model-Driven Engineering research community — the academic descendants of the OMG&#39;s Model-Driven Architecture I first brushed up against in 2001 — has spent the last two years arguing, in paper after paper, that the way to use LLMs in serious software is to let them operate on &lt;em&gt;models&lt;/em&gt; with &lt;em&gt;deterministic safeguards&lt;/em&gt; around them, rather than letting them free-write code. The framing is almost word-for-word the seam I&#39;m describing: the LLM proposes; a deterministic, model-based pipeline validates and generates. The survey literature maps this ground well — Di Rocco et al.&#39;s &lt;a href=&quot;https://arxiv.org/abs/2410.17370&quot;&gt;systematic review of LLMs in model-driven engineering&lt;/a&gt; is a good entry point — and the pattern it keeps returning to is LLMs paired with deterministic, model-based safeguards. They&#39;re describing the loop in Section IV from the modeling-language side; I&#39;m describing it from the working-codegen-implementation side. Same shape.&lt;/p&gt;
&lt;p&gt;And Andrej Karpathy&#39;s &lt;a href=&quot;https://www.youtube.com/watch?v=LCEmiRjPEtQ&quot;&gt;autonomy-slider&lt;/a&gt; framing from his 2025 &amp;quot;Software 3.0&amp;quot; talk gets at the other half of it. His point: don&#39;t build the fully-autonomous agent that writes the whole thing unsupervised (Camp A&#39;s fantasy), and don&#39;t build the rigid tool that does nothing on its own (Camp B&#39;s cage) — build the system with a slider, where the human dials how much the AI does and keeps a tight verification loop around it. Authoring the &lt;em&gt;model&lt;/em&gt; is what makes that slider real for software. The model is small enough for a human to actually review at high autonomy, structured enough for a machine to validate, and the generated code below it is regenerable so the cost of turning the slider back down is near zero. You can&#39;t run a meaningful autonomy slider over an opaque pile of code — there&#39;s nothing to review at the high end and nothing to safely regenerate at the low end. You &lt;em&gt;can&lt;/em&gt; run it over a typed model.&lt;/p&gt;
&lt;p&gt;Two camps, two research traditions, one builder&#39;s decade of dogfooding — all converging on the seam between &amp;quot;AI writes the code&amp;quot; and &amp;quot;AI writes the config.&amp;quot; The seam is: &lt;strong&gt;AI writes the model.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;VIII. Where this is heading&lt;/h2&gt;
&lt;p&gt;I&#39;ve been building toward this answer the whole time without naming it. Essay one said the metadata is the spine that keeps AI-generated code coherent. Essay two placed that spine against the rest of the AI stack. Essay three showed the prompt is the same spine pointed at a text target. This essay is the through-line made explicit: if the metadata is the durable asset, then the highest-leverage thing the AI can do is &lt;em&gt;author the metadata&lt;/em&gt; — and a validate-then-generate loop around a typed model gives you Camp A&#39;s power without its chaos and Camp B&#39;s safety without its cage.&lt;/p&gt;
&lt;p&gt;Today, MetaObjects has the pieces that make this concrete: typed metadata generating idiomatic code across five languages, runtime metadata, drift &lt;code&gt;verify&lt;/code&gt;, and the prompt pillar — typed payload, declarative template, deterministic render, build-time verification. The model-authoring loop is the natural composition of those pieces with an LLM in the author&#39;s seat and &lt;code&gt;verify&lt;/code&gt; in the gate. The UI render target and the full estate-graph exposure are where I see it going next, not where I&#39;m claiming it&#39;s parked. But the architecture is built to want them, and that&#39;s usually the part that&#39;s hard.&lt;/p&gt;
&lt;p&gt;The artifact you let the AI author is the artifact you&#39;re stuck with. I&#39;d rather be stuck with a typed model I can validate, diff, port, and regenerate from than with a pile of code I can only run and pray over. After twenty-five years and a few production systems&#39; worth of evidence, that&#39;s the bet.&lt;/p&gt;
&lt;p&gt;This is the fourth essay in a series. The &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;first&lt;/a&gt; was the drift problem and the origin story; the &lt;a href=&quot;https://dougmealing.com/writing/ai-stack-missing-architecture/&quot;&gt;second&lt;/a&gt; placed the metadata layer against the rest of the AI stack; the &lt;a href=&quot;https://dougmealing.com/writing/the-prompt-is-code/&quot;&gt;third&lt;/a&gt; turned the lens onto prompts. This one asks what the AI should write at all. The next will keep following the thread — more of the work, less of the rhetoric.&lt;/p&gt;
&lt;p&gt;My writing lives at &lt;a href=&quot;https://dougmealing.com/writing/&quot;&gt;dougmealing.com/writing&lt;/a&gt;, and I&#39;m always up for a conversation about any of this — &lt;a href=&quot;https://dougmealing.com/#contact&quot;&gt;drop me a note&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The prompt is code — and yours is drifting too</title>
    <link href="https://dougmealing.com/writing/the-prompt-is-code/" />
    <updated>2026-05-22T00:00:00Z</updated>
    <id>https://dougmealing.com/writing/the-prompt-is-code/</id>
    <content type="html">&lt;h2&gt;I. The work, not the rhetoric&lt;/h2&gt;
&lt;p&gt;I ended the last essay with a promise: that the next one would dig into what AI-first development actually looks like inside a real stack — the work, not the rhetoric. This is that essay. It&#39;s about one concrete capability in MetaObjects, and it starts from a problem I made for myself.&lt;/p&gt;
&lt;p&gt;The first two essays were about generated &lt;em&gt;code&lt;/em&gt;. Essay one argued that AI-generated code is &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;locally coherent and globally divergent&lt;/a&gt; — drift — and that a metadata layer is the spine that keeps it coherent. Essay two placed that layer &lt;a href=&quot;https://dougmealing.com/writing/ai-stack-missing-architecture/&quot;&gt;against the rest of the 2025 AI stack&lt;/a&gt; — context engineering, schema-driven agents, knowledge graphs, MCP — and argued none of them is the architectural substrate the problem needs.&lt;/p&gt;
&lt;p&gt;This essay turns the same lens ninety degrees, onto something I&#39;d been ignoring: not the code the AI &lt;em&gt;writes&lt;/em&gt;, but the prompt the AI &lt;em&gt;reads&lt;/em&gt;. The prompt that drives your model is code too. And if you&#39;re building anything real on top of an LLM, your prompts are drifting in exactly the ways your generated code was drifting before you had a spine for it.&lt;/p&gt;
&lt;h2&gt;II. The drift I built into my own game&lt;/h2&gt;
&lt;p&gt;I found this the way I find most things — by making the mistake myself.&lt;/p&gt;
&lt;p&gt;I&#39;m building a game, Party Lore, where the characters are driven by an LLM. Early on, the prompt that brought a character to life was a tidy little function. A year of features later, it was a few thousand lines of &lt;code&gt;StringBuilder&lt;/code&gt; — concatenated instructions, conditionals, loops, string interpolation — spread across a handful of builder classes that each read from the database &lt;em&gt;as they built the prompt&lt;/em&gt;. That last detail is the one that should have scared me sooner: I could not produce a prompt without a live database connection. Which meant I could not unit-test a prompt at all. The single most important artifact in an AI application — the thing that determines whether the model behaves — had no tests, because it couldn&#39;t be constructed in isolation.&lt;/p&gt;
&lt;p&gt;It got worse the way these things always get worse. The same block of rules — &lt;em&gt;how a character behaves when threatened&lt;/em&gt; — was restated at a dozen call sites, each copy subtly drifted from the others after a year of edits. A large fraction of every prompt was static boilerplate, re-sent on every single turn. When I wanted to A/B-test a phrasing, I had to pull generated prompts back &lt;em&gt;out&lt;/em&gt; of the database into a one-off script, because the prompt only existed after the builder had run against live data.&lt;/p&gt;
&lt;p&gt;And then the failure that actually maps to everything I&#39;d written about drift: there was no declared shape for what a prompt needed. I&#39;d add a field to a character, wire it into the payload, and later remove the feature that used it — but the field rode along in the prompt forever, invisible bloat I paid for in tokens on every call and couldn&#39;t see. Worse, I&#39;d rename a field and a prompt would quietly degrade — no compile error, no exception, just slightly worse output that I&#39;d notice three weeks later if I was lucky. I&#39;d assumed this was just my own mess. It isn&#39;t — it&#39;s common enough now to have names: &lt;a href=&quot;https://dev.to/zywrap/why-prompt-engineering-breaks-in-production-systems-1f2d&quot;&gt;&lt;em&gt;prompt sprawl&lt;/em&gt;&lt;/a&gt; and the &lt;a href=&quot;https://dev.to/codeaholicguy/prompts-are-becoming-code-but-we-still-treat-them-like-strings-4o1j&quot;&gt;string-in-code anti-pattern&lt;/a&gt;, with a whole category of tools now rushing to triage the symptoms. Locally coherent. Globally divergent. Silent. This is &lt;em&gt;drift&lt;/em&gt;. Same disease, different organ.&lt;/p&gt;
&lt;h2&gt;III. A prompt is just (data + text + render)&lt;/h2&gt;
&lt;p&gt;Once I stopped treating the prompt as a special, mystical artifact and looked at its anatomy, it dissolved into three ordinary parts:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Data&lt;/strong&gt; — the state the prompt needs: the character, the world, the player, the recent history. A specific shape of inputs.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Text&lt;/strong&gt; — the template that arranges that data into instructions: the rules, the format, the voice.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Render&lt;/strong&gt; — the step that fuses the two into the final string the model sees.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I sat with that decomposition for a while, because I&#39;d spent twenty-five years building a system that governs exactly those three kinds of things. Typed data shapes, declared once and generated into every language. Text artifacts with references, composition, and overlays. Deterministic rendering — the same inputs producing the same output every time, identical even across language ports because a conformance suite says it must. The prompt wasn&#39;t a snowflake. It was an entity problem wearing a costume — and I already had the tool for entity problems.&lt;/p&gt;
&lt;h2&gt;IV. The fourth pillar&lt;/h2&gt;
&lt;p&gt;So that&#39;s what MetaObjects adds: &lt;strong&gt;prompt construction&lt;/strong&gt;, a fourth pillar alongside codegen, runtime metadata, and drift detection. It&#39;s the same three disciplines I&#39;ve written about, pointed at the artifacts that drive the AI itself. It maps cleanly onto the anatomy above.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The payload is a projection.&lt;/strong&gt; &lt;em&gt;(data)&lt;/em&gt; The &amp;quot;everything this prompt needs and nothing else&amp;quot; shape is declared as a metadata projection — and here&#39;s the part that convinced me the architecture was real, not just convenient. A projection is the read-only view abstraction I&#39;d built for database views: a declared set of fields, some passed through from a base entity, some aggregated, materialized as a typed value object. It turned out a prompt&#39;s payload &lt;em&gt;is&lt;/em&gt; exactly that shape. The abstraction I built for one purpose fit a completely different one without modification. When an abstraction pays for itself twice, in a domain you didn&#39;t design it for, that&#39;s the signal it&#39;s a real architectural seam and not an accident. The payload gets a generated, typed class; the fields it actually uses are now declared in one place; the bloat is visible.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;The text is external and provider-resolved.&lt;/strong&gt; &lt;em&gt;(text)&lt;/em&gt; Prompt text never lives inline in the metadata. It&#39;s addressed by a logical reference — a group, a source, a section — and a runtime-configured provider resolves that reference to actual text: a file on disk in development, a database row or a graph node in production, in the active locale. Same reference everywhere; only the provider changes. The rule block that I&#39;d triplicated across a dozen call sites becomes one fragment, defined once and included wherever it&#39;s needed.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Render is deterministic.&lt;/strong&gt; &lt;em&gt;(render)&lt;/em&gt; A logic-less Mustache engine turns &lt;em&gt;(payload + resolved text)&lt;/em&gt; into the final prompt string, and the same inputs always produce the same string. That sounds modest; it&#39;s the part that pays the bills. Deterministic render means a prompt is &lt;em&gt;snapshot-testable&lt;/em&gt; — you commit the expected output and assert against it in CI, so a tweak to a shared fragment shows up as a one-line diff in the actual prompt instead of as worse output discovered three weeks later. It means the render is &lt;em&gt;byte-stable&lt;/em&gt;, which matters more than it reads: prompt caching is exact-prefix and token-level, so a stray whitespace, a reordered attribute, or a different newline silently destroys your cache hit — and the savings on the line are real, &lt;a href=&quot;https://www.prompthub.us/blog/prompt-caching-with-openai-anthropic-and-google-models&quot;&gt;up to ~90% of input cost&lt;/a&gt; on the mostly-static prompt you re-send every turn. And because the engine is logic-less and conformance-gated, that determinism holds &lt;em&gt;across&lt;/em&gt; language ports too — no per-language helper drift, nothing executing from text that arrived at runtime. The cross-language guarantee is real; it&#39;s a consequence of the determinism, not the headline.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Drift is caught at build time.&lt;/strong&gt; &lt;em&gt;(the fourth discipline)&lt;/em&gt; Because the payload shape, the template, and the text all sit together under one model, a &lt;code&gt;verify&lt;/code&gt; step can prove — before anything ships — that every variable in a template resolves to a real field on its payload, that every required slot is filled, that the rendered prompt keeps its format tags and stays inside its token budget. The renamed field that used to degrade a prompt silently now breaks the build. The payload bloat shows up as a diff in a pull request instead of a line item on an invoice.&lt;/p&gt;
&lt;h2&gt;V. Why it had to be metadata, not a library&lt;/h2&gt;
&lt;p&gt;I could have written a prompt library — a tidy class with a &lt;code&gt;render()&lt;/code&gt; method. But a library treats a prompt as &lt;em&gt;code to call&lt;/em&gt;, and the prompt-management tools that have sprung up around this pain treat it as a &lt;em&gt;string to store&lt;/em&gt;. Neither gives you the thing I actually wanted: a prompt as a &lt;strong&gt;declared artifact with a contract&lt;/strong&gt; — a typed input shape, a verifiable template, a deterministic render — that you can check before it ships. A string registry can roll your prompt back to last week; it can&#39;t tell you the prompt references a field its payload no longer has.&lt;/p&gt;
&lt;p&gt;The cross-language guarantee — the thing I&#39;d have led with a draft ago — turns out to be the support beam, not the roof. Its everyday payoff isn&#39;t rendering one prompt in several languages at once; that&#39;s genuinely rare. It&#39;s that a conformance-gated render lets an &lt;em&gt;eval&lt;/em&gt; harness (almost always Python) produce &lt;em&gt;exactly&lt;/em&gt; the string a &lt;em&gt;production&lt;/em&gt; service (often not Python) ships. &lt;a href=&quot;https://arxiv.org/pdf/2311.11123&quot;&gt;Evaluation is supposed to run on what you actually send&lt;/a&gt;, not a curated approximation — and if your eval renders the prompt even slightly differently than prod, you&#39;re scoring a different artifact than you run. It&#39;s the same property underneath: a render you can trust to be identical — across runs, across a CI snapshot, or across a language boundary.&lt;/p&gt;
&lt;p&gt;The logical-reference indirection buys the other half. Because the text is addressed by reference and resolved by a provider at runtime, the same metadata supports a fixed file today, an A/B experiment next month, and a graph-assembled or evolutionarily-optimized prompt next year — without touching the metadata or the render engine. The metadata just points; the provider gets smarter. (The optimization end of that spectrum is non-deterministic by nature, so it lives outside the byte-identical guarantee — conformance always pins a fixed provider. The guarantee and the experimentation don&#39;t fight.)&lt;/p&gt;
&lt;p&gt;And, as with everything I build on this substrate: the generated code carries zero runtime dependency on MetaObjects. The render engine and the providers are ordinary libraries you&#39;d depend on like any other. Throw the platform away tomorrow and your prompts still render. Metadata is the architecture, never the lock-in.&lt;/p&gt;
&lt;h2&gt;VI. What this means for your stack&lt;/h2&gt;
&lt;p&gt;If you&#39;re shipping LLM features at any real scale, you probably already have this problem — you may just not have named it yet, though &lt;a href=&quot;https://www.statsig.com/perspectives/slug-prompt-regression-testing&quot;&gt;the industry is naming the pieces fast&lt;/a&gt;. The symptoms are specific:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Prompts you can&#39;t test without standing up a database, because the assembly reads from repositories as it builds.&lt;/li&gt;
&lt;li&gt;The same instruction block copy-pasted across services and agents, each copy a little different, none of them canonical.&lt;/li&gt;
&lt;li&gt;Prompts that have quietly ballooned in token cost, and nobody can tell you which fields in the payload are actually used.&lt;/li&gt;
&lt;li&gt;A schema change in one service that degrades a prompt in another, with no error to catch it — just worse output, discovered late.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of that is fixed by a bigger model, and none of it is fixed by a prompt-management SaaS that just stores and versions strings — I went through &lt;a href=&quot;https://metaobjects.dev/articles/prompts-are-code.html&quot;&gt;every major prompt platform and typed-output tool&lt;/a&gt; in a companion piece, and the typed-input, build-time-verified contract simply isn&#39;t in any of them; even OpenAI is now telling its customers to move prompts into code. It&#39;s the same architectural question I keep arriving at: &lt;em&gt;where does the contract live?&lt;/em&gt; For code, the answer was a metadata layer above the call sites that everything generates against and that drift-checks itself. For prompts, the answer is the same layer — the payload&#39;s shape declared once, the text addressed by reference, the render conformance-gated, the whole thing verified at build time. The prompt is code. It deserves the same architecture the rest of your code finally got.&lt;/p&gt;
&lt;h2&gt;VII. What&#39;s next&lt;/h2&gt;
&lt;p&gt;Prompt construction ships in MetaObjects 1.0, in all five language ports. It sits on top of the projection and persistence work that the payload depends on. The open-source platform and the spec are public at &lt;a href=&quot;https://metaobjects.dev&quot;&gt;metaobjects.dev&lt;/a&gt;, and the roadmap tracks both.&lt;/p&gt;
&lt;p&gt;This is the third essay in a series. The &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;first&lt;/a&gt; was the problem and the origin story; the &lt;a href=&quot;https://dougmealing.com/writing/ai-stack-missing-architecture/&quot;&gt;second&lt;/a&gt; placed the metadata layer against the rest of the AI stack; this one turned the lens onto the prompts themselves. The next will go further into what building AI-first on a metadata substrate looks like in practice — more of the work, less of the rhetoric.&lt;/p&gt;
&lt;p&gt;My writing lives at &lt;a href=&quot;https://dougmealing.com/writing/&quot;&gt;dougmealing.com/writing&lt;/a&gt;, and I&#39;m always up for a conversation about any of this — &lt;a href=&quot;https://dougmealing.com/#contact&quot;&gt;drop me a note&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>The 2025 AI stack and the architecture it&#39;s missing</title>
    <link href="https://dougmealing.com/writing/ai-stack-missing-architecture/" />
    <updated>2026-05-21T00:00:00Z</updated>
    <id>https://dougmealing.com/writing/ai-stack-missing-architecture/</id>
    <content type="html">&lt;h2&gt;I. The follow-up I promised&lt;/h2&gt;
&lt;p&gt;Last essay I argued that &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;AI drift&lt;/a&gt; is the architectural problem MetaObjects exists to solve. I gestured at the rest of the industry — context engineering, schema-driven agent design, knowledge-graph grounding, the Model Context Protocol — and promised a follow-up that actually engages with what each of those approaches does and where it fits. This is that follow-up. None of those approaches is the enemy. None of them, on its own, is the architecture either.&lt;/p&gt;
&lt;h2&gt;II. What the industry has been building&lt;/h2&gt;
&lt;p&gt;The 2025–2026 conversation around AI consistency has produced four distinct architectural ideas. Each is real. Each does something useful. None of them, on its own, is the architectural layer the problem actually needs.&lt;/p&gt;
&lt;h3&gt;Context engineering&lt;/h3&gt;
&lt;p&gt;A 2025 discipline focused on the &lt;em&gt;prompt-time&lt;/em&gt; problem: keeping AI agents on-task and grounded across a session by carefully constructing the context window — system prompts, retrieved documents, conversation memory, tool descriptions, recent decisions. The framing emerged in mid-2025 as a counter-discipline to &amp;quot;prompt engineering,&amp;quot; and is now treated as best-practice by tooling vendors and consultancies alike (Packmind, Lumenalta, Atlan, and many others have written it down).&lt;/p&gt;
&lt;p&gt;Context engineering is the right discipline at the prompt layer. If you&#39;re going to send a model out to do work in your system, the prompt it sees needs to be deliberate — the right system instructions, the right retrieved documents, the right history. Teams that take this seriously ship better agents than teams that don&#39;t.&lt;/p&gt;
&lt;p&gt;But what context engineering can&#39;t do is outlive the session. The careful work you put into one prompt evaporates when a different prompt fires for the same task next week. Context is a session-scoped artifact. Architecture is what survives the session — and your system needs both.&lt;/p&gt;
&lt;h3&gt;Schema-driven agent design&lt;/h3&gt;
&lt;p&gt;The practice of constraining AI agent outputs through formal schemas at tool boundaries — JSON Schema for structured outputs, OpenAPI for tool descriptions, strict typed responses. The argument: if you give the model a schema to fill in, it can&#39;t hallucinate fields or invent arguments that don&#39;t exist. Widely adopted by 2025 as a primary defense against AI-generated nonsense reaching production.&lt;/p&gt;
&lt;p&gt;Schemas at the tool boundary are genuinely useful. A model that&#39;s been told &lt;em&gt;&amp;quot;return an object with these specific fields&amp;quot;&lt;/em&gt; can&#39;t invent a field that&#39;s not on the list. Hallucinated structures get caught before they leave the agent&#39;s mouth.&lt;/p&gt;
&lt;p&gt;The problem isn&#39;t the schema; it&#39;s where the schema lives. A schema attached to one tool doesn&#39;t agree with a schema attached to another tool in the next service. Each tool&#39;s schema is locally correct; the system that uses both ends up with two definitions of the same business concept. The fix isn&#39;t fewer schemas — it&#39;s a schema that lives &lt;em&gt;above&lt;/em&gt; the tools, not inside each one.&lt;/p&gt;
&lt;h3&gt;Knowledge-graph grounding&lt;/h3&gt;
&lt;p&gt;Feeding structured domain knowledge — typically a knowledge graph of entities, relationships, and facts — to AI agents as grounding data, so they reason from your domain rather than hallucinating from priors. Long-established in regulated industries; accelerated in 2024–2025 as enterprises sought guardrails for LLM-powered agents.&lt;/p&gt;
&lt;p&gt;Knowledge graphs are how regulated industries grounded AI long before it was fashionable. If you&#39;re letting an agent reason about your domain, a graph of what&#39;s true gives it something to point at instead of priors learned from the internet. Hallucination rates drop. Audit trails get cleaner.&lt;/p&gt;
&lt;p&gt;But a knowledge graph describes the &lt;em&gt;world&lt;/em&gt;; it doesn&#39;t describe the &lt;em&gt;code&lt;/em&gt;. Generating a coherent service or a correct API requires shape, type, and behavior — the structural facts of how the software is built — and those don&#39;t live naturally in a domain knowledge graph. KGs solve grounding. They don&#39;t solve codegen.&lt;/p&gt;
&lt;h3&gt;The Model Context Protocol (MCP)&lt;/h3&gt;
&lt;p&gt;A standardized protocol introduced by Anthropic on November 25, 2024, for connecting AI agents to tools and context sources. By late 2025, MCP was adopted across the industry as the de-facto standard for letting agents reach into systems — file stores, databases, APIs, internal tools — in a uniform way.&lt;/p&gt;
&lt;p&gt;MCP is necessary infrastructure. Before it existed, every agent-to-system connection was a custom integration. After it landed, the connection layer had a standard. That&#39;s a real win.&lt;/p&gt;
&lt;p&gt;But MCP is the pipe. It defines &lt;em&gt;how&lt;/em&gt; an agent reaches into a system; it doesn&#39;t define &lt;em&gt;what shape&lt;/em&gt; the system has on the other end. You can stand up ten MCP servers in front of your stack and still have ten slightly different shapes of the same concept on the other end. The protocol is honest about this — it transports context, it doesn&#39;t author it. The thing being transported still has to come from somewhere.&lt;/p&gt;
&lt;h2&gt;III. What none of them solve&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;The architectural axis all four approaches miss.&lt;/strong&gt; Look at where each of the four lives in the stack:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Context engineering&lt;/strong&gt; sits &lt;em&gt;above&lt;/em&gt; the application, at the prompt layer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Schema-driven agent design&lt;/strong&gt; sits &lt;em&gt;above&lt;/em&gt; the application, at the tool-call contract.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Knowledge-graph grounding&lt;/strong&gt; sits &lt;em&gt;above&lt;/em&gt; the application, at the knowledge layer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;MCP&lt;/strong&gt; sits &lt;em&gt;above&lt;/em&gt; the application, at the transport layer.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of them is &lt;strong&gt;runtime substrate inside the application&lt;/strong&gt;. They&#39;re all external to the running system. They make the agent talking &lt;em&gt;to&lt;/em&gt; the system more disciplined; they don&#39;t change what&#39;s &lt;em&gt;in&lt;/em&gt; the system. That&#39;s the architectural axis the conversation keeps missing.&lt;/p&gt;
&lt;p&gt;This matters because the failures that show up in production are application-level failures. The refactor that took an afternoon now takes a sprint because AI tools can&#39;t see beyond the file they&#39;re editing. The integration that worked in staging breaks when the second service&#39;s AI-generated client doesn&#39;t quite match the first service&#39;s AI-generated server. The multi-agent system that was supposed to compose its own pipeline drifts further apart with every commit. None of those failures get fixed by a better prompt or a tighter tool schema. They&#39;re architecture problems.&lt;/p&gt;
&lt;p&gt;The industry has started calling the symptom &lt;em&gt;agent drift&lt;/em&gt;, and the empirical work backs it up — recent studies of agentic refactoring (&lt;a href=&quot;https://arxiv.org/abs/2511.04824&quot;&gt;arxiv 2511.04824&lt;/a&gt;) found that AI coding agents overwhelmingly prefer local, consistency-oriented edits over the system-level refactors humans actually do. The academics are converging on the same shape of answer: software models need to be a first-class part of AI codegen (&lt;a href=&quot;https://arxiv.org/abs/2511.02475&quot;&gt;arxiv 2511.02475, &lt;em&gt;Lost in Code Generation&lt;/em&gt;&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;What none of the industry approaches gives you is the substrate — the thing inside the application that every actor (the agent, the codegen tool, the type checker, the next engineer) reads from. The architectural layer. And it has to live &lt;em&gt;inside&lt;/em&gt; the application, not above it.&lt;/p&gt;
&lt;h2&gt;IV. Where the metadata layer fits&lt;/h2&gt;
&lt;h3&gt;Three pillars that make this not-just-codegen&lt;/h3&gt;
&lt;p&gt;MetaObjects isn&#39;t another codegen tool sitting next to Protocol Buffers, OpenAPI Generator, Smithy, or TypeSpec. Three properties separate it from anything in that category:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Whole-stack scope, not just API surfaces.&lt;/strong&gt; Protocol Buffers, OpenAPI Generator, Smithy, and TypeSpec generate API surfaces — wire formats, client stubs, server stubs. MetaObjects generates the entire application stack from one metadata model: persistence (ORM, DAOs, DTOs), UI form bindings, validation rules, MVC scaffolding, business-logic seams. The codegen scope is much wider, which means much more of the codebase derives directly from the architectural source of truth — and any compile-time safety those generated types provide covers the whole system, not just the API edge.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Runtime metadata, not just build-time output.&lt;/strong&gt; The other codegen tools stop at &amp;quot;produce code at build time.&amp;quot; In its opt-in runtime mode, MetaObjects &lt;em&gt;also&lt;/em&gt; interprets metadata at runtime. That means a substantial portion of what would otherwise be hand-written code stops needing to exist at all. Less code in the repo, less surface area for AI to drift on, less code for humans to maintain.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Customization by augmenting metadata, not by writing more code.&lt;/strong&gt; Multi-tenant configurations, regulatory variants, scenario-specific behavior: overlay metadata on the base model and the system adapts at runtime — no recompile, no redeploy, no fork. This is the pattern Liquent&#39;s pharmaceutical platform used twenty years ago, and it scales now to AI-era systems where requirements shift faster than compile cycles.&lt;/p&gt;
&lt;p&gt;Pull these three together and the math gets interesting. Less code in the repo means less code for AI to drift on. Less code means fewer places to introduce bugs. Less code means refactors propagate from &lt;em&gt;one&lt;/em&gt; place instead of a hundred. The equation I keep coming back to: &lt;strong&gt;less code = less drift = fewer bugs = faster dev.&lt;/strong&gt; That&#39;s not a marketing line; it&#39;s an architectural consequence of moving work from build-time generation into runtime interpretation.&lt;/p&gt;
&lt;h3&gt;Compatibility with the four industry approaches — not competition&lt;/h3&gt;
&lt;p&gt;The four industry approaches above are real, useful pieces of the stack. The MetaObjects bet isn&#39;t that you should abandon them; it&#39;s that they all need &lt;em&gt;something&lt;/em&gt; to read from, and that something is the metadata layer. The integration matters more than the comparison:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;With context engineering.&lt;/strong&gt; Your context pipelines need a stable source of truth for &lt;em&gt;what the system is&lt;/em&gt;. MetaObjects is what they point at. Instead of curating context per agent per session, the agent reads metadata and the context is consistent by construction.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;With schema-driven agent design.&lt;/strong&gt; Per-tool JSON Schemas and OpenAPI specs are valuable at the contract boundary — but they shouldn&#39;t be hand-maintained per tool. Generate them from MetaObjects metadata, and every tool&#39;s schema is consistent with the architectural source of truth.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;With knowledge graphs.&lt;/strong&gt; MetaObjects metadata, extended beyond entities to systems, applications, APIs, payloads, and integration boundaries, &lt;em&gt;is&lt;/em&gt; a knowledge graph of your estate. You don&#39;t need a separate KG pipeline if your metadata layer is already producing the graph.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;With MCP.&lt;/strong&gt; Expose the MetaObjects metadata graph through Model Context Protocol servers and your agents stop guessing — they navigate. MCP is the protocol; MetaObjects is what flows through it at the system level.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;None of this requires you to pick. The teams that have invested in context engineering can keep doing it — and have a stable source of truth for the context to point at. The teams that have schema-driven tool definitions can keep them — and generate them from one architectural model. The teams running MCP servers can keep them — and now have a metadata graph worth actually exposing. &lt;strong&gt;MetaObjects compounds with everything already on your roadmap; it competes with nothing.&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;V. The architectural picture&lt;/h2&gt;
&lt;p&gt;The four approaches above don&#39;t compete with the metadata layer; they sit on top of it. Roughly:&lt;/p&gt;
&lt;pre tabindex=&quot;0&quot;&gt;&lt;code&gt;┌────────────────────────────────────────────────────────────────┐
│  AI Agents · Codegen Copilots · Code Reviewers                 │  (consumers)
└────────────────────────────────┬───────────────────────────────┘
                                 │ reads from
┌────────────────────────────────▼───────────────────────────────┐
│  Tool &amp;amp; Context Protocols                                      │
│  MCP · OpenAPI · JSON Schema · context engineering pipelines   │  (transport)
└────────────────────────────────┬───────────────────────────────┘
                                 │ consumes
┌────────────────────────────────▼───────────────────────────────┐
│  MetaObjects Metadata Graph                                    │
│  Entities · Systems · APIs · Payloads · Workflows · Roles      │  (ARCHITECTURE)
└────────────────────────────────┬───────────────────────────────┘
                                 │ generates / interprets
┌────────────────────────────────▼───────────────────────────────┐
│  Generated Application Code (no runtime dependency on          │
│  MetaObjects unless you opt into runtime mode)                 │
│  Persistence · DAOs · DTOs · UI bindings · MVC · Validation    │  (output)
└────────────────────────────────────────────────────────────────┘
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The diagram makes the point the comparison-essays usually miss. Every approach the industry is rallying around — context engineering at the top, protocols and contracts in the middle, agents consuming all of it — needs the metadata layer underneath. Without it, each of those layers is improvising its own answer to &lt;em&gt;what shape the system has&lt;/em&gt;, and the answers keep diverging.&lt;/p&gt;
&lt;p&gt;Once metadata extends beyond entity definitions to systems, applications, APIs, payloads, and integration boundaries, the metadata layer naturally constructs a graph of the entire estate. Expose that graph through MCP servers, and your AI agents stop guessing — they navigate the architecture itself. The same metadata that drives codegen at build time and behavior at runtime now drives agent reasoning at inference time. Three uses, one source.&lt;/p&gt;
&lt;p&gt;The open-source platform gives you the architectural pattern and the working generators.&lt;/p&gt;
&lt;h2&gt;VI. Where to start&lt;/h2&gt;
&lt;p&gt;If you&#39;re shipping AI-generated code at scale and you don&#39;t have a canonical metadata layer, you have three real choices.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Build it yourself.&lt;/strong&gt; Plenty of teams have, in pieces — a shared types package, a common contracts library, a homegrown schema registry. It works until the next service team decides their needs are different enough to fork. The discipline is hard to hold without a generator behind it.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Adopt the pattern.&lt;/strong&gt; The architectural pattern matters more than any specific tool. MetaObjects is one expression. Smithy and TypeSpec are narrower expressions at the API layer. OMG MDA is a broader expression at the modeling-language layer. Salesforce&#39;s metadata-driven platform is a commercial expression at the multi-tenant SaaS layer. Pick one. Stay disciplined.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Or ignore it and pay later.&lt;/strong&gt; Drift compounds. Refactors get harder. You spend more time reconciling AI-generated code than you saved generating it. Eventually you build the layer anyway, only with technical debt as the foundation. I&#39;ve watched it happen at scale; I&#39;m not interested in watching it happen again.&lt;/p&gt;
&lt;p&gt;If you&#39;re thinking through this for your own organization, I&#39;m always up for a conversation — &lt;a href=&quot;https://dougmealing.com/#contact&quot;&gt;drop me a note&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;VII. What&#39;s next&lt;/h2&gt;
&lt;p&gt;This essay is the second in a series. The first laid out &lt;a href=&quot;https://dougmealing.com/writing/metaobjects-ai-drift/&quot;&gt;the problem and what I&#39;m building&lt;/a&gt;. This one positions the work in the broader industry conversation. The next will dig into what AI-first development actually looks like inside an enterprise stack — the work, not the rhetoric.&lt;/p&gt;
&lt;p&gt;If you want to follow along, my writing lives at &lt;a href=&quot;https://dougmealing.com/writing/&quot;&gt;dougmealing.com/writing&lt;/a&gt;.&lt;/p&gt;
</content>
  </entry>
  <entry>
    <title>I thought AI killed MetaObjects. Then AI drift made it essential.</title>
    <link href="https://dougmealing.com/writing/metaobjects-ai-drift/" />
    <updated>2026-05-20T00:00:00Z</updated>
    <id>https://dougmealing.com/writing/metaobjects-ai-drift/</id>
    <content type="html">&lt;h2&gt;I. One model, the whole stack&lt;/h2&gt;
&lt;p&gt;I started building MetaObjects in 2001 because the same patterns kept repeating across every consulting project I shipped. The data model needed persistence. The services needed DAOs and DTOs. The forms on the UI needed field bindings and validation. The MVC plumbing needed to know about all of it. Hand-rolling all that for every project was tedious — and the ORMs that would later become standard (Hibernate, JPA) didn&#39;t exist yet to even take &lt;em&gt;part&lt;/em&gt; of that work off my plate.&lt;/p&gt;
&lt;p&gt;So I built something that read a single metadata definition and generated the whole stack: persistence layer (ORM, DAOs, DTOs), UI form bindings, validation rules, MVC scaffolding. Define the entity once; let the generators produce the layers around it. (It was originally called ItemManager and Items. The shape of it mattered more than what I called it.)&lt;/p&gt;
&lt;p&gt;The pattern wasn&#39;t novel even then. OMG was formalizing Model-Driven Architecture as a standard the same year, and Salesforce was building its multi-tenant platform on metadata-driven principles. What I had was a working, code-generating implementation I could use on real consulting engagements — not a standards document.&lt;/p&gt;
&lt;p&gt;As I used it on more projects, the same foundation turned out to be great for &lt;strong&gt;two very different problems&lt;/strong&gt;:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Speed at inception — and at every refactor.&lt;/strong&gt; On startups and greenfield projects, MetaObjects let me move from idea to working software fast. Define the model; get persistence, APIs, forms, validation, and the MVC plumbing wired up around it. And refactoring stayed just as fast: when a pattern needed to change across every layer of the system, I updated the generator once and regenerated — no manual sweep across files, no half-migrated code. The whole system absorbed the improvement at once. The same tool that shipped Sendside&#39;s Salesforce-integrated secure messaging platform also shipped a credit card processing gateway and a high-uptime online poker platform — all rapidly, all on the same metadata substrate.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Alignment at scale.&lt;/strong&gt; When those systems grew, MetaObjects kept their data models coherent across teams and services. On the enterprise side — Liquent&#39;s pharmaceutical regulatory platform at PAREXEL, where multi-tenant configurations customized the system for different pharma customers without code changes by overlaying customer-specific metadata on the base model; and the Logical Content Store at Cengage — the same metadata foundation that gave projects speed at inception kept them coherent as they grew.&lt;/p&gt;
&lt;p&gt;I never marketed MetaObjects. It was the unfair advantage I used to ship faster and keep things consistent on the work I was already doing. For two decades it lived inside my client engagements and my own products, quietly doing its job.&lt;/p&gt;
&lt;h2&gt;II. Why I set MetaObjects aside&lt;/h2&gt;
&lt;p&gt;By 2022, my job had changed shape. I was leading large engineering organizations — Chief Software Architect, then Divisional CTO at Cengage — and the work that filled my days was strategy, architecture decisions, M&amp;amp;A diligence, building leaders. Not writing the code. MetaObjects had always been my tool for shipping fast and refactoring fast, and I wasn&#39;t shipping or refactoring anymore.&lt;/p&gt;
&lt;p&gt;Around the same time, low-code platforms were getting good in the enterprise. I spent serious time with &lt;strong&gt;Boomi&lt;/strong&gt; on the integration side and &lt;strong&gt;OutSystems&lt;/strong&gt; on the application side, and what I noticed was that both were essentially metadata-driven development solutions in vendor packaging. The same architectural idea I&#39;d been using privately for two decades — define the model, let the platform generate the layers around it — productized and sold as a category.&lt;/p&gt;
&lt;p&gt;There was a trap, though. The low-code platforms gave you the speed by owning your runtime. Your application lived inside their world. You paid in proprietary lock-in. MetaObjects had always been the opposite — it generates code you own, and that generated code has zero runtime dependency on MetaObjects itself. Throw the platform away and your code keeps running.&lt;/p&gt;
&lt;p&gt;Then AI arrived. The codegen story looked promising — models that could generate consistent code on demand. I noticed early signs of drift in the outputs but figured the AI vendors would solve it. Schema awareness, project-wide context, multi-file consistency: these felt like obvious next features. MetaObjects, for that stretch, was something I&#39;d planned to mothball.&lt;/p&gt;
&lt;h2&gt;III. The drift didn&#39;t get solved&lt;/h2&gt;
&lt;p&gt;It showed up in my own side projects first.&lt;/p&gt;
&lt;p&gt;I&#39;d ship a feature in one part of a project with AI assistance. The next week, I&#39;d add another feature elsewhere with AI assistance and notice that the model had generated a &lt;em&gt;different&lt;/em&gt; representation of the same concept than it had the week before. Different field names. Different types for the same logical identifier. Plausible APIs that referenced functions that didn&#39;t quite exist the way they were called.&lt;/p&gt;
&lt;p&gt;Inside any single AI-assisted session, the code was internally coherent. Across sessions — across files, across services, across the &lt;em&gt;same project&lt;/em&gt; — the consistency broke down. Each generation was locally correct and globally divergent.&lt;/p&gt;
&lt;p&gt;Others have called variants of this &lt;strong&gt;context drift&lt;/strong&gt;, &lt;strong&gt;prompt drift&lt;/strong&gt;, or &lt;strong&gt;agent drift&lt;/strong&gt;. I think of the system-level version, the one MetaObjects is positioned against, as &lt;strong&gt;AI drift&lt;/strong&gt;: code that&#39;s locally coherent inside the prompt that produced it but globally divergent across the system that contains it. AI agents and AI-assisted humans both produce drift. Multi-agent systems amplify it. The more AI you ship in a codebase, the further the drift goes.&lt;/p&gt;
&lt;p&gt;Then I started seeing the same drift at CareMetx, where AI-assisted development is embedded across our engineering organization. Different engineers, different sessions, different prompts: the same local coherence and global drift, just at organizational scale.&lt;/p&gt;
&lt;p&gt;The refactoring problem makes it worse. Changing a pattern across many files with AI assistance is painful — the model rewrites locally and can&#39;t keep the rest of the system coherent. Big refactors that used to be &amp;quot;update the metadata template, regenerate the system&amp;quot; are now &amp;quot;manage a hundred locally-correct diffs that don&#39;t add up to a coherent change.&amp;quot; Drift compounds when you try to clean it up.&lt;/p&gt;
&lt;p&gt;The industry is talking about it — context engineering, schema-driven agent design, MCP, the 2025 wave of agent-drift papers. None of that conversation has produced an architectural solution at the system level yet. I can no longer wait for them to do it.&lt;/p&gt;
&lt;h2&gt;IV. The realization&lt;/h2&gt;
&lt;p&gt;I was looking at the wrong problem in 2022.&lt;/p&gt;
&lt;p&gt;I had thought AI would absorb the work metadata-driven dev was doing, because AI could generate code. But the problem MetaObjects was solving was never &amp;quot;generating code.&amp;quot; The problem was &lt;strong&gt;keeping generated code coherent at a global level across a system that grows&lt;/strong&gt; — and making that system easy to refactor when patterns change. AI generates beautifully at the local level. It has no native mechanism for global coherence, and the vendors aren&#39;t building one.&lt;/p&gt;
&lt;p&gt;Metadata is the missing mechanism. Define the entity once. Tell the AI to generate against that fixed definition in every service that consumes it. The schema isn&#39;t recreated; it&#39;s referenced. Outputs stay coherent across languages, services, and multi-agent systems because every actor generating code is reading from the same anchor. And when the pattern needs to change, you change the metadata template once and regenerate — the refactor is bounded and reversible instead of a hundred AI diffs to chase.&lt;/p&gt;
&lt;p&gt;This isn&#39;t a lonely observation. The 2025 conversation around context engineering, schema-driven agent design, and knowledge-graph grounding all gesture at the same thing: AI needs structured context to stay coherent. The MetaObjects framing is sharper: the metadata layer is &lt;strong&gt;architectural&lt;/strong&gt;, not a per-prompt tactic. It&#39;s where the schema &lt;em&gt;lives&lt;/em&gt;, not what you paste in. I&#39;ll dig into how MetaObjects compares to each of those approaches in a follow-up essay.&lt;/p&gt;
&lt;p&gt;And once metadata is the architectural spine, it doesn&#39;t stop at entity definitions. Extend it to systems, applications, APIs, payloads, and integration boundaries, and the metadata naturally constructs a graph of the estate. Expose that graph through the Model Context Protocol, and your AI agents stop guessing — they navigate.&lt;/p&gt;
&lt;p&gt;And this isn&#39;t a case for replacing AI with metadata. It&#39;s the opposite. &lt;strong&gt;AI is a far better consumer of metadata than humans ever were.&lt;/strong&gt; What used to take careful template engineering to get from a schema to type-safe Java now happens through a model that reads the schema, understands the context, and produces idiomatic code in any language you ask for. The metadata is the substrate. AI is the generator. Together, they compound — coherence at scale &lt;em&gt;and&lt;/em&gt; speed at refactor.&lt;/p&gt;
&lt;p&gt;That&#39;s when I decided to bring MetaObjects back, AI-first this time. Starting with TypeScript — because that&#39;s where the AI codegen tooling lives now — and expanding to Java, Kotlin, C#.NET, and Python.&lt;/p&gt;
&lt;h2&gt;V. What the new MetaObjects does about it&lt;/h2&gt;
&lt;p&gt;&lt;strong&gt;TypeScript-first.&lt;/strong&gt; The original was Java-centric because that&#39;s where the consulting work lived in 2001. The new reference implementation is TypeScript — that&#39;s where the AI codegen tooling lives now (the Model Context Protocol, developer copilots, agent frameworks all assume or interoperate cleanly with TypeScript), and TypeScript&#39;s type system is expressive enough to be the schema language without losing fidelity when it maps to other languages.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Cross-language code generation.&lt;/strong&gt; Generators for TypeScript, Java, Kotlin, C#.NET, and Python ship today. The same metadata defines a model that becomes idiomatic code in each language: not a Java-shaped object squashed into other languages, but type-shaped output that fits where it lands.&lt;/p&gt;
&lt;p&gt;Cross-language codegen from a schema is not new — Protocol Buffers, OpenAPI Generator, AWS Smithy, and Microsoft TypeSpec all do versions of this. The difference is scope. Those tools generate &lt;strong&gt;API surfaces&lt;/strong&gt;: wire formats, client stubs, server stubs. MetaObjects generates the &lt;strong&gt;whole application stack&lt;/strong&gt; from one metadata model — persistence, DAOs, DTOs, UI form bindings, validation rules, MVC scaffolding, business-logic seams. Same architectural principle, much wider footprint.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Runtime metadata, not just compile-time.&lt;/strong&gt; Most codegen tools stop at &amp;quot;produce code at build time.&amp;quot; In its opt-in runtime mode, MetaObjects also uses metadata &lt;em&gt;at runtime&lt;/em&gt; — which means a lot of what would otherwise be hand-written code stops needing to exist at all. Less code in the repo. Less code for AI to drift on. Less code for engineers to maintain. &lt;strong&gt;Less code = less drift = fewer bugs = faster dev.&lt;/strong&gt; That equation is the lesson I kept relearning for two decades.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Codegen for compile-time safety.&lt;/strong&gt; Where MetaObjects does generate code, it generates &lt;em&gt;concrete entities&lt;/em&gt; engineers (and AI agents) write business logic against. When the underlying metadata changes, the regenerated entities change with it — and any logic written against the old shape breaks at compile time. The breakage is the feature: it surfaces drift before it ships, and it does so with the engineer&#39;s existing toolchain — type checker, linter, IDE.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Customization by augmenting metadata, not by writing code.&lt;/strong&gt; For advanced uses — multi-tenant customization, regulatory variants, A/B configurations — metadata can be overlaid on the base model without compiling or changing the generated code. This is how Liquent&#39;s pharmaceutical platform customized for different pharma customers without code changes. It&#39;s how the same pattern scales now to AI-era systems where requirements shift faster than compile cycles.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;A conformance harness across languages.&lt;/strong&gt; Generators are useless if they drift from each other. MetaObjects has a conformance harness that validates outputs across all five supported languages — the generated code from the same metadata behaves the same way in each. When AI tools generate code that consumes this metadata, the harness catches drift before it ships.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Built to feed metadata to AI.&lt;/strong&gt; The format is structured for LLM context. Your AI agents read metadata, your generators read metadata, your code reviewers read metadata. Every actor in the development loop is referencing the same anchor, in a form the models can use as input.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;No lock-in.&lt;/strong&gt; The lesson I took from Boomi and OutSystems is that the value proposition of metadata-driven development only holds if you also own your runtime. Generated code has &lt;em&gt;zero&lt;/em&gt; runtime dependency on MetaObjects; only the opt-in runtime mode uses the MetaObjects runtime library. Throw the platform away tomorrow and your generated code keeps running. Metadata is the architecture; not a vendor moat.&lt;/p&gt;
&lt;h2&gt;VI. What this means for your codebase&lt;/h2&gt;
&lt;p&gt;If you&#39;re shipping AI-generated code at scale, you may already be seeing the drift problem — you may not have named it yet. The symptoms are recognizable.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The same entity has multiple representations across services, generated by different teams using different AI tools at different times. Nobody owns the canonical form.&lt;/li&gt;
&lt;li&gt;Type definitions drift at integration boundaries. Tests pass within services and fail across them.&lt;/li&gt;
&lt;li&gt;AI-generated API clients call endpoints that don&#39;t quite exist, or call them with slightly wrong shapes.&lt;/li&gt;
&lt;li&gt;Schema changes ripple unpredictably. A field added in one service requires negotiations with downstream teams that didn&#39;t know they were downstream.&lt;/li&gt;
&lt;li&gt;You spend more time reconciling AI-generated code than you saved generating it.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;If any of that sounds familiar, the fix isn&#39;t bigger models. It isn&#39;t better prompts. It is an architectural decision about where your schema lives and what your AI tools generate against. The metadata layer is the smallest viable solution to a problem that gets worse the more AI you ship.&lt;/p&gt;
&lt;p&gt;You can build that layer yourself. Plenty of teams have, in pieces, usually in the form of a &amp;quot;shared types package&amp;quot; or a &amp;quot;common contracts library.&amp;quot; Those work until the next service team decides their needs are different enough to fork. The discipline is hard to maintain when the code is hand-written. With a metadata-driven generator, the discipline is enforced by the architecture: there is no &amp;quot;their&amp;quot; schema; there is only &lt;em&gt;the&lt;/em&gt; schema, and every team&#39;s code is generated from it.&lt;/p&gt;
&lt;p&gt;MetaObjects is one expression of this idea. It happens to be the one I built. I would rather you adopt the pattern in any form than not adopt it at all.&lt;/p&gt;
&lt;h2&gt;VII. What&#39;s next&lt;/h2&gt;
&lt;p&gt;MetaObjects is shipping now. The open-source platform lives at &lt;a href=&quot;https://metaobjects.dev&quot;&gt;metaobjects.dev&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;There&#39;s more I&#39;m building on top of this foundation — including a cognitive-architecture framework called Draagon AI that I&#39;ll write about separately once it&#39;s ready to discuss publicly. The product family I&#39;m shipping (Party Lore, FeltBots, the Michael Frank training platform, others coming) all sit on MetaObjects as their substrate. The dogfooding is the point.&lt;/p&gt;
&lt;p&gt;I&#39;ll write more about what AI-first development actually looks like inside an enterprise stack and how the metadata layer composes with the rest of the system. If you want to follow along, my writing lives at &lt;a href=&quot;https://dougmealing.com/writing/&quot;&gt;dougmealing.com/writing&lt;/a&gt;, and I&#39;m open to conversations — drop me a &lt;a href=&quot;https://dougmealing.com/#contact&quot;&gt;note&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Updated October 2026: MetaObjects reached its 1.0 standard in September 2026, with generators for TypeScript, Java, Kotlin, C#.NET, and Python. Version and language details in this essay reflect that release.&lt;/em&gt;&lt;/p&gt;
</content>
  </entry>
</feed>