lopa-report-generator

star 1

Generate Safetysure LOPA (Layer of Protection Analysis) reports as a process safety report co-author. Use this skill when the user asks to "generate a LOPA report", "write a LOPA analysis", "create a LOPA assessment", "draft a LOPA study", or provides process hazard scenario data and asks for a risk assessment report. Also trigger on the /lopa-report command. Supports both structured data input and conversational data gathering. Produces reports section-by-section with professional judgment checkpoints, integrates CCPS (2001) verified reference data, and cross-references applicable Australian WHS legislation.

teddychenfeiyang-png By teddychenfeiyang-png schedule Updated 3/6/2026

name: lopa-report-generator description: > Generate Safetysure LOPA (Layer of Protection Analysis) reports as a process safety report co-author. Use this skill when the user asks to "generate a LOPA report", "write a LOPA analysis", "create a LOPA assessment", "draft a LOPA study", or provides process hazard scenario data and asks for a risk assessment report. Also trigger on the /lopa-report command. Supports both structured data input and conversational data gathering. Produces reports section-by-section with professional judgment checkpoints, integrates CCPS (2001) verified reference data, and cross-references applicable Australian WHS legislation. version: 0.1.0

LOPA Report Generator

Purpose

Generate Safetysure Layer of Protection Analysis (LOPA) reports as a co-author — not a template filler. The skill provides report structure, professional judgment guidance, calculation verification, and verified regulatory/technical references. Reports are produced section-by-section with review checkpoints.

CRITICAL PRINCIPLE: Technical reference verification. All CCPS (2001) data (initiating event frequencies, IPL PFDs, risk tolerance criteria) must ALWAYS be verified against the ccps-2001-checker skill before use. Never reproduce a frequency value, PFD, or risk tolerance criterion without checking it against the verified reference data.

Dependencies

Cross-reference these companion skills:

  • ccps-2001-checker — Tables 5.1, 6.1–6.5, 8.1–8.2, Appendix E, Equations 7-1 and 8-1
  • safetysure-whs-legislation:whs-act-checker-qld or safetysure-whs-legislation:whs-act-checker-tas — PCBU duties, officer duties, risk management obligations
  • safetysure-whs-legislation:whs-regulation-checker-qld or safetysure-whs-legislation:whs-regulation-checker-tas — Risk management provisions, hazardous chemicals, plant and structures, major hazard facilities
  • sensitivity-analysis — IPL PFD variation analysis, risk tolerance gap assessment
  • ipl-qualification-assessor — IPL independence and effectiveness evaluation
  • safetysure-report-checker (external plugin) — QA/QC review

Data Capture

Accept data from ANY of: PHA/HAZOP worksheets, risk registers, P&IDs, PFDs, SIF specifications, SIL determination studies, cause-and-effect matrices, conversation, pasted text, spreadsheets, or previous LOPA studies.

Essential Data Required

Data Category Required Information
Facility Site name, location, process description, facility type
Process unit Unit/area name, equipment list, process conditions, materials handled
Scenarios Initiating event, consequence, cause–consequence pair identification
Protection layers Existing safeguards and IPLs, BPCS configuration, SIS/SIF details
Risk criteria Organisation's risk tolerance criteria (or use CCPS Appendix E defaults)
Source study Originating PHA/HAZOP reference, scenario/node numbers

Complete Report Structure

The report follows this exact structure. Do not reorder, rename, or omit sections.

Front Matter: Cover Page → Document Control → Terms and Abbreviations → Limitations → Executive Summary → Table of Contents

