
Pre Mortem
Run a pre-mortem style review that loads compiled prevention checks and prior ao learnings before approving or executing a plan.
Overview
Pre-mortem is a journey-wide agent skill that loads compiled prevention checks and prior ao learnings into review packets—usable whenever a solo builder needs to stress-test a plan before committing to implementation or
Install
npx skills add https://github.com/boshu2/agentops --skill pre-mortemWhat is this skill?
- Mandatory Step 1.4: ao lookup prior learnings (top 5) as known_context in the review packet
- Mandatory Step 1.4b: load `.agents/pre-mortem-checks/*.md` before quick or deep review—not skipped by --quick
- Ranking: severity, applicable_when overlap, language overlap, plan-text overlap; changed-file overlap when plan names fi
- Fail-open fallbacks to registry.jsonl; cap top 5 findings / check files
- Contracts: finding-compiler.md and finding-registry.md for compiled prevention
- ao lookup limit 5 learnings
- Steps 1.4 and 1.4b mandatory before review
Adoption & trust: 852 installs on skills.sh; 384 GitHub stars; 2/3 security scanners passed (skills.sh audits).
What problem does it solve?
You are about to execute or review a plan but repeat domain mistakes because prior incidents and compiled checks live in scattered files the agent never reads.
Who is it for?
Builders using AgentOps (ao) with `.agents/pre-mortem-checks` or a findings registry who want every plan review grounded in compiled prevention.
Skip if: Greenfield projects with no ao tooling, empty `.agents` artifacts, and no appetite to maintain finding-compiler contracts.
When should I use this skill?
Before quick or deep review of a plan or change set when AgentOps compiled pre-mortem checks or registry findings should inform predictions.
What do I get? / Deliverables
The review packet includes ranked pre-mortem findings and cited learnings so predictions influence the review before quick or deep analysis proceeds.
- Review packet enriched with known_context learnings
- Up to five ranked pre-mortem findings cited from compiled checks or registry
Recommended Skills
Journey fit
Useful at every journey phase - explore requirements and options before committing to a direction.
Where it fits
Stress-test a feature spec against compiled checks before locking scope for implementation.
Attach ao learnings and top five findings to an implementation plan the agent is about to execute.
Ensure --quick review still loads `.agents/pre-mortem-checks` and registry fallbacks before sign-off.
Reuse ranked prevention when updating runbooks or post-incident change plans.
How it compares
Use instead of generic 'think about risks' prompts—this skill enforces mandatory retrieval and compiled-check ordering with defined fallbacks.
Common Questions / FAQ
Who is pre-mortem for?
Solo and small-team developers on AgentOps workflows who maintain compiled pre-mortem checks and want reviews to reuse prior learnings automatically.
When should I use pre-mortem?
Use it in Validate when hardening a spec, in Build before large refactors, in Ship before code review or release, and in Operate when iterating on runbooks—any time a plan packet goes through quick or deep review.
Is pre-mortem safe to install?
It may invoke local `ao lookup` and read repository-local `.agents` paths; review the Security Audits panel on this Prism page and treat registry contents as sensitive project knowledge.
SKILL.md
READMESKILL.md - Pre Mortem
# Compiled Prevention Loading > Extracted from pre-mortem/SKILL.md on 2026-04-11. ## Step 1.4: Retrieve Prior Learnings (Mandatory) Before review, retrieve learnings relevant to this plan's domain: ```bash if command -v ao &>/dev/null; then ao lookup --query "<plan goal or title>" --limit 5 2>/dev/null | head -30 fi ``` If learnings are returned, include them as `known_context` in the review packet. Cite any learning by filename when it influences a prediction. Skip silently if ao is unavailable or returns no results. ## Step 1.4b: Load Compiled Prevention First (Mandatory) Before quick or deep review, load compiled checks from `.agents/pre-mortem-checks/*.md` when they exist. This is separate from flywheel search and does NOT get skipped by `--quick`. Use the tracked contracts in `docs/contracts/finding-compiler.md` and `docs/contracts/finding-registry.md`: - prefer compiled pre-mortem checks first - rank by severity, `applicable_when` overlap, language overlap, and literal plan-text overlap - when the plan names files, rank changed-file overlap ahead of generic keyword matches - cap at top 5 findings / check files - if compiled checks are missing, incomplete, or fewer than the matched finding set, fall back to `.agents/findings/registry.jsonl` - fail open: - missing compiled directory or registry -> skip silently - empty compiled directory or registry -> skip silently - malformed line -> warn and ignore that line - unreadable file -> warn once and continue without findings Include matched entries in the council packet as `known_risks` with: - `id` - `pattern` - `detection_question` - `checklist_item` Use the same ranked packet contract as `/plan`: compiled checks first, then active findings fallback, then matching high-severity next-work context when relevant. Avoid re-ranking with an unrelated heuristic inside pre-mortem; the point is consistent carry-forward, not a fresh retrieval policy per phase. ### Record Citations for Applied Knowledge After including matched entries as `known_risks`, record each citation so the flywheel feedback loop can track influence: ```bash # Only use "applied" when the finding actually influenced the council packet. # Use "retrieved" for items loaded but not referenced in the risk assessment. ao metrics cite "<finding-path>" --type applied 2>/dev/null || true # influenced risk assessment ao metrics cite "<finding-path>" --type retrieved 2>/dev/null || true # loaded but not used ``` ### Section Evidence When lookup results include `section_heading`, `matched_snippet`, or `match_confidence` fields, prefer the matched section over the whole file — it pinpoints the relevant portion. Higher `match_confidence` (>0.7) means the section is a strong match; lower values (<0.4) are weaker signals. Use the `matched_snippet` as the primary context rather than reading the full file. ## Step 1a: Search Knowledge Flywheel (skip if `--quick`) Only run this step for `--deep`, `--mixed`, or `--debate`. ```bash if command -v ao &>/dev/null; then ao search "plan validation lessons <goal>" 2>/dev/null | head -10 fi ``` If ao returns prior plan review findings, include them as context for the council packet. Skip silently if ao is unavailable or returns no results. ## Step 1b: Check for Product Context **Skip if `--quick` as a separate pre-processing phase.** In quick mode, the same product context is still loaded inline during review. In non-quick modes, add the dedicated product perspective. ```bash if [ -f PRODUCT.md ]; then # PRODUCT.md exists — include product perspectives alongside plan-review fi ``` When `PRODUCT.md` exists in the project root AND the user did NOT pass an explicit `--preset` override: 1. Read `PRODUCT.md` content and include in the council packet via `context.files` 2. In `--quick` mode, keep the review inline and require the reviewer to assess user-value, adoption-barriers, and competitive-position directly from `PRODUCT.md`. 3. In non-quick modes