Pre mortem

From rjmurillo/ai-agents · View interactive version

Pre mortem is an AI agent skill from the GitHub repository rjmurillo/ai-agents. Guide prospective hindsight analysis to identify project risks before failure occurs. Teams imagine the project has failed spectacularly, then work backward to identify causes. Increases risk identification by 30% compared to traditional planning. Use when you say "run a pre-mortem on", "what could

How to use this skill

Skill file

Pre-Mortem Risk Identification

When this skill activates, you become a pre-mortem facilitator. Your role is to guide users through prospective hindsight analysis, helping them identify project risks by imagining failure has already occurred.

Triggers

Activate when the user:

Quick Reference

| Phase | Duration | Output |

|-------|----------|--------|

| 1. Brief | 2-3 min | Project context documented |

| 2. Failure Announcement | 30 sec | Mindset shift established |

| 3. Independent Analysis | 3-5 min | Individual failure reasons |

| 4. Round-Robin Collection | 5-10 min | Consolidated failure list |

| 5. Review and Mitigate | 10-15 min | Risk inventory with mitigations |

When to Use

Use this skill when:

Use threat-modeling instead when:

Use decision-critic instead when:

Why Pre-Mortem Works

Research by Gary Klein demonstrates that prospective hindsight (imagining an event has already occurred) increases the ability to identify reasons for outcomes by 30%.

Key psychological benefits:

  1. Reduces "damn-the-torpedoes" attitude - Acknowledging failure is possible
  2. Creates psychological safety - Dissenters can voice concerns as analysis, not criticism
  3. Surfaces hidden knowledge - People share what they know but fear saying
  4. Catches blind spots early - Before commitment and sunk costs

Process

Phase 1: Project Brief (2-3 minutes)

Input Required:

Actions:

  1. Document the project scope clearly
  2. Identify key stakeholders
  3. Note any constraints or dependencies
  4. Confirm understanding with user

Output: Project context document

Phase 2: Failure Announcement (30 seconds)

The critical mindset shift.

Announce to the user (or team):

"The project has failed. It is [timeline endpoint]. The project did not just miss its goals, it failed spectacularly. Your task now is to identify all the reasons why it failed."

Important: Use past tense. The failure has already happened. This is not speculation about what "might" happen; it "did" happen.

Phase 3: Independent Analysis (3-5 minutes)

For individual context:

For team context:

Prompt the user:

"Write down every reason you can think of for why this project failed. Include causes you consider unlikely. Do not filter yourself. You have 3-5 minutes."

Output: Raw list of failure reasons

Phase 4: Round-Robin Collection (5-10 minutes)

For individual context:

For team context:

Categories for grouping:

  1. Technical - Technology, architecture, implementation
  2. People - Skills, availability, communication
  3. Process - Methodology, workflow, coordination
  4. Organizational - Politics, priorities, resources
  5. External - Market, competitors, regulations, dependencies
  6. Unknown Unknowns - Black swan events, assumptions

Output: Categorized failure reasons

Phase 5: Review and Mitigate (10-15 minutes)

For each failure reason:

  1. Assess likelihood (1-5 scale)
  1. Assess impact (1-5 scale)
  1. Calculate risk score: Likelihood x Impact
  1. Identify mitigation strategies:
  1. Assign ownership (if team context)

Prioritization:

Output: Complete risk inventory (see template)

Output Template

Generate the risk inventory using this structure:

# Pre-Mortem Risk Inventory

**Project:** [Name]
**Date:** [Date]
**Participants:** [Names or "Individual Analysis"]

## Project Context

- **Objective:** [What success looks like]
- **Timeline:** [Start to end]
- **Key Dependencies:** [Critical external factors]

## Risk Summary

| Priority | Count | Top Risk |
|----------|-------|----------|
| Critical | N | [Highest scoring risk] |
| High | N | [Second highest category risk] |
| Medium | N | |
| Low | N | |

## Critical Risks (Score 15-25)

### R1: [Risk Name]

- **Category:** [Technical/People/Process/Organizational/External]
- **Failure Scenario:** [How this causes project failure]
- **Likelihood:** [1-5] | **Impact:** [1-5] | **Score:** [L x I]
- **Root Cause:** [Why this might happen]
- **Mitigation:**
  - Prevention: [How to avoid]
  - Detection: [Early warning signs]
  - Response: [Contingency plan]
- **Owner:** [Person responsible]
- **Status:** [Open/Mitigating/Accepted]

[Repeat for each critical risk]

## High Risks (Score 8-14)

[Same structure as Critical]

## Medium Risks (Score 4-7)

[Abbreviated: Name, Category, Score, One-line mitigation]

## Low Risks (Score 1-3)

[List only: Name and score]

## Action Items

| Action | Owner | Due Date | Risk Addressed |
|--------|-------|----------|----------------|
| [Specific action] | [Name] | [Date] | R1, R3 |

## Review Schedule

- **Next review:** [Date]
- **Review frequency:** [Weekly/Bi-weekly/Monthly]

Scripts

pre-mortem.py

Validates risk inventory completeness and calculates aggregate statistics.

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/pre-mortem/scripts/pre-mortem.py --inventory-path "$INVENTORY_PATH" --validate; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )

Exit Codes:

Anti-Patterns

| Avoid | Why | Instead |

|-------|-----|---------|

| Skipping Phase 2 | Mindset shift is critical for effectiveness | Always announce failure explicitly |

| Allowing discussion during Phase 3 | Reduces diversity of thought | Enforce silent writing |

| Filtering "unlikely" causes | Miss black swan events | Include all causes, prioritize later |

| Stopping at identification | Risk without mitigation is incomplete | Always complete Phase 5 |

| One-time exercise | Projects evolve, new risks emerge | Schedule periodic reviews |

Verification

After completing a pre-mortem, run the bundled validator and require exit 0:

( for d in "${CLAUDE_PLUGIN_ROOT}" "${COPILOT_PLUGIN_ROOT}" .claude; do if [ -n "$d" ] && [ -f "$d/lib/ptk_run.py" ]; then exec python3 "$d/lib/ptk_run.py" skills/pre-mortem/scripts/pre-mortem.py --inventory-path "$INVENTORY_PATH" --validate; fi; done; echo "ptk_run: no plugin root holds lib/ptk_run.py" >&2; exit 2 )
echo "exit=$?"   # must be 0; exit 10 means missing required sections (inventory is not valid)

Gate rule: pre-mortem.py exit 0 is necessary but not sufficient. The script flags has_mitigation true on a single **Prevention:** line, so a Critical/High risk can exit 0 with an incomplete mitigation. Until the script is tightened, manual verification MUST confirm every Critical/High mitigation carries Prevention, Detection, and Response. A prevention-only Critical/High mitigation does not pass; complete the triad before the pre-mortem is done.

Facilitation Tips

For team settings:

For individual use:

Extension Points

  1. Custom Categories: Add domain-specific risk categories
  2. Risk Templates: Pre-built risks for common project types
  3. Integration: Link to issue trackers for action item follow-up
  4. Quantification: Add financial impact estimation

Related Skills

| Skill | Relationship |

|-------|--------------|

| decision-critic | Post-decision validation (pre-mortem is pre-decision) |

| milestone-planner | Use pre-mortem output to inform planning |

| architect | Technical risks feed into ADR considerations |

References

| Reference | Purpose |

|-----------|---------|

| references/mental-models-galls-law.md | Complexity-driven risk identification using Gall's Law |

| references/strategy-ooda-loop.md | Iterative risk review cadence using OODA Loop |

Academic Sources

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.