ProductiveTechTalk - AI, Development Tools, and Productivity Blog

Harness Engineering: The AI-Agnostic Way to Ship Consistent Code

Kim Jongwook · 2026-03-24

TL;DR

  • Harness engineering is a design method that forces consistent code quality across any AI model.
  • It bundles CPS/PRD docs, linter rules, and evaluation into one “harness” around AI.
  • Forward Deployed Engineers use it to turn vague client needs into robust enterprise systems.
  • Linter-based constraints make AI-generated code idempotent and human-readable long after delivery.
  • Custom evaluation dashboards let enterprises monitor AI agents’ quality like uptime metrics.
Table of Contents

Harness engineering is a software design approach that forces AI-generated code to converge toward one consistent structure, regardless of which large language model is used. Instead of relying on “good prompts,” it wraps AI in a harness of documents, linters, and evaluation rules so the output is predictable, auditable, and maintainable.

Related: AI Coding Workflow in 2026: 12 Builder Insights | Guide

Related: AI Coding Revolution: 12 Insights for 2026 | Guide

Related: AI Native startups & intelligence allocation explained

Related: AI Development Workflow: 12 Lessons for 2026 | Guide

This method has been battle-tested by Forward Deployed Engineers (FDEs) at DIO and SpaceY on real enterprise AI transformation projects. By applying it, they can swap between Claude, Codex, and Gemini and still get near-identical codebases in naming, structure, and design system. This post breaks down how that works in practice, using a delivery platform as the running example.


What Is Harness Engineering and Why Does It Matter?

FDE transforming messy inputs into CPS and PRD documents

Harness engineering is a software building method that forces AI models to produce idempotent — repeatably consistent — code outputs under fixed design rules. Rather than coupling your workflow to a specific LLM like Claude or GPT, it defines a harness of design docs, linter rules, and evaluation metrics that any model must obey.

The underlying assumption is that AI models will keep shifting rank. One month a Claude variant looks strongest; the next, a GPT or Gemini release jumps ahead. With a well-constructed harness, you swap the model and still get the same structural output.

“Whether you use Claude, Codex, or Gemini, if you use harness engineering well, you can force them toward the same output.”

In enterprise projects, that stability matters more than peak benchmark scores. Systems need to be maintained by standard SI teams — often in limited-internet environments — long after the original AI experts and FDEs have moved on.

Who Are Forward Deployed Engineers (FDEs)?

A Forward Deployed Engineer is a field engineer who embeds with the client, defines requirements, and builds prototypes from zero to one using AI tools. The role originated at Palantir and is now central to enterprise AI transformation programs.

DIO and SpaceY have adopted this FDE model, and within it, harness engineering has become a core methodology. In practice, it lets FDEs:

  • Decompose fuzzy business needs into concrete systems
  • Use multiple AI models interchangeably
  • Hand off robust, understandable code to traditional development teams

The “embedded builder plus strict harness” combination dramatically reduces the gap between what stakeholders describe and what actually ships. That gap is usually where enterprise AI projects fall apart.


How Does the End-to-End Harness Engineering Flow Work?

Linter enforcing identical code structure across AI models

The harness engineering flow turns loose conversations into stable, AI-generated systems through six stages:

  1. Requirements collection
  2. Plan
  3. Design analysis (CPS · PRD)
  4. Architecture design
  5. Code generation + linter enforcement
  6. Evaluation

To make this concrete, FDE Kim Jiwoon ran these stages against a dummy delivery platform spec. That platform ultimately needs four components:

  • Consumer ordering app
  • Courier app
  • Restaurant order acceptance app
  • Admin dashboard

Here’s where it gets interesting: most clients initially think “we just need a consumer app.” Structured conversations gradually surface the need for courier, restaurant, and admin tooling. Surfacing that scope early is itself part of the FDE’s job.

Running all six stages through three AI models across four apps produces 12 total outputs. With the right harness, all 12 converge on effectively the same design system, file structure, and naming conventions. Twelve different paths, one final structure — that convergence is what “idempotency” means here.


What Happens in the Plan Stage and How Is CPS Created?

The Plan stage turns unstructured client dialogue into stable documentation. FDEs typically run up to four meetings a week with the client — sometimes twice a day, once at the start and once at the end. Each meeting does two things: reviews what was produced in the last session and aligns on concrete goals for the current one.

The primary artifact is the meeting log — a structured summary that distills messy, divergent discussions into coherent, traceable records.

