Introduction
15 min read

Introduction

Friday, 4:03 PM.

You use an AI assistant to ship a feature fast:

“Add cursor pagination to GET /api/users without breaking existing clients.”

It changes the response from an array to an object containing items and next_cursor. It updates the handler and OpenAPI contract, regenerates the in-repository client, and rewrites the tests, fixtures, and snapshots around the new shape.

The diff is coherent. Every candidate-controlled surface agrees. CI passes, the assistant reports that pagination is complete, and you merge.

Velocity is high. Friction is low. Your confidence comes from a candidate that appears to corroborate itself.

Saturday morning, client requests begin failing.

Previously released clients still expect an array. The candidate changed the implementation and the evidence inside its own scope, but nothing compared the proposed response with the last released interface—the independently admitted compatibility baseline.

--- a/openapi.yaml
+++ b/openapi.yaml
@@ -318,4 +318,11 @@
     schema:
-      type: array
-      items:
-        $ref: "#/components/schemas/User"
+      type: object
+      required: [items, next_cursor]
+      properties:
+        items:
+          type: array
+          items:
+            $ref: "#/components/schemas/User"
+        next_cursor:
+          type: string
+          nullable: true

The model did not merely make one bad edit. It propagated one interpretation across implementation, specification, generated code, and candidate-controlled checks. A human can make the same mistake. AI changes the economics of that mistake: one assumption can spread across many plausible artifacts in seconds and return as a convincing green result.

Now place the same change inside a governed workflow. Activated intent requires compatibility with the released response contract. The pinned contract baseline and compatibility Validator remain outside candidate authority, while generated tests count as supporting evidence. The first candidate fails because released clients cannot consume the new envelope. That finding returns while intent and scope stay fixed. A corrected candidate preserves compatibility, passes the protected check, and becomes a sealed proposal. A separate current-base admission decision determines whether it is merged.

The Architecture in Brief

Treat the change process itself as a versioned engineering artifact. Its work contract states the intended result, who or what has authority, what may change, and which evidence is required. The runtime enforces permitted effects, transitions, and stopping rules. A separate gate decides whether the candidate becomes effective, and each run leaves enough evidence to reconstruct that decision.

This book develops that architecture through software change, where the problem is acute and the mechanisms can be made precise. The same distinctions may inform other high-rate domains, but each domain must supply its own authority, evidence, effects, and admission rules.

This is not about sprinkling AI into continuous integration (CI). CI makes selected product checks repeatable. Software Development as Code (SDaC) makes selected properties of the change process explicit and enforceable.

Follow the arrows: express intent, produce one bounded candidate, gather independent evidence, and seal a successful proposal. Applying that proposal is a separate authorized decision. A finding can support another bounded attempt or an evidenced stop; it cannot widen authority.

flowchart TD
  I["Declared intent"] --> C["Bounded candidate"]
  C --> E["Independent evidence"]
  E -->|"sufficient"| S["Sealed proposal"]
  S --> A["Separate admission"]
  E -->|"finding"| R["Refine next candidate<br/>or seal evidenced stop"]

Caption: The generator may sit inside candidate production, but the architecture begins with declared intent and ends with independent admission. Evidence can justify refinement or closure; it cannot authorize its own effect.

The primary claim is architectural, not a productivity result.

Design thesis. Human intelligence directs artificial intelligence through governed workflows. Human judgment enters the system through decisions people have already made or encoded in adopted policy. Those decisions fix the intent of the work, who has authority, and what constraints apply. They also fix the required evidence, the budgets that limit the run, and the separate rule for admitting a result. AI may propose, evaluate, or route work inside those decisions; it may not rewrite them during the run. Feedback from declared evidence is the primary mechanism by which the workflow adapts. It guides refinement, stopping, and escalation without requiring a new human decision at every step.

A workflow may contain one or many probabilistic steps arranged sequentially, conditionally, or in parallel. Some steps may repeat inside one finite run; the complete workflow may run again when Terrain or adopted intent changes. Chapter 2 makes those two scales precise and shows how a probabilistic step may wrap anything from a model call to a larger agentic system.

