<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Andinet's Tech blog]]></title><description><![CDATA[A practitioner's notebook on building with AI. I cover agentic AI architectures, AI-native development patterns, and lessons learned applying these techniques i]]></description><link>https://blog.andinet.dev</link><generator>RSS for Node</generator><lastBuildDate>Sun, 15 Nov 2026 19:10:25 GMT</lastBuildDate><atom:link href="https://blog.andinet.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[The Old Rules Still Apply: Why Software Engineering Discipline Matters More in AI Engineering]]></title><description><![CDATA[I have been building software for more than 20 years. Most of that time I was at Kitware, working in open-source medical imaging alongside communities like…]]></description><link>https://blog.andinet.dev/the-old-rules-still-apply-why-software-engineering-discipline-matters-more-in-ai-engineering</link><guid isPermaLink="true">https://blog.andinet.dev/the-old-rules-still-apply-why-software-engineering-discipline-matters-more-in-ai-engineering</guid><dc:creator><![CDATA[Andinet Asmamaw Enquobahrie]]></dc:creator><pubDate>Sat, 17 Oct 2026 12:23:17 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/288651e5-460d-41f6-bc24-ecadc4985f6d.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>I have been <a href="https://andinet.dev">building software for more than 20 years</a>. Most of that time I was at Kitware, working in open-source medical imaging alongside communities like the <a href="https://itk.org/">Insight Toolkit (ITK)</a> and <a href="https://www.slicer.org/">3D Slicer</a>, and on a long list of medical software projects. I picked up engineering habits there that I still use.</p>
<p>Today I work as an AI engineer, and lately I keep hearing that AI is now so good at implementation that the old software engineering principles no longer apply. Why write tests, specs or design documents when a model can generate a working feature in minutes?</p>
<p>I disagree. When implementation becomes cheap, the parts that were never about typing code become the whole job. Knowing what to build, and knowing whether what you built actually works, matter more now than they ever did.</p>
<p>In this post I walk through the practices I believe separate a strong AI-native engineer from someone who is vibe coding: evals and guardrails, specifications and intent, and the deep domain relationships that make both possible. It builds on themes from my earlier posts, <a href="https://blog.andinet.dev/not-everything-needs-an-agent">Not everything needs an agent</a> and <a href="https://blog.andinet.dev/agentic-ai-is-coming-to-the-samd-lifecycle">Agentic AI is coming to the SaMD lifecycle</a>.</p>
<h2>Evals are the new tests</h2>
<p>In the projects I grew up in, testing was not optional. Code was built and tested every night across many operating systems and compilers, and the results went to a shared quality dashboard that anyone could see (<a href="https://slicer.cdash.org/index.php?project=SlicerStable">3D Slicer's CDash dashboard</a> still works this way). A red dashboard was everyone's problem.</p>
<p>That mindset has a name: <a href="https://en.wikipedia.org/wiki/Test-driven_development">test-driven development</a>, popularized by Kent Beck. Define what correct looks like first, then write the code that gets you there.</p>
<p>In AI engineering, the same idea is called evals. Anthropic's own guidance opens with it: "Building a successful LLM-based application starts with clearly defining your success criteria and then designing evaluations to measure performance against them" (<a href="https://platform.claude.com/docs/en/test-and-evaluate/develop-tests">Anthropic docs</a>). Hamel Husain says it directly: unsuccessful AI products "almost always share a common root cause: a failure to create robust evaluation systems" (<a href="https://hamel.dev/blog/posts/evals/">Your AI Product Needs Evals</a>). Start with the evals is what I hear from almost every team that ships.</p>
<p>An eval set does for an AI system what a test suite does for traditional code:</p>
<ul>
<li><p>It turns a vague goal ("the assistant should give good answers") into concrete, checkable cases.</p>
</li>
<li><p>It tells you whether a prompt change, a model upgrade or a new retrieval step made things better or worse.</p>
</li>
<li><p>It lets you move fast without breaking what already works.</p>
</li>
</ul>
<p>The difference is that AI systems are probabilistic. The same input can produce different outputs, and "correct" is often a judgment, not an exact match. That makes evals harder to build than unit tests. You still need them.</p>
<p>Guardrails are closely related. In medical software we designed for patient safety from the start, and we never trusted a component just because it usually worked. Guardrails are those checks for AI: input validation, output filters, policy checks, human-in-the-loop gates and fallbacks when the model is uncertain. I wrote about what that looks like for regulated medical software in <a href="https://blog.andinet.dev/agentic-ai-is-coming-to-the-samd-lifecycle">Agentic AI is coming to the SaMD lifecycle</a>. Guardrails are part of the system's design, not something bolted on after a bad demo.</p>
<p>When an AI can write the implementation for you, the eval set becomes the most valuable code you write.</p>
<h2>Specs and intent are back</h2>
<p>Specs are coming back too. People now talk about spec-driven development (SDD) and intent-driven development (IDD) as if they were new ideas. When GitHub released its open-source <a href="https://github.github.com/spec-kit/">Spec Kit</a>, it described the shift this way: "We're moving from 'code is the source of truth' to 'intent is the source of truth'" (<a href="https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit">GitHub blog, Sept 2025</a>).</p>
<p>In medical software, specs never went away. At Kitware we built IEC 62304-compliant development processes to support FDA 510(k) submissions, where documented requirements and traceability are required. What has changed is the reader. A spec used to be written mostly for other engineers. Now it is also written for an AI agent that will do much of the implementation. An agent is fast and tireless, but it only builds what you describe. A vague spec gives you vague software, just faster.</p>
<p>A good spec or intent document answers the questions an implementation cannot answer for itself:</p>
<ul>
<li><p>Who is this for, and what problem does it solve for them?</p>
</li>
<li><p>What does success look like, and how will we measure it?</p>
</li>
<li><p>What must never happen?</p>
</li>
<li><p>What are the constraints: regulatory, clinical, performance, cost?</p>
</li>
</ul>
<p>Those questions line up closely with evals and guardrails. The spec says what we intend; the evals check that we got it; the guardrails protect against what must never happen. They are three views of the same understanding.</p>
<h2>You can't write intent without knowing the domain</h2>
<p>A model can't do this part. To write a good spec, you have to understand the domain deeply, and that understanding comes from relationships with the people who live in it.</p>
<p>In medical imaging, those people were clinical researchers: clinician scientists who knew the clinical problems and the image data, working next to engineers who could turn algorithms into usable tools. Some of the most important engineering work came from talking with them, learning how they actually worked and what they actually needed.</p>
<p>The 3D Slicer community built this into its culture with <a href="https://projectweek.na-mic.org/">Project Week</a>, a recurring week-long hackathon where the goal is to make progress on real projects rather than report on them. Engineers, researchers and clinicians spend the week in the same room, and it’s easier to understand a problem when the person who has it is next to you.</p>
<p>Today we’d call that intent discovery. We were not guessing what clinicians wanted. We were learning it directly, refining it together, and testing it against their reality. That is exactly the input a modern spec or intent document needs, and exactly what an AI agent cannot invent on its own.</p>
<img src="https://raw.githubusercontent.com/NA-MIC/ProjectWeek/master/PW44_2026_GranCanaria/Photos/PW44_Group.jpg" alt="The Project Week 44 community, Gran Canaria, January 2026" style="display:block;margin:0 auto" />

<p><em>Project Week 44, Gran Canaria, January 2026. Photo:</em> <a href="https://projectweek.na-mic.org/PW44_2026_GranCanaria/"><em>NA-MIC Project Week</em></a><em>.</em></p>
<h2>Why forward-deployed engineering took off</h2>
<p>I don't think it's a coincidence that the forward-deployed engineer (FDE) delivery model has become so popular in AI. Andrew Ng describes an FDE as "an engineer who is embedded within a client organization to help customize solutions" (<a href="https://charonhub.deeplearning.ai/forward-deployed-engineers-and-the-future-of-ai-engineering/">Andrew Ng, DeepLearning.AI, May 2026</a>). Palantir popularized the role, and AI companies including OpenAI and Anthropic now hire for it to turn frontier models into production systems for enterprises (<a href="https://www.semafor.com/article/07/11/2025/how-a-generic-sounding-tech-job-will-transform-ai">Semafor, July 2025</a>).</p>
<p>An FDE sits with the people doing the work, watches where things break, and learns the intent and the spec firsthand instead of reading about it in a ticket. That is the Project Week model, applied to enterprise AI. Being embedded is how you find out what "good" means for this customer, which edge cases matter, and which failures are unacceptable. In other words, it is what you need to write good specs, real evals and real guardrails.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/83b90655-4de4-4c12-b3c7-79738e843395.png" alt="The FDE loop: embedded engineers turn customer reality into specs, evals and guardrails" style="display:block;margin:0 auto" />

<p>The embedded engineer learns from the customer's world, writes that understanding down as specs, evals and guardrails, lets AI agents implement against them, and feeds real use back into the loop.</p>
<p>This is the difference between building something useful and vibe coding. Vibe coding produces software that might solve a hypothetical problem. Embedded, domain-informed engineering produces software that solves a real problem for real people, and you can prove it, because your evals were written from what you learned in the room.</p>
<h2>What a strong AI-native engineer actually does</h2>
<p>If you want to get good at this, here's where I would start.</p>
<ol>
<li><p><strong>Start with evals.</strong> Before writing a prompt or wiring up an agent, write down the cases that define success and failure. Run them on every change.</p>
</li>
<li><p><strong>Design guardrails up front.</strong> Decide what must never happen and build the checks that enforce it, just as you would for any safety-critical component.</p>
</li>
<li><p><strong>Write the spec, even when the AI writes the code.</strong> Capture intent, constraints and success criteria clearly enough that an agent and a teammate would build the same thing.</p>
</li>
<li><p><strong>Get close to the domain.</strong> Spend time with the people who will use what you build. Go to their meetings, sit in their workflows, run your own version of a project week.</p>
</li>
<li><p><strong>Keep the feedback loop tight.</strong> Treat evals like a nightly dashboard: visible, shared, and taken seriously when they go red.</p>
</li>
</ol>
<p>None of these are new. They are the same habits that made long-lived open-source projects like <a href="https://itk.org/">ITK</a> and <a href="https://www.slicer.org/">3D Slicer</a> trustworthy, adapted for systems where the implementation is increasingly written by a model.</p>
<h2>The old rules still apply</h2>
<p>AI writes code faster, but good software still needs the same things. Test-driven development lives on as evals and guardrails. Careful specification lives on as spec-driven and intent-driven development. And the relationships we built with clinical researchers at hackathons and project weeks live on in every embedded engineer learning a customer's real problem.</p>
<p>If anything, these practices matter more now. When implementation is cheap, the scarce skills are knowing what to build and proving that it works. That is what traditional software engineering was always about, and it is what keeps AI systems working after the demo.</p>
<p><em>The views, opinions, and technical perspectives expressed in this article are entirely my own and do not represent, reflect, or imply the positions, strategies, or endorsements of my employer or any organization I am affiliated with.</em></p>
<h2>Sources</h2>
<ol>
<li><p>Andinet's Tech Blog: <a href="https://blog.andinet.dev/not-everything-needs-an-agent">Not everything needs an agent</a> and <a href="https://blog.andinet.dev/agentic-ai-is-coming-to-the-samd-lifecycle">Agentic AI is coming to the SaMD lifecycle</a>.</p>
</li>
<li><p><a href="https://itk.org/">Insight Toolkit (ITK)</a> and its <a href="https://examples.itk.org/documentation/contribute/dashboardsubmission">CDash dashboard</a>.</p>
</li>
<li><p><a href="https://www.slicer.org/">3D Slicer</a> and <a href="https://projectweek.na-mic.org/">NA-MIC Project Week</a>, including <a href="https://projectweek.na-mic.org/PW44_2026_GranCanaria/">Project Week 44, Gran Canaria 2026</a>.</p>
</li>
<li><p><a href="https://en.wikipedia.org/wiki/Test-driven_development">Test-driven development</a>, Wikipedia (Kent Beck, Test-Driven Development by Example).</p>
</li>
<li><p>Anthropic, <a href="https://platform.claude.com/docs/en/test-and-evaluate/develop-tests">Define success criteria and build evaluations</a>.</p>
</li>
<li><p>Hamel Husain, <a href="https://hamel.dev/blog/posts/evals/">Your AI Product Needs Evals</a>.</p>
</li>
<li><p>Den Delimarsky, <a href="https://github.blog/ai-and-ml/generative-ai/spec-driven-development-with-ai-get-started-with-a-new-open-source-toolkit">Spec-driven development with AI: get started with a new open source toolkit</a>, GitHub Blog, Sept 2, 2025, and <a href="https://github.github.com/spec-kit/">Spec Kit</a>.</p>
</li>
<li><p>Andrew Ng, <a href="https://charonhub.deeplearning.ai/forward-deployed-engineers-and-the-future-of-ai-engineering/">Forward Deployed Engineers and the Future of AI Engineering</a>, DeepLearning.AI, May 29, 2026.</p>
</li>
<li><p>Reed Albergotti, <a href="https://www.semafor.com/article/07/11/2025/how-a-generic-sounding-tech-job-will-transform-ai">How a generic-sounding tech job will transform AI</a>, Semafor, July 11, 2025.</p>
</li>
</ol>
]]></content:encoded></item><item><title><![CDATA[Not everything needs an agent]]></title><description><![CDATA[How much of your control flow you hand to inference time, and what it costs you.]]></description><link>https://blog.andinet.dev/not-everything-needs-an-agent</link><guid isPermaLink="true">https://blog.andinet.dev/not-everything-needs-an-agent</guid><dc:creator><![CDATA[Andinet Asmamaw Enquobahrie]]></dc:creator><pubDate>Sun, 26 Jul 2026 12:30:37 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/55c5a46b-f097-4b65-9a38-7fe4660ca2a2.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Most of my work is client engagements building agentic systems across a range of domains, several of them regulated. Over the last year one pattern has become hard to ignore: the insistence that the system be agentic, applied more or less uniformly, regardless of what the problem turns out to require. The architecture arrives before the problem is characterised, and the requirements get fitted to it afterwards.</p>
<p>An example, a system to triage inbound service requests, around two thousand a day, assigning each one an urgency level and routing it to the right team. The design on the table was multi-agent: several specialised agents, with a supervisor coordinating them. I asked what the urgency assignment depended on, and the answer was a spreadsheet — eleven rows, with four predicates carrying most of the logic (service tier, whether the affected system was customer-facing, region, and time of day) and the rest covering escalation paths and on-call rotation.</p>
<p>That spreadsheet is a decision table, and its properties are worth stating explicitly. Coverage of the input space can be verified mechanically, as can overlap between rows. Evaluation takes microseconds. It is a text artifact, so it diffs under review and versions alongside the code. Given a stored input and a ruleset version, any past decision reproduces exactly, including the one that paged an engineer at 3am. The proposed replacement offered none of these properties.</p>
<p>Agentic architectures address a class of problem that was previously intractable: unbounded input formats, and tasks where the next step can only be determined from the results of the last one. That capability is real, and I rely on it. The failure mode is applying it outside that class. What follows is an attempt to make the boundary precise — what each technique guarantees, how to determine which guarantees a given problem requires, and what it costs when the two are mismatched.</p>
<p><strong>TL;DR</strong></p>
<ul>
<li><p><strong>The dial measures one thing: how much of your control flow is decided at inference time</strong> rather than when the system was written. Everything else — model choice, tool count, supervisor topology — is detail.</p>
</li>
<li><p><strong>Generation is a capability, not a synonym for agency.</strong> Interpreting or producing unstructured content is something no rule, solver, or tabular model can do at all. Needing that is a reason to bring in a generative model. It is not, by itself, a reason to hand over control flow.</p>
</li>
<li><p><strong>That handover moves you from testing to sampling.</strong> Fixed control flow can be enumerated and covered. Model-chosen control flow can only be sampled, because the path set is a function of the input distribution and the weights, and you have neither in a checkable form.</p>
</li>
<li><p><strong>Reliability compounds multiplicatively across steps.</strong> Ten steps at 95% each lands at 60% end to end, and agent steps aren't independent.</p>
</li>
<li><p><strong>The techniques you skipped offer guarantees, not just lower cost.</strong> A solver either satisfies every hard constraint or reports infeasibility. There is no third outcome where it returns something plausible.</p>
</li>
<li><p><strong>Build mixtures.</strong> Model at the edges where the input is unbounded, deterministic code where the decision has to hold up, a person on anything you can't reverse.</p>
</li>
</ul>
<hr />
<h2>What the dial is actually measuring</h2>
<p>At the left end of the dial, every branch in the system is chosen when the system is written. At the right end, the branches are chosen during the run, by a model, based on what it has seen so far. Model size, tool count, whether there's a supervisor agent on top — none of that is the axis. The axis is <strong>how much of your control flow you have handed to inference time</strong>.</p>
<p>Two thresholds get crossed along that line, and they're worth separating. The first is where a generative model enters at all: to the left, the system operates on structured inputs and cannot read a paragraph or write one; from the middle rightward, it can. The second is where control flow moves to inference time. The thresholds are independent, and most of the confusion in this area comes from treating them as one. A language model reading a document inside a fixed pipeline has crossed the first and not the second.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/d20232b4-d324-4dcc-ba82-d8b719f1847c.png" alt="figure-1-final  Agentic is a dial, not a switch. A left-to-right line from hard-coded logic, through rules engines, statistical models and language models in a fixed sequence, to agents with tools and fully autonomous agents. Moving left buys predictability and low cost; moving right buys tolerance for messy input." style="display:block;margin:0 auto" />

