Making Agent Output Verifiable: Specs, Context, and Checks

Three words separate one person writing code with AI from enterprise-grade delivery: reliable, efficient, sustainable. This piece covers spec-driven development, context engineering, verifiers, and Skill assets, and how the engineering center of gravity has moved from Prompt to Harness.

On this page · 12 sections

If everyone on a team writes code with AI, is it an AI-native team? No. That only tells you each person's local efficiency has gone up. The real test is simple: after one success, what lets you promise that the next delivery will be just as reliable?

If the answer is “because this Prompt was well written,” the delivery depends on one person's feel for it. Enterprise-grade delivery needs something else: swap the person, the task, or the model version, and the result still lands within an acceptable range.

The Short Version

  • The bar for enterprise-grade delivery is not “it worked this time”: swap the person, the task, or the model version, and the result is still reliable, efficient, and sustainable.
  • Spec-driven development should be tailored by risk: just do small changes, and reserve the full Spec plus human review and explicit authorization for changes that touch production, money, or irreversible operations.
  • The verifier must be independent of what it verifies and has to catch four kinds of problems: wrong, missing, fake, and slow; evidence at different levels cannot substitute for one another.
  • With Skills, quality beats quantity; engineering focus is moving from writing instructions to designing information, environment, boundaries, and evaluation criteria, but the responsibility for accepting the result cannot be delegated.

Three Kinds of “Writing Code with AI” That Are Not the Same Thing

  • Vibe Coding: The goal is exploration and prototyping, and whether the result is good is judged by feel. It suits validating ideas, not going to production.
  • Professional: The engineer is accountable for what they deliver. The question is “Can I stand behind this delivery?”
  • Enterprise: The team can deliver consistently. The question is “If we swap the person, can the team still deliver consistently?”

Only the latter two are in enterprise territory. The step from Professional to Enterprise is turning individual experience into the team's default capability—how to let the 101st engineer directly invoke practices the first 100 have already validated.

Three Core Properties: Reliable, Efficient, Sustainable

Each row of the table gives one property and its meaning; the right-hand column is a question you can use to check yourself.

Core property Meaning Test question
Reliable Every change is verifiable, trustworthy, and risk-controlled Would you ship this change straight to production? On what basis?
Efficient Delivery completes with reasonable time, people, and compute while meeting the quality bar Counting rework and review, did the total cost go down or up?
Sustainable Today's delivery does not damage tomorrow's ability to understand, modify, and evolve the system Six months from now, can the team still read and change this code?

“Efficient” is the one most easily misread as “written fast.” AI generates code quickly, but if what it generates needs three rounds of review before it can merge, or leaves behind modules nobody understands, the efficiency of the whole delivery chain has actually dropped.

The Delivery Loop

Enterprise AI Coding delivery loop; open the full-size SVG

Four things in this loop deserve a closer look: specs, context, verification, and assets.

Spec-Driven: Say What “Done” Means First

The core of spec-driven development (SDD) is plain: before the Agent starts, write the requirements, the technical approach, and the acceptance criteria as documents the Agent can read, people can review, and programs can check against. The Spec is both context for the model and the basis for verification afterward.

It also has real costs, and the community's criticism is not unfounded:

  • the documents get heavy;
  • specs are hard to keep fresh;
  • the process burns time and Tokens;
  • running the full process for a small requirement is using a cannon to kill a mosquito.

So the question is not “SDD or no SDD” but tailoring by risk. In the table, risk rises from top to bottom and the process gets heavier with it:

Type of change Appropriate process
Changing a piece of copy, fixing a well-defined bug Just do it; put the acceptance criteria in the Prompt
A feature with clear boundaries Lightweight Spec: goal, scope, acceptance
Cross-module, with data or interface changes Full Spec: requirements, approach, test plan, rollback
Touches production, money, or irreversible operations Full Spec, plus human review and explicit authorization

Two more practices that are easy to overlook:

  • Code review is tiered by risk too—not every line of AI-generated code needs the same intensity of human review.
  • Historical specs must be archived, otherwise expired specs become stale context that misleads the model.

This matches the conclusion I reached when cutting down my Harness: the value of process lies in controlling consequences, not in constraining every step. See From Workflow Harness to Lightweight Prompts.

Context Engineering: The Right Information at the Right Time

The goal of context engineering fits in one sentence: at the right time, with the right structure, quality, and cost, give the model the information it needs for the task at hand. A few practical habits:

  • The entry file only navigates. A repository-level instruction file should tell the Agent “where to find what,” not cram every rule into itself.
  • Manage memory by scope. Global principles, repository constraints, and personal preferences live in separate layers, each with a clear owner.
  • Confirm the context was actually read. Referencing a document does not mean the model used it; state the purpose when you reference it.
  • Prepare a briefing pack before starting. Aligning on interface definitions, versions, and design constraints up front is far more reliable than letting the Agent guess.
  • Keep exploration noise in a separate context. Let a sub-Agent dig through dozens of files; the main context receives only the conclusion.
  • Leave a verifiable handoff across sessions. Not “it's half done,” but “what is complete, where the evidence is, and what comes next.”

For a fuller discussion, see context loading in the Harness series.

Verification: Wrong, Missing, Fake, Slow

