The book models — a reading view

The book's outline and learning-outcome models, rendered as an alternative way to read the spine. Every heading, topic sentence, and outcome below is projected straight from book-models/outline.json and outcomes.json — regenerated on every commit, so it never goes stale.

37 chapters · 262 sections · 80 learning outcomes (? declared · ? derived · ? gap-recommended)

The program — what you'll be able to do after the whole book

After the program — the reader can
  • understandAfter the book, the reader can situate any governance move on the two thesis axes — constraint-vs-sensor and soft-vs-hard — and reach for the one the failure calls for. declared
  • createAfter the book, the reader can design a governed engineering environment in which a fleet of coding agents produces correct work at bounded risk — choosing the right mechanism, the right model, and the right transformation for each failure class. declared
  • createAfter the book, the reader can model a system as structured, drift-checked views an agent reasons through, rather than leaving the structure in a human's head. declared

Front Matter

Glossary 0.2-the-books-language

The ideas the whole argument turns on — the two theses, the conversion that grows the environment, the governing metaphor, and the vocabulary of models underneath them.

What a fleet of coding agents is, and the ways it comes apart.

The environment that holds the fleet to a standard, and the mechanisms it is built from.

Two mechanisms from the book's running example, DocAble.

0.3-preface 0.3-preface

Building DocAble was not only a way to ship a product.

Three books frame what this one attempts.

The first is **Software Engineering at Google** (Winters, Manshreck, and Wright, 2020) [cite: winters2020] — three Google engineers' account of how the company sustains software engineering across tens of thousands of people and one vast codebase over decades — whose premise this book shares: engineering discipline should be *mechanized, not remembered* — pushed into review, testing, tooling, and culture so that correctness does not depend on any one engineer keeping a rule in their head.

The second is the **Gang of Four's** *Design Patterns* (Gamma, Helm, Johnson, and Vlissides, 1994) [cite: gof1994], the catalogue that gave object-oriented design its shared vocabulary of reusable solutions, whose lasting contribution was less any single pattern than the *form* — name, recurring problem, solution shape, consequences, known uses — written so an engineer could reach for a vetted answer instead of re-deriving one.

The third is **Model-Driven Software Engineering in Practice** (Brambilla, Cabot, and Wimmer, 2017) [cite: brambilla2017], the standard concise statement of the modeling tradition: treat models as first-class engineering artifacts, structured representations with defined semantics a tool can check, not pictures pinned beside the code.

The hard problem of building software with agents is simple to state: the tools are fast and the tools are unreliable.

The through-line is a single idea; hold every chapter against it.

0.4-how-to-read-this-book 0.4-how-to-read-this-book

Read the book once, front to back, and you learn the method.

Five appendices, each with its own job.

The three reference appendices are strongest read in sequence, from the capability you want down to the detail you need to ship it.

The book and the online catalogue divide the work.

[ref:where-to-look] lays the surfaces side by side — each with the job it does and the question that sends you to it, from the main text through the five appendices to the online catalogue.

Acknowledgments 0.5-acknowledgments

Module 1 — The Mindset

After Module 1 — the reader can
  • evaluateAfter Part 1, the reader can judge which tasks warrant governance machinery and which do not, and read an agent as a loop that needs a model of its world. declared

Lesson1.1-the-printer 1.1-the-printer

After this lesson — the reader can
  • evaluateAfter this chapter, the reader can judge whether a task is open-ended enough to need the book's machinery, and reason about accountability when an agent produces a wrong result. declared

Of course, not every programming task needs the machinery this book describes.

Start at the decision on the left.

After this section — the reader can
  • understandAfter this section, the reader can distinguish one-shot scripting from supervised autonomy and name what each supplies to the agent. derived

This book covers both modes.

After this section — the reader can
  • evaluateAfter this section, the reader can judge how long a leash a task can run on from two factors — how densely the model's training data covers the work and how capable the model is at it — and see why misjudging the mode is costly either way. derived

Think of a 3D printer.

A 3D printer belongs to a rare class of technology — the *open-ended* kind — alongside the invention of writing and the printing press.

Everyone can sketch a piece of software.

After this section — the reader can
  • understandAfter this section, the reader can explain why an agent, like a 3D printer, needs the detailed build instructions and not merely a picture of the desired result. derived

Here is the shift in posture the whole book turns on.

After this section — the reader can
  • applyAfter this section, the reader can adopt the posture that an agent is a printer, not a stapler — so when it produces the wrong thing, the first suspect is the instructions, and the models can build anything one can explain. derived

Lesson1.2-mage-by-example 1.2-mage-by-example

After this lesson — the reader can
  • understandAfter this chapter, the reader can describe the grounding case — what DocAble does, how its six parts fit together, and why it was built — and recognize the convert-a-failure-into-a-mechanism move in its first two incidents. declared

The explicit problem is a mountain of inaccessible documents.

From the outside the system is almost boring, which is the point.

Inside, six parts carry that upload, drawn in [ref:docable-pipeline].

Now the part that makes this a book about engineering rather than accessibility: I did not write this system.

