From agent-workflows
Spawns independent agents to generate prospective failure narratives for projects from distinct root causes, then synthesizes into a risk registry with severity ratings and mitigations. Ideal for premortem risk analysis on design docs or plans.
npx claudepluginhub sjarmak/agent-workflowsThis skill uses the workspace's default tool permissions.
Prospective Failure Narratives. Spawns N independent agents, each writing a narrative from the future where the project FAILED for a different root cause. No agent sees others' failure stories. A lead agent then synthesizes all failure narratives into a structured risk registry with severity ratings and mitigations.
Mandates invoking relevant skills via tools before any response in coding sessions. Covers access, priorities, and adaptations for Claude Code, Copilot CLI, Gemini CLI.
Share bugs, ideas, or general feedback.
Prospective Failure Narratives. Spawns N independent agents, each writing a narrative from the future where the project FAILED for a different root cause. No agent sees others' failure stories. A lead agent then synthesizes all failure narratives into a structured risk registry with severity ratings and mitigations.
Based on Gary Klein's premortem technique: "prospective hindsight" — imagining an event has already occurred — increases the ability to identify reasons for future outcomes by ~30%. Starting from "it failed" bypasses the planning fallacy and optimism bias that normally prevent teams from envisioning failure modes.
$ARGUMENTS — format: [N] [path/to/design.md or inline description] where N is optional failure-lens count (default: 5, min 3, max 7)
Extract:
If the input is missing or unclear, ask the user to clarify before proceeding.
If a file path is given: read it and extract the key design decisions, architecture, dependencies, and assumptions.
If inline: parse the project description.
Prepare a project brief that includes:
Present the project brief to the user and confirm before proceeding. Adjust if the user gives feedback.
Launch all N agents in parallel using the Agent tool. Each agent gets the same project brief and a unique failure lens — a category of failure they must explore.
Select N from the following (always include lenses 1-3, then fill remaining slots in order):
Each agent MUST:
subagent_type: "general-purpose" (they may need web search for realistic failure scenarios)Agent prompt template (customize the lens per agent):
You are a failure analyst conducting a premortem exercise.
## Project Brief
{project_brief}
## Your Failure Lens: {lens_name}
{lens_description}
## Instructions
It is 6 months from now. This project has FAILED. Your job is to write the postmortem — but you're writing it BEFORE the project starts, not after.
Write a narrative (2-3 paragraphs) describing:
1. What happened — the sequence of events that led to failure
2. The root cause — the earliest decision or assumption that, if changed, would have prevented this
3. Warning signs — signals that were (or would have been) visible early on
4. Mitigations — concrete changes to the current design/plan that would prevent this failure
Be SPECIFIC. Reference actual components, decisions, and dependencies from the project brief. Don't write generic risks — write THIS project's risks.
## Output Format
### Failure Narrative: {lens_name}
**What happened:**
[2-3 paragraph narrative in past tense]
**Root cause:**
[Single sentence identifying the earliest causal decision]
**Warning signs:**
- [Concrete, observable signals]
**Mitigations:**
- [Specific changes to current design/plan]
**Severity:** [Critical / High / Medium / Low]
**Likelihood:** [High / Medium / Low]
After ALL agents return, produce the following synthesis:
| # | Failure Lens | Severity | Likelihood | Risk Score | Root Cause | Top Mitigation |
|---|
Risk Score = Severity x Likelihood where Critical=4, High=3, Medium=2, Low=1 for severity and High=3, Medium=2, Low=1 for likelihood. Sort by risk score descending.
Where did multiple failure lenses identify the same underlying vulnerability? These are the highest-priority risks. For each theme:
All mitigations ranked by:
The top 3-5 concrete changes to the current design that would most reduce overall risk, synthesized from the individual mitigations. For each:
Include all narratives for reference, grouped by lens.
Save the full output to a file premortem_{slugified_topic}.md in the working directory.
Present the risk registry and top recommendations to the user. Ask:
Sits between /converge and /diverge-prototype as a risk gate:
/converge (decision) -> /premortem (risk check) -> /diverge-prototype (build)