<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: inetgas</title>
    <description>The latest articles on DEV Community by inetgas (@inetgas).</description>
    <link>https://dev.to/inetgas</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3861216%2Ff3b3e10a-10bf-4b63-818f-950cdb4509d7.png</url>
      <title>DEV Community: inetgas</title>
      <link>https://dev.to/inetgas</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/inetgas"/>
    <language>en</language>
    <item>
      <title>Architecture Is the Missing Layer in AI Harness Engineering</title>
      <dc:creator>inetgas</dc:creator>
      <pubDate>Sat, 04 Apr 2026 16:18:55 +0000</pubDate>
      <link>https://dev.to/inetgas/architecture-is-the-missing-layer-in-ai-harness-engineering-2d17</link>
      <guid>https://dev.to/inetgas/architecture-is-the-missing-layer-in-ai-harness-engineering-2d17</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published in longer form on Substack. This DEV version is adapted for software engineers and platform practitioners who want the practical takeaway quickly.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Most AI harness work focuses on execution.&lt;/p&gt;

&lt;p&gt;That makes sense. Teams need better context management, tool access, workflow boundaries, verification, memory, and sub-agent coordination. Without those pieces, coding agents are unreliable fast.&lt;/p&gt;

&lt;p&gt;But there is a different failure mode that those harness improvements do not solve:&lt;/p&gt;

&lt;p&gt;an agent can operate inside a well-designed execution harness and still produce the wrong architecture.&lt;/p&gt;

&lt;p&gt;That is the missing layer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Problem Is Not Just Code Quality
&lt;/h2&gt;

&lt;p&gt;Ask an agent to design a small SaaS product and it will often produce something that is technically coherent and operationally excessive at the same time.&lt;/p&gt;

&lt;p&gt;You get things like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;microservices where a monolith would do&lt;/li&gt;
&lt;li&gt;Kubernetes where managed PaaS is the obvious fit&lt;/li&gt;
&lt;li&gt;heavyweight observability and rollout machinery for a team with no real platform capacity&lt;/li&gt;
&lt;li&gt;provider choices that quietly add lock-in or operational burden&lt;/li&gt;
&lt;li&gt;reliability mechanisms sized for a much larger organization&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;None of that is necessarily irrational.&lt;/p&gt;

&lt;p&gt;It is just architecture optimized for an imaginary team.&lt;/p&gt;

&lt;p&gt;That is what happens when the harness governs what the agent can see and do, but not what kinds of systems it is allowed to design.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the Harness Usually Misses
&lt;/h2&gt;

&lt;p&gt;Most organizations already have architectural constraints, whether they write them down well or not:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;cost ceilings&lt;/li&gt;
&lt;li&gt;preferred cloud/saas providers&lt;/li&gt;
&lt;li&gt;approved deployment models&lt;/li&gt;
&lt;li&gt;auth and identity boundaries&lt;/li&gt;
&lt;li&gt;operational limits&lt;/li&gt;
&lt;li&gt;compliance expectations&lt;/li&gt;
&lt;li&gt;explicit exclusions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The problem is that these often live in:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;docs&lt;/li&gt;
&lt;li&gt;ADRs&lt;/li&gt;
&lt;li&gt;wiki pages&lt;/li&gt;
&lt;li&gt;tribal memory&lt;/li&gt;
&lt;li&gt;architecture review meetings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is not enough for agent-driven workflows.&lt;/p&gt;

&lt;p&gt;If those constraints are not machine-readable and enforceable, the agent is still reasoning inside an underconstrained design space.&lt;/p&gt;

&lt;h2&gt;
  
  
  What I Mean by "Architecture Inside the Harness"
&lt;/h2&gt;

&lt;p&gt;The core idea is simple:&lt;/p&gt;

&lt;p&gt;The harness should not only manage execution. It should also constrain architecture.&lt;/p&gt;

&lt;p&gt;In practice, that means three pieces:&lt;/p&gt;

&lt;h3&gt;
  
  
  1. A pattern registry
&lt;/h3&gt;

&lt;p&gt;Architectural knowledge has to live somewhere reusable.&lt;/p&gt;

&lt;p&gt;A pattern in the registry can encode:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;what constraints it supports&lt;/li&gt;
&lt;li&gt;what NFR thresholds it can satisfy&lt;/li&gt;
&lt;li&gt;what it provides and requires&lt;/li&gt;
&lt;li&gt;what config decisions it exposes&lt;/li&gt;
&lt;li&gt;what cost and adoption trade-offs it carries&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That turns architecture knowledge from conversation into versioned policy.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. A deterministic architecture compiler
&lt;/h3&gt;

&lt;p&gt;The compiler takes a canonical spec and selects patterns based on explicit rules.&lt;/p&gt;

&lt;p&gt;The key property is determinism.&lt;/p&gt;

&lt;p&gt;Given the same inputs, it should produce the same outputs. That gives teams something they can actually review and approve. It also makes architectural change visible as a diff instead of as implementation drift discovered too late.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Workflow rules around the compiler
&lt;/h3&gt;

&lt;p&gt;The compiler alone is not enough.&lt;/p&gt;

&lt;p&gt;You also need workflow discipline that tells the agent:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;when to compile&lt;/li&gt;
&lt;li&gt;when planning has surfaced a real architecture change&lt;/li&gt;
&lt;li&gt;when re-approval is required&lt;/li&gt;
&lt;li&gt;when implementation is allowed to proceed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is what turns architecture from documentation into a control point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Determinism Matters
&lt;/h2&gt;