None of that machinery was designed in advance.

Early on, the codebase held two libraries that could touch a PDF: the sanctioned one, and a convenient second one an agent had adopted for quick page operations.

The second failure came from the process that built the product.

Neither fix stopped at the patch.

You now hold the object: a real system, built by a fleet, governed by machinery that grew scar by scar.

Lesson1.3-loops-and-models 1.3-loops-and-models

After this lesson — the reader can
  • understandAfter this chapter, the reader can explain the agent as a fixed-shape loop and why giving it a model of the world is the first act of governance. declared

An agent runs in a loop, and the loop has a fixed shape.

After this section — the reader can
  • understandAfter this section, the reader can describe agent work as a fixed-shape loop — input, reasoning, output, fed around again — and see why engineering it starts with a measurable success metric. derived

(no topic sentence — opens on a non-paragraph block)

After this section — the reader can
  • understandAfter this section, the reader can explain why handing the agent a model of its world conditions the probability distribution of its behavior — aiming its search and shrinking what it must hold. declared
  • createAfter this section, the reader can construct a world-model an agent acts against — the first governance move. gap-recommendedO2 finding: this H2 opens on a non-paragraph block (no topic sentence), so the outcome its heading promises is not stated in prose as written. Recommend a lead paragraph that states the move.

Now put the two ideas back together, because they are one machine.

Lesson1.4-why-mage-follows-from-the-machine 1.4-why-mage-follows-from-the-machine

After this lesson — the reader can
  • createAfter this chapter, the reader can derive the Modeling and Alignment theses from the properties of the foundation model and the agentic harness, and say why their combination requires the governed engineering environment. declared

[Loops and Models](1.3-loops-and-models.html) called the foundation model a probabilistic reasoning machine.

A raw model only recommends.

Cross the two lists and the method starts writing itself.

Now collect the derivation.

Lesson1.5-the-engineers-seat 1.5-the-engineers-seat

Engineering ran on the same handful of activities long before software, and software inherits them whole: **requirements** (find out what the system must do, and for whom — usually the hard part, since the people who need it cannot state it), **specification** (say what it will do, precisely enough to check later), **design** (decide the parts, the seams, and how the whole meets its constraints), **implementation** (build it — for software, write the code), **validation** (show the built thing meets the spec), and **maintenance** (change it over the long life without breaking what already works).

Two words for two jobs, and this book keeps them apart.

The field's own name for the lifecycle gives the old arrangement away: SDLC, the software *development* life cycle.

Same lifecycle, then; no new phases.

Module 2 — The Governed Engineering Environment

After Module 2 — the reader can
  • createAfter Part 2, the reader can construct a governed engineering environment: place a control at the right layer of the agent stack, split ex-ante from ex-post, write lifecycles and runbooks, and measure one level deeper. declared

Lesson2.1-the-agent-stack 2.1-the-agent-stack

After this lesson — the reader can
  • knowAfter this chapter, the reader can identify the four layers of the agent stack and read each as a distinct place to insert a control. derived

Before the walk, I owe you four definitions — *engineering*, *software engineering*, *agent*, and *model* — and, before we leave them, one adjective the last of them will come to lean on: *structured*.

**At the bottom sits the foundation model.** It comes from a commercial vendor or an open-weight release, and it is a general language reasoner, able to *induce* an understanding of your environment — though that induction is expensive, and it happens fresh every time.

After this section — the reader can
  • knowAfter this section, the reader can identify each of the four layers of the agent stack, from the foundation model up, and name the kind of governance grip each one gives. derived
  • knowAfter this section, the reader can identify each of the four layers of the agent stack. derived

Read the stack as a list of opportunities, because that is what it is.

After this section — the reader can
  • understandAfter this section, the reader can explain why each layer of the stack is an injection opportunity, all serving one goal — narrowing the agent's search — and why the mechanisms placed there must themselves be governed for interplay. derived

Lesson2.2-models-and-the-semantic-gap 2.2-models-and-the-semantic-gap

After this lesson — the reader can
  • understandAfter this chapter, the reader can explain why a structured model beats prose and code as the thing an agent reasons through, and why a drift check proves agreement, not correctness. derived

Your first governance mechanism is the prompt, because the agent is a language model and words are how you talk to it.

After this section — the reader can
  • understandAfter this section, the reader can distinguish soft prose from verbose code and explain why a model — accurate, unambiguous, yet compact — is the sweet spot an agent can reason over. derived

The models are the map; the code is the territory.

After this section — the reader can
  • understandAfter this section, the reader can explain why hand-maintained models drifted and fell out of favor, and why agents — which reason over models, not code — flip that calculation when a linked set of models is kept in sync. derived

Step back from drift for a moment and look at what you actually hand an agent to work from.

After this section — the reader can
  • understandAfter this section, the reader can explain why the apex of the documentation hierarchy is a structured model — the one description a machine can read and check the others against, binding docs, code, and tests where structured English stops one rung short. derived

The argument so far is that a structured model earns its keep by binding intent to implementation and letting a checker prove things about it.

