Entry point for STPA (System Theoretic Process Analysis) hazard analysis. Guides through all 4 steps sequentially. When starting a new STPA analysis session. When the human partner mentions safety analysis, hazard analysis, or risk assessment. When analyzing control systems for potential failures.
STPA (System Theoretic Process Analysis) is a hazard analysis method that:
"I'm using the STPA Overview skill to guide you through a systematic hazard analysis. We'll work through 4 steps, asking questions along the way."
Load: skills({"name":"stpa/step1-define-purpose"})
Load: skills({"name":"stpa/step2-control-structure"})
rankdir=TB and node [shape=box]Load: skills({"name":"stpa/step3-unsafe-control-actions"})
Load: skills({"name":"stpa/step4-loss-scenarios"})
[Step 1: Purpose] → [Step 2: Control Structure] → [Step 3: UCAs] → [Step 4: Scenarios]
↑ |
└──────────────────────── (Iterate as needed) ─────────────────────────┘
At each step:
QUESTION: message to the coordinator for relay instead of calling human-facing tools directly## STPA Analysis## STPA Analysis
### Step 1: Purpose Definition
#### Losses (L)
- L-1: [description]
#### Hazards (H)
- H-1: [system] [unsafe condition] [→ L-1]
#### System-Level Constraints (SC)
- SC-1: [condition to enforce] [→ H-1]
### Step 2: Control Structure
[Graphviz/DOT diagram]
### Step 3: Unsafe Control Actions
[UCA table]
### Step 4: Loss Scenarios
[Scenario descriptions and recommendations]
## STPA Findings
- [X] STPA analysis completed on [date]
- Key hazards identified: [count]
- Unsafe control actions found: [count]
- Critical recommendations: [list]
After completing all 4 steps:
## STPA FindingsGOAL COMPLETE: [exact checkbox text from GOAL.md] instead of editing GOAL.md yourselfstatus: "agent-done" to return controlstpa/step1-define-purpose - Detailed Step 1 guidancestpa/step2-control-structure - Control structure modelingstpa/step3-unsafe-control-actions - UCA identification tablesstpa/step4-loss-scenarios - Causal scenario analysisCRITICAL: Beware of letting the STPA feedback to lead to scope creep and expansion. YOUR JOB is to make the code simpler and better, and not to appease the STPA analyst. That means avoid the scope creep caused by STPA. Between fixing all hazard and keeping the code simple, prefer to make the code simple. What's a simple code? It is a piece of code that does one thing, well done, without extra complexity - in which the failure modes can be of recognized, reasoned about, and of little consequence; and above all for this session are a trying to end up with fewer lines of source code (including tests) than before.