Why Is “Don’t Limit the Client” a Key Meeting Principle?

FDEs follow a strict rule of not interrupting clients. If two FDEs are in the room and one moves to cut someone off, the other will signal them to hold back.

The reason is simple: the more detailed the client’s comments, the richer the data for downstream design decisions. You can always filter signal from noise later. You can’t recover information that was never captured.

From these accumulated logs, the CPS (Context–Problem–Solution) document is derived. Inspired by internal Palantir practices, it answers three things:

  • In what context is the client operating?
  • What problems are they actually facing?
  • What solution should be proposed?

CPS lives in the client’s GitHub and is updated regularly. At project start and completion, it’s packaged as a polished PDF — often using LaTeX templates — and formally delivered.

In practice, the CPS format is one of the fastest ways to keep stakeholders aligned without drowning them in PRD complexity.


How Does Design Analysis Use DDD and Principles?

Design analysis turns CPS insights into the skeleton of the software system. It establishes high-level rules and domain structures that AI must code against.

The stage starts with principles. For an AI agent project, those might look like:

  • “No hallucinations allowed”
  • “Human in the loop is mandatory”
  • “Audit logs must be comprehensive”

These aren’t aspirational values — they’re top-level constraints that shape every downstream decision.

How Do Definitions and Hierarchies Shape the System?

After principles, the team co-defines domain concepts with the client. Key terms get clarified, and their relationships are made explicit.

FDE Kim Jiwoon applies Domain-Driven Design (DDD) here with a clear sequence:

  • Principle → Definition → Structure → Data flow

Once the hierarchy is established, data structures and flows fall into place naturally. At that point, AI’s job is simply to implement what the design already specifies.

The PRD (Product Requirements Document) is also written in this phase — though its actual role is worth understanding. Clients rarely read PRDs in detail. They react to the running software instead: “This button doesn’t feel right” or “We might need an additional tool.” The PRD’s real value is internal: it keeps design decisions coherent within the team and helps new developers get up to speed during maintenance and refactors. A good PRD often matters more six months after launch than it does during the initial build.


How Does Linter-Based Code Enforcement Create Idempotent Outputs?

Linter-based code enforcement is the mechanism that makes harness engineering idempotent in practice. It forces AI-generated code to follow strict, predefined rules — automatically, at commit time.

Take a “restaurant list page” as an example. Left to its own devices, an AI model might produce filenames like:

  • restaurant-list-page
  • restaurant-search-page
  • restaurants-page

Harness engineering replaces that ambiguity with explicit domain-based rules:

  • Use plural nouns for filenames
  • No suffixes like list, detail, or search in filenames

These rules are enforced via linter configuration, not just style guidelines people can ignore.

How Deep Do the Linter Rules Go?

Filenames are just the entry point. Once those are locked, the enforcement chain extends to:

  • Class names in the file
  • Helper method names
  • Import order (e.g., alphabetical)
  • Barrel file export rules

The linter runs automatically before any AI-generated code is committed. Violations block the commit. Engineers don’t need to ask the model “did you follow the structure?” — the pipeline answers that question automatically.

Kim Jiwoon compares this to a design system in the UI sense: designers maintain brand consistency by working inside strict constraints, and the same logic applies to code. He also uses the pattern for bug fixes — instead of complex refactors, delete the problematic module and ask AI to regenerate it against the existing interface and implementation contracts. Because the structure is rigid, regeneration is fast and safe.

What Are the Downsides?

There’s a real trade-off. Human-optimized guardrails can conflict with how AI models naturally write code, which may be more token-efficient from the model’s perspective. But in enterprise settings, that cost is worth it:

  • Code stays readable for humans, even without internet access
  • Maintenance teams can safely own it after FDEs leave
  • Codebases hold their shape across model swaps

Testing similar linter-enforced workflows with ESLint and pre-commit bears this out — the drop in stylistic variance more than compensates for slightly longer initial prompts.


How Does Enterprise Evaluation Monitor AI Quality Over Time?

Enterprise evaluation is a custom monitoring framework that tracks whether AI systems behave correctly after deployment — not just at launch. It’s the final stage of harness engineering and the main quality assurance mechanism once the system is live.

Standard RAG (Retrieval-Augmented Generation) evaluations typically measure:

  • Context relevance — how well the answer uses retrieved context
  • Answer faithfulness — whether the answer sticks to evidence
  • Source accuracy — correctness of cited sources
  • Completeness — whether key information is missing