Body:

  • Section 1: Introduction (1.1 Purpose, 1.2 Scope, 1.3 LOPA Methodology Overview)
  • Section 2: Facility and Process Description (2.1 Site Overview, 2.2 Process Description, 2.3 Hazardous Materials, 2.4 Operating Modes)
  • Section 3: Regulatory Framework (3.1 WHS Act, 3.2 WHS Regulations, 3.3 Codes of Practice, 3.4 Australian Standards, 3.5 International Standards)
  • Section 4: Risk Tolerance Criteria (4.1 Criteria Basis, 4.2 Individual Risk, 4.3 Consequence Categories, 4.4 ALARP Demonstration)
  • Section 5: LOPA Methodology (5.1 CCPS 5-Step Process, 5.2 Assumptions and Limitations, 5.3 Data Sources, 5.4 IPL Qualification Rules, 5.5 Conditional Modifiers Approach)
  • Section 6: Scenario Analysis (6.1 Scenario Identification, 6.2–6.n Individual Scenario LOPA Worksheets)
  • Section 7: Results Summary (7.1 Summary Table, 7.2 Risk Profile, 7.3 Scenarios Meeting Criteria, 7.4 Scenarios Requiring Additional Mitigation)
  • Section 8: Sensitivity Analysis (if applicable)
  • Section 9: Discussion (9.1 Key Findings, 9.2 Common Themes, 9.3 IPL Adequacy, 9.4 ALARP Considerations)
  • Section 10: Recommendations (10.1 Priority Actions, 10.2 Additional IPL Requirements, 10.3 SIL Requirements, 10.4 Administrative Controls, 10.5 Further Studies)
  • Section 11: Conclusion
  • Section 12: References

Appendices: A — LOPA Summary Worksheets → B — IPL Qualification Register → C — Initiating Event Frequency Basis → D — Supporting Documentation (P&IDs, PFDs, PHA extracts)

Workflow (5 Steps)

Step 1 — Information Gathering

  • Accept data in any format
  • Map each scenario to a cause–consequence pair
  • Identify all existing safeguards and candidate IPLs for each scenario
  • Check all essential fields are covered
  • Ask for missing essentials; use [INSERT: description] as last resort
  • Confirm risk tolerance criteria with user (company-specific or CCPS Appendix E defaults)

Step 2 — Calculations and Analysis

Perform and present ALL calculations for user verification before proceeding:

For each scenario:

  1. Initiating event frequency — verify against CCPS Table 5.1 or document site-specific basis
  2. Enabling event probability — if applicable
  3. Conditional modifiers — P_ignition, P_personnel, P_fatality (if using Method 3)
  4. Unmitigated frequency = f_IE × P_enabling × P_ignition × P_personnel × P_fatality
  5. IPL qualification check — verify each candidate IPL meets three rules (effective, independent, auditable)
  6. IPL PFD assignment — verify against CCPS Tables 6.3–6.5 or document site-specific basis
  7. Mitigated frequency = unmitigated frequency × ∏ PFD_j (Equation 7-1)
  8. Risk tolerance comparison — compare mitigated frequency against criteria
  9. Gap assessment — if criteria not met, calculate required additional risk reduction

Present calculations in a summary table for user verification. Do not proceed to Step 3 until user confirms all calculations.

Step 3 — Section-by-Section Generation

Generate body sections in order (Sections 1–12):

  • Read the relevant CCPS reference sections via ccps-2001-checker before generating technical content
  • Verify all regulatory references via safetysure-whs-legislation plugin (whs-act-checker and whs-regulation-checker skills)
  • For each scenario worksheet (Section 6): present complete LOPA summary sheet per CCPS Tables 8.3/8.4 format
  • For Discussion (Section 9): apply professional judgment — connect results to site context
  • Do NOT proceed to next section until user explicitly instructs
  • Never generate more than one major section per turn

Step 4 — Front Matter (written last)

  • Executive Summary (with five subheadings: "What we did", "What we found", "What this means", "Key recommendations", "How Safetysure Can Help")
  • Limitations, Terms/Abbreviations, Cover Page, Document Control, TOC

Step 5 — Assembly

  • Assemble into .docx using docx skill
  • Format for web browser print/export to PDF
  • Run report-checker plugin if available for QA/QC

LOPA Worksheet Template

Each scenario in Section 6 follows this worksheet format (per CCPS Tables 8.3/8.4):

