Skip to content

Turn any AI agent into an AI Scientist. The #1 Agent Skills library for science, used by 250,000+ scientists worldwide. 177 ready-to-use validated skills plus 100+ scientific databases covering biology, chemistry, medicine, and drug discovery. Compatible with Cursor, Claude Code, Codex, Pi, Antigravity, and the open Agent Skills standard.

Update ISO 13485 evidence workflows

Timothy Kassis5d68dbf89cd7
diff --git a/skills/iso-13485-certification/SKILL.md b/skills/iso-13485-certification/SKILL.md
index bf9970ed..07f9a869 100644
--- a/skills/iso-13485-certification/SKILL.md
+++ b/skills/iso-13485-certification/SKILL.md
@@ -1,677 +1,299 @@
---
name: iso-13485-certification
-description: Comprehensive toolkit for preparing ISO 13485 certification documentation for medical device Quality Management Systems. Use when users need help with ISO 13485 QMS documentation, including (1) conducting gap analysis of existing documentation, (2) creating Quality Manuals, (3) developing required procedures and work instructions, (4) preparing Medical Device Files, (5) understanding ISO 13485 requirements, or (6) identifying missing documentation for medical device certification. Also use when users mention medical device regulations, QMS certification, FDA QMSR, EU MDR, or need help with quality system documentation.
-license: MIT license
-metadata: {"version": "1.0", "skill-author": "K-Dense Inc."}
+description: Prepare and structurally review ISO 13485 QMS scope, controlled documentation, and local evidence manifests. Use for ISO 13485 certification-readiness documentation or for separating related FDA QMSR, MDSAP, and EU MDR/IVDR evidence boundaries; not for legal applicability, compliance, or certification decisions.
+license: MIT
+compatibility: Python 3.11+; bundled CLIs use only the standard library and bounded local JSON/Markdown files, with no network access or credentials.
+allowed-tools: Read, Write, Bash, Glob
+metadata:
+ version: "1.1"
+ skill-author: K-Dense Inc.
---
-# ISO 13485 Certification Documentation Assistant
+# ISO 13485 QMS Evidence Preparation
-## Overview
+## Purpose
-This skill helps medical device manufacturers prepare comprehensive documentation for ISO 13485:2016 certification. It provides tools, templates, references, and guidance to create, review, and gap-analyze all required Quality Management System (QMS) documentation.
+Use this skill to organize QMS scope, controlled documents, implementation records,
+traceability, and readiness evidence for substantive review. It summarizes process
+workflows and provides deterministic local checks; it does not contain ISO clause
+text or perform an audit.
-**What this skill provides:**
-- Gap analysis of existing documentation
-- Templates for all mandatory documents
-- Comprehensive requirements guidance
-- Step-by-step documentation creation
-- Identification of missing documentation
-- Compliance checklists
+## Non-negotiable boundary
-**When to use this skill:**
-- Starting ISO 13485 certification process
-- Conducting gap analysis against ISO 13485
-- Creating or updating QMS documentation
-- Preparing for certification audit
-- Transitioning from FDA QSR to QMSR
-- Harmonizing with EU MDR requirements
+This skill cannot:
-## Core Workflow
+- certify a QMS, issue or validate a certificate, or promise an audit result;
+- determine legal/regulatory applicability, device classification, reportability,
+ conformity route, product authorization, market access, or compliance;
+- replace authorized management, the management representative, RA/QA, legal
+ counsel, regulatory/competent authorities, a notified body, an MDSAP Auditing
+ Organization, an accreditation body, or a certification body; or
+- infer implementation, conformity, compliance, or readiness from a template,
+ checklist, filename, keyword, document count, percentage, or script result.
-### 1. Assess Current State (Gap Analysis)
+Always label outputs **draft evidence-preparation material for authorized human
+review**. Preserve unresolved decisions as blockers.
-**When to start here:** User has existing documentation and needs to identify gaps
+## ISO copyright
-**Process:**
+ISO standards are copyrighted. Obtain ISO 13485 and related standards from
+[ISO](https://www.iso.org/standard/59752.html), an ISO national member, or another
+authorized source. Do not retrieve, paste, reproduce, or generate clause text.
+Summarize the organization's process and cite the controlled authorized copy.
+See [ISO copyright](https://www.iso.org/copyright.html).
-1. **Collect existing documentation:**
- - Ask user to provide directory of current QMS documents
- - Documents can be in any format (.txt, .md, .doc, .docx, .pdf)
- - Include any procedures, manuals, work instructions, forms
+## Current baseline (researched 2026-07-23)
-2. **Run gap analysis script:**
- ```bash
- python scripts/gap_analyzer.py --docs-dir <path_to_docs> --output gap-report.json
- ```
+- **ISO 13485:** ISO 13485:2016, Edition 3, was confirmed after its 2025
+ systematic review and remains current.
+- **European amendment:** EN ISO 13485:2016/A11:2021 is a European EN amendment,
+ not an ISO international “Amendment 1:2021.” Track AC:2018/A11:2021 only where
+ the European source basis applies.
+- **FDA QMSR:** effective and enforced since **2026-02-02**. Current Part 820 is
+ titled *Quality Management System Regulation*. FDA stopped using QSIT and uses
+ Compliance Program **7382.850**. Treat this as implemented, not a future
+ transition.
+- **MDSAP:** current official Audit Approach is **MDSAP AU P0002.010**, version
+ date **2026-02-02**.
+- **EU:** use current consolidated MDR/IVDR texts, current OJEU harmonised-standard
+ decisions, current MDCG guidance, and the product-specific conformity route.
+- **Risk management:** ISO 14971:2019, Edition 3, was confirmed in 2025. For
+ European work, distinguish EN ISO 14971:2019/A11:2021.
-3. **Review results:**
- - Identify which of the 31 required procedures are present
- - Identify missing key documents (Quality Manual, MDF, etc.)
- - Calculate compliance percentage
- - Prioritize missing documentation
+Read `references/source-ledger.md` before making a time-sensitive statement.
-4. **Present findings to user:**
- - Summarize what exists
- - Clearly list what's missing
- - Provide prioritized action plan
- - Estimate effort required
-
-**Output:** Comprehensive gap analysis report with prioritized action items
-
-### 2. Understand Requirements (Reference Consultation)
-
-**When to use:** User needs to understand specific ISO 13485 requirements
-
-**Available references:**
-- `references/iso-13485-requirements.md` - Complete clause-by-clause breakdown
-- `references/mandatory-documents.md` - All 31 required procedures explained
-- `references/gap-analysis-checklist.md` - Detailed compliance checklist
-- `references/quality-manual-guide.md` - How to create Quality Manual
-
-**How to use:**
-
-1. **For specific clause questions:**
- - Read relevant section from `iso-13485-requirements.md`
- - Explain requirements in plain language
- - Provide practical examples
-
-2. **For document requirements:**
- - Consult `mandatory-documents.md`
- - Explain what must be documented
- - Clarify when documents are applicable vs. excludable
-
-3. **For implementation guidance:**
- - Use `quality-manual-guide.md` for policy-level documents
- - Provide step-by-step creation process
- - Show examples of good vs. poor implementation
-
-**Key reference sections to know:**
-
-- **Clause 4:** QMS requirements, documentation, risk management, software validation
-- **Clause 5:** Management responsibility, quality policy, objectives, management review
-- **Clause 6:** Resources, competence, training, infrastructure
-- **Clause 7:** Product realization, design, purchasing, production, traceability
-- **Clause 8:** Measurement, audits, CAPA, complaints, data analysis
-
-### 3. Create Documentation (Template-Based Generation)
-
-**When to use:** User needs to create specific QMS documents
-
-**Available templates:**
-- Quality Manual: `assets/templates/quality-manual-template.md`
-- CAPA Procedure: `assets/templates/procedures/CAPA-procedure-template.md`
-- Document Control: `assets/templates/procedures/document-control-procedure-template.md`
-
-**Process for document creation:**
-
-1. **Identify what needs to be created:**
- - Based on gap analysis or user request
- - Prioritize critical documents first (Quality Manual, CAPA, Complaints, Audits)
-
-2. **Select appropriate template:**
- - Use Quality Manual template for QM
- - Use procedure templates as examples for SOPs
- - Adapt structure to organization's needs
-
-3. **Customize template with user-specific information:**
- - Replace all placeholder text: [COMPANY NAME], [DATE], [NAME], etc.
- - Tailor scope to user's actual operations
- - Add or remove sections based on applicability
- - Ensure consistency with organization's processes
-
-4. **Key customization areas:**
- - Company information and addresses
- - Product types and classifications
- - Applicable regulatory requirements
- - Organization structure and responsibilities
- - Actual processes and procedures
- - Document numbering schemes
- - Exclusions and justifications
-
-5. **Validate completeness:**
- - All required sections present
- - All placeholders replaced
- - Cross-references correct
- - Approval sections complete
-
-**Document creation priority order:**
-
-**Phase 1 - Foundation (Critical):**
-1. Quality Manual
-2. Quality Policy and Objectives
-3. Document Control procedure
-4. Record Control procedure
-
-**Phase 2 - Core Processes (High Priority):**
-5. Corrective and Preventive Action (CAPA)
-6. Complaint Handling
-7. Internal Audit
-8. Management Review
-9. Risk Management
-
-**Phase 3 - Product Realization (High Priority):**
-10. Design and Development (if applicable)
-11. Purchasing
-12. Production and Service Provision
-13. Control of Nonconforming Product
-
-**Phase 4 - Supporting Processes (Medium Priority):**
-14. Training and Competence
-15. Calibration/Control of M&M Equipment
-16. Process Validation
-17. Product Identification and Traceability
-
-**Phase 5 - Additional Requirements (Medium Priority):**
-18. Feedback and Post-Market Surveillance
-19. Regulatory Reporting
-20. Customer Communication
-21. Data Analysis
-
-**Phase 6 - Specialized (If Applicable):**
-22. Installation (if applicable)
-23. Servicing (if applicable)
-24. Sterilization (if applicable)
-25. Contamination Control (if applicable)
-
-### 4. Develop Specific Documents
-
-#### Creating a Quality Manual
-
-**Process:**
-
-1. **Read the comprehensive guide:**
- - Read `references/quality-manual-guide.md` in full
- - Understand structure and required content
- - Review examples provided
-
-2. **Gather organization information:**
- - Legal company name and addresses
- - Product types and classifications
- - Organizational structure
- - Applicable regulations
- - Scope of operations
- - Any exclusions needed
-
-3. **Use template:**
- - Start with `assets/templates/quality-manual-template.md`
- - Follow structure exactly (required by ISO 13485)
- - Replace all placeholders
-
-4. **Complete required sections:**
- - **Section 0:** Document control, approvals
- - **Section 1:** Introduction, company overview
- - **Section 2:** Scope and exclusions (critical - must justify exclusions)
- - **Section 3:** Quality Policy (must be signed by top management)
- - **Sections 4-8:** Address each ISO 13485 clause at policy level
- - **Appendices:** Procedure list, org chart, process map, definitions
-
-5. **Key requirements:**
- - Must reference all 31 documented procedures (Appendix A)
- - Must describe process interactions (Appendix C - create process map)
- - Must define documentation structure (Section 4.2)
- - Must justify any exclusions (Section 2.4)
-
-6. **Validation checklist:**
- - [ ] All required content per ISO 13485 Clause 4.2.2
- - [ ] Quality Policy signed by top management
- - [ ] All exclusions justified
- - [ ] All procedures listed in Appendix A
- - [ ] Process map included
- - [ ] Organization chart included
-
-#### Creating Procedures (SOPs)
-
-**General approach for all procedures:**
-
-1. **Understand the requirement:**
- - Read relevant clause in `references/iso-13485-requirements.md`
- - Understand WHAT must be documented
- - Identify WHO, WHEN, WHERE for your organization
-
-2. **Use template structure:**
- - Follow CAPA or Document Control templates as examples
- - Standard sections: Purpose, Scope, Definitions, Responsibilities, Procedure, Records, References
- - Keep procedures clear and actionable
-
-3. **Define responsibilities clearly:**
- - Identify specific roles (not names)
- - Define responsibilities for each role
- - Ensure coverage of all required activities
-
-4. **Document the "what" not excessive "how":**
- - Procedures should define WHAT must be done
- - Detailed HOW-TO goes in Work Instructions (Tier 3)
- - Strike balance between guidance and flexibility
-
-5. **Include required elements:**
- - All elements specified in ISO 13485 clause
- - Records that must be maintained
- - Responsibilities for each activity
- - References to related documents
-
-**Example: Creating CAPA Procedure**
-
-1. Read ISO 13485 Clauses 8.5.2 and 8.5.3 from references
-2. Use `assets/templates/procedures/CAPA-procedure-template.md`
-3. Customize:
- - CAPA prioritization criteria for your organization
- - Root cause analysis methods you'll use
- - Approval authorities and responsibilities
- - Timeframes based on your operations
- - Integration with complaint handling, audits, etc.
-4. Add forms as attachments:
- - CAPA Request Form
- - Root Cause Analysis Worksheet
- - Action Plan Template
- - Effectiveness Verification Checklist
-
-#### Creating Medical Device Files (MDF)
-
-**What is an MDF:**
-- File for each medical device type or family
-- Replaces separate DHF, DMR, DHR (per FDA QMSR harmonization)
-- Contains all documentation about the device
-
-**Required contents per ISO 13485 Clause 4.2.3:**
-
-1. General description and intended use
-2. Label and instructions for use specifications
-3. Product specifications
-4. Manufacturing specifications
-5. Procedures for purchasing, manufacturing, servicing
-6. Procedures for measuring and monitoring
-7. Installation requirements (if applicable)
-8. Risk management file(s)
-9. Verification and validation information
-10. Design and development file(s) (when applicable)
-
-**Process:**
-
-1. Identify each device type or family
-2. Create MDF structure (folder or binder)
-3. Collect or create each required element
-4. Ensure traceability between documents
-5. Maintain as living document (update with changes)
-
-### 5. Conduct Comprehensive Gap Analysis
-
-**When to use:** User wants detailed assessment of all requirements
-
-**Process:**
-
-1. **Use comprehensive checklist:**
- - Open `references/gap-analysis-checklist.md`
- - Work through clause by clause
- - Mark status for each requirement: Compliant, Partial, Non-compliant, N/A
-
-2. **For each clause:**
- - Read requirement description
- - Identify existing evidence
- - Note gaps or deficiencies
- - Define action required
- - Assign responsibility and target date
-
-3. **Summarize by clause:**
- - Calculate compliance percentage per clause
- - Identify highest-risk gaps
- - Prioritize actions
-
-4. **Create action plan:**
- - List all gaps
- - Prioritize: Critical > High > Medium > Low
- - Assign owners and dates
- - Estimate resources needed
-
-5. **Output:**
- - Completed gap analysis checklist
- - Summary report with compliance percentages
- - Prioritized action plan
- - Timeline and milestones
-
-## Common Scenarios
-
-### Scenario 1: Starting from Scratch
-
-**User request:** "We're a medical device startup and need to implement ISO 13485. Where do we start?"
-
-**Approach:**
-
-1. **Explain the journey:**
- - ISO 13485 requires comprehensive QMS documentation
- - Typically 6-12 months for full implementation
- - Can be done incrementally
-
-2. **Start with foundation:**
- - Quality Policy and Objectives
- - Quality Manual
- - Organization structure and responsibilities
-
-3. **Follow the priority order:**
- - Use Phase 1-6 priority list above
- - Create documents in logical sequence
- - Build on previously created documents
-
-4. **Key milestones:**
- - Month 1-2: Foundation documents (Quality Manual, policies)
- - Month 3-4: Core processes (CAPA, Complaints, Audits)
- - Month 5-6: Product realization processes
- - Month 7-8: Supporting processes
- - Month 9-10: Internal audits and refinement
- - Month 11-12: Management review and certification audit
-
-### Scenario 2: Gap Analysis for Existing QMS
-
-**User request:** "We have some procedures but don't know what we're missing for ISO 13485."
-
-**Approach:**
-
-1. **Run automated gap analysis:**
- - Ask for document directory
- - Run `scripts/gap_analyzer.py`
- - Review automated findings
-
-2. **Conduct detailed assessment:**
- - Use comprehensive checklist for user's specific situation
- - Go deeper than automated analysis
- - Assess quality of existing documents, not just presence
-
-3. **Provide prioritized gap list:**
- - Missing mandatory procedures
- - Incomplete procedures
- - Quality issues with existing documents
- - Missing records or forms
-
-4. **Create remediation plan:**
- - High priority: Safety-related, regulatory-required
- - Medium priority: Core QMS processes
- - Low priority: Improvement opportunities
-
-### Scenario 3: Creating Specific Document
-
-**User request:** "Help me create a CAPA procedure."
-
-**Approach:**
-
-1. **Explain requirements:**
- - Read ISO 13485 Clauses 8.5.2 and 8.5.3 from references
- - Explain what must be in CAPA procedure
- - Provide examples of good CAPA processes
-
-2. **Use template:**
- - Start with CAPA procedure template
- - Explain each section's purpose
- - Show what needs customization
-
-3. **Gather user-specific info:**
- - How are CAPAs initiated in their organization?
- - Who are the responsible parties?
- - What prioritization criteria make sense?
- - What RCA methods will they use?
- - What are appropriate timeframes?
-
-4. **Create customized procedure:**
- - Replace all placeholders
- - Adapt to user's processes
- - Ensure completeness
-
-5. **Add supporting materials:**
- - CAPA request form
- - RCA worksheets
- - Action plan template
- - Effectiveness verification checklist
-
-### Scenario 4: Updating for Regulatory Changes
-
-**User request:** "We need to update our QMS for FDA QMSR harmonization."
-
-**Approach:**
-
-1. **Explain changes:**
- - FDA 21 CFR Part 820 harmonized with ISO 13485
- - Now called QMSR (effective Feb 2, 2026)
- - Key change: Medical Device File replaces DHF/DMR/DHR
-
-2. **Review current documentation:**
- - Identify documents referencing QSR
- - Find separate DHF, DMR, DHR structures
- - Check for ISO 13485 compliance gaps
-
-3. **Update strategy:**
- - Update references from QSR to QMSR
- - Consolidate DHF/DMR/DHR into Medical Device Files
- - Add any missing ISO 13485 requirements
- - Maintain backward compatibility during transition
-
-4. **Create transition plan:**
- - Update Quality Manual
- - Update MDF procedure
- - Reorganize device history files
- - Train personnel on changes
-
-### Scenario 5: Preparing for Certification Audit
-
-**User request:** "We have our documentation ready. How do we prepare for the certification audit?"
-
-**Approach:**
-
-1. **Conduct readiness assessment:**
- - Use comprehensive gap analysis checklist
- - Review all documentation for completeness
- - Verify records exist for all required items
- - Check for consistent implementation
-
-2. **Pre-audit checklist:**
- - [ ] All 31 procedures documented and approved
- - [ ] Quality Manual complete with all required content
- - [ ] Medical Device Files complete for all products
- - [ ] Internal audit completed with findings addressed
- - [ ] Management review completed
- - [ ] Personnel trained on QMS procedures
- - [ ] Records maintained per retention requirements
- - [ ] CAPA system functional with effectiveness demonstrated
- - [ ] Complaints system operational
-
-3. **Conduct mock audit:**
- - Use ISO 13485 requirements as audit criteria
- - Sample records to verify consistent implementation
- - Interview personnel to verify understanding
- - Identify any non-conformances
-
-4. **Address findings:**
- - Correct any deficiencies
- - Document corrections
- - Verify effectiveness
-
-5. **Final preparation:**
- - Brief management and staff
- - Prepare audit schedule
- - Organize evidence and records
- - Designate escorts and support personnel
-
-## Best Practices
-
-### Document Development
-
-1. **Start at policy level, then add detail:**
- - Quality Manual = policy level
- - Procedures = what, who, when
- - Work Instructions = detailed how-to
- - Forms = data collection
-
-2. **Maintain consistency:**
- - Use same terminology throughout
- - Cross-reference related documents
- - Keep numbering scheme consistent
- - Update all related documents together
-
-3. **Write for your audience:**
- - Clear, simple language
- - Avoid jargon
- - Define technical terms
- - Provide examples where helpful
-
-4. **Make procedures usable:**
- - Action-oriented language
- - Logical flow
- - Clear responsibilities
- - Realistic timeframes
-
-### Exclusions
-
-**When you can exclude:**
-- Design and development (if contract manufacturer only)
-- Installation (if product requires no installation)
-- Servicing (if not offered)
-- Sterilization (if non-sterile product)
-
-**Justification requirements:**
-- Must be in Quality Manual
-- Must explain why excluded
-- Cannot exclude if process performed
-- Cannot affect ability to provide safe, effective devices
-
-**Example good justification:**
-> "Clause 7.3 Design and Development is excluded. ABC Company operates as a contract manufacturer and produces medical devices according to complete design specifications provided by customers. All design activities are performed by the customer and ABC Company has no responsibility for design inputs, outputs, verification, validation, or design changes."
-
-**Example poor justification:**
-> "We don't do design." (Too brief, doesn't explain why or demonstrate no impact)
-
-### Common Mistakes to Avoid
-
-1. **Copying ISO 13485 text verbatim**
- - Write in your own words
- - Describe YOUR processes
- - Make it actionable for your organization
-
-2. **Making procedures too detailed**
- - Procedures should be stable
- - Excessive detail belongs in work instructions
- - Balance guidance with flexibility
-
-3. **Creating documents in isolation**
- - Ensure consistency across QMS
- - Cross-reference related documents
- - Build on previously created documents
-
-4. **Forgetting records**
- - Every procedure should specify records
- - Define retention requirements
- - Ensure records actually maintained
-
-5. **Inadequate approval**
- - Quality Manual must be signed by top management
- - All procedures must be properly approved
- - Train staff before documents become effective
-
-## Resources
-
-### scripts/
-- `gap_analyzer.py` - Automated tool to analyze existing documentation and identify gaps against ISO 13485 requirements
-
-### references/
-- `iso-13485-requirements.md` - Complete breakdown of ISO 13485:2016 requirements clause by clause
-- `mandatory-documents.md` - Detailed list of all 31 required procedures plus other mandatory documents
-- `gap-analysis-checklist.md` - Comprehensive checklist for detailed gap assessment
-- `quality-manual-guide.md` - Step-by-step guide for creating a compliant Quality Manual
-
-### assets/templates/
-- `quality-manual-template.md` - Complete template for Quality Manual with all required sections
-- `procedures/CAPA-procedure-template.md` - Example CAPA procedure following best practices
-- `procedures/document-control-procedure-template.md` - Example document control procedure
-
-## Quick Reference
-
-### The 31 Required Documented Procedures
-
-1. Risk Management (4.1.5)
-2. Software Validation (4.1.6)
-3. Control of Documents (4.2.4)
-4. Control of Records (4.2.5)
-5. Internal Communication (5.5.3)
-6. Management Review (5.6.1)
-7. Human Resources/Competence (6.2)
-8. Infrastructure Maintenance (6.3) - when applicable
-9. Contamination Control (6.4.2) - when applicable
-10. Customer Communication (7.2.3)
-11. Design and Development (7.3.1-10) - when applicable
-12. Purchasing (7.4.1)
-13. Verification of Purchased Product (7.4.3)
-14. Production Control (7.5.1)
-15. Product Cleanliness (7.5.2) - when applicable
-16. Installation (7.5.3) - when applicable
-17. Servicing (7.5.4) - when applicable
-18. Process Validation (7.5.6) - when applicable
-19. Sterilization Validation (7.5.7) - when applicable
-20. Product Identification (7.5.8)
-21. Traceability (7.5.9)
-22. Customer Property (7.5.10) - when applicable
-23. Preservation of Product (7.5.11)
-24. Control of M&M Equipment (7.6)
-25. Feedback (8.2.1)
-26. Complaint Handling (8.2.2)
-27. Regulatory Reporting (8.2.3)
-28. Internal Audit (8.2.4)
-29. Process Monitoring (8.2.5)
-30. Product Monitoring (8.2.6)
-31. Control of Nonconforming Product (8.3)
-32. Corrective Action (8.5.2)
-33. Preventive Action (8.5.3)
-
-*(Note: Traditional count is "31 procedures" though list shows more because some are conditional)*
-
-### Key Regulatory Requirements
-
-**FDA (United States):**
-- 21 CFR Part 820 (now QMSR) - harmonized with ISO 13485 as of Feb 2026
-- Device classification determines requirements
-- Establishment registration and device listing required
-
-**EU (European Union):**
-- MDR 2017/745 (Medical Devices Regulation)
-- IVDR 2017/746 (In Vitro Diagnostic Regulation)
-- Technical documentation requirements
-- CE marking requirements
-
-**Canada:**
-- Canadian Medical Devices Regulations (SOR/98-282)
-- Device classification system
-- Medical Device Establishment License (MDEL)
-
-**Other Regions:**
-- Australia TGA, Japan PMDA, China NMPA, etc.
-- Often require or recognize ISO 13485 certification
-
-### Document Retention
-
-**Minimum retention:** Lifetime of medical device as defined by organization
-
-**Typical retention periods:**
-- Design documents: Life of device + 5-10 years
-- Manufacturing records: Life of device
-- Complaint records: Life of device + 5-10 years
-- CAPA records: 5-10 years minimum
-- Calibration records: Retention period of equipment + 1 calibration cycle
-
-**Always comply with applicable regulatory requirements which may specify longer periods.**
+## Keep five lanes separate
----
+### 1. ISO 13485 certification
+
+A certification body evaluates the defined management-system scope against the
+authorized standard and certification scheme. A certificate is limited to its stated
+organization, sites, activities, technical/product scope, edition, and validity.
+
+### 2. FDA QMSR inspection/compliance
+
+FDA assesses applicable FDA requirements. ISO certification does not exempt a
+manufacturer from inspection, and FDA does not issue ISO 13485 certificates. Use the
+current eCFR and FDA supplemental provisions; do not use the former QSR section
+structure as a current requirements map.
+
+### 3. MDSAP audit
+
+An MDSAP-recognized Auditing Organization conducts a regulatory audit using the
+current MDSAP approach and applicable participating-jurisdiction requirements. An
+ISO-only audit is not MDSAP; an FDA inspection does not follow the MDSAP audit plan.
+
+### 4. EU MDR/IVDR conformity assessment
+
+EU conformity assessment includes product, technical-documentation, postmarket,
+vigilance, economic-operator, and notified-body requirements beyond generic QMS
+documentation. Verify a notified body's current legislation/task/designation-code
+scope in NANDO. ISO certification/accreditation alone is not notified-body
+designation or EU product conformity.
+
+### 5. Product- and jurisdiction-specific controls
+
+Classification, intended purpose, claims, software/cybersecurity, clinical or
+performance evidence, biocompatibility, electrical safety, sterilization, UDI,
+registration, reporting, and other controls require separate authorized analysis.
+
+## Core workflow
+
+### Step 1: Define purpose and authorized owners
+
+State whether the work supports internal QMS development, ISO certification
+preparation, FDA inspection preparation, MDSAP, EU conformity assessment, or a
+specific combination. Name the management representative, RA/QA owner, legal/
+applicability owner, process owners, approvers, and escalation route.
+
+Run:
+
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate_scope_intake.py \
+ assets/templates/scope-intake-template.json
+```
+
+The distributed template intentionally fails closed. Copy it outside the skill and
+complete it with controlled organizational evidence.
+
+### Step 2: Freeze source/version evidence
+
+For every standard, regulation, guidance, audit model, and product source, record:
+
+- publisher, official title, edition/version/date, and authorized location;
+- access and currency-review dates;
+- scope/applicability owner;
+- impact assessment, status, evidence, and approval.
+
+Do not use search snippets as controlled requirements. Do not silently update an
+incorporated edition when a publisher releases a new edition.
+
+### Step 3: Inventory controlled documents and records
+
+Do not count named procedures or scan keywords. Build an explicit register linking
+documents, records, source versions, owners, approvals, effective dates, retention
+bases, training, and change records.
+
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/audit_document_records.py \
+ assets/templates/document-register-template.json
+```
+
+Read `references/mandatory-documents.md` for the evidence architecture.
+
+### Step 4: Review process implementation
+
+Assess controlled procedures **and sampled records** for:
+
+- scope, governance, roles, and management authority;
+- document/record/external-source control;
+- risk management;
+- design/development, transfer, and changes;
+- suppliers, purchasing, and outsourced processes;
+- production/service, infrastructure, environment, acceptance, and release;
+- process, equipment, test-method, and software validation;
+- identification, traceability, preservation, installation, and service;
+- feedback, complaints, postmarket surveillance, and vigilance;
+- nonconformity, CAPA, and effectiveness;
+- internal audit and management review;
+- competence/training; and
+- integrated change control.
+
+Each item needs owner, status, evidence IDs, source/version, approval, and open-gap
+links. Read `references/iso-13485-requirements.md`.
+
+### Step 5: Build traceability and focused checks
+
+Risk/design/production/postmarket:
+
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/check_traceability.py \
+ assets/templates/traceability-matrix-template.json
+```
+
+CAPA/effectiveness:
+
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/check_capa.py \
+ assets/templates/capa-record-template.json
+```
+
+Supplier controls:
+
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/check_supplier_controls.py \
+ assets/templates/supplier-controls-template.json
+```
+
+Pending or ineffective CAPA effectiveness evidence blocks closure. Critical supplier
+controls stay blocked until risk-based controls and approvals are evidenced.
+
+### Step 6: Address current QMSR evidence separately
+
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/check_qmsr_transition.py \
+ assets/templates/qmsr-transition-template.json
+```
+
+Review current Part 820/FDA source basis, supplemental provisions, obsolete
+QSR/QSIT references, pre-effective-date records, inspection-accessible management/
+quality/supplier-audit records, current inspection-process training, complaint and
+servicing records, labeling/packaging controls, supplier/software/change evidence,
+and prohibited certificate-equivalence claims.
+
+Do not build an old-820-to-ISO clause map as the current control framework.
+
+### Step 7: Assemble a bounded readiness manifest
-## Getting Started
+Copy the evidence template outside the skill. Use relative paths to local `.json`,
+`.md`, or `.markdown` evidence only.
-**First-time users should:**
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/validate_evidence_manifest.py \
+ /path/to/evidence-manifest.json \
+ --base-dir /path/to/controlled-export \
+ --verify-files \
+ --output /path/to/manifest-report.json
+```
-1. Read `references/iso-13485-requirements.md` to understand the standard
-2. If you have existing documentation, run gap analysis script
-3. Create Quality Manual using template and guide
-4. Develop procedures in priority order
-5. Use comprehensive checklist for final validation
+Then generate a domain-level gap view:
-**For specific tasks:**
-- Creating Quality Manual → See Section 4 and use quality-manual-guide.md
-- Creating CAPA procedure → See Section 4 and use CAPA template
-- Gap analysis → See Section 1 and 5
-- Understanding requirements → See Section 2
+```bash
+PYTHONDONTWRITEBYTECODE=1 python3 scripts/gap_analyzer.py \
+ /path/to/evidence-manifest.json \
+ --base-dir /path/to/controlled-export \
+ --verify-files \
+ --output /path/to/gap-report.json
+```
+
+The analyzer uses explicit manifest labels. It does not infer evidence from filenames,
+keywords, or proprietary standard text and does not calculate a compliance score.
+
+### Step 8: Human review and controlled handoff
+
+Present:
+
+- declared scope, assurance lanes, and unresolved applicability decisions;
+- exact source/version baseline;
+- evidence sampled and limitations;
+- structural findings grouped by process and risk;
+- actions/change/CAPA owners and dates;
+- approval state; and
+- the authorized party responsible for the next decision.
+
+Never title the result “certificate,” “compliance report,” “audit pass,” or “ready for
+inspection.” A suitable title is **Draft QMS evidence review for authorized human
+assessment**.
+
+## CLI behavior and safety
+
+All bundled CLIs:
+
+- use the Python standard library only;
+- perform no network requests;
+- accept bounded local JSON; optional evidence verification accepts only bounded
+ local JSON/Markdown;
+- reject symbolic-link inputs, duplicate JSON keys, non-finite numbers, excessive
+ size/nesting/items, and unsafe evidence paths;
+- use no dynamic evaluation, executable deserialization, pickle, or shell execution;
+- refuse to overwrite reports unless `--force` is explicit; and
+- produce deterministic sorted JSON.
-**Need help?** Start by describing your situation: what stage you're at, what you have, and what you need to create.
+Treat the manifest itself as a controlled organizational record. An optional SHA-256
+comparison detects a local file mismatch only; it does not establish provenance,
+authenticity, adequacy, or trust in a user-supplied manifest. Values in JSON
+`local_path` and `evidence.location` fields refer to the user's controlled export,
+not to bundled skill resources; unresolved placeholders must never be opened.
+
+Exit codes:
+
+- `0`: no structural finding for the supplied fields; **not a compliance result**;
+- `1`: structural/evidence gaps found;
+- `2`: invalid or unsafe input/output.
+Run `python3 scripts/<name>.py --help` for each interface.
+
+## Templates
+
+- `assets/templates/quality-manual-template.md`
+- `assets/templates/procedures/CAPA-procedure-template.md`
+- `assets/templates/procedures/document-control-procedure-template.md`
+- `assets/templates/scope-intake-template.json`
+- `assets/templates/document-register-template.json`
+- `assets/templates/capa-record-template.json`
+- `assets/templates/traceability-matrix-template.json`
+- `assets/templates/qmsr-transition-template.json`
+- `assets/templates/evidence-manifest-template.json`
+- `assets/templates/supplier-controls-template.json`
+
+Every template is deliberately `draft`/`pending`, uses placeholders, and includes
+owner/status/evidence/approval fields. Copy and control it; never edit a distributed
+template into a purported approved record.
+
+## References
+
+- `references/iso-13485-requirements.md` — process/evidence framework and assurance boundaries
+- `references/mandatory-documents.md` — documentation and record architecture
+- `references/gap-analysis-checklist.md` — fail-closed evidence review questions
+- `references/quality-manual-guide.md` — controlled manual development
+- `references/source-ledger.md` — dated authoritative official-source baseline
diff --git a/skills/iso-13485-certification/assets/templates/capa-record-template.json b/skills/iso-13485-certification/assets/templates/capa-record-template.json
new file mode 100644
index 00000000..2f44f608
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/capa-record-template.json
@@ -0,0 +1,99 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. A script cannot approve, close, or determine the effectiveness or regulatory adequacy of a CAPA.",
+ "metadata": {
+ "register_id": "<controlled CAPA register ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<CAPA system owner>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ },
+ "capas": [
+ {
+ "id": "<CAPA ID>",
+ "owner": "<CAPA owner>",
+ "status": "open",
+ "source_event": "<complaint/audit/nonconformity/supplier/risk signal ID>",
+ "problem_statement": "<factual problem statement>",
+ "scope": "<known and potential systemic extent>",
+ "correction_or_containment": "<immediate action and evidence>",
+ "evidence": [],
+ "source_refs": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "risk_assessment": {
+ "patient_and_user_impact": "<assessment>",
+ "product_and_process_impact": "<assessment>",
+ "reportability_review": "<authorized reportability/vigilance decision reference>",
+ "decision": "escalate",
+ "decision_rationale": "<rationale>",
+ "owner": "<risk/RAQA owner>",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ }
+ },
+ "investigation": {
+ "method": "<selected method and rationale>",
+ "root_cause_or_justified_conclusion": "<supported conclusion>",
+ "systemic_extent_review": "<similar products/processes/sites review>",
+ "owner": "<investigation owner>",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ }
+ },
+ "actions": [
+ {
+ "id": "<action ID>",
+ "description": "<action tied to supported cause/risk>",
+ "owner": "<action owner>",
+ "due_date": "<YYYY-MM-DD>",
+ "implemented_date": "",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ }
+ }
+ ],
+ "change_control_refs": [
+ "<change record ID>"
+ ],
+ "effectiveness": {
+ "plan": "<planned check>",
+ "objective_acceptance_criteria": "<measurable criteria>",
+ "baseline": "<baseline/comparator>",
+ "sample_or_observation_window": "<risk-based sample/window>",
+ "due_date": "<YYYY-MM-DD>",
+ "owner": "<effectiveness owner>",
+ "independent_reviewer": "<independent reviewer>",
+ "result": "pending",
+ "conclusion": "",
+ "review_date": "",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ }
+ },
+ "closure_date": "",
+ "closure_summary": "",
+ "cancellation_rationale": ""
+ }
+ ]
+}
diff --git a/skills/iso-13485-certification/assets/templates/document-register-template.json b/skills/iso-13485-certification/assets/templates/document-register-template.json
new file mode 100644
index 00000000..f08bc21b
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/document-register-template.json
@@ -0,0 +1,75 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. Passing a structural check does not establish document adequacy, regulatory compliance, or certification.",
+ "metadata": {
+ "register_id": "<controlled register ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<document control owner>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ },
+ "documents": [
+ {
+ "id": "<document ID>",
+ "title": "<controlled title>",
+ "document_type": "<manual/procedure/work instruction/form/specification>",
+ "revision": "<revision>",
+ "status": "draft",
+ "effective_date": "",
+ "supersedes": "",
+ "change_summary": "<reason and scope of change>",
+ "training_impact": "<training decision and evidence reference>",
+ "owner": "<document owner>",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ],
+ "records": [
+ {
+ "id": "<record-series ID>",
+ "record_type": "<record type>",
+ "status": "active",
+ "retention_period": "<approved period>",
+ "retention_basis": "<official/contractual/business source and rationale>",
+ "storage_and_integrity_controls": "<access, integrity, backup, audit-trail controls>",
+ "retrieval_method": "<retrieval method>",
+ "disposition_method": "<authorized disposition method>",
+ "owner": "<record owner>",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ],
+ "external_sources": [
+ {
+ "id": "<source ID>",
+ "title": "<official source title>",
+ "publisher": "<official publisher>",
+ "version_or_date": "<edition/version/date>",
+ "status": "review-due",
+ "last_currency_review": "<YYYY-MM-DD>",
+ "owner": "<source owner>",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ]
+}
diff --git a/skills/iso-13485-certification/assets/templates/evidence-manifest-template.json b/skills/iso-13485-certification/assets/templates/evidence-manifest-template.json
new file mode 100644
index 00000000..b0d1fe21
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/evidence-manifest-template.json
@@ -0,0 +1,65 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. Evidence presence is not evidence adequacy and cannot establish readiness, conformity, compliance, or certification.",
+ "metadata": {
+ "manifest_id": "<controlled manifest ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<manifest owner>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "audit_context": {
+ "purpose": "internal-audit",
+ "scope": "<sites, products, processes, and dates sampled>",
+ "sampling_plan": "<risk-based sampling plan and rationale>",
+ "limitations": "<known limitations and exclusions; not a legal applicability decision>",
+ "owner": "<audit/readiness owner>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "expected_domains": [
+ "scope-and-roles",
+ "document-and-record-control",
+ "risk-management",
+ "design-and-development",
+ "supplier-controls",
+ "production-and-service",
+ "process-and-software-validation",
+ "identification-and-traceability",
+ "complaints-and-feedback",
+ "postmarket-and-vigilance",
+ "nonconformity-and-capa",
+ "internal-audit",
+ "management-review",
+ "training-and-competence",
+ "change-control"
+ ],
+ "entries": [
+ {
+ "id": "<evidence entry ID>",
+ "domain": "document-and-record-control",
+ "title": "<controlled evidence title>",
+ "owner": "<evidence owner>",
+ "status": "draft",
+ "revision_or_date": "<revision/date>",
+ "classification": "internal",
+ "local_path": "",
+ "sha256": "",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ }
+ ],
+ "open_gaps": [
+ {
+ "id": "<gap ID>",
+ "description": "<unresolved evidence or process gap>",
+ "owner": "<gap owner>",
+ "status": "open",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""}
+ }
+ ]
+}
diff --git a/skills/iso-13485-certification/assets/templates/procedures/CAPA-procedure-template.md b/skills/iso-13485-certification/assets/templates/procedures/CAPA-procedure-template.md
index af44a775..c4111357 100644
--- a/skills/iso-13485-certification/assets/templates/procedures/CAPA-procedure-template.md
+++ b/skills/iso-13485-certification/assets/templates/procedures/CAPA-procedure-template.md
@@ -1,453 +1,148 @@
-# Corrective and Preventive Action (CAPA) Procedure Template
-
-**Document Number:** SOP-8.5-001
-**Title:** Corrective and Preventive Action (CAPA)
-**Revision:** 00
-**Effective Date:** [DATE]
-**Page:** 1 of [X]
-
----
-
-## DOCUMENT CONTROL
-
-### Approval Signatures
-
-| Role | Name | Signature | Date |
-|------|------|-----------|------|
-| Author | [NAME] | | [DATE] |
-| Reviewer | [NAME] | | [DATE] |
-| Approver (Quality Manager) | [NAME] | | [DATE] |
-
-### Revision History
-
-| Revision | Date | Description of Changes | Approved By |
-|----------|------|------------------------|-------------|
-| 00 | [DATE] | Initial release | [NAME] |
-| | | | |
-
----
-
-## TABLE OF CONTENTS
-
-1. [Purpose](#1-purpose)
-2. [Scope](#2-scope)
-3. [Definitions](#3-definitions)
-4. [Responsibilities](#4-responsibilities)
-5. [Procedure](#5-procedure)
- - 5.1 [Corrective Action Process](#51-corrective-action-process)
- - 5.2 [Preventive Action Process](#52-preventive-action-process)
- - 5.3 [CAPA Prioritization](#53-capa-prioritization)
- - 5.4 [Investigation and Root Cause Analysis](#54-investigation-and-root-cause-analysis)
- - 5.5 [Action Planning and Implementation](#55-action-planning-and-implementation)
- - 5.6 [Effectiveness Review](#56-effectiveness-review)
- - 5.7 [CAPA Closure](#57-capa-closure)
-6. [Records](#6-records)
-7. [References](#7-references)
-8. [Attachments](#8-attachments)
-
----
-
-## 1. PURPOSE
-
-This procedure establishes requirements for:
-
-- Corrective action to eliminate causes of nonconformities and prevent recurrence
-- Preventive action to eliminate causes of potential nonconformities and prevent occurrence
-- Systematic investigation and analysis of problems and risks
-- Implementation and verification of effective actions
-- Continuous improvement of the Quality Management System
-
-This procedure ensures compliance with ISO 13485:2016 Clauses 8.5.2 (Corrective Action) and 8.5.3 (Preventive Action).
-
----
-
-## 2. SCOPE
-
-This procedure applies to:
-
-- All nonconformities identified through any means (internal audits, customer complaints, process monitoring, product inspection, etc.)
-- Potential nonconformities identified through risk analysis, trend analysis, and proactive reviews
-- All products, processes, and QMS elements
-- All departments and personnel within [COMPANY NAME]
-
----
-
-## 3. DEFINITIONS
-
-| Term | Definition |
-|------|------------|
-| **CAPA** | Corrective and Preventive Action |
-| **Corrective Action** | Action to eliminate the cause of a detected nonconformity or other undesirable situation to prevent recurrence |
-| **Preventive Action** | Action to eliminate the cause of a potential nonconformity or other potential undesirable situation to prevent occurrence |
-| **Nonconformity** | Non-fulfillment of a requirement |
-| **Root Cause** | The fundamental reason for the occurrence of a problem |
-| **Root Cause Analysis (RCA)** | Systematic process to identify the root cause of a problem |
-| **Effectiveness Check** | Verification that implemented actions have achieved the intended result |
-| **5 Whys** | Iterative questioning technique used to explore cause-and-effect relationships |
-| **Fishbone Diagram** | Visual tool for categorizing potential causes of a problem (also called Ishikawa diagram) |
-
----
-
-## 4. RESPONSIBILITIES
-
-### 4.1 Quality Manager
-- Overall responsibility for CAPA system
-- Reviews all CAPAs for adequacy
-- Approves CAPA closures
-- Reports CAPA metrics in management review
-- Ensures resources are available for CAPA activities
-
-### 4.2 CAPA Coordinator
-- Manages CAPA database/system
-- Assigns CAPA numbers
-- Tracks CAPA status and due dates
-- Sends reminders for overdue actions
-- Generates CAPA metrics and reports
-- Maintains CAPA records
-
-### 4.3 CAPA Owner (Assigned Personnel)
-- Leads investigation and root cause analysis
-- Develops action plan
-- Implements corrective/preventive actions
-- Coordinates with affected departments
-- Documents all CAPA activities
-- Performs effectiveness checks
-- Requests CAPA closure when complete
-
-### 4.4 Department Managers
-- Provide resources and support for CAPA activities
-- Participate in investigations within their areas
-- Implement actions within their departments
-- Verify implementation of actions
-
-### 4.5 All Personnel
-- Report nonconformities and improvement opportunities
-- Participate in CAPA investigations as requested
-- Implement actions assigned to them
-- Support CAPA effectiveness
-
----
-
-## 5. PROCEDURE
-
-### 5.1 Corrective Action Process
-
-Corrective actions are initiated in response to identified nonconformities from sources including:
-
-**Sources of Nonconformities:**
-- Customer complaints (per SOP-[NUMBER])
-- Internal nonconforming product (per SOP-[NUMBER])
-- Internal audit findings (per SOP-[NUMBER])
-- Process monitoring out-of-specification results
-- Product inspection failures
-- Supplier nonconformances
-- Regulatory inspections or observations
-- Management review action items
-- Risk management outputs
-- Returned or rejected product
-
-**5.1.1 CAPA Initiation**
-
-1. When a nonconformity is identified, the individual discovering it:
- - Completes a CAPA Request Form (Attachment A) or enters information into CAPA system
- - Describes the nonconformity clearly and completely
- - Attaches supporting documentation (NCRs, complaints, audit findings, etc.)
- - Submits to Quality department
-
-2. CAPA Coordinator:
- - Receives CAPA request
- - Assigns unique CAPA number: CAPA-[YEAR]-[###]
- - Logs CAPA in tracking system
- - Routes to Quality Manager for review
-
-3. Quality Manager:
- - Reviews CAPA request for completeness and clarity
- - Determines if corrective action is warranted
- - Assigns priority (see Section 5.3)
- - Assigns CAPA Owner
- - Sets due date based on priority
- - Approves initiation of CAPA investigation
-
-### 5.2 Preventive Action Process
-
-Preventive actions are initiated proactively to address potential problems before they occur.
-
-**Sources of Preventive Action:**
-- Trend analysis of complaints, NCRs, or other data
-- Risk management activities (per SOP-[NUMBER])
-- Process capability studies
-- Near-miss events
-- Lessons learned from other organizations or devices
-- Changes in regulations or standards
-- Proactive process improvements
-- Management review outputs
-- Employee suggestions
-
-**5.2.1 Preventive Action Initiation**
-
-Process is similar to corrective action (Section 5.1.1), but:
-- Describes potential nonconformity and its possible consequences
-- Includes data or rationale supporting the need for preventive action
-- May have different prioritization based on risk of occurrence
-
-### 5.3 CAPA Prioritization
-
-All CAPAs are prioritized based on:
-- Severity of impact (safety, regulatory, customer impact)
-- Frequency or likelihood of occurrence
-- Detectability before reaching customer
-
-**Priority Levels:**
-
-| Priority | Criteria | Due Date for Completion |
-|----------|----------|-------------------------|
-| **Critical** | Safety issue, regulatory requirement, major customer impact, Class I recall potential | [X] days |
-| **High** | Significant quality impact, repeat issue, moderate customer impact, regulatory reporting | [X] days |
-| **Medium** | Moderate impact, isolated occurrence, minor customer impact | [X] days |
-| **Low** | Minor impact, isolated occurrence, no customer impact, improvement opportunity | [X] days |
-
-Priority is determined by Quality Manager in consultation with CAPA Owner and affected department managers.
-
-### 5.4 Investigation and Root Cause Analysis
-
-**5.4.1 Investigation Planning**
-
-CAPA Owner develops investigation plan including:
-- Scope of investigation
-- Team members needed (if applicable)
-- Data to be collected
-- Analysis methods to be used
-- Timeline
-
-**5.4.2 Data Collection**
-
-Collect relevant data:
-- Review related records (batch records, inspection records, training records, etc.)
-- Interview personnel involved
-- Review similar past occurrences
-- Examine physical evidence (product samples, equipment, etc.)
-- Review applicable procedures and work instructions
-- Analyze trend data if available
-
-**5.4.3 Root Cause Analysis**
-
-Use appropriate RCA tools based on complexity:
-
-**For Simple Issues:**
-- 5 Whys technique
-- Cause and effect analysis
-
-**For Complex Issues:**
-- Fishbone (Ishikawa) diagram
-- Fault tree analysis
-- Failure mode and effects analysis (FMEA)
-- Statistical analysis
-
-**RCA Requirements:**
-- Dig beyond superficial causes to find root cause
-- Distinguish between symptoms and causes
-- Consider multiple contributing factors
-- Ask "why" repeatedly until fundamental cause identified
-- Consider human factors, procedural inadequacies, system weaknesses
-- Document analysis process and findings
-
-**5.4.4 Root Cause Documentation**
-
-Document in CAPA record:
-- Summary of investigation findings
-- Root cause(s) identified
-- Supporting data and analysis
-- RCA tool(s) used
-- Team members involved
-- Date investigation completed
-
-Quality Manager reviews and approves root cause determination.
-
-### 5.5 Action Planning and Implementation
-
-**5.5.1 Action Planning**
-
-Based on root cause, CAPA Owner develops action plan:
-
-**Actions must be:**
-- **Effective:** Address root cause, not just symptoms
-- **Achievable:** Realistic with available resources
-- **Measurable:** Include objective success criteria
-- **Timely:** Include target completion dates
-- **Risk-appropriate:** Commensurate with severity and likelihood
-
-**Action Plan includes:**
-- Specific actions to be taken
-- Responsible person for each action
-- Target completion date for each action
-- Resources required
-- Expected outcome/success criteria
-- How effectiveness will be measured
-
-**5.5.2 Types of Actions**
-
-Actions may include:
-- Procedure revisions or clarifications
-- Training or retraining
-- Equipment repair, replacement, or modification
-- Process changes or improvements
-- Design changes (when applicable)
-- Supplier corrective action requests
-- Increased inspection or monitoring
-- Software updates or validation
-- Physical facility changes
-- Organizational changes
-
-**5.5.3 Action Approval**
-
-- CAPA Owner submits action plan to Quality Manager
-- Quality Manager reviews for adequacy and appropriateness
-- Department Managers review actions affecting their areas
-- Quality Manager approves action plan
-- Actions assigned to responsible parties with due dates
-
-**5.5.4 Implementation**
-
-- Responsible parties implement assigned actions
-- Implementation is documented (procedure revisions, training records, etc.)
-- CAPA Owner tracks implementation progress
-- CAPA Coordinator sends reminders for overdue actions
-- Interim updates provided for long-duration CAPAs
-
-**5.5.5 Documentation of Implementation**
-
-For each action, document:
-- Date implemented
-- Evidence of implementation (updated procedures, training records, work orders, etc.)
-- Any deviations from planned actions and justification
-- Responsible person confirmation
-
-### 5.6 Effectiveness Review
-
-**5.6.1 Timing of Effectiveness Check**
-
-Effectiveness is verified after:
-- Sufficient time has passed to observe results
-- Minimum: [X days/weeks] after implementation
-- Extended period for process or trend verification: [X months]
-- Timing based on priority and nature of issue
-
-**5.6.2 Effectiveness Verification Methods**
-
-Methods appropriate to the CAPA may include:
-- Review of process or product data for improved performance
-- Inspection or test results showing improvement
-- Absence of recurrence over defined period
-- Customer feedback or complaint trends
-- Internal audit verification
-- Process capability analysis
-- Statistical analysis of relevant metrics
-- Re-audit of corrective action area
-- Follow-up inspection or testing
-
-**5.6.3 Effectiveness Determination**
-
-CAPA Owner:
-- Collects effectiveness data using planned method
-- Analyzes data to determine if actions achieved intended result
-- Documents findings in CAPA record
-- Recommends effectiveness status:
- - **Effective:** Actions achieved intended result, no recurrence
- - **Not Effective:** Actions did not achieve intended result, recurrence observed
- - **Additional Data Needed:** Insufficient time or data to determine effectiveness
-
-**5.6.4 Ineffective Actions**
-
-If actions determined not effective:
-- CAPA remains open
-- Re-investigation performed
-- Alternative actions developed
-- Cycle repeats until effectiveness achieved
-
-### 5.7 CAPA Closure
-
-**5.7.1 Closure Criteria**
-
-CAPA may be closed when:
-- All planned actions implemented and verified
-- Effectiveness check completed and actions determined effective
-- All documentation complete
-- No recurrence of issue during effectiveness period
-
-**5.7.2 Closure Process**
-
-1. CAPA Owner:
- - Verifies all closure criteria met
- - Completes final CAPA summary
- - Submits closure request to Quality Manager
-
-2. Quality Manager:
- - Reviews entire CAPA record for completeness
- - Verifies effectiveness evidence
- - Approves closure or requests additional information
- - Signs and dates CAPA closure
-
-3. CAPA Coordinator:
- - Updates CAPA status to "Closed"
- - Files CAPA record per retention requirements
- - Updates metrics and reports
-
-**5.7.3 CAPA Extension**
-
-If additional time needed:
-- CAPA Owner submits extension request with justification
-- Quality Manager reviews and approves/denies extension
-- New due date established
-- Extension documented in CAPA record
-
----
-
-## 6. RECORDS
-
-Records generated and maintained per this procedure:
-
-| Record | Retention Period | Location | Responsible Party |
-|--------|------------------|----------|-------------------|
-| CAPA Request Forms | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| CAPA Investigation Records | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| Root Cause Analysis Documentation | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| Action Plans | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| Implementation Evidence | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| Effectiveness Verification Records | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| CAPA Closure Approvals | [X years or device lifetime] | [LOCATION/SYSTEM] | CAPA Coordinator |
-| CAPA Metrics and Trend Reports | [X years] | [LOCATION] | Quality Manager |
-
----
-
-## 7. REFERENCES
-
-- ISO 13485:2016, Clause 8.5.2 - Corrective Action
-- ISO 13485:2016, Clause 8.5.3 - Preventive Action
-- Quality Manual, Section 8.5
-- SOP-[NUMBER] - Control of Nonconforming Product
-- SOP-[NUMBER] - Complaint Handling
-- SOP-[NUMBER] - Internal Audit
-- SOP-[NUMBER] - Risk Management
-- SOP-[NUMBER] - Analysis of Data
-
----
-
-## 8. ATTACHMENTS
-
-**Attachment A:** CAPA Request Form
-**Attachment B:** Root Cause Analysis Worksheet
-**Attachment C:** CAPA Action Plan Template
-**Attachment D:** Effectiveness Verification Checklist
-**Attachment E:** 5 Whys Worksheet
-**Attachment F:** Fishbone Diagram Template
-**Attachment G:** CAPA Flowchart
-
----
-
-**END OF PROCEDURE**
-
----
-
-**Document Number:** SOP-8.5-001
-**Revision:** 00
-**Page:** [X] of [X]
+# CAPA Procedure Working Template
+
+> **STATUS: DRAFT EXAMPLE — NOT APPROVED — NOT EVIDENCE OF CONFORMITY**
+>
+> Adapt this structure to approved processes, applicable requirements, product risk,
+> and authorized roles. A completed template or passing script cannot establish
+> compliance, close a CAPA, or replace RA/QA, management, legal, regulatory, auditor,
+> or certification-body judgment.
+
+## Controlled-document metadata
+
+| Field | Entry |
+|---|---|
+| Document ID/revision | `<ID>` / `<revision>` |
+| Owner | `<accountable role>` |
+| Status | `draft` / `in-review` / `approved` |
+| Effective date | `<YYYY-MM-DD after approval>` |
+| Evidence repository | `<controlled location>` |
+| Supersedes/change record | `<IDs>` |
+
+| Approval role | Named approver | Status | Date | Approval evidence |
+|---|---|---|---|---|
+| Process owner | `<name/role>` | `pending` | `<date>` | `<ID>` |
+| RA/QA | `<name/role>` | `pending` | `<date>` | `<ID>` |
+| Authorized management | `<name/role>` | `pending` | `<date>` | `<ID>` |
+
+## 1. Purpose and scope
+
+- Controlled purpose: `<organization-specific statement>`
+- Products, sites, processes, and records covered: `<scope>`
+- Interfaces: complaints, audit, suppliers, nonconformity, risk, vigilance,
+ design/production change, validation, training, and management review.
+- Exclusions or interfaces outside this procedure: `<approved rationale/evidence>`
+
+## 2. Roles and authority
+
+| Role | Responsibility and decision authority | Escalation | Competence evidence | Approval |
+|---|---|---|---|---|
+| CAPA system owner | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| CAPA owner | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| Independent effectiveness reviewer | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| RA/QA reviewer | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| Closure approver | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+
+## 3. CAPA intake and decision
+
+Define controlled inputs and the approved criteria for opening, escalating, linking,
+combining, or declining a CAPA. Do not use an arbitrary priority label as a substitute
+for product/process risk and reportability review.
+
+| Input | Owner | Decision method | Evidence | Status | Approval |
+|---|---|---|---|---|---|
+| Complaint/feedback | `<role>` | `<method>` | `<ID>` | `draft` | `<ID>` |
+| Audit/nonconformity | `<role>` | `<method>` | `<ID>` | `draft` | `<ID>` |
+| Supplier issue | `<role>` | `<method>` | `<ID>` | `draft` | `<ID>` |
+| Trend/risk/postmarket signal | `<role>` | `<method>` | `<ID>` | `draft` | `<ID>` |
+
+Each decision record must include:
+
+- unique CAPA ID and source-event links;
+- factual problem statement and known scope;
+- correction/containment and evidence;
+- product, patient/user, process, and regulatory/reportability impact review;
+- decision owner, status, rationale, evidence, and approval.
+
+## 4. Investigation and systemic extent
+
+The record must define the method before drawing a conclusion and preserve the
+evidence reviewed.
+
+| Field | Required entry |
+|---|---|
+| Investigation owner/status | `<role>` / `draft` |
+| Scope and plan | `<entry>` |
+| Data and evidence IDs | `<IDs>` |
+| Analysis method and rationale | `<entry>` |
+| Root cause or justified conclusion | `<entry>` |
+| Similar/systemic issue review | `<entry>` |
+| Risk-file/design/supplier/process impacts | `<entry>` |
+| Reviewer and approval evidence | `<role/ID>` |
+
+Do not force a preferred root-cause method. Select and approve a method appropriate
+to the evidence, complexity, and risk.
+
+## 5. Action planning and change control
+
+| Action ID | Description | Owner | Due date | Change/validation/training links | Implementation evidence | Status | Approval |
+|---|---|---|---|---|---|---|---|
+| `<ID>` | `<entry>` | `<role>` | `<date>` | `<IDs>` | `<IDs>` | `planned` | `<ID>` |
+
+Actions must address the supported cause or risk, include objective acceptance
+criteria, and route affected documents, software, validation, suppliers, products,
+training, risk files, and postmarket controls through approved change control.
+
+## 6. Effectiveness plan and review
+
+Define the effectiveness plan before closure.
+
+| Field | Required entry |
+|---|---|
+| Effectiveness owner | `<role>` |
+| Independent reviewer | `<role>` |
+| Objective acceptance criteria | `<measurable criteria>` |
+| Baseline/comparator | `<entry>` |
+| Data source and evidence IDs | `<IDs>` |
+| Sample or observation window | `<risk-based rationale>` |
+| Review date | `<YYYY-MM-DD>` |
+| Result | `pending` / `effective` / `ineffective` |
+| Conclusion and evidence | `<entry/IDs>` |
+| Approval | `<approver/date/record ID>` |
+
+**Fail-closed gate:** `pending`, insufficient data, or `ineffective` cannot support
+closure. Re-open the investigation/action cycle or document authorized escalation.
+
+## 7. Closure, cancellation, and extension
+
+Closure requires:
+
+- all actions implemented with evidence;
+- approved effectiveness result of `effective`;
+- linked risk, design, production, supplier, postmarket, document, validation, and
+ training changes completed or explicitly dispositioned;
+- complete source/version references;
+- closure summary, date, owner, status, evidence, and authorized approval.
+
+Cancellation or due-date changes require a documented rationale, risk/reportability
+impact review, owner, status, evidence, and approval. Neither changes the need for
+immediate safety or regulatory action when applicable.
+
+## 8. Records, metrics, and management visibility
+
+| Record/measure | Owner | Retention basis | Location | Review method | Evidence | Approval |
+|---|---|---|---|---|---|---|
+| CAPA record set | `<role>` | `<approved basis>` | `<location>` | `<method>` | `<ID>` | `<ID>` |
+| Aging/overdue status | `<role>` | `<basis>` | `<location>` | `<method>` | `<ID>` | `<ID>` |
+| Recurrence/effectiveness trend | `<role>` | `<basis>` | `<location>` | `<method>` | `<ID>` | `<ID>` |
+| Management-review input | `<role>` | `<basis>` | `<location>` | `<method>` | `<ID>` | `<ID>` |
+
+## Release checklist
+
+- [ ] Placeholders are resolved.
+- [ ] Interfaces to risk, complaints/vigilance, suppliers, design, production,
+ validation, software, training, and change control are explicit.
+- [ ] No fixed timeline is used without an approved risk/process basis.
+- [ ] Effectiveness criteria are objective and approved before closure.
+- [ ] Records carry owner, status, evidence, source/version, and approval fields.
+- [ ] Authorized human approvers released the procedure.
+- [ ] The procedure makes no compliance or certification claim.
diff --git a/skills/iso-13485-certification/assets/templates/procedures/document-control-procedure-template.md b/skills/iso-13485-certification/assets/templates/procedures/document-control-procedure-template.md
index 67940244..eeb19ded 100644
--- a/skills/iso-13485-certification/assets/templates/procedures/document-control-procedure-template.md
+++ b/skills/iso-13485-certification/assets/templates/procedures/document-control-procedure-template.md
@@ -1,567 +1,132 @@
-# Document Control Procedure Template
-
-**Document Number:** SOP-4.2.4-001
-**Title:** Control of Documents
-**Revision:** 00
-**Effective Date:** [DATE]
-**Page:** 1 of [X]
-
----
-
-## DOCUMENT CONTROL
-
-### Approval Signatures
-
-| Role | Name | Signature | Date |
-|------|------|-----------|------|
-| Author | [NAME] | | [DATE] |
-| Reviewer | [NAME] | | [DATE] |
-| Approver (Quality Manager) | [NAME] | | [DATE] |
-
-### Revision History
-
-| Revision | Date | Description of Changes | Approved By |
-|----------|------|------------------------|-------------|
-| 00 | [DATE] | Initial release | [NAME] |
-| | | | |
-
----
-
-## TABLE OF CONTENTS
-
-1. [Purpose](#1-purpose)
-2. [Scope](#2-scope)
-3. [Definitions](#3-definitions)
-4. [Responsibilities](#4-responsibilities)
-5. [Procedure](#5-procedure)
- - 5.1 [Document Types and Hierarchy](#51-document-types-and-hierarchy)
- - 5.2 [Document Numbering System](#52-document-numbering-system)
- - 5.3 [Document Creation](#53-document-creation)
- - 5.4 [Document Review and Approval](#54-document-review-and-approval)
- - 5.5 [Document Distribution and Access](#55-document-distribution-and-access)
- - 5.6 [Document Changes](#56-document-changes)
- - 5.7 [Control of Obsolete Documents](#57-control-of-obsolete-documents)
- - 5.8 [Control of External Documents](#58-control-of-external-documents)
-6. [Records](#6-records)
-7. [References](#7-references)
-8. [Attachments](#8-attachments)
-
----
-
-## 1. PURPOSE
-
-This procedure establishes requirements for the control of documents within the Quality Management System to ensure:
-
-- Documents are approved before use
-- Documents are reviewed, updated, and re-approved as necessary
-- Changes and current revision status are identified
-- Relevant versions of documents are available at points of use
-- Documents remain legible and readily identifiable
-- External documents are identified and controlled
-- Obsolete documents are prevented from unintended use
-- Obsolete documents are appropriately identified if retained
-
-This procedure ensures compliance with ISO 13485:2016 Clause 4.2.4.
-
----
-
-## 2. SCOPE
-
-This procedure applies to all controlled documents within the Quality Management System, including but not limited to:
-
-- Quality Manual
-- Standard Operating Procedures (SOPs)
-- Work Instructions (WIs)
-- Forms and templates
-- Medical Device Files
-- Design and Development documents
-- Risk management documents
-- Validation and verification protocols and reports
-- Specifications (product, process, test methods, materials)
-- Drawings and schematics
-- Labels and instructions for use
-- External documents (standards, regulations, customer specifications)
-
-This procedure does NOT apply to:
-- Records (controlled per SOP-[NUMBER] Control of Records)
-- Transient documents (emails, meeting notes not part of QMS)
-- Marketing and sales materials (unless affecting product quality or regulatory compliance)
-
----
-
-## 3. DEFINITIONS
-
-| Term | Definition |
-|------|------------|
-| **Controlled Document** | A document that is subject to review, approval, distribution control, and change management per this procedure |
-| **Master Document** | The official controlled copy maintained by Document Control, from which all distributed copies originate |
-| **Document Owner** | The person or department responsible for the content, accuracy, and maintenance of a document |
-| **Document Control Coordinator** | Person responsible for managing the document control system |
-| **Revision** | A change to a controlled document that has been approved and issued |
-| **Obsolete Document** | A document that has been superseded by a newer revision or is no longer applicable |
-| **External Document** | A document originating from outside the organization (standards, regulations, customer specifications, etc.) |
-| **SUPERSEDED** | Watermark applied to obsolete documents retained for reference |
-
----
-
-## 4. RESPONSIBILITIES
-
-### 4.1 Document Control Coordinator
-- Manages document control system
-- Assigns document numbers
-- Maintains master document repository
-- Ensures proper document approval before release
-- Distributes controlled documents
-- Maintains distribution lists
-- Retrieves and destroys/archives obsolete documents
-- Maintains document control records
-- Trains personnel on document control procedures
-
-### 4.2 Document Owners
-- Create and maintain documents within their area
-- Ensure document accuracy and completeness
-- Initiate document changes when needed
-- Participate in document review and approval
-- Identify when documents become obsolete
-- Ensure personnel in their area use current documents
-
-### 4.3 Quality Manager
-- Approves all QMS documents (SOPs, Quality Manual)
-- Reviews document changes for QMS impact
-- Ensures document control system effectiveness
-- Audits document control compliance
-
-### 4.4 Department Managers
-- Approve department-specific work instructions
-- Ensure current documents available in their areas
-- Ensure personnel trained on document changes
-- Remove obsolete documents from use areas
-
-### 4.5 All Personnel
-- Use only current, approved documents
-- Report document issues (errors, illegibility, missing documents)
-- Do not use obsolete or unapproved documents
-- Maintain documents in good condition
-
----
-
-## 5. PROCEDURE
-
-### 5.1 Document Types and Hierarchy
-
-QMS documents are organized in a four-tier hierarchy:
-
-**Tier 1: Quality Manual (QM)**
-- Policy-level document
-- Describes overall QMS
-- References all Tier 2 procedures
-- Approved by CEO and Quality Manager
-
-**Tier 2: Standard Operating Procedures (SOPs)**
-- Define WHAT must be done, WHO does it, WHEN
-- Cross-functional processes
-- Include all 31 required documented procedures per ISO 13485
-- Approved by Quality Manager
-
-**Tier 3: Work Instructions (WIs)**
-- Define HOW to perform specific tasks
-- Step-by-step instructions
-- Department or process-specific
-- Approved by Department Manager and Quality Manager
-
-**Tier 4: Forms and Templates**
-- Standardized formats for data collection
-- Support SOPs and WIs
-- Approved by Document Owner and Quality Manager
-
-**Other Controlled Documents:**
-- Medical Device Files (MDFs)
-- Design History Files (DHFs)
-- Validation documents
-- Specifications
-- Drawings
-- Labels and instructions for use
-
-### 5.2 Document Numbering System
-
-All controlled documents are assigned unique identification numbers:
-
-**Quality Manual:**
-- Format: QM-[###]
-- Example: QM-001
-
-**Standard Operating Procedures:**
-- Format: SOP-[ISO Clause]-[###]
-- Example: SOP-4.2.4-001 (for Clause 4.2.4 Control of Documents)
-- Example: SOP-8.5-001 (for CAPA procedure)
-
-**Work Instructions:**
-- Format: WI-[Department Code]-[###]
-- Example: WI-MFG-001 (Manufacturing department work instruction)
-- Department codes: MFG (Manufacturing), QC (Quality Control), ENG (Engineering), etc.
-
-**Forms:**
-- Format: FORM-[SOP/WI Number]-[Letter]
-- Example: FORM-SOP-8.5-001-A (CAPA Request Form)
-
-**Medical Device Files:**
-- Format: MDF-[Product Code]-[###]
-- Example: MDF-ABC-001
-
-**Other Documents:**
-- Format varies by document type
-- Assigned by Document Control Coordinator
-
-**Revision Designation:**
-- Initial release: Revision 00
-- First revision: Revision 01
-- Subsequent revisions: 02, 03, 04, etc.
-- Format: [Document Number] Rev [##]
-
-### 5.3 Document Creation
-
-**5.3.1 Initiating Document Creation**
-
-1. Document Owner identifies need for new document
-2. Document Owner notifies Document Control Coordinator
-3. Document Control Coordinator:
- - Assigns document number
- - Provides document template (if applicable)
- - Logs document in master list as "In Development"
-
-**5.3.2 Document Format Requirements**
-
-All controlled documents must include:
-
-**Header (on each page):**
-- Document number
-- Document title
-- Revision number
-- Effective date
-- Page number (Page X of Y)
-
-**Document Control Section:**
-- Approval signature table
-- Revision history table
-
-**Content Requirements:**
-- Clear, concise language
-- Present tense, active voice
-- Consistent terminology
-- Numbered sections and subsections
-- References to related documents
-- Records generated (if applicable)
-
-**5.3.3 Document Drafting**
-
-1. Document Owner drafts document content
-2. Document Owner marks document as "DRAFT" on each page
-3. Draft may be circulated for informal review and input
-4. When ready for formal review, Document Owner submits to Document Control Coordinator
-
-### 5.4 Document Review and Approval
-
-**5.4.1 Review Process**
-
-1. Document Control Coordinator:
- - Verifies document number correct
- - Verifies format compliance
- - Checks for required sections
- - Routes for review
-
-2. Reviews conducted by:
- - Technical reviewer (subject matter expert)
- - Quality reviewer (for QMS compliance)
- - Other stakeholders as appropriate
-
-3. Reviewers:
- - Review for technical accuracy
- - Review for clarity and completeness
- - Review for compliance with requirements
- - Provide comments to Document Owner
-
-4. Document Owner:
- - Addresses all comments
- - Revises document as needed
- - Resubmits for approval
-
-**5.4.2 Approval Process**
-
-Approval authority based on document type:
-
-| Document Type | Approval Authority |
-|---------------|-------------------|
-| Quality Manual | CEO and Quality Manager |
-| Standard Operating Procedures | Quality Manager |
-| Work Instructions | Department Manager and Quality Manager |
-| Forms | Document Owner and Quality Manager |
-| Specifications | Engineering Manager and Quality Manager |
-| Medical Device Files | [Per regulatory requirements] |
-
-**Approval Steps:**
-
-1. Document Control Coordinator routes document to approvers
-2. Approvers review and sign/date approval section
-3. All required approvals must be obtained before document becomes effective
-4. Document Control Coordinator:
- - Removes "DRAFT" watermark
- - Adds effective date (typically [X] days after approval)
- - Assigns final format
- - Adds to controlled document system
- - Updates master document list
-
-**5.4.3 Training Requirements**
-
-Before document becomes effective:
-- Affected personnel identified
-- Training conducted as needed
-- Training records maintained per SOP-[NUMBER]
-
-### 5.5 Document Distribution and Access
-
-**5.5.1 Master Document**
-
-- Document Control Coordinator maintains master copy
-- Master stored in: [ELECTRONIC SYSTEM or PHYSICAL LOCATION]
-- Master clearly identified as "MASTER COPY"
-- Master is reference for all distributed copies
-
-**5.5.2 Controlled Copies**
-
-**Electronic Distribution (Primary Method):**
-- Documents stored in [DOCUMENT MANAGEMENT SYSTEM]
-- Access controlled by user permissions
-- Read-only access for most users
-- Always displays current revision
-- Obsolete revisions automatically removed from access
-- Users may print for immediate use (uncontrolled copies)
-
-**Physical Distribution (When Necessary):**
-- Controlled copies issued for specific locations/uses
-- Each copy stamped "CONTROLLED COPY - [Copy Number]"
-- Distribution list maintained showing:
- - Copy number
- - Document number and revision
- - Holder name and location
- - Date issued
-- Holders responsible for maintaining copy in good condition
-- When document revised, Document Control retrieves old copy and issues new copy
-
-**5.5.3 Uncontrolled Copies**
-
-- Printed for temporary, immediate use
-- Stamped or marked "UNCONTROLLED COPY"
-- User responsible for verifying current revision before each use
-- Should be destroyed after use or within [X] days
-
-**5.5.4 Availability at Point of Use**
-
-- Current documents available where work is performed
-- Electronic access at workstations
-- Controlled physical copies in areas without electronic access
-- Documents protected from damage, loss, deterioration
-
-### 5.6 Document Changes
-
-**5.6.1 Initiating Changes**
-
-Changes may be initiated by:
-- Document Owner identifying need
-- CAPA requiring procedure change
-- Internal audit finding
-- Management review action
-- Regulatory or standard update
-- Process improvement
-
-**5.6.2 Change Request Process**
-
-1. Requestor:
- - Completes Document Change Request Form (Attachment A)
- - Describes change needed and justification
- - Submits to Document Owner
-
-2. Document Owner:
- - Reviews change request
- - Determines if change appropriate
- - Approves or denies request
- - If approved, initiates document revision
-
-**5.6.3 Making Changes**
-
-1. Document Owner:
- - Requests current master from Document Control
- - Creates revised version with changes
- - Increments revision number
- - Updates revision history table
- - Identifies changes in document (change bars, highlights, or summary)
- - Marks as "DRAFT REVISION"
-
-2. Changes reviewed and approved by:
- - Same approval authority as original document
- - UNLESS different approval authority designated by original approver
- - Reviewers have access to previous revision for comparison
-
-3. Approval:
- - New revision approved per Section 5.4.2
- - Previous revision becomes obsolete on effective date of new revision
-
-**5.6.4 Indication of Changes**
-
-Changes are indicated by:
-- Revision history table (describes nature of changes)
-- Change bars or highlights in document (optional but recommended)
-- Change summary page for significant revisions (optional)
-
-**5.6.5 Urgent Changes**
-
-For urgent changes affecting safety or regulatory compliance:
-- Expedited review and approval process
-- May use interim method (e.g., hand-written changes with approval)
-- Formal document revision completed as soon as practical
-- Document per CAPA process if change due to nonconformity
-
-### 5.7 Control of Obsolete Documents
-
-**5.7.1 When Document Becomes Obsolete**
-
-Document becomes obsolete when:
-- New revision approved and becomes effective
-- Document no longer applicable to operations
-- Product discontinued
-- Process changed
-
-**5.7.2 Removal from Use**
-
-1. Document Control Coordinator:
- - On effective date of new revision, marks superseded revision as obsolete
- - Removes from electronic document system OR limits access with "OBSOLETE" notation
- - Retrieves physical controlled copies from distribution locations
- - Updates distribution lists
-
-2. Department Managers:
- - Remove obsolete copies from work areas
- - Return to Document Control or destroy
- - Ensure personnel aware of new revision
-
-**5.7.3 Retention of Obsolete Documents**
-
-Obsolete documents may be retained for:
-- Reference purposes
-- Product investigations
-- Regulatory or legal requirements
-- Historical record
-
-**If retained:**
-- Clearly marked "OBSOLETE - FOR REFERENCE ONLY" or "SUPERSEDED"
-- Stored separately from current documents
-- Access restricted and controlled
-- Retained per applicable retention requirements
-
-**Retention Locations:**
-- Electronic archive with "OBSOLETE" watermark
-- Separate physical archive area
-
-**5.7.4 Prevention of Unintended Use**
-
-To prevent unintended use:
-- Physical copies stamped "OBSOLETE" in red
-- Electronic copies watermarked "OBSOLETE"
-- Removed from active work areas
-- Stored in separate archive
-- Training on document control system and how to verify current revision
-
-### 5.8 Control of External Documents
-
-**5.8.1 Types of External Documents**
-
-External documents include:
-- ISO standards
-- IEC standards
-- FDA regulations and guidance documents
-- EU regulations (MDR, IVDR)
-- Other regulatory requirements
-- Customer specifications
-- Supplier certifications
-- Calibration certificates
-- Reference materials
-
-**5.8.2 Identification and Control**
-
-1. Document Owner or requestor:
- - Identifies external document needed
- - Provides copy to Document Control Coordinator
-
-2. Document Control Coordinator:
- - Assigns external document number: EXT-[Category]-[###]
- - Logs in external document register including:
- - Document title and number
- - Source/publisher
- - Date/version
- - Location in organization
- - Responsible person for monitoring updates
- - Files in external document repository
-
-**5.8.3 Reviewing for Currency**
-
-- Document Owner responsible for monitoring updates to external documents
-- Frequency: [Annually or as notified of updates]
-- Check publisher website for updates
-- Subscribe to update notifications when available
-- When update identified:
- - Obtain new version
- - Provide to Document Control
- - Review for impact on QMS documents
- - Update QMS documents as needed (per CAPA if necessary)
- - Obsolete previous version per Section 5.7
-
-**5.8.4 Customer-Supplied Documents**
-
-- Customer specifications and drawings controlled as external documents
-- Review for clarity and completeness upon receipt
-- Discrepancies communicated to customer for resolution
-- Controlled per this procedure to ensure current version used
-
----
-
-## 6. RECORDS
-
-Records generated and maintained per this procedure:
-
-| Record | Retention Period | Location | Responsible Party |
-|--------|------------------|----------|-------------------|
-| Master Document List | Current + [X] years | [LOCATION/SYSTEM] | Document Control Coordinator |
-| Document Approval Records | [X years or device lifetime] | Document Control System | Document Control Coordinator |
-| Document Revision History | [X years or device lifetime] | Document Control System | Document Control Coordinator |
-| Document Change Requests | [X years] | [LOCATION] | Document Control Coordinator |
-| Distribution Lists | Current + [X] years | [LOCATION] | Document Control Coordinator |
-| Obsolete Document Archive | [Per retention schedule] | [LOCATION] | Document Control Coordinator |
-| External Document Register | Current + [X] years | [LOCATION] | Document Control Coordinator |
-
----
-
-## 7. REFERENCES
-
-- ISO 13485:2016, Clause 4.2.4 - Control of Documents
-- Quality Manual, Section 4.2.4
-- SOP-4.2.5 - Control of Records
-- SOP-6.2 - Training and Competence
-
----
-
-## 8. ATTACHMENTS
-
-**Attachment A:** Document Change Request Form
-**Attachment B:** Document Templates (QM, SOP, WI, Form)
-**Attachment C:** Document Control Flowchart
-**Attachment D:** Master Document List Template
-**Attachment E:** Distribution List Template
-
----
-
-**END OF PROCEDURE**
-
----
-
-**Document Number:** SOP-4.2.4-001
-**Revision:** 00
-**Page:** [X] of [X]
+# Document and Record Control Procedure Working Template
+
+> **STATUS: DRAFT EXAMPLE — NOT APPROVED — NO COMPLIANCE CLAIM**
+>
+> This structure is not a released procedure. It does not determine retention,
+> regulatory applicability, conformity, or certification. Authorized management,
+> RA/QA, legal/regulatory, process owners, and document control must approve the
+> organization-specific controls. ISO publications are copyrighted; use an
+> authorized copy and do not paste their text here.
+
+## Controlled-document metadata
+
+| Field | Entry |
+|---|---|
+| Document ID/revision | `<ID>` / `<revision>` |
+| Owner | `<accountable role>` |
+| Status | `draft` / `in-review` / `approved` |
+| Effective date | `<YYYY-MM-DD after approval>` |
+| Evidence repository | `<controlled location>` |
+| Change/superseded record | `<IDs>` |
+
+| Approval role | Named approver | Status | Date | Approval evidence |
+|---|---|---|---|---|
+| Process owner | `<name/role>` | `pending` | `<date>` | `<ID>` |
+| RA/QA | `<name/role>` | `pending` | `<date>` | `<ID>` |
+| System owner | `<name/role>` | `pending` | `<date>` | `<ID>` |
+
+## 1. Purpose, scope, and interfaces
+
+- Controlled documents covered: `<types, systems, sites, products>`
+- Records covered: `<types, systems, sites, products>`
+- External sources covered: standards, regulations, guidance, customer and supplier
+ specifications, and product-specific sources.
+- Interfaces: change control, training, validation, data integrity, cybersecurity,
+ supplier controls, product files, complaints/CAPA, audit, and management review.
+
+## 2. Roles and segregation of duties
+
+| Role | Authority/responsibility | Independence or access restriction | Delegate | Evidence | Approval |
+|---|---|---|---|---|---|
+| Document owner | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<ID>` |
+| Record owner | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<ID>` |
+| Reviewer | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<ID>` |
+| Approver | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<ID>` |
+| System administrator | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<ID>` |
+
+## 3. Document lifecycle
+
+| Stage | Required controls | Owner | Status | Evidence | Approval |
+|---|---|---|---|---|---|
+| Request/authoring | need, scope, source/version, author | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Review | technical, process, RA/QA, linked-document impact | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Approval/release | named authority, date, revision, effective date | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Distribution/use | access, point-of-use revision, copy status | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Change | rationale, impact, validation/training, linked updates | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Obsolescence | withdrawal, archive, retained-copy identification | `<role>` | `draft` | `<ID>` | `<ID>` |
+
+Define approved rules for identifiers, revision schemes, emergency changes, printed
+copies, translations, electronic signatures, and controlled exports. Do not assume
+that a downloaded or printed file remains controlled.
+
+## 4. Record lifecycle and data integrity
+
+| Control | Organization-specific method | Owner | Status | Evidence | Approval |
+|---|---|---|---|---|---|
+| Creation/attribution | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Legibility/completeness | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Contemporaneous entry | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Corrections/audit trail | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Access/security | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Backup/recovery | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Retrieval | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Retention/disposition | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+
+Retention periods must cite an approved basis for each record type. This template
+does not supply a universal period.
+
+## 5. External source and version control
+
+| Source ID | Publisher/title | Version/date | Authorized location | Applicability owner | Last currency review | Impact record | Status | Approval |
+|---|---|---|---|---|---|---|---|---|
+| `<ID>` | `<entry>` | `<entry>` | `<entry>` | `<role>` | `<date>` | `<ID>` | `review-due` | `<ID>` |
+
+Required controls:
+
+1. Obtain standards from an authorized source and preserve license restrictions.
+2. Record the exact edition/version incorporated into each jurisdictional basis.
+3. Monitor official publishers; do not rely on search snippets as controlled text.
+4. Perform and approve impact assessment before changing QMS documents.
+5. Distinguish ISO, FDA QMSR/eCFR, MDSAP, EU MDR/IVDR/MDCG, and product-specific
+ sources rather than treating them as interchangeable.
+
+## 6. Electronic systems and software validation
+
+| System/use | Intended use | Risk basis | Access/audit-trail controls | Validation evidence | Change/revalidation trigger | Owner | Approval |
+|---|---|---|---|---|---|---|---|
+| `<system>` | `<entry>` | `<entry>` | `<entry>` | `<ID>` | `<entry>` | `<role>` | `<ID>` |
+
+Do not release an electronic workflow until authorized owners approve intended use,
+validation evidence, access roles, data migration, backup/recovery, and change
+controls.
+
+## 7. Change and training impact
+
+Every change record should include:
+
+- reason, affected products/sites/processes/documents/records;
+- source/version and regulatory-impact review;
+- risk, validation, software, supplier, and postmarket impacts;
+- training population and completion evidence before effective use;
+- implementation verification, owner, status, evidence, and approval.
+
+## 8. Registers and audit evidence
+
+| Register | Owner | Status | Location | Review frequency/basis | Evidence | Approval |
+|---|---|---|---|---|---|---|
+| Master document list | `<role>` | `draft` | `<location>` | `<basis>` | `<ID>` | `<ID>` |
+| Record retention schedule | `<role>` | `draft` | `<location>` | `<basis>` | `<ID>` | `<ID>` |
+| External source ledger | `<role>` | `draft` | `<location>` | `<basis>` | `<ID>` | `<ID>` |
+| Access/role register | `<role>` | `draft` | `<location>` | `<basis>` | `<ID>` | `<ID>` |
+| Training/change register | `<role>` | `draft` | `<location>` | `<basis>` | `<ID>` | `<ID>` |
+| Obsolete/disposition log | `<role>` | `draft` | `<location>` | `<basis>` | `<ID>` | `<ID>` |
+
+## Release checklist
+
+- [ ] Scope includes documents, records, external sources, and electronic systems.
+- [ ] Owners, statuses, evidence, source versions, and approvals are explicit.
+- [ ] Access, integrity, retrieval, retention, disposition, and audit trails are defined.
+- [ ] Change, validation, software, supplier, and training impacts are linked.
+- [ ] No universal retention period or automatic applicability conclusion is asserted.
+- [ ] No template or script result is described as compliance or certification.
+- [ ] Required human approvals are complete before the effective date.
diff --git a/skills/iso-13485-certification/assets/templates/qmsr-transition-template.json b/skills/iso-13485-certification/assets/templates/qmsr-transition-template.json
new file mode 100644
index 00000000..0b65766f
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/qmsr-transition-template.json
@@ -0,0 +1,181 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. QMSR has been effective and enforceable since 2026-02-02. This checklist cannot determine FDA applicability or compliance.",
+ "metadata": {
+ "checklist_id": "<controlled checklist ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<QMSR transition owner>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "qmsr_basis": {
+ "as_of": "2026-07-23",
+ "effective_date": "2026-02-02",
+ "current_part_820_title": "Quality Management System Regulation",
+ "inspection_compliance_program": "7382.850",
+ "owner": "<authorized RA/QA role>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [
+ {
+ "id": "FDA-QMSR",
+ "title": "Quality Management System Regulation (QMSR)",
+ "version_or_date": "Updated 2026-02-02",
+ "url": "https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr",
+ "accessed": "2026-07-23"
+ },
+ {
+ "id": "ECFR-820",
+ "title": "21 CFR Part 820 — Quality Management System Regulation",
+ "version_or_date": "Current eCFR reviewed 2026-07-23",
+ "url": "https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820",
+ "accessed": "2026-07-23"
+ },
+ {
+ "id": "FDA-CP-7382.850",
+ "title": "Inspection of Medical Device Manufacturers Compliance Program 7382.850",
+ "version_or_date": "Effective 2026-02-02",
+ "url": "https://www.fda.gov/media/80195/download?attachment",
+ "accessed": "2026-07-23"
+ }
+ ]
+ },
+ "items": [
+ {
+ "id": "qmsr-source-basis",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<record exact current sources and versions>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR", "title": "FDA QMSR page", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "applicability-owner",
+ "owner": "<authorized role>",
+ "status": "not-started",
+ "assessment": "<identify authorized applicability decision and rationale>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "ECFR-820", "title": "21 CFR Part 820", "version_or_date": "current", "url": "https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "fda-supplemental-provisions",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<review current FDA-specific provisions and linked regulations>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "ECFR-820", "title": "21 CFR Part 820", "version_or_date": "current", "url": "https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "legacy-qsr-reference-disposition",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<inventory and disposition obsolete QSR/QSIT references without treating a legacy clause map as current law>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR-FAQ", "title": "QMSR Frequently Asked Questions", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "pre-effective-date-record-review",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<review evidence supporting records created before 2026-02-02>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR-FAQ", "title": "QMSR Frequently Asked Questions", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "inspection-accessible-records",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<prepare controlled access to management review, internal/supplier audit, and other QMS records>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR-FAQ", "title": "QMSR Frequently Asked Questions", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "inspection-process-training",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<approve training for current FDA inspection process>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-CP-7382.850", "title": "Compliance Program 7382.850", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/media/80195/download?attachment", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "qsit-retirement",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<remove or archive QSIT-based current-state materials>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR", "title": "FDA QMSR page", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "complaint-and-servicing-records",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<review current Part 820 record requirements and evidence>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "ECFR-820", "title": "21 CFR Part 820", "version_or_date": "current", "url": "https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "labeling-and-packaging-controls",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<review current FDA labeling and packaging control evidence>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "ECFR-820", "title": "21 CFR Part 820", "version_or_date": "current", "url": "https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "software-validation-impact",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<review risk-based QMS and production software validation/change evidence>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR", "title": "FDA QMSR page", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "supplier-and-outsourced-process-controls",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<review supplier, contractor, and outsourced-process controls>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-CP-7382.850", "title": "Compliance Program 7382.850", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/media/80195/download?attachment", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "certificate-claims-review",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<remove claims that ISO certification establishes FDA compliance or inspection exemption>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR-FAQ", "title": "QMSR Frequently Asked Questions", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions", "accessed": "2026-07-23"}]
+ },
+ {
+ "id": "change-control-approval",
+ "owner": "<role>",
+ "status": "not-started",
+ "assessment": "<approve linked document, training, validation, supplier, product, and postmarket changes>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [{"id": "FDA-QMSR", "title": "FDA QMSR page", "version_or_date": "2026-02-02", "url": "https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr", "accessed": "2026-07-23"}]
+ }
+ ],
+ "attestations": {
+ "iso_certificate_not_treated_as_fda_compliance": false,
+ "checklist_not_treated_as_compliance_determination": false,
+ "legacy_qsr_clause_map_not_used_as_current_requirements": false,
+ "applicability_decisions_owned_by_authorized_humans": false,
+ "owner": "<authorized role>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""}
+ }
+}
diff --git a/skills/iso-13485-certification/assets/templates/quality-manual-template.md b/skills/iso-13485-certification/assets/templates/quality-manual-template.md
index d882ed1e..26f21066 100644
--- a/skills/iso-13485-certification/assets/templates/quality-manual-template.md
+++ b/skills/iso-13485-certification/assets/templates/quality-manual-template.md
@@ -1,521 +1,182 @@
-# Quality Manual Template
-
-# [COMPANY NAME]
-## QUALITY MANUAL
-
-**Document Number:** QM-001
-**Revision:** 00
-**Effective Date:** [DATE]
-**Page:** 1 of [X]
-
----
-
-## DOCUMENT CONTROL
+# Quality Manual Working Template
-### Approval Signatures
-
-| Role | Name | Signature | Date |
-|------|------|-----------|------|
-| Chief Executive Officer | [NAME] | | [DATE] |
-| Quality Manager | [NAME] | | [DATE] |
-| Management Representative | [NAME] | | [DATE] |
-
-### Revision History
-
-| Revision | Date | Description of Changes | Approved By |
-|----------|------|------------------------|-------------|
-| 00 | [DATE] | Initial release | [NAME] |
-| | | | |
-
-### Distribution List
-
-| Copy No. | Holder | Location | Date Issued |
-|----------|--------|----------|-------------|
-| 001 | Master Copy | Document Control | [DATE] |
-| 002 | [NAME/DEPT] | [LOCATION] | [DATE] |
-| | | | |
-
----
-
-## TABLE OF CONTENTS
-
-1. [Introduction](#1-introduction)
- - 1.1 [Company Overview](#11-company-overview)
- - 1.2 [Purpose of the Quality Manual](#12-purpose-of-the-quality-manual)
- - 1.3 [Document Control and Revisions](#13-document-control-and-revisions)
- - 1.4 [Definitions and Abbreviations](#14-definitions-and-abbreviations)
-
-2. [Scope and Exclusions](#2-scope-and-exclusions)
- - 2.1 [Scope of QMS](#21-scope-of-qms)
- - 2.2 [Products Covered](#22-products-covered)
- - 2.3 [Applicable Regulatory Requirements](#23-applicable-regulatory-requirements)
- - 2.4 [Exclusions and Justifications](#24-exclusions-and-justifications)
-
-3. [Quality Policy and Objectives](#3-quality-policy-and-objectives)
- - 3.1 [Quality Policy Statement](#31-quality-policy-statement)
- - 3.2 [Quality Objectives](#32-quality-objectives)
- - 3.3 [Communication of Policy and Objectives](#33-communication-of-policy-and-objectives)
-
-4. [Quality Management System](#4-quality-management-system)
- - 4.1 [General Requirements](#41-general-requirements)
- - 4.2 [Documentation Requirements](#42-documentation-requirements)
-
-5. [Management Responsibility](#5-management-responsibility)
- - 5.1 [Management Commitment](#51-management-commitment)
- - 5.2 [Customer Focus](#52-customer-focus)
- - 5.3 [Quality Policy](#53-quality-policy)
- - 5.4 [Planning](#54-planning)
- - 5.5 [Responsibility, Authority and Communication](#55-responsibility-authority-and-communication)
- - 5.6 [Management Review](#56-management-review)
-
-6. [Resource Management](#6-resource-management)
- - 6.1 [Provision of Resources](#61-provision-of-resources)
- - 6.2 [Human Resources](#62-human-resources)
- - 6.3 [Infrastructure](#63-infrastructure)
- - 6.4 [Work Environment and Contamination Control](#64-work-environment-and-contamination-control)
-
-7. [Product Realization](#7-product-realization)
- - 7.1 [Planning of Product Realization](#71-planning-of-product-realization)
- - 7.2 [Customer-Related Processes](#72-customer-related-processes)
- - 7.3 [Design and Development](#73-design-and-development)
- - 7.4 [Purchasing](#74-purchasing)
- - 7.5 [Production and Service Provision](#75-production-and-service-provision)
- - 7.6 [Control of Monitoring and Measuring Equipment](#76-control-of-monitoring-and-measuring-equipment)
-
-8. [Measurement, Analysis and Improvement](#8-measurement-analysis-and-improvement)
- - 8.1 [General](#81-general)
- - 8.2 [Monitoring and Measurement](#82-monitoring-and-measurement)
- - 8.3 [Control of Nonconforming Product](#83-control-of-nonconforming-product)
- - 8.4 [Analysis of Data](#84-analysis-of-data)
- - 8.5 [Improvement](#85-improvement)
-
-9. [Appendices](#9-appendices)
- - Appendix A: [List of Documented Procedures](#appendix-a-list-of-documented-procedures)
- - Appendix B: [Organization Chart](#appendix-b-organization-chart)
- - Appendix C: [Process Map](#appendix-c-process-map)
- - Appendix D: [Definitions and Abbreviations](#appendix-d-definitions-and-abbreviations)
- - Appendix E: [Applicable Regulatory Requirements](#appendix-e-applicable-regulatory-requirements)
-
----
-
-## 1. INTRODUCTION
-
-### 1.1 Company Overview
-
-**Company Legal Name:** [FULL LEGAL COMPANY NAME]
-**Business Address:** [STREET ADDRESS, CITY, STATE/PROVINCE, ZIP/POSTAL CODE, COUNTRY]
-**Manufacturing Site(s):** [LIST ALL MANUFACTURING SITES]
-**Type of Business:** [e.g., Medical Device Manufacturer, Contract Manufacturer, etc.]
-
-[COMPANY NAME] was [established/founded] in [YEAR] and specializes in [BRIEF DESCRIPTION OF BUSINESS FOCUS].
-
-**Mission Statement:** [INSERT COMPANY MISSION STATEMENT]
-
-### 1.2 Purpose of the Quality Manual
-
-This Quality Manual documents the Quality Management System (QMS) of [COMPANY NAME]. The purpose of this manual is to:
-
-- Describe the QMS established and maintained in accordance with ISO 13485:2016
-- Demonstrate compliance with applicable regulatory requirements
-- Serve as the primary reference document for the structure and operation of the QMS
-- Provide guidance for employees, customers, regulatory authorities, and certification bodies
-
-This manual applies to all activities affecting the quality of medical devices designed, manufactured, distributed, and/or serviced by [COMPANY NAME].
-
-### 1.3 Document Control and Revisions
-
-This Quality Manual is a controlled document. The Document Control Coordinator maintains the master copy and distribution list.
-
-- **Approval Authority:** Chief Executive Officer and Quality Manager
-- **Review Frequency:** Annually, or as needed when significant changes occur
-- **Revision Process:** Changes are reviewed and approved per SOP-4.2.4 Control of Documents
-- **Distribution:** Controlled copies are issued to individuals listed in the Distribution List
-
-All recipients of controlled copies are responsible for ensuring they are using the current revision.
-
-### 1.4 Definitions and Abbreviations
-
-| Term/Abbreviation | Definition |
-|-------------------|------------|
-| CAPA | Corrective and Preventive Action |
-| CFR | Code of Federal Regulations |
-| DHF | Design History File |
-| DHR | Device History Record |
-| DMR | Device Master Record |
-| FDA | U.S. Food and Drug Administration |
-| IFU | Instructions for Use |
-| ISO | International Organization for Standardization |
-| MDF | Medical Device File |
-| MDR | Medical Device Regulation (EU) |
-| M&M Equipment | Monitoring and Measuring Equipment |
-| NCR | Nonconformance Report |
-| QMS | Quality Management System |
-| QMSR | Quality Management System Regulation (FDA) |
-| QSR | Quality System Regulation (FDA - former) |
-| SOP | Standard Operating Procedure |
-| WI | Work Instruction |
-
----
-
-## 2. SCOPE AND EXCLUSIONS
-
-### 2.1 Scope of QMS
-
-This Quality Management System applies to [COMPANY NAME] and covers all activities related to [LIST ACTIVITIES: e.g., design, development, production, storage, distribution, installation, servicing] of medical devices.
-
-**Organizational Scope:**
-- All departments and functions at [COMPANY NAME]
-- All employees, contractors, and temporary staff performing work affecting product quality
-
-**Physical Locations:**
-- [LIST ALL FACILITIES AND ADDRESSES]
-
-**Activities Covered:**
-- [✓ / ✗] Design and Development
-- [✓ / ✗] Manufacturing and Production
-- [✓ / ✗] Installation
-- [✓ / ✗] Servicing
-- [✓] Storage and Distribution
-- [✓] Purchasing
-- [✓] Customer Communication
-
-### 2.2 Products Covered
-
-This QMS covers the following medical device product families:
-
-| Product Family | Device Classification | Intended Use | Applicable Markets |
-|----------------|----------------------|--------------|-------------------|
-| [PRODUCT NAME/FAMILY] | [Class I/II/III] | [BRIEF INTENDED USE] | [FDA/EU/Other] |
-| | | | |
-
-### 2.3 Applicable Regulatory Requirements
-
-The QMS is designed to comply with the following standards and regulatory requirements:
-
-**International Standards:**
-- ISO 13485:2016 - Medical devices — Quality management systems — Requirements for regulatory purposes
-- ISO 14971:[YEAR] - Medical devices — Application of risk management to medical devices
-- [OTHER APPLICABLE ISO/IEC STANDARDS]
-
-**Regulatory Requirements:**
-- **United States:** FDA 21 CFR Part 820 (QMSR) - Quality Management System Regulation
-- **European Union:** EU MDR 2017/745 - Medical Devices Regulation [or IVDR 2017/746 for IVDs]
-- **Canada:** Canadian Medical Devices Regulations (SOR/98-282)
-- [OTHER APPLICABLE REGIONAL REQUIREMENTS]
-
-**Recognized Standards:**
-- [LIST PRODUCT-SPECIFIC STANDARDS, e.g., IEC 60601, ISO 10993, etc.]
-
-### 2.4 Exclusions and Justifications
-
-The following clauses of ISO 13485:2016 are excluded from the scope of this QMS:
-
-[IF NO EXCLUSIONS:]
-> There are no exclusions from ISO 13485:2016. All clauses are applicable and have been implemented.
-
-[IF EXCLUSIONS EXIST, USE THIS FORMAT:]
-
-**Clause 7.3 - Design and Development**
-
-**Status:** [EXCLUDED / PARTIALLY EXCLUDED / FULLY IMPLEMENTED]
-
-**Justification (if excluded):**
-> [COMPANY NAME] [operates as a contract manufacturer and produces medical devices according to complete design specifications provided by customers / only distributes medical devices designed and manufactured by third parties / etc.]. All design and development activities are [performed by customers / performed by a separate corporate entity / not applicable to business model]. [COMPANY NAME] has no responsibility for design inputs, outputs, verification, validation, design changes, or design history files.
-
-**Clause 7.5.3 - Installation Activities**
-
-**Status:** [EXCLUDED / PARTIALLY EXCLUDED / FULLY IMPLEMENTED]
-
-**Justification (if excluded):**
-> The medical devices manufactured by [COMPANY NAME] are [supplied ready for use and do not require installation / intended for installation by customer personnel under separate contractual arrangements]. Installation activities are [not performed / performed by authorized distributors or customers].
-
-**Clause 7.5.4 - Servicing Activities**
-
-**Status:** [EXCLUDED / PARTIALLY EXCLUDED / FULLY IMPLEMENTED]
-
-**Justification (if excluded):**
-> [COMPANY NAME] does not provide servicing of medical devices after delivery. Products are [intended for single use / serviced by authorized service partners under separate arrangements / serviced by customer personnel]. Post-delivery activities are limited to technical support and complaint handling.
-
----
-
-## 3. QUALITY POLICY AND OBJECTIVES
-
-### 3.1 Quality Policy Statement
-
-**QUALITY POLICY**
-
-[INSERT YOUR COMPANY-SPECIFIC QUALITY POLICY HERE. The policy should include:
-- Commitment to meeting customer and regulatory requirements
-- Commitment to maintaining QMS effectiveness
-- Framework for quality objectives
-- Signature of top management
-- Date
-
-Example:]
-
-> At [COMPANY NAME], quality is our highest priority. We are committed to designing, manufacturing, and delivering medical devices that meet the highest standards of safety, performance, and reliability.
->
-> Our commitments include:
-> - Compliance with ISO 13485 and all applicable regulatory requirements
-> - Understanding and meeting customer and patient needs
-> - Establishing and achieving measurable quality objectives
-> - Managing risks throughout the product lifecycle
-> - Continually improving our processes and products
-> - Maintaining competent and motivated personnel
-> - Responding promptly and effectively to feedback and complaints
->
-> This policy applies to all employees, contractors, and suppliers. This policy is reviewed annually and communicated throughout the organization.
+> **STATUS: DRAFT EXAMPLE — NOT APPROVED — NO CONFORMITY OR COMPLIANCE CLAIM**
>
-> [SIGNATURE]
-> [NAME], Chief Executive Officer
-> [DATE]
-
-### 3.2 Quality Objectives
-
-The organization has established the following measurable quality objectives to support the Quality Policy:
-
-| Objective | Measurement | Target | Responsibility | Review Frequency |
-|-----------|-------------|--------|----------------|------------------|
-| Customer Satisfaction | Survey rating | ≥ [X] out of 5.0 | [ROLE] | Quarterly |
-| Product Quality | Defect rate | < [X]% | [ROLE] | Monthly |
-| On-Time Delivery | % on-time | ≥ [X]% | [ROLE] | Monthly |
-| CAPA Effectiveness | % closed on time | ≥ [X]% | [ROLE] | Monthly |
-| Training Completion | % complete on schedule | 100% | [ROLE] | Quarterly |
-| Internal Audit Findings | Findings addressed | ≥ [X]% within 30 days | [ROLE] | After each audit |
-| [OTHER OBJECTIVES] | | | | |
-
-Quality objectives are monitored, reported in management review, and revised as necessary to drive continual improvement.
-
-### 3.3 Communication of Policy and Objectives
-
-The Quality Policy and Quality Objectives are communicated to all personnel through:
-
-- Employee orientation and training
-- Posting in common areas of the facility
-- Inclusion in employee handbook
-- Management review meetings
-- Department meetings
-- This Quality Manual (available to all personnel)
-- [OTHER COMMUNICATION METHODS]
-
-All employees are made aware of the relevance and importance of their activities and how they contribute to achieving quality objectives.
-
----
-
-## 4. QUALITY MANAGEMENT SYSTEM
-
-### 4.1 General Requirements
-
-#### 4.1.1 QMS Establishment
-
-[COMPANY NAME] has established, documented, implemented, and maintains a Quality Management System in accordance with ISO 13485:2016 and applicable regulatory requirements. The QMS covers all processes necessary to ensure medical device safety, performance, and regulatory compliance.
-
-The QMS processes have been identified and are documented in this Quality Manual and referenced procedures. These processes include:
-
-**Management Processes:**
-- Management commitment and review
-- Quality planning
-- Internal communication
-- Resource management
-
-**Product Realization Processes:**
-- [Design and development - if applicable]
-- Purchasing
-- Production and service provision
-- Customer-related processes
-
-**Support Processes:**
-- Document and record control
-- Human resources and training
-- Infrastructure and maintenance
-- Software validation
-
-**Monitoring and Measurement Processes:**
-- Customer feedback and complaints
-- Internal audits
-- Process and product monitoring
-- Nonconformance control
-- Corrective and preventive action
-- Data analysis
-
-#### 4.1.2 Process Interactions
-
-The QMS processes are interconnected and operate as a system. Process interactions are illustrated in the Process Map (Appendix C). Key interactions include:
-
-- Management review provides direction and resources for all processes
-- Product realization processes transform customer requirements into conforming products
-- Support processes enable effective product realization
-- Monitoring processes provide feedback for improvement
-- Risk management is integrated throughout all processes
-- All processes contribute to meeting quality objectives
-
-#### 4.1.3 Outsourced Processes
-
-[IF APPLICABLE - otherwise state "Not applicable"]
-
-The following QMS processes are outsourced to external parties:
-
-| Process | Service Provider | Control Method | Responsible Party |
-|---------|-----------------|----------------|-------------------|
-| [e.g., Sterilization] | [PROVIDER NAME] | Supplier qualification, contract, ongoing monitoring | [ROLE] |
-| [e.g., Calibration] | [PROVIDER NAME] | Qualified service provider, certificates reviewed | [ROLE] |
-| | | | |
-
-Outsourcing does not relieve [COMPANY NAME] of responsibility for conformity to customer and regulatory requirements. Control of outsourced processes is documented in [REFERENCE PROCEDURE].
-
-#### 4.1.4 Risk Management
-
-[COMPANY NAME] has established documented requirements for risk management throughout product realization in accordance with ISO 14971. Risk management is integrated into:
-
-- Design and development (when applicable)
-- Production and process control
-- Purchasing and supplier management
-- Post-market surveillance and feedback
-- Corrective and preventive action
-
-Risk management files are maintained as part of the Medical Device File for each device type. Risk management activities, methods, and records are defined in SOP-[NUMBER] Risk Management.
-
-#### 4.1.5 Software Validation
-
-Computer software applications used in the QMS are validated prior to initial use and after changes that could affect their intended use. Software requiring validation includes:
-
-- [QMS/ERP software]
-- [Electronic document management systems]
-- [Production control software]
-- [Automated test equipment software]
-- [Other software affecting product quality or QMS effectiveness]
-
-Validation is based on risk assessment and includes:
-- Documented validation approach
-- Risk-appropriate validation activities
-- Defined acceptance criteria
-- User responsibilities
-- Validation records maintained
-
-Software validation procedures and records are documented in SOP-[NUMBER] Software Validation.
-
-### 4.2 Documentation Requirements
-
-#### 4.2.1 General
-
-The QMS documentation includes:
-
-**Tier 1:** Quality Policy and Quality Manual (this document)
-
-**Tier 2:** Documented Procedures (SOPs)
-- The [31+] documented procedures required by ISO 13485:2016
-- Additional procedures established by the organization
-- Referenced in Appendix A
-
-**Tier 3:** Work Instructions (WIs)
-- Detailed step-by-step instructions for specific tasks
-- Department or process-specific documents
-
-**Tier 4:** Records and Forms
-- Evidence of conformity to requirements
-- Evidence of effective QMS operation
-- Maintained per retention requirements
-
-**Additional Documentation:**
-- Medical Device Files
-- Risk management files
-- Design and development files (when applicable)
-- Validation and verification documents
-- External documents (standards, regulations, customer specifications)
-
-#### 4.2.2 Quality Manual
-
-This Quality Manual is established and maintained to describe the scope of the QMS, document or reference QMS procedures, describe process interactions, and outline the documentation structure.
-
-This manual is controlled per SOP-[NUMBER] Control of Documents and is reviewed annually for continuing suitability.
-
-#### 4.2.3 Medical Device File
-
-A Medical Device File (MDF) is established and maintained for each medical device type or device family. The MDF contains all documentation required by ISO 13485:2016 Clause 4.2.3, including:
-
-- General description of device and intended use/purpose
-- Label and instructions for use specifications
-- Product specifications
-- Manufacturing specifications
-- Procedures for purchasing, manufacturing, and servicing
-- Procedures for measuring and monitoring
-- Installation requirements (when applicable)
-- Risk management file(s)
-- Verification and validation information
-- Design and development file(s) (when applicable)
-
-MDF structure, content, and control are defined in SOP-[NUMBER] Medical Device File.
-
-**Current Medical Device Files:**
-- [LIST MDFs MAINTAINED]
-
-#### 4.2.4 Control of Documents
-
-All QMS documents are controlled to ensure:
-- Approval before issue
-- Review and update as necessary
-- Current revision status identified
-- Relevant versions available at point of use
-- Documents remain legible and identifiable
-- External documents controlled
-- Obsolete documents prevented from unintended use
-- Obsolete documents identified if retained for reference
-
-Document control responsibilities, requirements, and procedures are defined in SOP-[NUMBER] Control of Documents.
-
-The Document Control Coordinator is responsible for document control system operation.
-
-#### 4.2.5 Control of Records
-
-QMS records provide evidence of conformity to requirements and effective QMS operation. Records are controlled to ensure:
-- Legibility, identification, and retrievability
-- Proper storage, security, and integrity
-- Appropriate retention time (minimum: device lifetime)
-- Proper disposition
-- Changes remain identifiable
-
-Record control responsibilities, requirements, and procedures are defined in SOP-[NUMBER] Control of Records.
-
-Records are retained for at least [X years or device lifetime, whichever is longer], in accordance with applicable regulatory requirements.
-
----
-
-## 5. MANAGEMENT RESPONSIBILITY
-
-[CONTINUE WITH SECTIONS 5-8 FOLLOWING THE SAME PATTERN: State requirement, describe implementation, reference procedure, identify responsibility]
-
-[Note: For brevity, I'm providing the format. The user can expand each section following this pattern]
-
----
-
-## 9. APPENDICES
-
-### APPENDIX A: LIST OF DOCUMENTED PROCEDURES
-
-[CREATE TABLE OF ALL 31+ PROCEDURES]
-
-### APPENDIX B: ORGANIZATION CHART
-
-[INSERT ORGANIZATION CHART]
-
-### APPENDIX C: PROCESS MAP
-
-[INSERT PROCESS INTERACTION DIAGRAM]
-
-### APPENDIX D: DEFINITIONS AND ABBREVIATIONS
-
-[EXPAND FROM SECTION 1.4]
-
-### APPENDIX E: APPLICABLE REGULATORY REQUIREMENTS
-
-[DETAILED LIST OF ALL APPLICABLE REGULATIONS]
-
----
-
-**END OF QUALITY MANUAL**
-
----
-
-**Document Number:** QM-001
-**Revision:** 00
-**Page:** [X] of [X]
+> This generic structure is an authoring aid. It cannot determine applicability,
+> establish an effective QMS, support a certification claim by itself, or replace
+> authorized management, RA/QA, legal, regulatory, notified-body, or certification-
+> body review. Obtain ISO standards from ISO or an authorized source; do not paste
+> copyrighted ISO text into this file.
+
+## 0. Controlled-document metadata
+
+| Field | Required entry |
+|---|---|
+| Document ID | `<assigned controlled ID>` |
+| Revision | `<revision>` |
+| Status | `draft` / `in-review` / `approved` |
+| Owner | `<accountable role>` |
+| Effective date | `<YYYY-MM-DD after approval>` |
+| Supersedes | `<document ID/revision or none>` |
+| Evidence repository | `<controlled location>` |
+| Confidentiality | `<classification>` |
+
+### Approval
+
+| Approval role | Named approver | Decision | Date | Approval evidence ID |
+|---|---|---|---|---|
+| Authorized management | `<name/role>` | `pending` | `<YYYY-MM-DD>` | `<record ID>` |
+| RA/QA | `<name/role>` | `pending` | `<YYYY-MM-DD>` | `<record ID>` |
+| Document control | `<name/role>` | `pending` | `<YYYY-MM-DD>` | `<record ID>` |
+
+**Release gate:** keep status `draft` until every required approver records a decision,
+open placeholders are resolved, referenced procedures exist, and training/change
+impacts are approved.
+
+## 1. Purpose and limits
+
+- Intended use of this manual: `<organization-specific purpose>`
+- What this manual does not establish: certification, regulatory applicability,
+ product authorization, FDA compliance, MDSAP acceptance, or EU conformity.
+- Authorized roles that own those determinations: `<roles and escalation route>`
+
+## 2. QMS scope
+
+| Scope element | Declared information | Owner | Status | Evidence ID | Approval ID |
+|---|---|---|---|---|---|
+| Legal entity/entities | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Sites and addresses | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Product families | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Lifecycle activities | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Outsourced processes | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+| Markets considered | `<entry>` | `<role>` | `draft` | `<ID>` | `<ID>` |
+
+### 2.1 Applicability decisions
+
+Do not infer applicability from a checklist. Record each decision made by an
+authorized human.
+
+| Topic/process | Decision | Rationale | Source/version | Decision owner | Approval/date |
+|---|---|---|---|---|---|
+| `<topic>` | `applicable` / `not-applicable` / `undetermined` | `<rationale>` | `<official source>` | `<role>` | `<record>` |
+
+`Undetermined` is a blocking status. A `not-applicable` entry requires a documented,
+approved rationale and must not be described as an automatic exclusion.
+
+## 3. Controlled source and version basis
+
+| Source ID | Official title | Edition/version/date | Authorized location | Currency review date | Owner | Impact approval |
+|---|---|---|---|---|---|---|
+| `<ID>` | `<title>` | `<version>` | `<location/URL>` | `<YYYY-MM-DD>` | `<role>` | `<record ID>` |
+
+At minimum, distinguish the source basis used for:
+
+- ISO 13485 certification preparation;
+- FDA QMSR and current 21 CFR Part 820;
+- MDSAP audit preparation;
+- EU MDR or IVDR conformity assessment;
+- product- and market-specific requirements.
+
+## 4. Governance, authority, and responsibilities
+
+| Role | Authority and responsibility | Independence/escalation | Delegate | Competence evidence | Approval |
+|---|---|---|---|---|---|
+| Top management | `<entry>` | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| Authorized management representative | `<entry>` | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| RA/QA owner | `<entry>` | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| Process owner | `<entry>` | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+| Document/record owner | `<entry>` | `<entry>` | `<entry>` | `<ID>` | `<ID>` |
+
+## 5. Process architecture and interactions
+
+Use organization-specific processes. Do not copy a standard's clauses as procedures.
+
+| Process | Inputs | Outputs | Owner | Controlled procedure | Records/evidence | Measures | Approval |
+|---|---|---|---|---|---|---|---|
+| Scope and quality planning | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Document and record control | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Risk management | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Design and development | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Supplier controls | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Production/service | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Validation and software assurance | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Identification/traceability | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Complaints, feedback, vigilance | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Nonconformity and CAPA | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Internal audit | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Management review | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Training and competence | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+| Change control | `<entry>` | `<entry>` | `<role>` | `<ID>` | `<IDs>` | `<measure>` | `<ID>` |
+
+Attach an approved process interaction map as evidence: `<record ID/location>`.
+
+## 6. Documentation and record controls
+
+- Document lifecycle and approval method: `<procedure ID>`
+- Record integrity, retrieval, retention, and disposition: `<procedure ID>`
+- External-source version monitoring: `<procedure/register ID>`
+- Electronic signatures/access controls: `<validated control IDs>`
+- Training before effective use: `<procedure/evidence IDs>`
+- Change-impact and linked-document updates: `<procedure/evidence IDs>`
+
+## 7. Product lifecycle controls
+
+For each applicable process, describe the policy-level approach and reference
+controlled evidence. Cover, as applicable:
+
+- requirements and product planning;
+- risk management through production and postmarket feedback;
+- design/development planning, reviews, transfer, and changes;
+- supplier and outsourced-process controls;
+- production, service, infrastructure, work environment, and process controls;
+- process, test-method, equipment, and software validation;
+- identification, distribution, and traceability;
+- acceptance, release, preservation, installation, and servicing.
+
+| Topic | Policy summary | Owner | Procedure | Evidence set | Status | Approval |
+|---|---|---|---|---|---|---|
+| `<topic>` | `<organization-specific summary>` | `<role>` | `<ID>` | `<IDs>` | `draft` | `<ID>` |
+
+## 8. Feedback, postmarket, and improvement controls
+
+Document the links among feedback, complaints, reportability/vigilance decisions,
+risk updates, nonconformity, CAPA, change control, and management review.
+
+| Link | Method | Owner | Input evidence | Output evidence | Approval |
+|---|---|---|---|---|---|
+| Complaint → reportability review | `<entry>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| Postmarket signal → risk update | `<entry>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| Nonconformity → CAPA decision | `<entry>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| CAPA → effectiveness review | `<entry>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| Change → validation/training | `<entry>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+
+## 9. Assurance and oversight
+
+| Activity | Scope/frequency basis | Independence | Owner | Evidence | Open actions | Approval |
+|---|---|---|---|---|---|---|
+| Internal audit | `<risk-based basis>` | `<controls>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| Management review | `<planned basis>` | `n/a` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| Supplier monitoring | `<risk-based basis>` | `<controls>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+| Validation review | `<change/risk basis>` | `<controls>` | `<role>` | `<IDs>` | `<IDs>` | `<ID>` |
+
+## 10. Appendices
+
+- Controlled procedure and record index: `<ID>`
+- Source/version ledger: `<ID>`
+- Organization chart and role authorizations: `<ID>`
+- Process interaction map: `<ID>`
+- Product/site/scope register: `<ID>`
+- Risk-design-production-postmarket traceability matrix: `<ID>`
+- Open gap and change register: `<ID>`
+
+## Final release checklist
+
+- [ ] No placeholder remains.
+- [ ] Scope and applicability decisions have authorized owners and approvals.
+- [ ] Every referenced document and record exists at its controlled revision.
+- [ ] Source versions and currency-review dates are recorded.
+- [ ] Process interactions and risk/postmarket feedback links are evidenced.
+- [ ] Product-specific and jurisdiction-specific requirements were reviewed separately.
+- [ ] Training and change impacts were approved.
+- [ ] No certification, conformity, compliance, or readiness claim is made by this template.
+- [ ] Final human approvals are recorded before the effective date.
diff --git a/skills/iso-13485-certification/assets/templates/scope-intake-template.json b/skills/iso-13485-certification/assets/templates/scope-intake-template.json
new file mode 100644
index 00000000..1acf1c5e
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/scope-intake-template.json
@@ -0,0 +1,109 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. Authorized humans must determine and approve applicability. This file cannot establish compliance, conformity, certification, or market access.",
+ "metadata": {
+ "intake_id": "<controlled intake ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<assigned role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": [
+ {
+ "id": "SOURCE-LEDGER",
+ "title": "Organization-controlled source ledger",
+ "version_or_date": "<revision/date>",
+ "url": "https://example.invalid/replace-with-controlled-official-source",
+ "accessed": "<YYYY-MM-DD>"
+ }
+ ]
+ },
+ "organization": {
+ "legal_name": "<legal entity>",
+ "declared_lifecycle_role": "<declared role; not a legal determination>",
+ "authorized_management_representative": "<named role>",
+ "raqa_owner": "<named role>",
+ "applicability_decision_owner": "<authorized RA/QA or legal role>"
+ },
+ "scope": {
+ "lifecycle_activities": [
+ "design-and-development"
+ ],
+ "sites": [
+ {
+ "id": "<site ID>",
+ "name": "<site name>",
+ "address": "<site address>",
+ "activities": [
+ "design-and-development"
+ ],
+ "owner": "<assigned role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ],
+ "products": [
+ {
+ "id": "<product/family ID>",
+ "family": "<product family>",
+ "intended_use": "<controlled intended-use reference>",
+ "classification_or_rationale": "<authorized classification decision reference>",
+ "market_ids": [
+ "<market ID>"
+ ],
+ "owner": "<assigned role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ],
+ "markets": [
+ {
+ "id": "<market ID>",
+ "jurisdiction": "<jurisdiction>",
+ "applicability": "undetermined",
+ "decision_rationale": "<authorized human decision and rationale>",
+ "owner": "<assigned role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ],
+ "outsourced_processes": [
+ {
+ "id": "<process ID>",
+ "process": "<outsourced process>",
+ "provider": "<provider>",
+ "control_strategy": "<risk-based control strategy>",
+ "owner": "<assigned role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ }
+ ]
+ }
+}
diff --git a/skills/iso-13485-certification/assets/templates/supplier-controls-template.json b/skills/iso-13485-certification/assets/templates/supplier-controls-template.json
new file mode 100644
index 00000000..d35a5ba4
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/supplier-controls-template.json
@@ -0,0 +1,119 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. This checklist cannot approve a supplier, determine legal applicability, or establish product/QMS compliance.",
+ "metadata": {
+ "register_id": "<controlled supplier register ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<supplier-control owner>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "control_methodology": {
+ "risk_method": "<approved method for supplier/product/process criticality>",
+ "approval_authority": "<authorized role>",
+ "monitoring_and_escalation": "<performance, change, nonconformity, CAPA, and re-evaluation method>",
+ "owner": "<method owner>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "suppliers": [
+ {
+ "id": "<supplier ID>",
+ "name": "<supplier legal name>",
+ "owner": "<supplier owner>",
+ "status": "candidate",
+ "criticality": "critical",
+ "product_service_or_process": "<supplied item/service/outsourced process>",
+ "risk_rationale": "<product/process risk and control rationale>",
+ "next_review_date": "<YYYY-MM-DD>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": [],
+ "selection_and_initial_evaluation": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<qualification method and acceptance criteria>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "purchasing_requirements": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<specifications, acceptance, records, and communication controls>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "change_notification": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<notification, review, approval, and validation controls>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "incoming_or_acceptance_verification": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<risk-based acceptance/verification method>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "performance_monitoring": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<metrics, data, review, and escalation>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "reevaluation": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<frequency/triggers and decision criteria>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "nonconformity_and_capa": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<containment, notification, SCAR/CAPA, effectiveness, escalation>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "quality_agreement": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<responsibilities, records, audit, change, sub-tier, and notification terms>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "subtier_controls": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<sub-tier approval, flow-down, monitoring, and change controls>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "business_continuity": {
+ "status": "planned",
+ "owner": "<role>",
+ "method": "<continuity, shortage, transfer, and change-risk controls>",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ "conditions": "",
+ "condition_due_date": "",
+ "disposition": ""
+ }
+ ]
+}
diff --git a/skills/iso-13485-certification/assets/templates/traceability-matrix-template.json b/skills/iso-13485-certification/assets/templates/traceability-matrix-template.json
new file mode 100644
index 00000000..e9a6e65a
--- /dev/null
+++ b/skills/iso-13485-certification/assets/templates/traceability-matrix-template.json
@@ -0,0 +1,154 @@
+{
+ "_notice": "DRAFT EXAMPLE ONLY. Trace links require substantive human review; this matrix cannot establish product safety, conformity, compliance, or certification.",
+ "metadata": {
+ "matrix_id": "<controlled matrix ID>",
+ "review_date": "<YYYY-MM-DD>",
+ "owner": "<traceability owner>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {
+ "status": "pending",
+ "by": "",
+ "date": ""
+ },
+ "source_refs": []
+ },
+ "artifacts": [
+ {
+ "id": "INTENDED-USE-<ID>",
+ "type": "intended-use",
+ "title": "<controlled intended use>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "HAZARD-<ID>",
+ "type": "hazard",
+ "title": "<hazard or postmarket signal>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "RISK-EVAL-<ID>",
+ "type": "risk-evaluation",
+ "title": "<risk evaluation>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "RISK-CONTROL-<ID>",
+ "type": "risk-control",
+ "title": "<risk control>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "DESIGN-IN-<ID>",
+ "type": "design-input",
+ "title": "<design input>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "DESIGN-OUT-<ID>",
+ "type": "design-output",
+ "title": "<design output>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "VERIFY-<ID>",
+ "type": "verification",
+ "title": "<verification evidence>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "VALIDATE-<ID>",
+ "type": "validation",
+ "title": "<validation evidence>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "PROD-CTRL-<ID>",
+ "type": "production-control",
+ "title": "<production/process control>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "PMS-<ID>",
+ "type": "postmarket-signal",
+ "title": "<postmarket source or approved monitoring plan>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ },
+ {
+ "id": "CHANGE-<ID>",
+ "type": "change-control",
+ "title": "<change control or approved not-applicable decision>",
+ "owner": "<role>",
+ "status": "draft",
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ }
+ ],
+ "rows": [
+ {
+ "id": "<trace row ID>",
+ "product_id": "<product/family ID>",
+ "owner": "<traceability owner>",
+ "status": "draft",
+ "linkage_rationale": "<explain why the evidence links are adequate>",
+ "links": {
+ "intended_use": ["INTENDED-USE-<ID>"],
+ "hazard_or_signal": ["HAZARD-<ID>"],
+ "risk_evaluation": ["RISK-EVAL-<ID>"],
+ "risk_control": ["RISK-CONTROL-<ID>"],
+ "design_input": ["DESIGN-IN-<ID>"],
+ "design_output": ["DESIGN-OUT-<ID>"],
+ "verification": ["VERIFY-<ID>"],
+ "validation": ["VALIDATE-<ID>"],
+ "production_control": ["PROD-CTRL-<ID>"],
+ "postmarket_source": ["PMS-<ID>"]
+ },
+ "change_control_refs": ["CHANGE-<ID>"],
+ "open_gaps": ["<unresolved gap>"],
+ "evidence": [],
+ "approval": {"status": "pending", "by": "", "date": ""},
+ "source_refs": []
+ }
+ ]
+}
diff --git a/skills/iso-13485-certification/references/gap-analysis-checklist.md b/skills/iso-13485-certification/references/gap-analysis-checklist.md
index 43b83acf..4050de91 100644
--- a/skills/iso-13485-certification/references/gap-analysis-checklist.md
+++ b/skills/iso-13485-certification/references/gap-analysis-checklist.md
@@ -1,568 +1,250 @@
-# ISO 13485:2016 Gap Analysis Checklist
-
-This comprehensive checklist helps identify gaps between your current Quality Management System and ISO 13485:2016 requirements.
-
-## How to Use This Checklist
-
-**Status Indicators:**
-- ✅ **Compliant:** Requirement fully implemented and documented
-- ⚠️ **Partial:** Requirement partially implemented, needs improvement
-- ❌ **Non-compliant:** Requirement not implemented or documented
-- N/A **Not Applicable:** Requirement doesn't apply (must be justified)
-
-**For Each Item:**
-1. Assess current status
-2. Identify existing documentation
-3. Note gaps or deficiencies
-4. Prioritize actions needed
-5. Assign responsibility and target dates
-
----
-
-## Clause 4: Quality Management System
-
-### 4.1 General Requirements
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 4.1.1 | QMS established, documented, implemented, and maintained | | | | |
-| 4.1.2 | QMS processes identified with sequence and interaction | | | | |
-| 4.1.3 | Outsourced processes controlled and documented | | | | |
-| 4.1.4 | QMS requirements and applicable regulatory requirements met | | | | |
-| 4.1.5 | Risk management requirements documented and maintained | | | | |
-| 4.1.6 | Computer software applications validated before use | | | | |
-
-### 4.2 Documentation Requirements
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 4.2.1 | QMS documentation includes policy, manual, procedures, records | | | | |
-| 4.2.2 | Quality Manual established with required content | | | | |
-| 4.2.2.a | Scope of QMS with justified exclusions | | | | |
-| 4.2.2.b | Documented procedures or references | | | | |
-| 4.2.2.c | Description of process interactions | | | | |
-| 4.2.2.d | Structure of documentation described | | | | |
-| 4.2.3 | Medical Device File established for each device type/family | | | | |
-| 4.2.3.a | General description and intended use documented | | | | |
-| 4.2.3.b | Label and IFU specifications | | | | |
-| 4.2.3.c | Product specifications | | | | |
-| 4.2.3.d | Manufacturing specifications | | | | |
-| 4.2.3.e | Purchasing, manufacturing, servicing procedures | | | | |
-| 4.2.3.f | Measurement and monitoring procedures | | | | |
-| 4.2.3.g | Installation requirements (if applicable) | | | | |
-| 4.2.3.h | Risk management file(s) | | | | |
-| 4.2.3.i | Verification and validation information | | | | |
-| 4.2.3.j | Design and development file(s) when applicable | | | | |
-| 4.2.4 | Control of Documents procedure established | | | | |
-| 4.2.4.a | Documents approved before issue | | | | |
-| 4.2.4.b | Documents reviewed, updated, and re-approved | | | | |
-| 4.2.4.c | Changes and current revision status identified | | | | |
-| 4.2.4.d | Relevant versions available at point of use | | | | |
-| 4.2.4.e | Documents remain legible and identifiable | | | | |
-| 4.2.4.f | External documents controlled | | | | |
-| 4.2.4.g | Obsolete documents prevented from unintended use | | | | |
-| 4.2.4.h | Obsolete documents identified if retained | | | | |
-| 4.2.5 | Control of Records procedure established | | | | |
-| 4.2.5.a | Records remain legible, identifiable, and retrievable | | | | |
-| 4.2.5.b | Changes to records remain identifiable | | | | |
-| 4.2.5.c | Retention time at least device lifetime | | | | |
-| 4.2.5.d | Storage, security, integrity, retrieval, disposition defined | | | | |
-
----
-
-## Clause 5: Management Responsibility
-
-### 5.1 Management Commitment
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 5.1.a | Importance of meeting requirements communicated | | | | |
-| 5.1.b | Quality policy established | | | | |
-| 5.1.c | Quality objectives established | | | | |
-| 5.1.d | Management reviews conducted | | | | |
-| 5.1.e | Resource availability ensured | | | | |
-
-### 5.2 Customer Focus
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 5.2 | Customer and regulatory requirements determined and met | | | | |
-
-### 5.3 Quality Policy
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 5.3.a | Policy appropriate to organization | | | | |
-| 5.3.b | Includes commitment to meet requirements and maintain effectiveness | | | | |
-| 5.3.c | Provides framework for quality objectives | | | | |
-| 5.3.d | Communicated and understood within organization | | | | |
-| 5.3.e | Reviewed for continuing suitability | | | | |
-
-### 5.4 Planning
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 5.4.1 | Quality objectives established at relevant functions/levels | | | | |
-| 5.4.1 | Objectives measurable and consistent with policy | | | | |
-| 5.4.2 | QMS planning meets general requirements and objectives | | | | |
-| 5.4.2 | QMS integrity maintained when changes occur | | | | |
-
-### 5.5 Responsibility, Authority and Communication
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 5.5.1 | Responsibilities and authorities defined and communicated | | | | |
-| 5.5.1 | Roles for QMS management, performance, verification documented | | | | |
-| 5.5.1 | Interrelation of personnel identified | | | | |
-| 5.5.2 | Management representative appointed | | | | |
-| 5.5.2.a | Representative ensures QMS processes established and maintained | | | | |
-| 5.5.2.b | Representative reports to top management on performance | | | | |
-| 5.5.2.c | Representative ensures awareness of requirements | | | | |
-| 5.5.3 | Internal communication processes established | | | | |
-
-### 5.6 Management Review
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 5.6.1 | QMS reviewed at planned intervals (at least annually) | | | | |
-| 5.6.1 | Review ensures suitability, adequacy, effectiveness | | | | |
-| 5.6.1 | Review includes improvement opportunities | | | | |
-| 5.6.1 | Records of reviews maintained | | | | |
-| 5.6.2 | Review includes audit results | | | | |
-| 5.6.2 | Review includes customer feedback | | | | |
-| 5.6.2 | Review includes process performance and product conformity | | | | |
-| 5.6.2 | Review includes status of corrective and preventive actions | | | | |
-| 5.6.2 | Review includes follow-up from previous reviews | | | | |
-| 5.6.2 | Review includes changes affecting QMS | | | | |
-| 5.6.2 | Review includes recommendations for improvement | | | | |
-| 5.6.2 | Review includes new/revised regulatory requirements | | | | |
-| 5.6.3 | Review output includes QMS improvements | | | | |
-| 5.6.3 | Review output includes product improvements | | | | |
-| 5.6.3 | Review output includes resource needs | | | | |
-| 5.6.3 | Review output includes changes to maintain effectiveness | | | | |
-
----
-
-## Clause 6: Resource Management
-
-### 6.1 Provision of Resources
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 6.1 | Resources determined and provided for QMS | | | | |
-| 6.1 | Resources provided to meet regulatory and customer requirements | | | | |
-
-### 6.2 Human Resources
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 6.2 | Personnel competent based on education, training, skills, experience | | | | |
-| 6.2 | Documented evidence of competence maintained | | | | |
-
-### 6.3 Infrastructure
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 6.3 | Infrastructure determined, provided, and maintained | | | | |
-| 6.3.a | Buildings, workspace, and utilities provided | | | | |
-| 6.3.b | Process equipment (hardware and software) provided | | | | |
-| 6.3.c | Supporting services provided | | | | |
-| 6.3 | Maintenance requirements documented (when affecting quality) | | | | |
-| 6.3 | Maintenance activity records maintained | | | | |
-
-### 6.4 Work Environment and Contamination Control
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 6.4.1 | Work environment determined and managed | | | | |
-| 6.4.1 | Work environment requirements documented | | | | |
-| 6.4.2 | Contamination control requirements documented (if applicable) | | | | |
-| 6.4.2 | Special arrangements for contaminated product established | | | | |
-
----
-
-## Clause 7: Product Realization
-
-### 7.1 Planning of Product Realization
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 7.1.a | Quality objectives and requirements determined | | | | |
-| 7.1.b | Need for processes, documentation, and resources determined | | | | |
-| 7.1.c | Verification, validation, monitoring, measurement activities determined | | | | |
-| 7.1.c | Handling, storage, distribution, traceability determined | | | | |
-| 7.1.d | Records to provide evidence of conformity determined | | | | |
-| 7.1 | Risk management requirements documented | | | | |
-| 7.1 | Risk management records maintained | | | | |
-
-### 7.2 Customer-Related Processes
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 7.2.1.a | Requirements specified by customer determined | | | | |
-| 7.2.1.b | Requirements not stated but necessary determined | | | | |
-| 7.2.1.c | Applicable regulatory requirements determined | | | | |
-| 7.2.1.d | Additional requirements determined by organization | | | | |
-| 7.2.2 | Product requirements reviewed before commitment | | | | |
-| 7.2.2 | Requirements defined and documented | | | | |
-| 7.2.2 | Differences resolved | | | | |
-| 7.2.2 | Ability to meet requirements ensured | | | | |
-| 7.2.2 | Records of review and follow-up maintained | | | | |
-| 7.2.3 | Arrangements for communication with customers documented | | | | |
-| 7.2.3.a | Communication on product information | | | | |
-| 7.2.3.b | Communication on inquiry, contract, order handling | | | | |
-| 7.2.3.c | Communication on customer feedback including complaints | | | | |
-| 7.2.3.d | Communication on advisory notices | | | | |
-
-### 7.3 Design and Development
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 7.3.1 | Design and development procedures documented | | | | |
-| 7.3.1 | Design and development plan documented for each device | | | | |
-| 7.3.1 | Design and development files maintained | | | | |
-| 7.3.2 | Design and development stages determined | | | | |
-| 7.3.2 | Required review, verification, validation determined | | | | |
-| 7.3.2 | Responsibilities and authorities defined | | | | |
-| 7.3.2 | Resources and interfaces managed | | | | |
-| 7.3.2 | Plans updated as design progresses | | | | |
-| 7.3.3 | Design inputs determined and recorded | | | | |
-| 7.3.3 | Functional, performance, usability, safety requirements included | | | | |
-| 7.3.3 | Regulatory requirements and standards included | | | | |
-| 7.3.3 | Risk management outputs included | | | | |
-| 7.3.3 | Previous similar design information included | | | | |
-| 7.3.3 | Inputs reviewed for adequacy | | | | |
-| 7.3.4 | Design outputs meet input requirements | | | | |
-| 7.3.4 | Outputs provide information for purchasing, production, service | | | | |
-| 7.3.4 | Outputs contain acceptance criteria | | | | |
-| 7.3.4 | Outputs specify characteristics for safe and proper use | | | | |
-| 7.3.4 | Outputs documented and maintained as records | | | | |
-| 7.3.5 | Systematic reviews conducted at suitable stages | | | | |
-| 7.3.5 | Review evaluates ability to meet requirements | | | | |
-| 7.3.5 | Review identifies problems and proposes actions | | | | |
-| 7.3.5 | Representatives of functions concerned included | | | | |
-| 7.3.5 | Records of reviews and follow-up maintained | | | | |
-| 7.3.6 | Verification performed per planned arrangements | | | | |
-| 7.3.6 | Verification ensures outputs meet inputs | | | | |
-| 7.3.6 | Records of verification and follow-up maintained | | | | |
-| 7.3.7 | Validation performed per planned arrangements | | | | |
-| 7.3.7 | Validation ensures product meets specified application | | | | |
-| 7.3.7 | Validation conducted before delivery or implementation | | | | |
-| 7.3.7 | Validation includes defined operating conditions | | | | |
-| 7.3.7 | Records of validation and follow-up maintained | | | | |
-| 7.3.8 | Transfer procedures documented | | | | |
-| 7.3.8 | Manufacturing output verified against design output | | | | |
-| 7.3.8 | Specifications appropriate for manufacturing | | | | |
-| 7.3.8 | Transfer records maintained | | | | |
-| 7.3.9 | Design changes identified, documented, and controlled | | | | |
-| 7.3.9 | Changes reviewed, verified, validated, and approved | | | | |
-| 7.3.9 | Effects on constituent parts and delivered product evaluated | | | | |
-| 7.3.9 | Records of changes and review maintained | | | | |
-| 7.3.10 | Design and development files maintained including all required content | | | | |
-
-### 7.4 Purchasing
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 7.4.1 | Purchased product conforms to purchase information | | | | |
-| 7.4.1 | Purchasing activities documented | | | | |
-| 7.4.1 | Criteria for supplier evaluation and selection established | | | | |
-| 7.4.1 | Criteria based on supplier ability to supply per requirements | | | | |
-| 7.4.1 | Supplier performance monitored | | | | |
-| 7.4.1 | Records of supplier evaluations and follow-up maintained | | | | |
-| 7.4.1 | Process for notifying suppliers of changes established | | | | |
-| 7.4.2 | Purchasing information includes product approval requirements | | | | |
-| 7.4.2 | Purchasing information includes qualification of personnel | | | | |
-| 7.4.2 | Purchasing information includes QMS requirements | | | | |
-| 7.4.2 | Purchasing information includes notification requirements | | | | |
-| 7.4.2 | Purchasing information includes supplier change notification | | | | |
-| 7.4.2 | Purchasing information communicated to sub-tier suppliers | | | | |
-| 7.4.3 | Verification activities to ensure purchased product conformity | | | | |
-| 7.4.3 | Extent of verification documented | | | | |
-| 7.4.3 | Verification at supplier's premises documented (if applicable) | | | | |
-
-### 7.5 Production and Service Provision
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 7.5.1.a | Documented procedures and work instructions available | | | | |
-| 7.5.1.b | Suitable infrastructure and work environment available | | | | |
-| 7.5.1.c | Monitoring and measuring equipment available | | | | |
-| 7.5.1.d | Monitoring and measuring activities available and used | | | | |
-| 7.5.1.e | Product release, delivery, post-delivery activities implemented | | | | |
-| 7.5.1.f | Operations for labelling and packaging defined | | | | |
-| 7.5.1.g | Procedures for servicing documented (if applicable) | | | | |
-| 7.5.1 | Requirements for product cleanliness documented | | | | |
-| 7.5.1 | Requirements for installation and verification documented | | | | |
-| 7.5.2 | Cleanliness requirements documented (if applicable) | | | | |
-| 7.5.2 | Hygiene requirements in manufacturing documented | | | | |
-| 7.5.3 | Installation requirements documented (if applicable) | | | | |
-| 7.5.3 | Verification of installation conducted | | | | |
-| 7.5.3 | Records of installation and verification maintained | | | | |
-| 7.5.4 | Servicing procedures documented (if applicable) | | | | |
-| 7.5.4 | Servicing records analyzed for feedback | | | | |
-| 7.5.4 | Records of servicing maintained | | | | |
-| 7.5.5 | Records of sterilization process parameters maintained (if applicable) | | | | |
-| 7.5.6 | Processes validated where output cannot be verified | | | | |
-| 7.5.6 | Defined criteria for review and approval | | | | |
-| 7.5.6 | Equipment approval and personnel qualification | | | | |
-| 7.5.6 | Specific methods, procedures, and acceptance criteria used | | | | |
-| 7.5.6 | Requirements for records defined | | | | |
-| 7.5.6 | Revalidation criteria defined | | | | |
-| 7.5.6 | Software validation for production documented | | | | |
-| 7.5.6 | Sterilization process validation documented (if applicable) | | | | |
-| 7.5.6 | Aseptic processing validation documented (if applicable) | | | | |
-| 7.5.6 | Clean room validation documented (if applicable) | | | | |
-| 7.5.7 | Sterilization process validation records maintained (if applicable) | | | | |
-| 7.5.7 | Sterile barrier system validation records maintained (if applicable) | | | | |
-| 7.5.8 | Product identification procedures documented | | | | |
-| 7.5.8 | Product identified by suitable means throughout realization | | | | |
-| 7.5.8 | Records of identification maintained where traceability required | | | | |
-| 7.5.9.1 | Traceability extent defined and documented | | | | |
-| 7.5.9.1 | Distribution and location documented | | | | |
-| 7.5.9.2 | Consignee name and address recorded | | | | |
-| 7.5.9.2 | Quantity shipped recorded | | | | |
-| 7.5.9.2 | Regulatory traceability requirements included | | | | |
-| 7.5.9.2 | Traceability records maintained for defined period | | | | |
-| 7.5.10 | Customer property identified, verified, protected (if applicable) | | | | |
-| 7.5.10 | Loss, damage, unsuitability reported to customer | | | | |
-| 7.5.10 | Records of customer property maintained | | | | |
-| 7.5.11 | Product preservation during processing and delivery | | | | |
-| 7.5.11 | Identification, handling, packaging, storage, protection included | | | | |
-| 7.5.11 | Preservation applies to constituent parts | | | | |
-| 7.5.11 | Special handling requirements documented (if applicable) | | | | |
-
-### 7.6 Control of Monitoring and Measuring Equipment
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 7.6 | Monitoring and measurement to be undertaken determined | | | | |
-| 7.6 | Monitoring and measuring equipment needed determined | | | | |
-| 7.6.a | Calibration or verification at specified intervals | | | | |
-| 7.6.b | Adjustment or re-adjustment as necessary | | | | |
-| 7.6.c | Identification to determine calibration status | | | | |
-| 7.6.d | Safeguarding from adjustments invalidating calibration | | | | |
-| 7.6.e | Protection from damage and deterioration | | | | |
-| 7.6 | Validity of previous results assessed when non-conforming | | | | |
-| 7.6 | Records of calibration and verification maintained | | | | |
-| 7.6 | Computer software confirmed for intended application | | | | |
-| 7.6 | Software confirmation before initial use and reconfirmation | | | | |
-
----
-
-## Clause 8: Measurement, Analysis and Improvement
-
-### 8.1 General
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 8.1 | Monitoring, measurement, analysis, improvement processes planned | | | | |
-| 8.1 | Product conformity demonstrated | | | | |
-| 8.1 | QMS conformity ensured | | | | |
-| 8.1 | QMS effectiveness maintained | | | | |
-| 8.1 | Applicable methods including statistical techniques determined | | | | |
-
-### 8.2 Monitoring and Measurement
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 8.2.1 | Feedback procedure established | | | | |
-| 8.2.1 | Early warning system for quality issues established | | | | |
-| 8.2.1 | Post-production information collected | | | | |
-| 8.2.1 | Requirements for regulatory reporting included | | | | |
-| 8.2.1 | Feedback used as input to risk management | | | | |
-| 8.2.1 | Feedback used as input to corrective/preventive action | | | | |
-| 8.2.2 | Complaint handling procedure established | | | | |
-| 8.2.2 | Requirements for receiving, recording, evaluating complaints | | | | |
-| 8.2.2 | Requirements for handling, investigating complaints | | | | |
-| 8.2.2 | Requirements for reporting to regulatory authorities | | | | |
-| 8.2.2 | Requirements for informing customer of actions | | | | |
-| 8.2.2 | Complaint information transferred to organization | | | | |
-| 8.2.2 | Records of complaints and investigations maintained | | | | |
-| 8.2.3 | Regulatory reporting procedure established | | | | |
-| 8.2.3 | Notification to regulatory authorities per requirements | | | | |
-| 8.2.3 | Advisory notices per applicable requirements | | | | |
-| 8.2.3 | Records of reporting maintained | | | | |
-| 8.2.4 | Internal audits conducted at planned intervals | | | | |
-| 8.2.4 | QMS conformity to ISO 13485 and requirements determined | | | | |
-| 8.2.4 | QMS effective implementation and maintenance determined | | | | |
-| 8.2.4 | Audit program considers importance, changes, previous results | | | | |
-| 8.2.4 | Audit criteria, scope, frequency, methods defined | | | | |
-| 8.2.4 | Audit procedure includes responsibilities and reporting | | | | |
-| 8.2.4 | Objective and impartial auditors selected | | | | |
-| 8.2.4 | Records of audits and results maintained | | | | |
-| 8.2.4 | Need for corrections or corrective actions identified | | | | |
-| 8.2.4 | Follow-up activities conducted | | | | |
-| 8.2.5 | Suitable methods for process monitoring and measurement | | | | |
-| 8.2.5 | Ability to achieve planned results demonstrated | | | | |
-| 8.2.5 | Corrections and corrective actions implemented when needed | | | | |
-| 8.2.5 | Records maintained | | | | |
-| 8.2.6 | Product characteristics monitored and measured | | | | |
-| 8.2.6 | Conducted at appropriate stages per planned arrangements | | | | |
-| 8.2.6 | Records show conformity to acceptance criteria | | | | |
-| 8.2.6 | Authority responsible for release recorded | | | | |
-| 8.2.6 | Release and delivery not proceed until arrangements completed | | | | |
-
-### 8.3 Control of Nonconforming Product
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 8.3.1 | Nonconforming product identified and controlled | | | | |
-| 8.3.1 | Procedure for identification, documentation established | | | | |
-| 8.3.1 | Procedure for evaluation, segregation, disposition established | | | | |
-| 8.3.1 | Procedure for notification to external parties established | | | | |
-| 8.3.1 | Review of nonconforming product conducted | | | | |
-| 8.3.1 | Records of nonconformities and actions maintained | | | | |
-| 8.3.2 | Action taken to eliminate detected nonconformity | | | | |
-| 8.3.2 | Use under concession authorized (if applicable) | | | | |
-| 8.3.2 | Action taken to preclude original intended use | | | | |
-| 8.3.2 | Records of concessions maintained | | | | |
-| 8.3.2 | Authority making concession identified | | | | |
-| 8.3.3 | Appropriate action for nonconformity after delivery | | | | |
-| 8.3.3 | Procedure includes regulatory notification requirements | | | | |
-| 8.3.3 | Records maintained | | | | |
-| 8.3.4 | Rework procedures documented | | | | |
-| 8.3.4 | Potential effects on medical device evaluated | | | | |
-| 8.3.4 | Approval before rework implementation | | | | |
-| 8.3.4 | Records of results and actions maintained | | | | |
-| 8.3.4 | Re-verification after rework | | | | |
-| 8.3.4 | Rework procedure documented before beginning | | | | |
-
-### 8.4 Analysis of Data
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 8.4 | Appropriate data determined, collected, and analyzed | | | | |
-| 8.4 | Continual improvement opportunities evaluated | | | | |
-| 8.4 | Procedures for data analysis established | | | | |
-| 8.4.a | Analysis provides information on customer satisfaction | | | | |
-| 8.4.b | Analysis of conformity to product requirements | | | | |
-| 8.4.c | Analysis of process and product characteristics and trends | | | | |
-| 8.4.d | Analysis of suppliers | | | | |
-| 8.4.e | Analysis of feedback and risk management outputs | | | | |
-| 8.4 | Statistical techniques used if necessary | | | | |
-| 8.4 | Records of analysis results maintained | | | | |
-
-### 8.5 Improvement
-
-| # | Requirement | Status | Evidence | Gaps | Action Required |
-|---|------------|--------|----------|------|-----------------|
-| 8.5.1 | Changes identified and implemented to ensure effectiveness | | | | |
-| 8.5.1 | Quality policy, objectives, audits, data, CAPA, reviews used | | | | |
-| 8.5.2 | Corrective action procedure established | | | | |
-| 8.5.2.a | Nonconformities including complaints reviewed | | | | |
-| 8.5.2.b | Causes of nonconformities determined | | | | |
-| 8.5.2.c | Need for actions to prevent recurrence evaluated | | | | |
-| 8.5.2.d | Actions needed planned, documented, and implemented | | | | |
-| 8.5.2.e | Results of actions documented | | | | |
-| 8.5.2.f | Effectiveness of corrective actions reviewed | | | | |
-| 8.5.2 | Records of investigation and follow-up maintained | | | | |
-| 8.5.3 | Preventive action procedure established | | | | |
-| 8.5.3.a | Potential nonconformities and causes determined | | | | |
-| 8.5.3.b | Need for action to prevent occurrence evaluated | | | | |
-| 8.5.3.c | Actions needed planned, documented, and implemented | | | | |
-| 8.5.3.d | Results of actions documented | | | | |
-| 8.5.3.e | Effectiveness of preventive actions reviewed | | | | |
-| 8.5.3 | Appropriate information sources used | | | | |
-| 8.5.3 | Records of investigation and follow-up maintained | | | | |
-
----
-
-## Summary and Prioritization
-
-### Gap Summary by Clause
-
-| Clause | Total Items | Compliant | Partial | Non-Compliant | N/A | Compliance % |
-|--------|-------------|-----------|---------|---------------|-----|--------------|
-| 4. QMS | | | | | | |
-| 5. Management | | | | | | |
-| 6. Resources | | | | | | |
-| 7. Product Realization | | | | | | |
-| 8. Measurement & Improvement | | | | | | |
-| **TOTAL** | | | | | | |
-
-### Priority Actions
-
-**Critical (Immediate Action Required):**
-1.
-2.
-3.
-
-**High Priority (Within 30 days):**
-1.
-2.
-3.
-
-**Medium Priority (Within 90 days):**
-1.
-2.
-3.
-
-**Low Priority (Within 180 days):**
-1.
-2.
-3.
-
-### Resource Requirements
-
-**Personnel:**
--
--
-
-**Training:**
--
--
-
-**Tools/Systems:**
--
--
-
-**External Support:**
--
--
-
-### Timeline and Milestones
-
-| Milestone | Target Date | Responsible | Status |
-|-----------|-------------|-------------|--------|
-| Gap analysis completion | | | |
-| Priority 1 items complete | | | |
-| Priority 2 items complete | | | |
-| Priority 3 items complete | | | |
-| Internal audit readiness | | | |
-| Certification audit | | | |
-
----
-
-## Notes and Additional Considerations
-
-### Regulatory Requirements
-Document any additional requirements beyond ISO 13485:
-- FDA QMSR requirements
-- EU MDR/IVDR requirements
-- Health Canada requirements
-- Other regional requirements
-
-### Exclusions
-Document and justify any clause exclusions:
-
-| Clause | Exclusion | Justification |
-|--------|-----------|---------------|
-| | | |
-
-### Additional Documentation Needed
-List any additional documents identified during gap analysis:
--
--
-
-### Lessons Learned and Best Practices
--
--
-
----
-
-## Revision History
-
-| Version | Date | Author | Changes |
-|---------|------|--------|---------|
-| 1.0 | | | Initial gap analysis |
+# Fail-Closed QMS Evidence Review
+
+Research basis: **2026-07-23**. This checklist organizes evidence questions; it is
+not ISO text, an audit, a legal determination, or a compliance score.
+
+## Status vocabulary
+
+Use only:
+
+- `not-assessed` — no authorized decision was recorded;
+- `evidence-missing` — applicable/expected evidence was not supplied;
+- `evidence-incomplete` — evidence is draft, unapproved, unsourced, stale, or
+ insufficiently linked;
+- `evidence-present-for-human-review` — controlled evidence is available for
+ substantive review; no adequacy claim;
+- `not-applicable-approved` — an authorized person approved a documented rationale.
+
+Never convert these states into a “compliance percentage.” Unequal, conditional,
+product-specific, and jurisdiction-specific evidence cannot be responsibly reduced
+to keyword counts.
+
+## Required fields for every review item
+
+| Field | Required content |
+|---|---|
+| Item ID | Stable unique identifier |
+| Scope | Products, sites, processes, suppliers, systems, and period |
+| Owner | Accountable role |
+| Status | One value from the vocabulary above |
+| Evidence | Controlled IDs, revisions/dates, and locations |
+| Source/version | Official source, exact edition/version/date, access/currency review |
+| Rationale | Evidence-based conclusion or approved not-applicable rationale |
+| Action | Gap/change/CAPA ID, owner, due date, and status |
+| Approval | Named authorized approver, decision, date, and record ID |
+
+Blank, placeholder, inaccessible, stale, or unapproved fields fail closed.
+
+## Workflow
+
+1. Freeze the review purpose and boundaries: internal audit, ISO certification
+ preparation, FDA inspection preparation, MDSAP, or EU conformity assessment.
+2. Obtain authorized standards and current official regulatory sources.
+3. Record product/site/market/activity scope; route applicability decisions to
+ authorized management, RA/QA, and legal roles.
+4. Build a controlled evidence manifest. Do not classify files from names alone.
+5. Sample implementation records across time, products, sites, shifts, suppliers,
+ and risk as justified.
+6. Trace findings to risk, correction, CAPA, change, validation, training, and
+ management review.
+7. Preserve limitations and unresolved decisions in the report.
+8. Obtain human approval. Do not issue a certification/readiness/compliance claim.
+
+## Scope, roles, and source basis
+
+- [ ] Legal entities, sites, products/families, lifecycle activities, outsourced
+ processes, and markets considered are explicit.
+- [ ] Authorized management representative, RA/QA owner, process owners, document/
+ record owners, delegates, and escalation are documented.
+- [ ] Independence and authority for audit, release, complaint/reportability,
+ nonconformity disposition, CAPA closure, and change approval are defined.
+- [ ] Each applicability or not-applicable decision cites current official
+ source/version evidence and authorized approval.
+- [ ] ISO, FDA, MDSAP, EU, and product-specific criteria are separately identified.
+- [ ] External-source currency reviews and change-impact records are current.
+
+## Document and record control
+
+- [ ] Every controlled document has ID, title, revision, owner, status, approval,
+ effective date, change rationale, controlled location, and training impact.
+- [ ] Point-of-use control prevents unintended use of draft or obsolete documents.
+- [ ] External standards, regulations, guidance, specifications, and customer/
+ supplier documents have exact versions and currency-review ownership.
+- [ ] Record creation, attribution, correction, integrity, security, audit trail,
+ backup/recovery, retrieval, retention, legal hold, and disposition are controlled.
+- [ ] Each retention period has an approved source/version and start-event rationale.
+- [ ] Electronic systems and migrations preserve integrity and retrievability.
+- [ ] Document changes link to affected risk, design, supplier, production,
+ validation/software, postmarket, and training evidence.
+
+## Risk management
+
+- [ ] Product and process risk scope, responsibilities, methods, criteria, reviews,
+ and records are approved.
+- [ ] Intended use, reasonably foreseeable use, hazards/signals, evaluations,
+ controls, verification, residual-risk decisions, and production/postmarket
+ feedback are traceable.
+- [ ] Risk controls link to design inputs/outputs, verification/validation,
+ production controls, labeling/information, and acceptance evidence.
+- [ ] Supplier, software, process, usability, cybersecurity, clinical/performance,
+ and postmarket risks are considered where applicable.
+- [ ] Complaints, trends, vigilance, CAPA, and changes update risk evidence.
+- [ ] ISO 14971 and any EN A11 source are identified by exact edition and role.
+
+## Design and development
+
+- [ ] Authorized applicability decision covers the actual legal/lifecycle role.
+- [ ] Plans define stages, responsibilities, interfaces, reviews, resources,
+ verification, validation, transfer, and change controls.
+- [ ] Inputs are approved, testable, traceable, and linked to risk and
+ product/regulatory requirements.
+- [ ] Outputs support production, suppliers, acceptance, service, labeling, and safe
+ use as applicable.
+- [ ] Reviews preserve participants, independence/competence, issues, decisions, and
+ follow-up evidence.
+- [ ] Verification and validation have approved protocols, objective criteria,
+ representative configurations/samples, deviations, results, and approvals.
+- [ ] Transfer and design changes include risk, validation, production, supplier,
+ software, training, product-file, and postmarket impact evidence.
+
+## Supplier and outsourced-process controls
+
+- [ ] Supplier/product/process criticality has an approved risk basis.
+- [ ] Selection, qualification, approval, and scope are evidenced.
+- [ ] Purchasing information defines requirements, acceptance, records, change
+ notification, and sub-tier flow-down as applicable.
+- [ ] Incoming/acceptance verification is risk-based and linked to supplier
+ performance.
+- [ ] Quality agreements assign responsibilities for critical/outsourced processes.
+- [ ] Monitoring, re-evaluation, audits, nonconformity, SCAR/CAPA, effectiveness,
+ escalation, and disqualification are controlled.
+- [ ] Supplier changes route through product/process risk, validation, and change
+ control before acceptance.
+
+## Production, service, validation, and software
+
+- [ ] Infrastructure, maintenance, environment, contamination/cleanliness,
+ personnel, instructions, and process parameters are controlled as applicable.
+- [ ] Materials/components, equipment, software, methods, labeling/packaging,
+ acceptance, release, preservation, distribution, installation, and service
+ records are traceable.
+- [ ] Processes whose output needs validation have approved protocols, acceptance
+ criteria, qualified resources, deviations, results, revalidation triggers, and
+ change approval.
+- [ ] Monitoring/measurement equipment has identification, status, traceability,
+ calibration/verification, maintenance, out-of-tolerance impact, and records.
+- [ ] QMS and production software has intended use, risk, requirements,
+ configuration, access/data-integrity controls, validation, release, incident,
+ backup/recovery, supplier, and change/revalidation evidence.
+- [ ] Product release is performed by authorized personnel against approved criteria.
+
+## Identification and traceability
+
+- [ ] Approved scope defines the needed extent for each product and jurisdiction.
+- [ ] Material/component, lot/serial/UDI, process, acceptance/release, distribution,
+ installation, and service evidence is linked as applicable.
+- [ ] Traceability supports complaint, investigation, correction/removal, vigilance,
+ field action, and CAPA decisions.
+- [ ] Record retention and retrieval preserve traceability for the approved period.
+
+## Complaints, feedback, postmarket, and vigilance
+
+- [ ] Intake captures source, device, event, dates, reporter, and potential safety/
+ performance issue without losing original information.
+- [ ] Evaluation and investigation have owners, rationale, evidence, product/risk
+ impact, and approved conclusions.
+- [ ] Authorized roles make jurisdiction-specific reportability/vigilance and field-
+ action decisions within controlled workflows.
+- [ ] Trends and postmarket plans/reports use defined data sources, methods, review
+ intervals, thresholds, limitations, and actions.
+- [ ] Feedback links to risk, design, suppliers, production, labeling, validation,
+ CAPA, and management review.
+- [ ] MDR/IVDR work considers current MDCG PMS/vigilance guidance as nonbinding
+ guidance with exact document/revision/date.
+
+## Nonconformity and CAPA
+
+- [ ] Nonconforming outputs are identified, controlled, evaluated, segregated where
+ appropriate, dispositioned by authorized roles, and reverified after rework.
+- [ ] Correction/containment, concession, post-delivery action, regulatory review,
+ and affected-party communication are evidenced.
+- [ ] CAPA intake defines source, factual problem, scope, risk/reportability review,
+ and decision rationale.
+- [ ] Investigation evidence supports the root cause or justified conclusion and
+ systemic-extent review.
+- [ ] Actions address the supported cause/risk and link to change, validation,
+ training, supplier, product, and postmarket controls.
+- [ ] Effectiveness plans define objective criteria, baseline, sample/window, timing,
+ independent reviewer, evidence, and approval.
+- [ ] Pending, insufficient, or ineffective evidence blocks closure.
+
+## Internal audit and management review
+
+- [ ] Audit program is risk-based and covers applicable processes, sites, products,
+ shifts/time, prior findings, and changes over a justified cycle.
+- [ ] Audit plans define criteria, scope, sampling, methods, competence, and
+ independence.
+- [ ] Reports separate evidence, findings, corrections, CAPA decisions, owners,
+ dates, and effectiveness follow-up.
+- [ ] Management review inputs are controlled and complete for the approved agenda.
+- [ ] Outputs record decisions, resources, changes, actions, owners, due dates, and
+ follow-up.
+- [ ] FDA inspection preparation accounts for current access to management, internal-
+ audit, and supplier-audit records under QMSR.
+
+## Training, competence, and change control
+
+- [ ] Roles have competence criteria and objective evidence of education, training,
+ skills, experience, and authorization.
+- [ ] Training is completed and effectiveness assessed before independent work or
+ document effective use, as risk justifies.
+- [ ] Changes identify source/version, reason, affected scope, risk, product,
+ validation/software, supplier, production, document/record, training,
+ postmarket, and regulatory/certification impacts.
+- [ ] Changes have implementation plans, approvals, rollback/contingency where
+ needed, verification, and closure evidence.
+
+## Current QMSR transition evidence
+
+As of this research date, QMSR is effective and FDA uses Compliance Program
+7382.850. Review:
+
+- [ ] current eCFR and incorporated-edition source basis;
+- [ ] FDA supplemental provisions and linked current regulations;
+- [ ] disposition of obsolete QSR/QSIT references;
+- [ ] pre-2026-02-02 QMS record evidence;
+- [ ] inspection-accessible management, quality-audit, and supplier-audit records;
+- [ ] complaint/servicing records and labeling/packaging controls;
+- [ ] updated inspection-process training;
+- [ ] supplier, software-validation, and change-control evidence; and
+- [ ] removal of claims that ISO certification establishes FDA compliance or an
+ inspection exemption.
+
+Use `scripts/check_qmsr_transition.py`; do not create a legacy-QSR clause map as the
+current control framework.
+
+## Regime handoff
+
+Before final review, state which authorized party owns the next decision:
+
+- ISO certification body for certification audit/certificate decisions;
+- FDA for inspection and enforcement decisions;
+- MDSAP-recognized Auditing Organization and participating authorities for MDSAP;
+- designated MDR/IVDR notified body and competent authorities for applicable EU
+ conformity-assessment/regulatory decisions;
+- authorized management, RA/QA, legal, and product specialists for organizational
+ decisions.
+
+## Deterministic tooling
+
+- `validate_scope_intake.py` — accountable scope/applicability decisions
+- `audit_document_records.py` — document, record, retention, and source register
+- `check_capa.py` — CAPA/effectiveness closure gates
+- `check_traceability.py` — risk/design/production/postmarket links
+- `check_qmsr_transition.py` — current post-effective-date QMSR evidence
+- `validate_evidence_manifest.py` — bounded local readiness manifest
+- `check_supplier_controls.py` — risk-based supplier evidence
+- `gap_analyzer.py` — domain coverage without keyword or percentage scoring
+
+All tools are local JSON/Markdown structural checks. Exit 0 means only that no
+structural finding was generated for the supplied data.
diff --git a/skills/iso-13485-certification/references/iso-13485-requirements.md b/skills/iso-13485-certification/references/iso-13485-requirements.md
index 8e45a191..c267c317 100644
--- a/skills/iso-13485-certification/references/iso-13485-requirements.md
+++ b/skills/iso-13485-certification/references/iso-13485-requirements.md
@@ -1,610 +1,232 @@
-# ISO 13485:2016 Requirements Breakdown
-
-This document provides a comprehensive breakdown of ISO 13485:2016 requirements for medical device Quality Management Systems (QMS).
-
-## Table of Contents
-
-1. [Clause 4: Quality Management System](#clause-4-quality-management-system)
-2. [Clause 5: Management Responsibility](#clause-5-management-responsibility)
-3. [Clause 6: Resource Management](#clause-6-resource-management)
-4. [Clause 7: Product Realization](#clause-7-product-realization)
-5. [Clause 8: Measurement, Analysis and Improvement](#clause-8-measurement-analysis-and-improvement)
-
-## Clause 4: Quality Management System
-
-### 4.1 General Requirements
-
-#### 4.1.1 QMS Requirements
-- Establish, document, implement, and maintain a QMS
-- Maintain its effectiveness in accordance with ISO 13485
-- Document the QMS processes and their interactions
-
-#### 4.1.2 Process Approach
-- Identify processes needed for the QMS
-- Determine sequence and interaction of these processes
-- Determine criteria and methods for effective operation and control
-- Ensure availability of resources and information
-- Monitor, measure, and analyze processes
-- Implement actions to achieve planned results and maintain effectiveness
-
-#### 4.1.3 Outsourced Processes
-- Control any QMS process that is outsourced
-- Ensure control is documented in the QMS
-- Outsourcing does not relieve the organization of responsibility
-
-#### 4.1.4 General QMS Requirements
-- Establish, document, implement, and maintain QMS requirements per ISO 13485
-- Include requirements for medical devices and applicable regulatory requirements
-- Establish documented procedures for QMS activities
-
-#### 4.1.5 Risk Management
-- Establish documented requirements for risk management in product realization
-- Maintain risk management records
-- Ensure risk management is conducted according to documented requirements
-
-#### 4.1.6 Software Validation
-- Validate computer software applications used in QMS
-- Validation must be conducted prior to initial use and after changes
-- Establish documented approach including:
- - Risk associated with the software application
- - Validation activities
- - Acceptance criteria
- - User responsibilities
- - Validation records
-
-### 4.2 Documentation Requirements
-
-#### 4.2.1 General Documentation
-QMS documentation must include:
-- Quality policy and quality objectives
-- Quality manual
-- Documented procedures and records required by ISO 13485
-- Documents required by organization for effective processes
-- Records required by ISO 13485
-- Medical device files as required by applicable regulatory requirements
-
-#### 4.2.2 Quality Manual
-Establish and maintain a quality manual that includes:
-- Scope of the QMS with details and justification for exclusions
-- Documented procedures or reference to them
-- Description of interaction between QMS processes
-- Structure of documentation used in the QMS
-
-#### 4.2.3 Medical Device File
-Establish and maintain a medical device file for each type or family that includes:
-- General description, intended use/purpose
-- Label and instructions for use specifications
-- Specifications for product and/or manufacturing
-- Specifications for procedures for purchasing, manufacturing, servicing
-- Procedures for measuring and monitoring
-- Installation requirements (if applicable)
-- Risk management file(s)
-- Verification and validation information
-- Design and development file(s) when applicable
-
-#### 4.2.4 Control of Documents
-Establish documented procedure to:
-- Approve documents before issue
-- Review, update, and re-approve documents
-- Ensure changes and current revision status are identified
-- Ensure relevant versions are available at points of use
-- Ensure documents remain legible and readily identifiable
-- Control distribution of documents
-- Prevent unintended use of obsolete documents
-- Apply suitable identification if retained for any purpose
-
-Document changes must:
-- Be reviewed and approved by original function unless otherwise designated
-- Have access to pertinent background information
-- Be identified in the document or appropriate attachments
-
-#### 4.2.5 Control of Records
-Establish documented procedure for:
-- Identification, storage, security, integrity, retrieval, retention time, and disposition
-- Records must remain legible, readily identifiable, and retrievable
-- Changes to records must remain identifiable
-- Retention time must be at least the lifetime of the medical device
-- Records may be stored on any media but must remain retrievable
-
-## Clause 5: Management Responsibility
-
-### 5.1 Management Commitment
-Top management must provide evidence of commitment by:
-- Communicating importance of meeting regulatory and customer requirements
-- Establishing quality policy
-- Establishing quality objectives
-- Conducting management reviews
-- Ensuring availability of resources
-
-### 5.2 Customer Focus
-- Determine customer requirements and regulatory requirements
-- Ensure customer requirements are met to enhance satisfaction
-- Maintain documented requirements related to the medical device
-
-### 5.3 Quality Policy
-- Appropriate to the organization
-- Includes commitment to meet requirements and maintain QMS effectiveness
-- Provides framework for quality objectives
-- Communicated and understood within organization
-- Reviewed for continuing suitability
-
-### 5.4 Planning
-
-#### 5.4.1 Quality Objectives
-- Establish quality objectives at relevant functions and levels
-- Must be measurable and consistent with quality policy
-- Objectives must support conformity to product requirements
-
-#### 5.4.2 QMS Planning
-- Plan to meet general requirements and quality objectives
-- Maintain QMS integrity when changes are planned and implemented
-- Document planning
-
-### 5.5 Responsibility, Authority and Communication
-
-#### 5.5.1 Responsibility and Authority
-- Define and communicate responsibilities and authorities
-- Document roles that manage, perform, verify QMS work
-- Identify interrelation of all personnel
-
-#### 5.5.2 Management Representative
-Appoint a member of management who:
-- Ensures QMS processes are established, implemented, and maintained
-- Reports to top management on QMS performance and improvement needs
-- Ensures promotion of awareness of regulatory and customer requirements
-
-#### 5.5.3 Internal Communication
-- Ensure communication processes are established
-- Ensure communication occurs regarding QMS effectiveness
-
-### 5.6 Management Review
-
-#### 5.6.1 General
-- Review QMS at planned intervals (at least annually)
-- Review to ensure continuing suitability, adequacy, and effectiveness
-- Include assessment of opportunities for improvement
-- Maintain records of management reviews
-
-#### 5.6.2 Review Input
-Include:
-- Results of audits
-- Customer feedback
-- Process performance and product conformity
-- Status of preventive and corrective actions
-- Follow-up actions from previous reviews
-- Changes affecting QMS
-- Recommendations for improvement
-- Applicable new or revised regulatory requirements
-
-#### 5.6.3 Review Output
-Include decisions and actions related to:
-- Improvements to QMS effectiveness and processes
-- Product improvements related to customer requirements
-- Resource needs
-- Changes necessary to maintain QMS effectiveness
-
-## Clause 6: Resource Management
-
-### 6.1 Provision of Resources
-Determine and provide resources needed to:
-- Implement and maintain QMS and its effectiveness
-- Meet regulatory and customer requirements
-
-### 6.2 Human Resources
-
-#### 6.2 General
-Personnel performing work affecting product quality must be competent based on:
-- Education, training, skills, and experience
-- Documented evidence of competence
-
-#### 6.3 Infrastructure
-Determine, provide, and maintain infrastructure including:
-- Buildings, workspace, and associated utilities
-- Process equipment (hardware and software)
-- Supporting services
-
-Infrastructure maintenance requirements:
-- Document requirements including maintenance activities
-- Document requirements when maintenance can affect product quality
-- Maintain records of maintenance activities
-
-### 6.4 Work Environment and Contamination Control
-
-#### 6.4.1 Work Environment
-- Determine and manage work environment needed for product conformity
-- Document requirements for work environment
-- Document requirements if work environment can adversely affect product quality
-
-#### 6.4.2 Contamination Control
-- When applicable to medical device, document requirements for control of contaminated or potentially contaminated product
-- Establish special arrangements for control of contaminated product
-
-## Clause 7: Product Realization
-
-### 7.1 Planning of Product Realization
-Plan and develop processes needed for product realization including:
-- Quality objectives and requirements for the product
-- Need to establish processes, documentation, and resources
-- Required verification, validation, monitoring, measurement, inspection, handling, storage, distribution, and traceability
-- Records to provide evidence of conformity
-
-Risk management requirements:
-- Establish documented requirements for risk management throughout product realization
-- Maintain risk management records
-
-### 7.2 Customer-Related Processes
-
-#### 7.2.1 Determination of Requirements
-Determine:
-- Requirements specified by customer including delivery and post-delivery
-- Requirements not stated but necessary for specified or intended use
-- Applicable regulatory requirements
-- Any additional requirements determined by organization
-
-#### 7.2.2 Review of Requirements
-- Review product requirements before commitment
-- Ensure requirements are defined and documented
-- Ensure differences are resolved
-- Ensure ability to meet requirements
-- Maintain records of review results and follow-up actions
-
-#### 7.2.3 Communication
-Establish and document effective arrangements for communication with customers concerning:
-- Product information
-- Inquiry, contract or order handling, amendments
-- Customer feedback including complaints
-- Advisory notices
-
-### 7.3 Design and Development
-
-#### 7.3.1 General
-- Establish, document, and maintain design and development procedures
-- Document design and development plan for each medical device
-- Maintain design and development files
-
-#### 7.3.2 Design and Development Planning
-Plan and control design and development including:
-- Stages of design and development
-- Required review, verification, and validation activities
-- Responsibilities and authorities
-- Resources and interfaces
-- Update plans as design progresses
-- Document plans
-
-#### 7.3.3 Design and Development Inputs
-- Determine inputs relating to product requirements
-- Include functional, performance, usability, and safety requirements
-- Include applicable regulatory requirements and standards
-- Include applicable outputs of risk management
-- Include appropriate information from previous similar designs
-- Review inputs for adequacy and completeness
-- Resolve incomplete, ambiguous, or conflicting requirements
-- Maintain records
-
-#### 7.3.4 Design and Development Outputs
-Provide outputs that:
-- Meet design input requirements
-- Provide appropriate information for purchasing, production, and service
-- Contain or reference product acceptance criteria
-- Specify characteristics essential for safe and proper use
-- Document outputs and maintain as records
-
-#### 7.3.5 Design and Development Review
-- Conduct systematic reviews at suitable stages
-- Evaluate ability to meet requirements
-- Identify problems and propose actions
-- Include representatives of functions concerned
-- Maintain records including results and follow-up actions
-
-#### 7.3.6 Design and Development Verification
-- Perform verification per planned arrangements
-- Ensure outputs meet input requirements
-- Maintain records of verification results and follow-up actions
-
-#### 7.3.7 Design and Development Validation
-- Perform validation per planned arrangements
-- Ensure product meets specified application or intended use
-- Conduct validation before delivery or implementation
-- Include validation under defined operating conditions
-- Maintain records of validation results and follow-up actions
-
-#### 7.3.8 Design and Development Transfer
-- Document procedures for transfer to manufacturing
-- Verify manufacturing output meets design output
-- Ensure specification for materials, production, QC, servicing are appropriate
-- Maintain records
-
-#### 7.3.9 Control of Design and Development Changes
-- Identify, document, and control changes
-- Review, verify, validate, and approve changes before implementation
-- Evaluate effects on constituent parts, in-process product, and delivered product
-- Maintain records of changes, review results, and follow-up actions
-
-#### 7.3.10 Design and Development Files
-Establish and maintain design and development files for each type or family including:
-- Design and development plan
-- Design inputs
-- Design outputs
-- Design review, verification, validation records
-- Design change records
-- Risk management file
-
-### 7.4 Purchasing
-
-#### 7.4.1 Purchasing Process
-- Ensure purchased product conforms to purchase information
-- Establish documented processes for purchasing activities
-- Establish criteria for evaluation and selection of suppliers
-- Base criteria on ability to supply per organization's requirements
-- Monitor supplier performance
-- Maintain records of evaluations and follow-up actions
-- Establish process for notifying suppliers of changed product requirements
-
-#### 7.4.2 Purchasing Information
-Purchasing information must include:
-- Requirements for approval of product, procedures, processes, equipment
-- Requirements for qualification of personnel
-- Quality management system requirements
-- Requirements for notification to organization of nonconforming product
-- Agreement that suppliers provide notification of changes to purchased product
-- Agreement that purchase information be communicated to sub-tier suppliers
-
-#### 7.4.3 Verification of Purchased Product
-- Establish and implement inspection or other activities to ensure conformity
-- Document extent of verification
-- Verify at supplier's premises when customer intends to perform verification at supplier
-- Document verification arrangements and method of product release
-
-### 7.5 Production and Service Provision
-
-#### 7.5.1 Control of Production and Service Provision
-Plan and carry out production under controlled conditions including:
-- Availability of documented procedures and work instructions
-- Availability of suitable infrastructure and work environment
-- Availability of monitoring and measuring equipment
-- Availability and use of suitable monitoring and measuring activities
-- Implementation of product release, delivery, and post-delivery activities
-- Implementation of defined operations for labelling and packaging
-- Procedures for servicing if applicable
-
-Document requirements for:
-- Control of product cleanliness if applicable
-- Control during installation and verification if applicable
-
-#### 7.5.2 Cleanliness of Product
-Document requirements if:
-- Product is cleaned per specified requirements before sterilization and/or use
-- Product cannot be cleaned before sterilization
-- Product is supplied non-sterile to be cleaned and then sterilized
-
-Establish requirements for product hygiene in manufacturing, handling, and storage.
-
-#### 7.5.3 Installation Activities
-If applicable:
-- Document requirements for installation and verification
-- Maintain records of installation and verification
-
-#### 7.5.4 Servicing Activities
-If servicing is specified requirement:
-- Establish documented procedures, reference materials, and measurements for servicing
-- Analyze records of servicing for feedback into post-production phase
-- Maintain records of servicing activities
-
-#### 7.5.5 Particular Requirements for Sterile Medical Devices
-Maintain records of process parameters for sterilization of each batch.
-
-#### 7.5.6 Validation of Processes
-Validate processes where resulting output cannot be verified by subsequent monitoring or measurement, including:
-- Defined criteria for review and approval
-- Approval of equipment and qualification of personnel
-- Use of specific methods, procedures, and acceptance criteria
-- Requirements for records
-- Revalidation including criteria for revalidation
-- Approval of changes to process
-
-Document requirements for validation of:
-- Computer software used in production and service provision
-- Sterilization processes
-- Aseptic processing
-- Clean room requirements if applicable
-
-#### 7.5.7 Particular Requirements for Validation of Processes for Sterilization and Sterile Barrier Systems
-Maintain records of validation of:
-- Sterilization processes for each batch
-- Sterile barrier systems
-
-#### 7.5.8 Identification
-- Establish documented procedures for product identification throughout realization
-- Identify product by suitable means
-- Maintain records of identification where traceability is a requirement
-
-#### 7.5.9 Traceability
-
-##### 7.5.9.1 General
-Establish documented procedures defining extent of traceability including:
-- Distribution and location of medical device
-
-##### 7.5.9.2 Particular Requirements
-Document procedures to maintain records of:
-- Name and address of shipping package consignee
-- Identification of quantity shipped
-- Include requirements of applicable regulatory requirements
-- Maintain traceability records for defined period
-
-#### 7.5.10 Customer Property
-- Exercise care with customer property while under organization's control
-- Identify, verify, protect, and safeguard customer property
-- Record and report to customer if lost, damaged, or unsuitable
-- Maintain records
-
-#### 7.5.11 Preservation of Product
-- Preserve product during internal processing and delivery
-- Include identification, handling, packaging, storage, and protection
-- Apply to constituent parts of product
-- Document requirements for special handling if applicable
-
-### 7.6 Control of Monitoring and Measuring Equipment
-- Determine monitoring and measurement to be undertaken
-- Determine monitoring and measuring equipment needed
-- Establish documented procedures for:
- - Calibration or verification at specified intervals before use
- - Adjustment or re-adjustment as necessary
- - Identification to enable determination of calibration status
- - Safeguarding from adjustments that would invalidate calibration
- - Protection from damage and deterioration
-- Assess and record validity of previous results when found not to conform
-- Maintain records of calibration and verification
-- Confirm ability of computer software to satisfy intended application when used
-- Undertake confirmation before initial use and reconfirm as necessary
-
-## Clause 8: Measurement, Analysis and Improvement
-
-### 8.1 General
-- Plan and implement monitoring, measurement, analysis, and improvement processes
-- Demonstrate product conformity
-- Ensure QMS conformity
-- Maintain QMS effectiveness
-- Include determination of applicable methods including statistical techniques
-
-### 8.2 Monitoring and Measurement
-
-#### 8.2.1 Feedback
-Establish documented procedure for feedback including early warning system for:
-- Post-production information including complaints
-- Requirements for reporting to regulatory authorities
-- Use as potential input to risk management for monitoring and maintaining product requirements
-- Use as potential input for corrective and preventive action
-
-#### 8.2.2 Complaint Handling
-Establish documented procedures for timely complaint handling including:
-- Requirements and responsibilities for receiving, recording, and evaluating complaints
-- Requirements and responsibilities for handling, investigating, and evaluating complaints
-- Requirements and responsibilities for reporting complaint information to regulatory authorities
-- Requirements for informing customer of organization's actions
-- Requirements to ensure complaint information not handled by organization is transferred to organization
-- Maintain records of complaints and investigations
-
-#### 8.2.3 Reporting to Regulatory Authorities
-Establish documented procedures to:
-- Provide notification to regulatory authorities per applicable requirements
-- Provide advisory notices per applicable requirements
-- Maintain records of reporting
-
-#### 8.2.4 Internal Audit
-- Conduct internal audits at planned intervals
-- Determine if QMS conforms to ISO 13485 and organization's requirements
-- Determine if QMS is effectively implemented and maintained
-- Plan audit program considering importance of processes, changes, and previous results
-- Define audit criteria, scope, frequency, and methods
-- Establish documented procedure for audits including responsibilities, requirements, and reporting
-- Select objective and impartial auditors
-- Maintain records of audits and results
-- Identify need for corrections or corrective actions
-- Conduct follow-up activities to verify implementation and effectiveness
-
-#### 8.2.5 Monitoring and Measurement of Processes
-- Apply suitable methods for monitoring and measurement of QMS processes
-- Demonstrate ability to achieve planned results
-- Implement corrections and corrective actions when planned results not achieved
-- Maintain records
-
-#### 8.2.6 Monitoring and Measurement of Product
-- Monitor and measure product characteristics to verify conformity
-- Conduct at appropriate stages per planned arrangements
-- Maintain records showing conformity to acceptance criteria
-- Record authority responsible for release
-- Ensure product release and delivery not proceed until planned arrangements completed
-- Allow release by relevant authority and customer when applicable
-
-### 8.3 Control of Nonconforming Product
-
-#### 8.3.1 General
-- Ensure nonconforming product is identified and controlled
-- Establish documented procedures for:
- - Identification, documentation, evaluation, segregation, and disposition
- - Notification to external parties
- - Review of nonconforming product
-- Maintain records of nonconformities and subsequent actions including concessions
-
-#### 8.3.2 Actions in Response to Nonconforming Product Detected Before Delivery
-Deal with nonconforming product by:
-- Taking action to eliminate detected nonconformity
-- Authorizing use, release, or acceptance under concession per applicable regulatory requirements
-- Taking action to preclude original intended use or application
-- Taking action appropriate to effects of nonconformity when detected after delivery or use
-
-Maintain records of concessions and identify authority making concession.
-
-#### 8.3.3 Actions in Response to Nonconforming Product Detected After Delivery
-When nonconforming product detected after delivery or use:
-- Take action appropriate to effects of nonconformity
-- Establish documented procedure including notification requirements to regulatory authorities
-- Maintain records
-
-#### 8.3.4 Rework
-Establish documented procedures for rework including:
-- Requirements to evaluate potential effects on medical device
-- Approval before implementation
-- Records of results and actions including nonconformities and rework
-- Re-verification after rework
-- Documentation of rework procedure before rework begins
-
-### 8.4 Analysis of Data
-- Determine, collect, and analyze appropriate data from monitoring and measurement
-- Evaluate where continual improvement of QMS effectiveness can be made
-- Establish documented procedures for:
- - Analysis of data to provide information on customer satisfaction
- - Analysis of conformity to product requirements
- - Analysis of characteristics and trends of processes and products including preventive action opportunities
- - Analysis of suppliers
- - Analysis of other relevant data including feedback and output from risk management
-- Include use of statistical techniques if necessary
-- Maintain records of analysis results
-
-### 8.5 Improvement
-
-#### 8.5.1 General
-- Identify and implement changes to ensure and maintain QMS effectiveness
-- Include use of quality policy, objectives, audit results, data analysis, corrective and preventive actions, and management review
-
-#### 8.5.2 Corrective Action
-- Establish documented procedures to:
- - Review nonconformities including complaints
- - Determine causes of nonconformities
- - Evaluate need for actions to ensure nonconformities do not recur
- - Plan and document actions needed and implement
- - Document results of actions taken
- - Review effectiveness of corrective actions taken
-- Maintain records including investigation results and follow-up
-
-#### 8.5.3 Preventive Action
-- Establish documented procedures to:
- - Determine potential nonconformities and their causes
- - Evaluate need for action to prevent occurrence
- - Plan and document actions needed and implement
- - Document results of actions taken
- - Review effectiveness of preventive actions taken
-- Use appropriate sources of information including:
- - Work processes and operations affecting product quality
- - Concessions
- - Analysis of data and risk management outputs
- - Medical device performance data
- - Records of nonconformities
-- Maintain records including investigation results and follow-up
-
-## Key Regulatory Updates
-
-### FDA QMSR Harmonization (Effective February 2, 2026)
-- FDA 21 CFR Part 820 has been harmonized with ISO 13485:2016
-- Renamed to QMSR (Quality Management System Regulation)
-- Medical Device File (MDF) replaces separate DHF, DMR, and DHR
-- Organizations should prepare for transition to unified documentation approach
-
-## References and Resources
-
-This requirements breakdown is based on ISO 13485:2016, which was last reviewed and confirmed in 2025.
-
-For additional guidance, refer to:
-- ISO 13485:2016 standard document
-- FDA Quality Management System Regulation (QMSR)
-- Applicable regional regulatory requirements (EU MDR, Health Canada, etc.)
+# ISO 13485 Process Framework (No Standard Text)
+
+Research basis: **2026-07-23**. This reference summarizes a preparation process and
+evidence architecture. It does not reproduce ISO requirements and is not a substitute
+for the standard.
+
+## Copyright and authorized access
+
+ISO publications are copyrighted. Obtain ISO 13485 and related standards from
+[ISO](https://www.iso.org/standard/59752.html), an ISO national member, or another
+authorized source. ISO states that unauthorized copying, scanning, or distribution is
+prohibited; see [ISO copyright](https://www.iso.org/copyright.html). Do not ask an
+agent to retrieve, transcribe, summarize clause-by-clause, or store proprietary text.
+
+For the U.S. QMSR incorporation by reference, FDA identifies read-only access through
+the ANSI IBR portal in its
+[QMSR FAQ](https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions).
+That access does not remove copyright or permit copying.
+
+## Current edition and the 2021 European amendment
+
+- [ISO 13485:2016](https://www.iso.org/standard/59752.html) is Edition 3,
+ published March 2016. ISO completed its 2025 systematic review and confirmed the
+ edition on 2025-10-31; it remains current as of this research date.
+- Do not call **EN ISO 13485:2016/A11:2021** an ISO international Amendment 1.
+ It is a European amendment to the EN adoption. The current EU harmonised-standards
+ lists include EN ISO 13485:2016, AC:2018, and A11:2021. Verify the current OJEU
+ citation on the Commission's
+ [harmonised standards page](https://health.ec.europa.eu/medical-devices-topics-interest/harmonised-standards_en).
+- FDA incorporated ISO 13485:2016(E), Third edition, March 1, 2016. A later ISO or
+ EN publication does not silently change the edition incorporated in Part 820.
+
+Record exact publisher, title, edition, amendment/corrigendum, authorized location,
+access date, source owner, currency-review date, impact decision, and approval.
+
+## Hard boundary
+
+This skill and its files cannot:
+
+- certify a QMS or issue/validate a certificate;
+- determine legal or regulatory applicability, device classification, reportability,
+ conformity route, market access, or product authorization;
+- replace the authorized management representative, top management, RA/QA, legal
+ counsel, competent/regulatory authority, notified body, MDSAP Auditing
+ Organization, accreditation body, or certification body;
+- infer effective implementation from a document title, keyword, template, checklist,
+ or script result; or
+- claim compliance, conformity, certification, or inspection readiness.
+
+Use outputs as a list of evidence questions for accountable human review.
+
+## Keep the assurance regimes separate
+
+### ISO 13485 management-system certification
+
+A certification body audits the defined QMS scope against the authorized standard and
+its certification scheme. The certificate is limited to its stated organization, sites,
+activities, products/technical areas, standard edition, and validity. Certification is
+not FDA approval, an FDA inspection exemption, an MDSAP audit, an EU device
+certificate, or a legal-applicability decision.
+
+For accredited ISO 13485 certification, verify the certification body's accreditation
+scope. As of 2026, Global Accreditation Cooperation Incorporated has replaced IAF
+and ILAC operationally. Its document library carries IAF MD 8:2023 and IAF MD
+9:2023 while successor documents are developed. These documents concern
+accreditation and certification-body practice, not product authorization.
+
+### FDA QMSR inspection and compliance
+
+The [QMSR](https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr)
+became effective **2026-02-02** and FDA began enforcement on that date. The current
+[21 CFR Part 820](https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820)
+is titled *Quality Management System Regulation*. It incorporates ISO 13485:2016
+and contains FDA scope, definitions, incorporation, QMS, record, and
+labeling/packaging provisions. Other applicable FDA requirements still matter.
+
+On 2026-02-02 FDA stopped using QSIT and began the inspection process in
+[Compliance Program 7382.850](https://www.fda.gov/media/80195/download?attachment).
+This is now a post-effective-date implementation state, not a future transition.
+FDA may inspect QMS records created before the effective date and records that had
+previously been exempt from routine review under the old regulation, as explained in
+the QMSR FAQ.
+
+Do not use the former 21 CFR 820 section structure as a current requirements map.
+Inventory legacy QSR/QSIT references, disposition them under change control, and use
+the current eCFR, incorporated edition, and linked current FDA regulations.
+
+### MDSAP regulatory audit
+
+MDSAP is a regulatory audit conducted by an MDSAP-recognized Auditing
+Organization for participating jurisdictions. The current official
+[MDSAP Audit Approach](https://www.mdsap.global/documents/library/audit-approach)
+is **MDSAP AU P0002.010**, version date **2026-02-02**. It uses a process-based
+approach and includes jurisdiction-specific requirements.
+
+An ISO certificate alone is not an MDSAP audit. FDA inspections under QMSR do not
+follow the MDSAP audit plan, and FDA does not issue ISO 13485 certificates. MDSAP
+participation does not eliminate every possible regulatory inspection or
+product-specific obligation.
+
+### EU MDR/IVDR conformity assessment
+
+The MDR and IVDR impose legal obligations beyond a generic QMS. Use the current
+consolidated regulation and current, product-specific conformity route:
+
+- [Regulation (EU) 2017/745 (MDR)](https://eur-lex.europa.eu/eli/reg/2017/745/2026-01-01/eng)
+ — consolidated version dated 2026-01-01 as of this research.
+- [Regulation (EU) 2017/746 (IVDR)](https://eur-lex.europa.eu/eli/reg/2017/746/2025-01-10/eng)
+ — current consolidated version dated 2025-01-10 as of this research.
+- [MDCG guidance index](https://health.ec.europa.eu/medical-devices-sector/new-regulations/guidance-mdcg-endorsed-documents-and-other-guidance_en)
+ — guidance is not legally binding and is versioned/revised.
+
+Notified bodies are designated by Member States for specified legislation,
+conformity-assessment tasks, and designation codes. Verify current scope in
+[NANDO](https://webgate.ec.europa.eu/single-market-compliance-space/notified-bodies).
+Accreditation or ISO certification does not by itself confer notified-body designation
+or establish EU product conformity.
+
+### Product- and market-specific requirements
+
+Product classification, intended purpose, claims, software, cybersecurity, clinical or
+performance evidence, biocompatibility, electrical safety, sterilization, UDI,
+registration, reporting, and other controls depend on the device and jurisdiction.
+Manage these in a separately approved applicability matrix. Never assume this
+framework is complete for a product.
+
+## QMS evidence domains
+
+The domains below are workflow topics, not clause text. An authorized standard copy
+and jurisdiction-specific sources remain the audit criteria.
+
+### Scope, governance, and roles
+
+Evidence should identify legal entities, sites, products/families, lifecycle activities,
+outsourced processes, markets considered, interfaces, top-management authority,
+management representative, RA/QA ownership, delegates, independence, and
+escalation. Every applicability or not-applicable decision needs a named owner,
+rationale, source/version, evidence, date, and approval.
+
+### Document and record control
+
+Control authoring, review, approval, effective use, distribution, revision,
+obsolescence, external sources, retention, integrity, security, retrieval, correction,
+audit trails, backup/recovery, and disposition. Preserve source/version evidence and
+license restrictions. Link changes to training and validation before effective use.
+
+### Risk management
+
+Integrate product and process risk with intended use, design, suppliers, production,
+software, validation, complaints, postmarket data, CAPA, and change control.
+[ISO 14971:2019](https://www.iso.org/standard/72704.html), Edition 3, was confirmed
+in 2025. For EU work, distinguish EN ISO 14971:2019/A11:2021; the A11 amendment is
+European and does not replace a product-specific legal analysis.
+
+### Design and development
+
+Maintain approved planning, responsibilities, inputs, outputs, review, verification,
+validation, transfer, changes, and traceability. Evidence should show that risk
+controls and postmarket learning feed the design/change system. A claimed
+not-applicable design process requires authorized scope and regulatory review.
+
+### Suppliers and outsourced processes
+
+Use risk-based selection, evaluation, controls, purchasing information, acceptance,
+change notification, sub-tier flow-down, monitoring, re-evaluation,
+nonconformity/CAPA, and business-continuity evidence. Outsourcing does not transfer
+the organization's accountability for its controlled process.
+
+### Production, service, and validation
+
+Define infrastructure, work environment, contamination/cleanliness where relevant,
+controlled instructions, acceptance/release, labeling/packaging, preservation,
+installation, servicing, process validation, monitoring/measurement equipment, and
+change/revalidation triggers. Evidence must be product/process-specific.
+
+### Software used in the QMS or production
+
+Record intended use, risk, requirements, configuration, access, data integrity,
+verification/validation, acceptance, release, incident handling, backup/recovery,
+supplier controls, and change/revalidation. A software inventory or vendor
+certificate alone is not validation.
+
+### Identification and traceability
+
+Define the required extent using approved product and jurisdictional decisions. Link
+materials/components, process records, acceptance/release, distribution, servicing,
+complaints, corrections/removals, and postmarket records as applicable.
+
+### Complaints, vigilance, and postmarket
+
+Control intake, evaluation, investigation, product/risk impact, trend analysis,
+reportability decisions, communications, advisory/field actions, and feedback to
+risk, design, production, suppliers, CAPA, and management review. Authorized roles
+must make jurisdiction-specific reporting decisions.
+
+### Nonconformity and CAPA
+
+Separate correction/containment from cause-directed action. Preserve scope, risk and
+reportability review, investigation, supported cause or conclusion, action ownership,
+change links, implementation evidence, pre-defined effectiveness criteria,
+independent review, and closure approval. Pending or ineffective checks cannot
+support closure.
+
+### Internal audit and management review
+
+Use a risk-based audit program, objective criteria/scope/sampling, competent and
+independent auditors, findings, corrections/CAPA, and effectiveness follow-up.
+Management review should use controlled inputs and record decisions, resources,
+actions, owners, dates, and follow-up. Neither activity can be replaced by a
+checklist-generated score.
+
+### Training, competence, and change control
+
+Define role competence, training need, completion, effectiveness, authorization, and
+records. Changes should assess source/version, product/risk, validation, software,
+supplier, document, record, training, postmarket, regulatory, and certification/audit
+impacts before implementation.
+
+## Evidence quality rule
+
+For each domain, require:
+
+1. defined scope and accountable owner;
+2. approved process/document status;
+3. actual implementation records, not only a procedure;
+4. traceable evidence IDs and controlled locations;
+5. source/edition/version and currency-review evidence;
+6. approval and effective dates;
+7. open gaps, decisions, and change/CAPA links; and
+8. sampling across products, sites, time periods, and risk where justified.
+
+Use `references/source-ledger.md` for the dated official-source baseline.
diff --git a/skills/iso-13485-certification/references/mandatory-documents.md b/skills/iso-13485-certification/references/mandatory-documents.md
index 1efa5ea3..345fcddc 100644
--- a/skills/iso-13485-certification/references/mandatory-documents.md
+++ b/skills/iso-13485-certification/references/mandatory-documents.md
@@ -1,606 +1,227 @@
-# ISO 13485:2016 Mandatory Documents and Records
-
-This document provides a complete list of all mandatory documents and records required by ISO 13485:2016 for medical device Quality Management Systems.
-
-## Overview
-
-ISO 13485:2016 requires organizations to establish and maintain **31 documented procedures** along with a **Quality Manual** and **Medical Device Files**. Additionally, numerous **records** must be maintained to provide evidence of conformity.
-
-**Important Notes:**
-- The 31 documented procedures do not need to be 31 separate documents
-- Multiple procedures can be combined into one document
-- One procedure can be split across multiple documents
-- Not all procedures may be applicable to every organization (exclusions must be justified)
-- Additional documentation may be required by applicable regulatory requirements
-
-## 1. Quality Manual (Required by 4.2.2)
-
-**Description:** Foundational QMS document
-
-**Must Include:**
-- Scope of QMS with justified exclusions
-- Documented procedures or references to them
-- Description of interaction between QMS processes
-- Structure of documentation used in QMS
-
-**Applicable To:** All organizations
-
----
-
-## 2. Medical Device File (Required by 4.2.3)
-
-**Description:** File for each medical device type or family
-
-**Must Include:**
-- General description and intended use
-- Label and instructions for use specifications
-- Product and/or manufacturing specifications
-- Procedures for purchasing, manufacturing, servicing
-- Measuring and monitoring procedures
-- Installation requirements (if applicable)
-- Risk management file(s)
-- Verification and validation information
-- Design and development file(s) when applicable
-
-**Applicable To:** All organizations for each device type/family
-
----
-
-## 3. The 31 Documented Procedures
-
-### Clause 4: Quality Management System
-
-#### 1. Risk Management Procedures (4.1.5)
-**Description:** Requirements for risk management throughout product realization
-**Must Address:**
-- Risk management methodology
-- Risk analysis and evaluation
-- Risk control measures
-- Risk acceptability criteria
-- Risk management review
-**Referenced Standard:** ISO 14971
-
-#### 2. Software Validation Procedure (4.1.6)
-**Description:** Validation of computer software applications used in QMS
-**Must Address:**
-- Risk assessment of software
-- Validation approach and activities
-- Acceptance criteria
-- User responsibilities
-- Validation before initial use and after changes
-- Revalidation criteria
-
-#### 3. Control of Documents Procedure (4.2.4)
-**Description:** Control of all QMS documents
-**Must Address:**
-- Document approval before issue
-- Document review and update
-- Identification of changes and revision status
-- Availability of relevant document versions
-- Document legibility and identification
-- Control of external documents
-- Prevention of obsolete document use
-- Identification of retained obsolete documents
-
-#### 4. Control of Records Procedure (4.2.5)
-**Description:** Control of all QMS records
-**Must Address:**
-- Record identification
-- Storage and security
-- Integrity protection
-- Retrieval procedures
-- Retention time determination
-- Record disposition
-- Legibility requirements
-- Change identification
-
-### Clause 5: Management Responsibility
-
-#### 5. Management Review Procedure (5.6.1)
-**Description:** Systematic review of QMS by top management
-**Must Address:**
-- Review frequency (at least annually)
-- Review agenda and inputs
-- Review outputs and actions
-- Attendee requirements
-- Record-keeping requirements
-
-#### 6. Internal Communication Procedure (5.5.3)
-**Description:** Communication regarding QMS effectiveness
-**Must Address:**
-- Communication channels
-- Communication frequency
-- Responsible parties
-- Topics to be communicated
-- Documentation of communications
-
-### Clause 6: Resource Management
-
-#### 7. Human Resources/Competence Procedure (6.2)
-**Description:** Ensuring personnel competence
-**Must Address:**
-- Competence requirements determination
-- Training needs identification
-- Training provision and evaluation
-- Education, training, skills, and experience requirements
-- Competence records maintenance
-- Awareness of personnel contributions
-
-#### 8. Infrastructure Maintenance Procedure (6.3)
-**Description:** Maintenance of facilities and equipment (when affecting quality)
-**Must Address:**
-- Maintenance activities definition
-- Maintenance scheduling
-- Maintenance records
-- Impact on product quality
-- Verification after maintenance
-
-#### 9. Contamination Control Procedure (6.4.2)
-**Description:** Control of contaminated or potentially contaminated product (when applicable)
-**Must Address:**
-- Contamination identification
-- Contaminated product handling
-- Segregation requirements
-- Decontamination procedures
-- Special arrangements for control
-
-### Clause 7: Product Realization
-
-#### 10. Customer Communication Procedure (7.2.3)
-**Description:** Communication with customers
-**Must Address:**
-- Product information provision
-- Inquiry, contract, order handling
-- Customer feedback including complaints
-- Advisory notices
-- Communication channels and responsibilities
-
-#### 11. Design and Development Procedures (7.3.1 - 7.3.10)
-**Description:** Control of design and development process
-**Must Address:**
-- Design and development planning
-- Input determination and review
-- Output provision and approval
-- Design reviews at suitable stages
-- Verification against inputs
-- Validation for intended use
-- Transfer to manufacturing
-- Change control
-- Design file maintenance
-
-#### 12. Purchasing Procedures (7.4.1)
-**Description:** Control of purchasing process
-**Must Address:**
-- Supplier evaluation and selection criteria
-- Supplier monitoring and re-evaluation
-- Supplier performance tracking
-- Purchasing controls
-- Supplier notification of changes
-- Communication to sub-tier suppliers
-
-#### 13. Verification of Purchased Product Procedure (7.4.3)
-**Description:** Verification that purchased product meets requirements
-**Must Address:**
-- Verification activities
-- Extent of verification
-- Method of product release
-- Verification at supplier's premises (if applicable)
-- Customer verification arrangements (if applicable)
-
-#### 14. Production and Service Provision Control Procedures (7.5.1)
-**Description:** Control of production and service activities
-**Must Address:**
-- Work instructions and documented procedures
-- Use of suitable equipment
-- Monitoring and measuring activities
-- Release, delivery, and post-delivery activities
-- Labelling and packaging operations
-- Servicing procedures (if applicable)
-
-#### 15. Product Cleanliness Procedures (7.5.2)
-**Description:** Control of product cleanliness (when applicable)
-**Must Address:**
-- Cleaning requirements and specifications
-- Cleaning before sterilization
-- Uncleanable product handling
-- Hygiene requirements in manufacturing
-- Cleaning verification
-
-#### 16. Installation and Verification Procedures (7.5.3)
-**Description:** Installation activities (when applicable)
-**Must Address:**
-- Installation requirements
-- Installation instructions
-- Verification of installation
-- Installation records
-- Responsible parties
-
-#### 17. Servicing Procedures (7.5.4)
-**Description:** Servicing activities (when applicable)
-**Must Address:**
-- Servicing requirements
-- Reference materials and measurements
-- Feedback analysis from servicing
-- Servicing records
-- Servicing notification to regulatory authorities
-
-#### 18. Process Validation Procedure (7.5.6)
-**Description:** Validation of processes where output cannot be verified
-**Must Address:**
-- Process validation for manufacturing
-- Computer software validation for production
-- Sterilization process validation
-- Aseptic processing validation
-- Clean room validation (if applicable)
-- Criteria for review and approval
-- Equipment approval and personnel qualification
-- Revalidation criteria and triggers
-
-#### 19. Sterilization and Sterile Barrier System Validation (7.5.7)
-**Description:** Validation of sterilization processes (when applicable)
-**Must Address:**
-- Sterilization method validation
-- Sterile barrier system validation
-- Process parameters for each batch
-- Validation of changes to sterilization
-- Maintenance of validation records
-
-#### 20. Product Identification and Traceability Procedures (7.5.8, 7.5.9)
-**Description:** Identification and traceability throughout realization
-**Must Address:**
-- Identification methods throughout realization
-- Traceability extent definition
-- Distribution and location tracking
-- Consignee identification
-- Quantity shipped identification
-- Retention period requirements
-- Applicable regulatory traceability requirements
-
-#### 21. Customer Property Procedure (7.5.10)
-**Description:** Control of customer-provided property
-**Must Address:**
-- Customer property identification
-- Verification of customer property
-- Protection and safeguarding
-- Loss, damage, or unsuitability reporting
-- Records of customer property
-
-#### 22. Preservation of Product Procedure (7.5.11)
-**Description:** Product preservation during processing and delivery
-**Must Address:**
-- Identification requirements
-- Handling requirements
-- Packaging requirements
-- Storage requirements
-- Protection requirements
-- Special handling (if applicable)
-- Application to constituent parts
-
-#### 23. Control of Monitoring and Measuring Equipment Procedure (7.6)
-**Description:** Calibration and control of measuring equipment
-**Must Address:**
-- Equipment identification
-- Calibration or verification intervals
-- Calibration methods and standards
-- Adjustment procedures
-- Identification of calibration status
-- Protection from invalid adjustments
-- Protection from damage
-- Assessment when found non-conforming
-- Computer software confirmation
-
-### Clause 8: Measurement, Analysis and Improvement
-
-#### 24. Feedback Procedure (8.2.1)
-**Description:** Post-production information system
-**Must Address:**
-- Early warning system for quality issues
-- Post-production information collection
-- Complaint handling linkage
-- Reporting to regulatory authorities
-- Input to risk management
-- Input to corrective and preventive action
-- Feedback sources and channels
-
-#### 25. Complaint Handling Procedure (8.2.2)
-**Description:** Timely handling of complaints
-**Must Address:**
-- Complaint receipt and recording
-- Complaint evaluation and investigation
-- Determination of need for reporting to authorities
-- Determination of need for advisory notices
-- Information to customer about actions taken
-- Transfer of complaint information not directly handled
-- Complaint trending and analysis
-
-#### 26. Reporting to Regulatory Authorities Procedure (8.2.3)
-**Description:** Notification to regulatory authorities
-**Must Address:**
-- Determination of reportable events
-- Notification timeframes
-- Notification content requirements
-- Advisory notice requirements
-- Applicable regulatory requirements by region
-- Responsible parties for reporting
-
-#### 27. Internal Audit Procedure (8.2.4)
-**Description:** Conduct of internal audits
-**Must Address:**
-- Audit program planning
-- Audit criteria, scope, frequency, methods
-- Auditor selection and impartiality
-- Audit responsibilities and requirements
-- Audit reporting
-- Records of audits
-- Follow-up activities
-
-#### 28. Process Monitoring and Measurement Procedures (8.2.5)
-**Description:** Monitoring and measurement of QMS processes
-**Must Address:**
-- Process monitoring methods
-- Process measurement methods
-- Demonstration of achieving planned results
-- Implementation of corrections when needed
-- Corrective actions when processes fail
-
-#### 29. Product Monitoring and Measurement Procedures (8.2.6)
-**Description:** Monitoring and measurement of product
-**Must Address:**
-- Product acceptance criteria
-- Measurement at appropriate stages
-- Release authority identification
-- Release procedures
-- Records of conformity to criteria
-- Traceability to measuring authority
-
-#### 30. Control of Nonconforming Product Procedure (8.3)
-**Description:** Identification and control of nonconforming product
-**Must Address:**
-- Identification of nonconformity
-- Documentation requirements
-- Evaluation of nonconformity
-- Segregation of nonconforming product
-- Disposition of nonconforming product
-- Notification to external parties
-- Concession process (if applicable)
-- Rework procedures
-- Actions for nonconformity detected before delivery
-- Actions for nonconformity detected after delivery
-- Reporting requirements
-
-#### 31A. Corrective Action Procedure (8.5.2)
-**Description:** Elimination of causes of nonconformities
-**Must Address:**
-- Review of nonconformities including complaints
-- Cause determination methodology
-- Evaluation of need for action
-- Planning and documentation of actions
-- Implementation of actions
-- Effectiveness review of actions
-- Records of investigation and follow-up
-
-#### 31B. Preventive Action Procedure (8.5.3)
-**Description:** Elimination of causes of potential nonconformities
-**Must Address:**
-- Determination of potential nonconformities
-- Evaluation of need for action
-- Planning and documentation of actions
-- Implementation of actions
-- Effectiveness review of actions
-- Sources of information for preventive action
-- Records of investigation and follow-up
-
----
-
-## Additional Required Documentation
-
-### Analysis of Data Procedure (8.4)
-While not explicitly called out as requiring a "documented procedure," organizations must establish processes for:
-- Data determination, collection, and analysis
-- Evaluation of continual improvement opportunities
-- Statistical techniques (if applicable)
-- Analysis of:
- - Customer satisfaction
- - Conformity to product requirements
- - Process and product characteristics and trends
- - Suppliers
- - Other relevant data including feedback and risk management outputs
-
----
-
-## Required Records by Clause
-
-### Clause 4 Records
-- Software validation records (4.1.6)
-- Risk management records (4.1.5)
-- All records specified in documented procedures and work instructions
-- All records required by applicable regulatory requirements
-
-### Clause 5 Records
-- Management review records (5.6.1)
-- Evidence of personnel competence (6.2)
-
-### Clause 6 Records
-- Infrastructure maintenance records (6.3)
-- Personnel training and competence records (6.2)
-
-### Clause 7 Records
-- Product requirements review and follow-up actions (7.2.2)
-- Design and development files (7.3.10) including:
- - Design and development plans
- - Design inputs
- - Design outputs
- - Design review records
- - Design verification records
- - Design validation records
- - Design change records
- - Risk management file
-- Design and development transfer records (7.3.8)
-- Supplier evaluation, selection, and monitoring (7.4.1)
-- Verification of purchased product (7.4.3)
-- Cleanliness of product records (7.5.2)
-- Installation and verification records (7.5.3)
-- Servicing activity records (7.5.4)
-- Sterilization process parameter records for each batch (7.5.5, 7.5.7)
-- Process validation records (7.5.6)
-- Product identification and traceability records (7.5.8, 7.5.9)
- - Including distribution records with consignee name/address and quantity (7.5.9.2)
-- Customer property records (7.5.10)
-- Calibration and verification records (7.6)
-
-### Clause 8 Records
-- Post-production feedback and complaints (8.2.1, 8.2.2)
-- Complaint investigations (8.2.2)
-- Regulatory authority reporting (8.2.3)
-- Internal audit records (8.2.4)
-- Process monitoring and measurement results (8.2.5)
-- Product monitoring and measurement records (8.2.6)
-- Product release authority (8.2.6)
-- Nonconforming product records (8.3.1)
-- Concession records and authority (8.3.2)
-- Nonconforming product actions after delivery (8.3.3)
-- Rework procedures and results (8.3.4)
-- Data analysis results (8.4)
-- Corrective action records including investigation and follow-up (8.5.2)
-- Preventive action records including investigation and follow-up (8.5.3)
-
----
-
-## Documentation Matrix
-
-| Clause | Document Type | Document Name | Mandatory? | Records Required? |
-|--------|--------------|---------------|------------|-------------------|
-| 4.2.2 | Manual | Quality Manual | Yes | No |
-| 4.2.3 | File | Medical Device File | Yes (per device) | Yes |
-| 4.1.5 | Procedure | Risk Management | Yes | Yes |
-| 4.1.6 | Procedure | Software Validation | Yes | Yes |
-| 4.2.4 | Procedure | Control of Documents | Yes | No |
-| 4.2.5 | Procedure | Control of Records | Yes | No |
-| 5.5.3 | Procedure | Internal Communication | Yes | No |
-| 5.6.1 | Procedure | Management Review | Yes | Yes |
-| 6.2 | Procedure | Competence/Training | Yes | Yes |
-| 6.3 | Procedure | Infrastructure Maintenance | When applicable | Yes |
-| 6.4.2 | Procedure | Contamination Control | When applicable | Yes |
-| 7.2.3 | Procedure | Customer Communication | Yes | Yes |
-| 7.3.1-10 | Procedures | Design and Development | When applicable | Yes |
-| 7.4.1 | Procedure | Purchasing | Yes | Yes |
-| 7.4.3 | Procedure | Verification of Purchased Product | Yes | Yes |
-| 7.5.1 | Procedures | Production Control | Yes | Yes |
-| 7.5.2 | Procedure | Product Cleanliness | When applicable | Yes |
-| 7.5.3 | Procedure | Installation | When applicable | Yes |
-| 7.5.4 | Procedure | Servicing | When applicable | Yes |
-| 7.5.6 | Procedure | Process Validation | When applicable | Yes |
-| 7.5.7 | Procedure | Sterilization Validation | When applicable | Yes |
-| 7.5.8 | Procedure | Product Identification | Yes | Yes |
-| 7.5.9 | Procedure | Traceability | Yes | Yes |
-| 7.5.10 | Procedure | Customer Property | When applicable | Yes |
-| 7.5.11 | Procedure | Preservation of Product | Yes | Yes |
-| 7.6 | Procedure | Control of M&M Equipment | Yes | Yes |
-| 8.2.1 | Procedure | Feedback | Yes | Yes |
-| 8.2.2 | Procedure | Complaint Handling | Yes | Yes |
-| 8.2.3 | Procedure | Regulatory Reporting | Yes | Yes |
-| 8.2.4 | Procedure | Internal Audit | Yes | Yes |
-| 8.2.5 | Procedure | Process Monitoring | Yes | Yes |
-| 8.2.6 | Procedure | Product Monitoring | Yes | Yes |
-| 8.3 | Procedure | Control of Nonconforming Product | Yes | Yes |
-| 8.4 | Process | Analysis of Data | Yes | Yes |
-| 8.5.2 | Procedure | Corrective Action | Yes | Yes |
-| 8.5.3 | Procedure | Preventive Action | Yes | Yes |
-
----
-
-## Common Additional Documents (Not Required by ISO 13485 but Often Needed)
-
-While not explicitly required by ISO 13485, the following documents are commonly needed for effective QMS operation and regulatory compliance:
-
-### Work Instructions
-- Manufacturing work instructions
-- Testing work instructions
-- Inspection work instructions
-- Cleaning instructions
-- Equipment operation instructions
-
-### Forms and Templates
-- Training records forms
-- Calibration forms
-- Audit checklists
-- Complaint forms
-- CAPA forms
-- Change request forms
-- Document review forms
-- Supplier evaluation forms
-
-### Additional Plans
-- Quality plan
-- Product realization plan
-- Validation plans
-- Clinical evaluation plans
-- Post-market surveillance plans
-
-### Technical Documentation
-- Product specifications
-- Material specifications
-- Test methods and protocols
-- Packaging specifications
-- Labeling artwork
-- Instructions for use
-
-### Regulatory Documentation
-- Technical files (EU MDR/IVDR)
-- 510(k) submissions (FDA)
-- Clinical evaluation reports
-- Post-market surveillance reports
-- Periodic safety update reports
-
----
-
-## Tips for Document Management
-
-### Combining Procedures
-Multiple procedures can be combined into single documents, such as:
-- "Corrective and Preventive Action (CAPA) Procedure" (combines 8.5.2 and 8.5.3)
-- "Document and Record Control Procedure" (combines 4.2.4 and 4.2.5)
-- "Monitoring and Measurement Procedure" (combines 8.2.5 and 8.2.6)
-- "Product Identification and Traceability Procedure" (combines 7.5.8 and 7.5.9)
-
-### Determining Applicability
-Not all procedures apply to all organizations. Common exclusions include:
-- Design and development (when only manufacturing per customer specifications)
-- Installation (when product doesn't require installation)
-- Servicing (when not offered)
-- Sterilization (when product is non-sterile)
-- Contamination control (when not applicable to product type)
-
-All exclusions must be justified in the Quality Manual.
-
-### Regulatory Requirements
-Remember that applicable regulatory requirements may mandate additional documentation beyond ISO 13485, including:
-- FDA regulations (21 CFR Part 820 / QMSR)
-- EU MDR/IVDR requirements
-- Health Canada requirements
-- Other regional regulatory requirements
-
----
-
-## Record Retention
-
-Per ISO 13485:2016 (4.2.5), records must be retained for:
-- **Minimum:** The lifetime of the medical device as defined by the organization
-- **Additional:** Not less than the retention period of any resulting record
-- **Regulatory:** As specified by applicable regulatory requirements
-
-Organizations must define the "lifetime" of their medical devices and establish retention times that meet or exceed:
-- ISO 13485 minimum requirements
-- Applicable regulatory requirements (often 5-10 years minimum)
-- Any customer contractual requirements
-
----
-
-## Transition to Medical Device File (MDF)
-
-With FDA QMSR harmonization (effective February 2, 2026), organizations should prepare for transitioning from separate files to a unified Medical Device File (MDF) that replaces:
-- **DHF** (Design History File)
-- **DMR** (Device Master Record)
-- **DHR** (Device History Record)
-
-The MDF approach aligns with ISO 13485:2016 requirements and provides a more unified documentation structure.
+# Documentation and Evidence Architecture
+
+Research basis: **2026-07-23**. This is a process-oriented planning reference, not a
+list of copyrighted ISO requirements.
+
+## Do not use a fixed “31 procedures” claim
+
+ISO 13485 does not require one universal package of a fixed number of separately
+titled procedures for every organization. Document architecture depends on QMS
+scope, products, lifecycle activities, sites, outsourced processes, applicable
+regulatory requirements, and how controlled processes are combined or split.
+
+Avoid:
+
+- declaring a QMS complete because a named-document count was reached;
+- equating a filename or keyword hit with implementation;
+- treating an example document name as mandatory;
+- labeling every conditional process “not applicable” without an authorized decision;
+- assuming one regime's records satisfy another regime; or
+- claiming certification/readiness from document presence.
+
+Use an authorized copy of ISO 13485 and current jurisdiction/product sources to
+identify the documentation and records that actually apply. ISO publications are
+copyrighted; see [ISO copyright](https://www.iso.org/copyright.html).
+
+## Controlled evidence hierarchy
+
+### 1. Source and applicability layer
+
+Maintain:
+
+- dated official-source ledger with exact edition/version;
+- product/site/market/lifecycle scope intake;
+- authorized applicability and not-applicable decisions;
+- regulatory/product-requirements matrix;
+- certification, MDSAP, FDA, and EU assurance-route distinctions;
+- source-change monitoring and impact assessments.
+
+Minimum fields: source ID, publisher, title, edition/version/date, authorized
+location, access date, owner, status, currency-review date, impact record, and
+approval.
+
+### 2. Governance and policy layer
+
+Typical controlled documents and records:
+
+- QMS scope and quality manual or equivalent policy architecture;
+- quality policy/objectives and measures;
+- organization chart, role authorities, delegates, independence, and escalation;
+- authorized management representative appointment;
+- process-interaction map;
+- management review plan, records, decisions, and follow-up.
+
+The quality manual is not evidence that the processes operate. Link it to approved
+procedures and sampled implementation records.
+
+### 3. Process-control layer
+
+An organization may combine or separate controlled procedures. Use titles that match
+actual work. At minimum, assess whether controlled documentation is needed for:
+
+- document, record, and external-source control;
+- risk management;
+- design and development, transfer, and design change;
+- customer/product requirements and communications;
+- suppliers, purchasing, outsourced processes, and acceptance;
+- production, service, infrastructure, environment, and maintenance;
+- process, equipment, test-method, and software validation;
+- monitoring/measurement equipment;
+- identification, traceability, preservation, installation, and servicing;
+- feedback, complaints, postmarket surveillance, and vigilance/reporting;
+- nonconforming outputs, corrections, removals/advisory actions, and CAPA;
+- internal audit, data/trend analysis, and management review;
+- competence, training, authorization, and awareness; and
+- QMS/product/process/source/software change control.
+
+Each controlled process should identify purpose, scope, roles, inputs, outputs,
+methods, decision criteria, records, interfaces, measures, change controls,
+source/version basis, approval, and effective date.
+
+### 4. Product and technical evidence layer
+
+Maintain a controlled file architecture for each applicable product/type/family.
+Depending on product and jurisdiction, evidence may include:
+
+- product description, intended purpose/use, claims, variants, accessories;
+- classifications and authorized decision records;
+- requirements/specifications and acceptance criteria;
+- risk management and benefit-risk evidence;
+- design planning, inputs, outputs, reviews, verification, validation, transfer,
+ and changes;
+- production, supplier, packaging, labeling, installation, and service information;
+- software lifecycle, cybersecurity, usability, biocompatibility, electrical safety,
+ sterilization, clinical/performance, and other product-specific evidence;
+- acceptance/release and distribution/traceability records;
+- postmarket plans, reports, complaints, vigilance, field actions, and updates.
+
+Do not claim that an ISO 13485 “medical device file” automatically replaces every
+FDA, EU, or other jurisdiction-specific file or record concept. Build a cross-reference
+that preserves each required record and its source/version.
+
+### 5. Implementation-record layer
+
+Procedures describe controls; records show what happened. Sample actual records for:
+
+- approvals, revision/effective status, training, and point-of-use control;
+- competence and role authorization;
+- management review inputs, decisions, resources, actions, and follow-up;
+- internal audits, findings, corrections/CAPA, and effectiveness;
+- risk reviews and links to design/production/postmarket changes;
+- design reviews, verification, validation, transfer, and changes;
+- supplier qualification, agreements, monitoring, change notices, re-evaluation,
+ nonconformity, and CAPA;
+- production/service work, process parameters, acceptance, release, validation,
+ revalidation, maintenance, and calibration;
+- software intended use, risk, validation, release, incidents, and changes;
+- identification, traceability, distribution, installation, and service;
+- complaints, investigations, reportability/vigilance decisions, and communications;
+- nonconformity, disposition, corrections, CAPA, and effectiveness; and
+- data analysis, trends, objectives, escalation, and change decisions.
+
+## Fail-closed document register
+
+For every controlled document, capture:
+
+- unique ID, title, type, owner, revision, and status;
+- source/version references and change rationale;
+- reviewers/approvers and approval evidence;
+- effective date and training impact;
+- linked documents, forms, records, systems, products, suppliers, and processes;
+- obsolete/superseded disposition; and
+- controlled location and access classification.
+
+For every record series, capture:
+
+- owner, record type, creation/attribution method, and status;
+- integrity, security, audit trail, backup/recovery, retrieval, and correction controls;
+- exact retention period and approved basis;
+- disposition method and authorization;
+- applicable products/sites/jurisdictions;
+- evidence samples and approval.
+
+Unknown, placeholder, unapproved, uncontrolled, or inaccessible entries are gaps—not
+assumed evidence.
+
+## Regime-specific supplements
+
+### ISO certification
+
+Maintain the authorized standard edition, certification scope, sites/activities,
+certification-body and accreditation-scope evidence, audit program, findings, and
+certificate status. A certificate is limited to its scope and is not a product or
+regulatory authorization.
+
+### FDA QMSR
+
+Since **2026-02-02**, use current
+[21 CFR Part 820](https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820),
+the incorporated ISO edition, current FDA supplemental provisions, and other
+applicable FDA regulations. FDA now uses
+[Compliance Program 7382.850](https://www.fda.gov/media/80195/download?attachment),
+not QSIT. Keep evidence for current complaint, servicing, labeling/packaging, and
+other FDA-specific requirements. Do not retain old QSR section numbers as the
+current control model.
+
+FDA's
+[QMSR FAQ](https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions)
+states that investigators may review pre-effective-date QMS records and management,
+quality-audit, and supplier-audit reports. Prepare controlled retrieval without
+rewriting history or backdating records.
+
+### MDSAP
+
+Use the current
+[MDSAP AU P0002.010 Audit Approach](https://www.mdsap.global/documents/library/audit-approach),
+dated 2026-02-02, and the current MDSAP document library. Record participating
+jurisdictions, products, sites, recognized Auditing Organization, audit cycle,
+jurisdiction-specific evidence, findings, and action status. Do not substitute an
+ISO-only certificate or FDA inspection checklist.
+
+### EU MDR/IVDR
+
+Keep the current consolidated regulation, conformity-assessment route, device
+classification, technical documentation, QMS, clinical/performance, postmarket,
+vigilance, registration/UDI, economic-operator, and notified-body evidence as
+applicable. Verify notified-body designation and codes in
+[NANDO](https://webgate.ec.europa.eu/single-market-compliance-space/notified-bodies).
+MDCG guidance is useful but nonbinding; record document number, revision, date, and
+impact.
+
+For European standards, distinguish ISO publications from EN adoptions,
+corrigenda, and European A11 amendments. Verify current OJEU citations on the
+Commission's
+[harmonised standards page](https://health.ec.europa.eu/medical-devices-topics-interest/harmonised-standards_en).
+
+## Retention: no universal period
+
+Do not use generic “5–10 year” statements or “device lifetime” as a complete
+retention schedule. For each record type, authorized reviewers should reconcile:
+
+- current standard and regulatory sources;
+- product/device lifetime and market-specific periods;
+- complaint, vigilance, traceability, clinical/performance, technical-documentation,
+ and certificate obligations;
+- legal hold, privacy, contract, and business requirements; and
+- system migration and durable retrieval.
+
+Record the chosen period, start event, source/version, rationale, owner, approval,
+disposition method, and hold override.
+
+## Evidence-quality gate
+
+A document or record is ready for substantive human review only when:
+
+- scope and applicability are resolved or explicitly blocked;
+- owner and status are clear;
+- referenced controlled revision exists;
+- approval and effective dates are recorded;
+- implementation evidence is sampled;
+- source versions are current and traceable;
+- open findings and change/CAPA links are visible; and
+- the artifact makes no unsupported compliance, conformity, certification, or
+ readiness claim.
+
+Use `scripts/audit_document_records.py` for structural checks and
+`scripts/validate_evidence_manifest.py` for a bounded local manifest. Passing either
+means only that the supplied fields passed deterministic checks.
diff --git a/skills/iso-13485-certification/references/quality-manual-guide.md b/skills/iso-13485-certification/references/quality-manual-guide.md
index 16452e0b..332262e3 100644
--- a/skills/iso-13485-certification/references/quality-manual-guide.md
+++ b/skills/iso-13485-certification/references/quality-manual-guide.md
@@ -1,688 +1,267 @@
# Quality Manual Development Guide
-This guide provides comprehensive instructions for creating an ISO 13485:2016 compliant Quality Manual.
-
-## Purpose of the Quality Manual
-
-The Quality Manual is the foundational policy-level document of your Quality Management System (QMS). It:
-
-1. **Defines the scope** of your QMS
-2. **Documents or references** all QMS procedures
-3. **Describes the interaction** between QMS processes
-4. **Outlines the structure** of QMS documentation
-5. **Demonstrates management commitment** to quality and regulatory compliance
-6. **Serves as a guide** for employees and auditors
-
-The Quality Manual is typically 20-50 pages and remains relatively stable over time, while procedures and work instructions may change more frequently.
-
----
-
-## Required Content per ISO 13485:2016 (Clause 4.2.2)
-
-The Quality Manual must include:
-
-### a) Scope of the QMS
-- Define which parts of the organization are covered
-- Identify exclusions with justification
-- Specify product types covered
-- Define applicable regulatory requirements
-
-### b) Documented Procedures or References
-- List all 31 documented procedures (or reference where they can be found)
-- Provide document numbers/titles for easy reference
-
-### c) Description of Process Interactions
-- Show how QMS processes interact and sequence
-- May include process maps or flowcharts
-- Explain dependencies between processes
-
-### d) Structure of Documentation
-- Describe the documentation hierarchy
-- Explain document numbering and control systems
-- Define document types (procedures, work instructions, forms, records)
-
----
-
-## Quality Manual Structure
-
-### Recommended Table of Contents
-
-#### Section 0: Document Control
-- Document identification
-- Revision history
-- Approval signatures
-- Distribution list
-
-#### Section 1: Introduction
-- 1.1 Company Overview
-- 1.2 Purpose of the Quality Manual
-- 1.3 Document Control and Revisions
-- 1.4 Definitions and Abbreviations
-
-#### Section 2: Scope and Exclusions (ISO 13485 Clause 4.2.2.a)
-- 2.1 Scope of QMS
-- 2.2 Products Covered
-- 2.3 Applicable Regulatory Requirements
-- 2.4 Exclusions and Justifications
-
-#### Section 3: Quality Policy and Objectives (ISO 13485 Clauses 5.3, 5.4)
-- 3.1 Quality Policy Statement
-- 3.2 Quality Objectives
-- 3.3 Communication of Policy and Objectives
-
-#### Section 4: Quality Management System (ISO 13485 Clause 4)
-- 4.1 General Requirements
- - 4.1.1 Processes and Their Application
- - 4.1.2 Process Interactions (with process map)
- - 4.1.3 Outsourced Processes
- - 4.1.4 Risk Management
- - 4.1.5 Software Validation
-- 4.2 Documentation Requirements
- - 4.2.1 General
- - 4.2.2 Quality Manual (this document)
- - 4.2.3 Medical Device File
- - 4.2.4 Control of Documents
- - 4.2.5 Control of Records
-- 4.3 Documentation Structure (ISO 13485 Clause 4.2.2.d)
-
-#### Section 5: Management Responsibility (ISO 13485 Clause 5)
-- 5.1 Management Commitment
-- 5.2 Customer Focus
-- 5.3 Quality Policy (reference to Section 3)
-- 5.4 Planning
-- 5.5 Responsibility, Authority and Communication
- - 5.5.1 Organization Structure and Responsibilities
- - 5.5.2 Management Representative
- - 5.5.3 Internal Communication
-- 5.6 Management Review
-
-#### Section 6: Resource Management (ISO 13485 Clause 6)
-- 6.1 Provision of Resources
-- 6.2 Human Resources
-- 6.3 Infrastructure
-- 6.4 Work Environment and Contamination Control
-
-#### Section 7: Product Realization (ISO 13485 Clause 7)
-- 7.1 Planning of Product Realization
-- 7.2 Customer-Related Processes
-- 7.3 Design and Development
-- 7.4 Purchasing
-- 7.5 Production and Service Provision
-- 7.6 Control of Monitoring and Measuring Equipment
-
-#### Section 8: Measurement, Analysis and Improvement (ISO 13485 Clause 8)
-- 8.1 General
-- 8.2 Monitoring and Measurement
- - 8.2.1 Feedback
- - 8.2.2 Complaint Handling
- - 8.2.3 Reporting to Regulatory Authorities
- - 8.2.4 Internal Audit
- - 8.2.5 Monitoring and Measurement of Processes
- - 8.2.6 Monitoring and Measurement of Product
-- 8.3 Control of Nonconforming Product
-- 8.4 Analysis of Data
-- 8.5 Improvement
- - 8.5.1 General
- - 8.5.2 Corrective Action
- - 8.5.3 Preventive Action
-
-#### Section 9: Appendices
-- Appendix A: List of Documented Procedures (ISO 13485 Clause 4.2.2.b)
-- Appendix B: Organization Chart
-- Appendix C: Process Map/Interactions (ISO 13485 Clause 4.2.2.c)
-- Appendix D: Definitions and Abbreviations
-- Appendix E: Applicable Regulatory Requirements
-
----
-
-## Writing Guidelines
-
-### Level of Detail
-
-The Quality Manual should be at a **policy level**, not operational level:
-
-**DO:**
-- State WHAT the organization does
-- State WHY policies exist
-- Reference WHO is responsible
-- Reference WHERE to find detailed procedures
-
-**DON'T:**
-- Provide step-by-step HOW-TO instructions (that's for procedures)
-- Include forms or templates (that's for procedures and work instructions)
-- Provide excessive technical detail
-
-### Example - Correct Level of Detail:
-
-**Good (Policy Level):**
-> "The organization has established a documented procedure for the control of nonconforming product. This procedure ensures that nonconforming product is identified, segregated, and dispositioned appropriately. The Quality Manager is responsible for reviewing all nonconformances and determining appropriate corrective actions. Refer to SOP-8.3-01 Control of Nonconforming Product."
-
-**Too Detailed (Operational Level - Don't do this):**
-> "When a nonconforming product is identified, the inspector fills out Form NCR-001 and places a red tag on the product. The product is moved to the quarantine area in Building B, Row 5. The Quality Manager reviews the NCR within 24 hours and checks one of three boxes: Rework, Scrap, or Use As-Is. If rework is selected, the inspector..."
-
-### Language and Style
-
-- Use present tense and active voice
-- Be clear and concise
-- Avoid jargon where possible
-- Define technical terms in the definitions section
-- Use consistent terminology throughout
-- Number all sections and subsections
-
-### Cross-Referencing
-
-- Reference specific procedures by number and title
-- Reference specific clause numbers from ISO 13485
-- Use consistent format: "Refer to SOP-XXX [Title]"
-- Ensure all referenced documents exist
-
----
-
-## Section-by-Section Guidance
-
-### Section 0: Document Control
-
-**Purpose:** Control and identification of the manual itself
-
-**Content:**
-- Document number and title
-- Revision number and date
-- Page numbers (Page X of Y)
-- Approval signatures (typically top management)
-- Distribution list (who has controlled copies)
-- Revision history table
-
-**Example Revision History Table:**
-
-| Revision | Date | Description of Changes | Approved By |
-|----------|------|------------------------|-------------|
-| 00 | YYYY-MM-DD | Initial release | [Name] |
-| 01 | YYYY-MM-DD | Updated Section 7.3 for new design process | [Name] |
-
-### Section 1: Introduction
-
-#### 1.1 Company Overview
-- Company name and legal entity
-- Business address(es)
-- Type of business (manufacturer, contract manufacturer, etc.)
-- History and background (brief)
-- Mission statement (optional)
-
-#### 1.2 Purpose of the Quality Manual
-Explain that this manual:
-- Describes the QMS established per ISO 13485:2016
-- Demonstrates compliance with applicable regulatory requirements
-- Serves as primary reference for QMS
-
-#### 1.3 Document Control and Revisions
-- How the manual is controlled
-- Who approves changes
-- How often it's reviewed
-- Reference to document control procedure
-
-#### 1.4 Definitions and Abbreviations
-List key terms used in the manual:
-- QMS: Quality Management System
-- CAPA: Corrective and Preventive Action
-- DHF: Design History File
-- MDF: Medical Device File
-- SOP: Standard Operating Procedure
-- WI: Work Instruction
-- etc.
-
-### Section 2: Scope and Exclusions
-
-#### 2.1 Scope of QMS
-
-**Must Include:**
-- Organizational units covered
-- Physical locations covered
-- Activities covered (design, manufacturing, distribution, servicing, etc.)
-- Product types covered
-
-**Example:**
-> "This Quality Management System applies to [Company Name] and covers all activities related to the design, development, production, installation, and servicing of [product type] medical devices at our facility located at [address]. The QMS applies to all employees, contractors, and temporary staff performing work that affects product quality and regulatory compliance."
-
-#### 2.2 Products Covered
-
-List product categories or families covered:
-- Class I, II, or III medical devices
-- Product names or families
-- Intended use categories
-
-**Example:**
-> "This QMS covers the following medical device product families:
-> - Surgical instruments (Class I)
-> - Patient monitoring systems (Class II)
-> - Implantable cardiac devices (Class III)"
-
-#### 2.3 Applicable Regulatory Requirements
-
-List all applicable regulations:
-- ISO 13485:2016
-- FDA 21 CFR Part 820 (QMSR)
-- EU MDR 2017/745
-- Health Canada Medical Devices Regulations
-- [Other applicable requirements]
-
-#### 2.4 Exclusions and Justifications
-
-**Common Exclusions:**
-
-**Design and Development (Clause 7.3):**
-If you only manufacture per customer specifications without your own design:
-> "Clause 7.3 Design and Development is excluded from the scope of this QMS. [Company Name] operates as a contract manufacturer and produces medical devices according to complete design specifications provided by customers. All design activities are performed by the customer and [Company Name] has no responsibility for design inputs, outputs, verification, validation, or design changes."
-
-**Installation (Clause 7.5.3):**
-If product requires no installation:
-> "Clause 7.5.3 Installation Activities is excluded. The medical devices manufactured by [Company Name] are supplied ready for use and do not require installation activities at the customer site."
-
-**Servicing (Clause 7.5.4):**
-If servicing is not offered:
-> "Clause 7.5.4 Servicing Activities is excluded. [Company Name] does not provide servicing of medical devices after delivery to the customer. Products are intended for single use [or] servicing is performed by authorized service partners under separate contractual arrangements."
-
-**Important:** All exclusions must be justified based on the nature of the organization and products. Exclusions must not affect the organization's ability or responsibility to provide safe and effective medical devices that meet regulatory requirements.
-
-### Section 3: Quality Policy and Objectives
-
-#### 3.1 Quality Policy Statement
-
-**Requirements:**
-- Appropriate to the organization
-- Includes commitment to meeting requirements
-- Includes commitment to maintaining QMS effectiveness
-- Provides framework for quality objectives
-- Signed by top management
-
-**Example:**
-> **QUALITY POLICY**
->
-> [Company Name] is committed to providing safe, effective, and high-quality medical devices that meet or exceed customer expectations and comply with all applicable regulatory requirements.
->
-> We achieve this through:
-> - Maintaining an effective Quality Management System compliant with ISO 13485 and applicable regulatory requirements
-> - Establishing, monitoring, and achieving measurable quality objectives
-> - Continually improving our processes, products, and QMS effectiveness
-> - Ensuring all personnel understand their responsibilities and are properly trained
-> - Managing risks throughout the product lifecycle
-> - Promptly addressing customer feedback and complaints
->
-> This policy is communicated to all employees and reviewed annually to ensure continuing suitability.
->
-> [Signature]
-> [Name], Chief Executive Officer
-> [Date]
+Research basis: **2026-07-23**. This guide explains an evidence-controlled authoring
+process. It does not reproduce ISO 13485 text or prescribe a universal manual format.
-#### 3.2 Quality Objectives
+## Boundary and copyright
-List measurable objectives that support the policy:
-- Customer satisfaction targets
-- Product quality metrics
-- Process performance goals
-- Delivery performance
-- Training completion rates
-- CAPA closure rates
+A quality manual template cannot establish an effective QMS, conformity,
+certification, FDA compliance, MDSAP acceptance, EU conformity, or legal
+applicability. It cannot replace authorized management, RA/QA, legal, notified-body,
+regulatory-authority, MDSAP Auditing Organization, or certification-body decisions.
-**Example:**
-> The organization has established the following measurable quality objectives:
-> 1. Customer satisfaction rating ≥ 4.5 out of 5.0
-> 2. Product defect rate < 0.5% of units shipped
-> 3. On-time delivery ≥ 95%
-> 4. CAPA closed within 60 days ≥ 90%
-> 5. Employee training completion rate ≥ 100% on schedule
-> 6. Internal audit findings addressed within 30 days ≥ 95%
->
-> Quality objectives are reviewed quarterly and revised as necessary to drive continual improvement.
+ISO publications are copyrighted. Obtain ISO 13485 from
+[ISO](https://www.iso.org/standard/59752.html), a national member, or an authorized
+source. Do not paste standard text into the manual. Summarize the organization's
+actual processes and reference its controlled authorized copy.
-#### 3.3 Communication
+## Purpose of a manual
-Explain how policy and objectives are communicated:
-- Employee orientation and training
-- Posted in facility
-- Included in employee handbook
-- Management review meetings
-- Quality meetings
+A useful manual or equivalent policy architecture:
-### Section 4: Quality Management System
+- identifies the approved QMS scope;
+- identifies controlled processes and their interactions;
+- states governance, authorities, and responsibilities;
+- explains the documentation/evidence hierarchy;
+- points to organization-specific controlled procedures and records; and
+- distinguishes the applicable standard, regulatory, audit, and product sources.
-This section describes how you've implemented ISO 13485 Clause 4 requirements.
+The manual should be the length and structure needed for the organization. Page count,
+a fixed procedure list, or mirroring standard headings does not prove adequacy.
-#### 4.1.1 Processes and Their Application
+## Development workflow
-List QMS processes:
-- Management processes (planning, review, communication)
-- Product realization processes (design, purchasing, production, etc.)
-- Support processes (HR, maintenance, document control, etc.)
-- Monitoring and measurement processes (audits, inspections, CAPA, etc.)
+### 1. Establish an authorized source baseline
-Reference the process map in Appendix C.
+Create a controlled source ledger before drafting. At minimum record:
-#### 4.1.2 Process Interactions
+- ISO 13485:2016, Edition 3, and authorized location;
+- the applicable EN adoption/amendment/corrigendum if European harmonisation is
+ being used;
+- current FDA QMSR/eCFR sources if U.S. operations are in declared scope;
+- current MDSAP Audit Approach if MDSAP is in declared scope;
+- current consolidated MDR or IVDR, OJEU harmonised-standard decisions, and relevant
+ MDCG guidance if EU work is in declared scope;
+- ISO 14971/EN A11 and product-specific standards where applicable; and
+- current product/jurisdictional regulations and guidance.
-Describe how processes interact:
-> "The QMS processes are interconnected and sequential. Management review provides direction for all processes. Product realization processes transform customer requirements into delivered products. Support processes enable product realization. Monitoring processes provide feedback for continual improvement. A detailed process map showing interactions is provided in Appendix C."
+For each source, capture publisher, title, edition/version/date, official URL or
+authorized location, access date, owner, currency-review date, impact assessment,
+status, and approval.
-#### 4.1.3 Outsourced Processes
+### 2. Freeze purpose and scope
-If applicable, list outsourced processes and how they're controlled:
-- Sterilization (controlled through supplier qualification and ongoing monitoring)
-- Calibration services (controlled through qualified service providers)
-- Software development (controlled through development agreements and audits)
+Record:
-#### 4.1.4 Risk Management
+- legal entities and sites;
+- product types/families and controlled intended-use references;
+- lifecycle activities performed at each site;
+- outsourced processes and interfaces;
+- markets being considered;
+- organizational and physical boundaries;
+- assurance purpose (ISO certification, FDA, MDSAP, EU, internal); and
+- limitations and unresolved applicability decisions.
-Describe risk management approach:
-> "The organization has established documented requirements for risk management throughout product realization in accordance with ISO 14971. Risk management activities are integrated into design and development, production, and post-market surveillance. Risk management records are maintained as part of the Medical Device File. Refer to SOP-4.1.5 Risk Management."
+Do not let an agent decide applicability. `Undetermined` remains a blocker until an
+authorized human approves a decision and rationale.
-#### 4.1.5 Software Validation
+### 3. Map actual process interactions
-Describe approach to software validation:
-> "Computer software applications used in the QMS, including [list key software systems], are validated prior to initial use and after changes. Validation activities are based on risk assessment and include installation qualification, operational qualification, and performance qualification as appropriate. Refer to SOP-4.1.6 Software Validation."
+Interview accountable process owners and inspect actual records. Build a process map
+from the organization's work—not from copied standard headings.
-#### 4.2 Documentation Requirements
+For each process record:
-Describe the documentation structure (fulfill 4.2.2.d requirement):
+- inputs and outputs;
+- owner, authority, delegate, and escalation;
+- controlled procedure/system;
+- implementation records;
+- interfaces to risk and change control;
+- measures and review method;
+- source/version basis;
+- status and approval.
-**Four-Tier Documentation Structure:**
+Include management, support, product lifecycle, assurance, feedback, and improvement
+processes. Show how complaints/postmarket data update risk, design, production,
+suppliers, CAPA, and management review.
-**Tier 1: Quality Manual** (This Document)
-- Policy-level document
-- Defines QMS scope and structure
-- References all procedures
+### 4. Build a controlled cross-reference
-**Tier 2: Procedures (SOPs)**
-- Define WHAT must be done, WHO does it, WHEN
-- Cover multi-functional activities
-- Include the 31 required documented procedures
+Create a matrix that links manual statements to:
-**Tier 3: Work Instructions (WIs)**
-- Define HOW to perform specific tasks
-- Step-by-step instructions
-- Department or process-specific
+- controlled procedure IDs and revisions;
+- forms and record series;
+- product/device/technical files;
+- risk and traceability evidence;
+- system/software validation;
+- process owners and approvals;
+- source/version criteria; and
+- open gaps/change/CAPA records.
-**Tier 4: Records and Forms**
-- Provide evidence of conformity
-- Demonstrate effective QMS operation
-- Maintained per retention requirements
+Do not describe a referenced document as effective until its approval, effective date,
+training, and availability are evidenced.
-Include a visual diagram of the documentation hierarchy.
+### 5. Draft policy-level content
-#### 4.2.3 Medical Device File
+Use the fail-closed template in
+`assets/templates/quality-manual-template.md`. Keep statements factual and
+organization-specific:
-Describe MDF structure:
-> "A Medical Device File (MDF) is established and maintained for each medical device type or family. The MDF contains all documentation specified in ISO 13485:2016 Clause 4.2.3, including general description, intended use, specifications, procedures, risk management file, and design and development files when applicable. MDF contents and control are defined in SOP-4.2.3 Medical Device File."
+- “The approved process is defined in `<controlled ID/revision>`.”
+- “Evidence is retained in `<controlled record series/location>`.”
+- “`<role>` owns the decision, with approval in `<record ID>`.”
+- “Applicability remains undetermined pending `<authorized review>`.”
-#### 4.2.4 Control of Documents
+Avoid:
-Summarize document control process:
-> "All QMS documents are controlled per SOP-4.2.4 Control of Documents. This ensures documents are approved before use, reviewed and updated as necessary, properly identified with revision status, available at points of use, legible and identifiable, and protected from unintended use of obsolete versions."
+- “The organization is compliant” or “audit ready”;
+- “This template satisfies ISO/FDA/EU requirements”;
+- generic quality policies presented as approved;
+- fixed timelines or retention periods without source/risk basis;
+- unsupported “not applicable” statements;
+- old QSR clause maps presented as current QMSR; and
+- claims that an ISO certificate covers FDA, MDSAP, or EU product conformity.
-#### 4.2.5 Control of Records
+### 6. Review against evidence
-Summarize record control process:
-> "QMS records provide evidence of conformity and effective operation. Records are controlled per SOP-4.2.5 Control of Records to ensure they remain legible, readily identifiable, retrievable, and protected. Records are retained for at least the lifetime of the medical device as defined by the organization, and in accordance with applicable regulatory requirements."
+Perform independent review in two directions:
-### Sections 5-8: Management, Resources, Realization, Measurement
+1. **Manual to evidence:** every material statement points to a current controlled
+ source, procedure, owner, and record set.
+2. **Evidence to manual:** sampled implementation records match the described scope,
+ roles, interactions, and controls.
-For these sections, follow this pattern for each clause:
+Sample across products, sites, shifts/time periods, suppliers, systems, changes, and
+risk as justified. Record limitations and open gaps.
-1. **State the requirement** (what ISO 13485 requires)
-2. **Describe how you meet it** (policy-level summary)
-3. **Reference the detailed procedure(s)**
-4. **Identify responsible parties**
+### 7. Approve, train, release, and maintain
-**Example for Clause 8.2.2 Complaint Handling:**
+Before release:
-> **8.2.2 Complaint Handling**
->
-> The organization has established a documented procedure for timely complaint handling. All complaints are promptly received, recorded, evaluated, investigated, and appropriately resolved. Complaints are analyzed for trends and potential product quality or safety issues. Complaints that meet regulatory reporting criteria are reported to applicable regulatory authorities within required timeframes.
->
-> The Quality Assurance Manager is responsible for complaint handling and ensuring compliance with regulatory requirements.
->
-> Refer to SOP-8.2.2 Complaint Handling for detailed procedures.
+- resolve placeholders;
+- obtain technical, RA/QA, document-control, and authorized management approvals;
+- complete source and applicability reviews;
+- close or formally control open document/process gaps;
+- approve process map and cross-reference;
+- complete affected-person training;
+- verify controlled point-of-use access;
+- assign effective date and obsolete prior revisions; and
+- record maintenance/currency-review triggers.
-Repeat this pattern for all clauses 5.1 through 8.5.3.
+Review when products, sites, roles, processes, suppliers, systems, standards,
+regulations, audit programs, certificates, or postmarket evidence change—not only on
+an arbitrary calendar date.
-### Section 9: Appendices
+## Suggested content architecture
-#### Appendix A: List of Documented Procedures
+### Controlled-document front matter
-Create a table listing all QMS procedures:
+Include document ID, revision, owner, status, effective date, confidentiality,
+controlled location, change record, superseded revision, reviewers, approvers, dates,
+and approval evidence.
-| SOP Number | Title | ISO 13485 Clause | Approval Date | Revision |
-|------------|-------|------------------|---------------|----------|
-| SOP-4.1.5 | Risk Management | 4.1.5 | YYYY-MM-DD | 02 |
-| SOP-4.1.6 | Software Validation | 4.1.6 | YYYY-MM-DD | 01 |
-| SOP-4.2.4 | Control of Documents | 4.2.4 | YYYY-MM-DD | 03 |
-| ... | ... | ... | ... | ... |
+### Purpose, limits, and definitions
-Include all 31 required procedures plus any additional procedures.
+State the intended organizational use and hard boundaries. Use definitions from
+approved organizational and regulatory sources; do not copy protected standard text.
-#### Appendix B: Organization Chart
+### QMS scope and applicability
-Include a current organization chart showing:
-- Reporting relationships
-- Key quality functions
-- Management representative
-- Design responsible (if applicable)
+State entities, sites, products, activities, outsourced processes, and interfaces.
+Reference the approved scope/applicability intake. List unresolved decisions as
+blockers.
-#### Appendix C: Process Map/Interactions
+### Source/version basis
-Include a visual process map showing:
-- All QMS processes
-- Process interactions and sequence
-- Inputs and outputs
-- Interfaces between processes
+Identify exact ISO, FDA, MDSAP, EU, and product sources separately. Include owner and
+currency-review controls.
-This can be a flowchart, swim-lane diagram, or process interaction matrix.
+### Governance and roles
-#### Appendix D: Definitions and Abbreviations
+Describe top-management authority, authorized management representative, RA/QA,
+process owners, document/record control, release authorities, audit independence,
+complaint/reportability roles, CAPA/change approval, delegates, and escalation.
-Comprehensive list of terms and abbreviations used in the QMS.
+### Process architecture
-#### Appendix E: Applicable Regulatory Requirements
+At a policy level, describe and cross-reference:
-Detailed list of all regulatory requirements applicable to your organization:
-- FDA regulations and guidance documents
-- EU regulations and harmonized standards
-- Other regional requirements
-- Recognized consensus standards (e.g., IEC 60601, ISO 14971, etc.)
+- document/record/external-source control;
+- risk management;
+- design/development and transfer/change;
+- suppliers and outsourced processes;
+- production, service, acceptance/release, and traceability;
+- process/equipment/test/software validation;
+- feedback, complaints, postmarket, and vigilance;
+- nonconformity, CAPA, and effectiveness;
+- internal audit and management review;
+- competence/training; and
+- integrated change control.
----
+### Product evidence architecture
-## Development Process
+Explain how product/family files point to requirements, specifications, risk,
+design, validation, production, release, distribution, clinical/performance,
+postmarket, complaint, vigilance, and change evidence. Preserve jurisdiction-specific
+records rather than claiming one file concept replaces another.
-### Step 1: Preparation
-1. Gather reference materials (ISO 13485 standard, regulatory requirements)
-2. Review existing quality documentation
-3. Identify responsible personnel for each clause
-4. Determine applicable exclusions
-
-### Step 2: Drafting
-1. Use the recommended structure above
-2. Start with Sections 0-3 (administrative and policy)
-3. Draft Sections 4-8 using the pattern (requirement, implementation, reference, responsibility)
-4. Complete appendices
-5. Keep at policy level - don't get too detailed
-
-### Step 3: Review and Approval
-1. Technical review by Quality Manager
-2. Management review by top management
-3. Legal review (if needed)
-4. Address all comments
-5. Final approval by CEO or authorized representative
-
-### Step 4: Implementation
-1. Communicate to all employees
-2. Provide training on Quality Manual
-3. Make available at all locations
-4. Establish controlled distribution
-
-### Step 5: Maintenance
-1. Review annually (minimum)
-2. Update when significant changes occur
-3. Keep revision history
-4. Ensure all distributed copies are current
-
----
-
-## Common Mistakes to Avoid
-
-### 1. Too Much Detail
-**Problem:** Including step-by-step procedures in the manual
-**Solution:** Keep at policy level, reference detailed procedures
+### Appendices
-### 2. Copy-Paste from Standard
-**Problem:** Copying text directly from ISO 13485
-**Solution:** Write in your own words describing YOUR QMS
+Use controlled appendices or references for:
-### 3. Inconsistent References
-**Problem:** Referencing procedures that don't exist or have wrong numbers
-**Solution:** Maintain a master list of procedures and verify all references
+- procedure/record index;
+- source ledger;
+- scope/product/site register;
+- organization chart/authorities;
+- process interaction map;
+- risk-design-production-postmarket traceability matrix;
+- supplier/outsourced-process register;
+- validation/software inventory;
+- open gap/change/CAPA register; and
+- certificate/audit scope and status register.
-### 4. Unjustified Exclusions
-**Problem:** Excluding clauses without proper justification
-**Solution:** Carefully justify all exclusions based on business activities
+## Regime-specific cautions
-### 5. No Process Map
-**Problem:** Missing visual representation of process interactions
-**Solution:** Create clear process map in Appendix C
+### FDA QMSR
-### 6. Generic Quality Policy
-**Problem:** Quality policy that could apply to any company
-**Solution:** Make policy specific to your organization and products
+QMSR became effective **2026-02-02**. Describe current Part 820 and relevant FDA
+processes; do not present the former QSR/QSIT structure as current. Link to current
+[21 CFR Part 820](https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820)
+and [Compliance Program 7382.850](https://www.fda.gov/media/80195/download?attachment).
+An ISO certificate does not exempt a manufacturer from FDA inspection.
-### 7. Outdated Content
-**Problem:** Manual doesn't reflect current operations
-**Solution:** Review and update regularly
+### MDSAP
-### 8. Missing Signatures
-**Problem:** No management approval signatures
-**Solution:** Ensure top management signs the document control page and quality policy
+Reference current **MDSAP AU P0002.010** (2026-02-02) and declared participating
+jurisdictions. Do not describe an ISO-only audit as MDSAP or an FDA inspection as
+using the MDSAP plan.
-### 9. No Revision Control
-**Problem:** Multiple versions in circulation
-**Solution:** Implement proper document control per Section 4.2.4
+### EU MDR/IVDR
-### 10. Forgetting Appendix A
-**Problem:** Not including complete list of documented procedures
-**Solution:** Create comprehensive procedure list in Appendix A
+Reference the current consolidated regulation, applicable conformity-assessment
+route, technical documentation, postmarket/vigilance, economic-operator, and
+notified-body evidence separately. Verify notified-body designation scope in NANDO.
+MDCG guidance is nonbinding and must be version-controlled.
----
+### Certification and accreditation
-## Quality Manual Checklist
+Record the certification body's scope and, if accredited certification is sought, the
+accreditation scope relevant to ISO 13485 technical areas. This does not establish
+notified-body designation or product conformity.
-Use this checklist to verify your Quality Manual is complete:
+## Review questions
-### Required Content (ISO 13485 Clause 4.2.2)
-- [ ] Scope of QMS defined
-- [ ] Exclusions identified and justified
-- [ ] Documented procedures listed or referenced
-- [ ] Process interactions described
-- [ ] Documentation structure outlined
-
-### Management Approval
-- [ ] Approved by top management
-- [ ] Approval signature and date included
-- [ ] Document control information complete
-
-### Completeness
-- [ ] All ISO 13485 clauses 4-8 addressed
-- [ ] Quality policy included and signed
-- [ ] Quality objectives defined and measurable
-- [ ] Responsibilities assigned for each clause
-- [ ] All procedures referenced by correct number/title
+- Does the scope match actual sites, products, and activities?
+- Are all applicability decisions owned and approved by authorized humans?
+- Does every statement link to current controlled evidence?
+- Are records sampled, not just procedures listed?
+- Are risk, design, production, suppliers, validation/software, and postmarket
+ connected?
+- Are complaint/vigilance and CAPA decisions owned by authorized roles?
+- Do changes link to validation, training, source/version, and product impacts?
+- Are ISO, FDA, MDSAP, EU, and product-specific claims clearly separated?
+- Are certificate, notified-body, and accreditation scopes accurately bounded?
+- Does the manual avoid compliance, conformity, certification, and readiness claims?
-### Appendices
-- [ ] Appendix A: Complete list of procedures
-- [ ] Appendix B: Organization chart
-- [ ] Appendix C: Process map
-- [ ] Appendix D: Definitions
-- [ ] Appendix E: Regulatory requirements
-
-### Format and Style
-- [ ] Numbered sections and subsections
-- [ ] Consistent terminology
-- [ ] Policy-level (not operational detail)
-- [ ] Clear and understandable
-- [ ] Professional appearance
-
-### References
-- [ ] All referenced procedures exist
-- [ ] All procedure numbers/titles correct
-- [ ] ISO 13485 clauses correctly cited
-- [ ] Regulatory requirements accurately stated
-
-### Distribution and Access
-- [ ] Distribution list established
-- [ ] Controlled copy process defined
-- [ ] Available to all relevant personnel
-- [ ] Training plan for Quality Manual
-
----
-
-## Example Quality Policy Statements
-
-Choose a style appropriate for your organization:
-
-### Example 1: Detailed Commitment
-> **QUALITY POLICY**
->
-> At [Company Name], quality is our highest priority. We are committed to designing, manufacturing, and delivering medical devices that meet the highest standards of safety, performance, and reliability.
->
-> Our commitments include:
-> - Compliance with ISO 13485 and all applicable regulatory requirements
-> - Understanding and meeting customer and patient needs
-> - Establishing and achieving measurable quality objectives
-> - Managing risks throughout the product lifecycle
-> - Continually improving our processes and products
-> - Maintaining competent and motivated personnel
-> - Responding promptly and effectively to feedback and complaints
-> - Fostering a culture of quality and accountability
->
-> This policy applies to all employees, contractors, and suppliers. Every person in our organization is responsible for quality and for supporting our QMS. This policy is reviewed annually and communicated throughout the organization.
->
-> [Signature Block]
-
-### Example 2: Concise Focus
-> **QUALITY POLICY**
->
-> [Company Name] is committed to providing safe and effective medical devices that meet customer expectations and regulatory requirements. We maintain a quality management system compliant with ISO 13485 and continually improve its effectiveness through measurable objectives and employee engagement.
->
-> [Signature Block]
-
-### Example 3: Patient-Centered
-> **QUALITY POLICY**
->
-> Our mission is to improve patient outcomes through innovative, high-quality medical devices. We achieve this by:
-> - Placing patient safety first in all decisions
-> - Complying with ISO 13485 and regulatory requirements
-> - Engaging employees in quality and continuous improvement
-> - Partnering with customers to exceed expectations
-> - Managing risks proactively throughout product lifecycle
->
-> This policy is communicated to all personnel and reviewed for effectiveness.
->
-> [Signature Block]
-
----
-
-## Next Steps After Manual Approval
-
-1. **Conduct training** - Train all employees on the Quality Manual
-2. **Develop procedures** - Create or update the 31 documented procedures
-3. **Create work instructions** - Develop operational-level instructions
-4. **Implement processes** - Put QMS into practice
-5. **Conduct internal audits** - Verify effective implementation
-6. **Management review** - Review QMS effectiveness
-7. **Prepare for certification** - Schedule certification audit when ready
-
----
-
-## Resources and References
-
-- ISO 13485:2016 - Medical devices — Quality management systems
-- ISO 14971 - Application of risk management to medical devices
-- FDA 21 CFR Part 820 - Quality System Regulation (QMSR)
-- EU MDR 2017/745 - Medical Devices Regulation
-- ISO/TR 14969 - Medical devices quality management systems - Guidance on ISO 13485
+Use `scripts/gap_analyzer.py` and `scripts/validate_evidence_manifest.py` only to
+identify structural gaps before substantive human review.
diff --git a/skills/iso-13485-certification/references/source-ledger.md b/skills/iso-13485-certification/references/source-ledger.md
new file mode 100644
index 00000000..95265599
--- /dev/null
+++ b/skills/iso-13485-certification/references/source-ledger.md
@@ -0,0 +1,233 @@
+# Official Source Ledger
+
+**Research date:** 2026-07-23
+**Method:** targeted `parallel-cli search` and `parallel-cli extract`, restricted to
+official publishers and regulator/program sites.
+**Purpose:** version baseline for this skill; not legal advice, an applicability
+decision, certification criteria, or a substitute for controlled source copies.
+
+Recheck every source before operational use. Web pages and consolidated texts can
+change after the research date.
+
+## ISO standards and copyright
+
+### ISO 13485:2016
+
+- Official page:
+ [ISO 13485:2016](https://www.iso.org/standard/59752.html)
+- Verified metadata: Edition 3; publication date 2016-03; stage 90.93
+ (confirmed); 2025 systematic review closed 2025-06-05 and confirmation recorded
+ 2025-10-31.
+- Use: identifies the current international edition and lifecycle status.
+- Limitation: the ISO page is not the complete normative text. Obtain an authorized
+ copy.
+
+### EN ISO 13485:2016/A11:2021 distinction
+
+- Current Commission index:
+ [Harmonised standards](https://health.ec.europa.eu/medical-devices-topics-interest/harmonised-standards_en)
+- Current MDR decision:
+ [Consolidated Decision (EU) 2021/1182, 2026-06-17](https://eur-lex.europa.eu/legal-content/EN/TXT/HTML/?uri=CELEX:02021D1182-20260617)
+- IVDR amendment decision:
+ [Decision (EU) 2022/729](https://eur-lex.europa.eu/eli/dec_impl/2022/729/oj)
+- Verified fact: current EU lists include EN ISO 13485:2016, AC:2018, and
+ A11:2021. A11:2021 is a European EN amendment, not an ISO international
+ “Amendment 1:2021.”
+- Limitation: verify the latest OJEU citation and the exact requirements for which
+ presumption of conformity is claimed; use of harmonised standards is not a blanket
+ product-conformity decision.
+
+### ISO 14971:2019 and European A11
+
+- Official page:
+ [ISO 14971:2019](https://www.iso.org/standard/72704.html)
+- Verified metadata: Edition 3; publication 2019-12; reviewed and confirmed in 2025.
+- EU source:
+ [Decision (EU) 2022/757](https://eur-lex.europa.eu/eli/dec_impl/2022/757/oj/eng)
+- Verified fact: EN ISO 14971:2019/A11:2021 is cited for MDR and, through the
+ corresponding IVDR decision, IVDR support. A11 is European; it does not change the
+ international ISO 14971 normative part.
+- Limitation: risk-management evidence remains product- and jurisdiction-specific.
+
+### ISO copyright
+
+- Official page: [ISO copyright](https://www.iso.org/copyright.html)
+- Verified fact: ISO publications are copyright protected; unauthorized copying,
+ scanning, or distribution is prohibited, and reproduction requires permission.
+- Operational rule: this skill summarizes processes and bibliographic metadata only.
+ Do not paste or generate copyrighted clause text.
+
+## United States: FDA QMSR
+
+### Final rule
+
+- Source:
+ [Medical Devices; Quality System Regulation Amendments](https://www.federalregister.gov/documents/2024/02/02/2024-01709/medical-devices-quality-system-regulation-amendments)
+- Citation/date: 89 FR 7496; published 2024-02-02.
+- Verified effective date: **2026-02-02**.
+- Verified boundary: ISO certification does not exempt a manufacturer from FDA
+ inspection; FDA does not issue ISO 13485 certificates.
+- Correction:
+ [2024 correction](https://www.federalregister.gov/documents/2024/10/15/2024-23701/medical-devices-quality-system-regulation-amendments-correction).
+- Later source:
+ [2025 QMSR technical amendments](https://www.federalregister.gov/documents/2025/12/04/2025-21955/medical-devices-quality-management-system-regulation-technical-amendments).
+ Use the current eCFR rather than reconstructing current requirements from the
+ original final rule alone.
+
+### FDA QMSR landing page
+
+- Source:
+ [Quality Management System Regulation (QMSR)](https://www.fda.gov/medical-devices/postmarket-requirements-devices/quality-management-system-regulation-qmsr)
+- Page update: 2026-02-02.
+- Verified current state: QMSR became effective 2026-02-02; it incorporates
+ ISO 13485:2016 and ISO 9000:2015 Clause 3 by reference, with FDA provisions and
+ other applicable FDA requirements controlling as stated in the regulation.
+- Verified inspection transition: FDA stopped using QSIT and began the inspection
+ process in Compliance Program 7382.850 on 2026-02-02.
+
+### Current eCFR
+
+- Source:
+ [21 CFR Part 820](https://www.ecfr.gov/current/title-21/chapter-I/subchapter-H/part-820)
+- Verified current title: *Quality Management System Regulation*.
+- Verified current structure: Subpart A contains current general provisions; Subpart B
+ contains supplemental provisions; remaining legacy subparts are reserved.
+- Verified incorporation: ISO 13485:2016(E), Third edition, March 1, 2016, and
+ ISO 9000:2015 Clause 3.
+- Operational rule: use the current eCFR and linked current regulations. Do not use
+ the former QSR section structure as a current requirements map.
+- Limitation: eCFR is continuously updated and authoritative but unofficial; consult
+ official CFR/Federal Register publications when legal status matters.
+
+### FDA QMSR FAQ
+
+- Source:
+ [QMSR Frequently Asked Questions](https://www.fda.gov/medical-devices/quality-management-system-regulation-qmsr/quality-management-system-regulation-frequently-asked-questions)
+- Page update: 2026-02-02.
+- Verified implementation status: FDA began enforcing QMSR on the effective date.
+- Verified records point: FDA investigators may review QMS records created before
+ 2026-02-02. The former exemption for management-review, quality-audit, and
+ supplier-audit reports was not retained.
+- Verified boundary: FDA QMSR inspections do not follow the MDSAP audit plan; an
+ ISO certificate does not replace or prevent FDA inspection.
+- Verified access: FDA points to ANSI read-only IBR access for incorporated standards.
+
+### Current inspection program
+
+- Source:
+ [Inspection of Medical Device Manufacturers Compliance Program 7382.850](https://www.fda.gov/media/80195/download?attachment)
+- Effective date: 2026-02-02.
+- Verified use: current FDA inspection process aligned to QMSR; QSIT and the
+ superseded device inspection programs are no longer used.
+- Supplemental education:
+ [April 2026 FDA town hall](https://www.fda.gov/medical-devices/medical-devices-news-and-events/town-hall-fdas-quality-management-system-regulation-qmsr-medical-device-risk-based-inspections).
+- Limitation: prepare evidence for actual applicable FDA requirements; this skill
+ does not predict inspection scope, classification, or enforcement outcome.
+
+## MDSAP and IMDRF
+
+### Current MDSAP Audit Approach
+
+- Source:
+ [MDSAP Audit Approach](https://www.mdsap.global/documents/library/audit-approach)
+- Current document: **MDSAP AU P0002.010**.
+- Version date: **2026-02-02**.
+- Verified high-level model: process-based regulatory audit by recognized Auditing
+ Organizations, with four primary process areas, supporting purchasing linkages, a
+ risk-management foundation, jurisdiction-specific requirements, and a three-year
+ audit cycle.
+- Superseded baseline observed during research: FDA-hosted P0002.009 dated
+ 2024-08-06. Use the current MDSAP.global library instead.
+
+### MDSAP program and IMDRF foundation
+
+- Current program site:
+ [MDSAP.global](https://www.mdsap.global/)
+- IMDRF background:
+ [IMDRF MDSAP working group](https://www.imdrf.org/working-groups/medical-device-single-audit-program-mdsap)
+- FDA program page:
+ [Medical Device Single Audit Program](https://www.fda.gov/medical-devices/cdrh-international-affairs/medical-device-single-audit-program-mdsap)
+- Verified status: IMDRF development work moved to implementation; current MDSAP
+ documents are managed on MDSAP.global.
+- Boundary: an MDSAP audit is not generic ISO certification, an FDA inspection plan,
+ or EU notified-body conformity assessment.
+
+## European Union: MDR, IVDR, and MDCG
+
+### MDR
+
+- Source:
+ [Regulation (EU) 2017/745, consolidated 2026-01-01](https://eur-lex.europa.eu/eli/reg/2017/745/2026-01-01/eng)
+- Verified status as of research: consolidated version dated 2026-01-01.
+- Relevant scope for this skill: manufacturer QMS, technical documentation,
+ conformity assessment, notified bodies, postmarket surveillance, vigilance, and
+ market surveillance.
+- Limitation: consolidated texts are documentation tools; authentic acts are those
+ published in the Official Journal.
+
+### IVDR
+
+- Source:
+ [Regulation (EU) 2017/746, consolidated 2025-01-10](https://eur-lex.europa.eu/eli/reg/2017/746/2025-01-10/eng)
+- Verified status as of research: 2025-01-10 was the current consolidated version.
+- Relevant scope for this skill: IVD QMS, technical/performance documentation,
+ conformity assessment, notified bodies, postmarket surveillance, vigilance, and
+ market surveillance.
+- Limitation: transitional provisions and device-specific deadlines require current,
+ authorized analysis; this skill does not calculate them.
+
+### MDCG guidance
+
+- Source:
+ [MDCG endorsed documents and other guidance](https://health.ec.europa.eu/medical-devices-sector/new-regulations/guidance-mdcg-endorsed-documents-and-other-guidance_en)
+- Verified legal status: MDCG guidance is not legally binding; it expresses a common
+ implementation understanding and is regularly revised or archived.
+- Relevant current item:
+ [MDCG 2025-10, post-market surveillance](https://health.ec.europa.eu/document/download/a9ad86b7-1b8e-4bae-beb4-48b2b3ed2f05_en?filename=mdcg_2025-10_en.pdf),
+ published December 2025.
+- Other items must be selected by device, role, transition, and conformity route.
+
+## Notified bodies, certification, and accreditation
+
+### EU notified bodies
+
+- Commission overview:
+ [Notified bodies for medical devices](https://health.ec.europa.eu/medical-devices-topics-interest/notified-bodies-medical-devices_en)
+- Official list:
+ [NANDO](https://webgate.ec.europa.eu/single-market-compliance-space/notified-bodies)
+- Verified boundary: Member States designate and notify bodies for defined
+ legislation, conformity-assessment tasks, and product/designation codes. NANDO
+ lists the current notified scope.
+- Operational rule: verify legislation, annex/task, and designation-code scope.
+ Accreditation or ISO certification alone is not notified-body designation.
+
+### ISO 13485 certification-body accreditation
+
+- Current Global ACI documents:
+ [Global ACI document library](https://global-aci.org/en/global_aci-documents/)
+- Current cross-reference:
+ [Global ACI–IAF/ILAC table, version 1.2, 2026-06-10](https://sys.global-aci.org/uploads/documents/Global_ACI_IAF_and_ILAC_Document_Cross-Reference_Table_10_June_20262.pdf)
+- Carried document:
+ [IAF MD 9:2023 Issue 5](https://sys.global-aci.org/uploads/documents/IAF_MD9_Issue_5_20112023.pdf)
+- Verified transition: Global Accreditation Cooperation Incorporated began full
+ operations on 2026-01-01, replacing IAF/ILAC operational functions. The
+ 2026-06-10 table showed successor Global ACI documents for former MD 8/MD 9 as
+ in process while the prior documents remained in the current library.
+- Verified boundary: MD 9 concerns bodies auditing/certifying management systems to
+ ISO 13485 under ISO/IEC 17021-1. It does not establish product conformity,
+ notified-body designation, regulatory applicability, or market authorization.
+
+## Research queries used
+
+Parallel searches/extracts covered:
+
+- ISO 13485 edition, review/confirmation, and amendment metadata;
+- ISO versus EN A11:2021 distinction and current EU citations;
+- FDA final rule, QMSR page/FAQ, eCFR Part 820, and Compliance Program 7382.850;
+- current MDSAP/IMDRF program and Audit Approach version;
+- current MDR/IVDR consolidated versions and MDCG guidance;
+- ISO 14971 and EN A11 status;
+- NANDO/notified-body designation boundaries; and
+- the 2026 Global ACI transition and current MD 8/MD 9 documents.
+
+No Parallel research JSON was saved in the repository.
diff --git a/skills/iso-13485-certification/scripts/_catalog.py b/skills/iso-13485-certification/scripts/_catalog.py
new file mode 100644
index 00000000..0390fc32
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/_catalog.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python3
+"""Public-process labels used by the local evidence checks.
+
+The labels are workflow topics, not ISO clause text or a substitute for an
+authorized copy of any standard.
+"""
+
+from __future__ import annotations
+
+PROCESS_DOMAINS = (
+ "scope-and-roles",
+ "document-and-record-control",
+ "risk-management",
+ "design-and-development",
+ "supplier-controls",
+ "production-and-service",
+ "process-and-software-validation",
+ "identification-and-traceability",
+ "complaints-and-feedback",
+ "postmarket-and-vigilance",
+ "nonconformity-and-capa",
+ "internal-audit",
+ "management-review",
+ "training-and-competence",
+ "change-control",
+)
+
+QMSR_TRANSITION_ITEMS = (
+ "qmsr-source-basis",
+ "applicability-owner",
+ "fda-supplemental-provisions",
+ "legacy-qsr-reference-disposition",
+ "pre-effective-date-record-review",
+ "inspection-accessible-records",
+ "inspection-process-training",
+ "qsit-retirement",
+ "complaint-and-servicing-records",
+ "labeling-and-packaging-controls",
+ "software-validation-impact",
+ "supplier-and-outsourced-process-controls",
+ "certificate-claims-review",
+ "change-control-approval",
+)
+
+TRACEABILITY_LINKS = (
+ "intended_use",
+ "hazard_or_signal",
+ "risk_evaluation",
+ "risk_control",
+ "design_input",
+ "design_output",
+ "verification",
+ "validation",
+ "production_control",
+ "postmarket_source",
+)
diff --git a/skills/iso-13485-certification/scripts/_common.py b/skills/iso-13485-certification/scripts/_common.py
new file mode 100644
index 00000000..e331189b
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/_common.py
@@ -0,0 +1,518 @@
+#!/usr/bin/env python3
+"""Shared, bounded helpers for local QMS evidence checks.
+
+These helpers validate structure and evidence metadata only. They never determine
+regulatory applicability, conformity, compliance, certification, or audit outcome.
+"""
+
+from __future__ import annotations
+
+import argparse
+import json
+import re
+import sys
+from dataclasses import dataclass
+from datetime import date
+from pathlib import Path
+from typing import Any, Iterable
+
+MAX_INPUT_BYTES = 2_000_000
+MAX_ITEMS = 5_000
+MAX_DEPTH = 30
+MAX_TEXT_CHARS = 20_000
+EXIT_OK = 0
+EXIT_FINDINGS = 1
+EXIT_INPUT_ERROR = 2
+
+ALLOWED_STATUSES = {
+ "draft",
+ "in-review",
+ "approved",
+ "implemented",
+ "verified",
+ "closed",
+ "not-applicable",
+}
+APPROVAL_STATUSES = {"pending", "approved", "rejected"}
+EVIDENCE_TYPES = {
+ "document",
+ "record",
+ "report",
+ "log",
+ "training",
+ "validation",
+ "approval",
+ "other",
+}
+PLACEHOLDER_RE = re.compile(
+ r"^(?:tbd|todo|unknown|replace[-_ ]?me|n/?a\s+without\s+rationale|"
+ r"<[^>]+>|\[[^\]]+\])$",
+ re.IGNORECASE,
+)
+
+DISCLAIMER = (
+ "Structural evidence check only. A zero-finding result does not establish "
+ "legal applicability, regulatory compliance, ISO conformity or certification, "
+ "MDSAP acceptability, EU conformity, or inspection readiness."
+)
+
+
+class InputError(ValueError):
+ """Raised for unsafe, unreadable, or invalid input."""
+
+
+@dataclass(frozen=True)
+class Finding:
+ """One deterministic structural or evidence finding."""
+
+ code: str
+ path: str
+ message: str
+ severity: str = "gap"
+
+ def as_dict(self) -> dict[str, str]:
+ return {
+ "code": self.code,
+ "message": self.message,
+ "path": self.path,
+ "severity": self.severity,
+ }
+
+
+def _reject_constant(value: str) -> None:
+ raise InputError(f"non-finite JSON number is not permitted: {value}")
+
+
+def _unique_object(pairs: list[tuple[str, Any]]) -> dict[str, Any]:
+ result: dict[str, Any] = {}
+ for key, value in pairs:
+ if key in result:
+ raise InputError(f"duplicate JSON key is not permitted: {key}")
+ result[key] = value
+ return result
+
+
+def _check_depth_and_size(value: Any) -> None:
+ stack: list[tuple[Any, int]] = [(value, 1)]
+ items = 0
+ while stack:
+ current, depth = stack.pop()
+ if depth > MAX_DEPTH:
+ raise InputError(f"JSON nesting exceeds {MAX_DEPTH} levels")
+ if isinstance(current, dict):
+ items += len(current)
+ stack.extend((item, depth + 1) for item in current.values())
+ elif isinstance(current, list):
+ items += len(current)
+ stack.extend((item, depth + 1) for item in current)
+ elif isinstance(current, str) and len(current) > MAX_TEXT_CHARS:
+ raise InputError(
+ f"JSON string exceeds {MAX_TEXT_CHARS} characters"
+ )
+ if items > MAX_ITEMS:
+ raise InputError(f"JSON contains more than {MAX_ITEMS} items")
+
+
+def _safe_input_file(path_text: str, suffixes: set[str]) -> Path:
+ path = Path(path_text)
+ if path.is_symlink():
+ raise InputError(f"symbolic-link input is refused: {path}")
+ try:
+ stat = path.stat()
+ except OSError as exc:
+ raise InputError(f"cannot stat input {path}: {exc}") from exc
+ if not path.is_file():
+ raise InputError(f"input is not a regular file: {path}")
+ if path.suffix.lower() not in suffixes:
+ expected = ", ".join(sorted(suffixes))
+ raise InputError(f"input suffix must be one of: {expected}")
+ if stat.st_size > MAX_INPUT_BYTES:
+ raise InputError(
+ f"input exceeds {MAX_INPUT_BYTES} bytes: {stat.st_size}"
+ )
+ return path
+
+
+def load_json(path_text: str) -> Any:
+ """Load bounded UTF-8 JSON, rejecting links, duplicates, and non-finite values."""
+
+ path = _safe_input_file(path_text, {".json"})
+ try:
+ text = path.read_text(encoding="utf-8")
+ except (OSError, UnicodeError) as exc:
+ raise InputError(f"cannot read UTF-8 JSON {path}: {exc}") from exc
+ try:
+ value = json.loads(
+ text,
+ object_pairs_hook=_unique_object,
+ parse_constant=_reject_constant,
+ )
+ except InputError:
+ raise
+ except (json.JSONDecodeError, RecursionError) as exc:
+ raise InputError(f"invalid JSON in {path}: {exc}") from exc
+ _check_depth_and_size(value)
+ return value
+
+
+def load_markdown(path_text: str) -> str:
+ """Load bounded local Markdown without interpreting embedded content."""
+
+ path = _safe_input_file(path_text, {".md", ".markdown"})
+ try:
+ text = path.read_text(encoding="utf-8")
+ except (OSError, UnicodeError) as exc:
+ raise InputError(f"cannot read UTF-8 Markdown {path}: {exc}") from exc
+ if "\x00" in text:
+ raise InputError(f"NUL byte is not permitted in Markdown: {path}")
+ return text
+
+
+def require_root_object(value: Any) -> dict[str, Any]:
+ if not isinstance(value, dict):
+ raise InputError("JSON root must be an object")
+ return value
+
+
+def is_placeholder(value: Any) -> bool:
+ return (
+ not isinstance(value, str)
+ or not value.strip()
+ or bool(PLACEHOLDER_RE.fullmatch(value.strip()))
+ )
+
+
+def valid_iso_date(value: Any) -> bool:
+ if not isinstance(value, str):
+ return False
+ try:
+ date.fromisoformat(value)
+ except ValueError:
+ return False
+ return True
+
+
+class Review:
+ """Accumulates fail-closed findings while preserving deterministic order."""
+
+ def __init__(self) -> None:
+ self.findings: list[Finding] = []
+
+ def add(
+ self,
+ code: str,
+ path: str,
+ message: str,
+ severity: str = "gap",
+ ) -> None:
+ self.findings.append(Finding(code, path, message, severity))
+
+ def object(self, value: Any, path: str) -> dict[str, Any] | None:
+ if not isinstance(value, dict):
+ self.add("TYPE_OBJECT", path, "must be an object")
+ return None
+ return value
+
+ def list(
+ self,
+ value: Any,
+ path: str,
+ *,
+ min_items: int = 1,
+ max_items: int = MAX_ITEMS,
+ ) -> list[Any] | None:
+ if not isinstance(value, list):
+ self.add("TYPE_LIST", path, "must be an array")
+ return None
+ if len(value) < min_items:
+ self.add("LIST_EMPTY", path, f"must contain at least {min_items} item(s)")
+ if len(value) > max_items:
+ self.add("LIST_BOUNDED", path, f"must contain at most {max_items} items")
+ return value[:max_items]
+ return value
+
+ def text(
+ self,
+ obj: dict[str, Any],
+ key: str,
+ path: str,
+ *,
+ max_chars: int = 500,
+ ) -> str | None:
+ value = obj.get(key)
+ field_path = f"{path}.{key}"
+ if is_placeholder(value):
+ self.add("TEXT_REQUIRED", field_path, "requires non-placeholder text")
+ return None
+ assert isinstance(value, str)
+ if len(value) > max_chars:
+ self.add(
+ "TEXT_BOUNDED",
+ field_path,
+ f"must not exceed {max_chars} characters",
+ )
+ return value.strip()
+
+ def choice(
+ self,
+ obj: dict[str, Any],
+ key: str,
+ allowed: set[str],
+ path: str,
+ ) -> str | None:
+ value = obj.get(key)
+ field_path = f"{path}.{key}"
+ if not isinstance(value, str) or value not in allowed:
+ self.add(
+ "CHOICE_INVALID",
+ field_path,
+ f"must be one of: {', '.join(sorted(allowed))}",
+ )
+ return None
+ return value
+
+ def date(
+ self,
+ obj: dict[str, Any],
+ key: str,
+ path: str,
+ *,
+ required: bool = True,
+ ) -> str | None:
+ value = obj.get(key)
+ field_path = f"{path}.{key}"
+ if value in (None, "") and not required:
+ return None
+ if not valid_iso_date(value):
+ self.add("DATE_INVALID", field_path, "must be an ISO date (YYYY-MM-DD)")
+ return None
+ return str(value)
+
+ def unique_ids(
+ self,
+ rows: Iterable[Any],
+ path: str,
+ *,
+ key: str = "id",
+ ) -> None:
+ seen: set[str] = set()
+ for index, row in enumerate(rows):
+ if not isinstance(row, dict):
+ continue
+ value = row.get(key)
+ if not isinstance(value, str) or not value.strip():
+ continue
+ if value in seen:
+ self.add(
+ "ID_DUPLICATE",
+ f"{path}[{index}].{key}",
+ f"duplicate identifier: {value}",
+ )
+ seen.add(value)
+
+ def evidence(
+ self,
+ obj: dict[str, Any],
+ path: str,
+ *,
+ min_items: int = 1,
+ ) -> list[dict[str, Any]]:
+ raw = self.list(obj.get("evidence"), f"{path}.evidence", min_items=min_items)
+ if raw is None:
+ return []
+ evidence: list[dict[str, Any]] = []
+ for index, item in enumerate(raw):
+ item_path = f"{path}.evidence[{index}]"
+ record = self.object(item, item_path)
+ if record is None:
+ continue
+ self.text(record, "id", item_path, max_chars=120)
+ self.choice(record, "type", EVIDENCE_TYPES, item_path)
+ self.text(record, "location", item_path, max_chars=1_000)
+ self.text(record, "revision_or_date", item_path, max_chars=120)
+ evidence.append(record)
+ self.unique_ids(evidence, f"{path}.evidence")
+ return evidence
+
+ def approval(
+ self,
+ obj: dict[str, Any],
+ path: str,
+ *,
+ require_approved: bool,
+ ) -> dict[str, Any] | None:
+ approval_path = f"{path}.approval"
+ approval = self.object(obj.get("approval"), approval_path)
+ if approval is None:
+ return None
+ status = self.choice(
+ approval,
+ "status",
+ APPROVAL_STATUSES,
+ approval_path,
+ )
+ if require_approved and status != "approved":
+ self.add(
+ "APPROVAL_PENDING",
+ f"{approval_path}.status",
+ "human approval must be recorded as approved",
+ )
+ if status == "approved":
+ self.text(approval, "by", approval_path, max_chars=200)
+ self.date(approval, "date", approval_path)
+ return approval
+
+ def source_refs(
+ self,
+ obj: dict[str, Any],
+ path: str,
+ *,
+ min_items: int = 1,
+ ) -> list[dict[str, Any]]:
+ raw = self.list(
+ obj.get("source_refs"),
+ f"{path}.source_refs",
+ min_items=min_items,
+ )
+ if raw is None:
+ return []
+ sources: list[dict[str, Any]] = []
+ for index, item in enumerate(raw):
+ item_path = f"{path}.source_refs[{index}]"
+ source = self.object(item, item_path)
+ if source is None:
+ continue
+ self.text(source, "id", item_path, max_chars=120)
+ self.text(source, "title", item_path, max_chars=300)
+ self.text(source, "version_or_date", item_path, max_chars=120)
+ url = self.text(source, "url", item_path, max_chars=1_000)
+ if url is not None and not url.startswith("https://"):
+ self.add(
+ "SOURCE_URL",
+ f"{item_path}.url",
+ "must use an https official-source URL",
+ )
+ self.date(source, "accessed", item_path)
+ sources.append(source)
+ self.unique_ids(sources, f"{path}.source_refs")
+ return sources
+
+ def controlled_item(
+ self,
+ obj: dict[str, Any],
+ path: str,
+ *,
+ require_approved: bool = True,
+ require_sources: bool = True,
+ ) -> None:
+ self.text(obj, "owner", path, max_chars=200)
+ self.choice(obj, "status", ALLOWED_STATUSES, path)
+ self.evidence(obj, path)
+ self.approval(obj, path, require_approved=require_approved)
+ if require_sources:
+ self.source_refs(obj, path)
+
+
+def standard_parser(description: str, input_help: str) -> argparse.ArgumentParser:
+ parser = argparse.ArgumentParser(
+ description=description,
+ epilog=DISCLAIMER,
+ )
+ parser.add_argument("input", help=input_help)
+ parser.add_argument(
+ "--output",
+ help="Write the JSON report locally instead of stdout",
+ )
+ parser.add_argument(
+ "--force",
+ action="store_true",
+ help="Allow replacing an existing regular output file",
+ )
+ parser.add_argument(
+ "--compact",
+ action="store_true",
+ help="Emit compact JSON",
+ )
+ return parser
+
+
+def build_report(
+ tool: str,
+ findings: Iterable[Finding],
+ *,
+ metrics: dict[str, Any] | None = None,
+ basis: str = "2026-07-23",
+) -> dict[str, Any]:
+ ordered = sorted(
+ findings,
+ key=lambda item: (item.path, item.code, item.message, item.severity),
+ )
+ return {
+ "basis_date": basis,
+ "disclaimer": DISCLAIMER,
+ "findings": [item.as_dict() for item in ordered],
+ "metrics": metrics or {},
+ "result": "gaps-found" if ordered else "complete-for-human-review",
+ "tool": tool,
+ }
+
+
+def emit_report(
+ report: dict[str, Any],
+ output: str | None,
+ *,
+ force: bool,
+ compact: bool,
+) -> None:
+ text = json.dumps(
+ report,
+ ensure_ascii=False,
+ indent=None if compact else 2,
+ sort_keys=True,
+ allow_nan=False,
+ )
+ if not compact:
+ text += "\n"
+ if output is None:
+ sys.stdout.write(text)
+ return
+ path = Path(output)
+ if path.is_symlink():
+ raise InputError(f"symbolic-link output is refused: {path}")
+ if path.exists():
+ if not path.is_file():
+ raise InputError(f"output is not a regular file: {path}")
+ if not force:
+ raise InputError(
+ f"output exists; pass --force to replace it: {path}"
+ )
+ try:
+ path.write_text(text, encoding="utf-8")
+ except OSError as exc:
+ raise InputError(f"cannot write output {path}: {exc}") from exc
+
+
+def finish(
+ tool: str,
+ review: Review,
+ args: argparse.Namespace,
+ *,
+ metrics: dict[str, Any] | None = None,
+) -> int:
+ report = build_report(tool, review.findings, metrics=metrics)
+ emit_report(
+ report,
+ args.output,
+ force=args.force,
+ compact=args.compact,
+ )
+ return EXIT_FINDINGS if review.findings else EXIT_OK
+
+
+def guarded_main(main_function: Any) -> None:
+ try:
+ code = int(main_function())
+ except InputError as exc:
+ print(f"INPUT_ERROR: {exc}", file=sys.stderr)
+ code = EXIT_INPUT_ERROR
+ raise SystemExit(code)
diff --git a/skills/iso-13485-certification/scripts/audit_document_records.py b/skills/iso-13485-certification/scripts/audit_document_records.py
new file mode 100644
index 00000000..623501e5
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/audit_document_records.py
@@ -0,0 +1,148 @@
+#!/usr/bin/env python3
+"""Audit local document/record register metadata without opening evidence files."""
+
+from __future__ import annotations
+
+from typing import Any
+
+from _common import (
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+DOCUMENT_STATUSES = {"draft", "in-review", "effective", "obsolete"}
+RECORD_STATUSES = {"active", "archived", "disposed"}
+EXTERNAL_STATUSES = {"current", "review-due", "superseded"}
+
+
+def _core(
+ review: Review,
+ item: dict[str, Any],
+ path: str,
+ *,
+ require_approved: bool,
+) -> None:
+ review.text(item, "owner", path, max_chars=200)
+ review.evidence(item, path)
+ review.approval(item, path, require_approved=require_approved)
+ review.source_refs(item, path)
+
+
+def validate(data: dict[str, Any]) -> tuple[Review, dict[str, int]]:
+ review = Review()
+
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "register_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ documents = review.list(data.get("documents"), "documents", min_items=1) or []
+ document_ids: set[str] = set()
+ for index, value in enumerate(documents):
+ path = f"documents[{index}]"
+ item = review.object(value, path)
+ if item is None:
+ continue
+ identifier = review.text(item, "id", path, max_chars=120)
+ if identifier:
+ document_ids.add(identifier)
+ review.text(item, "title", path, max_chars=300)
+ review.text(item, "document_type", path, max_chars=120)
+ review.text(item, "revision", path, max_chars=80)
+ status = review.choice(item, "status", DOCUMENT_STATUSES, path)
+ review.text(item, "change_summary", path, max_chars=2_000)
+ review.text(item, "training_impact", path, max_chars=1_000)
+ _core(review, item, path, require_approved=status == "effective")
+ if status == "effective":
+ review.date(item, "effective_date", path)
+ if status == "obsolete":
+ review.text(item, "disposition", path, max_chars=500)
+ review.date(item, "obsolete_date", path)
+ review.unique_ids(documents, "documents")
+
+ for index, value in enumerate(documents):
+ if not isinstance(value, dict):
+ continue
+ supersedes = value.get("supersedes")
+ if supersedes in (None, ""):
+ continue
+ if not isinstance(supersedes, str) or supersedes not in document_ids:
+ review.add(
+ "REFERENCE_MISSING",
+ f"documents[{index}].supersedes",
+ "must reference another document id in this register",
+ )
+
+ records = review.list(data.get("records"), "records", min_items=1) or []
+ for index, value in enumerate(records):
+ path = f"records[{index}]"
+ item = review.object(value, path)
+ if item is None:
+ continue
+ review.text(item, "id", path, max_chars=120)
+ review.text(item, "record_type", path, max_chars=200)
+ status = review.choice(item, "status", RECORD_STATUSES, path)
+ review.text(item, "retention_period", path, max_chars=300)
+ review.text(item, "retention_basis", path, max_chars=1_000)
+ review.text(item, "storage_and_integrity_controls", path, max_chars=2_000)
+ review.text(item, "retrieval_method", path, max_chars=1_000)
+ review.text(item, "disposition_method", path, max_chars=1_000)
+ _core(review, item, path, require_approved=True)
+ if status == "disposed":
+ review.date(item, "disposition_date", path)
+ review.text(item, "disposition_authorized_by", path, max_chars=200)
+ review.unique_ids(records, "records")
+
+ external = (
+ review.list(
+ data.get("external_sources"),
+ "external_sources",
+ min_items=1,
+ )
+ or []
+ )
+ for index, value in enumerate(external):
+ path = f"external_sources[{index}]"
+ item = review.object(value, path)
+ if item is None:
+ continue
+ review.text(item, "id", path, max_chars=120)
+ review.text(item, "title", path, max_chars=300)
+ review.text(item, "publisher", path, max_chars=200)
+ review.text(item, "version_or_date", path, max_chars=120)
+ status = review.choice(item, "status", EXTERNAL_STATUSES, path)
+ review.date(item, "last_currency_review", path)
+ _core(review, item, path, require_approved=status == "current")
+ if status != "current":
+ review.add(
+ "SOURCE_NOT_CURRENT",
+ f"{path}.status",
+ "source requires documented impact assessment or replacement",
+ )
+ review.unique_ids(external, "external_sources")
+
+ return review, {
+ "documents": len(documents),
+ "external_sources": len(external),
+ "records": len(records),
+ }
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Audit a bounded local document, record, and external-source register.",
+ "Path to the local document-register JSON file",
+ )
+ args = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(data)
+ return finish("audit_document_records", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/check_capa.py b/skills/iso-13485-certification/scripts/check_capa.py
new file mode 100644
index 00000000..e1586621
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/check_capa.py
@@ -0,0 +1,240 @@
+#!/usr/bin/env python3
+"""Check CAPA record structure, evidence, and effectiveness gates."""
+
+from __future__ import annotations
+
+from typing import Any
+
+from _common import (
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+CAPA_STATUSES = {
+ "open",
+ "investigating",
+ "actions-in-progress",
+ "effectiveness-pending",
+ "closed",
+ "cancelled",
+}
+EFFECTIVENESS_RESULTS = {"pending", "effective", "ineffective"}
+RISK_DECISIONS = {"escalate", "control-and-monitor", "no-escalation"}
+
+
+def _text_array(
+ review: Review,
+ value: Any,
+ path: str,
+ *,
+ min_items: int = 1,
+) -> list[str]:
+ raw = review.list(value, path, min_items=min_items)
+ if raw is None:
+ return []
+ result: list[str] = []
+ for index, item in enumerate(raw):
+ if not isinstance(item, str) or not item.strip():
+ review.add(
+ "TEXT_REQUIRED",
+ f"{path}[{index}]",
+ "requires non-placeholder text",
+ )
+ else:
+ result.append(item.strip())
+ return result
+
+
+def validate(data: dict[str, Any]) -> tuple[Review, dict[str, int]]:
+ review = Review()
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "register_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ capas = review.list(data.get("capas"), "capas", min_items=1) or []
+ closed = 0
+ for index, value in enumerate(capas):
+ path = f"capas[{index}]"
+ capa = review.object(value, path)
+ if capa is None:
+ continue
+ review.text(capa, "id", path, max_chars=120)
+ review.text(capa, "owner", path, max_chars=200)
+ status = review.choice(capa, "status", CAPA_STATUSES, path)
+ review.text(capa, "source_event", path, max_chars=1_000)
+ review.text(capa, "problem_statement", path, max_chars=2_000)
+ review.text(capa, "scope", path, max_chars=2_000)
+ review.text(capa, "correction_or_containment", path, max_chars=2_000)
+ review.evidence(capa, path)
+ review.source_refs(capa, path)
+ review.approval(capa, path, require_approved=status in {"closed", "cancelled"})
+
+ risk_path = f"{path}.risk_assessment"
+ risk = review.object(capa.get("risk_assessment"), risk_path)
+ if risk is not None:
+ review.text(risk, "patient_and_user_impact", risk_path, max_chars=2_000)
+ review.text(risk, "product_and_process_impact", risk_path, max_chars=2_000)
+ review.text(risk, "reportability_review", risk_path, max_chars=2_000)
+ review.choice(risk, "decision", RISK_DECISIONS, risk_path)
+ review.text(risk, "decision_rationale", risk_path, max_chars=2_000)
+ review.text(risk, "owner", risk_path, max_chars=200)
+ review.evidence(risk, risk_path)
+ review.approval(risk, risk_path, require_approved=True)
+
+ investigation_path = f"{path}.investigation"
+ investigation = review.object(capa.get("investigation"), investigation_path)
+ if investigation is not None:
+ review.text(investigation, "method", investigation_path, max_chars=500)
+ review.text(
+ investigation,
+ "root_cause_or_justified_conclusion",
+ investigation_path,
+ max_chars=3_000,
+ )
+ review.text(
+ investigation,
+ "systemic_extent_review",
+ investigation_path,
+ max_chars=2_000,
+ )
+ review.text(investigation, "owner", investigation_path, max_chars=200)
+ review.evidence(investigation, investigation_path)
+ review.approval(
+ investigation,
+ investigation_path,
+ require_approved=status not in {"open", "investigating"},
+ )
+
+ actions = review.list(capa.get("actions"), f"{path}.actions", min_items=1) or []
+ all_implemented = True
+ for action_index, action_value in enumerate(actions):
+ action_path = f"{path}.actions[{action_index}]"
+ action = review.object(action_value, action_path)
+ if action is None:
+ all_implemented = False
+ continue
+ review.text(action, "id", action_path, max_chars=120)
+ review.text(action, "description", action_path, max_chars=2_000)
+ review.text(action, "owner", action_path, max_chars=200)
+ review.date(action, "due_date", action_path)
+ implemented = action.get("implemented_date")
+ if implemented in (None, ""):
+ all_implemented = False
+ if status in {"effectiveness-pending", "closed"}:
+ review.add(
+ "ACTION_NOT_IMPLEMENTED",
+ f"{action_path}.implemented_date",
+ "implemented date is required at this CAPA status",
+ )
+ else:
+ review.date(action, "implemented_date", action_path)
+ review.evidence(action, action_path)
+ review.approval(action, action_path, require_approved=True)
+ review.unique_ids(actions, f"{path}.actions")
+
+ _text_array(
+ review,
+ capa.get("change_control_refs"),
+ f"{path}.change_control_refs",
+ min_items=1,
+ )
+
+ effect_path = f"{path}.effectiveness"
+ effectiveness = review.object(capa.get("effectiveness"), effect_path)
+ result = None
+ if effectiveness is not None:
+ review.text(effectiveness, "plan", effect_path, max_chars=2_000)
+ review.text(
+ effectiveness,
+ "objective_acceptance_criteria",
+ effect_path,
+ max_chars=2_000,
+ )
+ review.text(effectiveness, "baseline", effect_path, max_chars=1_000)
+ review.text(
+ effectiveness,
+ "sample_or_observation_window",
+ effect_path,
+ max_chars=1_000,
+ )
+ review.date(effectiveness, "due_date", effect_path)
+ review.text(effectiveness, "owner", effect_path, max_chars=200)
+ review.text(
+ effectiveness,
+ "independent_reviewer",
+ effect_path,
+ max_chars=200,
+ )
+ result = review.choice(
+ effectiveness,
+ "result",
+ EFFECTIVENESS_RESULTS,
+ effect_path,
+ )
+ if result != "pending":
+ review.text(
+ effectiveness,
+ "conclusion",
+ effect_path,
+ max_chars=2_000,
+ )
+ review.date(effectiveness, "review_date", effect_path)
+ review.evidence(effectiveness, effect_path)
+ review.approval(
+ effectiveness,
+ effect_path,
+ require_approved=True,
+ )
+
+ if status == "closed":
+ closed += 1
+ if not all_implemented:
+ review.add(
+ "CLOSURE_BLOCKED",
+ path,
+ "closed CAPA has unimplemented actions",
+ "blocker",
+ )
+ if result != "effective":
+ review.add(
+ "CLOSURE_BLOCKED",
+ f"{effect_path}.result",
+ "closed CAPA requires approved effective result",
+ "blocker",
+ )
+ review.date(capa, "closure_date", path)
+ review.text(capa, "closure_summary", path, max_chars=2_000)
+ elif result == "ineffective":
+ review.add(
+ "REOPEN_REQUIRED",
+ f"{effect_path}.result",
+ "ineffective action must not be closed and needs documented follow-up",
+ "blocker",
+ )
+
+ if status == "cancelled":
+ review.text(capa, "cancellation_rationale", path, max_chars=2_000)
+
+ review.unique_ids(capas, "capas")
+ return review, {"capas": len(capas), "closed_capas": closed}
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Check CAPA records and fail closed on missing effectiveness evidence.",
+ "Path to the local CAPA JSON file",
+ )
+ args = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(data)
+ return finish("check_capa", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/check_qmsr_transition.py b/skills/iso-13485-certification/scripts/check_qmsr_transition.py
new file mode 100644
index 00000000..ecaf38df
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/check_qmsr_transition.py
@@ -0,0 +1,164 @@
+#!/usr/bin/env python3
+"""Check documented evidence for the post-effective-date FDA QMSR transition."""
+
+from __future__ import annotations
+
+from typing import Any
+
+from _catalog import QMSR_TRANSITION_ITEMS
+from _common import (
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+ITEM_STATUSES = {
+ "not-started",
+ "in-progress",
+ "evidence-ready",
+ "not-applicable",
+}
+
+
+def validate(data: dict[str, Any]) -> tuple[Review, dict[str, int]]:
+ review = Review()
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "checklist_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ basis = review.object(data.get("qmsr_basis"), "qmsr_basis")
+ if basis is not None:
+ as_of = review.date(basis, "as_of", "qmsr_basis")
+ if as_of != "2026-07-23":
+ review.add(
+ "BASIS_DATE",
+ "qmsr_basis.as_of",
+ "this skill release is researched through 2026-07-23",
+ )
+ effective = review.date(basis, "effective_date", "qmsr_basis")
+ if effective != "2026-02-02":
+ review.add(
+ "EFFECTIVE_DATE",
+ "qmsr_basis.effective_date",
+ "current QMSR effective date must be recorded as 2026-02-02",
+ "blocker",
+ )
+ title = review.text(
+ basis,
+ "current_part_820_title",
+ "qmsr_basis",
+ max_chars=200,
+ )
+ if title != "Quality Management System Regulation":
+ review.add(
+ "CURRENT_TITLE",
+ "qmsr_basis.current_part_820_title",
+ "must identify current Part 820 as Quality Management System Regulation",
+ )
+ program = review.text(
+ basis,
+ "inspection_compliance_program",
+ "qmsr_basis",
+ max_chars=120,
+ )
+ if program != "7382.850":
+ review.add(
+ "INSPECTION_PROGRAM",
+ "qmsr_basis.inspection_compliance_program",
+ "must identify current FDA Compliance Program 7382.850",
+ )
+ review.text(basis, "owner", "qmsr_basis", max_chars=200)
+ review.evidence(basis, "qmsr_basis")
+ review.approval(basis, "qmsr_basis", require_approved=True)
+ review.source_refs(basis, "qmsr_basis", min_items=3)
+
+ items = review.list(data.get("items"), "items", min_items=1) or []
+ seen: set[str] = set()
+ ready = 0
+ for index, value in enumerate(items):
+ path = f"items[{index}]"
+ item = review.object(value, path)
+ if item is None:
+ continue
+ identifier = review.text(item, "id", path, max_chars=120)
+ if identifier:
+ seen.add(identifier)
+ if identifier not in QMSR_TRANSITION_ITEMS:
+ review.add(
+ "ITEM_UNKNOWN",
+ f"{path}.id",
+ "item is not in the versioned transition catalog",
+ )
+ review.text(item, "owner", path, max_chars=200)
+ status = review.choice(item, "status", ITEM_STATUSES, path)
+ review.text(item, "assessment", path, max_chars=3_000)
+ review.evidence(
+ item,
+ path,
+ min_items=1 if status in {"evidence-ready", "not-applicable"} else 0,
+ )
+ review.source_refs(item, path)
+ review.approval(
+ item,
+ path,
+ require_approved=status in {"evidence-ready", "not-applicable"},
+ )
+ if status == "evidence-ready":
+ ready += 1
+ if status == "not-applicable":
+ review.text(item, "rationale", path, max_chars=2_000)
+ review.unique_ids(items, "items")
+
+ missing = sorted(set(QMSR_TRANSITION_ITEMS) - seen)
+ for identifier in missing:
+ review.add(
+ "ITEM_MISSING",
+ "items",
+ f"missing transition evidence item: {identifier}",
+ )
+
+ attestations = review.object(data.get("attestations"), "attestations")
+ required_attestations = (
+ "iso_certificate_not_treated_as_fda_compliance",
+ "checklist_not_treated_as_compliance_determination",
+ "legacy_qsr_clause_map_not_used_as_current_requirements",
+ "applicability_decisions_owned_by_authorized_humans",
+ )
+ if attestations is not None:
+ for key in required_attestations:
+ if attestations.get(key) is not True:
+ review.add(
+ "ATTESTATION_REQUIRED",
+ f"attestations.{key}",
+ "must be explicitly true and supported by controlled evidence",
+ "blocker",
+ )
+ review.text(attestations, "owner", "attestations", max_chars=200)
+ review.evidence(attestations, "attestations")
+ review.approval(attestations, "attestations", require_approved=True)
+
+ return review, {
+ "catalog_items": len(QMSR_TRANSITION_ITEMS),
+ "evidence_ready": ready,
+ "items_submitted": len(items),
+ }
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Check QMSR transition evidence using the current post-2026 Part 820 model.",
+ "Path to the local QMSR-transition JSON file",
+ )
+ args = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(data)
+ return finish("check_qmsr_transition", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/check_supplier_controls.py b/skills/iso-13485-certification/scripts/check_supplier_controls.py
new file mode 100644
index 00000000..815cff20
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/check_supplier_controls.py
@@ -0,0 +1,166 @@
+#!/usr/bin/env python3
+"""Check supplier and outsourced-process control evidence."""
+
+from __future__ import annotations
+
+from typing import Any
+
+from _common import (
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+SUPPLIER_STATUSES = {"candidate", "approved", "conditional", "suspended", "disqualified"}
+CRITICALITIES = {"low", "medium", "high", "critical"}
+CONTROL_STATUSES = {"planned", "implemented", "verified", "not-applicable"}
+
+
+def _control(
+ review: Review,
+ supplier: dict[str, Any],
+ key: str,
+ path: str,
+ *,
+ required: bool,
+) -> None:
+ control_path = f"{path}.{key}"
+ control = review.object(supplier.get(key), control_path)
+ if control is None:
+ return
+ status = review.choice(control, "status", CONTROL_STATUSES, control_path)
+ review.text(control, "owner", control_path, max_chars=200)
+ review.text(control, "method", control_path, max_chars=2_000)
+ review.evidence(
+ control,
+ control_path,
+ min_items=1 if status in {"implemented", "verified", "not-applicable"} else 0,
+ )
+ review.approval(
+ control,
+ control_path,
+ require_approved=status in {"verified", "not-applicable"},
+ )
+ review.source_refs(control, control_path)
+ if status == "not-applicable":
+ review.text(control, "rationale", control_path, max_chars=2_000)
+ if required and status not in {"implemented", "verified"}:
+ review.add(
+ "CONTROL_NOT_READY",
+ f"{control_path}.status",
+ "risk-based supplier control must be implemented or verified",
+ "blocker",
+ )
+
+
+def validate(data: dict[str, Any]) -> tuple[Review, dict[str, int]]:
+ review = Review()
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "register_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ methodology = review.object(data.get("control_methodology"), "control_methodology")
+ if methodology is not None:
+ review.text(methodology, "risk_method", "control_methodology", max_chars=2_000)
+ review.text(
+ methodology,
+ "approval_authority",
+ "control_methodology",
+ max_chars=200,
+ )
+ review.text(
+ methodology,
+ "monitoring_and_escalation",
+ "control_methodology",
+ max_chars=2_000,
+ )
+ review.text(methodology, "owner", "control_methodology", max_chars=200)
+ review.evidence(methodology, "control_methodology")
+ review.approval(
+ methodology,
+ "control_methodology",
+ require_approved=True,
+ )
+ review.source_refs(methodology, "control_methodology")
+
+ suppliers = review.list(data.get("suppliers"), "suppliers", min_items=1) or []
+ approved = 0
+ for index, value in enumerate(suppliers):
+ path = f"suppliers[{index}]"
+ supplier = review.object(value, path)
+ if supplier is None:
+ continue
+ review.text(supplier, "id", path, max_chars=120)
+ review.text(supplier, "name", path, max_chars=300)
+ review.text(supplier, "owner", path, max_chars=200)
+ status = review.choice(supplier, "status", SUPPLIER_STATUSES, path)
+ criticality = review.choice(supplier, "criticality", CRITICALITIES, path)
+ review.text(
+ supplier,
+ "product_service_or_process",
+ path,
+ max_chars=1_000,
+ )
+ review.text(supplier, "risk_rationale", path, max_chars=2_000)
+ review.date(supplier, "next_review_date", path)
+ review.evidence(supplier, path)
+ review.approval(supplier, path, require_approved=status == "approved")
+ review.source_refs(supplier, path)
+ if status == "approved":
+ approved += 1
+
+ strict = criticality in {"high", "critical"} and status in {
+ "approved",
+ "conditional",
+ }
+ for key in (
+ "selection_and_initial_evaluation",
+ "purchasing_requirements",
+ "change_notification",
+ "incoming_or_acceptance_verification",
+ "performance_monitoring",
+ "reevaluation",
+ "nonconformity_and_capa",
+ ):
+ _control(review, supplier, key, path, required=strict)
+ for key in (
+ "quality_agreement",
+ "subtier_controls",
+ "business_continuity",
+ ):
+ _control(
+ review,
+ supplier,
+ key,
+ path,
+ required=criticality == "critical" and status in {"approved", "conditional"},
+ )
+
+ if status == "conditional":
+ review.text(supplier, "conditions", path, max_chars=2_000)
+ review.date(supplier, "condition_due_date", path)
+ if status in {"suspended", "disqualified"}:
+ review.text(supplier, "disposition", path, max_chars=2_000)
+
+ review.unique_ids(suppliers, "suppliers")
+ return review, {"approved_suppliers": approved, "suppliers": len(suppliers)}
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Check risk-based supplier and outsourced-process control evidence.",
+ "Path to the local supplier-controls JSON file",
+ )
+ args = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(data)
+ return finish("check_supplier_controls", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/check_traceability.py b/skills/iso-13485-certification/scripts/check_traceability.py
new file mode 100644
index 00000000..51cd8e7c
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/check_traceability.py
@@ -0,0 +1,171 @@
+#!/usr/bin/env python3
+"""Check risk/design/production/postmarket traceability references."""
+
+from __future__ import annotations
+
+from typing import Any
+
+from _catalog import TRACEABILITY_LINKS
+from _common import (
+ ALLOWED_STATUSES,
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+ARTIFACT_TYPES = {
+ "intended-use",
+ "hazard",
+ "postmarket-signal",
+ "risk-evaluation",
+ "risk-control",
+ "design-input",
+ "design-output",
+ "verification",
+ "validation",
+ "production-control",
+ "change-control",
+ "capa",
+ "not-applicable-decision",
+ "other",
+}
+
+
+def _reference_list(
+ review: Review,
+ value: Any,
+ path: str,
+ artifact_ids: set[str],
+) -> list[str]:
+ raw = review.list(value, path, min_items=1)
+ if raw is None:
+ return []
+ result: list[str] = []
+ for index, item in enumerate(raw):
+ item_path = f"{path}[{index}]"
+ if not isinstance(item, str) or not item.strip():
+ review.add("REFERENCE_REQUIRED", item_path, "requires an artifact id")
+ continue
+ result.append(item)
+ if item not in artifact_ids:
+ review.add(
+ "REFERENCE_MISSING",
+ item_path,
+ f"artifact id is not defined: {item}",
+ )
+ if len(result) != len(set(result)):
+ review.add("REFERENCE_DUPLICATE", path, "contains duplicate artifact ids")
+ return result
+
+
+def validate(data: dict[str, Any]) -> tuple[Review, dict[str, int]]:
+ review = Review()
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "matrix_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ artifacts = review.list(data.get("artifacts"), "artifacts", min_items=1) or []
+ artifact_ids: set[str] = set()
+ for index, value in enumerate(artifacts):
+ path = f"artifacts[{index}]"
+ artifact = review.object(value, path)
+ if artifact is None:
+ continue
+ identifier = review.text(artifact, "id", path, max_chars=120)
+ if identifier:
+ artifact_ids.add(identifier)
+ review.choice(artifact, "type", ARTIFACT_TYPES, path)
+ review.text(artifact, "title", path, max_chars=300)
+ review.text(artifact, "owner", path, max_chars=200)
+ status = review.choice(artifact, "status", ALLOWED_STATUSES, path)
+ review.evidence(artifact, path)
+ review.approval(
+ artifact,
+ path,
+ require_approved=status in {"approved", "implemented", "verified", "closed"},
+ )
+ review.source_refs(artifact, path)
+ if artifact.get("type") == "not-applicable-decision":
+ review.text(artifact, "rationale", path, max_chars=2_000)
+ review.approval(artifact, path, require_approved=True)
+ review.unique_ids(artifacts, "artifacts")
+
+ rows = review.list(data.get("rows"), "rows", min_items=1) or []
+ verified_rows = 0
+ for index, value in enumerate(rows):
+ path = f"rows[{index}]"
+ row = review.object(value, path)
+ if row is None:
+ continue
+ review.text(row, "id", path, max_chars=120)
+ review.text(row, "product_id", path, max_chars=120)
+ review.text(row, "owner", path, max_chars=200)
+ status = review.choice(row, "status", ALLOWED_STATUSES, path)
+ review.text(row, "linkage_rationale", path, max_chars=3_000)
+ review.evidence(row, path)
+ review.source_refs(row, path)
+ review.approval(row, path, require_approved=status == "verified")
+
+ links_path = f"{path}.links"
+ links = review.object(row.get("links"), links_path)
+ if links is not None:
+ for link_name in TRACEABILITY_LINKS:
+ _reference_list(
+ review,
+ links.get(link_name),
+ f"{links_path}.{link_name}",
+ artifact_ids,
+ )
+
+ change_refs = row.get("change_control_refs")
+ if change_refs in (None, []):
+ review.add(
+ "CHANGE_LINK_REQUIRED",
+ f"{path}.change_control_refs",
+ "requires a change-control artifact or approved not-applicable decision",
+ )
+ else:
+ _reference_list(
+ review,
+ change_refs,
+ f"{path}.change_control_refs",
+ artifact_ids,
+ )
+
+ gaps = review.list(row.get("open_gaps"), f"{path}.open_gaps", min_items=0)
+ if status == "verified":
+ verified_rows += 1
+ if gaps:
+ review.add(
+ "VERIFICATION_BLOCKED",
+ f"{path}.open_gaps",
+ "verified row must not contain open gaps",
+ "blocker",
+ )
+ review.unique_ids(rows, "rows")
+
+ return review, {
+ "artifacts": len(artifacts),
+ "rows": len(rows),
+ "verified_rows": verified_rows,
+ }
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Check explicit traceability from risks and design through postmarket evidence.",
+ "Path to the local traceability-matrix JSON file",
+ )
+ args = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(data)
+ return finish("check_traceability", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/gap_analyzer.py b/skills/iso-13485-certification/scripts/gap_analyzer.py
index 6a2f1e44..917c944d 100644
--- a/skills/iso-13485-certification/scripts/gap_analyzer.py
+++ b/skills/iso-13485-certification/scripts/gap_analyzer.py
@@ -1,439 +1,161 @@
#!/usr/bin/env python3
-"""
-ISO 13485 Gap Analysis Tool
-
-This script analyzes documentation provided by the user and identifies gaps
-against ISO 13485:2016 requirements.
+"""Create a fail-closed QMS evidence gap report from a local manifest.
-Usage:
- python gap_analyzer.py --docs-dir <path> [--output <path>]
+The analyzer uses explicit, human-authored domain labels. It does not infer
+conformity from filenames or keywords and never reports a compliance percentage.
"""
-import sys
+from __future__ import annotations
+
import argparse
-import json
-from pathlib import Path
-from typing import Dict, List, Set, Tuple
-from datetime import datetime
+from collections import Counter
+from typing import Any
+
+from _catalog import PROCESS_DOMAINS
+from _common import (
+ InputError,
+ build_report,
+ emit_report,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+from validate_evidence_manifest import validate as validate_manifest
+
+
+def _entry_ready(entry: dict[str, Any]) -> bool:
+ status = entry.get("status")
+ approval = entry.get("approval")
+ evidence = entry.get("evidence")
+ sources = entry.get("source_refs")
+ return (
+ status in {"approved", "implemented", "verified", "closed"}
+ and isinstance(approval, dict)
+ and approval.get("status") == "approved"
+ and isinstance(evidence, list)
+ and bool(evidence)
+ and isinstance(sources, list)
+ and bool(sources)
+ )
-# ISO 13485:2016 Required Documented Procedures
-REQUIRED_PROCEDURES = {
- "4.1.5": {
- "title": "Risk Management",
- "keywords": ["risk", "risk management", "iso 14971", "risk analysis", "risk control"],
- "clause": "4.1.5"
- },
- "4.1.6": {
- "title": "Software Validation",
- "keywords": ["software validation", "computer software", "software application", "validation"],
- "clause": "4.1.6"
- },
- "4.2.4": {
- "title": "Control of Documents",
- "keywords": ["document control", "document approval", "document revision", "obsolete document"],
- "clause": "4.2.4"
- },
- "4.2.5": {
- "title": "Control of Records",
- "keywords": ["record control", "retention", "record storage", "record retrieval"],
- "clause": "4.2.5"
- },
- "5.5.3": {
- "title": "Internal Communication",
- "keywords": ["internal communication", "communication process", "qms communication"],
- "clause": "5.5.3"
- },
- "5.6.1": {
- "title": "Management Review",
- "keywords": ["management review", "review meeting", "management meeting"],
- "clause": "5.6.1"
- },
- "6.2": {
- "title": "Human Resources / Competence",
- "keywords": ["competence", "training", "human resources", "personnel qualification"],
- "clause": "6.2"
- },
- "7.2.3": {
- "title": "Customer Communication",
- "keywords": ["customer communication", "customer feedback", "advisory notice"],
- "clause": "7.2.3"
- },
- "7.3": {
- "title": "Design and Development",
- "keywords": ["design", "development", "design input", "design output", "design verification", "design validation"],
- "clause": "7.3"
- },
- "7.4.1": {
- "title": "Purchasing",
- "keywords": ["purchasing", "supplier", "procurement", "vendor"],
- "clause": "7.4.1"
- },
- "7.4.3": {
- "title": "Verification of Purchased Product",
- "keywords": ["purchased product", "incoming inspection", "verification of purchased"],
- "clause": "7.4.3"
- },
- "7.5.1": {
- "title": "Production and Service Provision",
- "keywords": ["production", "manufacturing", "work instruction", "process control"],
- "clause": "7.5.1"
- },
- "7.5.6": {
- "title": "Process Validation",
- "keywords": ["process validation", "validation protocol", "validation report"],
- "clause": "7.5.6"
- },
- "7.5.8": {
- "title": "Product Identification",
- "keywords": ["product identification", "identification", "labeling", "marking"],
- "clause": "7.5.8"
- },
- "7.5.9": {
- "title": "Traceability",
- "keywords": ["traceability", "lot", "serial number", "batch"],
- "clause": "7.5.9"
- },
- "7.5.11": {
- "title": "Preservation of Product",
- "keywords": ["preservation", "storage", "packaging", "handling"],
- "clause": "7.5.11"
- },
- "7.6": {
- "title": "Control of Monitoring and Measuring Equipment",
- "keywords": ["calibration", "monitoring equipment", "measuring equipment", "measurement"],
- "clause": "7.6"
- },
- "8.2.1": {
- "title": "Feedback",
- "keywords": ["feedback", "post-production", "post-market", "early warning"],
- "clause": "8.2.1"
- },
- "8.2.2": {
- "title": "Complaint Handling",
- "keywords": ["complaint", "customer complaint", "complaint handling", "complaint investigation"],
- "clause": "8.2.2"
- },
- "8.2.3": {
- "title": "Reporting to Regulatory Authorities",
- "keywords": ["regulatory reporting", "adverse event", "mdr report", "reportable event"],
- "clause": "8.2.3"
- },
- "8.2.4": {
- "title": "Internal Audit",
- "keywords": ["internal audit", "audit program", "audit plan", "audit checklist"],
- "clause": "8.2.4"
- },
- "8.2.5": {
- "title": "Monitoring and Measurement of Processes",
- "keywords": ["process monitoring", "process measurement", "process metrics"],
- "clause": "8.2.5"
- },
- "8.2.6": {
- "title": "Monitoring and Measurement of Product",
- "keywords": ["product inspection", "product testing", "acceptance criteria", "release"],
- "clause": "8.2.6"
- },
- "8.3": {
- "title": "Control of Nonconforming Product",
- "keywords": ["nonconforming", "ncr", "nonconformance", "reject"],
- "clause": "8.3"
- },
- "8.5.2": {
- "title": "Corrective Action",
- "keywords": ["corrective action", "capa", "root cause"],
- "clause": "8.5.2"
- },
- "8.5.3": {
- "title": "Preventive Action",
- "keywords": ["preventive action", "capa", "prevention"],
- "clause": "8.5.3"
+def analyze(
+ data: dict[str, Any],
+ *,
+ base_dir: str | None,
+ verify_files: bool,
+) -> tuple[dict[str, Any], int]:
+ review, manifest_metrics = validate_manifest(
+ data,
+ base_dir=base_dir,
+ verify_files=verify_files,
+ )
+ expected_raw = data.get("expected_domains")
+ expected = {
+ item
+ for item in expected_raw
+ if isinstance(item, str) and item in PROCESS_DOMAINS
+ } if isinstance(expected_raw, list) else set()
+
+ entries_raw = data.get("entries")
+ entries = entries_raw if isinstance(entries_raw, list) else []
+ by_domain: dict[str, list[dict[str, Any]]] = {
+ domain: [] for domain in PROCESS_DOMAINS
}
-}
-
-# Additional key documents (not procedures but required)
-KEY_DOCUMENTS = {
- "Quality Manual": ["quality manual", "qm-", "quality management system"],
- "Medical Device File": ["medical device file", "mdf", "device master record", "dmr"],
- "Quality Policy": ["quality policy"],
- "Quality Objectives": ["quality objective"],
-}
-
-
-class GapAnalyzer:
- """Analyzes documentation against ISO 13485 requirements."""
-
- def __init__(self, docs_dir: str):
- """Initialize analyzer with document directory."""
- self.docs_dir = Path(docs_dir)
- self.found_procedures: Dict[str, List[str]] = {}
- self.found_documents: Dict[str, List[str]] = {}
-
- def analyze(self) -> Dict:
- """Run gap analysis on provided documentation."""
- print(f"Analyzing documents in: {self.docs_dir}")
-
- if not self.docs_dir.exists():
- print(f"ERROR: Directory not found: {self.docs_dir}")
- return {}
-
- # Scan all documents
- documents = self._scan_documents()
- print(f"Found {len(documents)} documents to analyze")
-
- # Search for each required procedure
- for clause_id, proc_info in REQUIRED_PROCEDURES.items():
- self._search_for_procedure(documents, clause_id, proc_info)
-
- # Search for key documents
- for doc_name, keywords in KEY_DOCUMENTS.items():
- self._search_for_document(documents, doc_name, keywords)
-
- # Generate gap analysis report
- report = self._generate_report()
-
- return report
-
- def _scan_documents(self) -> List[Tuple[Path, str]]:
- """Scan directory for documents and read content."""
- documents = []
-
- # Supported file extensions
- extensions = ['.txt', '.md', '.doc', '.docx', '.pdf', '.odt']
-
- for ext in extensions:
- for file_path in self.docs_dir.rglob(f'*{ext}'):
- try:
- # Read file content (simple text reading)
- if ext in ['.txt', '.md']:
- with open(file_path, 'r', encoding='utf-8', errors='ignore') as f:
- content = f.read().lower()
- documents.append((file_path, content))
- else:
- # For other formats, just note the filename
- # (Full text extraction would require additional libraries)
- filename = file_path.name.lower()
- documents.append((file_path, filename))
- except Exception as e:
- print(f"Warning: Could not read {file_path}: {e}")
-
- return documents
-
- def _search_for_procedure(self, documents: List[Tuple[Path, str]],
- clause_id: str, proc_info: Dict):
- """Search documents for a specific procedure."""
- title = proc_info['title']
- keywords = proc_info['keywords']
-
- matches = []
- for file_path, content in documents:
- # Check if any keyword appears in the document
- if any(keyword in content for keyword in keywords):
- matches.append(str(file_path.relative_to(self.docs_dir)))
-
- if matches:
- self.found_procedures[clause_id] = matches
-
- def _search_for_document(self, documents: List[Tuple[Path, str]],
- doc_name: str, keywords: List[str]):
- """Search for key documents."""
- matches = []
- for file_path, content in documents:
- if any(keyword in content for keyword in keywords):
- matches.append(str(file_path.relative_to(self.docs_dir)))
-
- if matches:
- self.found_documents[doc_name] = matches
-
- def _generate_report(self) -> Dict:
- """Generate comprehensive gap analysis report."""
- total_procedures = len(REQUIRED_PROCEDURES)
- found_count = len(self.found_procedures)
- missing_count = total_procedures - found_count
-
- missing_procedures = []
- for clause_id, proc_info in REQUIRED_PROCEDURES.items():
- if clause_id not in self.found_procedures:
- missing_procedures.append({
- "clause": clause_id,
- "title": proc_info['title'],
- "keywords": proc_info['keywords']
- })
-
- missing_documents = []
- for doc_name, keywords in KEY_DOCUMENTS.items():
- if doc_name not in self.found_documents:
- missing_documents.append({
- "document": doc_name,
- "keywords": keywords
- })
-
- compliance_percentage = (found_count / total_procedures) * 100
-
- report = {
- "analysis_date": datetime.now().isoformat(),
- "documents_analyzed": str(self.docs_dir),
- "summary": {
- "total_required_procedures": total_procedures,
- "procedures_found": found_count,
- "procedures_missing": missing_count,
- "compliance_percentage": round(compliance_percentage, 1)
- },
- "found_procedures": self.found_procedures,
- "missing_procedures": missing_procedures,
- "found_documents": self.found_documents,
- "missing_documents": missing_documents,
- "recommendations": self._generate_recommendations(missing_procedures, missing_documents)
- }
-
- return report
-
- def _generate_recommendations(self, missing_procedures: List[Dict],
- missing_documents: List[Dict]) -> List[str]:
- """Generate recommendations based on gaps."""
- recommendations = []
-
- if not self.found_documents.get("Quality Manual"):
- recommendations.append(
- "CRITICAL: Create a Quality Manual - this is the foundational document of your QMS"
+ for item in entries:
+ if not isinstance(item, dict):
+ continue
+ domain = item.get("domain")
+ if domain in by_domain:
+ by_domain[domain].append(item)
+
+ domain_results: list[dict[str, Any]] = []
+ statuses: Counter[str] = Counter()
+ for domain in PROCESS_DOMAINS:
+ domain_entries = by_domain[domain]
+ if domain not in expected:
+ status = "not-assessed"
+ explanation = (
+ "Domain was not declared in expected_domains; this is not a "
+ "not-applicable determination."
)
-
- if not self.found_documents.get("Quality Policy"):
- recommendations.append(
- "HIGH PRIORITY: Develop and document your Quality Policy statement"
+ elif not domain_entries:
+ status = "evidence-missing"
+ explanation = "No manifest entry was supplied for this expected domain."
+ elif all(_entry_ready(entry) for entry in domain_entries):
+ status = "evidence-present-for-human-review"
+ explanation = (
+ "All submitted entries have evidence, sources, and recorded approval; "
+ "substantive adequacy remains for authorized human review."
)
-
- if missing_procedures:
- high_priority_clauses = ["8.2.2", "8.5.2", "8.5.3", "7.4.1", "8.2.4"]
- high_priority_missing = [p for p in missing_procedures
- if p['clause'] in high_priority_clauses]
-
- if high_priority_missing:
- titles = [p['title'] for p in high_priority_missing]
- recommendations.append(
- f"HIGH PRIORITY: Develop the following critical procedures: {', '.join(titles)}"
- )
-
- if len(missing_procedures) > 20:
- recommendations.append(
- "Consider engaging a consultant or using templates to accelerate QMS development"
+ else:
+ status = "evidence-incomplete"
+ explanation = (
+ "At least one submitted entry is draft, unapproved, unsourced, or "
+ "missing evidence."
)
-
- if len(missing_procedures) < 5:
- recommendations.append(
- "You're close to completion! Focus on finalizing remaining procedures and conducting internal audit"
- )
-
- return recommendations
-
-
-def print_report(report: Dict):
- """Print formatted gap analysis report."""
- print("\n" + "="*80)
- print(" ISO 13485:2016 GAP ANALYSIS REPORT")
- print("="*80)
- print(f"\nAnalysis Date: {report['analysis_date']}")
- print(f"Documents Location: {report['documents_analyzed']}\n")
-
- # Summary
- summary = report['summary']
- print("-" * 80)
- print(" SUMMARY")
- print("-" * 80)
- print(f"Total Required Procedures: {summary['total_required_procedures']}")
- print(f"Procedures Found: {summary['procedures_found']}")
- print(f"Procedures Missing: {summary['procedures_missing']}")
- print(f"Compliance: {summary['compliance_percentage']}%\n")
-
- # Found Procedures
- if report['found_procedures']:
- print("-" * 80)
- print(" FOUND PROCEDURES")
- print("-" * 80)
- for clause_id, files in sorted(report['found_procedures'].items()):
- proc_info = REQUIRED_PROCEDURES[clause_id]
- print(f"\n[{clause_id}] {proc_info['title']}")
- for file in files:
- print(f" - {file}")
-
- # Missing Procedures
- if report['missing_procedures']:
- print("\n" + "-" * 80)
- print(" MISSING PROCEDURES")
- print("-" * 80)
- for proc in report['missing_procedures']:
- print(f"\n[{proc['clause']}] {proc['title']}")
- print(f" Keywords to include: {', '.join(proc['keywords'][:3])}")
-
- # Found Documents
- if report['found_documents']:
- print("\n" + "-" * 80)
- print(" FOUND KEY DOCUMENTS")
- print("-" * 80)
- for doc_name, files in report['found_documents'].items():
- print(f"\n{doc_name}:")
- for file in files:
- print(f" - {file}")
-
- # Missing Documents
- if report['missing_documents']:
- print("\n" + "-" * 80)
- print(" MISSING KEY DOCUMENTS")
- print("-" * 80)
- for doc in report['missing_documents']:
- print(f" - {doc['document']}")
-
- # Recommendations
- if report['recommendations']:
- print("\n" + "-" * 80)
- print(" RECOMMENDATIONS")
- print("-" * 80)
- for i, rec in enumerate(report['recommendations'], 1):
- print(f"{i}. {rec}")
-
- print("\n" + "="*80)
- print(" END OF REPORT")
- print("="*80 + "\n")
-
-
-def save_report(report: Dict, output_path: str):
- """Save report to JSON file."""
- with open(output_path, 'w', encoding='utf-8') as f:
- json.dump(report, f, indent=2)
- print(f"Report saved to: {output_path}")
+ statuses[status] += 1
+ domain_results.append(
+ {
+ "domain": domain,
+ "entry_ids": sorted(
+ str(entry.get("id"))
+ for entry in domain_entries
+ if isinstance(entry.get("id"), str)
+ ),
+ "explanation": explanation,
+ "status": status,
+ }
+ )
+
+ report = build_report(
+ "gap_analyzer",
+ review.findings,
+ metrics={
+ **manifest_metrics,
+ "domain_status_counts": dict(sorted(statuses.items())),
+ },
+ )
+ report["domains"] = domain_results
+ report["method"] = (
+ "Explicit manifest coverage only; no filename/keyword scoring, clause-text "
+ "reproduction, compliance percentage, or automated applicability decision."
+ )
+ return report, 1 if review.findings else 0
-def main():
- """Main entry point."""
- parser = argparse.ArgumentParser(
- description='ISO 13485 Gap Analysis Tool',
- formatter_class=argparse.RawDescriptionHelpFormatter
+def main() -> int:
+ parser = standard_parser(
+ "Create a fail-closed evidence gap report from a local readiness manifest.",
+ "Path to the local evidence-manifest JSON file",
)
parser.add_argument(
- '--docs-dir',
- required=True,
- help='Directory containing documentation to analyze'
+ "--base-dir",
+ help="Base directory for contained relative evidence paths",
)
parser.add_argument(
- '--output',
- help='Output file path for JSON report (optional)'
+ "--verify-files",
+ action="store_true",
+ help="Verify bounded local JSON/Markdown evidence paths and optional hashes",
)
-
- args = parser.parse_args()
-
- # Run analysis
- analyzer = GapAnalyzer(args.docs_dir)
- report = analyzer.analyze()
-
- # Print report
- print_report(report)
-
- # Save report if output path specified
- if args.output:
- save_report(report, args.output)
-
- return 0
+ args: argparse.Namespace = parser.parse_args()
+ if args.verify_files and not args.base_dir:
+ raise InputError("--verify-files requires --base-dir")
+ data = require_root_object(load_json(args.input))
+ report, code = analyze(
+ data,
+ base_dir=args.base_dir,
+ verify_files=args.verify_files,
+ )
+ emit_report(
+ report,
+ args.output,
+ force=args.force,
+ compact=args.compact,
+ )
+ return code
-if __name__ == '__main__':
- sys.exit(main())
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/validate_evidence_manifest.py b/skills/iso-13485-certification/scripts/validate_evidence_manifest.py
new file mode 100644
index 00000000..c3f3c2c0
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/validate_evidence_manifest.py
@@ -0,0 +1,232 @@
+#!/usr/bin/env python3
+"""Validate a bounded audit/readiness evidence manifest and optional local files."""
+
+from __future__ import annotations
+
+import argparse
+import hashlib
+from pathlib import Path
+from typing import Any
+
+from _catalog import PROCESS_DOMAINS
+from _common import (
+ ALLOWED_STATUSES,
+ MAX_INPUT_BYTES,
+ InputError,
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+PURPOSES = {
+ "internal-audit",
+ "iso-certification-readiness",
+ "fda-inspection-readiness",
+ "mdsap-audit-readiness",
+ "eu-conformity-assessment-readiness",
+}
+CLASSIFICATIONS = {"public", "internal", "confidential", "restricted"}
+
+
+def _safe_evidence_file(base: Path, relative_text: str) -> Path:
+ relative = Path(relative_text)
+ if relative.is_absolute() or ".." in relative.parts:
+ raise InputError(f"evidence path must be relative and contained: {relative}")
+ if relative.suffix.lower() not in {".json", ".md", ".markdown"}:
+ raise InputError(f"evidence file must be JSON or Markdown: {relative}")
+ candidate = base / relative
+ if candidate.is_symlink():
+ raise InputError(f"symbolic-link evidence is refused: {relative}")
+ try:
+ resolved_base = base.resolve(strict=True)
+ resolved = candidate.resolve(strict=True)
+ resolved.relative_to(resolved_base)
+ stat = resolved.stat()
+ except (OSError, ValueError) as exc:
+ raise InputError(f"invalid evidence path {relative}: {exc}") from exc
+ if not resolved.is_file():
+ raise InputError(f"evidence is not a regular file: {relative}")
+ if stat.st_size > MAX_INPUT_BYTES:
+ raise InputError(
+ f"evidence exceeds {MAX_INPUT_BYTES} bytes: {relative}"
+ )
+ return resolved
+
+
+def _text_array(
+ review: Review,
+ value: Any,
+ path: str,
+ allowed: set[str],
+) -> list[str]:
+ raw = review.list(value, path, min_items=1)
+ if raw is None:
+ return []
+ result: list[str] = []
+ for index, item in enumerate(raw):
+ item_path = f"{path}[{index}]"
+ if not isinstance(item, str) or item not in allowed:
+ review.add(
+ "VALUE_UNKNOWN",
+ item_path,
+ f"must be one of: {', '.join(sorted(allowed))}",
+ )
+ else:
+ result.append(item)
+ if len(result) != len(set(result)):
+ review.add("VALUE_DUPLICATE", path, "must not contain duplicates")
+ return result
+
+
+def validate(
+ data: dict[str, Any],
+ *,
+ base_dir: str | None,
+ verify_files: bool,
+) -> tuple[Review, dict[str, int]]:
+ review = Review()
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "manifest_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ context = review.object(data.get("audit_context"), "audit_context")
+ if context is not None:
+ review.choice(context, "purpose", PURPOSES, "audit_context")
+ review.text(context, "scope", "audit_context", max_chars=3_000)
+ review.text(context, "sampling_plan", "audit_context", max_chars=3_000)
+ review.text(context, "limitations", "audit_context", max_chars=3_000)
+ review.text(context, "owner", "audit_context", max_chars=200)
+ review.evidence(context, "audit_context")
+ review.approval(context, "audit_context", require_approved=True)
+ review.source_refs(context, "audit_context")
+
+ expected = _text_array(
+ review,
+ data.get("expected_domains"),
+ "expected_domains",
+ set(PROCESS_DOMAINS),
+ )
+
+ if verify_files and base_dir is None:
+ raise InputError("--verify-files requires --base-dir")
+ base = Path(base_dir) if base_dir is not None else None
+
+ entries = review.list(data.get("entries"), "entries", min_items=1) or []
+ covered: set[str] = set()
+ verified_files = 0
+ for index, value in enumerate(entries):
+ path = f"entries[{index}]"
+ entry = review.object(value, path)
+ if entry is None:
+ continue
+ review.text(entry, "id", path, max_chars=120)
+ domain = review.choice(
+ entry,
+ "domain",
+ set(PROCESS_DOMAINS),
+ path,
+ )
+ if domain:
+ covered.add(domain)
+ review.text(entry, "title", path, max_chars=300)
+ review.text(entry, "owner", path, max_chars=200)
+ status = review.choice(entry, "status", ALLOWED_STATUSES, path)
+ review.text(entry, "revision_or_date", path, max_chars=120)
+ review.choice(entry, "classification", CLASSIFICATIONS, path)
+ local_path = review.text(entry, "local_path", path, max_chars=1_000)
+ review.evidence(entry, path)
+ review.source_refs(entry, path)
+ review.approval(
+ entry,
+ path,
+ require_approved=status in {"approved", "implemented", "verified", "closed"},
+ )
+ if verify_files and local_path is not None and base is not None:
+ evidence_path = _safe_evidence_file(base, local_path)
+ digest = hashlib.sha256(evidence_path.read_bytes()).hexdigest()
+ expected_digest = entry.get("sha256")
+ if expected_digest is not None:
+ if (
+ not isinstance(expected_digest, str)
+ or len(expected_digest) != 64
+ or any(char not in "0123456789abcdef" for char in expected_digest)
+ ):
+ review.add(
+ "HASH_INVALID",
+ f"{path}.sha256",
+ "must be a lowercase SHA-256 hex digest",
+ )
+ elif expected_digest != digest:
+ review.add(
+ "HASH_MISMATCH",
+ f"{path}.sha256",
+ "does not match the local evidence file",
+ "blocker",
+ )
+ verified_files += 1
+ review.unique_ids(entries, "entries")
+
+ for domain in sorted(set(expected) - covered):
+ review.add(
+ "DOMAIN_EVIDENCE_MISSING",
+ "entries",
+ f"no manifest entry covers expected domain: {domain}",
+ )
+
+ gaps = review.list(data.get("open_gaps"), "open_gaps", min_items=0) or []
+ for index, value in enumerate(gaps):
+ path = f"open_gaps[{index}]"
+ gap = review.object(value, path)
+ if gap is None:
+ continue
+ review.text(gap, "id", path, max_chars=120)
+ review.text(gap, "description", path, max_chars=2_000)
+ review.text(gap, "owner", path, max_chars=200)
+ review.choice(gap, "status", {"open", "accepted", "closed"}, path)
+ review.evidence(gap, path, min_items=0)
+ review.approval(
+ gap,
+ path,
+ require_approved=gap.get("status") in {"accepted", "closed"},
+ )
+ review.unique_ids(gaps, "open_gaps")
+
+ return review, {
+ "entries": len(entries),
+ "expected_domains": len(expected),
+ "open_gaps": len(gaps),
+ "verified_files": verified_files,
+ }
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Validate a local audit/readiness evidence manifest.",
+ "Path to the local evidence-manifest JSON file",
+ )
+ parser.add_argument(
+ "--base-dir",
+ help="Base directory for contained relative evidence paths",
+ )
+ parser.add_argument(
+ "--verify-files",
+ action="store_true",
+ help="Verify bounded local JSON/Markdown evidence paths and optional hashes",
+ )
+ args: argparse.Namespace = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(
+ data,
+ base_dir=args.base_dir,
+ verify_files=args.verify_files,
+ )
+ return finish("validate_evidence_manifest", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/scripts/validate_scope_intake.py b/skills/iso-13485-certification/scripts/validate_scope_intake.py
new file mode 100644
index 00000000..3aa53538
--- /dev/null
+++ b/skills/iso-13485-certification/scripts/validate_scope_intake.py
@@ -0,0 +1,214 @@
+#!/usr/bin/env python3
+"""Validate a declared QMS applicability and scope intake.
+
+The script checks whether accountable humans documented decisions and evidence. It
+does not decide whether a law, regulation, standard, or conformity route applies.
+"""
+
+from __future__ import annotations
+
+from typing import Any
+
+from _common import (
+ Review,
+ finish,
+ guarded_main,
+ load_json,
+ require_root_object,
+ standard_parser,
+)
+
+ACTIVITIES = {
+ "design-and-development",
+ "manufacturing",
+ "contract-manufacturing",
+ "sterilization",
+ "packaging-and-labeling",
+ "storage",
+ "distribution",
+ "installation",
+ "servicing",
+ "software-development",
+ "complaint-handling",
+ "postmarket-surveillance",
+ "regulatory-reporting",
+}
+APPLICABILITY = {"applicable", "not-applicable", "undetermined"}
+
+
+def _text_list(
+ review: Review,
+ value: Any,
+ path: str,
+ *,
+ allowed: set[str] | None = None,
+ min_items: int = 1,
+) -> list[str]:
+ raw = review.list(value, path, min_items=min_items)
+ if raw is None:
+ return []
+ result: list[str] = []
+ for index, item in enumerate(raw):
+ item_path = f"{path}[{index}]"
+ if not isinstance(item, str) or not item.strip():
+ review.add("TEXT_REQUIRED", item_path, "requires non-empty text")
+ continue
+ if allowed is not None and item not in allowed:
+ review.add(
+ "VALUE_UNKNOWN",
+ item_path,
+ f"must be one of: {', '.join(sorted(allowed))}",
+ )
+ continue
+ result.append(item)
+ if len(result) != len(set(result)):
+ review.add("VALUE_DUPLICATE", path, "must not contain duplicate values")
+ return result
+
+
+def validate(data: dict[str, Any]) -> tuple[Review, dict[str, int]]:
+ review = Review()
+
+ metadata = review.object(data.get("metadata"), "metadata")
+ if metadata is not None:
+ review.controlled_item(metadata, "metadata", require_approved=True)
+ review.text(metadata, "intake_id", "metadata", max_chars=120)
+ review.date(metadata, "review_date", "metadata")
+
+ organization = review.object(data.get("organization"), "organization")
+ if organization is not None:
+ review.text(organization, "legal_name", "organization", max_chars=300)
+ review.text(
+ organization,
+ "declared_lifecycle_role",
+ "organization",
+ max_chars=300,
+ )
+ review.text(
+ organization,
+ "authorized_management_representative",
+ "organization",
+ max_chars=200,
+ )
+ review.text(organization, "raqa_owner", "organization", max_chars=200)
+ review.text(
+ organization,
+ "applicability_decision_owner",
+ "organization",
+ max_chars=200,
+ )
+
+ scope = review.object(data.get("scope"), "scope")
+ sites: list[Any] = []
+ products: list[Any] = []
+ markets: list[Any] = []
+ if scope is not None:
+ _text_list(
+ review,
+ scope.get("lifecycle_activities"),
+ "scope.lifecycle_activities",
+ allowed=ACTIVITIES,
+ )
+
+ sites = review.list(scope.get("sites"), "scope.sites", min_items=1) or []
+ for index, item in enumerate(sites):
+ path = f"scope.sites[{index}]"
+ site = review.object(item, path)
+ if site is None:
+ continue
+ review.text(site, "id", path, max_chars=120)
+ review.text(site, "name", path, max_chars=300)
+ review.text(site, "address", path, max_chars=500)
+ _text_list(
+ review,
+ site.get("activities"),
+ f"{path}.activities",
+ allowed=ACTIVITIES,
+ )
+ review.controlled_item(site, path, require_approved=True)
+ review.unique_ids(sites, "scope.sites")
+
+ products = (
+ review.list(scope.get("products"), "scope.products", min_items=1) or []
+ )
+ for index, item in enumerate(products):
+ path = f"scope.products[{index}]"
+ product = review.object(item, path)
+ if product is None:
+ continue
+ review.text(product, "id", path, max_chars=120)
+ review.text(product, "family", path, max_chars=300)
+ review.text(product, "intended_use", path, max_chars=2_000)
+ review.text(
+ product,
+ "classification_or_rationale",
+ path,
+ max_chars=1_000,
+ )
+ _text_list(review, product.get("market_ids"), f"{path}.market_ids")
+ review.controlled_item(product, path, require_approved=True)
+ review.unique_ids(products, "scope.products")
+
+ markets = review.list(scope.get("markets"), "scope.markets", min_items=1) or []
+ for index, item in enumerate(markets):
+ path = f"scope.markets[{index}]"
+ market = review.object(item, path)
+ if market is None:
+ continue
+ review.text(market, "id", path, max_chars=120)
+ review.text(market, "jurisdiction", path, max_chars=300)
+ decision = review.choice(
+ market,
+ "applicability",
+ APPLICABILITY,
+ path,
+ )
+ if decision == "undetermined":
+ review.add(
+ "HUMAN_DECISION_REQUIRED",
+ f"{path}.applicability",
+ "authorized RA/QA or legal review must resolve applicability",
+ "blocker",
+ )
+ review.text(market, "decision_rationale", path, max_chars=2_000)
+ review.controlled_item(market, path, require_approved=True)
+ review.unique_ids(markets, "scope.markets")
+
+ outsourced = review.list(
+ scope.get("outsourced_processes"),
+ "scope.outsourced_processes",
+ min_items=0,
+ )
+ if outsourced is not None:
+ for index, item in enumerate(outsourced):
+ path = f"scope.outsourced_processes[{index}]"
+ process = review.object(item, path)
+ if process is None:
+ continue
+ review.text(process, "id", path, max_chars=120)
+ review.text(process, "process", path, max_chars=300)
+ review.text(process, "provider", path, max_chars=300)
+ review.text(process, "control_strategy", path, max_chars=2_000)
+ review.controlled_item(process, path, require_approved=True)
+ review.unique_ids(outsourced, "scope.outsourced_processes")
+
+ return review, {
+ "markets": len(markets),
+ "products": len(products),
+ "sites": len(sites),
+ }
+
+
+def main() -> int:
+ parser = standard_parser(
+ "Validate a local QMS scope/applicability intake without deciding applicability.",
+ "Path to the local scope-intake JSON file",
+ )
+ args = parser.parse_args()
+ data = require_root_object(load_json(args.input))
+ review, metrics = validate(data)
+ return finish("validate_scope_intake", review, args, metrics=metrics)
+
+
+if __name__ == "__main__":
+ guarded_main(main)
diff --git a/skills/iso-13485-certification/tests/test_scripts.py b/skills/iso-13485-certification/tests/test_scripts.py
new file mode 100644
index 00000000..cf41d6fa
--- /dev/null
+++ b/skills/iso-13485-certification/tests/test_scripts.py
@@ -0,0 +1,615 @@
+from __future__ import annotations
+
+import hashlib
+import json
+import os
+import subprocess
+import sys
+import tempfile
+import unittest
+from pathlib import Path
+from typing import Any
+
+
+ROOT = Path(__file__).resolve().parents[1]
+SCRIPTS = ROOT / "scripts"
+CLI_NAMES = (
+ "gap_analyzer.py",
+ "validate_scope_intake.py",
+ "audit_document_records.py",
+ "check_capa.py",
+ "check_traceability.py",
+ "check_qmsr_transition.py",
+ "validate_evidence_manifest.py",
+ "check_supplier_controls.py",
+)
+
+
+def source(identifier: str = "SRC-1") -> dict[str, str]:
+ return {
+ "id": identifier,
+ "title": f"Official source {identifier}",
+ "version_or_date": "2026-07-23",
+ "url": "https://www.fda.gov/medical-devices",
+ "accessed": "2026-07-23",
+ }
+
+
+def evidence(identifier: str = "EV-1") -> list[dict[str, str]]:
+ return [
+ {
+ "id": identifier,
+ "type": "record",
+ "location": f"records/{identifier}.md",
+ "revision_or_date": "2026-07-22",
+ }
+ ]
+
+
+def approval() -> dict[str, str]:
+ return {"status": "approved", "by": "Authorized QA", "date": "2026-07-23"}
+
+
+def controlled(
+ *,
+ identifier: str,
+ status: str = "approved",
+ source_id: str = "SRC-1",
+) -> dict[str, Any]:
+ return {
+ "owner": "Accountable QA",
+ "status": status,
+ "evidence": evidence(f"EV-{identifier}"),
+ "approval": approval(),
+ "source_refs": [source(source_id)],
+ }
+
+
+def metadata(identifier_key: str, identifier: str) -> dict[str, Any]:
+ return {
+ identifier_key: identifier,
+ "review_date": "2026-07-23",
+ **controlled(identifier=f"META-{identifier}"),
+ }
+
+
+def scope_data() -> dict[str, Any]:
+ site = {
+ "id": "SITE-1",
+ "name": "Example Site",
+ "address": "1 Controlled Way",
+ "activities": ["design-and-development"],
+ **controlled(identifier="SITE-1"),
+ }
+ product = {
+ "id": "PROD-1",
+ "family": "Example device family",
+ "intended_use": "Controlled intended use reference IU-1",
+ "classification_or_rationale": "Decision record CLASS-1",
+ "market_ids": ["US"],
+ **controlled(identifier="PROD-1"),
+ }
+ market = {
+ "id": "US",
+ "jurisdiction": "United States",
+ "applicability": "applicable",
+ "decision_rationale": "Authorized decision APP-US-1",
+ **controlled(identifier="MARKET-US"),
+ }
+ return {
+ "metadata": metadata("intake_id", "INTAKE-1"),
+ "organization": {
+ "legal_name": "Example Medical Devices Inc.",
+ "declared_lifecycle_role": "Declared manufacturer role",
+ "authorized_management_representative": "Management Representative",
+ "raqa_owner": "RAQA Director",
+ "applicability_decision_owner": "Regulatory Counsel",
+ },
+ "scope": {
+ "lifecycle_activities": ["design-and-development"],
+ "sites": [site],
+ "products": [product],
+ "markets": [market],
+ "outsourced_processes": [],
+ },
+ }
+
+
+def document_data() -> dict[str, Any]:
+ document = {
+ "id": "SOP-1",
+ "title": "Controlled Process",
+ "document_type": "procedure",
+ "revision": "2",
+ "status": "effective",
+ "effective_date": "2026-07-20",
+ "change_summary": "Approved change CHG-1",
+ "training_impact": "Training record TR-1",
+ "owner": "Document Owner",
+ "evidence": evidence("DOC-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ }
+ record = {
+ "id": "REC-1",
+ "record_type": "Process record",
+ "status": "active",
+ "retention_period": "Per approved schedule RET-1",
+ "retention_basis": "Authorized legal and product review RET-BASIS-1",
+ "storage_and_integrity_controls": "Validated repository controls VAL-1",
+ "retrieval_method": "Controlled index and access",
+ "disposition_method": "Authorized destruction record",
+ "owner": "Record Owner",
+ "evidence": evidence("REC-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ }
+ external = {
+ "id": "EXT-1",
+ "title": "Official current source",
+ "publisher": "FDA",
+ "version_or_date": "2026-07-23",
+ "status": "current",
+ "last_currency_review": "2026-07-23",
+ "owner": "Source Owner",
+ "evidence": evidence("EXT-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ }
+ return {
+ "metadata": metadata("register_id", "DOC-REG-1"),
+ "documents": [document],
+ "records": [record],
+ "external_sources": [external],
+ }
+
+
+def capa_data() -> dict[str, Any]:
+ capa = {
+ "id": "CAPA-1",
+ "owner": "CAPA Owner",
+ "status": "closed",
+ "source_event": "NCR-1",
+ "problem_statement": "Defined nonconformity",
+ "scope": "Products and processes reviewed",
+ "correction_or_containment": "Containment record CONT-1",
+ "evidence": evidence("CAPA-1"),
+ "source_refs": [source()],
+ "approval": approval(),
+ "risk_assessment": {
+ "patient_and_user_impact": "Impact assessment RISK-1",
+ "product_and_process_impact": "Product/process assessment RISK-2",
+ "reportability_review": "Authorized decision REG-1",
+ "decision": "control-and-monitor",
+ "decision_rationale": "Approved rationale",
+ "owner": "Risk Owner",
+ "evidence": evidence("RISK-1"),
+ "approval": approval(),
+ },
+ "investigation": {
+ "method": "Evidence-driven investigation method",
+ "root_cause_or_justified_conclusion": "Supported conclusion",
+ "systemic_extent_review": "Similar products and processes reviewed",
+ "owner": "Investigation Owner",
+ "evidence": evidence("INV-1"),
+ "approval": approval(),
+ },
+ "actions": [
+ {
+ "id": "ACTION-1",
+ "description": "Action tied to supported cause",
+ "owner": "Action Owner",
+ "due_date": "2026-06-01",
+ "implemented_date": "2026-05-20",
+ "evidence": evidence("ACTION-1"),
+ "approval": approval(),
+ }
+ ],
+ "change_control_refs": ["CHG-1"],
+ "effectiveness": {
+ "plan": "Review defined outcome after implementation",
+ "objective_acceptance_criteria": "Zero recurrence in approved sample",
+ "baseline": "Two events in prior approved window",
+ "sample_or_observation_window": "Three approved production lots",
+ "due_date": "2026-07-01",
+ "owner": "Effectiveness Owner",
+ "independent_reviewer": "Independent QA Reviewer",
+ "result": "effective",
+ "conclusion": "Criteria met in evidence EFF-1",
+ "review_date": "2026-07-02",
+ "evidence": evidence("EFF-1"),
+ "approval": approval(),
+ },
+ "closure_date": "2026-07-03",
+ "closure_summary": "All approved closure gates completed",
+ }
+ return {"metadata": metadata("register_id", "CAPA-REG-1"), "capas": [capa]}
+
+
+def traceability_data() -> dict[str, Any]:
+ definitions = (
+ ("IU-1", "intended-use"),
+ ("HZ-1", "hazard"),
+ ("RE-1", "risk-evaluation"),
+ ("RC-1", "risk-control"),
+ ("DI-1", "design-input"),
+ ("DO-1", "design-output"),
+ ("VER-1", "verification"),
+ ("VAL-1", "validation"),
+ ("PC-1", "production-control"),
+ ("PMS-1", "postmarket-signal"),
+ ("CHG-1", "change-control"),
+ )
+ artifacts = [
+ {
+ "id": identifier,
+ "type": artifact_type,
+ "title": f"Controlled {artifact_type}",
+ **controlled(identifier=identifier, status="verified"),
+ }
+ for identifier, artifact_type in definitions
+ ]
+ row = {
+ "id": "TRACE-1",
+ "product_id": "PROD-1",
+ "owner": "Traceability Owner",
+ "status": "verified",
+ "linkage_rationale": "Approved end-to-end linkage",
+ "links": {
+ "intended_use": ["IU-1"],
+ "hazard_or_signal": ["HZ-1"],
+ "risk_evaluation": ["RE-1"],
+ "risk_control": ["RC-1"],
+ "design_input": ["DI-1"],
+ "design_output": ["DO-1"],
+ "verification": ["VER-1"],
+ "validation": ["VAL-1"],
+ "production_control": ["PC-1"],
+ "postmarket_source": ["PMS-1"],
+ },
+ "change_control_refs": ["CHG-1"],
+ "open_gaps": [],
+ "evidence": evidence("TRACE-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ }
+ return {
+ "metadata": metadata("matrix_id", "TRACE-MATRIX-1"),
+ "artifacts": artifacts,
+ "rows": [row],
+ }
+
+
+def qmsr_data() -> dict[str, Any]:
+ from_catalog = (
+ "qmsr-source-basis",
+ "applicability-owner",
+ "fda-supplemental-provisions",
+ "legacy-qsr-reference-disposition",
+ "pre-effective-date-record-review",
+ "inspection-accessible-records",
+ "inspection-process-training",
+ "qsit-retirement",
+ "complaint-and-servicing-records",
+ "labeling-and-packaging-controls",
+ "software-validation-impact",
+ "supplier-and-outsourced-process-controls",
+ "certificate-claims-review",
+ "change-control-approval",
+ )
+ items = [
+ {
+ "id": identifier,
+ "owner": "QMSR Owner",
+ "status": "evidence-ready",
+ "assessment": f"Approved assessment for {identifier}",
+ "evidence": evidence(f"Q-{index}"),
+ "approval": approval(),
+ "source_refs": [source(f"QSRC-{index}")],
+ }
+ for index, identifier in enumerate(from_catalog)
+ ]
+ return {
+ "metadata": metadata("checklist_id", "QMSR-1"),
+ "qmsr_basis": {
+ "as_of": "2026-07-23",
+ "effective_date": "2026-02-02",
+ "current_part_820_title": "Quality Management System Regulation",
+ "inspection_compliance_program": "7382.850",
+ "owner": "Regulatory Owner",
+ "evidence": evidence("QBASIS"),
+ "approval": approval(),
+ "source_refs": [source("FDA"), source("ECFR"), source("CP")],
+ },
+ "items": items,
+ "attestations": {
+ "iso_certificate_not_treated_as_fda_compliance": True,
+ "checklist_not_treated_as_compliance_determination": True,
+ "legacy_qsr_clause_map_not_used_as_current_requirements": True,
+ "applicability_decisions_owned_by_authorized_humans": True,
+ "owner": "Regulatory Owner",
+ "evidence": evidence("ATTEST"),
+ "approval": approval(),
+ },
+ }
+
+
+def manifest_data(local_path: str = "evidence.md", digest: str | None = None) -> dict[str, Any]:
+ entry = {
+ "id": "MAN-ENTRY-1",
+ "domain": "document-and-record-control",
+ "title": "Controlled document evidence",
+ "owner": "Evidence Owner",
+ "status": "verified",
+ "revision_or_date": "2026-07-23",
+ "classification": "internal",
+ "local_path": local_path,
+ "evidence": evidence("MAN-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ }
+ if digest is not None:
+ entry["sha256"] = digest
+ return {
+ "metadata": metadata("manifest_id", "MANIFEST-1"),
+ "audit_context": {
+ "purpose": "internal-audit",
+ "scope": "Site, product, process, and period defined",
+ "sampling_plan": "Risk-based approved sample plan",
+ "limitations": "Limited to supplied controlled export",
+ "owner": "Audit Owner",
+ "evidence": evidence("CTX-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ },
+ "expected_domains": ["document-and-record-control"],
+ "entries": [entry],
+ "open_gaps": [],
+ }
+
+
+def supplier_data() -> dict[str, Any]:
+ control_names = (
+ "selection_and_initial_evaluation",
+ "purchasing_requirements",
+ "change_notification",
+ "incoming_or_acceptance_verification",
+ "performance_monitoring",
+ "reevaluation",
+ "nonconformity_and_capa",
+ "quality_agreement",
+ "subtier_controls",
+ "business_continuity",
+ )
+ controls = {
+ name: {
+ "status": "verified",
+ "owner": "Supplier Quality",
+ "method": f"Approved risk-based method for {name}",
+ "evidence": evidence(f"SUP-{index}"),
+ "approval": approval(),
+ "source_refs": [source(f"SSRC-{index}")],
+ }
+ for index, name in enumerate(control_names)
+ }
+ supplier = {
+ "id": "SUPPLIER-1",
+ "name": "Example Supplier Inc.",
+ "owner": "Supplier Owner",
+ "status": "approved",
+ "criticality": "critical",
+ "product_service_or_process": "Critical outsourced process",
+ "risk_rationale": "Approved criticality assessment",
+ "next_review_date": "2027-07-23",
+ "evidence": evidence("SUPPLIER-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ **controls,
+ }
+ return {
+ "metadata": metadata("register_id", "SUP-REG-1"),
+ "control_methodology": {
+ "risk_method": "Approved supplier criticality method",
+ "approval_authority": "Supplier Quality Director",
+ "monitoring_and_escalation": "Metrics, changes, CAPA, and escalation",
+ "owner": "Supplier Quality",
+ "evidence": evidence("METH-1"),
+ "approval": approval(),
+ "source_refs": [source()],
+ },
+ "suppliers": [supplier],
+ }
+
+
+class CLITests(unittest.TestCase):
+ maxDiff = None
+
+ def run_cli(
+ self,
+ script: str,
+ *arguments: str,
+ cwd: Path | None = None,
+ ) -> subprocess.CompletedProcess[str]:
+ env = dict(os.environ)
+ env["PYTHONDONTWRITEBYTECODE"] = "1"
+ return subprocess.run(
+ [sys.executable, str(SCRIPTS / script), *arguments],
+ cwd=str(cwd or ROOT),
+ env=env,
+ text=True,
+ capture_output=True,
+ check=False,
+ timeout=10,
+ )
+
+ def write_json(self, directory: Path, name: str, data: Any) -> Path:
+ path = directory / name
+ path.write_text(json.dumps(data), encoding="utf-8")
+ return path
+
+ def assert_valid(self, script: str, data: dict[str, Any]) -> None:
+ with tempfile.TemporaryDirectory() as temp:
+ path = self.write_json(Path(temp), "input.json", data)
+ result = self.run_cli(script, str(path))
+ self.assertEqual(result.returncode, 0, result.stderr + result.stdout)
+ report = json.loads(result.stdout)
+ self.assertEqual(report["result"], "complete-for-human-review")
+ self.assertEqual(report["findings"], [])
+ self.assertIn("does not establish", report["disclaimer"])
+
+ def test_all_help_commands(self) -> None:
+ for script in CLI_NAMES:
+ with self.subTest(script=script):
+ result = self.run_cli(script, "--help")
+ self.assertEqual(result.returncode, 0, result.stderr)
+ self.assertIn("usage:", result.stdout)
+
+ def test_valid_scope(self) -> None:
+ self.assert_valid("validate_scope_intake.py", scope_data())
+
+ def test_valid_document_register(self) -> None:
+ self.assert_valid("audit_document_records.py", document_data())
+
+ def test_valid_capa(self) -> None:
+ self.assert_valid("check_capa.py", capa_data())
+
+ def test_valid_traceability(self) -> None:
+ self.assert_valid("check_traceability.py", traceability_data())
+
+ def test_valid_qmsr(self) -> None:
+ self.assert_valid("check_qmsr_transition.py", qmsr_data())
+
+ def test_valid_supplier_controls(self) -> None:
+ self.assert_valid("check_supplier_controls.py", supplier_data())
+
+ def test_manifest_and_gap_analyzer(self) -> None:
+ with tempfile.TemporaryDirectory() as temp:
+ directory = Path(temp)
+ content = "# Controlled synthetic evidence\n"
+ (directory / "evidence.md").write_text(content, encoding="utf-8")
+ digest = hashlib.sha256(content.encode("utf-8")).hexdigest()
+ manifest = self.write_json(
+ directory,
+ "manifest.json",
+ manifest_data(digest=digest),
+ )
+ for script in ("validate_evidence_manifest.py", "gap_analyzer.py"):
+ with self.subTest(script=script):
+ result = self.run_cli(
+ script,
+ str(manifest),
+ "--base-dir",
+ str(directory),
+ "--verify-files",
+ )
+ self.assertEqual(
+ result.returncode,
+ 0,
+ result.stderr + result.stdout,
+ )
+ report = json.loads(result.stdout)
+ self.assertNotIn("compliance_percentage", result.stdout)
+ self.assertEqual(report["findings"], [])
+ gap_report = json.loads(
+ self.run_cli("gap_analyzer.py", str(manifest)).stdout
+ )
+ self.assertIn("domains", gap_report)
+ self.assertIn("no filename/keyword scoring", gap_report["method"])
+
+ def test_closed_capa_without_effectiveness_fails(self) -> None:
+ data = capa_data()
+ data["capas"][0]["effectiveness"]["result"] = "pending"
+ with tempfile.TemporaryDirectory() as temp:
+ path = self.write_json(Path(temp), "capa.json", data)
+ result = self.run_cli("check_capa.py", str(path))
+ self.assertEqual(result.returncode, 1)
+ report = json.loads(result.stdout)
+ self.assertTrue(
+ any(item["code"] == "CLOSURE_BLOCKED" for item in report["findings"])
+ )
+
+ def test_undetermined_applicability_fails(self) -> None:
+ data = scope_data()
+ data["scope"]["markets"][0]["applicability"] = "undetermined"
+ with tempfile.TemporaryDirectory() as temp:
+ path = self.write_json(Path(temp), "scope.json", data)
+ result = self.run_cli("validate_scope_intake.py", str(path))
+ self.assertEqual(result.returncode, 1)
+ self.assertIn("HUMAN_DECISION_REQUIRED", result.stdout)
+
+ def test_duplicate_json_key_is_input_error(self) -> None:
+ with tempfile.TemporaryDirectory() as temp:
+ path = Path(temp) / "duplicate.json"
+ path.write_text('{"metadata": {}, "metadata": {}}', encoding="utf-8")
+ result = self.run_cli("gap_analyzer.py", str(path))
+ self.assertEqual(result.returncode, 2)
+ self.assertIn("duplicate JSON key", result.stderr)
+
+ def test_output_is_deterministic(self) -> None:
+ with tempfile.TemporaryDirectory() as temp:
+ path = self.write_json(Path(temp), "scope.json", scope_data())
+ first = self.run_cli("validate_scope_intake.py", str(path))
+ second = self.run_cli("validate_scope_intake.py", str(path))
+ self.assertEqual(first.returncode, 0)
+ self.assertEqual(first.stdout, second.stdout)
+
+ def test_evidence_path_traversal_is_refused(self) -> None:
+ with tempfile.TemporaryDirectory() as temp:
+ directory = Path(temp)
+ manifest = self.write_json(
+ directory,
+ "manifest.json",
+ manifest_data(local_path="../outside.md"),
+ )
+ result = self.run_cli(
+ "validate_evidence_manifest.py",
+ str(manifest),
+ "--base-dir",
+ str(directory),
+ "--verify-files",
+ )
+ self.assertEqual(result.returncode, 2)
+ self.assertIn("must be relative and contained", result.stderr)
+
+ def test_refuses_overwrite_without_force(self) -> None:
+ with tempfile.TemporaryDirectory() as temp:
+ directory = Path(temp)
+ input_path = self.write_json(directory, "scope.json", scope_data())
+ output_path = directory / "report.json"
+ output_path.write_text("existing", encoding="utf-8")
+ result = self.run_cli(
+ "validate_scope_intake.py",
+ str(input_path),
+ "--output",
+ str(output_path),
+ )
+ self.assertEqual(result.returncode, 2)
+ self.assertEqual(output_path.read_text(encoding="utf-8"), "existing")
+
+ def test_distributed_json_templates_fail_closed(self) -> None:
+ cases = {
+ "scope-intake-template.json": "validate_scope_intake.py",
+ "document-register-template.json": "audit_document_records.py",
+ "capa-record-template.json": "check_capa.py",
+ "traceability-matrix-template.json": "check_traceability.py",
+ "qmsr-transition-template.json": "check_qmsr_transition.py",
+ "evidence-manifest-template.json": "validate_evidence_manifest.py",
+ "supplier-controls-template.json": "check_supplier_controls.py",
+ }
+ for template, script in cases.items():
+ with self.subTest(template=template):
+ result = self.run_cli(
+ script,
+ str(ROOT / "assets" / "templates" / template),
+ )
+ self.assertEqual(result.returncode, 1, result.stderr + result.stdout)
+ report = json.loads(result.stdout)
+ self.assertEqual(report["result"], "gaps-found")
+
+ def test_no_bytecode_artifacts_created(self) -> None:
+ for path in ROOT.rglob("__pycache__"):
+ self.fail(f"unexpected bytecode directory: {path}")
+
+
+if __name__ == "__main__":
+ unittest.main()