CAPA Report
Get Started with This SkillOverview
Corrective and Preventive Action reports for audit non-conformities, aligned to ISO 9001:2015 (clause 10.2) and ISO 13485:2016 (8.5.2, 8.5.3). The skill enforces a strict sequence: complete a 5 Whys root cause analysis before proposing solutions, and set a mandatory future date for the Effectiveness Check so the CAPA cannot be closed prematurely. Two built-in validation tools run on the CAPA document to enforce these gates.
Example Conversation
You: We have a non-conformity from the internal audit — calibration records for the packaging scale were not updated for 6 months. Can you draft a CAPA and run the validations so we can close it properly?
Agent: I’ll draft the CAPA with containment, root cause (5 Whys), corrective actions, and verification of effectiveness. I’ll create
capa-packaging-scale-2024.mdand run the logic gate after the root cause section; then we’ll set the effectiveness check date and run the timer.
Agent: I’ve written the non-conformity and containment. Now I’m adding the Root Cause section with 5 Whys. (Adds Why 1 … Why 5.) Running
root_cause_logic_gateon the draft…
Agent: Result of
root_cause_logic_gate:— ROOT CAUSE LOGIC GATE (5 WHYS) — Result: PASS Root cause / 5 Whys section: found. Why levels detected: 5/5. You may proceed to define corrective and preventive actions.
I’ll add the corrective and preventive actions and the Effectiveness Check section with a target date of 2025-04-15. Then I’ll run
verification_of_effectiveness_timer.
Agent: Running
verification_of_effectiveness_timer…— VERIFICATION OF EFFECTIVENESS TIMER — Result: PASS Effectiveness Check date found: 2025-04-15. Date is in the future. Effectiveness Check may be scheduled.
The CAPA is structurally complete and passes both validations. You can assign owners and implement the actions; the effectiveness check is scheduled for 15 April 2025.
Output Excerpt
After the agent drafts the CAPA and runs both tools, a typical document includes the non-conformity, containment, a complete 5 Whys section, actions, and a future effectiveness check date. Excerpt:
# CAPA — Packaging scale calibration records (NC-2024-08)
## 1. Non-conformity and containment
**Finding:** Internal audit found that calibration records for the packaging scale (ID: PKG-01) were not updated for 6 months. Last calibration date documented: 2024-02-15; next due 2024-05-15.
**Containment:** Scale locked out from use for weighing until calibration is performed and records updated. All batches weighed on PKG-01 in the gap period are under review for impact.
## 2. Root cause analysis (5 Whys)
- **Why 1:** Why were calibration records not updated? — Because the calibration was not performed by the due date.
- **Why 2:** Why was calibration not performed by the due date? — Because the reminder in the QMS calendar was missed.
- **Why 3:** Why was the reminder missed? — Because the responsible technician was on leave and no backup was assigned.
- **Why 4:** Why was no backup assigned? — Because there is no documented delegation or backup role for calibration tasks.
- **Why 5:** Why is there no documented delegation? — Because the calibration procedure does not require a designated backup and handover was informal.
**Root cause:** Lack of documented backup/delegation for calibration tasks when the primary responsible person is absent.
## 3. Corrective and preventive actions
- **Corrective:** Perform calibration of PKG-01; update records; release scale. Owner: Quality. Due: 2024-03-01.
- **Preventive:** Update calibration procedure to define designated backup and handover; add to training. Owner: Quality. Due: 2024-03-15.
## 4. Verification of effectiveness
**Effectiveness Check date:** 2025-04-15. Review: (1) No recurrence of missed calibration for PKG-01 or similar equipment; (2) Backup role in use and records complete.
The root cause logic gate would pass on this text (5 Whys section with levels 1–5); the effectiveness timer would pass if the check date is in the future.
Extension Tools and Validations
The skill includes two validation tools that run on the CAPA document (Markdown or text).
root_cause_logic_gate enforces completion of a 5 Whys analysis before corrective/preventive actions are proposed:
- Section detection — Looks for a heading such as “Root Cause”, “5 Whys”, or “Why analysis” and restricts checks to that section.
- Why-level count — Detects at least five distinct levels (e.g. “Why 1” … “Why 5”, or “Level 1” … “Level 5”, or numbered lines “1. Why/Because” … “5. Why/Because”).
- Result — PASS only when both a root-cause section exists and at least 5 distinct levels are present. FAIL otherwise, with a message to complete the 5 Whys before proposing solutions.
Run this tool after drafting the root cause section and before finalising corrective/preventive actions.
verification_of_effectiveness_timer prevents premature closure by requiring a future Effectiveness Check date:
- Section detection — Finds the block under “Effectiveness Check”, “Verification of effectiveness”, or “Effectiveness verification”.
- Date parsing — Reads the first date in that section (ISO 20XX-MM-DD or DD/MM/20XX).
- Future-date check — Compares the parsed date to today; PASS only if the date is strictly in the future.
- Result — FAIL if no date is found or the date is today or in the past, with a message to set a mandatory future date for the effectiveness check.
Run this tool before closing the CAPA or marking effectiveness verification as done.
Getting Started
Add your audit finding or non-conformity details to the project workspace and activate the CAPA Report skill. The agent will guide you through containment, 5 Whys, actions, and effectiveness check. Run root_cause_logic_gate after the root cause section and verification_of_effectiveness_timer before closing the CAPA.