The claim I just made hides a trap, and the book's enthusiasm for drift gates can be misread into a dangerous half-truth.

After this section — the reader can
  • understandAfter this section, the reader can explain the precise guarantee a drift check gives — agreement, not correctness — and why only a model authored from intent, not derived from code, catches a wrong "is". derived

There is an over-reach on the other side of the mirror, and it is worth naming before the enthusiasm for models runs away.

If the structured model is where you now start, an old idea says to finish there too: skip the code and *execute the model directly*.

After this section — the reader can
  • analyzeAfter this section, the reader can situate how far to model on a spectrum trading strength against changeability, and read the CASE/MDA history as an economic call whose sweet spot agents have moved outward. derived

Enforce a property at the wrong level and it slips through; [ref:semantic-gap] shows the fix — lift the check to where the meaning is legible.

After this section — the reader can
  • knowAfter this section, the reader can define the semantic gap — enforcing a property at the wrong level of abstraction — and identify the level where it becomes legible. derived

A second instance of the semantic gap lives not in the product but in the operator's own loop.

After this section — the reader can
  • applyAfter this section, the reader can apply the semantic-gap fix to a second, operator-loop instance: a hook that fires on context-fullness and record-staleness together, and can name why even a roughly-right rung beats a hook that sits too late. derived

So I moved the check up to where the property *is* legible: the operator's loop.

Why insist on both conditions?

I want to be straight about a compromise buried in this, because it is the kind of thing the semantic-gap idea should make you notice rather than paper over.

Lesson2.3-the-governed-environment 2.3-the-governed-environment

After this lesson — the reader can
  • understandAfter this chapter, the reader can split what is decidable up front from what is learned by building, and classify each mechanism as a constraint (prevent) or a sensor (catch). derived

Some things you genuinely know from the beginning, and you should write every one of them down.

After this section — the reader can
  • applyAfter this section, the reader can apply specification-driven development to what is knowable up front: write every known rule down and determinize it with a cheap deterministic check the agent itself writes. derived

But you will not know everything, and pretending otherwise is the mistake.

After this section — the reader can
  • understandAfter this section, the reader can explain why governance is built ex-post — iteratively, as unforeseen failures reveal themselves — and why that is where most real mechanisms come from rather than a fallback for a weak plan. derived

Run the promotion rule for a season and the environment fills with controls.

After this section — the reader can
  • applyAfter this section, the reader can run the promotion rule for a season and the environment fills with controls. derived

A mechanism is one of two moves — prevent the mistake, or catch it — and [ref:constraint-vs-sensor] draws the split.

After this section — the reader can
  • understandAfter this section, the reader can distinguish a constraint (prevent, costs no iteration) from a sensor (catch, costs iterations), place both on the independent soft-versus-hard axis, and tag most real mechanisms as a package by their primary move. derived

One boundary before moving on, because without it the word swells.

Step back and this is what you are really doing: describing policies for how the engineering work should proceed, and letting those policies produce a **governed engineering environment** — the rules of the road the agents operate within.

That closing line reads as if it settles everything.

After this section — the reader can
  • knowAfter this section, the reader can identify the residual — goals that are neither preventable nor detectable because the failure is an absence nobody specified — explain why it sets the throughput ceiling and is the complement of the two moves rather than a third axis value, and see how authoring the missing spec pulls a goal out of it. derived

Lesson2.4-lifecycles-and-runbooks 2.4-lifecycles-and-runbooks

After this lesson — the reader can
  • createAfter this chapter, the reader can author a lifecycle and its runbook, giving the deterministic parts a tight algorithm and the judgment parts the roughest one that still fits. derived

Start with the lifecycles, because everything else hangs off them.

After this section — the reader can
  • analyzeAfter this section, the reader can map a lifecycle — the healthy path of a recurring activity plus, from each node, its failure states and the action for each — as a failure-mode-and-effects grid, and encode the way out and the prohibition an agent cannot supply on its own. derived

Once the healthy path and the failure map are written, the thing you hand the agent is a **runbook** (or playbook): the steps to take, whether recovering from a failure or working a fresh ticket.

After this section — the reader can
  • createAfter this section, the reader can author a runbook that separates deterministic steps from judgment ones — giving the deterministic parts an executable tool that also yields a reusable trace, and the judgment parts a rubric or the roughest algorithm that still fits, up to a pre-canned brief for delegation. derived

**The judgment parts get the roughest algorithm that still fits.** For a well-constrained decision, write the algorithm down and let the agent do the glue.

After this section — the reader can
  • applyAfter this section, the reader can apply the roughest-algorithm-that-still-fits rule to a judgment step — giving a well-constrained decision an algorithm, an open-ended one only hints, a measurement a rubric, and a delegated task a pre-canned brief. derived

Lesson2.5-metrics 2.5-metrics

After this lesson — the reader can
  • applyAfter this chapter, the reader can design a metric that measures one level deeper — turning a number that reports into one that drives a decision — and place it on the hard-to-soft spectrum, feeding a hard number into a structured model the metric tool then consumes. derived

