Skip to content

§4.1 The Dynamics of MAGE

MAGE can look static when described one principle at a time. Chapter 2 introduced models as projections of consequential properties; Chapter 3 introduced Alignment as the mechanisms that evaluate and enforce selected obligations against a realization. A working engineering system, however, is dynamic. Models are discovered, realizations change, new properties become consequential, and knowledge accumulated during one change constrains the next.

Engineers do not interact with agents through a single interface. On the Modeling side of Figure 4.1-1, natural language, specifications, and models play different roles. Natural language supports inexpensive, fluid interaction: asking questions, expressing intent, exploring alternatives, and requesting changes. A specification makes obligations on an acceptable realization explicit. Models make selected properties and relationships explicit so that they can participate directly in reasoning about the system. These forms complement one another. A model does not eliminate conversation, and neither does a specification.

The return path is similarly varied. On the Alignment side, review, testing, and analysis provide different forms of evidence about the resulting realization. Review permits contextual human judgment. Testing observes selected executions. Analysis reasons about properties that may not be adequately established by sampled executions alone. The engineer interprets this evidence against the relevant specification and models, deciding whether the realization is acceptable, must change, or has exposed something that should change the engineer's understanding.

Engineer–agent interaction through Modeling and Alignment Two panels over one shared implementation node. Left panel, Modeling / Communicating: the engineer fans out through three parallel channels — natural language, specification, and models — which converge on the agent; the agent produces the implementation. Right panel, Alignment / Evaluating: the implementation yields a result, which fans out through three parallel channels — review, testing, and analysis — that converge back on the engineer. The same engineer appears at both upper ends; the single implementation node at the bottom is the hinge between communicating intent and evaluating evidence. MODELING / COMMUNICATING what do I know, intend, and need to make explicit? ALIGNMENT / EVALUATING what does the evidence justify believing or doing? engineer engineer natural language specification models review testing analysis agent result implementation
Figure 4.1-1. Engineer–agent interaction through Modeling and Alignment. Engineers communicate intent and knowledge through natural language, specifications, and models; delegated realization returns evidence through review, testing, and analysis. The channels are complementary rather than sequential. Modeling makes selected engineering knowledge available to guide realization, while Alignment provides evidence for evaluating and revising it.

These interactions do not prescribe a fixed sequence of activities. Models make selected knowledge available to guide delegated work; review, testing, and analysis provide evidence for evaluating the result. Alignment uses that evidence to establish or preserve correspondence: an engineer may require a correction, or a gate may reject a change that violates an obligation. An engineer may move among these interactions repeatedly during a single change.

These channels differ in their governing force. Natural language and specifications remain useful throughout engineering, but preserving an obligation as the system changes requires additional machinery. A consequential property should survive beyond the prompt, conversation, or review in which it was first articulated. Once the property is sufficiently understood, Modeling makes it explicit and automated Alignment keeps the realization in correspondence with it. Engineers can therefore leave ordinary exchanges informal while making consequential properties durable.

Three ideas describe the resulting dynamics: alignment can operate actively or passively; models can be brought into governance incrementally around an alignment kernel; and the models themselves can emerge from engineering work rather than being specified completely in advance.

4.1.1 Alignment Changes the System

Alignment can establish correspondence with a model or preserve it as the system changes. These two modes are active and passive alignment, illustrated in Figure 4.1-2.

In active alignment, an engineer may deliberately introduce a mismatch between the models and the implementation. A new model expresses an obligation that the existing system does not yet satisfy. Rather than weakening the model to describe the current implementation, the engineer directs agents to change the system until it conforms. The environment evaluates the resulting work against the obligation, exposing remaining gaps for further correction. This process can also begin when an existing obligation is found to be violated; the essential feature is that the implementation changes to satisfy the model.

Once the system satisfies the obligation, the same models and alignment mechanisms can serve a different purpose. Passive alignment evaluates subsequent changes against the established obligations, constraining or refusing changes that would violate them. The engineer need not prescribe how each change is implemented, provided the result remains acceptable. Models introduced to direct one transformation thus become durable engineering structure that governs later work.

