<?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: Marcos Cruz</title>
    <description>The latest articles on DEV Community by Marcos Cruz (@marcos_cruz).</description>
    <link>https://dev.to/marcos_cruz</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4071092%2F0615c93f-0d7d-4b6e-80bf-a5ba925a945f.jpg</url>
      <title>DEV Community: Marcos Cruz</title>
      <link>https://dev.to/marcos_cruz</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/marcos_cruz"/>
    <language>en</language>
    <item>
      <title>Beyond the Hype: 4 Agentic Design Patterns Every Dev and PM Needs to Know</title>
      <dc:creator>Marcos Cruz</dc:creator>
      <pubDate>Wed, 26 Aug 2026 17:00:53 +0000</pubDate>
      <link>https://dev.to/marcos_cruz/beyond-the-hype-4-agentic-design-patterns-every-dev-and-pm-needs-to-know-2oif</link>
      <guid>https://dev.to/marcos_cruz/beyond-the-hype-4-agentic-design-patterns-every-dev-and-pm-needs-to-know-2oif</guid>
      <description>&lt;p&gt;The current AI landscape is thick with "smoke." Between infinite buzzwords and thousands of AI posts and infographics, it is becoming increasingly difficult to discern what is actually a new architectural breakthrough versus what is just marketing noise.&lt;/p&gt;

&lt;p&gt;With that in mind, here is a breakdown of the &lt;strong&gt;4 core AI design patterns&lt;/strong&gt; for development:&lt;/p&gt;




&lt;h2&gt;
  
  
  1. The Pipeline (Prompt Chaining)
&lt;/h2&gt;

&lt;p&gt;The Pipeline is the foundational pattern of AI Engineering. It treats tasks as a linear sequence of specialized nodes, where the output of one instance becomes the structured input for the next. This provides much-needed granularity to the development process.&lt;/p&gt;

&lt;p&gt;A classic example of this is &lt;strong&gt;Spec-Driven Development&lt;/strong&gt;. Rather than asking an AI to "build an app," we chain specialized instances together:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Design Node:&lt;/strong&gt; Establishes the initial concept and architecture.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Specification Node:&lt;/strong&gt; Translates design into technical requirements.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Task Definition Node:&lt;/strong&gt; Breaks the spec into actionable tickets.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Development Node:&lt;/strong&gt; Executes the code based on the tasks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Review Node:&lt;/strong&gt; Evaluates the final output against the original design.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In a content pipeline, you might have a technical writer agent generate a draft and a marketing-specialized agent generate a high-engagement title. By separating these into nodes, you can swap out models to match the task—using a high-reasoning model for the spec and a faster, more creative model for the title.&lt;/p&gt;




&lt;h2&gt;
  
  
  2. The Router (The Decision Maker)
&lt;/h2&gt;

&lt;p&gt;As your system scales, linear flows become too rigid. The Router pattern introduces branched logic, where a "gatekeeper" analyzes the input query and directs it to the most appropriate specialized worker.&lt;/p&gt;

&lt;p&gt;In a customer support context, a Router determines whether a query belongs to &lt;strong&gt;Billing&lt;/strong&gt;, &lt;strong&gt;Technical Support&lt;/strong&gt;, or &lt;strong&gt;Returns&lt;/strong&gt;. You can implement this via:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LLM-based Classification:&lt;/strong&gt; A model categorizes the intent. This is highly flexible but incurs token costs and latency.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Embeddings-based Similarity:&lt;/strong&gt; The query is converted into a vector and compared against department-specific clusters. This is fast and cost-efficient.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Pro-Tip for Architects:&lt;/strong&gt; Always implement a &lt;strong&gt;Human-in-the-Loop&lt;/strong&gt; fallback. If the Router’s confidence threshold falls below a set level (e.g., 70%), the system should automatically route the ticket to a human agent. This ensures production reliability even when the model is uncertain.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  3. Planner-Executor (The Orchestrator)
&lt;/h2&gt;

