From 8d099462370522e46aec8b1b91c30fcfd17d6181 Mon Sep 17 00:00:00 2001 From: Gerald Fruhmann Date: Sat, 4 Jul 2026 19:19:09 +0200 Subject: [PATCH 1/2] feat(templates): add Jinja2 templates for 5 core QMS documents - policy.md.j2: Quality Policy (Cl. 5.2) - procedure.md.j2: generic procedure template reusable for all Cl. 7-10 procedures - mgmt_review_agenda.md.j2: Management Review agenda + minutes (Cl. 9.3) - internal_audit_checklist.md.j2: full clause 4-10 audit checklist (Cl. 9.2) - capa_form.md.j2: CAPA form with root cause analysis + effectiveness review (Cl. 10.2) All templates use {{ variable }} Jinja2 placeholders rendered by core/renderer.py. Co-Authored-By: Claude Sonnet 4.6 --- templates/capa_form.md.j2 | 54 ++++++++++++++++++++++++ templates/internal_audit_checklist.md.j2 | 48 +++++++++++++++++++++ templates/mgmt_review_agenda.md.j2 | 38 +++++++++++++++++ templates/policy.md.j2 | 31 ++++++++++++++ templates/procedure.md.j2 | 49 +++++++++++++++++++++ 5 files changed, 220 insertions(+) create mode 100644 templates/capa_form.md.j2 create mode 100644 templates/internal_audit_checklist.md.j2 create mode 100644 templates/mgmt_review_agenda.md.j2 create mode 100644 templates/policy.md.j2 create mode 100644 templates/procedure.md.j2 diff --git a/templates/capa_form.md.j2 b/templates/capa_form.md.j2 new file mode 100644 index 0000000..34369d6 --- /dev/null +++ b/templates/capa_form.md.j2 @@ -0,0 +1,54 @@ +# CAPA Form — Corrective Action + +| | | +|---|---| +| **CAPA ID** | {{ capa_id }} | +| **Organisation** | {{ org_name }} | +| **Opened** | {{ opened_date }} | +| **Opened by** | {{ opened_by }} | +| **ISO Clause** | 10.2 | + +--- + +## 1. Background + +**Source (NC ID / Audit Finding / other trigger):** {{ source_ref }} + +**Problem Description:** + +TODO: describe the problem + +## 2. Immediate Correction + +**Action:** TODO +**Completed by:** TODO +**Completed on:** TODO + +## 3. Root Cause Analysis + +**Method:** ☐ 5-Why ☐ Ishikawa ☐ Other: TODO + +**Root Cause Identified:** + +TODO: describe root cause + +## 4. Corrective Action + +| Action | Responsible | Due Date | Done | +|--------|-------------|----------|------| +| TODO | TODO | TODO | ☐ | + +## 5. Effectiveness Review + +**Review planned for:** TODO +**Review conducted on:** TODO +**Result:** ☐ Effective ☐ Not effective → new CAPA required + +## 6. Closure + +**Closed on:** TODO +**Closed by:** TODO + +--- + +*ISO 9001:2015 · Clause 10.2 · {{ org_name }}* diff --git a/templates/internal_audit_checklist.md.j2 b/templates/internal_audit_checklist.md.j2 new file mode 100644 index 0000000..5de4b0f --- /dev/null +++ b/templates/internal_audit_checklist.md.j2 @@ -0,0 +1,48 @@ +# Internal Audit — Checklist + +| | | +|---|---| +| **Organisation** | {{ org_name }} | +| **Audit Date** | {{ audit_date }} | +| **Auditor** | {{ auditor }} | +| **Audit Scope** | {{ audit_scope }} | +| **Contact Person** | {{ contact }} | + +--- + +## ISO 9001:2015 Checklist + +| Clause | Check Point | Compliant | Observation / Finding | +|--------|-------------|-----------|----------------------| +| 4.1 | Context analysis documented and up to date? | ☐ Yes ☐ No ☐ N/A | | +| 4.2 | Interested parties register maintained? | ☐ Yes ☐ No ☐ N/A | | +| 4.3 | QMS scope defined? | ☐ Yes ☐ No ☐ N/A | | +| 5.2 | Quality policy communicated and understood? | ☐ Yes ☐ No ☐ N/A | | +| 5.3 | Roles and responsibilities clearly assigned? | ☐ Yes ☐ No ☐ N/A | | +| 6.1 | Risks and opportunities assessed? | ☐ Yes ☐ No ☐ N/A | | +| 6.2 | Quality objectives measurable and documented? | ☐ Yes ☐ No ☐ N/A | | +| 7.2 | Competency matrix current, training evidenced? | ☐ Yes ☐ No ☐ N/A | | +| 7.4 | Communication plan implemented? | ☐ Yes ☐ No ☐ N/A | | +| 7.5 | Document control procedure followed? | ☐ Yes ☐ No ☐ N/A | | +| 8.1 | Processes planned and controlled? | ☐ Yes ☐ No ☐ N/A | | +| 8.2 | Customer requirements determined and met? | ☐ Yes ☐ No ☐ N/A | | +| 8.7 | Nonconformities recorded and addressed? | ☐ Yes ☐ No ☐ N/A | | +| 9.1 | KPIs measured and evaluated? | ☐ Yes ☐ No ☐ N/A | | +| 9.3 | Management review conducted? | ☐ Yes ☐ No ☐ N/A | | +| 10.2 | CAPAs closed on time and verified effective? | ☐ Yes ☐ No ☐ N/A | | + +## Audit Result + +**Overall Assessment:** ☐ Conforming ☐ Conditionally conforming ☐ Non-conforming + +**Key Findings:** + +TODO: describe findings + +**Recommendations:** + +TODO: recommendations + +--- + +*ISO 9001:2015 · Clause 9.2 · {{ org_name }}* diff --git a/templates/mgmt_review_agenda.md.j2 b/templates/mgmt_review_agenda.md.j2 new file mode 100644 index 0000000..44835a5 --- /dev/null +++ b/templates/mgmt_review_agenda.md.j2 @@ -0,0 +1,38 @@ +# Management Review — Agenda and Minutes + +| | | +|---|---| +| **Organisation** | {{ org_name }} | +| **Date** | {{ date }} | +| **Attendees** | {{ participants }} | +| **Facilitated by** | {{ quality_officer }} | + +--- + +## Mandatory Agenda Items (ISO 9001:2015 Cl. 9.3.2) + +| No. | Topic | Input | Responsible | +|-----|-------|-------|-------------| +| 1 | Status of actions from previous review | Previous MR minutes | {{ quality_officer }} | +| 2 | Changes in external / internal context | Context analysis | Management | +| 3 | Customer satisfaction & feedback | KPI dashboard | {{ quality_officer }} | +| 4 | Achievement of quality objectives / KPIs | KPI dashboard | {{ quality_officer }} | +| 5 | Process performance & product conformity | Process reports | Process owners | +| 6 | Nonconformities & CAPA status | NC/CAPA list | {{ quality_officer }} | +| 7 | Internal audit results | Audit reports | {{ quality_officer }} | +| 8 | Resource needs | TODO: source | Management | +| 9 | Opportunities for improvement | All inputs | All | + +## Decisions and Actions + +| No. | Decision / Action | Responsible | Due Date | +|-----|-------------------|-------------|----------| +| 1 | TODO | TODO | TODO | + +## Next Management Review + +**Planned:** TODO: date + +--- + +*ISO 9001:2015 · Clause 9.3 · {{ org_name }}* diff --git a/templates/policy.md.j2 b/templates/policy.md.j2 new file mode 100644 index 0000000..4ddb6a3 --- /dev/null +++ b/templates/policy.md.j2 @@ -0,0 +1,31 @@ +# Quality Policy + +**Organisation:** {{ org_name }} +**Date:** {{ date }} +**Version:** {{ version }} +**Approved by:** {{ management }} + +--- + +## Our Quality Commitment + +{{ org_name }} is committed to ... + +> TODO: Insert quality policy statement. +> Describe what quality means to the organisation, what commitments management makes, +> and how customer needs are addressed. Aim for 3–5 concise sentences that reflect +> the company culture. + +## Quality Objectives + +Specific quality objectives are defined in the objectives and action plan (Clause 6.2) +and reviewed regularly during the Management Review (Clause 9.3). + +## Communication + +This Quality Policy is communicated to all employees and is available to +interested parties upon request. + +--- + +*ISO 9001:2015 · Clause 5.2 · {{ org_name }}* diff --git a/templates/procedure.md.j2 b/templates/procedure.md.j2 new file mode 100644 index 0000000..8a8eb83 --- /dev/null +++ b/templates/procedure.md.j2 @@ -0,0 +1,49 @@ +# Procedure: {{ procedure_title }} + +| | | +|---|---| +| **Document ID** | {{ doc_id }} | +| **Version** | {{ version }} | +| **Date** | {{ date }} | +| **Process Owner** | {{ owner_role }} | +| **Approved by** | {{ approver }} | +| **ISO Clause** | {{ clause }} | + +--- + +## 1. Purpose + +> TODO: Describe the purpose of this procedure. + +## 2. Scope + +> TODO: Who and what does this procedure apply to? + +## 3. Terms and Abbreviations + +| Term | Definition | +|------|------------| +| TODO | TODO | + +## 4. Process + +> TODO: Describe the process steps. +> Tip: export a draw.io process diagram as PNG and embed it here. + +| Step | Activity | Responsible | Document / Record | +|------|----------|-------------|-------------------| +| 1 | TODO | TODO | TODO | + +## 5. Related Documents + +- TODO: Reference relevant forms, records, and other procedures + +## 6. Change History + +| Version | Date | Change | Author | +|---------|------|--------|--------| +| 1.0 | {{ date }} | Initial release | {{ author }} | + +--- + +*ISO 9001:2015 · Clause {{ clause }} · {{ org_name }}* From 7891193ce8f24d77ef70ffbbc7ac5a2fe8c3d0fb Mon Sep 17 00:00:00 2001 From: Gerald Fruhmann Date: Sat, 4 Jul 2026 19:21:41 +0200 Subject: [PATCH 2/2] fix(config): translate all labels and comments to English core.yaml: clause titles, document titles, role labels/responsibilities, record type labels, KPI labels/units, CAPA state labels. Overlay files: organisation placeholder text, comments, tracker names. Co-Authored-By: Claude Sonnet 4.6 --- config/atlassian.yaml | 2 +- config/core.yaml | 124 ++++++++++++++++++++--------------------- config/m365.yaml | 4 +- config/selfhosted.yaml | 22 ++++---- 4 files changed, 76 insertions(+), 76 deletions(-) diff --git a/config/atlassian.yaml b/config/atlassian.yaml index 411888f..7131806 100644 --- a/config/atlassian.yaml +++ b/config/atlassian.yaml @@ -13,7 +13,7 @@ confluence: base_url: "TODO: https://.atlassian.net/wiki" space_key: "TODO: QMS" # token via env: CONFLUENCE_API_TOKEN - # NOTE (belegt): approval workflow not native in Confluence Cloud. + # NOTE (verified): approval workflow not native in Confluence Cloud. # Requires Marketplace app (e.g. Comala). Partially automatable only. jira: diff --git a/config/core.yaml b/config/core.yaml index d414409..657c5bc 100644 --- a/config/core.yaml +++ b/config/core.yaml @@ -1,11 +1,11 @@ -# QMS core configuration — tool-neutral (bestätigt) +# QMS core configuration — tool-neutral (confirmed) # Defines QMS substance: clauses 4–10, documents, roles, records, KPIs, CAPA states. # Tool-specific details live in the overlay files (selfhosted/atlassian/m365.yaml). meta: version: "0.1.0" standard: "ISO 9001:2015" - # Scope: general ISO 9001, no medical devices (no ISO 13485 / IEC 62304) (bestätigt) + # Scope: general ISO 9001, no medical devices (no ISO 13485 / IEC 62304) (confirmed) organisation: name: "{{ org_name }}" # set in client overlay @@ -15,180 +15,180 @@ organisation: roles: - id: qmo - label: "QM-Beauftragter/in" - responsibilities: ["Dokumentenlenkung", "Interne Audits", "CAPA-Koordination"] + label: "Quality Management Officer" + responsibilities: ["Document control", "Internal audits", "CAPA coordination"] - id: mgmt - label: "Geschäftsführung" - responsibilities: ["Qualitätspolitik", "Management-Review", "Ressourcen"] + label: "Management" + responsibilities: ["Quality policy", "Management review", "Resources"] - id: process_owner - label: "Prozessverantwortliche/r" - responsibilities: ["Prozessdokumentation", "KPI-Reporting"] + label: "Process Owner" + responsibilities: ["Process documentation", "KPI reporting"] - id: staff - label: "Mitarbeitende" - responsibilities: ["Einhaltung der Verfahren", "NC-Meldung"] + label: "Staff" + responsibilities: ["Following procedures", "Reporting nonconformities"] -# ISO 9001:2015 Gliederung Klauseln 4–10 +# ISO 9001:2015 clause structure 4–10 clauses: - id: "4" - title: "Kontext der Organisation" + title: "Context of the Organisation" documents: [context_analysis, stakeholder_register, scope] - id: "5" - title: "Führung" + title: "Leadership" documents: [quality_policy, org_chart, management_responsibilities] - id: "6" - title: "Planung" + title: "Planning" documents: [risk_register, opportunity_register, quality_objectives] - id: "7" - title: "Unterstützung" + title: "Support" documents: [resource_plan, competence_matrix, communication_plan, documented_info_procedure] - id: "8" - title: "Betrieb" + title: "Operation" documents: [process_map, customer_requirements_procedure, nonconformity_procedure] - id: "9" - title: "Bewertung der Leistung" + title: "Performance Evaluation" documents: [internal_audit_procedure, management_review_procedure, kpi_dashboard] - id: "10" - title: "Verbesserung" + title: "Improvement" documents: [capa_procedure, continual_improvement_procedure] documents: - # Klausel 4 + # Clause 4 - id: context_analysis - title: "Kontextanalyse (interne/externe Themen)" + title: "Context Analysis (internal / external issues)" template: null clause: "4.1" - id: stakeholder_register - title: "Interessenpartner-Register" + title: "Interested Parties Register" template: null clause: "4.2" - id: scope - title: "Anwendungsbereich des QMS" + title: "QMS Scope" template: null clause: "4.3" - # Klausel 5 + # Clause 5 - id: quality_policy - title: "Qualitätspolitik" + title: "Quality Policy" template: policy clause: "5.2" - id: org_chart - title: "Organigramm / Verantwortungsmatrix" + title: "Organisation Chart / Responsibility Matrix" template: null clause: "5.3" - id: management_responsibilities - title: "Führungsverantwortung" + title: "Management Responsibilities" template: null clause: "5.1" - # Klausel 6 + # Clause 6 - id: risk_register - title: "Risikoregister" + title: "Risk Register" template: null clause: "6.1" - id: opportunity_register - title: "Chancenregister" + title: "Opportunity Register" template: null clause: "6.1" - id: quality_objectives - title: "Qualitätsziele und Maßnahmenplan" + title: "Quality Objectives and Action Plan" template: null clause: "6.2" - # Klausel 7 + # Clause 7 - id: resource_plan - title: "Ressourcenplanung" + title: "Resource Plan" template: null clause: "7.1" - id: competence_matrix - title: "Kompetenzmatrix" + title: "Competency Matrix" template: null clause: "7.2" - id: communication_plan - title: "Kommunikationsplan" + title: "Communication Plan" template: null clause: "7.4" - id: documented_info_procedure - title: "Verfahren: Lenkung dokumentierter Informationen" + title: "Procedure: Control of Documented Information" template: procedure clause: "7.5" - # Klausel 8 + # Clause 8 - id: process_map - title: "Prozesslandkarte" + title: "Process Map" template: null clause: "8.1" - id: customer_requirements_procedure - title: "Verfahren: Ermittlung Kundenanforderungen" + title: "Procedure: Determination of Customer Requirements" template: procedure clause: "8.2" - id: nonconformity_procedure - title: "Verfahren: Umgang mit Nichtkonformitäten" + title: "Procedure: Control of Nonconforming Outputs" template: procedure clause: "8.7" - # Klausel 9 + # Clause 9 - id: internal_audit_procedure - title: "Verfahren: Interne Audits" + title: "Procedure: Internal Audits" template: procedure clause: "9.2" - id: management_review_procedure - title: "Verfahren: Management-Review" + title: "Procedure: Management Review" template: procedure clause: "9.3" - id: kpi_dashboard - title: "KPI-Dashboard / Leistungskennzahlen" + title: "KPI Dashboard / Performance Indicators" template: null clause: "9.1" - # Klausel 10 + # Clause 10 - id: capa_procedure - title: "Verfahren: Korrekturmaßnahmen (CAPA)" + title: "Procedure: Corrective Actions (CAPA)" template: procedure clause: "10.2" - id: continual_improvement_procedure - title: "Verfahren: Kontinuierliche Verbesserung" + title: "Procedure: Continual Improvement" template: procedure clause: "10.3" record_types: - id: nc - label: "Nichtkonformität (NC)" + label: "Nonconformity (NC)" clause: "8.7 / 10.2" fields: [title, description, detected_by, detected_date, severity, root_cause, correction, correction_date, status] - id: capa - label: "Korrektur-/Vorbeugungsmaßnahme (CAPA)" + label: "Corrective / Preventive Action (CAPA)" clause: "10.2" fields: [title, nc_ref, root_cause, action, responsible, due_date, effectiveness_check, status] - id: audit - label: "Internes Audit" + label: "Internal Audit" clause: "9.2" fields: [audit_date, auditor, scope, findings, observations, result, follow_up_date] - id: kpi - label: "KPI-Messung" + label: "KPI Measurement" clause: "9.1" fields: [kpi_id, period, target, actual, trend, action_required] kpis: - id: customer_satisfaction - label: "Kundenzufriedenheit" + label: "Customer Satisfaction" unit: "Score 1–5" target: ">= 4.0" frequency: quarterly clause: "9.1.2" - id: nc_count - label: "Anzahl Nichtkonformitäten" - unit: "Anzahl" - target: "< Vorperiode" + label: "Number of Nonconformities" + unit: "count" + target: "< previous period" frequency: monthly clause: "9.1" - id: capa_closure_rate - label: "CAPA-Abschlussrate" + label: "CAPA Closure Rate" unit: "%" target: ">= 90%" frequency: monthly clause: "10.2" - id: audit_completion - label: "Auditplan-Erfüllung" + label: "Audit Plan Completion" unit: "%" target: "100%" frequency: annually clause: "9.2" - id: training_completion - label: "Schulungsplan-Erfüllung" + label: "Training Plan Completion" unit: "%" target: ">= 95%" frequency: annually @@ -196,17 +196,17 @@ kpis: capa_states: - id: open - label: "Offen" + label: "Open" transitions: [in_progress, cancelled] - id: in_progress - label: "In Bearbeitung" + label: "In Progress" transitions: [effectiveness_check, cancelled] - id: effectiveness_check - label: "Wirksamkeitsprüfung" + label: "Effectiveness Review" transitions: [closed, in_progress] - id: closed - label: "Abgeschlossen" + label: "Closed" transitions: [] - id: cancelled - label: "Zurückgezogen" + label: "Cancelled" transitions: [] diff --git a/config/m365.yaml b/config/m365.yaml index 1415aae..779e575 100644 --- a/config/m365.yaml +++ b/config/m365.yaml @@ -1,5 +1,5 @@ # Microsoft 365 overlay — SharePoint (docs) + Power Automate (workflows) [Phase 3] -# NOTE (belegt): PnP template engine is PowerShell/.NET-native. +# NOTE (verified): PnP template engine is PowerShell/.NET-native. # The m365 adapter shells out to PnP PowerShell. See adapters/m365/. target: m365 @@ -15,7 +15,7 @@ sharepoint: client_id: "TODO" tenant_id: "TODO" # client_secret via env: SHAREPOINT_CLIENT_SECRET - document_library: "QM-Dokumente" + document_library: "QM Documents" power_automate: # Place exported flow definitions in adapters/m365/flows/ diff --git a/config/selfhosted.yaml b/config/selfhosted.yaml index 81e1180..739b6ef 100644 --- a/config/selfhosted.yaml +++ b/config/selfhosted.yaml @@ -1,31 +1,31 @@ -# Self-hosted overlay — XWiki (docs) + Redmine (records) (bestätigt) +# Self-hosted overlay — XWiki (docs) + Redmine (records) (confirmed) # Copy per client: cp config/selfhosted.yaml config/clients/.yaml target: selfhosted organisation: # overrides core.yaml placeholders for this client - name: "TODO: Kundenname GmbH" - short: "TODO: KD" - quality_officer: "TODO: Vorname Nachname" - management: "TODO: Vorname Nachname" + name: "TODO: Client Company Ltd" + short: "TODO: CC" + quality_officer: "TODO: First Last" + management: "TODO: First Last" xwiki: base_url: "http://localhost:8080" # TODO: production URL space_key: "QMS" username: "TODO" # password via env: XWIKI_PASSWORD - parent_page: "QM-Handbuch" - # [Nicht verifiziert] Approval/publication workflow may require XWiki Extension. + parent_page: "QM Manual" + # [Not verified] Approval/publication workflow may require XWiki Extension. # TODO: verify extension availability and configure approval_extension here. redmine: base_url: "http://localhost:3000" # TODO: production URL project_key: "qms" # api_key via env: REDMINE_API_KEY - # IMPORTANT (verifiziert): custom field DEFINITIONS cannot be created via API. + # IMPORTANT (verified): custom field DEFINITIONS cannot be created via API. # Run manual setup once before deploying. See docs/redmine-setup.md. tracker_mapping: - nc: "Nichtkonformität" # must match tracker name in Redmine + nc: "Nonconformity" # must match tracker name in Redmine capa: "CAPA" - audit: "Internes Audit" - kpi: "KPI-Messung" + audit: "Internal Audit" + kpi: "KPI Measurement"