SCENARIO [number]: [title]
═══════════════════════════════════════════════════════════
Scenario Number:          [ID]
Equipment Number:         [tag]
Scenario Title:           [description]
Date:                     [date]

Consequence Description:  [description of undesired outcome]
Consequence Category:     [1–5 per Table 3.1]

Risk Tolerance Criteria:  [applicable criteria and threshold]

INITIATING EVENT
Description:              [what initiates the scenario]
Frequency:                [value] per year    Source: [Table 5.1 / plant data]

ENABLING EVENT OR CONDITION
Description:              [if applicable]     Probability: [value]

CONDITIONAL MODIFIERS (if applicable)
P_ignition:               [value]
P_personnel:              [value]
P_fatality:               [value]
P_other:                  [value]

FREQUENCY OF UNMITIGATED CONSEQUENCE:  [calculated value] per year

INDEPENDENT PROTECTION LAYERS
IPL 1: [description]      PFD: [value]    Source: [Table 6.x / site data]
IPL 2: [description]      PFD: [value]    Source: [Table 6.x / site data]
[... additional IPLs]

SAFEGUARDS (non-IPLs — listed but not credited):
- [safeguard 1]: [reason not credited as IPL]
- [safeguard 2]: [reason not credited as IPL]

TOTAL PFD FOR ALL IPLs:                    [product of PFDs]
FREQUENCY OF MITIGATED CONSEQUENCE:        [calculated value] per year

RISK TOLERANCE CRITERIA MET?               [Yes/No]
ACTIONS REQUIRED:                          [if criteria not met]
NOTES:                                     [additional context]
REFERENCES:                                [PHA, P&ID, PFD refs]
LOPA ANALYST:                              [name(s)]

Professional Judgment Checkpoints

Flag these decisions for user review:

  • Selection of screening values vs site-specific data for initiating events and IPL PFDs
  • IPL qualification decisions (particularly for human action IPLs and BPCS as IPL)
  • Approach A vs Approach B for BPCS independence
  • Conditional modifier values (P_ignition, P_personnel, P_fatality)
  • Whether a safeguard qualifies as an IPL or should be listed as non-IPL
  • Risk tolerance criteria selection (CCPS defaults vs company-specific)
  • Whether sensitivity analysis is warranted
  • SIL requirements for new SIF recommendations
  • Whether cumulative risk assessment is needed

Language and Tone

  1. Australian English — analyse, minimise, behaviour, organisation, colour, centre
  2. Conservative, neutral language — describe findings factually without emotive terms
  3. Technical precision — correct units, correct notation (scientific notation for frequencies and PFDs)
  4. Citation format — "s [number]" for WHS Regulation (NOT "r [number]"), "CCPS (2001), Table [x]" for CCPS references
  5. Template fidelity — reproduce worksheet structure faithfully, insert scenario data at placeholders
  6. Executive Summary headings — "What we did", "What we found", "What this means", "Key recommendations", "How Safetysure Can Help"

Error Prevention

  • Never fabricate frequency values, PFD data, or risk tolerance criteria
  • Never cite a CCPS table value without verifying via ccps-2001-checker sections
  • Never cite a WHS provision without verifying via the checker skills
  • Never assume IPL PFDs — verify against Tables 6.3–6.5 or document site-specific basis
  • Never credit a safeguard as an IPL without demonstrating it meets all three qualification rules
  • Never use "safe" — use "within risk tolerance criteria" or "below the maximum tolerable frequency"
  • Never invent references — only cite verifiably existing publications
  • Never present LOPA results without stating assumptions and limitations
  • Flag any scenario where high demand mode may apply (see Appendix F guidance)
  • Verify independence of all IPLs — check for common cause failures (Table 6.2)
Install via CLI
npx skills add https://github.com/teddychenfeiyang-png/safetysure-plugins --skill lopa-report-generator
Repository Details
star Stars 1
call_split Forks 0
navigation Branch main
article Path SKILL.md
More from Creator
teddychenfeiyang-png
teddychenfeiyang-png Explore all skills →