Why Must Evaluation Be Customized Per Organization?

Generic frameworks rarely fit enterprise reality. Each organization has its own tolerance for AI errors, and that tolerance has to drive the evaluation design.

One organization might say: “If we ask 100 questions, it’s better to answer nothing than to be wrong 10 times.” Another might say: “Even 20 wrong answers are fine — always respond.” These aren’t philosophical positions; they’re business requirements that determine how the system is tuned.

DIO’s FDEs co-design these rules with clients, building organization-specific evaluation methodology on top of open-source tooling:

CEO Hwang Hyuntae likens the result to Datadog for AI agents — sometimes calling it “Agent Dog”:

AI agents must be monitored continuously so that one year after deployment, their quality metrics still hold up.

The evaluation dashboard serves two audiences: DIO, to track and improve system quality internally, and clients, who need ongoing evidence that the system is still working as expected. Surfacing these metrics early also reduces anxiety around deploying autonomous agents in production — which, in my experience, is usually the biggest blocker to getting sign-off.


How Does Harness Engineering Support Team Collaboration and Knowledge Assets?

Team-level harness engineering is about aligning mental models, not just sharing tools. It turns individual FDE practices into shared organizational conventions.

At DIO, all project outputs are stored in GitHub team repositories, logged in Notion, and communicated through Slack. With just those three tools, any team member can pick up or reference another FDE’s project.

The critical part isn’t the coding convention itself — it’s the reasoning behind the design. Because each client and KPI differs, rigid one-size-fits-all methods don’t hold up. Instead, DIO sets a small set of non-negotiable principles at the team level, then:

  • Holds regular review sessions on a fixed weekday
  • Has each person share their design approach
  • Trades feedback from different perspectives

This collective process gradually aligns design philosophies and turns tacit know-how into something explicit and transferable.

Hwang Hyuntae draws a parallel to how classic dev teams standardized code and wiki conventions — AI-era teams need to standardize design documents and methodologies themselves. Just as firms like McKinsey or BCG codified their planning approaches into books and frameworks, enterprise AI transformation needs similar systematization. DIO is even drafting an academic-style paper to define Forward Deployed Engineering as a formal discipline.

What separates scalable AI teams from hero-based ones is exactly this kind of codification. Without it, the knowledge walks out the door when the FDE does.


How Do Different AI Models Compare Under a Harness?

The harness is the strategy; model selection is just tactics. Under a well-constructed harness, Claude, Codex, and Gemini can all produce the same structured output — the differences become mostly cosmetic.

Aspect Claude Codex Gemini
Primary Strength Long-form reasoning and structured text Code generation and completion Multimodal understanding and integration
Behavior Under Harness Follows CPS/PRD instructions tightly Adapts quickly to linter-based constraints Aligns well with structured prompts and docs
Model Swappability Interchangeable when harness is strong Interchangeable when harness is strong Interchangeable when harness is strong
Idempotent Output Goal Produces near-identical design systems, file structures, and naming conventions across all three models

Authoritative references on these models’ capabilities:

When swapping models mid-project within a strict ESLint + CPS harness, the diffs tend to show up in comments and minor stylistic choices — not in structure. That’s the convergence harness engineering is designed to produce.


How Can Teams Start Practicing Harness Engineering?

Starting out, harness engineering is more mindset than tooling. The goal is to intentionally constrain AI output in one direction. You don’t need a sophisticated setup — you need clear rules and the discipline to enforce them.

Step one: codify project-wide principles. How will errors be handled? What are your filename conventions? What import order do you use? Even simple, explicit rules significantly stabilize AI-generated code.

Step two: connect a linter to Git hooks so validation runs at commit time. Good options:

Tie these into pre-commit hooks. AI can generate whatever it wants — it just can’t commit without passing your rules.

Step three: write CPS documents, even short ones. A brief note on “why this feature exists, what problem it solves, and how” will improve both AI interactions and team communication more than most people expect.

Step four: agree on evaluation criteria before you start. Without shared answers to “when is this AI system working well?” and “what error rate is acceptable?”, quality degrades silently after deployment and nobody catches it until something breaks visibly.

The real value of a harness shows up not during the initial build, but months later — when a new developer joins, when an AI model gets upgraded, or when the client wants a major new workflow. A well-defined harness turns those moments into manageable, predictable changes. Without one, they tend to become risky rewrites.


Frequently Asked Questions

Q: What is harness engineering in AI software development?