John Ousterhout gives the rule in one line [cite: ousterhout2018]: **measure one level deeper than the number you think you want.** A metric earns its place only when it drives a decision, and the surface number usually cannot; the deeper the measurement, the nearer it sits to the decision it must drive.

After this section — the reader can
  • applyAfter this section, the reader can apply Ousterhout's rule and measure one level deeper than the surface number — reading a per-service cost split or a boot-time breakdown as a decision the invoice-level number buried. derived

Start at the deterministic end, where a metric is a millisecond number nobody argues about.

After this section — the reader can
  • analyzeAfter this section, the reader can analyze a hard, deterministic metric at the level where the decision lives — reading cold-start latency one level deeper to name runtime initialization rather than scale-from-zero, computing a longest-path worst case over a service graph, and feeding the number into a structured deployment model a recompute tool consumes. derived

Now the middle of the spectrum, and the chapter's teaching example: the "measure one level deeper" rule applied to the number that most often gets it wrong.

After this section — the reader can
  • applyAfter this section, the reader can compute coverage measured one level deeper — joining a traceability graph's claim-to-anchor edges with the coverage oracle so the metric counts model claims instead of lines, names an unexercised invariant instead of a percentage, and reports an honest exercised/unmeasurable/out-of-surface breakdown. derived

The flagship walks from a model claim *to* the code and asks whether a test exercises it.

The link graph that drain walks has a second use, and it comes for free.

Slide to the far end of the spectrum, where the metric stops being a number a threshold can act on and becomes a judgment a human has to make.

After this section — the reader can
  • analyzeAfter this section, the reader can classify a soft metric — a doc-derived test's coverage-of-doc-claims — as one that aims a reader rather than deciding, recognize why its softness is inseparable from a readiness judgment about the seam, and see why wiring it to a blocking gate manufactures hollow tests. derived

The most useful honesty in measurement is the one that catches you before you publish a comfortable non-result.

The hard end and the flagship follow the same pattern.

After this section — the reader can
  • understandAfter this section, the reader can explain why the MBSE models are consumed at runtime to produce the metrics — the cold-start numbers and the coverage graph both read at check time — so a component-distance grade read from the model drives a pre-commit gate three ways, the model being the machinery rather than a picture of it. derived

[ref:metrics-table] collects every metric — the decision each drives, where it sits on the hard-soft axis, and who reads it.

Lesson2.6-when-guardrails-collide 2.6-when-guardrails-collide

After this lesson — the reader can
  • analyzeAfter this chapter, the reader can analyze the space between controls with a governance graph — nodes tagged by event and resource, edges a closed conflict taxonomy joined by the shared resource — and reason about mechanisms whose hooks they do not own. derived

The Governance Graph draws it.

After this section — the reader can
  • analyzeAfter this section, the reader can analyze the space between controls with a governance graph — mechanisms as nodes tagged by event and resource, conflicts as edges in a closed contradiction/contention/ordering/soft-versus-hard taxonomy joined by the shared resource — and route each edge to a lint or a human prompt by its type before the control ships. derived

The graph settled one question a flat list could not: which two controls collide.

The census has a counterpart, and the two are true opposites over one graph.

Every mechanism so far was one you wrote.

After this section — the reader can
  • applyAfter this section, the reader can apply the governance graph to hooks they did not author — entering an outside hook as a node on a conservative possible-conflict edge against its whole slot until analyzed — and reduce satisfying one or several regulators to checking that the merged graph carries no unresolved contradiction, including that no required hard block is overridden by a soft aim. derived

Two disciplines keep the model honest, and both are the book's.

After this section — the reader can
  • evaluateAfter this section, the reader can justify the two disciplines that keep a governance graph honest — anchoring each node to its control's code by symbol so a drift lint reddens an unmodeled control, and keeping the model descriptive rather than inventing conflict-lints for collisions that never happened. derived

Module 3 — The Model Zoo

After Module 3 — the reader can
  • createAfter Part 3, the reader can model a system as the executable 4+1 zoo — logical, process, development, physical, and scenario views — each a structured model kept honest by a drift check. declared

Lesson3.1-the-executable-zoo 3.1-the-executable-zoo

After this lesson — the reader can
  • understandAfter this chapter, the reader can explain why the cost that sank classical MBSE is one an agent fleet absorbs, and read Kruchten's 4+1 as the spine of the model zoo. declared

Part 1 derived the Modeling Thesis from the machine.

Model-based systems engineering never failed on its ideas.

The fewer-tokens leg is the one we can measure directly.

The last chapter invoked Kruchten's **4+1 views** in a final sentence — "the reason one model is never enough." This Part promotes that sentence to its organizing structure.

After this section — the reader can
  • understandAfter this section, the reader can explain how 4+1 is promoted from a closing invocation to the organizing spine of the views. derived

Kruchten, of course, described the views; he did not have a drift gate.

Making the model executable is why this Part is not really *about* 4+1.

Before the views, one chapter of framing.