&lt;p&gt;At the architecture layer, the problem is not mainly creativity. It is governance.&lt;/p&gt;

&lt;p&gt;That is why deterministic behavior matters more than people often expect.&lt;/p&gt;

&lt;p&gt;It gives you:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;reproducibility&lt;/li&gt;
&lt;li&gt;auditability&lt;/li&gt;
&lt;li&gt;explicit assumptions&lt;/li&gt;
&lt;li&gt;explicit exclusions&lt;/li&gt;
&lt;li&gt;a recompile-and-diff path when constraints change&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For senior engineers and platform teams, that is much more useful than a model producing a plausible design summary in slightly different words each time.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Concrete Example
&lt;/h2&gt;

&lt;p&gt;I used this approach in a Bird ID application workflow.&lt;/p&gt;

&lt;p&gt;The product itself was simple: users upload bird photos, an AI model identifies likely species, and results are stored in per-user history.&lt;/p&gt;

&lt;p&gt;The important part was not the feature list. It was the operating context:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;hosted PaaS backend&lt;/li&gt;
&lt;li&gt;managed Postgres&lt;/li&gt;
&lt;li&gt;OIDC for auth&lt;/li&gt;
&lt;li&gt;object storage for uploads&lt;/li&gt;
&lt;li&gt;low traffic&lt;/li&gt;
&lt;li&gt;strong cost sensitivity&lt;/li&gt;
&lt;li&gt;no real ops team&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once those became compiler inputs, the architecture was constrained mechanically rather than conversationally.&lt;/p&gt;

&lt;p&gt;That made it much easier to reject patterns that would have been technically valid but wrong for the project:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;heavyweight deployment patterns&lt;/li&gt;
&lt;li&gt;overly complex topology choices&lt;/li&gt;
&lt;li&gt;infrastructure layers that added operational cost without real payoff&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The downstream effect mattered too. The approved architecture could then be handed to planning and implementation as an explicit contract instead of a loose design memo.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Real Deliverable Is Not Better Documentation
&lt;/h2&gt;

&lt;p&gt;The main output of this style of harnessing is not prettier architecture docs.&lt;/p&gt;

&lt;p&gt;The real output is an enforceable boundary between architecture and implementation.&lt;/p&gt;

&lt;p&gt;That boundary matters because implementation agents are good at creating drift quickly.&lt;/p&gt;

&lt;p&gt;If the architecture says:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;OAuth2/OIDC with PKCE&lt;/li&gt;
&lt;li&gt;hosted PaaS&lt;/li&gt;
&lt;li&gt;managed Postgres&lt;/li&gt;
&lt;li&gt;monolithic service topology&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;then implementation should not quietly reintroduce:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;server-side session state&lt;/li&gt;
&lt;li&gt;new provider choices&lt;/li&gt;
&lt;li&gt;new persistence layers&lt;/li&gt;
&lt;li&gt;unnecessary distributed complexity&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Without a hard boundary, those changes show up as "implementation details." In practice, they are architecture changes.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Platform Teams Should Take From This
&lt;/h2&gt;

&lt;p&gt;If you are building internal agent workflows, the practical lesson is:&lt;/p&gt;

&lt;p&gt;do not stop at context engineering.&lt;/p&gt;

&lt;p&gt;Context engineering improves what the agent can see. Tool engineering improves what the agent can do. But neither is enough to keep the system architecture aligned with actual team constraints.&lt;/p&gt;

&lt;p&gt;Platform teams need something stronger:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;explicit architecture inputs&lt;/li&gt;
&lt;li&gt;deterministic architecture selection&lt;/li&gt;
&lt;li&gt;approval and re-approval boundaries&lt;/li&gt;
&lt;li&gt;implementation workflows that are forced to stay inside the contract&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That is what architecture inside the harness gives you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Closing
&lt;/h2&gt;

&lt;p&gt;The value of a harness is not only that it makes agents more capable.&lt;/p&gt;

&lt;p&gt;The value is that it bounds the solution space so capability is applied in the right direction.&lt;/p&gt;

&lt;p&gt;If the architecture layer stays implicit, fast agents will simply accelerate architectural drift.&lt;/p&gt;

&lt;p&gt;If the architecture layer becomes explicit, reviewable, and enforceable, then agent speed becomes much easier to trust.&lt;/p&gt;

&lt;p&gt;That is the argument: architecture is the missing layer in AI harness engineering.&lt;/p&gt;

&lt;h2&gt;
  
  
  Links
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Longer Substack version: &lt;a href="https://inetgas.substack.com/p/ai-harness-engineering-at-the-architecture" rel="noopener noreferrer"&gt;https://inetgas.substack.com/p/ai-harness-engineering-at-the-architecture&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Architecture Compiler: &lt;a href="https://github.com/inetgas/arch-compiler" rel="noopener noreferrer"&gt;https://github.com/inetgas/arch-compiler&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Bird ID case study: &lt;a href="https://github.com/inetgas/arch-compiler-ai-harness-in-action" rel="noopener noreferrer"&gt;https://github.com/inetgas/arch-compiler-ai-harness-in-action&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>architecture</category>
      <category>softwareengineering</category>
      <category>agentskills</category>
      <category>harnessengineering</category>
    </item>
  </channel>
</rss>