<p><em>Figure 1 — The same problem can be built at any point on this line. The question is which point it belongs at.</em></p>
<p>That framing is useful because it tells you exactly what you're trading, and the trade is not really about accuracy.</p>
<p>Control flow fixed at authoring time is a finite graph. You can enumerate the paths, write a test per path, measure branch coverage, and know what fraction of the system's behaviour you have actually exercised. When something changes, the diff shows you which paths moved.</p>
<p>Control flow chosen at inference time is not a finite graph you possess. The set of paths the system can take is a joint function of the input distribution and the model weights, and you have neither in a form you can check exhaustively. So you stop testing and start sampling: you assemble an eval set, run it, and get a point estimate of behaviour with a confidence interval attached. That is a legitimate and often necessary way to work. It is a different epistemic position from branch coverage, and the difference is the whole subject of this post.</p>
<p>Everything else follows. Moving right buys tolerance for input you couldn't enumerate. Moving left buys enumerability, per-decision cost measured in microseconds rather than seconds, and the ability to reconstruct a specific past decision exactly. You're always paying for one with the other. The mistake isn't landing on the right-hand side. It's landing there without noticing there was a trade.</p>
<h2>Why the pull toward agents is rational</h2>
<p>Before the criticism, the honest part.</p>
<p><strong>The money has a name on it.</strong> Budget gets approved for an <em>AI initiative</em>, not for <em>we are going to formalise the triage policy</em>. I've watched an architecture get chosen by a line item. Nobody in that chain is being dishonest; the funding is real and it arrived with a label attached.</p>
<p><strong>Demos.</strong> An agent demo is theatre — you watch it think, change its mind, go and fetch something. A decision table demo is a person scrolling a spreadsheet.</p>
<p><strong>Prototypes lie about how finished they are, and there's a mechanical reason.</strong> A prompt-driven prototype carries almost no fixed cost: no schema, no state model, no error taxonomy, no idempotency story. That's why it reaches a working demo in an afternoon. What it also doesn't have is a defined failure surface — so you discover that surface one incident at a time in production, and each discovery becomes a new prompt clause, a validator, or a retry. The cost curve is flat and cheap at the start and then very long. A specified system front-loads the same cost: you argue about the schema and the state transitions before anything runs. That looks slow for three weeks and then stops surprising you. Demo-driven cultures systematically select for the first curve.</p>
<p><strong>And the real one:</strong> people have seen agents do genuinely new things and they want that. The instinct is correct. It has just been generalised well past its evidence.</p>
<h2>What the other techniques actually guarantee</h2>
<p>The usual framing is that rules and classical models are cheaper. That undersells them. The real difference is that they come with guarantees, and guarantees are a category of thing a sampled system cannot offer you at any price.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/60cf7f3c-a128-4b83-8d1a-223fbf41a409.png" alt="figure-2-final — Five ways to make a decision, compared by what each is good for, how each fails, and what each costs: rules and solvers, statistical models, generative models, agentic systems, and people. Generative models and agentic systems are shown as separate columns because only one of them decides what happens next." style="display:block;margin:0 auto" />

<p><em>Figure 2 — Two of these columns use a language model. Only one of them is an agent.</em></p>
<p><strong>Decision tables and state machines</strong> give you completeness and consistency checking. Formalisms like DMN let you ask, mechanically, whether your rule set covers the whole input space and whether any two rows can fire on the same input with conflicting outcomes. Those are static properties, verified without running anything against real data. A finite state machine gives you the same for sequencing: the reachable states are enumerable, so "can this ever end up approved without a signature" is a question you answer by inspection rather than by testing and hoping. Evaluation is sub-millisecond, the artifact diffs in review, and every decision is reproducible from the input plus the ruleset version.</p>
<p><strong>Solvers</strong> are the ones I see skipped most, and it's the most expensive miss. If you're assigning shifts, routing vehicles, packing containers, allocating theatre slots — hard constraints, an objective to minimise — that's a constraint programming or mixed-integer problem, and mature solvers have been eating problems like it for decades. The property that matters: a solver either returns a solution satisfying every hard constraint, or reports the problem infeasible. There is no third outcome where it hands back something that looks reasonable but has someone rostered on a double shift. It will also report the optimality gap, so you know how much better the theoretical best could be. Ask a language model for a roster and you get a plausible roster, with constraint violations distributed unpredictably through it and no gap to report.</p>
<p><strong>Gradient-boosted trees on tabular features</strong> remain the right answer for high-volume scoring with a lot of labelled history. Not because they're cheaper per call — though they are, by four or five orders of magnitude — but because of what surrounds them. You can backtest on held-out time periods and see how the model would have behaved through a past regime change. You can check calibration, so a score of 0.8 means the thing happens about 80% of the time. You can set the operating threshold against an explicit cost matrix for false positives against false negatives. A risk function is going to ask for all three, and "we ran an eval set and it scored well" is not a substitute for any of them.</p>
<p>None of this makes those techniques better. It makes them <em>different</em>, in ways that map cleanly onto specific questions.</p>
<h2>What none of them can do</h2>
<p>Every technique in the previous section operates on structured input. A decision table needs its predicates already evaluated. A solver needs its constraints stated. A gradient-boosted model needs its features extracted. None of them can take a paragraph of prose, a scanned form, or a pasted stack trace and produce something to act on, and none of them can compose an explanation a person will read.</p>
<p>That is the capability generative models added, and it has no substitute. Where the task requires interpreting unstructured content or producing it, no amount of rule-writing gets you there. That question is settled before any of the six below are asked.</p>
<p>What it establishes is narrower than it's usually taken to be. It establishes that a generative model belongs somewhere in the system. It says nothing about whether that model should also be deciding what happens next.</p>
<h2>Six questions, and how to actually answer them</h2>
<p>These aren't clever. They're the ones that settle the argument, and each one has evidence you can go and collect rather than opinions you can trade.</p>
<p>They apply to the decision, not to the reading. Where the input is unstructured, a generative model is already doing the extraction — these questions are about what happens to the values it extracted.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/23e47a35-82dc-48de-8c87-0a8db80e025b.png" alt="figure-3-final — Six questions asked before choosing an architecture: can you write the rule down, must the same input give the same answer, do you have thousands of past examples, do you know the steps before you start, can you undo a wrong answer, and how often does it run and how fast." style="display:block;margin:0 auto" />

<p><em>Figure 3 — Answer these about the problem and the architecture mostly picks itself.</em></p>
<p><strong>Can you write the rule down?</strong> The test isn't whether you personally can. It's whether the people who own the policy already have, somewhere. Ask for it. You will frequently be handed a spreadsheet, a runbook, or a slide that has been through three rounds of review. That artifact is a specification, and turning a reviewed specification into a prompt is a downgrade in every property except effort.</p>
<p><strong>Must the same input give the same answer?</strong> Not usually the same. The same. And be careful with the obvious workaround here: setting temperature to zero does not give you determinism. Floating-point addition isn't associative, so parallel reductions on a GPU can return different results depending on how work is scheduled; kernel selection varies with batch shape; mixture-of-experts routing can depend on what else is in the batch alongside your request; and providers update weights behind a stable model alias. Greedy decoding narrows the distribution a great deal. It does not make the function reproducible. If you need bit-identical replay of a decision from eighteen months ago, that requirement is asking for code.</p>
<p><strong>Do you have history?</strong> Thousands of past cases with known outcomes is a substantial asset, and a prompt is a poor way to spend it. Labelled history supports backtesting, calibration, and threshold tuning. Few-shot examples in a context window support none of those.</p>
<p><strong>Do you know the steps before you start?</strong> This separates workflows from agents more cleanly than anything else, and it's measurable rather than philosophical. Instrument your existing prototype and log the sequence of tool calls per run. Then look at the distribution of distinct sequences. If ninety-eight of a hundred runs took the same path, the runtime branching you paid for is being exercised twice.</p>
<p><strong>Can you undo a wrong answer?</strong> Classify your outputs by reversibility, not by importance. A wrong summary is an annoyance. A wrongly closed account, a wrongly dropped ticket, a page sent to an engineer at 3am — those have a person on the other end and a paper trail. Costly and irreversible means a human decides, with the machine assembling the evidence.</p>
<p><strong>How often does it run, and how fast?</strong> Do the arithmetic before the architecture. Multiply your daily volume by the number of model calls per decision by the cost per call, then annualise it. Do the same for the latency budget: a six-call agent chain at a second a call is not going in front of a synchronous request path. This arithmetic has ended more of these debates for me than any argument about capability.</p>
<p>Two of those questions carry most of the weight, and they sit naturally on a pair of axes:</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/82231999-e909-48d3-aa6d-3074ccf99803.png" alt="figure-4-final — A two-by-two grid with input messiness on one axis and reversibility on the other. Messy and hard to undo goes to people; messy and easy to undo goes to agentic AI; clean and hard to undo goes to rules; clean and easy to undo goes to models and plain code." style="display:block;margin:0 auto" />

<p><em>Figure 4 — How unbounded the input is, and whether you can take a wrong answer back.</em></p>
<p>Three of those four squares are not an agent. That's not a rhetorical trick — it's roughly the distribution I see in the field.</p>
<h2>Signs you built a sequence and called it an agent</h2>
<p>Some of these I've caught in other people's systems. Some I've shipped.</p>
<p><strong>Your prompt has turned into a policy document.</strong> If your system prompt contains <em>ALWAYS page the on-call engineer when the contract is Tier 1</em>, you've encoded a requirement in a medium with no coverage metric, no completeness check, and no test that fails when the clause is accidentally dropped during an edit. Prompts are a fine way to describe a job. They're a bad place to store a requirement, because nothing tells you when the requirement stops being honoured.</p>
<p><strong>The tools always fire in the same order.</strong> Go and measure it, per the fourth question. Sequence entropy near zero means you have a pipeline that occasionally has a bad day.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/123b6124-ef04-4d25-96da-c9427c81e5b2.png" alt="figure-5-final — The same system drawn two ways. On the left, an orchestrator freely calling a reader, a lookup and a writer in any order. On the right, the four steps it actually ran in the same fixed sequence every time." style="display:block;margin:0 auto" />

<p><em>Figure 5 — Left: what it was designed as. Right: what a hundred runs actually looked like.</em></p>
<p><strong>Temperature zero, one tool, output pinned to a schema.</strong> Constrained decoding guarantees your output parses. It guarantees nothing about whether the values in it are right — a well-formed JSON object with a wrong priority field is still a wrong decision, and now it's a wrong decision that passes validation. If what you wanted was a typed function call, you've bought it at roughly a million times the per-call cost.</p>
<p><strong>Most of your engineering goes into suppressing variance.</strong> Retries, validators, critic passes, self-consistency voting across three samples. Every one of those is a legitimate technique and I use all of them. But notice what majority voting is: a 3× cost multiplier that reduces variance without addressing bias, so it cleans up sampling noise and leaves systematic errors exactly where they were.</p>
<p>The clearest way to see this is to draw the finished thing next to what it replaced.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/5bdc3c91-5815-4ce8-92de-866a40ad6dad.png" alt="figure-6-final — Two builds of the same decision, side by side. On the left, a model call buried at the centre of six nested layers of scaffolding: the policy restated in the prompt, schema and range validation, repeated sampling and a majority vote, retries and fallbacks, an override table for the cases it kept getting wrong, and evals and traces so a past decision can be explained. On the right, the same footprint with nothing wrapped around it, holding a single decision table." style="display:block;margin:0 auto" />