The last chapter warned against repetition: two models that say the same thing must now be kept in sync.

A model and the code it concerns stay equal by derivation, and derivation runs in one of two directions.

The purest model-from-code artifact is not one of the zoo's own views.

A model earns trust only if you can get from a model element back to the lines that realize it, and forward from a line to the model element that governs it.

DocAble did not design this up front.

The right sensor was read off real drift rather than guessed.

(no topic sentence — opens on a non-paragraph block)

After this section — the reader can
  • analyzeAfter this section, the reader can analyze the two decisions that make a governance graph resist rot. gap-recommendedO2 finding: opens on a non-paragraph block (no topic sentence). The two decisions are named in the heading but the section does not open by stating them; recommend a topic sentence enumerating them.

Every model in this Part is rendered by filling the same five-field template.

Every model page in this Part draws the same shape.

Lesson3.2-the-logical-view 3.2-the-logical-view

After this lesson — the reader can
  • createAfter this chapter, the reader can model the logical view as a structured service-flow model backed by frozen domain registries. declared

*The typed source-of-truth for a service-oriented architecture — its services, their endpoints, their authentication, and the wiring between them — from which the access policy and environment wiring are generated and against which the real call graph is checked.*

The domain registries are the frozen tables the service-flow model rests on: the file types the system handles, its known conformance gaps, its scheduled jobs, its user-facing surfaces.

Lesson3.3-the-process-view 3.3-the-process-view

After this lesson — the reader can
  • createAfter this chapter, the reader can model the process view — cataloging every lock in a synchronization model and backing its invariants with formal verification. declared

Formal invariant verification is the backbone the other three models hang their invariant tables on.

*A typed registry that models the system's synchronization behavior — every OS-level lock, which shared resource it guards, and the required acquisition ordering — so concurrency contracts are declared and checkable, not tribal.*

The mediator registry is the *how-many* half.

The single-writer registry is the *exactly-one* half, and its failure mode is what makes it a separate model.

Lesson3.4-the-development-view 3.4-the-development-view

After this lesson — the reader can
  • createAfter this chapter, the reader can model the development view — every component's zone and the governance rules that ride it — as typed registries. declared

*A typed catalog of every component's code zone — its focus directories, its tags, its boundary kind, its external seams, its read surfaces — so "which component owns this file, and what may touch it" is a queried fact rather than a per-tool guess.*

The rule-metadata registry is the self-referential slice of the domain registries: the governance rules' own metadata, and so the model the governance machinery — and this book — are partly governed by.

Lesson3.5-the-physical-view 3.5-the-physical-view

After this lesson — the reader can
  • createAfter this chapter, the reader can model the physical view — deployment topology and a typed deploy DAG — and name the one honest gap in the cost view. declared

The zoo names a performance and cost model as a general type, and the framework supports it.

*The typed statement of where things run — each service's name, its layer, and its tier — from which the deploy scripts and layering lints reason about a declared topology rather than scattered constants, and against which the real deploy table is reconciled.*

*A deploy graph whose edges carry a typed intent — correctness, cost-gate, or load — kept host-identical, plus a typed Scheduler that reads a per-host profile and rations load and cost so one host fans work out while a scarce one serializes it.*

The substrate-dependency model makes each governance mechanism declare, as typed metadata, the substrate assumption it bakes in — bound to one substrate, substrate-aware, or substrate-agnostic.

Lesson3.6-the-scenarios-view 3.6-the-scenarios-view

After this lesson — the reader can
  • analyzeAfter this chapter, the reader can map journeys to the environment tier that tests them, joining user-journey, orchestration, criticality, and coverage models. declared

The user-journey model makes the product's journeys first-class typed entities — each an actor pursuing a goal through ordered steps, every boundary-crossing step joined to the endpoint it calls.

The agent-orchestration model is the developer-journey counterpart — the scenarios view pointed at the fleet rather than the user.

This model — the **Selector** in the join below — derives which environment tier a journey's tests run in from the journey's criticality: a `MAJOR` part runs the fast local tier and the full staging matrix, a `MINOR` part runs staging only.

Coverage-to-node mapping projects the test suite's coverage onto the model's *nodes* — states, seams, invariants, journey endpoints — instead of its lines.

The three models above ask whether a journey's test *exists*, *runs*, and runs *in which tier*.

*Four models composed on a shared key, so a product goal reaches all the way to how the deploy runs its tests.

Three questions the raw deploy scripts and test config cannot answer on their own.

The four models compose through shared keys.

The join has no single appendix diagram, so this composite is composed from the four real panels, adding only the join edges between them.

The join's invariants span all four models, collected in [ref:scenarios-invariants].

Two pieces of real policy code make the join concrete.

*Model-from-code, joined.* Every leg derives from the code: the journey's deps from its real call sites (M13), coverage from the real test run (M5), the host tier from the criticality field by a pure function (M6), the rationing plan from the per-host profile (M7).

LessonThe Scope of Modeling: where to read next 3.7-the-scope-of-modeling