Active and passive alignment Two stacked shaded panels. Active alignment uses models with new obligations to compare and detect gaps, modify the system with agents, and evaluate and check alignment, repeating until correspondence and producing an aligned system. Retain the models and mechanisms after success. Passive alignment evaluates proposed changes against the same models and known obligations, admitting or rejecting changes and continuing to protect correspondence. The retained models, mechanisms, and governance are engineering capital for subsequent changes. Active Alignment (convergence) Use the models to change the system until it satisfies them. Passive Alignment (preservation) The same models and mechanisms keep the system aligned. Models M New obligations Compare and detect gaps Modify the system (with agents) Evaluate and check alignment Aligned system S′ Repeat until correspondence Once active alignment succeeds, retain the models and mechanisms. Models M Known obligations Proposed change ΔS Evaluate the change against the models Updated system S′ Admit or reject Continue protecting correspondence
Figure 4.1-2. Active and passive alignment. Active alignment brings an implementation into conformance with modeled obligations, including newly introduced obligations that deliberately differ from the current system. The retained models, mechanisms, and governance become engineering capital when subsequent changes benefit from them. Passive alignment uses them to evaluate subsequent changes and preserve the properties already brought under governance.

The models and checks established through active alignment become engineering capital when later changes benefit from them. Subsequent work inherits both the obligation and the machinery for evaluating it.

This matters because active alignment is not necessarily behavior preserving. Asking an agent to make a state machine explicit, replace an architectural boundary, separate storage from computation, or satisfy a new ownership model may require substantial changes to the realization. Those changes may satisfy the new model while damaging some other property that has not yet been made visible to the environment. That possibility creates an ordering problem.

4.1.2 Establish a Kernel Before Expanding

The first models brought into governance should protect the properties that subsequent transformations must not be allowed to damage. Together, these models form the alignment kernel.

Chapter 2 organized models by the properties they represent. The kernel instead concerns their order of introduction: protect the properties that an upcoming transformation must preserve, then expand the governed surface under those existing constraints (Figure 4.1-3).

Incrementally extending the alignment kernel Left, a numbered four-step procedure: 1 identify the kernel — model the properties that must stay protected while the system changes; 2 actively align — use the models to change the system until it satisfies the kernel; 3 extend — add the next models, subject to the constraints already established; 4 repeat — each new model narrows what later change is allowed to do. Right, a flat concentric diagram: the kernel M1 sits at the centre, with M2, M3, and M4 as successively larger nested rings. An annotation notes that the governed surface grows over time; another that each new model is admitted under the constraints of the models inside it; and a third that active alignment operates within the protected region. 1 Identify the kernel model the properties that must stay protected while the system changes 2 Actively align use the models to change the system until it satisfies the kernel and all prior models 3 Extend add the next models, subject to the constraints already established 4 Repeat each new model narrows what later change is allowed to do kernel M1 M2 M3 M4 the governed surface grows over time … each new model is admitted under the constraints of the models inside it active alignment operates within the protected region
Figure 4.1-3. Incrementally extending the alignment kernel. The kernel contains the modeled properties that must already be protected while active alignment changes the system. Additional models extend the governed surface, but each new alignment operates subject to the constraints established by the models already in the kernel. The layers are not different classes of model; they show models such as those introduced in Chapter 2 becoming governing constraints over time.

The order is system-dependent. For a conventional information system, behavioral correctness and state management may belong in the initial kernel: later structural changes must preserve what the system does. For an embedded system, resource properties such as latency, memory, or energy may need to enter first. An implementation may contain unusual structure precisely because it satisfies a timing constraint. Asking an agent first to make an implicit state machine explicit could invite a reasonable-looking refactoring that removes those optimizations. If the timing model is already aligned and enforced, the agent remains free to restructure the implementation—but only within the performance envelope that must survive.

A newly aligned model can join the protected environment for the next episode. Adoption therefore proceeds incrementally; it does not require a complete model of the system before governance begins.

The kernel should grow only while additional models justify their cost. A model earns its place by making a consequential property cheaper to understand, predict, constrain, or evaluate than leaving that knowledge implicit. The kernel is large enough when the consequential degrees of freedom are under control.

