07The safety net I thought I had

For ten weeks, the quality system was wired into every workflow, on paper. In practice no workflow ever loaded it. What caught the problem was the quality system itself.

On 17 October, while fixing something unrelated, I found that none of BMAD's workflows had ever loaded the quality system. The plugin described in chapter 06 had told every workflow that matters, from writing a story to implementing it, reviewing it and holding the retrospective, to load the Definition of Done, the constraints register, the traceability rules and the risk register before doing anything else. I believed that every agent read the rules before every story. None of them did.

What was true?

The plugin wrote its wiring into a BMAD configuration file that BMAD reads for other settings, but never for workflows, which take their customisations from one file per workflow. The wiring was valid, in a file BMAD loaded, in a section nothing ever looked at. There was no error and no warning.

0

The number of BMAD workflows that loaded the QMS automatically, from the day the plugin was installed until 17 October 2026.

The fix took a day: one file per workflow, checked against BMAD's own code. While fixing it, I re-ran the plugin, which overwrote eleven QMS files I had customised. Version control gave them back within minutes.

Why did it hold anyway?

Here the automation failed, and the practice held. While the wiring was broken, the QMS's own audits and corrective actions kept it in force, and I kept asking whether the rules were applied. In mid-September I asked for a full audit: was the QMS actually being applied? It found that test traceability to requirements had never been adopted, that the map of the product's components had not been updated in six weeks, and that the clinical hazards of the device's first features had never been entered in the risk register. Ten days later, a compliance check of a single day's work found a story closed without code review, and two releases running stale builds. Every finding was logged as an open item, and every one led to a decision.

Three layers of enforcementInstructions, which the agent may or may not read, depend on the agent's attention. Audits, run by a person, depend on that person's attention. Build checks cannot be skipped and depend on nothing.1 Instructionsread by the agent, or notRules written for the agent, in its files.The QMS wiring: no workflow loaded ituntil 17 October, and nothing said so.DEPENDS ONthe agent's attention2 Auditsrun by a personChecks I ask for, from time to time.The September audits: traceability neveradopted, hazards never entered.DEPENDS ONmy attention3 Build checkscannot be skippedRun on every build; a failure stops it.Coverage that can only rise, 95% branchcoverage on risk controls, traced tests.DEPENDS ONnothing
Figure 7. Three layers of enforcement: instructions an agent may or may not read, audits a person runs, checks the build cannot skip. Only the last does not depend on attention.

Rules that drift

The broken wiring explains only part of what slipped. My rule against Hibernate came back three times. The first was my own fault: a major component was built on it while I was focused on other problems, and it took a dedicated migration to remove it. The second was an architecture draft for the device that specified the same kind of framework, three weeks after the rule was written down; it was corrected the next day. The third I found while preparing this article: in two places, the rule that every SQL statement is a constant had been relaxed without anyone saying so. Nothing unsafe resulted, but the story claimed compliance, and neither Claude nor I had said otherwise. A search with optional criteria may need some leeway, but that leeway was supposed to go through a review.

Two more surfaced in November, while I measured the code for Appendix E. Since 30 September, the build had run offline and in quiet mode, so the bill of materials was no longer produced and nothing scanned the dependencies; a driver with three high advisories shipped in the meantime. And the register of third-party software listed only what the product asks for by name: six of the eleven components it ships were missing. Both checks looked in place and did nothing.

What happened, what I learned, what I decided

A quality system records a problem in three steps: what went wrong, why, and what will stop it happening again. I have applied the same discipline to my own mistakes. Some of the decisions are in place; others are recorded and still to be carried out.

Seven slips, and what I decidedSeven rows. The QMS wiring never loaded: found by accident on 17 October; rewired and verified, with a build check decided; partly done. The plugin overwrote eleven customised files: restored at once from version control; the plugin now refuses to overwrite, and my tools meet the same Definition of Done; fix to verify. Rules existed but nobody checked them: found by the September audit; a QMS check before each story closes, and key rules turned into build checks; in place. A story closed without review: found by a review run after the fact; no story is done without review and a live check of the deployed build; in place. The SQL rule relaxed in silence: found while preparing this article; a bounded exception with a build check, and code review loads the constraints; to apply. The bill of materials and the dependency scan stopped on 30 September: found while measuring for Appendix E; every build produces and scans the bill or fails; to apply. The register of third-party software missed 6 of the 11 shipped components: found the same way; the register generated from the bill of materials; to apply.WHAT HAPPENEDHOW IT SURFACEDWHAT I DECIDEDSTATUSThe QMS wiringnever loadedby accident,on 17 OctoberRewired one file per workflow, verified withBMAD's own code; a build check to followpartly doneThe plugin overwrote11 customised filesat once; versioncontrol restored themThe plugin refuses to overwrite; my toolsmeet the product's Definition of Doneto verifyRules existed,nobody checked themthe SeptemberauditA QMS check before each story closes; keyrules turned into build checksin placeA story closedwithout reviewa review runafter the factNo story done without review and a livecheck of the exact build deployedin placeThe SQL rulerelaxed in silencewhile preparingthis articleA bounded exception, with a build check;code review loads the constraintsto applyThe bill of materialsstopped on 30 Septembermeasuring forAppendix EEvery build produces the bill and scans it,or fails (OPEN-115, OPEN-116)to applyThe register missed6 of 11 componentsthe samemeasurementThe register is generated from the billof materials, so it lists all that shipsto apply
Figure 8. Seven slips: what happened, how each surfaced, what I decided, and where each decision stood in early November 2026.

Two of them need a word more. The review run after the fact on the unreviewed story found that an administrator could grant themselves access to patient data. And the plugin that overwrote my files was one I had built with Claude and never tested end to end, which I would not have accepted for a story. My own tools are now held to the same Definition of Done as the product.

Instructions held most of the time, and most of the time is not good enough for a medical device. Wherever a rule can become a check the build cannot skip, I am moving it there. The pending decisions do not yet have dates, which is the gap chapter 10 admits, but each is recorded as an open item in the QMS (OPEN-105 to OPEN-107).

I had expected the automation to carry the quality system. The automation failed silently, and the quality system caught what it would have let through: its audits, its open items and its corrective actions. With AI writing the code, I rely on the QMS more than before.

For your own project

Any team that gives an AI agent its rules through configuration files, project instructions or prompts can lose them the same way, without an error or a warning.

  • Check that your agents actually receive the rules you wrote, using the tool's own code or output, and check it again on every build.
  • Move every rule that can become a build check into one, and run audits for the rest, including the places where a rule has been relaxed unannounced.
  • Hold the tools you build with AI, scripts, plugins, configuration, to the same definition of done as the product.

Status as of October 2026. This chapter will be updated as the pending decisions are carried out.