Perform Design Failure Mode and Effects Analysis (DFMEA) for autonomous systems including robots, autonomous vehicles, drones, and similar safety-critical systems. Use when users want to conduct FMEA, analyze failure modes, identify hazards, assess risks, or develop mitigation strategies for perception stacks, sensor systems, control systems, or other autonomous system components.
Conduct systematic qualitative DFMEA analysis to identify potential failure modes and their effects at the system level.
Before starting the analysis, configure the DFMEA scope and output preferences through user interaction.
If the user provides a brief description (e.g., "DFMEA of Perception Stack"), ask clarifying questions:
If user provides detailed context, proceed to configuration.
Ask the user which columns to include in the DFMEA. Present the options:
Standard Columns (always included):
Optional Columns (user selects):
| Column | Description | Default |
|---|---|---|
| Severity | Severity rating (1-10) | Off |
| Occurrence | Likelihood rating (1-10) | Off |
| Detection | Detection rating (1-10) | Off |
| RPN | Risk Priority Number (S×O×D) | Off |
| Design Mitigation | Architectural/design countermeasures | On |
| Testing Mitigation | Verification activities | On |
| Runtime Mitigation | Operational safeguards | On |
| Sensors Affected | Which sensors involved | On |
| Assumptions | Analysis assumptions | Off |
| Notes | Additional remarks | Off |
Ask the user about the desired analysis depth:
| Depth Level | Description | Use Case |
|---|---|---|
| High-Level | 1-2 failure modes per function, major failure categories only | Quick overview, initial scoping |
| Standard | 3-5 failure modes per function, covers main guideword categories | Typical analysis, design reviews |
| Detailed | 5-10+ failure modes per function, exhaustive guideword application | Safety-critical systems, certification |
Ask the user which outputs to generate:
| Format | Description | File |
|---|---|---|
| JSON | Structured data for processing (always generated) | dfmea_output.json |
| Excel | Formatted spreadsheet with multiple sheets | dfmea_report.xlsx |
| Interactive Explorer | HTML dashboard with visualizations | dfmea_explorer.html |
Token-Efficient Output: Do NOT output verbose markdown tables inline. Generate files directly and show only a concise summary.
Ask the user for a project name to organize output files:
Question: "What would you like to name this DFMEA project?"
Behavior:
highway-autopilot-perception/Folder Structure:
<project-name>/
├── dfmea_output.json
├── dfmea_report.xlsx
└── dfmea_explorer.html
For each component/subsystem, list its primary functions. Functions describe what the system is supposed to do.
Example functions for a perception stack:
IMPORTANT: After identifying functions, present them to the user for confirmation before proceeding with failure mode analysis.
Display the identified functions in a clear table format:
## Identified Functions
| ID | Function Name | Description | Sensors |
|----|---------------|-------------|---------|
| F-01 | [Name] | [Description] | [Related sensors] |
| F-02 | [Name] | [Description] | [Related sensors] |
...
Use AskUserQuestion to let the user choose how to proceed:
Question: "How would you like to proceed with these functions?"
Options:
| Option | Description |
|---|---|
| Accept all | Proceed with all identified functions |
| Select specific functions | Choose which functions to include (show multi-select) |
| Add custom functions | User provides additional functions to include |
| Modify and confirm | User wants to edit function names/descriptions |
Based on user's choice:
## Identified Functions
| ID | Function Name | Description |
|----|---------------|-------------|
| F-01 | Image Acquisition | Capture frames from cameras |
| F-02 | Object Detection | Detect vehicles and obstacles |
| F-03 | Lane Detection | Detect lane markings |
| F-04 | Depth Estimation | Estimate distance using stereo |
**How would you like to proceed?**
○ Accept all (Recommended)
○ Select specific functions
○ Add custom functions
○ Modify and confirm
Use guidewords systematically to identify how each function can fail. See guidewords.md for the complete list.
Common guideword categories:
Apply guidewords based on configured depth level.
For each failure mode, trace the effect up to the system/vehicle level:
For each significant failure mode, identify mitigations based on configured columns:
| Category | Description | Examples |
|---|---|---|
| Design | Architectural choices that prevent or reduce failure likelihood | Redundancy, diversity, fail-safe defaults, graceful degradation |
| Testing | Verification activities that detect the failure mode | Fault injection, simulation, field testing, edge case coverage |
| Runtime | Runtime monitoring and operational constraints | Health monitoring, plausibility checks, operational domain restrictions, fallback behaviors |
See mitigation-patterns.md for detailed patterns.
Based on configured output formats, generate files directly without verbose inline output.
Output Generation Steps:
Example Output Summary (token-efficient):
───────────────────────────────────────────────────────────
DFMEA Analysis Complete
───────────────────────────────────────────────────────────
Project highway-autopilot-perception
System Camera-Based Perception Pipeline
Domain Highway Driving
───────────────────────────────────────────────────────────
Analysis Summary
───────────────────────────────────────────────────────────
Functions Analyzed 10
Failure Modes 20
Common-Cause Failures 5
Mitigations 60
───────────────────────────────────────────────────────────
Key Findings
───────────────────────────────────────────────────────────
1. Camera-only perception vulnerable to glare/rain
2. E2E models lack failure attribution
3. Stereo depth degrades at distance
───────────────────────────────────────────────────────────
Generated Files
───────────────────────────────────────────────────────────
JSON highway-autopilot-perception/dfmea_output.json
Excel highway-autopilot-perception/dfmea_report.xlsx
Explorer highway-autopilot-perception/dfmea_explorer.html
───────────────────────────────────────────────────────────
Do NOT output:
User can view full details in:
Generate structured JSON following this schema:
{
"metadata": {
"generated_at": "ISO-8601 timestamp",
"version": "1.0",
"depth_level": "standard",
"columns": ["function", "guideword", "failure_mode", "effect", "design_mitigation", "testing_mitigation", "runtime_mitigation"]
},
"system_info": {
"system": "System name",
"subsystem": "Subsystem name",
"sensors": "Sensor list",
"operational_domain": "Domain description",
"analysis_date": "YYYY-MM-DD"
},
"functions": [
{
"id": "F-01",
"name": "Function name",
"description": "Function description",
"sensors": "Related sensors",
"failure_count": 3
}
],
"failure_modes": [
{
"id": "FM-01",
"function_id": "F-01",
"function": "Function name",
"guideword": "Guideword",
"failure_mode": "Failure mode description",
"effect": "System-level effect",
"design_mitigation": "Design mitigation",
"testing_mitigation": "Testing mitigation",
"runtime_mitigation": "Runtime mitigation"
}
],
"common_cause_failures": [
{
"id": "CCF-01",
"cause": "Common cause",
"affected_sensors": "Affected sensors",
"effect": "Effect description",
"mitigation": "Mitigation description"
}
],
"assumptions": [
{
"id": "A-01",
"category": "Category",
"assumption": "Assumption text",
"impact_if_invalid": "Impact description"
}
],
"key_findings": [
"Key finding 1",
"Key finding 2"
]
}
All outputs are generated in the project folder specified during configuration.
Before generating outputs, create the project folder:
# Sanitize project name: lowercase, replace spaces with hyphens, remove special chars
PROJECT_DIR="<sanitized-project-name>"
mkdir -p "$PROJECT_DIR"
To generate a formatted Excel report, use the generate_excel.py script:
python scripts/generate_excel.py <project-dir>/dfmea_output.json <project-dir>/dfmea_report.xlsx
The generated report includes:
To generate an interactive HTML dashboard, use the generate_explorer.py script:
python scripts/generate_explorer.py <project-dir>/dfmea_output.json <project-dir>/dfmea_explorer.html
The explorer includes:
Features:
Both scripts require openpyxl (Excel only):
pip install openpyxl
For domain-specific knowledge about autonomous system architectures: