The Mad Scientist On Your Dev Team

You don't write the code anymore. Can you control the machine that does?

Four years ago, I wrote about how we design and plan software projects so they reliably come in on time, on budget and on quality, even when the business you're building for is a moving target (hint: they all are). Since then, AI has become shockingly fast at churning out huge amounts of working code, in any language, at the press of a button. It's not just you; fewer and fewer of us are writing code by hand. But is this a good thing, especially in medical imaging, where the production environment is security-conscious, mission-critical, and unforgiving of code that almost works?

It can be, but only if you regard AI as if it were a mad scientist: someone who is capable of amazing things, but who is also fundamentally unpredictable and unreliable. AI can generate tremendous leverage for your software project, or it can become your worst nightmare if you haven't taken the time to put a solid structure in place before code construction begins.

Instant Technical Bankruptcy, Just Add AI

Software developers have always struggled to get managers to understand the long-term consequences of taking shortcuts. It was such a common problem that the term "technical debt" was introduced to describe it in business terms. But before AI, the debt could only be racked up as fast as humans can type. Now, with AI constructing whole applications in minutes, technical bankruptcy may be a more apt metaphor.

You're right to vibe code disposable POCs — that's the time to iterate fast, align with customer needs and retire the big risks. But in healthcare production systems, the stakes are high: 24x7x365 mission critical applications, regulated production environments, patient health information, information security risks, huge penalties and reputational damage for getting any of it wrong. Are you willing to blindly trust AI to care about all of that? If not, are you prepared to manually review every line of code it writes? Fortunately, there is a sane middle ground: thoughtful system design and planning.

Don't Just Do Something, Stand There

With the promise of massive productivity gains at a fraction of the cost, and the buzz from your competitors making noise about 10x this and 100x that, the pressure to move fast can feel overwhelming; adopt AI fast, release code fast, and even change team structure fast. But if it seems too good to be true, then it probably is.

In the AI era, going slow in order to go fast has never been more on point. What feels like slowing down is actually taking the time to draw the bow and carefully aim for a bullseye.

Agents of Change

Software development has always been about creating change. But now, you have swarms of AI agents picking up tasks off your board, reading docs, writing code, writing tests, fixing bugs, iterating against goals and even working with each other. Such a workflow can create artifacts and changes at a rate no human can keep up with.

So, we must find ways to structure our work with AI that allow us to close the speed gap. AI gets to work fast, but humans have opportunities to direct the work, understand the important bits about what's changing, and apply judgment at the right moments.

Communication Is the Key to a Good Relationship

Communication has always been important in software projects. But there is one thing we can't take for granted when interacting with AI: shared context. AI doesn't automatically remember past conversations with you like a human does. And an AI agent can only reason about what fits inside its working memory ("context window"). If you expect a single AI activity to absorb too much context (documentation, code, data) in one go, it may gloss over important things, or discard relevant details to make room for more information; either way, that's an invitation for a bad outcome.

In this new world, the way to avoid agentic coding's instant bankruptcy trap is to adopt an engineering mindset: disciplined use of solid system design techniques, thorough documentation of specifications and ruthless enforcement of uncompromising quality standards. In other words, comprehensive and precise communication of the desired outcome with AI.

A Method to Contain the Madness

We still use the same system design and planning methodology we have for years. It was always about thoughtfully engineering software systems that are predictably built, robust, and adaptable. Only now, AI is accelerating the rate of change, making the prospect of runaway complexity happen a lot faster. This situation doesn't eliminate the need for structured system design; it guarantees the negative outcomes of not using one.

I won't repeat that article here, but I'd like to share a few insights about how our development methodology improves the AI-based software development workflow.

Core use cases.

By thinking about user behavior at its highest level of abstraction, you're getting to the essence of why someone would use the system in the first place. This is one of the most useful bits of context as it provides an invariant way to validate system behavior against user expectations. As always, do this instead of designing against feature requirements which often change.

Workflows.

Detailing user journeys is especially useful in agentic coding. Think of them as recipes. Document them in mind-numbing detail, step by step, decision by decision, failure mode by failure mode. Diagrams are helpful: state machines, activity diagrams, data flow diagrams, etc. Time spent here pays off later with less AI redirection and troubleshooting.

Encapsulation.

AI can't see all the connections in your code base at once. A bad system design (e.g. one with a mess of dependencies, action at a distance, etc.) will cause AI to produce code that works locally and breaks globally. Think of encapsulation as an AI containment strategy — a crisp boundary around the chaos that it can create, giving clear, meaningful context for a well-defined component.

Interface specifications.

The interface between components used to be a contract between engineers. It's now the operating manual for AI agents. If the interface is ambiguous or incompletely defined, AI will satisfy it in one way today and a different way tomorrow. In the worst case, a seemingly reasonable call passes data which is legal but wrong in a non-obvious way, leading to difficult integration bugs.

Tests.

Tests are your electric fence. When thoughtfully done, they enforce system and user expectations, making rapid autonomous coding less risky. AI is really good at spitting out reams of tests that pass, but don't exercise the real failure modes you actually care about, which is worse than no test because it produces false confidence. Although you can't read all of the code AI generates, every test deserves careful human review.

An Ounce of Prevention

The promise of AI and agentic coding is increased leverage. But in order to realize the benefits, you must resist the temptation to just start coding. With skillful system design and a disciplined spec-driven development workflow, AI can be the robot arm you've always dreamed of having.

End

Tell us what you’re working on.

A free 30-minute call with an engineer who knows OHIF. You’ll leave with a clear view of your options.

Book a 30-minute call