Architectural mechanism. Each probabilistic step operates under a declared contract. The contract fixes its allowed inputs, authority, effects, and budgets. It also defines the outputs the step must produce, the evidence and provenance it must retain, and the terminal outcomes it may reach. The enclosing workflow fixes transition rules, stopping conditions, and admission outside those steps. Intermediate outputs remain candidates or evidence until declared checks and routing rules allow them to advance.

Composition proposition. A governed step can become a reusable capability inside a larger workflow. That requires stable input and output contracts and declared authority. Its effects must be bounded, its evidence requirements explicit, and its terminal outcomes and failure semantics visible to the enclosing workflow. The enclosing workflow cannot reinterpret a step’s failure as success, inherit undeclared effects, or grant authority the step never possessed. Composing such capabilities creates a workflow factory that can retain organization-specific contracts, checks, context, evidence, and adopted operating knowledge.

Operational hypothesis. For recurring work that can be decomposed into bounded steps, composed governed workflows using structured feedback may produce greater operational value than isolated one-shot queries or manually orchestrated use of the same probabilistic capabilities.

Speed is central to this hypothesis in rapidly changing, AI-exposed environments. In environments where competitors also accelerate search and implementation, the relevant measure is not candidate-generation speed but the time from meaningful change, through any required update to adopted intent, to a validated and admitted response.

Empirical test. Whether reuse and composition reduce routine human intervention, shorten the path from meaningful change to an admitted response, or improve operational value must be established on comparable workflows after full ownership cost. The architecture may improve governability without improving cost or delivery, and competitive advantage remains a further strategic hypothesis.

Generation Is One Part of the System

I build these systems and work with regulated organizations trying to use them seriously. The deeper I go, the less impressed I am by generation alone.

The opening showed the gap at an interface boundary. The same gap appears in smaller changes: satisfying visible requirements is not the same as producing good engineering.

In one author-observed coding session, a capable model produced eight lines of quadratic Python to remove duplicates while preserving order.1 For the hashable values and Python version in question, the language already offered an idiomatic expression with expected linear behavior: list(dict.fromkeys(items)). The generated version was plausible. It was readable. It could pass ordinary examples. It was still poor engineering.

This is not only a story about one model making a mistake. It exposes the gap between satisfying visible requirements and producing a good result. A test might establish that duplicates are removed and order is preserved. It says nothing about algorithmic complexity unless someone encodes that property. It says nothing about whether the implementation is idiomatic, maintainable, proportionate, or relevant to the surrounding system.

Formal specifications narrow this gap. Types, schemas, contracts, proofs, and tests make selected properties explicit and checkable. They do not choose those properties for us. A specification can define selected properties completely while remaining silent about others that everyone assumed mattered.

Natural language exposes a complementary problem. It carries enormous amounts of human meaning, but that meaning is compressed, contextual, and culturally negotiated. Words coordinate our attention; they do not reproduce experience or intent exactly. A language model learns statistical relationships among those words. It does not receive the underlying experience or intent directly. Given a small enough set of compatible constraints, it can often wrap them in remarkably convincing structure.

This gap between representations is also where AI is useful. Deterministic tools should perform a transformation when its rules can be fully specified. A compiler, parser, schema generator, or formatter does not need to interpret an open-ended request. A probabilistic step becomes useful where the mapping still requires judgment. In one direction, it can elaborate adopted intent expressed in natural language into proposed contracts, tests, configuration, or implementation. In the other, it can turn formal artifacts and observed behavior into proposed human-readable Maps.

Those directions are related but not symmetric. Map-driven work proposes what should become real under adopted intent. Terrain-to-Map work proposes a description of what currently appears to be real. An implementation cannot recover the intent that originally produced it, and a generated description cannot make itself authoritative.

As the task grows, the difficulty grows faster than the prompt. Requirements interact. Hidden assumptions become relevant. Local improvements create consequences elsewhere. The generator must infer which constraints are firm, which examples are accidental, which conventions are local, and which omitted properties still matter. The problem is not simply the number of requirements. It is the number of relationships among them and the amount of relevant meaning left unstated.

This is why larger generated changes often look better from a distance than they do up close. The outer shape is coherent. The names are plausible. The tests may pass. Underneath, nuance has been replaced by statistically likely structure.