A: Harness engineering is a method of building software where design documents, linter rules, and evaluation frameworks form a “harness” around AI models. This harness forces any model — Claude, Codex, Gemini — to generate code that follows predefined principles and structures. The result is idempotent, consistent outputs regardless of underlying model changes.

Q: How is CPS different from a traditional PRD?

A: CPS (Context–Problem–Solution) captures why a feature exists, what problem it solves, and in what environment. PRDs focus more on detailed requirements and behaviors. In harness engineering, CPS aligns business context and problem framing, while PRDs act as internal knowledge assets to keep design decisions coherent and aid future developers.

Q: Why are linters so important in harness engineering?

A: Linters provide automated, enforceable rules that AI-generated code cannot bypass. By blocking commits that break naming, structure, or import order rules, they turn design conventions into hard constraints. This ensures that even if the AI’s style shifts, the codebase stays structurally consistent and human-readable.

Q: How does evaluation differ between consumer and enterprise AI systems?

A: Enterprise systems require evaluation tuned to organizational risk tolerance. Generic metrics like relevance and faithfulness are a starting point, but enterprises must decide whether they prefer cautious silence or more aggressive answering with occasional errors. Harness engineering designs these evaluation criteria with the client and monitors them continuously through dashboards.

Q: How can a small team start using harness engineering without heavy overhead?

A: Start with a one-page principles document, a linter with pre-commit hooks, and a brief CPS note for every feature. Even those three practices stabilize AI-generated code noticeably. Over time, add PRDs, more sophisticated evaluation metrics, and shared repositories for harness templates.


Conclusion

Harness engineering is a practical answer to a volatile AI landscape where models change faster than enterprise systems can. By wrapping AI in CPS/PRD documents, linter-based enforcement, and custom evaluation dashboards, teams gain repeatability, maintainability, and model-agnostic stability.

Three things stand out as the real core of the method:

  • Principles and CPS clarify what to build and why, long before code is written.
  • Linter guardrails turn preferences into enforced structure, making outputs idempotent across models.
  • Organization-specific evaluation keeps AI agents accountable over time, not just at launch.

As AI agents become a routine part of enterprise software, the question will shift from “which model is best?” to “which harness keeps my system reliable for years?” The teams building that harness now are the ones who won’t be scrambling every time the leaderboard reshuffles.

What is harness engineering in AI software development?

Harness engineering is a method of wrapping AI models in design documents, linter rules, and evaluation frameworks so they all produce consistent, idempotent code. By enforcing these constraints, teams get predictable, auditable outputs regardless of which underlying AI model they use.

How does harness engineering keep AI-generated code consistent across models?

Harness engineering defines strict CPS/PRD specs, linter-based naming and structure constraints, and evaluation metrics that every AI model must obey. When Claude, Codex, or Gemini are used under the same harness, their code converges on the same design system, file structure, and naming conventions.

Why are linters critical to harness engineering?

Linters enforce non-negotiable rules on filenames, class names, imports, and structure, blocking any AI-generated code that violates them. This turns preferences into hard guarantees, making the codebase idempotent, human-readable, and maintainable even as AI models or team members change.

What role do CPS and PRD documents play in harness engineering?

CPS documents capture the client’s context, real problems, and proposed solutions, while PRDs specify detailed behaviors and requirements. Together they define the target system that AI must implement, aligning stakeholders and giving Forward Deployed Engineers a stable blueprint for AI-assisted development.

How do enterprises evaluate AI agents built with harness engineering?

Enterprises co-design custom evaluation dashboards that track metrics like relevance, faithfulness, accuracy, and completeness against their risk tolerance. These Datadog-like views let teams monitor AI agents continuously so quality remains acceptable months or years after deployment.






Found this article helpful?

Get more tech insights delivered to you.

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.








Discover more from ProductiveTechTalk

Subscribe to get the latest posts sent to your email.

ProductiveTechTalk Avatar

Published by

One response to “Harness Engineering for Consistent AI Code | 2026”

  1. ProductiveTechTalk Avatar

    I really like the idea of using linter-based constraints to make AI-generated code idempotent and human-readable over time. That feels like the missing piece in a lot of “AI coding assistant” stories, where the initial demo looks great but maintenance is a nightmare. Curious how strict those linters have to be before they start fighting the productivity gains from the models themselves.

    Source: https://www.youtube.com/watch?v=A8PMyC7W_vg

Leave a Reply

Discover more from ProductiveTechTalk

Subscribe now to keep reading and get access to the full archive.

Continue reading