Borrowing it
Nothing to install: this file belongs to ManSio/mscodebase-intelligence. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/ManSio/mscodebase-intelligence/main/.opencode/command/postmortem.mdgit clone --depth 1 https://github.com/ManSio/mscodebase-intelligenceWrote 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/mansio/mscodebase-intelligence/postmortem)<a href="https://agentmods.dev/commands/mansio/mscodebase-intelligence/postmortem"><img src="https://agentmods.dev/badge/commands/mansio/mscodebase-intelligence/postmortem/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/mansio/mscodebase-intelligence/postmortem"><img src="https://agentmods.dev/badge/commands/mansio/mscodebase-intelligence/postmortem.svg" alt="Reviewed on agentmods" width="80" 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.1 | $0.00015 | $0.00479 |
| Opus 5.5 | $0.00006 | $0.00192 |
| Sonnet 5.5 | $0.00003 | $0.00096 |
| Haiku 4.5 | $0.00002 | $0.00048 |
Grade A, and why
postmortem 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 26d 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.
What it actually says
You are running the POST-MORTEM phase. A post-mortem that produces only a narrative has failed — its output must be something that fires next time.
Structure
- Symptom — what was observed, in terms someone else would recognise. Not what you think caused it.
- Root cause — the specific line, value, or assumption. "The regex was not anchored" beats "regexes are fragile".
- Why it survived — the check that should have caught it, and why it did not. This is the part that generalises.
- Fix — with the commit sha.
- Guard — the thing that now fails. A guard is code that runs. "Be more careful" is not a guard.
- Class — the family this belongs to. If the family already has an entry, add to it; do not create a parallel one.
Rules
- One entry per incident, ≤15 lines. No stack traces, no raw pytest dumps. A diary nobody reads protects nothing.
- The guard ships in the same change as the fix. A fix without a guard is a coincidence waiting to be undone.
- Check the registry before writing. A repeated class gets a stronger guard, not a new note.
- Record what you got wrong in the diagnosis. Self-correction is the most reusable part of the entry.
Sweep for the class
After the guard is in place, ask: where else does this pattern exist? Report
N of M and how many distinct idioms. A rule applied in one place and not two lines
later proves the rule was known and not followed — a different problem from not
knowing it.
Output
## [YYYY-MM-DD] <name> — Status
**Symptom:** ...
**Root cause:** <file:line>
**Why it survived:** ...
**Fix:** <sha>
**Guard:** <what now fails, and where>
**Class:** P-### / new class
**Class sweep:** N of M places, K idioms
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.
- 26d ago First seen · 52 lines · 15 tokens per session scan A bc06ab492cfd
postmortem is a command published in the GitHub repository ManSio/mscodebase-intelligence (3 stars, last pushed 5d ago), licensed MIT. It adds 15 tokens to every session and 479 once invoked, about $0.0001 per session on Opus 5.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-10-04.
Other commands, from other repositories
api-aqa-flow-test-correction
Phase 7 Test Corrections of api-aqa-flow (USER APPROVAL REQUIRED).
ui-aqa-flow-test-report-analysis
Phase 7 Test Report Analysis of ui-aqa-flow.
api-aqa-flow-execution-and-report-analysis
Phase 6 Execution & Report Analysis of api-aqa-flow (USER INTERACTION REQUIRED).
ui-aqa-flow-test-correction
Phase 8 Test Correction of ui-aqa-flow.
verify-bug
Post-merge UAT verification workflow. Walks JIRA reproduce steps, performs comparative audits (Before/After), attaches evidence to JIRA, and transitions status on PASS.
bugfix
Bug fix workflow: root cause analysis → user review → regression test + fix via TDD.