4.1.3 Greenfield and Brownfield MAGE

Incremental adoption is easiest to see in a brownfield system. A realization already exists. Engineers can observe it, identify consequential properties, induce models from the implementation and their own knowledge, actively align the system where correspondence is missing, and retain the resulting models and mechanisms in the GEE. The governed surface grows around a system that was already running.

A greenfield project might appear to invite the opposite strategy: construct the models first, align implementation to them, and only then allow the system to emerge. That is sometimes appropriate when obligations are already well understood. It is not the general MAGE prescription.

Software engineering exists in part because software changes. Requirements turn out to be incomplete. Apparently obvious abstractions prove wrong. Interactions become consequential only after something runs. A specification can reduce degrees of freedom without eliminating uncertainty about which choices should ultimately be fixed.

Early in a project, some degrees of freedom therefore have information value. Cheap implementation can be used to explore them. A loose specification can produce one or several prototypes; those prototypes expose missing requirements, useful abstractions, resource constraints, awkward interactions, and assumptions that were invisible on paper. The engineer then has better evidence about what should become explicit structure. The parallel document-format implementations in §3.2 illustrate the exploratory route to Modeling in §2.1: they let me investigate common structure before deciding what should be shared.

4.1.4 What Cheap Implementation Changes

Agentic implementation makes this strategy unusually cheap. In that setting, even vibe coding has a legitimate engineering role: it can serve as a kind of 3D printer for software, rapidly realizing a loose specification so that engineers can learn about the system they actually need. The mistake is not using cheap implementation. The mistake is confusing an exploratory realization with a sufficiently governed one.

Cheap implementation has another consequence: agents can produce unnecessary complexity at extraordinary speed. In my experience, coding agents readily introduce abstractions, architectural layers, and mechanisms that are reasonable in isolation but inappropriate for the system at hand. A design pattern may be sound, yet add more machinery than the problem warrants; a general solution may accommodate cases the system will never encounter. Empirical studies of AI-generated changes identify overengineering and poor contextual fit as reasons for rejection or reversion 12.1. Issam Oukhay et al., “When AI Code Doesn’t Stick: An Empirical Study on Reverted Changes Introduced by AI Coding Agents,” Proceedings of the 23rd International Conference on Mining Software Repositories, 2026, 847–51, https://doi.org/10.1145/3793302.3793587.2. Daniel Ogenrwot and John Businge, “PatchTrack: A Comprehensive Analysis of ChatGPT’s Influence on Pull Request Outcomes,” Empirical Software Engineering 31 (2026), https://doi.org/10.1007/s10664-026-10869-5. Agents can also explain and defend these choices convincingly. The engineer must judge whether the proposed structure fits the actual requirements, existing architecture, and likely evolution of the system. Parsimony is therefore an active engineering responsibility: deciding not only whether a design works, but whether its complexity is justified.

Much of my work with agents comes down to deciding what is an implementation detail and what is not. I generally do not care what a variable is called or how an ordinary function is organized, provided the result satisfies its obligations. I do care whether the implementation crosses an architectural boundary, introduces a new dependency, or changes the behavior of a service that other components rely on. The difficulty is that these distinctions are not always apparent in advance. Sometimes an agent makes a perfectly reasonable choice, I look at the result, and discover that I care about something I had never thought to specify. That is part of engineering. The next step is to decide whether the newly discovered obligation should become explicit, so that future work does not have to discover it again.

A useful rule is to distinguish three kinds of decisions. If a choice follows mechanically from an established model, generate it rather than asking an agent to reason it out repeatedly. If several implementations satisfy the obligations, delegate the choice and let the agent explore them. If experience reveals a consequential decision that later work will face again, preserve it in the engineering environment. That may mean recording a model, adding a constraint, or establishing a check. The point is not to eliminate judgment, but to spend it where it is needed rather than repeatedly making the same decision.

Cheap implementation changes engineering experience in three related ways.

Engineering phenomena — Implementation, comprehension, and connection amplification

Implementation amplification: compressed exploration. Commodity intelligence makes it cheap to implement, inspect, measure, and reject alternatives that previously would have been too expensive to try.

Comprehension amplification: compressed understanding. Rapid implementation helps engineers discover what they mean. Working software exposes misunderstandings that requirements and discussion leave hidden; agents make it cheaper to repeat the cycle of expressing an intent, inspecting the result, and revising the representation. You can only learn from what you can observe.

Connection amplification: compressed experience. Agents surface related failures, observations, and design consequences in dense succession, where conventional development would have separated them by days or weeks. Their proximity can make relationships visible: several local failures reveal one architectural gap; a measurement exposes a missing model; one change makes the consequence of another immediately apparent.

The limitation matters. A change can satisfy its functional goal while worsening performance, security, or maintainability. Fast implementation therefore increases the importance of measuring beneath the visible outcome. The DocAble case in §4.2 illustrates this through Ousterhout’s advice to measure one level deeper 3.3. John Ousterhout, “Always Measure One Level Deeper,” Communications of the ACM 61, no. 7 (2018): 74–83.

In DocAble, related failures sometimes arrived quickly enough that what first appeared to be separate defects became recognizable as symptoms of a missing architectural concept. The shared relationship became a system model, which in turn enabled static analyses that prevented several classes of failure. Speed had changed what the engineer could see.

The engineer still judges which alternatives are worth exploring and which apparent connections matter. When experience reveals a recurring lesson, governance conversion preserves it in the environment so that later work can use the resulting representation, procedure, or control.

Engineering move — Governance conversion

A recurring failure, a repeated judgment, or a newly discovered relationship is converted into durable engineering structure: a representation, a body of evidence, a procedure, or an enforced obligation. §3.4 develops the move in full.

It does not decide what deserves capturing; that judgment stays with the engineer. It names what follows the decision: the lesson stops living in one person's memory and starts living in the environment that governs the next change.

Figure 4.1-4 brings these recurring activities together. Alignment operates throughout the work, while governance conversion can preserve a consequential lesson wherever it arises.

Agentic Engineering Through Models Model, Realize, and Evaluate form a repeating cycle. A brace spans all three activities and is labeled Governance conversion: Make consequential lessons durable. Conversion can occur during any of the activities; it is not a fourth phase. Agentic Engineering Through Models Model Realize Evaluate Governance conversion Make consequential lessons durable
Figure 4.1-4. Agentic engineering through models. Modeling, realization, and evaluation recur as a system evolves. Alignment operates throughout; governance conversion can make a consequential lesson durable during any activity.

The engineers supervising this process do not begin without understanding. They had enough understanding to state the problem, write the loose specification, judge the prototype, and recognize what it gets wrong. The task is to move consequential parts of that understanding out of human memory and into explicit representations that agents and the engineering environment can use. Because agents can perform both implementation and much of the mechanical work of model induction quickly, this transition need not be a long separate modeling phase.

Leave degrees of freedom open while variation produces useful information. Once a choice becomes sufficiently understood and consequential, represent it and, where justified, align the implementation to it. This applies to greenfield and brownfield engineering alike. The difference is where the first useful evidence comes from: exploratory implementations in one case, an existing system and its accumulated engineering knowledge in the other. §4.3 examines how to recover that knowledge from an inherited system.

Works Cited

  1. Oukhay, Issam, Mahi Begoug, Moataz Chouchen, and Ali Ouni. “When AI Code Doesn’t Stick: An Empirical Study on Reverted Changes Introduced by AI Coding Agents.” Proceedings of the 23rd International Conference on Mining Software Repositories, 2026, 847–51. https://doi.org/10.1145/3793302.3793587.
  2. Ogenrwot, Daniel, and John Businge. “PatchTrack: A Comprehensive Analysis of ChatGPT’s Influence on Pull Request Outcomes.” Empirical Software Engineering 31 (2026). https://doi.org/10.1007/s10664-026-10869-5.
  3. Ousterhout, John. “Always Measure One Level Deeper.” Communications of the ACM 61, no. 7 (2018): 74–83.
© James C. Davis, 2026–present