There is a moment when a working sketch stops carrying its weight, and it is worth learning to see it coming.

Each view here is a working sketch.

If you read a few things past this book, read these.

One branch of modeling this book leaves untouched is the *digital twin*: a live model of a physical thing, kept in step with its real counterpart by a stream of sensor data, and used to predict and control it.

One thread ties every entry here to the book behind it.

Lesson3.8-keeping-models-in-sync 3.8-keeping-models-in-sync

A context-bounded fleet governs a context-exceeding codebase *through* structured models.

Sync holds through two layers stacked over the model↔code gap.

Sync is a living practice, not a one-time alignment.

The claim is a field-report result, so the numbers come with their provenance.

Documentation drift is excluded here by construction; this table is model↔code sync only.

Stale headers and stale prose numbers are **documentation drift, not model drift.** They are the soft layer's true positives, and they are cheap: a reader catches them, and the close tool heals them.

The net has two escape hatches.

Both failure modes lean, by default, on an engineer or an agent *noticing*.

The result is narrow, and stating its limits is part of stating it.

Module 4 — Putting It to Work

After Module 4 — the reader can
  • applyAfter Part 4, the reader can put the method to work: induce models from an existing codebase, deploy the self-operate / self-govern / self-communicate skills, size a transformation to its model and guarantee, and recognize the agent-shaped failure modes. declared

Lesson4.1-brownfield 4.1-brownfield

After this lesson — the reader can
  • applyAfter this chapter, the reader can apply top-down, bottom-up, and lint-cover-then-induce approaches to bring a brownfield codebase under a model. declared

Do not dismiss a drifted wiki as failed documentation.

Four small additions turn the wiki from optional documentation into the start of an engineering environment.

The migration runs in four stages.

Name the starting point and both destinations before you move.

After this section — the reader can
  • knowAfter this section, the reader can name the starting point and both destinations before you move. derived

The second approach starts from the code and flies upward.

Both approaches assume you can make sense of the code — and often you cannot, because it is a mess.

[ref:squash-zero-promote] draws how a lint is worn into a legacy tree without breaking any in-flight agent — the order is what keeps it safe.

Induction gives you a first model, but it never tells you where it stops.

Coverage walks one direction: model to code.

A pilot makes the shape concrete.

Which raises the real question: how much governance is enough?

I know this because I lived it.

Lesson4.2-the-skills 4.2-the-skills

After this lesson — the reader can
  • applyAfter this chapter, the reader can use the three packaged skills and follow the construction recipe to mint a new one well. declared

Self-operate is the starting point, because it holds the lifecycles of running a repo — everything an engineering team actually does.

The second skill, self-governance, triggers on a simple signal: a bad thing happened more than once — sometimes just once, if it was bad enough.

After this section — the reader can
  • applyAfter this section, the reader can use the self-governance signal — a bad thing happened twice — to mint a control instead of re-patching the instance. derived

The first heuristic is to **avoid a teetering tower of governance.** Do too much of this and you end up in trouble: so much code governing and constraining the behavior that tending the tower becomes the work itself.

The third skill, self-communicate, governs how the agent explains itself — to you and to other people.

Self-communicate also owns a **lexicon**: the house vocabulary for your repo, so one concept gets one word, used consistently.

The three feel of a piece because they were all built the same way.

Lesson4.3-transformations 4.3-transformations

After this lesson — the reader can
  • evaluateAfter this chapter, the reader can size a transformation to its model and guarantee, and tell a right-sized leap from a wrong-shaped one. declared

Give a model an input and either examples of a transformation or a precise description of it, and it will apply that transformation to something new — as long as the new thing is close enough to the examples, or the rule is precise enough.

After this section — the reader can
  • evaluateAfter this section, the reader can size a transformation's leap to its model and its guarantee. derived

Two transformations from this book show the lens at work — one sized right, one shaped wrong.

[ref:transformations-pipeline] shows the shared skeleton — each skill carrying an input to an output through a sequence of sized transformations.

Lesson4.4-training-data 4.4-training-data

After this lesson — the reader can
  • analyzeAfter this chapter, the reader can analyze how training-data bias shapes an agent's reach, and situate MBSE on the novelty axis where it shines. declared

Think of the training data as the whole internet and every book ever written, and think of the model as biased toward whatever it saw most.

[ref:novelty-axis] sets a part's novelty against the leap you can trust and the oversight you owe.

I hold this through an analogy.

So think of it this way: the agent will hand you a working prototype, but look under the hood of a novel system and you find Rube Goldberg machines in the engine room.

LessonLessons Learned 4.5-lessons-learned

After this lesson — the reader can
  • knowAfter this chapter, the reader can recognize the recurring agent-shaped failure modes — optionality, false 'done', broken estimates, vibe coding — and adopt the disciplines that survive them. declared

There are three ways to run a coding agent, and I suggest you choose among them by where you sit on the risk map; taste does not enter into it.

Coding agents accelerate *within the frame you give them* — even when the frame is wrong.

(no topic sentence — opens on a non-paragraph block)

For my whole career, refactoring was something you rationed.