<p><em>Figure 6 — Every layer on the left exists to buy back a property the column on the right started with.</em></p>
<p>Read the layers from the outside in and ask what each is for. The schema validation, the range checks, the retries, the override table, the fallback — none of them add capability. Every one is there to constrain the output back toward a fixed set of answers. The override table is the most honest item in the diagram: it's a decision table, added late, to catch the cases the model kept getting wrong.</p>
<p>So the finished system contains the simple technique. It just also contains every layer around it, several model calls per decision, and a per-decision cost orders of magnitude higher — to arrive at the same answers with weaker guarantees. When that apparatus becomes most of the system, step back and look at what you've built: you selected the tool whose defining property is variability, then constructed a large machine to suppress it.</p>
<p><strong>Nobody can reconstruct a specific past decision.</strong> <em>Why was this one paged in March?</em> gets asked in every domain I've worked in, always at the worst possible moment. Answering it requires the input, the code version, the ruleset version, and the timestamp — four things you can store. If your honest answer involves a model version the provider has since retired and a sampling path you didn't record, you don't have a decision system. You have something that produces decisions, which is not the same thing.</p>
<h2>Why long chains degrade faster than people expect</h2>
<p>This one deserves its own section because the arithmetic is unintuitive and it explains a lot of failed pilots.</p>
<p>If a chain has <em>n</em> steps and each step is independently correct with probability <em>p</em>, the whole run is correct with probability <em>pn</em>. That exponent does brutal work. At 95% per step — which sounds like a system in good health — ten steps land at 60%. At 90% per step, ten steps land at 35%.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/1f8c3b27-94a3-4635-a014-74c8599e4138.png" alt="figure-7-final  — A line chart showing end-to-end reliability falling as chain length grows, for per-step reliability of 99%, 95% and 90%. At ten steps these reach roughly 90%, 60% and 35% respectively." style="display:block;margin:0 auto" />

<p><em>Figure 7 — Per-step reliability, raised to the power of the number of steps.</em></p>
<p>Two things make the real picture worse than the curve.</p>
<p>Steps aren't independent. An early misreading gets carried forward as context and conditions everything downstream, so failures cluster rather than distributing evenly. The independence assumption behind that curve is optimistic.</p>
<p>And per-step reliability is usually estimated on an eval set that under-represents the tail — which is precisely the region where you introduced an agent in the first place, because the input was unbounded. So the <em>p</em> you measured is likely higher than the <em>p</em> you're operating at.</p>
<p>This is also the clearest argument for the composite architecture, and it isn't an aesthetic one. Every step you move out of the chain and into deterministic code sets that factor to 1. Not 0.99. Exactly 1, for that step, permanently. Shortening the probabilistic chain is the single highest-leverage reliability move available, and it costs nothing but the willingness to specify.</p>
<h2>Where agents genuinely win</h2>
<p>I'd rather not be read as a sceptic, because I'm not one. There are jobs where nothing else comes close, and they share a structure.</p>
<p>Input variety you can't enumerate — arbitrary phrasing, arbitrary formats, a long tail nobody will ever standardise. Work where the next step depends on what the last step found, which covers most of research, triage of genuinely novel cases, investigation, and debugging. Tasks where writing the specification costs more than doing the work, which is most one-off analysis. And integration against systems with no stable contract, where a brittle mapping breaks weekly and a model absorbing the drift is cheaper than maintaining it.</p>
<p>And open-ended reasoning over content, where the conclusion has to be assembled from several sources and nobody can say in advance which sources matter. Retrieval alone doesn't cover this. The value is in the model choosing what to look at next based on what it just read — which is the point where generation and agency finally do coincide.</p>
<p>The common structure: the branching factor is too large to enumerate, or the path can't be known until you're partway down it. That's the whole test. If the procedure can be written down, write it down. If it can't, that's what agents are for — and that's a real and valuable category, not a consolation prize.</p>
<h2>The composite is the architecture, not the compromise</h2>
<p>Take that triage problem from the top of this post. The version that works looks like this.</p>
<p>A model reads whatever arrives — an email with the real problem buried in the third paragraph, a half-filled form, a pasted stack trace — and emits a structured record against a fixed schema. That record crosses a boundary into a decision function: the eleven-row table, evaluated deterministically, same answer every time, versioned and diffable. A model then drafts the acknowledgement that goes back to the requester. Anything expensive or irreversible — the 3am page — stops at a person.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/da0ab8be-28ca-43b7-ab78-a20fee156308.png" alt="figure-8-final — A composite architecture. A language model reads messy input, a deterministic core of rules, models and plain code makes the decision, a second language model explains the result, and a human gate catches anything costly and permanent." style="display:block;margin:0 auto" />

<p><em>Figure 8 — Put the agent where the ambiguity is. Put the code where the accountability is.</em></p>
<p>Both edges are generative work: interpretation inbound, composition outbound. Neither is agentic, because the control flow is fixed. The model is there because nothing else can read a paragraph — not because the system needs to decide what to do next.</p>
<p>Notice what the model does there. It reads, and it writes. It does not decide. The decision sits in the middle, in ordinary code, where it can be covered by tests, explained from stored inputs, and changed deliberately rather than by rewording a paragraph and re-running an eval.</p>
<p>The boundary between those regions is the part worth designing carefully. It's a schema, and it should be strict — every field typed, every enum closed, out-of-range values rejected loudly rather than coerced. The model's job is to hit that schema; the decision function's job is to assume nothing beyond it. Get that contract right and you can change models without touching decision logic, and change decision logic without re-running a single eval.</p>
<p>There's a regression test hiding in that. Swap the model — different vendor, smaller variant, next quarter's version — and re-run your decision corpus. Extraction quality will shift. Your decisions should not. If they do, the model was making them, and you now know that on a Tuesday afternoon rather than during an audit.</p>
<p>None of this is elegant the way a single agent is elegant. It's four components with contracts between them, and the contracts are a real share of the work. That's normal. Most systems that survive contact with production look like that — several separate pieces, each doing what it's good at, connected deliberately.</p>
<h2>What this sounds like in the room</h2>
<p>I don't refuse the request. That never goes well, and it's usually not right — on day one the client understands their problem better than I do.</p>
<p>What I do is ask the six questions out loud, with whoever knows the process best, and write the answers where everyone can see them. Most of the time the answers do the arguing. The room arrives at "oh, that part is just the policy table" without my having to say it, which is a much better outcome than me saying it.</p>
<p>Then I show the composite and point out that the agentic parts are still agentic parts. This matters more than it should. The word <em>agent</em> is often load-bearing for reasons unrelated to architecture — someone promised it upward, it's in a board deck. That's fine, because the honest description of what I want to build is still an AI system. It just has its AI in the places where AI is the right answer.</p>
<p>The other thing I've learned to say early: the mixture usually ships sooner, because the deterministic middle is the part you can actually finish and test. I've never had a client disappointed that something arrived in March rather than November.</p>
<h2>What it costs to get this wrong</h2>
<p>The money is the smaller loss.</p>
<p>A pilot that doesn't reach production makes the next three proposals harder. I've watched an organisation conclude that AI <em>doesn't work for us</em> on the strength of a single project mis-scoped in its first week — where the technology was never the problem, the match was. Everything anyone tries there for the next two years starts from behind.</p>
<p>That's the real reason I've become fussy about this. Every problem handed to the wrong technique burns credibility the right problems needed.</p>
<h2>Four things I'd keep</h2>
<ol>
<li><p><strong>The dial measures how much control flow you've moved to inference time.</strong> That's the decision. Make it deliberately, and know that it moves you from covering paths to sampling them.</p>
</li>
<li><p><strong>Keep two questions apart.</strong> <em>Does this need a generative model</em> and <em>does this need an agent</em> have different answers. The first asks whether the content is unstructured; the second asks whether the path is knowable in advance.</p>
</li>
<li><p><strong>Count the steps in your probabilistic chain, then shorten it.</strong> Every step you move into deterministic code changes its factor to exactly 1. Nothing else buys reliability that cheaply.</p>
</li>
<li><p><strong>Design the boundary, not just the components.</strong> A strict schema between the model and the decision function is what lets you swap either one without holding your breath.</p>
</li>
</ol>
<p>The industry spent a couple of years finding out what agents can do, which was necessary and mostly fun. The next stretch is less exciting and more valuable: working out where they belong.</p>
<hr />
<p><em>The views, opinions, and technical perspectives expressed in this article are entirely my own and do not represent, reflect, or imply the positions, strategies, or endorsements of my employer or any organization I am affiliated with.</em></p>
]]></content:encoded></item><item><title><![CDATA[ From pattern to prototype: building the Phase 01 research orchestrator]]></title><description><![CDATA[A follow-up to Agentic AI is coming to the SaMD lifecycle. In the first post I sketched six phases of the Software-as-a-Medical-Device lifecycle and, for…]]></description><link>https://blog.andinet.dev/from-pattern-to-prototype-building-the-phase-01-research-orchestrator</link><guid isPermaLink="true">https://blog.andinet.dev/from-pattern-to-prototype-building-the-phase-01-research-orchestrator</guid><dc:creator><![CDATA[Andinet Asmamaw Enquobahrie]]></dc:creator><pubDate>Sat, 04 Jul 2026 15:34:55 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/a8fb9deb-fc64-47f0-a5f8-9ba91b4b6fd8.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h1>From pattern to prototype: building the Phase 01 research orchestrator</h1>
<p><em>A follow-up to <a href="https://blog.andinet.dev/agentic-ai-is-coming-to-the-samd-lifecycle">Agentic AI is coming to the SaMD lifecycle</a>.</em></p>
<p>In the first post I sketched six phases of the Software-as-a-Medical-Device
lifecycle and, for each, a <strong>proposed agent pattern</strong>. Those were designs on
paper. The obvious question — from readers and from myself — was: <em>can you
actually build one of these?</em></p>
<p>This post answers that for <strong>Phase 01: Ideation and User Needs</strong>. I picked a
concrete clinical target — an <strong>AI tool that detects and triages pulmonary
nodules on chest CT</strong> — wired the proposed orchestrator up to the real FDA and
NIH databases, and let it produce an actual gap-analysis document. Everything
below comes from a real run against live APIs; the code is in the companion
repo — <a href="https://github.com/andinet/nodule-scout">github.com/andinet/nodule-scout</a> —
and it runs on the <a href="https://github.com/anthropics/claude-agent-sdk-python">Claude Agent SDK</a>.</p>
<blockquote>
<p>A necessary caveat up front: this is a <strong>conceptual ideation aid</strong>, not
validated SaMD, and it produces no clinical guidance. The point is to make the
pattern — and its guardrails — concrete and inspectable.</p>
</blockquote>
<p><strong>TL;DR</strong></p>
<ul>
<li>The Phase 01 research-orchestrator pattern from the first post is <strong>buildable
today</strong> — I wired it to real FDA and NIH APIs and it produces a genuine,
fully-cited gap analysis in a few hundred lines.</li>
<li><strong>The guardrails are the product.</strong> A deterministic citation validator rejects
any claim the model can't trace to a fetched record — so the output is auditable
by construction, not by trust.</li>
<li><strong>The friction is the data, not the agents.</strong> MAUDE is sparse and the "CAD"
acronym collides with dental CAD/CAM — and surfacing <em>that</em> is itself a valid
Phase 01 finding.</li>
<li>Code, tests, and a committed sample run:
<a href="https://github.com/andinet/nodule-scout">github.com/andinet/nodule-scout</a>.</li>
</ul>
<hr />
<h2>THE PROPOSED AGENT PATTERN (recap)</h2>
<p>From Phase 01: a <strong>research orchestrator</strong> decomposes a broad clinical question
into sub-tasks and dispatches them to specialized tool-calling sub-agents. One
sub-agent searches PubMed for recent literature. Another mines the FDA's MAUDE
adverse-event database for software failures in similar products. A third pulls
predicate-device labeling from the FDA 510(k) database. The orchestrator collects
the results, grounds them in the company's internal clinical-advisory notes via
RAG, and produces a structured gap-analysis document.</p>
<p>Here is that pattern, as built:</p>
<pre><code> clinical question ─▶ ORCHESTRATOR (Claude Opus 4.8)
                        decompose → dispatch → ground → synthesize
        ┌───────────────────┼────────────────────┐
   pubmed-researcher   maude-analyst      predicate-analyst      + RAG over
   (PubMed E-utils)   (openFDA MAUDE)    (openFDA 510(k))        advisory notes
        └─────────── Source Ledger (every fetched record) ──────┘
                                │
                 guardrails: scope · citation · human-in-the-loop
                                │
                          gap_analysis.md
