← Latest papers
🤖 AI

Governed Metaprogramming for Intelligent Systems: Reclassifying Eval as a Governed Effect

This paper proposes "governed metaprogramming," a language design that reclassifies the unrestricted `eval` primitive into a governed effect requiring structural inspection and policy compliance before materializing symbolic forms into executable code, thereby ensuring safety and authority control in self-modifying AI systems.

Original authors: Alan L. McCann

Published 2026-05-27
📖 4 min read☕ Coffee break read

Original authors: Alan L. McCann

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a very smart robot assistant that can write its own instructions. It can look at a problem, think about it, and then type out a new set of rules for itself to follow.

In the old world of programming, if this robot wrote a new set of rules, the computer would just say, "Okay, I'll run them right now." It wouldn't ask, "Wait, are these rules safe? Do they try to steal your bank password? Do they try to delete your files?" The computer treated the act of turning written words into action as a magic button that always worked.

This paper argues that for AI systems that can rewrite themselves, that "magic button" is dangerous. The author, Alan L. McCann, proposes a new way to handle this called Governed Metaprogramming.

Here is the core idea, broken down with simple analogies:

1. The Problem: The "Magic Button" is Broken

Think of a computer program like a recipe.

  • The Code: The written recipe (the ingredients and steps).
  • The Execution: The act of cooking the meal.

In traditional systems, if you write a new recipe on a piece of paper, you can immediately hand it to the chef, and the chef starts cooking. The paper-to-cooking transition is instant and unrestricted.

But in modern AI, the "chef" (the AI) can write new recipes while it is cooking. If the AI writes a recipe that says "Eat the whole kitchen," and the system just lets it cook immediately, disaster happens. The paper calls this transition "Authority Amplification." It's the moment a piece of paper (data) suddenly gets the power to change the real world (execute).

2. The Solution: The "Security Guard" for Recipes

The paper suggests we stop treating the act of turning a recipe into a meal as a simple computer function. Instead, we treat it as a governed effect—a special action that requires a security guard's approval.

The system introduces a new concept called Machine Forms.

  • Machine Forms are like blueprints or diagrams of the recipe. They are just data. They can't cook anything. They can't call a phone number. They are just pictures of instructions.
  • Manipulating Blueprints (drawing on them, erasing lines, combining two blueprints) is safe. It's like a child playing with Legos. No real-world damage can happen just by moving the plastic bricks around.

3. The Critical Step: "Materialization"

The dangerous moment is called Materialization. This is when you take the blueprint and say, "Okay, build this."

In this new system, you cannot just say "Build this." You have to hand the blueprint to a Governance System (the Security Guard). The Guard does three things before letting the chef cook:

  1. Inspects the Blueprint: Does this recipe try to use a forbidden ingredient (like a dangerous AI model)?
  2. Checks the Rules: Does this recipe fit within the budget? Does it try to access files it shouldn't?
  3. Decides: If it passes, the Guard gives the "Go" signal. If it fails, the blueprint is thrown in the trash.

4. Why This Matters for Self-Improving AI

Imagine an AI that wants to get smarter. It looks at its own code, realizes it's bad at math, and writes a new version of itself that is better at math.

  • Without this system: The AI writes the new code, hits "Run," and suddenly the new code has full power. If the AI made a mistake or was tricked, it could accidentally give itself the power to delete everything.
  • With this system: The AI writes the new code (the blueprint). It then has to ask the Security Guard, "Can I become this new version?" The Guard checks the new code. If the new code tries to do something the AI isn't allowed to do (like access a secret database), the Guard says "No." The AI cannot bypass the guard, even if it wrote the code itself.

The Big Takeaway

The paper claims that eval (the command that turns code into action) is not just a tool; it is a power grant.

By reclassifying it as a "governed effect," the system ensures that:

  1. Writing code (manipulating blueprints) is safe and pure.
  2. Running code (turning blueprints into action) always goes through a checkpoint.
  3. No shortcuts exist. You cannot sneak a dangerous program past the guard by hiding it inside a normal calculation.

The author implemented this in a system called MashinTalk and proved mathematically (using 454 formal theorems) that it is impossible to bypass this security guard. It creates a world where AI can build new versions of itself, but only if those new versions pass a strict safety inspection first.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →