Governed Agentic Coding: How Domain Experts Can Build Real Software With AI Pathologist Anas M. Saad, MD, MBA, and engineer Eyad Saad, co-founders of Amal Health Systems, describe "Governed Agentic Coding" (GAC), a framework in which AI agents write code while a domain expert directs, tests and accepts each bounded change and an engineer is routed the decisions beyond that expert's judgment. The authors used GAC to build an anatomic-pathology laboratory information system that now handles official cases, tracking specimens through laboratory work to a pathologist's signed report. The engineer's expertise was required at a handful of points: the architecture before the build began, a few mechanisms the agents could not get right, the moments an agent was stuck, and deployment. Anas M. Saad, MD, MBA; Eyad Saad Disclosure: The authors co-founded Amal Health Systems, the company providing the system discussed here. Generative AI ChatGPT was used in drafting and revising this article. As a pathologist, I could judge whether the workflow served the laboratory, down to what a button should do and where information should appear. I knew exactly why the software in a laboratory can make the work harder than it should be: the missing step in a workflow, the screen that asks for what the system already knows, the rule that breaks on the first unusual case of the week. What I could not do was use this knowledge to build a full end-to-end lab system on my own. I could not personally judge every mechanism beneath the screen. Directing the build meant finding a way to make those technical decisions without mistaking a working interface for a sound system. Existing guidance explains why that distinction matters. Simon Willison https://simonwillison.net/guides/agentic-engineering-patterns/what-is-agentic-engineering/ separates vibe coding, where code is accepted unread and unreviewed, from agentic engineering, where people specify, verify and iterate. Arvind Narayanan and Sayash Kapoor https://www.normaltech.ai/p/why-ai-hasnt-replaced-software-engineers describe a decide-execute-deliver sandwich: AI compresses execution, while the ends require “deep human understanding of the codebase, the business, and the environment.” Kieran Klaassen https://every.to/p/compound-engineering-gets-an-upgrade , crediting Trevin Chow, similarly places humans at both ends of the sandwich. Our experience builds on that need for human understanding by making its distribution explicit. I directed and built the product; my co-author Eyad Saad, an engineer, supplied technical judgment where mine was insufficient. Agents wrote the code, and different AI agents reviewed plans and results. I did not have to master the codebase to lead the work, but decisions beyond my expertise needed an engineer who could question the approach and stop it. We call this arrangement Governed Agentic Coding, or GAC: agentic because the agents write the code, governed because every change is bounded, checked and accepted, and the decisions that need an engineer are routed to one. GAC gives a domain expert a way to direct bounded, reviewed work while identifying decisions that require engineering judgment. We used it to build an anatomic-pathology laboratory information system that now handles official cases, tracking specimens through laboratory work to a pathologist’s signed report. The framework begins with who can judge what, then organizes how a change is planned, built, checked and accepted. The claim I want to make is narrower than “anyone can build software now” and larger than “product managers can use coding agents”: a domain expert can build most of a real system without necessarily reading or writing code, but still needs an engineer’s expertise at specific, nameable points rather than throughout. I wrote the plans, directed the agents, tested every change and decided what shipped. AI did more than write the code. AI agents questioned every plan and every result, and AI reviews of the whole system found what the per-change checks had missed. Eyad’s expertise was needed at a handful of points: the architecture before the build began, a few mechanisms the agents could not get right, the moments an agent was stuck, and deployment. • Product: what should the software let people do, and how should it feel to use? This judgment was mine. I directed the workflow and decided whether a change served the work. • Logic: what rules and mechanisms will produce that behavior, and how will the product be built? What is the logic that will allow each feature to function as intended? This layer belonged to all of us, people and AI. I examined whether the rules fit the laboratory, the agents proposed and built them, and AI reviewers checked them change by change and across the whole system. Eyad’s judgment came in where the logic was hard: the architecture and data model at the start, and mechanisms like locking that the agents kept getting wrong. None of us could be relied on to get it right alone, and the agents least of all. • Code: does the implementation express those rules correctly and work within the wider system? An AI agent wrote it. Another agent checked it, automatic tests and my own testing checked what it did, and AI reviews of the whole system read it at the end. I did not need to read it, and Eyad did not need to review every single line of it. The layers overlap. I sometimes proposed a rule; Eyad sometimes explained why a technical constraint should change what users see. Their value is in making a decision’s owner explicit. The workflow carries that division of judgment into each piece of development work. We organized development into packets: bounded units of work with an agreed scope and acceptance criteria. A packet can contain several related items. System planning produced our initial packets, which changed as we learned. “Build the reporting system” leaves most decisions implicit. A packet for additions to an existing report gives me questions I can answer: what should readers see, what must remain in the history, and what would make the result unacceptable? If the scope changes, the plan and criteria change explicitly. After initial planning, the domain expert repeats steps 2–7 for each packet, with separate AI review and engineering input where required. 1. Plan the system and initial packets. Describe the intended workflow and requirements with AI. Have the engineer review the architecture and data model, then organize the planned work into bounded packets. 2. Start the next packet. Confirm its contents, scope and acceptance criteria, adjusting them as needed. Identify engineering questions that must be resolved before implementation. 3. Review the implementation plan. The coding agent proposes an approach; a separate AI conversation checks it against the planning documents. Resolve product questions, take technical questions beyond your judgment to the engineer, and revise the plan before coding. 4. Implement and review the result. The coding agent builds the agreed packet and its tests. The review conversation examines the changes and completion report. Send findings back for correction and review the corrections. 5. Test the behavior. With AI guidance, check the underlying operations and walk through the user workflow against the acceptance criteria. Failures return to implementation, or to the plan if the requirement was misunderstood. 6. Make the human decision. The domain expert accepts the behavior, requests corrections or holds the packet open. Resolve required engineering decisions before acceptance; passing AI reviews and tests does not settle them. 7. Record and revise the plan. Update shared records with decisions, outcomes, accepted limitations and deferred work. Revise existing packets, add new ones and update engineering triggers as needed. Continue from the updated packet plan. Escalation can interrupt any step. Architecture or data-model changes, hard mechanisms, deployment and repeated agent failure can require engineering judgment. Hold the affected work until the question is resolved. The triggers should be agreed before implementation, then expanded as the build exposes new ones. Review the whole system across packets. Examine interactions between completed changes and feed findings into corrective packets, stronger checks and updated records. Our whole-system reviews came late; making them recurring is a recommendation drawn from that experience. Written down, it looks tidy. Here is what it looked like in practice. Early on, the agent proposed an interface organized the way the planning documents were organized: by technical module. Accessioning here, grossing there, reporting somewhere else. It was faithful to the documents but wrong for the laboratory. A pathologist opens a case and wants to do the case’s work in one place. I said so, the plan changed, and the agent contributed real improvements to how new cases are created along the way. The modules did not go away; they are still how the system is built. But the work of a case now happens in one place, and the product’s organization changed without my designing a line of its code. That route, from an objection to a revised plan to changed behavior, let me control what a button meant, where information appeared and what happened next. Repeated revisions brought the workflow into line with how people actually used it. Each proposed implementation also needed scrutiny. The separate review conversation checked the agent’s plan against the planning documents and explained assumptions in ordinary language. I took product decisions back to the coding session and referred technical questions to Eyad. After coding, the reviewer read the changes and completion report, sent findings back and reviewed the corrections, sometimes through several rounds before I touched the product. This made assumptions visible: a vague unease became a question the agent had to answer. Then I ran the thing. The reviewing agent prepared checks at two levels: the underlying operations, called directly, with their results explained to me; and walkthroughs of the interface, where I could judge the actual workflow. Both matter. A screen can look right while the operation underneath mishandles an exception, and an operation can return the right result while the screen makes routine work confusing. When one pathologist edits a case, a colleague should still be able to read it without editing it simultaneously. The agent struggled with the rule until I suggested using another existing mechanism that allowed pathologist B to see that case as read-only while pathologist A edits. That expressed the behavior I wanted. Releasing the lock when A finished raised a different question. When a log-in session expired, the lock was released, but when the browser tab closed, the lock did not at first. The agent tried four approaches, and they all hit different reliability failures under Chrome’s tab-teardown timing. I could follow the explanations of why each failed, but I could not judge a reliable way out. The redesign was Eyad’s. Behind the scenes, the editor periodically renews the lock; when renewals stop, the lock is released and another user can take over. He also separated renewal from the login session, using a token on an endpoint that does not extend that session. Otherwise, an unattended open tab could keep its user signed in indefinitely. The agents built it. I could judge the working arrangement and argue about its rules; Eyad judged the mechanism. We then recorded that future changes touching the lock required his review before implementation. Eyad’s contribution extended beyond the lock. His formal code reviews were most consequential in the first month, while the foundations were laid. Later he continued to make decisions about different aspects of the build, especially regarding architectural changes and new dependencies, or following repeated agent failures. He also wrote the deployment definitions. His involvement was concentrated, but it remained an essential part of the build. Those engineering interventions and repeated checks still left gaps. A whole-system AI audit after 78 packets, returned 213 findings in work that had passed our per-change reviews and automated checks. Sixteen findings were classified as high, 66 as medium, 99 as low and 32 as informational, with none critical. Reviewing the whole codebase exposed interactions that our checks on separate changes had missed. These also counts include documentation problems; the records meant to carry product decisions into the code fell behind the implementation. We had to backfill status entries for fourteen merged packets; our progress and deferred-work trackers were added after development had begun. Documentation drift was the first audit’s largest category: 27 of 213 findings. In this method, stale records can turn an old decision into a new instruction. Keeping them current is part of maintaining the product. Some corrections had solved a problem in one place while leaving the same kind of problem elsewhere. Reviewing a fix therefore had to include asking where else its underlying assumption appeared. Separate AI agents could share a mistaken assumption, and passing tests could reinforce it. Keeping review separate gave it its own task; their agreement did not establish correctness. These findings are why I would review interactions across packets repeatedly during development and check the tests as well as the fixes. A broader AI review found gaps in our earlier checks but could not establish that it had caught everything. Before the pilot, we addressed the major findings and documented the remaining items we assessed as low risk for deferred work. Staff in different laboratory roles tested the system repeatedly using test cases. At multiple laboratories, staff also processed real cases while maintaining their existing practices and systems, confirming that the complete workflow worked as needed before official adoption. The system supports laboratory workflow and human-authored reporting, with signed reports preserved as versions and corrections entered as addenda or amendments. It does not provide diagnostic AI or instrument interfaces. During the development of V1, I spent at least 30–40 hours a week articulating requirements, following explanations, running checks and revisiting the product. Most implementation work used Claude Code with Claude Opus; some reviews used Claude Fable. In Paul Roetzer’s https://smarterx.ai/smarterxblog/ai-replacing-entry-level-jobs architect, orchestrator and apprentice framework https://smarterx.ai/smarterxblog/ais-impact-on-employment-and-org-charts , this is the orchestrator’s work: directing people and agents while drawing on expertise they do not personally possess. Across the 93-day V1 build, agents generated 54,216 lines of implementation code and 43,834 lines of tests, in twelve backend modules with 156 API endpoints, through 86 packets. Those figures describe the system’s scale, not the effort saved. Eyad’s review and deployment work came in addition to my time. We did not measure a comparable build without AI, so this case cannot establish a cost advantage or comparative safety. Counting that human work matters when assessing what AI can take on. Anthropic’s October 2026 report, The AI Expectations Gap https://www.anthropic.com/research/ai-expectations-gap , found that staff respondents expected AI to be capable of handling 75 percent of their current work hours by 2030, versus 28 percent among employed U.S. respondents. Those are expectations about capability, not adoption. The survey also counts checking and fixing output when asking about time saved. Our build illustrates how substantial that checking role can be even when agents write all the implementation code. To try the framework, start with one bounded packet: agree its scope, acceptance criteria and engineering triggers, then plan, build, review, test and correct. Record the decisions so the next session inherits what was learned. The opportunity is practical control for the person who understands the work, including the small details that determine whether the software is useful. The method asks that person to follow explanations, challenge assumptions and know when their judgment is insufficient. It also requires an engineer who can review the decisions routed to them. Without those conditions, this is just vibe coding with better paperwork. Governed Agentic Coding: How Domain Experts Can Build Real Software With AI https://pub.towardsai.net/governed-agentic-coding-how-domain-experts-can-build-real-software-with-ai-5f674c6fc5d2 was originally published in Towards AI https://pub.towardsai.net on Medium, where people are continuing the conversation by highlighting and responding to this story.