</code></pre>
<p><em>Figure 1 — The Phase 01 research-orchestrator pattern, as built.</em></p>
<p>The pleasant surprise: <strong>all three external sources are free public APIs with no
authentication</strong> — PubMed E-utilities, openFDA MAUDE, and openFDA 510(k). So the
pattern is genuinely end-to-end runnable, not a mock.</p>
<hr />
<h2>What the Tools Actually Returned</h2>
<p>Each sub-agent owns exactly one skill, which is a thin wrapper over a real
endpoint. From one run of the deterministic pipeline, the orchestrator pulled
<strong>46 real records</strong> into the run's source ledger:</p>
<ul>
<li><strong>PubMed</strong> surfaced current work like the <em>LUNA25</em> benchmark comparing AI to
radiologists on indeterminate-nodule malignancy risk, and a 2026 systematic
review of externally-tested lung-nodule classification models that flags
unsettled generalizability.</li>
<li><strong>510(k)</strong> returned a crowded, fast-moving predicate field — Fujifilm Synapse
Lung Nodule AI, Coreline AVIEW, Riverain ClearRead CT, RevealAI-Lung,
Infervision — cleared across several different product codes (OEB, POK, JAK),
which turns out to matter (more below).</li>
<li><strong>MAUDE</strong> was the interesting one. There is <em>almost no</em> adverse-event data for
AI lung-nodule devices, and the keyword "CAD" collides with dental <strong>CAD/CAM</strong>,
so most retrieved records are dental restoration systems. That noisiness is
itself a Phase 01 finding — you cannot yet characterize the real-world
failure-mode distribution of these devices from MAUDE, and the orchestrator
reported exactly that rather than inventing a signal.</li>
</ul>
<p>Then a lightweight RAG step (BM25 over a small <strong>synthetic</strong> advisory-notes
corpus) pulled the internal clinical concerns most relevant to the question —
subsolid-nodule performance, false-positive tolerance in screening vs incidental
contexts, PACS/worklist integration, and the detection-vs-risk-vs-recommendation
intended-use boundary.</p>
<h2>GUARDRAILS AND EVALUATION</h2>
<p>The first post argued that the guardrails matter more than the plumbing. This is
where the prototype earns its keep. Three layers:</p>
<p><strong>1. Scope constraint.</strong> Ask the orchestrator an off-domain question and it
refuses before spending anything:</p>
<pre><code>$ python run.py "What are the unmet needs in breast MRI triage software?"
[scope] Off-domain terms ['breast'] with no lung-nodule anchor.
Refusing: question is out of the lung-nodule SaMD scope.
</code></pre>
<p><strong>2. Source attribution — the load-bearing one.</strong> Every record any tool fetches
is stored in a run-scoped <strong>Source Ledger</strong> under a stable citation id
(<code>PMID:42340186</code>, <code>K254075</code>, <code>MAUDE:11195257</code>, <code>NOTE:subsolid-nodules</code>). The gap
analysis is emitted through a <code>submit_gap_analysis</code> tool, and a <em>deterministic</em>
validator — not the model's own say-so — rejects the submission if any claim is
uncited or cites an id that isn't in the ledger:</p>
<pre><code class="language-python">def validate_attribution(analysis, ledger):
    for claim in analysis.all_claims():
        if not claim.cite_ids:
            violations.append(f"Uncited claim: {claim.statement!r}")
        for cid in claim.cite_ids:
            if cid not in ledger:              # hallucinated citation
                violations.append(f"Unresolvable citation {cid!r}")
</code></pre>
<p>Feed it a fabricated citation and it bounces:</p>
<pre><code>accepted: False
  REJECTED -&gt; Unresolvable citation 'PMID:00000000' in claim: 'AI is 99% accurate (fabricated)'
</code></pre>
<p>This is the concrete implementation of "every claim must cite a verifiable
source." The model is free to reason, but it cannot ship a statement the harness
can't trace back to a real fetched record. On the featured run the artifact
passed with <strong>22 claims / 50 citations / 0 violations</strong> — and every one of those
citations resolves to a clickable PubMed or openFDA URL in the References
section.</p>
<p><strong>3. Human-in-the-loop.</strong> The run writes a <code>gap_analysis.draft.md</code> first.
Nothing is finalized until a human approves (<code>--approve</code>), modeling a regulatory
sign-off gate.</p>
<h2>What the Orchestrator Concluded</h2>
<p>The output isn't the point — the <em>traceability</em> is — but the analysis is
genuinely useful precisely because it's grounded. A few of its gap findings,
each carrying real citations:</p>
<ul>
<li><strong>Subsolid-nodule performance</strong> is a recognized weakness and high clinical
stakes for indolent adenocarcinoma, yet the strongest current benchmark
evidence centers on <em>solid</em> indeterminate nodules — a validated evidence gap.
<code>[NOTE:subsolid-nodules] [PMID:42340186]</code></li>
<li><strong>Intended-use boundary.</strong> Detection, malignancy-risk estimation, and
follow-up recommendation are three different intended uses with escalating
regulatory weight — and the predicate landscape's split across OEB / POK / JAK
product codes confirms the boundary is consequential.
<code>[NOTE:intended-use-boundary] [K251203] [K251769] [K242188]</code></li>
<li><strong>Post-market blind spot.</strong> Because MAUDE is so sparse and acronym-collided, a
targeted post-market surveillance strategy (by product code, not "CAD"
keyword) is needed — flagged honestly as an open question rather than papered
over.</li>
</ul>
<h2>Two Ways to Orchestrate</h2>
<p>The repo ships two orchestrators, and contrasting them is instructive. The
<strong>faithful</strong> version (<code>--agentic</code>) is what the blog describes: the orchestrator
model uses the Agent SDK's <code>Task</code> tool to dispatch three tool-restricted
sub-agents, each of which can call exactly one skill. The <strong>deterministic</strong>
sidebar calls the four tools in code and makes a single synthesis call. The
faithful version is truer to the "society of agents" framing; the deterministic
one is cheaper and perfectly reproducible. For a Phase 01 aid that a human will
review anyway, reproducibility is worth a lot — a useful reminder that "agentic"
is a dial, not a binary.</p>
<h2>Takeaways</h2>
<ol>
<li><strong>The Phase 01 pattern is buildable today</strong>, with free public data, in a few
hundred lines. The blog's design survived contact with reality.</li>
<li><strong>The guardrails are the product.</strong> A gap analysis nobody can trust is worse
than none; the citation ledger is what makes the output auditable.</li>
<li><strong>The friction is in the data, not the agents.</strong> MAUDE's sparseness and the
CAD/CAM collision were the real obstacles — and surfacing <em>that</em> is itself a
valid Phase 01 output.</li>
</ol>
<h2>Reproduce It</h2>
<p>The whole thing is a <code>pip install</code> and one command. The three data sources are
free and keyless, so the only credential you need is one to authenticate the
Claude model — and you can use a plain <strong><code>ANTHROPIC_API_KEY</code></strong>, no Claude Code
subscription or interactive login required:</p>
<pre><code class="language-bash">git clone https://github.com/andinet/nodule-scout &amp;&amp; cd nodule-scout
pip install -e .

