Human in the Loop: Process Design for AI-Assisted SaMD
AI coding assistants can accelerate SaMD development. Conformity depends on defined human gates, end-to-end traceability and verification capacity that grows alongside code generation.
AI coding assistants and agentic development tools have arrived in software engineering, including among manufacturers of Software as a Medical Device, or SaMD. Expectations of rapid efficiency gains now meet a differentiated evidence base. McKinsey reports that almost 30% of companies saw productivity decline after introducing agentic AI tools [1]. At the same time, a small group achieves clear quality and speed gains. Their lever is consistent process redesign [2].
For SaMD manufacturers, the message is clear: the regulatory risk does not lie in AI-generated code itself. It lies in a development process designed for human authorship that merely adds AI on top. Human in the Loop needs to be embedded as a defined decision architecture in the quality management system.
Executive Summary
| Key finding | Implication for manufacturers |
|---|---|
| More code does not mean more conforming software. | Verification capacity becomes the bottleneck and must scale with generation capacity. |
| Standards do not distinguish by authorship. | AI-generated code remains fully subject to IEC 62304, ISO 14971 and IEC 81001-5-1. |
| AI tools are computerised systems within the QMS. | Risk-based validation under ISO 13485 is required. |
| Value comes from process design, not tool rollout. | Roles, approval gates and evidence records need redesign. |
1. The productivity paradox: more code, not more software
The gap between activity and outcome is now well documented. McKinsey cites a study in which AI tools increased coding activity by 180%, while shipped releases rose by only 30% [1]. Acceptance among developers also remains limited. Globally, 46% of developers distrust the accuracy of AI tools, 33% trust them and only 3% report high trust in their results [1].
That scepticism has a technical basis. A CodeRabbit analysis of 470 open-source pull requests, including 320 AI co-authored and 150 created solely by humans, reported the following findings [3]:
| Defect category | AI co-authored code compared with human code | Relevance for SaMD |
|---|---|---|
| Issues overall | Around 1.7 times higher | Higher review and verification workload |
| Logic and correctness | 75% more frequent | Direct connection to patient safety |
| Security vulnerabilities | Up to 2.74 times higher | IEC 81001-5-1, MDR Annex I Section 17.2 |
| Error handling | Gaps almost twice as frequent | Resilience against misuse and exceptional conditions |
The study did not directly confirm authorship. It identified AI involvement through pull request signals and assumed human authorship for the remaining pull requests [3]. The direction of the finding remains important. Missing null checks, guardrails and complete exception handling are critical in safety-relevant medical device software.
2. What does not change from a regulatory perspective
Manufacturers do not need a new legal framework. They need consistent application of the existing one. IEC 62304 defines lifecycle requirements for medical device software. The standard does not assess who wrote a line of code. It assesses whether requirements, architecture, verification and release are controlled and traceable [14]. The Johner Institute has made the same point for conventional code generators: generated code can undergo the same quality assurance measures as handwritten code [4].
There is also a tooling layer. LLM-based systems count as computerised systems. Where manufacturers use them in QMS processes, they fall under ISO 13485 requirements [5]. The object of validation is not the model as an abstract technology. It is the computerised system in its defined intended use, context and data flow. Validation effort is set on a risk basis.
Using a coding assistant does not automatically make a SaMD an AI system under Regulation (EU) 2024/1689. The decisive question is whether the product itself contains AI functionality. For AI-based medical devices, the MDR or IVDR and AI Act apply in a complementary way. The joint AIB and MDCG guidance recommends integrating necessary testing, reporting and documentation processes into existing MDR or IVDR procedures wherever appropriate [13].
Standardisation will not provide near-term relief. According to the Johner Institute, the next milestone for IEC 62304 is expected to be a second Committee Draft, rather than the second edition. An FDIS is expected only in 2028 and publication no earlier than 2029 [6]. The draft contains an informative annex on AI-enabled health software [7]. Manufacturers should therefore establish their answers in the QMS now.
3. Human in the Loop in practice: where people decide
Human in the Loop is often understood as the broad idea that a developer checks the output. The approach becomes regulatory robust only when the organisation defines which qualified person takes which decision at which lifecycle point and how that decision is documented. The European Commission explicitly identifies human oversight as a requirement for high-risk AI in healthcare [12].
| Decision point | Why it must remain human | Standard reference |
|---|---|---|
| Software requirements | Intended purpose, clinical context and risk controls remain the manufacturer's responsibility. | IEC 62304, 5.2; ISO 14971 |
| Architecture and segregation | Safety classification and component boundaries determine the full scope of evidence. | IEC 62304, 5.3 |
| SOUP selection | AI tools suggest libraries. Their risk and maintenance status require assessment. | IEC 62304, 5.3.3 and 5.3.4; IEC 81001-5-1 |
| Risk analysis of new code paths | AI can create plausible yet unspecified behaviours. | ISO 14971; IEC 62304, Section 7 |
| Code review and acceptance criteria | Software units are verified against defined criteria. | IEC 62304, 5.5 |
| Release | Accountability for conformity cannot be delegated. | IEC 62304, 5.8; MDR Art. 10 |
This view aligns with McKinsey's observation that roles are changing. Developers need judgement, code-review and supervision skills to steer agents. The emphasis moves towards architectural coherence, domain modelling and AI supervision [8].
4. Process design: five building blocks
The companies that genuinely benefit differ less in their choice of tools than in their operating model. The top quintile achieves 16% to 30% improvements in productivity, time to market and customer experience, together with 31% to 45% quality gains. Simply providing AI tools changes little [2]. Leading organisations build verification, control and measurement systems that keep pace with faster ways of working [9]. For SaMD, this translates into five building blocks:
| Building block | Content | QMS evidence |
|---|---|---|
| 1. Risk-based tool validation | Assess the computerised system, including model, context, integration and data flow, against intended use. | Validation plan and report under ISO 13485, 4.1.6; ISO/TR 80002-2 |
| 2. Specification before generation | No code without an approved requirement and architecture input. Prompts and context reference requirement IDs. | Traceability matrix |
| 3. Provenance and configuration management | Mark AI-generated changes. Manage tool and model versions as configuration items. | IEC 62304, Section 8 |
| 4. Strengthened verification | Static analysis, coverage targets, negative testing and security scans are mandatory quality gates. | IEC 62304, 5.5 to 5.7; IEC 81001-5-1 |
| 5. Competence and roles | Define authority for review and release. Record training evidence for AI use. | ISO 13485, 6.2 |
The fifth building block is frequently underestimated. The AI guideline developed by the Johner Institute together with TÜV SÜD asks manufacturers to identify and document competency requirements for each role within the QMS scope that is directly or indirectly connected with AI [10].
5. Deployment matrix by safety class
Not every software component requires the same degree of restraint. The following matrix provides orientation for an internal procedure. In view of the forthcoming edition of IEC 62304, the draft is expected to replace classes A, B and C with Levels I and II [11].
| Use case | Class A | Class B | Class C |
|---|---|---|---|
| Test code, test data, mocks | Broadly usable | Broadly usable | Usable with review |
| Boilerplate, UI without safety relevance | Broadly usable | Usable with review | Usable with review |
| Business logic with risk relevance | Usable with review | Tightly governed, four-eyes review | Only with documented rationale and extended verification |
| Software risk-control measures | Tightly governed | Tightly governed, four-eyes review | Not recommended without independent verification |
| Architecture decisions | AI as a sparring partner, decision remains human | As Class A | As Class A |
Conclusion
AI-generated code is neither taboo nor a shortcut for SaMD manufacturers. The standards are technology-neutral enough to accommodate it. They require specified intent, traceable decisions and robust verification. McKinsey warns that agentic software development without a systematic approach can lead to unintended results [1]. In a regulated setting, that creates audit findings, rework in technical documentation and avoidable risks for patients.
Manufacturers should prioritise three actions:
| Priority | Action |
|---|---|
| 1 | Inventory AI tools already in use, including shadow IT, and classify them as computerised systems. |
| 2 | Embed Human Gates and the deployment matrix in the software development plan and procedures. |
| 3 | Scale verification capacity before increasing generation capacity. |
Organisations that establish these foundations use AI through their quality management system. That is where the competitive advantage lies.
Quellen und weiterführende Links / Sources and further links
- [1] McKinsey & Company: Technology Trends Outlook 2026, September 2026, zitiert nach ANI, 20.09.2026.
- [2] McKinsey & Company: The AI revolution in software development, April 2026.
- [3] CodeRabbit: State of AI vs Human Code Generation Report, Dezember 2025.
- [4] Johner Institut: Code-Generierung: Die Zauberformel für schnelleren und besseren Code?
- [5] Johner Institut: ChatGPT validieren: Medizinproduktehersteller aufgepasst!
- [6] Johner Institut: IEC 62304 2. Ausgabe: Alle Anwendungsbereiche und Änderungen, Juli 2026.
- [7] VDE: IEC 62304 Edition 2, Änderungen für Hersteller.
- [8] McKinsey & Company: Rewiring software delivery for the agentic era, Mai 2026.
- [9] McKinsey & Company: Beyond the copilot: Scaling the agentic product development life cycle, August 2026.
- [10] Johner Institut: Leitfaden zur KI bei Medizinprodukten, gemeinsam mit TÜV SÜD.
- [11] Quickbird Medical: Neuer Entwurf zur IEC 62304 veröffentlicht, Februar 2025.
- [12] Europäische Kommission: Artificial Intelligence in healthcare.
- [13] AIB 2025-1 / MDCG 2025-6: Interplay between the MDR/IVDR and the AIA, Juni 2025.
- [14] IEC 62304:2006, Medical device software, Software life cycle processes.
Do you have a concrete project?
Talk to us about your project, no obligation, at eye level.
Schedule a conversation