Two consequences follow from cheap implementation, and both caught me off guard.

(no topic sentence — opens on a non-paragraph block)

AI reduces friction, of course; but what it chiefly manufactures is optionality — an endless stream of choices, some architecturally critical, some product-relevant, and some stupid things the agent should have sorted for itself.

A failure mode appeared again and again: Claude reported a task complete, and my review agents later found the half-done implementations, the missing integration points, and the tests that never actually exercised the behavior.

An agent fails differently than a person does.

After this section — the reader can
  • knowAfter this section, the reader can recognize the agent-shaped failure modes and write tests that survive them. derived

When you vibe-code, you ask the agent to produce something that appears to satisfy the requested behavior, and the evidence you use is all external: does the demo run, does the output look right?

After this section — the reader can
  • understandAfter this section, the reader can distinguish vibe coding from engineering by whether the program is treated as an I/O device or a system. derived

A normal codebase keeps most of its conceptual structure in human memory.

(no topic sentence — opens on a non-paragraph block)

The mechanisms I ended up with were not all the same kind of thing, and the axis that sorted them was soft versus hard.

After this section — the reader can
  • analyzeAfter this section, the reader can classify a governance mechanism on the soft-to-hard spectrum — guidance that aims versus machinery that holds. derived

The thing agents amplify is your autonomy — your capacity to turn intent into a working system without waiting on anyone.

Watching my own experience of software engineering get compressed, I expected to feel the role shrinking.

This is where I think companies may have trouble.

Lesson4.6-generative-validation 4.6-generative-validation

After this lesson — the reader can
  • evaluateAfter this chapter, the reader can choose among generative-validation strategies by the specification each one attacks, treating the structured model as an oracle. declared

[ref:generative-family] lays the family out on one page.

Before the three members, the shared shape.

After this section — the reader can
  • applyAfter this section, the reader can apply the one move behind property testing, fuzzing, and fuzz-MBSE: a generator hunting a counterexample to a stated model. derived

In property-based testing the author writes the law and the machine hunts the counterexample.

Property testing asks tame inputs a rich question.

Once you have a generator, a new question appears that example tests never had to ask: *did the campaign explore the space that matters, or did it just spin?* The book already owns coverage — the [metrics chapter](2.5-metrics.html) develops it as a flagship, with the rule to measure one level deeper than the raw percentage — so this section adds only the one cut that is genuinely native to generation and hands the rest back.

The family gives a compact decision aid, and the axes of the opening table are the decision.

After this section — the reader can
  • evaluateAfter this section, the reader can choose which validation strategy to reach for by the specification it attacks. derived

Module 5 — A MAGE Case Study

After Module 5 — the reader can
  • analyzeAfter Part 5, the reader can trace how the method grew from a single reviewer to a multi-agent engineering organization in one real system, and relate each governance move to the problem that forced it. declared

LessonThe ADA Context 5.1-the-ada-context

After this lesson — the reader can
  • understandAfter this chapter, the reader can explain the accessibility problem the case-study system solves and why a document is not just a file. declared

The Americans with Disabilities Act starts from a simple promise: people with disabilities should have equal access to public life, able to work, travel, study, vote, and use services without barriers society could reasonably remove.

Universities have been obligated to comply with Title II since 1990.

Compliance carries a cost, and the cost is easiest to feel on a single deck.

Underneath the institutional bind sits a technical problem deeper than it looks, and it is why this became a software project worth building rather than a policy memo worth writing.

Lesson5.2-the-timeline-and-the-work 5.2-the-timeline-and-the-work

After this lesson — the reader can
  • understandAfter this chapter, the reader can describe how the case-study project unfolded across its stages and the range of work it demanded. declared

The project began, fittingly, in a committee meeting about the very deadline described in the last chapter.

What followed moved through a recognizable sequence of stages.

[ref:velocity-curve] plots commits per week: a steep rise as the fleet gained capability, then the dip where velocity buys trustworthiness.

The apparatus outgrowing the product is not a one-time fact; it is a curve.

Under the ratio sits the raw motion of the code: lines added and lines deleted, week over week, on the two paths that carry the product — `web/`, the Python service and worker, and `backend/`, the C# tool and rule engine.

For a stretch of the build, nearly every unwelcome surprise came from deployment, and they shared a shape.

Read this timeline as a catalog of the *kinds of work* agentic development turned out to need — a more useful reading than any feature list.

Lesson5.3-the-built-system 5.3-the-built-system

After this lesson — the reader can
  • analyzeAfter this chapter, the reader can analyze the built system end-to-end through three complementary views over one shared edit language. declared

A user uploads a file.

None of this would be worth building if a document were merely text in a box, and of course it is not.

A model shows a view.

The back end is a set of small services wired to react to events.

The front end is a small single-page application plus a set of supporting surfaces — an account view, a job history, an operator dashboard, and the editor.

Here the two halves of the system join, and the join is the function-call pattern from earlier in the chapter, seen once more.

The frontier models can already skip all of this.

