pre-mortem

pre-mortem is a command for coding agents from aaronbassett/agent-foundry. It costs 36 tokens per session (1,047 once invoked), scanned A, original, MIT.

A decision-review command that imagines a tentative choice has failed six months later and asks several separate reviewers to describe what went wrong.

In plain words
What is it for?
Use it after choosing a likely direction but before acting, especially when you want several independent failure scenarios.
Why use it?
It helps reveal concrete risks and weak assumptions before you commit to the choice.

Command

Part of the decision-making plugin — 1 skill, 7 commands, 2 agents shipped together

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/aaronbassett/agent-foundry/pre-mortem
Clone the repo
git clone --depth 1 https://github.com/aaronbassett/agent-foundry

Or install decision-making, the plugin that ships this one along with the rest of its 1 skill, 7 commands, 2 agents.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for pre-mortem

README.md
[![agentmods](https://agentmods.dev/badge/commands/aaronbassett/agent-foundry/pre-mortem.svg)](https://agentmods.dev/commands/aaronbassett/agent-foundry/pre-mortem)
Your own site
<a href="https://agentmods.dev/commands/aaronbassett/agent-foundry/pre-mortem"><img src="https://agentmods.dev/badge/commands/aaronbassett/agent-foundry/pre-mortem.svg" alt="Measured on agentmods" height="20"></a>
Per session 36 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,047 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00036 $0.01047
Opus 5 $0.00018 $0.00524
Sonnet 5 $0.00007 $0.00209
Haiku 4.5 $0.00004 $0.00105

Measured 3d ago against content hash 28b0561744bd, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

pre-mortem scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 3d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

plugins/decision-making/commands/pre-mortem.md · 99 lines

How it starts

The opening of the file, as written. The whole thing — 99 lines — stays where its author put it; the contents beside it link to each section on GitHub.

/decision-making:pre-mortem

When to use

Use this command when a decision has been tentatively made and you want to surface failure modes before committing. It is intended for the moment after you have arrived at a candidate answer but before you act on it.

Use /decision-making:red-team earlier in the process when the plan is still open to critique and has not yet been tentatively chosen. red-team stress-tests an artifact before a decision is made; pre-mortem assumes the decision is made and asks how it failed.

Cost tier

Medium. 5 parallel general-purpose subagents at default depth, one round. See references/cost-tiers.md.

Input

The tentative decision plus any relevant context the post-mortem writers will need (constraints, assumptions, prior discussion, known trade-offs). Optional: --depth=N to override the fan-out count.

Fan-out rules

  • Default: 5 subagents.
  • Floor: 3. Below 3, you lose the clustering signal; you are just getting a couple of failure narratives which is barely better than the main thread writing one inline.
  • No upper cap, but cost scales linearly with fan-out.
  • --depth=N flag overrides the default; values below 3 are rejected with an error.

Workflow

  1. Parse --depth — if the caller provided --depth=N, use that value (rejecting any N < 3 with an error explaining the floor). Otherwise, use the default of 5.

  2. Spawn N parallel post-mortem writers — use the Agent tool with subagent_type: general-purpose to spawn N subagents in parallel. Each subagent receives the same prompt, with the tentative decision and context substituted into the bracketed slots verbatim:

    It is 6 months from now. The following decision failed
    catastrophically. Write the post-mortem explaining exactly how
    and why it failed.
    
    The decision that failed:
    [TENTATIVE DECISION]
    
    Context at the time the decision was made:
    [CONTEXT]
    
    Your post-mortem must be concrete:
    - Name specific failure modes, not abstract risks
    - Tell the story of HOW it failed, not WHETHER it could fail
    - Include the specific event, system, or assumption that broke
    - Explain the downstream consequences
    - Be honest: if the decision was actually defensible and survived,
      say so and explain what made the difference
    
    Good-faith rules: no fabricated technical facts (you may invent
    plausible specific events as narrative), no straw-manning the
    decision, commit fully to the post-mortem framing without
    equivocation.
    

Read the full file on GitHub · 99 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 3d ago First seen · 99 lines · 36 tokens per session scan A 28b0561744bd

Subscribe to this mod's changes

pre-mortem is a command published in the GitHub repository aaronbassett/agent-foundry (4 stars, last pushed 18d ago), licensed MIT. It adds 36 tokens to every session and 1,047 once invoked, about $0.0002 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.