The answer is not to abandon language or formalization. It is to stop asking either representation, or one end-to-end model call, to carry the whole burden. Divide the translation into narrow, governed steps. At each boundary, adopted intent and authority fix the direction, AI may propose across the semantic gap, deterministic tools check what they can, and feedback identifies mismatch. The process must stop when evidence is missing rather than filling the gap with confidence.

That process is the loop. It is not merely a retry wrapper. It tests each partial representation against evidence from Terrain, exposes what the proposed translation missed, and supports a better next decision.

The generator is therefore not the system. It is one process that transforms a state into a candidate next state. The engineering question is the shape of the process around it.

None of this makes model or prompt quality irrelevant. Better models, prompts, and Context Packets shift the candidate distribution: they can produce more relevant proposals, reduce refinement cycles, and make harder Missions feasible. The loop is not a substitute for capability. It is the machinery that turns available capability into bounded proposals, evidence, and governed outcomes. A better generator can improve every compatible workflow without acquiring authority over the rules that judge it.

A Model of Bounded Change

Notation, not proof

A Model of Bounded Change

The notation names a proposed transition. The workflow around that transition determines what was allowed, what evidence counts, and whether any effect becomes real.

Observed state: Zn

The fixed base, current Terrain, and adopted intent used for this run.

Bounded process: P

One finite workflow proposes, checks, refines, or stops under fixed authority.

Sealed result

A supported candidate, a no-op, an external block, or an evidenced failure.

Separate authority

Admission may apply a candidate. Adoption may change future intent or policy.

Feedback adapts the next proposal. It does not widen the active authority, lower the evidence requirement, or admit its own result.

This book treats each bounded unit of engineering work as a proposed state change:

P(Zn) = Zn + 1

Here P is the process, Zn is the observed starting state, and Zn + 1 is the proposed next state. The expression is bookkeeping, not formal evidence that the transition is correct, improved, convergent, or safely composable. Those claims depend on declared intent and evidence:

SDaC writes those answers into artifacts and gates instead of leaving them as shared intuition.

The practical starting point is one recurring, bounded change: declare the property that must remain true, install an independent check, retain the evidence, and prevent the change process from weakening the rule that judges it. That loop is the unit of trust, not the destination.

The composition proposition is that bounded loops can become dependable steps inside larger workflows when their inputs, effects, outputs, checks, and terminal results remain explicit. Each step either reaches its declared acceptance region or stops with inspectable evidence. Composition does not let an enclosing workflow reinterpret failure as success, inherit undeclared effects, or borrow authority that the smaller workflow never had.

Evidence from recurring low-risk workflows can support a separately governed policy proposal. If adopted, that policy can allow instances in the demonstrated class to execute and be admitted without routine human interruption. Human attention moves toward new intent, exceptions, protected rule changes, and high-consequence decisions. The aim is not to remove people from development. It is to build a factory that needs less human attention for each admitted change without weakening the properties that earned that delegation.

Finite, inspectable failure is the safety floor. Convergence is the ambition: most recurring Missions should reach admissible outcomes within their declared budgets and move Terrain toward stated intent. Evidence from exceptions and admitted changes may then support separately governed proposals to improve the Maps, Validators, and workflows that shape the next run.

The Velocity Trap

AI can reduce proposal time dramatically in some workflows and increase total task time in others. Controlled studies have reported both substantial speedups and slowdowns across different tasks, users, and tools.2 The premise needed here is narrower: AI changes candidate economics. It can make it cheaper to propose more alternatives, many plausible enough to demand evaluation. Whether that improves delivery is a local empirical question.

That change is useful only if the loop stays sane. AI can change the clock speed; the trap is treating proposal speed as delivery progress.

A faster proposal loop that drifts is faster drift. A faster proposal loop that breaks is faster breakage. Where AI increases attempted-change rate, it amplifies the practices already present: strong controls absorb more candidates, while weak controls can move cost into review, rework, and incidents.

Where an organization’s delivery system was not trustworthy before AI—because tests are sparse or flaky, integration environments drift, releases depend on manual knowledge, or production feedback is weak—increasing implementation throughput accelerates only the implementation side of the V-model. Specification, verification, validation, release, rollback, and observation remain constrained.