cp .env.example .env          # then set ANTHROPIC_API_KEY=sk-ant-...
                              # (or, if you use Claude Code, just `claude` to log in)

python run.py --approve       # → outputs/gap_analysis.md
</code></pre>
<p>The run prints which auth it picked up (<code>auth: using ANTHROPIC_API_KEY…</code>), fetches
the live evidence, and writes the cited artifact. The tests — <code>pytest</code> — need no
key at all: they hit the public APIs anonymously and exercise the guardrails
offline. Everything you've read above came out of that one command.</p>
<p>Next in the series: Phase 02 (Requirements &amp; SRS), where the guardrails escalate
because the artifacts start feeding directly into regulated documentation.</p>
<h2>References</h2>
<p>Every citation in the generated artifact resolves to a live URL; the sources
referenced in this post are:</p>
<ul>
<li><strong>PubMed</strong> — PMID 42340186, the <em>LUNA25</em> challenge (AI vs. radiologists on
indeterminate-nodule malignancy risk): <a href="https://pubmed.ncbi.nlm.nih.gov/42340186/">https://pubmed.ncbi.nlm.nih.gov/42340186/</a></li>
<li><strong>FDA 510(k) predicate clearances</strong> — the cited devices whose product-code
split (OEB / POK / JAK) shows the intended-use boundary is consequential:
<a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfpmn/pmn.cfm?ID=K254075">K254075</a>
(Fujifilm Synapse Lung Nodule AI) ·
<a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfpmn/pmn.cfm?ID=K251769">K251769</a>
(RevealAI-Lung) ·
<a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfpmn/pmn.cfm?ID=K251203">K251203</a>
(Coreline AVIEW Lung Nodule CAD) ·
<a href="https://www.accessdata.fda.gov/scripts/cdrh/cfdocs/cfpmn/pmn.cfm?ID=K242188">K242188</a>
(Riverain ClearRead CT)</li>
<li><strong>FDA MAUDE</strong> — adverse-event report 11195257 (openFDA device/event):
<a href="https://api.fda.gov/device/event.json?search=mdr_report_key:11195257">https://api.fda.gov/device/event.json?search=mdr_report_key:11195257</a></li>
<li><strong>Advisory notes</strong> — <code>NOTE:subsolid-nodules</code> and <code>NOTE:intended-use-boundary</code>
are entries in a <strong>synthetic</strong> clinical-advisory corpus shipped in the repo
(<code>data/advisory_notes/</code>), not external sources.</li>
</ul>
<p><em>Code, tests, and a committed sample run: <a href="https://github.com/andinet/nodule-scout">github.com/andinet/nodule-scout</a>.</em></p>
<hr />
<p><em>The views, opinions, and technical perspectives expressed in this article are
entirely my own and do not represent, reflect, or imply the positions,
strategies, or endorsements of my employer or any organization I am affiliated
with.</em></p>
]]></content:encoded></item><item><title><![CDATA[Agentic AI Is Coming to the SaMD Lifecycle
]]></title><description><![CDATA[A phase-by-phase technical analysis of how agentic AI systems can augment the SaMD development lifecycle under IEC 62304 — covering proposed agent…]]></description><link>https://blog.andinet.dev/agentic-ai-is-coming-to-the-samd-lifecycle</link><guid isPermaLink="true">https://blog.andinet.dev/agentic-ai-is-coming-to-the-samd-lifecycle</guid><category><![CDATA[agentic AI]]></category><category><![CDATA[healthcare]]></category><category><![CDATA[Machine Learning]]></category><category><![CDATA[Software Engineering]]></category><category><![CDATA[regulatory compliance]]></category><dc:creator><![CDATA[Andinet Asmamaw Enquobahrie]]></dc:creator><pubDate>Sun, 10 May 2026 16:09:02 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/783e59e4-1bb2-43b8-af9f-1ef273dad36f.png" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>Designing, building, and shipping Software as a Medical Device (SaMD) must comply with some of the most demanding regulatory frameworks in any industry.  From early concept work to FDA 510(k) submissions, from IEC 62304 lifecycle management to post-market CAPA processes, every step of the SaMD pipeline (Figure 1) demands extraordinary rigor in documentation, traceability, and quality assurance. It’s grueling work. And most of the time, it’s not the clinical or engineering decisions that slow you down. It’s the documentation.</p>
<p>That’s why I’ve been paying close attention to <strong>Agentic AI</strong>, a class of autonomous systems that don’t just answer questions but actually plan, execute, and verify multi-step tasks across complex workflows. This is not theoretical anymore. Deloitte reports that over 80% of healthcare executives expect agentic AI to deliver significant value across clinical and operational functions in 2026, and 61% are already building or budgeting for it <a href="#ref1">[1]</a>.</p>
<p>The question for those in regulated medical software is no longer <em>whether</em> this technology will reach our world. It’s <em>how</em> we harness it responsibly at every phase of the SaMD development lifecycle.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/47028b4e-e064-4329-bb8f-6f84da2f3814.png" alt="Figure 1: The SaMD Development Lifecycle with Agentic AI Augmentation" style="display:block;margin:0 auto" />

<p><em>Figure 1: The SaMD Development Lifecycle with Agentic AI Augmentation</em></p>
<p><strong>TL;DR</strong></p>
<ul>
<li><p>Agentic AI can augment all six phases of the SaMD lifecycle, from ideation and user needs through post-market surveillance, by automating documentation, traceability, and process coordination tasks that consume a disproportionate share of engineering effort today.</p>
</li>
<li><p>The agent capabilities are not the hard part. The guardrail architecture, which includes hallucination detection, completeness validators, pre-execution plan review, and human-in-the-loop gates, is the core engineering challenge in regulated contexts.</p>
</li>
<li><p>Guardrail constraint levels escalate from Advisory at ideation to Critical at post-market, directly tracking the proximity of agent outputs to patient-facing clinical decisions and regulatory artifacts.</p>
</li>
<li><p>Most agent patterns described here are conceptual designs that illustrate what is achievable, not systems running in production. The distinction matters, and the final section addresses it directly.</p>
</li>
</ul>
<h2><strong>What Makes Agentic AI Different?</strong></h2>
<p>Most of us in MedTech are already familiar with AI and machine learning. We’ve seen it embedded in diagnostic imaging tools, clinical decision support, and predictive analytics. The FDA has now authorized over 1,450 AI-enabled medical devices as of mid-2025 <a href="#ref2">[2]</a>. But agentic AI is a different animal entirely.</p>
<p>Traditional AI responds to a single prompt with a single output. Agentic AI systems <strong>perceive, plan, act, and verify</strong> autonomously across multi-step workflows. They maintain context, use tools, call APIs, coordinate with other agents, and loop back to correct their own work. Think of it less as a chatbot and more as a capable junior team member who can execute a defined process end to end, flagging exceptions for human review along the way.</p>
<p>For those of us who live within the SaMD lifecycle, a pipeline defined by IEC 62304 and governed by rigorous Quality Management Systems matters a lot. Here’s how agentic AI can augment each phase of the process our team has followed for years.</p>
<h2><strong>Agentic AI Terminology</strong></h2>
<p>Before walking through each phase, a quick primer on terminology. In agentic AI, an <strong>agent</strong> is a decision-making layer that takes a goal, develops a plan, invokes tools, and adapts based on results (as shown in Figure 2). <strong>Skills</strong> are reusable, domain-specific capabilities the agent can invoke (think of them as functions it has been taught). <strong>Tools</strong> are external software APIs, databases, or services that the agent can call during execution to provide additional capabilities. <strong>Commands</strong> are discrete instructions that the agent issues to tools or sub-agents. And <strong>orchestration</strong> is how you coordinate multiple agents, route tasks, and enforce policies across the workflow. In regulated medical software, <strong>guardrails</strong> are the constraints, validators, and human-in-the-loop checkpoints that prevent the agent from producing or executing anything that violates your QMS, your risk framework, or patient safety requirements. In this domain, the guardrails aren’t an afterthought. They’re the product.</p>
<p><em>A note before we dive in: the six-phase patterns that follow describe how I believe agentic AI could augment each stage of the SaMD lifecycle. Some elements exist in commercial tools today; most are conceptual designs that illustrate the shape of what’s possible, not systems running in production. I return to this caveat in more depth at the end of the article.</em></p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/84321c69-28c7-4d64-a2a4-218e8c5ba544.png" alt="" style="display:block;margin:0 auto" />

