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.
npx agentmods add commands/aaronbassett/agent-foundry/pre-mortemgit clone --depth 1 https://github.com/aaronbassett/agent-foundryWrote 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.
[](https://agentmods.dev/commands/aaronbassett/agent-foundry/pre-mortem)<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>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.
| Model | Per session | Once 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 |
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.
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=Nflag overrides the default; values below 3 are rejected with an error.
Workflow
-
Parse
--depth— if the caller provided--depth=N, use that value (rejecting anyN < 3with an error explaining the floor). Otherwise, use the default of 5. -
Spawn N parallel post-mortem writers — use the Agent tool with
subagent_type: general-purposeto 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.
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.
- 3d ago First seen · 99 lines · 36 tokens per session scan A 28b0561744bd
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.
Other commands, from other repositories
git
Git operations with intelligent commit messages and workflow optimization.
checklist
Generate a custom checklist for the current feature based on user requirements.
clarify
Identify underspecified areas in the current feature spec by asking up to 5 highly targeted clarification questions and encoding answers back into the spec.
specify
Create or update the feature specification from a natural language feature description.
analyze
Perform a non-destructive cross-artifact consistency and quality analysis across spec.md, plan.md, and tasks.md after task generation.
converge
Assess the current codebase against the feature's spec, plan, and tasks, then append any remaining unbuilt work as new tasks to tasks.md so implement can complete it.