In such settings, a higher-leverage early use of AI may be to strengthen the factory rather than increase code output. It can propose tests, contracts, fixtures, Validators, continuous integration and delivery improvements, deployment checks, rollback mechanisms, and observability. Those proposals still require independent validation; increasing assurance capacity may be more valuable than increasing implementation throughput.

Not every task needs that machinery. A temporary, low-consequence artifact that can be inspected directly may justify little more than generation and inspection. The need for stronger workflow governance rises when an effect persists, is reused, reaches other people or systems, carries hidden obligations, or is costly to reverse.

This is the question SDaC answers: How do you harness accelerated iteration without accelerating into a wall?

SDaC answers by making the loop itself an engineering object: explicit intent, bounded writes, protected Validators, evidence, and stopping rules. A broken loop only makes model capability more dangerous.

Who This Book Is For

This book is for people responsible for making AI-accelerated software change safe and sustainable. Its primary readers are engineers, architects, and platform, developer experience, reliability, and security practitioners who design or govern the systems that turn proposals into admitted reality.

Engineering managers and directors, along with quality and risk owners in regulated environments, can use the architectural argument without implementing every Validator themselves. The detailed mechanisms remain grounded in software change because that is where the problem is sharpest and most measurable.

From Traceability to Governed Loops

SDaC inherits rather than replaces several established mechanisms. The classical V-model supplies a useful spine: formalize intent, implement, then prove correspondence. Continuous integration makes selected checks repeatable. Supply-chain systems add adjacent controls: in-toto records authorized steps and artifact evidence, SLSA defines verifiable provenance, and the Open Policy Agent (OPA) separates policy decisions from their enforcement.3

The contribution developed here is their composition around stochastic proposals. For each run, an independently activated work contract fixes authority; a bounded change step produces a candidate; independent checks produce structured evidence; and declared routing determines whether work refines, closes, or stops. The resulting run record is sealed, while admission remains separate. Retained evidence may support a future Map or policy proposal, but it cannot install that proposal.

A probabilistic implementation step therefore sits inside an executable chain from goal to bounded context and output contract. Assurance remains layered: parsers, schemas, tests, contract and scope checks, transition enforcement, and Ledger evidence. Traceability explains which requirement produced a change; the governed loop also explains how failed candidates refine or stop.

These mechanisms support the architectural claim stated above. They do not prove that an admitted change is good or that governed generation is cheaper. Those outcome claims remain hypotheses to test across comparable workflows.

A Note on Substrate

These principles are portable, but the examples use a simple, familiar setup: standard files, Git for version control, make for orchestration, and Python for scripting.

That gives us a practical environment for demonstrating the core ideas without hiding behind framework-specific machinery. The patterns are meant to transfer to other languages, build systems, and version-control setups.

The specific tools are incidental. The argument depends on their roles and contracts, not on a particular language or runner.

Prerequisites

The examples assume ordinary software-engineering fluency: reading diffs, running checks, and editing text configuration. They do not require model training or control theory.

Part I follows one bounded change from intent through work, validation, result, transition, and evidence. Part II explains why the mechanism works, Part III scales it into repeatable workflows, Part IV protects its governing surfaces, and Part V examines the destination and limits. Chapter 1 begins with the smallest instance: one bounded writer, one scope-matched independent check, one fixed route, and one sealed result before separate adoption.


  1. Author-observed coding session, anonymized to remove repository and model details.↩︎

  2. Controlled studies are task- and population-specific. Peng et al. found 55.8% faster completion on a bounded JavaScript task; Paradis et al. estimated about 21% shorter task time in an enterprise study, with a wide confidence interval and explicit limits on generalization; Becker et al. found 19% longer task time for experienced maintainers working in familiar mature repositories. The studies are not directly comparable and do not establish a universal productivity multiplier.↩︎

  3. in-toto uses owner-signed layouts, authorized functionaries, artifact rules, and signed link metadata to verify supply-chain steps (documentation). SLSA defines provenance as verifiable information about where, when, and how an artifact was produced (specification).↩︎

Share