<p><em>Figure 2: Anatomy of an Agentic AI System for Regulated Software</em></p>
<h3><strong>Phase 01: Ideation and User Needs</strong></h3>
<p><strong>THE PROPOSED AGENT PATTERN:</strong> Imagine a <em>research orchestrator agent</em> that would decompose a broad clinical question (“What are the unmet needs in breast MRI triage software?”) into sub-tasks and dispatch them to specialized tool-calling agents. One sub-agent would have a <em>PubMed search skill</em> that would retrieve recent clinical literature. Another would have an <em>MAUDE query skill</em> that would mine the FDA’s adverse event database for reported software failures in similar SaMD products. A third would have a <em>510(k) summary skill</em> that would pull predicate device labeling from the FDA database. The orchestrator would collect results, run them through a retrieval-augmented generation (RAG) pipeline grounded in your company’s internal clinical advisory board notes, and produce a structured gap analysis document.</p>
<p><strong>GUARDRAILS AND EVALUATION:</strong> This is research output, not a regulatory submission, but it still needs constraints. The key guardrail here is <em>source attribution and hallucination detection</em>. Every claim in the gap analysis must cite a specific PubMed ID, MAUDE report number, or 510(k) summary. A validator agent runs post-generation, checking that every cited source actually exists and that the claim reasonably follows from the source text. It’s worth noting that hallucination detection in RAG systems is itself an active research area with meaningful false-negative rates, so the threshold for flagging outputs for human review should be conservative rather than aggressive. You also need a <em>scope constraint</em> that prevents the agent from drifting into clinical domains outside the intended use you defined, because a gap analysis that wanders into neurology when you’re building a breast imaging tool is worse than useless.</p>
<h3><strong>Phase 02: Requirements Gathering and SRS</strong></h3>
<p><strong>THE PROPOSED AGENT PATTERN:</strong> Imagine a <em>requirements engineering agent</em> with two core skills. First, a <em>need-to-requirement mapping skill</em> that would take each user need statement and generate candidate technical requirements following your SRS template format, complete with requirement IDs, priority levels, and risk classification tags per ISO 14971. Second, a <em>traceability matrix skill</em> that would auto-populate a bidirectional traceability matrix linking each user need to its derived requirements, and forward-link placeholders for design inputs, code modules, and verification tests. The agent would use structured output schemas (enforced JSON or XML) so the output is machine-parseable and can be imported directly into your requirements management tool, whether that’s DOORS, Jama, or even a controlled spreadsheet in your QMS. Products like Ketryx already demonstrate that automated traceability generation integrated with tools like Jira and GitHub is commercially viable.</p>
<p><strong>GUARDRAILS AND EVALUATION:</strong> This is where constraints get serious, because a bad requirement can cascade through your entire submission. The first guardrail is a <em>completeness validator</em> that cross-checks every user need against the generated requirements and flags any need that has zero derived requirements. The second is a <em>regulatory consistency checker</em>, essentially a RAG pipeline grounded in IEC 62304 clause text and your company’s SOP templates, that reviews each requirement for proper structure: is it testable? Is the acceptance criterion measurable? Does it use “shall” language correctly? A third possibility, though one that remains more aspirational than production-ready today, is a <em>predicate device comparator</em> that compares your draft SRS against the predicate device’s labeled indications for use and flags any requirement that would constitute a new intended use not covered by your regulatory pathway. This kind of nuanced regulatory judgment is an area where experienced RA professionals still have a significant edge over current AI capabilities. Every output goes through a human-in-the-loop approval gate before it enters your QMS as a controlled document. The agent proposes. The regulatory and clinical team disposes.</p>
<h3><strong>Phase 03: Architecture and Software Design</strong></h3>
<p><strong>THE PROPOSED AGENT PATTERN:</strong> Picture a <em>design architect agent</em> equipped with domain-specific skills for the open-source medical software ecosystem. For example, such an agent would have deep context for radiology software applications (via RAG over the ITK, VTK, and 3D Slicer documentation and source code) on standard architectural patterns in radiological software. It would know that your DICOM ingestion layer will likely use DCMTK or pydicom for parsing, that your image processing pipeline will be built on ITK filters for registration and segmentation, that your 3D visualization will use VTK’s rendering pipeline, and that your application framework might be a 3D Slicer loadable module following the Model-View-Controller pattern with MRML nodes for data management. If you’re deploying a deep learning inference component, it would understand the MONAI ecosystem: MONAI Core for training, MONAI Deploy App SDK for packaging the model as a MAP (MONAI Application Package) with DICOM I/O operators. The agent would use these skills to draft a Software Design Document that describes module decomposition along the lines your codebase actually follows. It could classify your SOUP (Software of Unknown Provenance) components and flag that ITK 5.x, VTK 9.x, and the specific MONAI model bundle each require documented risk assessments under IEC 62304. It could propose a cybersecurity threat model for your DICOM data pipeline, identifying where PHI is handled and where your PACS integration introduces an attack surface.</p>
<p><strong>GUARDRAILS AND EVALUATION:</strong> The design phase guardrails operate at two levels. The first is <em>architectural constraint validation</em>: a rule-based validator that checks the proposed design against your SRS and flags any requirement that has no corresponding design element, or any design element that traces to no requirement. This catches scope creep and orphan modules before a single line of code is written. The second is a <em>SOUP risk evaluator</em> that queries known vulnerability databases (CVE, NVD) for each third-party library the design depends on and flags any component with unresolved critical vulnerabilities. This matters enormously for cybersecurity compliance, as the FDA can now refuse to accept submissions that don’t include a Software Bill of Materials (SBOM) with vulnerability analysis. A third guardrail is a <em>design-review preparation tool</em> that generates probing questions such as “What happens if the DICOM series has inconsistent slice spacing?” or “How does the system behave when the MONAI inference returns a confidence score below the clinical threshold?” I want to be clear that these supplements do not replace a formal design review. Real design reviews involve domain-expert judgment, failure mode analysis, and regulatory context that current AI systems handle inconsistently. But the preparation work alone can save significant time. Every design output requires sign-off from both the software lead and the quality team before it becomes a controlled document.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/0982cdbe-a8df-4043-bc74-ba82952e099b.png" alt="" style="display:block;margin:0 auto" />