&lt;p&gt;The Planner-Executor pattern brings the &lt;strong&gt;"Brain and Workers"&lt;/strong&gt; dynamic to life. This is the preferred pattern for open-ended tasks where the steps to a solution are not known upfront.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;The Planner:&lt;/strong&gt; Acts as the high-level architect (using a powerful model like Claude 3.5 Sonnet). It defines a multi-step plan but does not execute.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;The Executors:&lt;/strong&gt; Specialized workers (often smaller, cheaper models) that carry out the specific steps.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This is best visualized as a &lt;strong&gt;Diamond Diagram&lt;/strong&gt;:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Initial Prompt:&lt;/strong&gt; The task enters the system.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fan-out:&lt;/strong&gt; The system parallelizes multiple tasks at once across different workers to save time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Fan-in:&lt;/strong&gt; A final agent performs a synthesis step to merge diverse outputs into a cohesive result.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This tiering of models—&lt;strong&gt;expensive for planning, cheap for execution&lt;/strong&gt;—is the key to building cost-effective, scalable agentic systems.&lt;/p&gt;




&lt;h2&gt;
  
  
  4. Evaluator-Optimizer (The Adversarial Loop)
&lt;/h2&gt;

&lt;p&gt;To achieve high-quality results, you need an &lt;strong&gt;Adversarial Loop&lt;/strong&gt;. This pattern pits two agents against each other: a &lt;strong&gt;Generator&lt;/strong&gt; and a &lt;strong&gt;Critic&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The Critic evaluates the Generator's output against a specific rubric (e.g., &lt;em&gt;"Must be under 30 words," "Avoid vague adjectives"&lt;/em&gt;). For example, if the Generator describes a backpack as "good and useful," the Critic rejects it for vagueness and demands specific functional benefits.&lt;/p&gt;

&lt;p&gt;The key technical nuance here is the &lt;strong&gt;Conservation of Work&lt;/strong&gt;. In a well-designed loop, the Optimizer is instructed to fix only the specific failures identified by the Critic while preserving everything that already works. This &lt;strong&gt;"delta-only"&lt;/strong&gt; improvement prevents the model from introducing new hallucinations or errors while iterating. This loop-driven refinement consistently outperforms any single-shot prompt, no matter how well-crafted.&lt;/p&gt;




&lt;h2&gt;
  
  
  Key Takeaways
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Agentic Design Patterns&lt;/strong&gt; represent a fundamental shift in software architecture. We are moving away from monolithic, unmanageable prompts toward &lt;strong&gt;semantic separation&lt;/strong&gt;—the art of organizing modular, maintainable agent logic.&lt;/p&gt;

&lt;p&gt;As an Engineer (or AI Engineer, or Agent Architect), your primary value is no longer just writing code; it lies in &lt;strong&gt;context engineering&lt;/strong&gt; and the strategic orchestration of these patterns to simulate reasoning. The more you modularize your logic, the easier it becomes to debug, scale, and optimize. &lt;br&gt;
Is your AI architecture a single-shot "black box," or a structured agentic workflow?&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>architecture</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Harness Engineering? Loop Engineering?</title>
      <dc:creator>Marcos Cruz</dc:creator>
      <pubDate>Mon, 10 Aug 2026 10:23:12 +0000</pubDate>
      <link>https://dev.to/marcos_cruz/harness-engineering-loop-engineering-4ofg</link>
      <guid>https://dev.to/marcos_cruz/harness-engineering-loop-engineering-4ofg</guid>
      <description>&lt;p&gt;In the world of &lt;strong&gt;AI&lt;/strong&gt;, a new concept appears every week. It's nonstop! The reality is that we're constantly bombarded with new technical words, sometimes a repackaged concept and idea with a new, viral name. Many of these concepts even become outdated or are renamed within few weeks.&lt;/p&gt;

&lt;p&gt;How do you avoid getting frustrated along the way? The key is not to blindly follow the hype, but to understand what's behind it.&lt;/p&gt;

&lt;p&gt;Two terms that have generated the most confusion lately are Harness Engineering and Loop Engineering.&lt;/p&gt;

&lt;p&gt;Here's an explanation of their meanings:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Harness Engineering (The tools):&lt;/strong&gt; This involves preparing the entire ecosystem that an artificial intelligence agent needs to perform its job.&lt;br&gt;
In other words, it's when you implement skills, tools, and connections (like MCPs) for the AI ​​so it can interact with your system.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Loop Engineering (The automation):&lt;/strong&gt; This refers to the orchestration and design of workflows (loops). Instead of working in the traditional way by typing a prompt in a chat for the AI ​​to do something on a one-off basis (what's called an "open loop"), you design a cycle where the AI ​​acts automatically in response to certain events.&lt;br&gt;
A practical example: Imagine you configure a loop where, if a system detects an error in your code, an AI agent is automatically triggered, analyzes the error, writes a test, fixes it, and sends you the proposed change ready for review.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Hope it helps to clarify! Cheers! &lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