The problems a verifier has to catch fall into four categories:

  • Wrong: Behavior does not match expectations. Found by tests and type checking.
  • Missing: Something the requirements asked for was not done. Found by checking against the acceptance checklist.
  • Fake: It looks done but is not—skipped tests, critical paths that were mocked out (that is, replaced with fake implementations), hard-coded return values. This category is the most dangerous, because it is exactly what slips past a careless check.
  • Slow: Functionally correct, but the performance is unacceptable.

Two principles decide whether verification means anything:

  • The verifier must be independent of what it verifies—an Agent saying “the tests passed” counts only as a signal.
  • Evidence at different levels cannot substitute for one another—tests passing, CI being green, and production being healthy are three different conclusions.

See Verification, Delivery, and Readback.

Skill Assets: Quality over Quantity

Packaging recurring practices into Skills an Agent can invoke is the main way to turn individual experience into team capability. But Skills easily become another form of technical debt. The governance principles I agree with:

  • Start from a minimum viable list. At first, capture only the few that are truly high-frequency and already validated.
  • Don't just take what's out there. Someone else's Skill carries their context and assumptions; copying it over directly often backfires.
  • Quality over quantity. Every additional Skill adds loading cost and one more entry point that can trigger by mistake.
  • Govern in layers. Keep personal, project, and team assets separate, and require validation before a contribution enters the team layer.

Whether a Skill is worth keeping comes down to one thing: does it make the result of the next task of the same kind more stable?

The Shift in Engineering Focus: From Writing Instructions to Shaping the Environment

Looking back over the last few years, the means of improving model performance have expanded outward one layer at a time. The table runs from the innermost layer to the outermost; focus on the right-hand column to see how the engineer's work changes.

Stage Focus What the engineer is doing
Prompt Engineering Stating the task intent, constraints, and success criteria clearly Writing instructions
Context Engineering What the model sees at each step Managing information
Harness Engineering The Agent's runtime environment, capabilities, and boundaries Designing permissions, sandboxes, tools, memory, rollback
Loop Engineering How the perceive-decide-act-feedback loop converges Designing progress judgment, verification, and stop conditions
Graph Engineering How multiple Agents, tools, and task nodes collaborate Designing dependencies, delegation, and control relationships

Every layer evolves in the same direction: the model takes on more and more of the step-level decisions, and people move to designing information, environment, boundaries, and evaluation criteria.

Take the Prompt as an example. A few years ago, to investigate an endpoint that had become slow, you had to prescribe the steps in the Prompt: look at CPU first, then check slow queries, then look downstream.

With today's reasoning models, the more effective approach is to define the task itself:

  • what the symptom is;
  • which tools are available;
  • what evidence counts as having located the root cause;
  • how to report uncertainty.

The Prompt has not disappeared. It has gone from “teaching the model how to think” to “defining what the model must get right,” and from a personal technique to a verifiable, regression-testable behavior contract.

Harness engineering has two tracks:

  • the engineering track owns permissions, sandboxes (that is, isolated execution environments), tool registration, logging, and rollback;
  • the algorithm track owns memory recall, context ranking, tool selection, and self-evaluation.

There is only one criterion: any work that can change an Agent's behavior space, decision quality, or capability boundary belongs to the Harness.

What This Means for People

The tools have changed; the responsibility has not moved. A people-first approach comes down to three points:

  • Role: AI takes over more of the execution, and people put their energy into defining, designing, judging, verifying, and improving. A question worth asking yourself every six months: after using a Coding Agent for this long, has the complexity I can handle gone up?
  • Production: The object of attention expands from a single task, to the process, to a production system that runs continuously. Every completed task should give the system one grounded, re-verifiable opportunity to improve.
  • Responsibility: Be accountable for the delivered result, the long-term software assets, the real business outcome, and the team's engineering capability. Execution can be delegated; the responsibility for accepting the result cannot.

This also maps to several shifts in how we work:

  • from completing tasks to delivering outcomes;
  • from executor to requirement definer;
  • from builder to reviewer;
  • from writing implementations to designing rules and boundaries;
  • from solving it yourself to orchestrating intelligence;
  • from one-off delivery to accumulating capability.

I wrote about similar changes in Work Habits I Changed as My Scope Grew—they did not first appear in the AI era; AI has just accelerated them enormously.

Two Practical Questions at the Team Level

When everyone has an Agent, how does the team collaborate? Turn expert experience into capabilities that are invocable, verifiable, and maintained by someone, and reduce verbal handoffs. Shared assets are no longer just code, libraries, and documents; they also include context, knowledge, Skills, evaluation sets, and workflows.

The organization wants to accumulate capability; individuals worry about being “distilled.” This is a real concern, and dodging it only turns sharing into a formality. What works is making the agreement explicit: the scope of authorization, the record of contribution, the maintenance investment, recognition and reward, and which harder problems the individual gets to take on once the capability has been captured. Old capabilities enter the organization's assets so that people are freed up to face new problems, not so that people become replaceable.

The next piece is the most infrastructure-heavy in this series: Why Model Calls Need a Unified Execution Boundary.

Note

This article is my notes and further thinking after studying material from an enterprise Agent engineering architecture course (“企业级 Agent 工程架构实战营”). The structure, wording, and diagrams are all rewritten and combined with my own Harness practice; the judgments are my own responsibility.

Related notes

Working on something similar?

I'm always happy to compare notes on distributed systems, delivery, and applied AI.

[email protected]