<p><em>Figure 3: Construction Phase: Agent, Skills, and Guardrail Stack for AI-enabled Medical Imaging Software</em></p>
<h3><strong>Phase 04: Construction and Coding</strong></h3>
<p><strong>THE PROPOSED AGENT PATTERN:</strong> This is where I see the most immediate impact, because the open-source medical imaging toolkits we rely on are massive, well-documented codebases that are well-suited for agentic code generation. The pattern here would be a <em>coding agent</em> with specialized skills loaded via context: a <em>3D Slicer module scaffolding skill</em>, an <em>ITK pipeline construction skill</em>, a <em>VTK visualization skill</em>, and a <em>MONAI training/deployment skill</em>. Each skill is essentially a RAG-grounded prompt template backed by the relevant codebase documentation and thousands of existing module examples.</p>
<p>Imagine giving a coding agent a command like “Implement SRS requirement REQ-IMG-042: the system shall segment liver parenchyma from contrast-enhanced CT with Dice coefficient &gt;= 0.92.” Its orchestration layer would break this into sub-tasks. It would scaffold a new 3D Slicer loadable module that inherits from qSlicerLoadableModule, set up the MRML node observers, and implement the module Logic class. For the segmentation itself, it would wire in a MONAI-trained UNet model using the MONAI Bundle format, generate the inference pipeline with the appropriate transforms (LoadImage, Spacing, Orientation, NormalizeIntensity), and use MONAI’s sliding window inference for large 3D volumes. It would generate the VTK rendering code to display the segmentation as a 3D surface overlaid on the original DICOM volume. It would know the correct CMake configuration to link against the Slicer superbuild. And it would produce a Python test harness that maps directly to REQ-IMG-042.</p>
<p>For the deep learning training pipeline, the agent could generate a properly structured MONAI workflow using CacheDataset for efficient data loading, domain-appropriate augmentation transforms (RandGaussianNoise, RandAffine, Rand3DElastic), DiceFocalLoss to handle class imbalance, and the Novograd optimizer. It could also generate the MONAI Deploy application packaging code that wraps the inference model as a MAP with DICOM input/output operators, making it ready for clinical PACS integration.</p>
<p><strong>GUARDRAILS AND EVALUATION:</strong> Construction is where guardrails need to be the tightest, because code is the artifact that directly touches patient data and clinical decisions. The first guardrail is <em>pre-execution plan review</em>. Before the coding agent writes anything, it outputs a structured plan describing which files it will create, which libraries it will import, and which requirements it will address. A guardian agent evaluates this plan against the Software Design Document and blocks execution if the plan introduces dependencies not in the approved SOUP list, touches modules outside the agent’s assigned scope, or proposes an architecture that deviates from the SDD. This is the “intervene at planning, not at execution” pattern that recent guardrail research emphasizes for high-stakes domains.</p>
<p>The second guardrail is <em>output validation</em>. Every code artifact the agent produces goes through a multi-layer check: static analysis for coding standard compliance, automated build verification (does it compile against the Slicer superbuild?), unit test execution with coverage thresholds, and a traceability check confirming every function maps to a requirement. The third guardrail is the most critical for regulated software: <em>no auto-merge</em>. The coding agent generates a pull request with full documentation, test results, and traceability links. A human developer reviews, approves, and merges. The agent accelerates the work. It never has the final say.</p>
<h3><strong>Phase 05: Testing and Verification</strong></h3>
<p><strong>THE PROPOSED AGENT PATTERN:</strong> Imagine a <em>verification orchestrator agent</em> that would read the traceability matrix and auto-generate a comprehensive test plan. It would dispatch sub-agents with specialized testing skills. A <em>DICOM edge case agent</em> would create synthetic test fixtures covering varied slice thicknesses, different transfer syntaxes, vendor-specific private tags (if you’ve ever dealt with Siemens vs. GE DICOM headers for diffusion MRI, you know how varied those can get), and missing optional fields. A <em>model evaluation agent</em> would generate evaluation scripts that compute Dice scores, sensitivity, specificity, and AUC against annotated ground truth datasets, then compare results against the acceptance criteria defined in the SRS. A <em>regression test agent</em> would build and run suites that verify the ITK segmentation pipeline produces consistent output across image modalities, resolutions, and patient populations. A <em>performance test agent</em> would benchmark VTK rendering latency on target hardware configurations. The orchestrator would collect all results and generate formatted verification reports in the template your QMS requires.</p>
<p><strong>GUARDRAILS AND EVALUATION:</strong> Verification guardrails are about ensuring the tests themselves are trustworthy. The first constraint is <em>test completeness validation</em>: a validator that compares the test plan against the traceability matrix and flags any requirement with zero associated test cases. This is a common audit finding, and catching it automatically before the verification phase closes is worth its weight in gold. The second is <em>test independence verification</em>: the agent must not generate tests that are trivially tautological (testing that a function returns the value it was hardcoded to return). A reviewer agent evaluates each test for meaningful assertion logic. The third guardrail is a <em>golden dataset integrity check</em>: before running model evaluation, the agent verifies that the ground truth dataset hasn’t been modified since it was locked in the validation plan, by checking cryptographic hashes. For ML-based SaMD components, the FDA expects documented evidence of dataset integrity. The final gate: all verification reports go through a formal review by the quality team. The agent produces the evidence. The human signs the DHF (Design History File).</p>
<h3><strong>Phase 06: Validation and Post-Market Surveillance</strong></h3>
<p><strong>THE PROPOSED AGENT PATTERN:</strong> Validation and post-market are where agentic AI shifts from batch execution to <em>continuous autonomous monitoring</em>. For the validation phase, a <em>clinical evaluation agent</em> drafts the initial validation plan by pulling from FDA guidance on SaMD clinical evaluation (the IMDRF framework), identifying appropriate performance metrics for your device classification, and recommending study designs based on your risk category. But the real power is in post-market. Here I envision deploying a <em>surveillance multi-agent system</em>: one agent monitors deployed model inference metrics in production (throughput, confidence distributions, error rates); a second agent runs statistical drift detection comparing incoming data distributions against the training set baseline; a third agent watches the MAUDE database and relevant literature for reports involving your device class. These agents communicate through an event bus. When the drift detection agent flags a distribution shift that exceeds your Predetermined Change Control Plan (PCCP) thresholds, it triggers the documentation agent to generate a change assessment record and the notification agent to alert your quality team.</p>
<p>I want to be transparent that this multi-agent surveillance architecture is a proposed design, not a description of something running in production today that I know of. No published implementation of this specific pattern exists in regulated medical software. But the individual components (drift detection, MAUDE monitoring, automated documentation) are all technically feasible, and the value proposition for continuous post-market compliance is compelling enough that I expect early implementations within the next two to three years.</p>
<p><strong>GUARDRAILS AND EVALUATION:</strong> Post-market guardrails are arguably the most consequential because they would run continuously, autonomously, in production, touching real patient outcomes. The paramount constraint is <em>the agent can observe and report, but it cannot modify the deployed model or its clinical behavior</em>. That boundary is non-negotiable. The monitoring agents are read-only with respect to the production system. Any model update, retraining decision, or field safety corrective action requires human authorization through your CAPA process. The second guardrail is <em>alert fatigue management</em>: threshold tuning so the drift detection agent doesn’t flood your quality team with noise. This requires calibrated sensitivity/specificity for the detection algorithm itself, which means the guardrail needs its own evaluation framework. The third is <em>audit trail completeness</em>: every agent action, every tool call, every decision point is logged immutably. In a regulatory audit, you need to reconstruct exactly what the system observed, when it flagged an issue, what was reported, and who acted on it. The NIST AI Risk Management Framework’s emphasis on traceability for every decision and tool call maps directly to this requirement. If you can’t show the audit trail, the autonomous monitoring is a liability, not an asset.</p>
<img src="https://cdn.hashnode.com/uploads/covers/6a008fa5e3eebc2e2087c6a4/5565537e-8b2e-4763-b5c1-5c8f6b34d7e1.png" alt="" style="display:block;margin:0 auto" />

<p><em>Figure 4:</em>  <em>Guardrail Severity Across the SaMD Lifecycle</em></p>
<p><strong>Here’s the pattern that runs through every phase:</strong> the agentic system has agents, skills, and tools to do the heavy lifting. But at every step, there are guardrails that constrain what the agent can do, validators that evaluate what it produced, and human-in-the-loop gates that control what enters your QMS as a controlled artifact (Figure 4). In regulated medical software, the guardrail architecture is not a safety net. It is the core engineering challenge. Get it right, and you have a system that produces auditable, traceable, compliant outputs at machine speed. Get it wrong, and you’ve automated your way into a regulatory nightmare.</p>
<h2><strong>A Word of Caution: What This Article Does Not Claim</strong></h2>
<p>The agent patterns described across these six phases represent a technically coherent design space, but they sit at different points on the spectrum between commercially available today and not yet demonstrated in production. Coding agents that scaffold module templates, documentation generators that populate SRS fields, and drift detection pipelines are all capabilities that exist in some form in current tooling. The full multi-agent surveillance architecture described in Phase 06, with autonomous orchestration across monitoring, drift detection, MAUDE surveillance, and documentation generation, is a proposed design. I am not aware of a published implementation of that specific pattern in a regulated medical software environment as of this writing.</p>
<p>There is also a meta-problem that most discussions of agentic AI in MedTech either ignore or treat as a footnote: if you deploy AI agents as part of your SaMD development process, those agents may themselves require validation as software tools under your QMS. The FDA expects that development tools affecting product quality are validated. An agentic system that generates SRS requirements, writes code, or produces verification reports is exactly that kind of tool. The guardrail architecture described in this article addresses the outputs produced by those agents. It does not address the harder question of how you validate the agent platform itself as a controlled development environment — with documented intended use, qualification testing, and change management procedures. That question does not yet have a definitive answer in the industry, and anyone deploying these systems in a GxP context should think about it carefully.</p>
<p>Finally, the argument that agentic AI addresses the documentation and traceability burden in SaMD development is grounded in direct experience, but the specific ratio of documentation effort to clinical and engineering effort varies significantly across organizations, device classifications, and QMS maturity. The opportunity is real. The implementation complexity is also real. Both things are true simultaneously.</p>
<h2>The Pattern That Matters</h2>
<p>The six-phase patterns in this article share a common structure: agents and skills to execute the work, tools to extend their reach, and a guardrail stack that escalates in constraint level as outputs move closer to patient-facing decisions and controlled regulatory artifacts. As the severity table in Figure 4 shows, the progression runs from Advisory at ideation, where outputs are research documents subject to human review, through Controlled at requirements and architecture, Mandatory at construction and verification, where code directly touches patient data, and Critical at post-market, where autonomous monitoring runs continuously against a production clinical system.</p>
<p>That escalation is not arbitrary. It reflects a straightforward principle: the closer an agent output is to a controlled QMS artifact or a patient outcome, the less latitude the agent has and the more explicit the human authorization requirement becomes. Downstream quality and regulatory teams will recognize this pattern immediately as it maps directly to the risk-based thinking embedded in IEC 62304, ISO 14971, and FDA's own guidance on software change control. The guardrail architecture described here is not a novel compliance framework. It is an application of existing regulatory logic to a new class of development tooling.</p>
<p>The SaMD lifecycle, as currently practiced, allocates a significant share of skilled engineering time to documentation, traceability, and process coordination. Agentic AI does not change what the work requires. It changes who — or what — does the mechanical portions of it, under what constraints, and with what level of human oversight at each transition. The companies that instrument this correctly will move faster through their development cycles without accumulating the compliance debt that typically results from moving fast in regulated software. That is the practical case for the investment. The guardrail architecture is what makes it defensible.</p>
<h2>References</h2>
<p>[1] Deloitte. "Many health care leaders are leaning into agentic AI as adoption hurdles ease." 2026 US Health Care Outlook Survey, February 2026. <a href="https://www.deloitte.com/us/en/insights/industry/health-care/agentic-ai-health-care-operating-model-change.html">Link</a></p>
<p>[2] The Imaging Wire. "Numbers from the FDA Show Radiology Is Maintaining Its Lead." March 11, 2026. <a href="https://theimagingwire.com/2026/03/11/numbers-from-the-fda-show-radiology-is-maintaining-its-lead/">Link</a></p>
<p>[3] Papademetris, X. "Introduction to Medical Software." Yale University, Coursera. <a href="https://www.coursera.org/learn/introduction-to-medical-software">Link</a></p>
<p><em><strong>Disclaimer</strong></em></p>
<p><em>The views, opinions, and technical perspectives expressed in this article are entirely my own and do not represent, reflect, or imply the positions, strategies, or endorsements of my employer or any organization I am affiliated with.</em></p>
]]></content:encoded></item></channel></rss>