Notice the shape of the argument, because the book made it again at a larger scale.

Lesson5.4-the-road-to-mage 5.4-the-road-to-mage

After this lesson — the reader can
  • analyzeAfter this chapter, the reader can trace the role progression — co-coder, QA, review-lead, tech-lead — that grew a single developer into an agent organization. declared

At the start there was one document format, a few hundred lines, and me.

The first offload was to hand the review itself to an agent.

The single reviewing agent worked, but it had a flaw I could not brief away.

A crew that coordinates is still a crew of agents each of whom has to understand the code it touches.

Once that first model paid off, the others followed — but the right way to see the set is not "more models." Each model is a **view** of the system, and each view exists to answer for one **property or quality metric** I had to guarantee: a property like *deployability*, a quality metric like *security*.

So the models grew a nervous system.

The Architect rung is where the ladder ends, but the work on it does not.

This book opened on one diagram — [The MAGE Method at a Glance](0.1-the-mage-method-at-a-glance.html) — that named every part before the argument had earned it.

Module 6 — Implications for Software Engineering

After Module 6 — the reader can
  • evaluateAfter Part 6, the reader can evaluate the method's implications for the discipline — where the judgment moved, what stays human, and where models become the universal language of engineering. declared

Lesson6.0-toward-a-theory-of-mage 6.0-toward-a-theory-of-mage

[ref:mage-dynamic-model] draws the whole theory on one diagram: a single set of constructs rather than four separate pictures, because the four dynamics act on the same system.

Each dynamic gets its own section below, and each opens with a simplified diagram of just its local causal path.

Not all governance is discovered through failure; the blue path, in [ref:mage-loop-1], seeds the environment before any agent runs.

The red loop, in [ref:mage-loop-2], is where work outruns a weak environment and the gap surfaces as pressure.

A structural diagnosis triggers governance adaptation, the green loop of [ref:mage-loop-3].

Successful governance does not end the process; the purple loop of [ref:mage-loop-4] reopens it.

The two conditions the book leaned on — capability-fit and authority — are not global switches over the whole model.

MAGE is a capability model, not a maturity ladder, and the distinction matters because the field has been here before.

The model earns its keep only if its outcomes can be watched.

A second discipline governs how the environment itself is read.

Here is where the model sticks its neck out.

Several claims read more precisely as consequences or domain-specific instances of the seven than as coequal predictions.

Two of the hypotheses have a form clean enough to write down.

Durable throughput is raw velocity net of what churn eats:

The second relation contrasts two ways to hold a failure class.

The theory did not arrive whole.

The induced kernel and its later extensions are epistemically different, and the chapter should not blur them.

The seven hypotheses suggest a focused program, not a scatter of disconnected tests.

The claim of MAGE is not that more governance produces better software.

Lesson6.1-implications-for-se 6.1-implications-for-se

After this lesson — the reader can
  • evaluateAfter this chapter, the reader can evaluate the discipline-level implications: where judgment moved, what saturates, and why models are the universal language of engineering. declared

The tidy version of governance says: figure out your obligations in advance, encode them as mechanisms, and let the agents run inside the fence.

The volume is only half of why supervision fails.

Fred Brooks warned the field off silver bullets forty years ago.

If implementation is abundant, the human's comparative advantage moves to the work that surrounds the code: framing the problem, discovering the abstraction, making the architectural call, and designing the governance under which fast code can be trusted.

A few consequences follow, and I will keep them short because each could be its own argument.

The theory gives the chapter's scattered observations a single shape.

Here is the claim the whole book has been climbing toward.

Every claim in this book rests on a single deep case: one repository, one method, roughly two years.

Throughout this book the test suite, the lint, and the conformance gate appear as *controls* — the deterministic machinery that converts a probabilistic generator's output into something an engineer can trust.

The most instructive negative result in this case study is one where the measurement *failed to find an effect* — and the failure is the finding.

A reasonable reader reaches this point with a methodological objection: *this is all one repository.* The objection is correct, and meeting it squarely is itself a contribution — because the AI-augmented engineering literature is currently split between two evidence forms that answer different questions, and conflating them is the field's most common mistake.

Set this case's unmeasured threads against the field they belong to, because the difficulty is not local to one repository.

I should be plain about the limits of this book.

Lesson6.2-conclusion 6.2-conclusion

After this lesson — the reader can
  • analyzeAfter this chapter, the reader can situate the book in the SE literature and identify the part of the work that stays human. declared

We opened by calling the agent a 3D printer, not a stapler.

You do not have to adopt all of this at once, and you should not.

Lesson6.4-colophon 6.4-colophon

This book was set in Fraunces for display, Source Sans 3 for the body, and IBM Plex Mono for code, on a warm paper stock with a single burnt umber accent.

The argument no longer lived solely in prose.

Each model carried one facet of the manuscript's structure, and a check held that facet consistent as the prose moved.

Running the method on the manuscript followed the same loop the book teaches for code:

Large language models were part of making this book, and it would be coy not to say so.

The machinery had a firm boundary, and it is worth stating without hedging.