Pre-Mortem Skill Purpose: Is this plan/spec good enough to implement? Mandatory for 3+ issue epics. Pre-mortem is enforced by hook when is invoked on epics with 3+ child issues. 6/6 consecutive positive ROI. Bypass: flag or . Run on a plan or spec to get multi-model judgment before committing to implementation. --- Quick Start --- Execution Steps Step 0: Bead-Input Pre-Flight (Mandatory) When the input to is a bead ID ( ) and the plan is full-complexity, older than 7 days, or inherited from a prior session, run as the first action. If verification reports STALE citations, stop in interactive…

\"\ncheck \"SKILL.md has name: pre-mortem\" \"grep -q '^name: pre-mortem' '$SKILL_DIR/SKILL.md'\"\ncheck \"references/ directory exists\" \"[ -d '$SKILL_DIR/references' ]\"\ncheck \"references/ has at least 3 files\" \"[ \\$(ls '$SKILL_DIR/references/' | wc -l) -ge 3 ]\"\ncheck \"SKILL.md mentions council delegation\" \"grep -Eq '(/|\\\\$)council' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions compiled pre-mortem checks\" \"grep -q '\\.agents/pre-mortem-checks' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions finding registry fallback\" \"grep -q 'registry.jsonl' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions known_risks\" \"grep -q 'known_risks' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions dedup_key\" \"grep -q 'dedup_key' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md refreshes finding compiler after writes\" \"grep -q 'finding-compiler.sh' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions plan-review preset\" \"grep -qi 'plan-review' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions PASS/WARN/FAIL verdicts\" \"grep -q 'PASS.*WARN.*FAIL\\|PASS | WARN | FAIL' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions .agents/council/ output path\" \"grep -q '\\.agents/council/' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions pre-mortem report format\" \"grep -qi 'pre-mortem report\\|Pre-Mortem:' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions --deep mode\" \"grep -q '\\-\\-deep' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions --mixed mode\" \"grep -q '\\-\\-mixed' '$SKILL_DIR/SKILL.md'\"\ncheck \"SKILL.md mentions --debate mode\" \"grep -q '\\-\\-debate' '$SKILL_DIR/SKILL.md'\"\n\necho \"\"; echo \"Results: $PASS passed, $FAIL failed\"\n[ $FAIL -eq 0 ] && exit 0 || exit 1\n","content_type":"application/x-sh; charset=utf-8","language":"bash","size":1974,"content_sha256":"9ed160caa5b35fdc4b7328540e323279d45b49ecaed9b3ecb932cde32ea205a2"}],"content_json":{"type":"doc","content":[{"type":"heading","attrs":{"level":1},"content":[{"text":"Pre-Mortem Skill","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Purpose:","type":"text","marks":[{"type":"strong"}]},{"text":" Is this plan/spec good enough to implement?","type":"text"}]}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Mandatory for 3+ issue epics.","type":"text","marks":[{"type":"strong"}]},{"text":" Pre-mortem is enforced by hook when ","type":"text"},{"text":"$crank","type":"text","marks":[{"type":"code_inline"}]},{"text":" is invoked on epics with 3+ child issues. 6/6 consecutive positive ROI. Bypass: ","type":"text"},{"text":"--skip-pre-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag or ","type":"text"},{"text":"AGENTOPS_SKIP_PRE_MORTEM_GATE=1","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"$council validate","type":"text","marks":[{"type":"code_inline"}]},{"text":" on a plan or spec to get multi-model judgment before committing to implementation.","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Quick Start","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"$pre-mortem # validates most recent plan (inline, no spawning)\n$pre-mortem path/to/PLAN.md # validates specific plan (inline)\n$pre-mortem --deep path/to/SPEC.md # 4 judges (thorough review, spawns agents)\n$pre-mortem --mixed path/to/PLAN.md # cross-vendor (Claude + Codex)\n$pre-mortem --preset=architecture path/to/PLAN.md # architecture-focused review\n$pre-mortem --explorers=3 path/to/SPEC.md # deep investigation of plan\n$pre-mortem --debate path/to/PLAN.md # two-round adversarial review","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Execution Steps","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 0: Bead-Input Pre-Flight (Mandatory)","type":"text"}]},{"type":"paragraph","content":[{"text":"When the input to ","type":"text"},{"text":"$pre-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":" is a bead ID (","type":"text"},{"text":"[a-z]{2,6}-[0-9a-z.]+","type":"text","marks":[{"type":"code_inline"}]},{"text":") and the plan is full-complexity, older than 7 days, or inherited from a prior session, run ","type":"text"},{"text":"ao beads verify \u003cbead-id>","type":"text","marks":[{"type":"code_inline"}]},{"text":" as the first action.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"if [[ \"$INPUT\" =~ ^[a-z]{2,6}-[0-9a-z.]+$ ]]; then\n ao beads verify \"$INPUT\" || true\nfi","type":"text"}]},{"type":"paragraph","content":[{"text":"If verification reports STALE citations, stop in interactive mode and ask for scope re-validation before council review. In autonomous RPI mode, record the stale-scope evidence in the council packet and do not continue the go/no-go judgment against stale evidence.","type":"text"}]},{"type":"paragraph","content":[{"text":"This implements the shared stale-scope validation rule: inherited scope estimates must be re-validated against HEAD before acting on deferred beads, handoff docs, or prior-session plans.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1: Find the Plan/Spec","type":"text"}]},{"type":"paragraph","content":[{"text":"If path provided:","type":"text","marks":[{"type":"strong"}]},{"text":" Use it directly.","type":"text"}]},{"type":"paragraph","content":[{"text":"If no path:","type":"text","marks":[{"type":"strong"}]},{"text":" Find most recent plan:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"ls -lt .agents/plans/ 2>/dev/null | head -3\nls -lt .agents/specs/ 2>/dev/null | head -3","type":"text"}]},{"type":"paragraph","content":[{"text":"Use the most recent file. If nothing found, ask user.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1.4: Retrieve Prior Learnings (Mandatory)","type":"text"}]},{"type":"paragraph","content":[{"text":"Before review, retrieve learnings relevant to this plan's domain:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"if command -v ao &>/dev/null; then\n ao lookup --query \"\u003cplan goal or title>\" --limit 5 2>/dev/null | head -30\nfi","type":"text"}]},{"type":"paragraph","content":[{"text":"If learnings are returned, include them as ","type":"text"},{"text":"known_context","type":"text","marks":[{"type":"code_inline"}]},{"text":" in the review packet. Cite any learning by filename when it influences a prediction. Skip silently if ao is unavailable or returns no results.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1.4b: Load Compiled Prevention First (Mandatory)","type":"text"}]},{"type":"paragraph","content":[{"text":"Before quick or deep review, load compiled checks from ","type":"text"},{"text":".agents/pre-mortem-checks/*.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" when they exist. This is separate from flywheel search and does NOT get skipped by ","type":"text"},{"text":"--quick","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"Use the tracked contracts in ","type":"text"},{"text":"docs/contracts/finding-compiler.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"docs/contracts/finding-registry.md","type":"text","marks":[{"type":"code_inline"}]},{"text":":","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"prefer compiled pre-mortem checks first","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"rank by severity, ","type":"text"},{"text":"applicable_when","type":"text","marks":[{"type":"code_inline"}]},{"text":" overlap, language overlap, and literal plan-text overlap","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"when the plan names files, rank changed-file overlap ahead of generic keyword matches","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"cap at top 5 findings / check files","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"if compiled checks are missing, incomplete, or fewer than the matched finding set, fall back to ","type":"text"},{"text":".agents/findings/registry.jsonl","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"fail open:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"missing compiled directory or registry -> skip silently","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"empty compiled directory or registry -> skip silently","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"malformed line -> warn and ignore that line","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"unreadable file -> warn once and continue without findings","type":"text"}]}]}]}]}]},{"type":"paragraph","content":[{"text":"Include matched entries in the council packet as ","type":"text"},{"text":"known_risks","type":"text","marks":[{"type":"code_inline"}]},{"text":" with:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"id","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"pattern","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"detection_question","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"checklist_item","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"paragraph","content":[{"text":"Use the same ranked packet contract as ","type":"text"},{"text":"$plan","type":"text","marks":[{"type":"code_inline"}]},{"text":": 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.","type":"text"}]},{"type":"paragraph","content":[{"text":"Record citations for applied knowledge:","type":"text","marks":[{"type":"strong"}]}]},{"type":"paragraph","content":[{"text":"After including matched entries as ","type":"text"},{"text":"known_risks","type":"text","marks":[{"type":"code_inline"}]},{"text":", record each citation so the flywheel feedback loop can track influence:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"# Only use \"applied\" when the finding actually influenced the council packet.\n# Use \"retrieved\" for items loaded but not referenced in the risk assessment.\nao metrics cite \"\u003cfinding-path>\" --type applied 2>/dev/null || true # influenced risk assessment\nao metrics cite \"\u003cfinding-path>\" --type retrieved 2>/dev/null || true # loaded but not used","type":"text"}]},{"type":"paragraph","content":[{"text":"Section evidence:","type":"text","marks":[{"type":"strong"}]},{"text":" When lookup results include ","type":"text"},{"text":"section_heading","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"matched_snippet","type":"text","marks":[{"type":"code_inline"}]},{"text":", or ","type":"text"},{"text":"match_confidence","type":"text","marks":[{"type":"code_inline"}]},{"text":" fields, prefer the matched section over the whole file — it pinpoints the relevant portion. Higher ","type":"text"},{"text":"match_confidence","type":"text","marks":[{"type":"code_inline"}]},{"text":" (>0.7) means the section is a strong match; lower values (\u003c0.4) are weaker signals. Use the ","type":"text"},{"text":"matched_snippet","type":"text","marks":[{"type":"code_inline"}]},{"text":" as the primary context rather than reading the full file.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1.5: Fast Path (--quick mode)","type":"text"}]},{"type":"paragraph","content":[{"text":"By default, pre-mortem runs inline (","type":"text","marks":[{"type":"strong"}]},{"text":"--quick","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":")","type":"text","marks":[{"type":"strong"}]},{"text":" — single-agent structured review, no spawning. This catches real implementation issues at ~10% of full council cost (proven in ag-nsx: 3 actionable bugs found inline that would have caused runtime failures).","type":"text"}]},{"type":"paragraph","content":[{"text":"In ","type":"text"},{"text":"--quick","type":"text","marks":[{"type":"code_inline"}]},{"text":" mode, skip Steps 1a and 1b as standalone pre-processing phases. If ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" exists, Step 1b's product context is still loaded inline during the quick review. The mandatory ","type":"text"},{"text":"ao lookup","type":"text","marks":[{"type":"code_inline"}]},{"text":" retrieval in Step 1.4 and compiled prevention load in Step 1.4b still run in quick mode. ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--mixed","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--debate","type":"text","marks":[{"type":"code_inline"}]},{"text":", and ","type":"text"},{"text":"--explorers","type":"text","marks":[{"type":"code_inline"}]},{"text":" add the dedicated product perspective and wider council fan-out.","type":"text"}]},{"type":"paragraph","content":[{"text":"To escalate to full multi-judge council, use ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":" (4 judges) or ","type":"text"},{"text":"--mixed","type":"text","marks":[{"type":"code_inline"}]},{"text":" (cross-vendor).","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1.6: Scope Mode Selection","type":"text"}]},{"type":"paragraph","content":[{"text":"Before running council, determine the review posture. Three modes:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Mode","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"When to Use","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Posture","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"SCOPE EXPANSION","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Greenfield features, user says \"go big\"","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Dream big. What's the 10-star version? Push scope UP.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"HOLD SCOPE","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Bug fixes, refactors, most plans","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Maximum rigor within accepted scope. Make it bulletproof.","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"SCOPE REDUCTION","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Plan touches >15 files, overbuilt","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Strip to essentials. What's the minimum that ships value?","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Auto-detection (when user doesn't specify):","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Greenfield feature → default EXPANSION","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Bug fix or hotfix → default HOLD SCOPE","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Refactor → default HOLD SCOPE","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Plan touching >15 files → suggest REDUCTION","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"User says \"go big\" / \"ambitious\" → EXPANSION","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Critical rule:","type":"text","marks":[{"type":"strong"}]},{"text":" Once mode is selected, COMMIT to it in the council packet. Do not silently drift. Include ","type":"text"},{"text":"scope_mode: \u003cexpansion|hold|reduction>","type":"text","marks":[{"type":"code_inline"}]},{"text":" in the council packet context.","type":"text"}]},{"type":"paragraph","content":[{"text":"Mode-specific council instructions:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"EXPANSION:","type":"text","marks":[{"type":"strong"}]},{"text":" Add to judge prompt: \"What would make this 10x more ambitious for 2x the effort? What's the platonic ideal? List 3 delight opportunities.\"","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"HOLD SCOPE:","type":"text","marks":[{"type":"strong"}]},{"text":" Add to judge prompt: \"The plan's scope is accepted. Your job: find every failure mode, test every edge case, ensure observability. Do not argue for less work.\"","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"REDUCTION:","type":"text","marks":[{"type":"strong"}]},{"text":" Add to judge prompt: \"Find the minimum viable version. Everything else is deferred. What can be a follow-up? Separate must-ship from nice-to-ship.\"","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1a: Search Knowledge Flywheel","type":"text"}]},{"type":"paragraph","content":[{"text":"Skip if ","type":"text","marks":[{"type":"strong"}]},{"text":"--quick","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":".","type":"text","marks":[{"type":"strong"}]},{"text":" Only run this step for ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"--mixed","type":"text","marks":[{"type":"code_inline"}]},{"text":", or ","type":"text"},{"text":"--debate","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"if command -v ao &>/dev/null; then\n ao search \"plan validation lessons \u003cgoal>\" 2>/dev/null | head -10\nfi","type":"text"}]},{"type":"paragraph","content":[{"text":"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.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1b: Check for Product Context","type":"text"}]},{"type":"paragraph","content":[{"text":"Skip if ","type":"text","marks":[{"type":"strong"}]},{"text":"--quick","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":" as a separate pre-processing phase.","type":"text","marks":[{"type":"strong"}]},{"text":" In quick mode, the same product context is still loaded inline during review. In non-quick modes, add the dedicated product perspective.","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"if [ -f PRODUCT.md ]; then\n # PRODUCT.md exists — include product perspectives alongside plan-review\nfi","type":"text"}]},{"type":"paragraph","content":[{"text":"When ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" exists in the project root AND the user did NOT pass an explicit ","type":"text"},{"text":"--preset","type":"text","marks":[{"type":"code_inline"}]},{"text":" override:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Read ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" content and include in the council packet via ","type":"text"},{"text":"context.files","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"In ","type":"text"},{"text":"--quick","type":"text","marks":[{"type":"code_inline"}]},{"text":" mode, keep the review inline and require the reviewer to assess user-value, adoption-barriers, and competitive-position directly from ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"In non-quick modes, add a single consolidated ","type":"text"},{"text":"product","type":"text","marks":[{"type":"code_inline"}]},{"text":" perspective to the council invocation:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$council --preset=plan-review --perspectives=\"product\" validate \u003cplan-path>","type":"text"}]},{"type":"paragraph","content":[{"text":"This yields 3 judges total (2 plan-review + 1 product). The product judge covers user-value, adoption-barriers, and competitive-position in a single review.","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"With ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":": 5 judges (4 plan-review + 1 product).","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"When ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" exists BUT the user passed an explicit ","type":"text"},{"text":"--preset","type":"text","marks":[{"type":"code_inline"}]},{"text":": skip product auto-include (user's explicit preset takes precedence).","type":"text"}]},{"type":"paragraph","content":[{"text":"When ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" does not exist: proceed to Step 2 unchanged.","type":"text"}]},{"type":"blockquote","content":[{"type":"paragraph","content":[{"text":"Tip:","type":"text","marks":[{"type":"strong"}]},{"text":" Create ","type":"text"},{"text":"PRODUCT.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" from ","type":"text"},{"text":"docs/PRODUCT-TEMPLATE.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" to enable product-aware plan validation.","type":"text"}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 1.7: Load Council FAIL Patterns (Mandatory)","type":"text"}]},{"type":"paragraph","content":[{"text":"Read ","type":"text"},{"text":"skills/pre-mortem/references/council-fail-patterns.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" for the top 8 council FAIL patterns to check against.","type":"text"}]},{"type":"paragraph","content":[{"text":"These patterns are derived from 124 analyzed FAIL verdicts across 946 council sessions. They apply to both ","type":"text"},{"text":"--quick","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":" modes.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2: Run Council Validation","type":"text"}]},{"type":"paragraph","content":[{"text":"Default (inline, no spawning):","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$council --quick validate \u003cplan-path>","type":"text"}]},{"type":"paragraph","content":[{"text":"Single-agent structured review. Catches real implementation issues at ~10% of full council cost. Sufficient for most plans (proven across 6+ epics).","type":"text"}]},{"type":"paragraph","content":[{"text":"Default (2 judges with plan-review perspectives) applies when you intentionally run non-quick council mode.","type":"text"}]},{"type":"paragraph","content":[{"text":"With --deep (4 judges with plan-review perspectives):","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$council --deep --preset=plan-review validate \u003cplan-path>","type":"text"}]},{"type":"paragraph","content":[{"text":"Spawns 4 judges:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"missing-requirements","type":"text","marks":[{"type":"code_inline"}]},{"text":": What's not in the spec that should be? What questions haven't been asked?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"feasibility","type":"text","marks":[{"type":"code_inline"}]},{"text":": What's technically hard or impossible here? What will take 3x longer than estimated?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"scope","type":"text","marks":[{"type":"code_inline"}]},{"text":": What's unnecessary? What's missing? Where will scope creep?","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"spec-completeness","type":"text","marks":[{"type":"code_inline"}]},{"text":": Are boundaries defined? Do conformance checks cover all acceptance criteria? Is the plan mechanically verifiable?","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Use ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":" for high-stakes plans (migrations, security, multi-service, 7+ issues).","type":"text"}]},{"type":"paragraph","content":[{"text":"With --mixed (cross-vendor):","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$council --mixed --preset=plan-review validate \u003cplan-path>","type":"text"}]},{"type":"paragraph","content":[{"text":"3 Claude + 3 Codex agents for cross-vendor plan validation with plan-review perspectives.","type":"text"}]},{"type":"paragraph","content":[{"text":"With explicit preset override:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$pre-mortem --preset=architecture path/to/PLAN.md","type":"text"}]},{"type":"paragraph","content":[{"text":"Explicit ","type":"text"},{"text":"--preset","type":"text","marks":[{"type":"code_inline"}]},{"text":" overrides the automatic plan-review preset. Uses architecture-focused personas instead.","type":"text"}]},{"type":"paragraph","content":[{"text":"With explorers:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$council --deep --preset=plan-review --explorers=3 validate \u003cplan-path>","type":"text"}]},{"type":"paragraph","content":[{"text":"Each judge spawns 3 explorers to investigate aspects of the plan's feasibility against the codebase. Useful for complex migration or refactoring plans.","type":"text"}]},{"type":"paragraph","content":[{"text":"With debate mode:","type":"text","marks":[{"type":"strong"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$pre-mortem --debate","type":"text"}]},{"type":"paragraph","content":[{"text":"Enables adversarial two-round review for plan validation. Use for high-stakes plans where multiple valid approaches exist. See ","type":"text"},{"text":"$council","type":"text","marks":[{"type":"code_inline"}]},{"text":" docs for full --debate details.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2.4: Temporal Interrogation (--deep and --temporal)","type":"text"}]},{"type":"paragraph","content":[{"text":"Included automatically with ","type":"text","marks":[{"type":"strong"}]},{"text":"--deep","type":"text","marks":[{"type":"code_inline"},{"type":"strong"}]},{"text":".","type":"text","marks":[{"type":"strong"}]},{"text":" Also available via ","type":"text"},{"text":"--temporal","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag for quick reviews.","type":"text"}]},{"type":"paragraph","content":[{"text":"Walk through the plan's implementation timeline to surface time-dependent risks:","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Phase","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Questions","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hour 1: Setup","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"What blocks the first meaningful code change? Are dependencies available?","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hour 2: Core","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Which files change in what order? Are there circular dependencies?","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hour 4: Integration","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"What fails when components connect? Which error paths are untested?","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hour 6+: Ship","type":"text","marks":[{"type":"strong"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"What \"should be quick\" but historically isn't? What context is lost overnight?","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Add to each judge's prompt when temporal interrogation is active:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"TEMPORAL INTERROGATION: Walk through this plan's implementation timeline.\nFor each phase (Hour 1, 2, 4, 6+), identify:\n1. What blocks progress at this point?\n2. What fails silently at this point?\n3. What compounds if not caught at this point?\nReport temporal findings in a separate \"Timeline Risks\" section.","type":"text"}]},{"type":"paragraph","content":[{"text":"Auto-triggered","type":"text","marks":[{"type":"strong"}]},{"text":" (even without ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":") when the plan has 5+ files or 3+ sequential dependencies.","type":"text"}]},{"type":"paragraph","content":[{"text":"Retro history correlation:","type":"text","marks":[{"type":"strong"}]},{"text":" When ","type":"text"},{"text":".agents/retro/index.jsonl","type":"text","marks":[{"type":"code_inline"}]},{"text":" has 2+ entries, load the last 5 retros and check for recurring timeline-phase failures. Auto-escalate severity for phases that caused issues in prior retros.","type":"text"}]},{"type":"paragraph","content":[{"text":"Temporal findings appear in the report as a ","type":"text"},{"text":"## Timeline Risks","type":"text","marks":[{"type":"code_inline"}]},{"text":" table. See ","type":"text"},{"text":"references/temporal-interrogation.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/temporal-interrogation.md","title":null}}]},{"text":" for the full framework.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2.5: Error & Rescue Map (Mandatory for plans with external calls)","type":"text"}]},{"type":"paragraph","content":[{"text":"When the plan introduces methods, services, or codepaths that can fail, the council packet MUST include an Error & Rescue Map. If the plan omits one, generate it during review.","type":"text"}]},{"type":"paragraph","content":[{"text":"Include in the council packet as ","type":"text"},{"text":"context.error_map","type":"text","marks":[{"type":"code_inline"}]},{"text":":","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Method/Codepath","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"What Can Go Wrong","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Exception/Error","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Rescued?","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Rescue Action","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"User Sees","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"ServiceName#method","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"API timeout","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"TimeoutError","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Y/N","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Retry 2x, then raise","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"\"Service unavailable\"","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Rules:","type":"text","marks":[{"type":"strong"}]}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Every external call (API, database, file I/O) must have at least one row","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"rescue StandardError","type":"text","marks":[{"type":"code_inline"}]},{"text":" or bare ","type":"text"},{"text":"except:","type":"text","marks":[{"type":"code_inline"}]},{"text":" is always a smell — name specific exceptions","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Every rescued error must: retry with backoff, degrade gracefully, OR re-raise with context","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"For LLM/AI calls: map malformed response, empty response, hallucinated JSON, and refusal as separate failure modes","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Each GAP (unrescued error) is a finding with severity=significant","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"See ","type":"text"},{"text":"references/error-rescue-map-template.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" for the full template with worked examples.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2.6: Council FAIL Pattern Check (Mandatory)","type":"text"}]},{"type":"paragraph","content":[{"text":"Council FAIL Pattern Check:","type":"text","marks":[{"type":"strong"}]},{"text":" Evaluate the plan against the top 8 council FAIL patterns (see ","type":"text"},{"text":"references/council-fail-patterns.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/council-fail-patterns.md","title":null}}]},{"text":"): missing mechanical verification, self-assessment, context rot, propagation blindness, plan oscillation, dead infrastructure activation, missing rollback map, and four-surface closure gap. Each pattern violation is a finding with severity based on the calibration table in the reference.","type":"text"}]},{"type":"paragraph","content":[{"text":"Add to each judge's prompt:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"COUNCIL FAIL PATTERN CHECK: Review this plan for the top 8 council FAIL patterns:\n1. Missing mechanical verification — are all gates automated?\n2. Self-assessment — is validation external to the implementer?\n3. Context rot — are phase boundaries enforced with fresh sessions?\n4. Propagation blindness — is the full change surface enumerated?\n5. Plan oscillation — is direction validated before propagation?\n6. Dead infrastructure activation — does the plan provision anything without activation tests?\n7. Missing rollback map — does any production-state change lack a rollback procedure?\n8. Four-surface closure — does the plan address Code + Docs + Examples + Proof for every feature?\nReport FAIL pattern findings in a \"FAIL Pattern Risks\" section.","type":"text"}]},{"type":"paragraph","content":[{"text":"Auto-triggered","type":"text","marks":[{"type":"strong"}]},{"text":" for all plans (both ","type":"text"},{"text":"--quick","type":"text","marks":[{"type":"code_inline"}]},{"text":" and ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":" modes).","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2.7: Test Pyramid Coverage Check (Mandatory)","type":"text"}]},{"type":"paragraph","content":[{"text":"Validate that the plan includes appropriate test levels per the test pyramid standard (","type":"text"},{"text":"test-pyramid.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" in the standards skill).","type":"text"}]},{"type":"paragraph","content":[{"text":"Check each issue in the plan:","type":"text","marks":[{"type":"strong"}]}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Question","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Expected","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Finding if Missing","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Does any issue touching external APIs include L0 (contract) tests?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=significant: \"Missing contract tests for API boundary\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Does every feature/bug issue include L1 (unit) tests?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=significant: \"Missing unit tests for feature/bug issue\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Do cross-module changes include L2 (integration) tests?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=moderate: \"Missing integration tests for cross-module change\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Are L4+ levels deferred to human gate (not agent-planned)?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=low: \"Agent planning L4+ tests — these require human-defined scenarios\"","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Add to each judge's prompt when test pyramid check is active:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"TEST PYRAMID CHECK: Review the plan's test coverage against the L0-L7 pyramid.\nFor each issue, verify:\n1. Are the right test levels specified? (L0 for boundaries, L1 for behavior, L2 for integration)\n2. Are there gaps where tests should exist but aren't planned?\n3. Are any agent-autonomous levels (L0-L3) missing from code-change issues?\nReport test pyramid findings in a \"Test Coverage Gaps\" section.","type":"text"}]},{"type":"paragraph","content":[{"text":"Auto-triggered","type":"text","marks":[{"type":"strong"}]},{"text":" when any issue in the plan modifies source code files (","type":"text"},{"text":".go","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".py","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".ts","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".rs","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".js","type":"text","marks":[{"type":"code_inline"}]},{"text":").","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 2.8: Input Validation Check (Mandatory for enum-like fields)","type":"text"}]},{"type":"paragraph","content":[{"text":"When the plan introduces or modifies fields with a bounded set of valid values (enums, tier names, mode strings, status codes), verify the plan includes validation logic.","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Question","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Expected","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Finding if Missing","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Does every new enum-like field have a validation guard?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=significant: \"No validation for enum field — invalid values pass silently\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Is there a defined fallback for unrecognized values?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=moderate: \"No fallback behavior specified for invalid input\"","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Are valid values defined as a constant set (not inline strings)?","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Yes","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"severity=low: \"Valid values are inline strings — extract to named constant set\"","type":"text"}]}]}]}]},{"type":"paragraph","content":[{"text":"Auto-triggered","type":"text","marks":[{"type":"strong"}]},{"text":" when the plan introduces struct fields with comments mentioning valid values, config fields with bounded options, or string fields parsed from user input.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 3: Interpret Council Verdict","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Council Verdict","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Pre-Mortem Result","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Action","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"PASS","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Ready to implement","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Proceed","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"WARN","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Review concerns","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Address warnings or accept risk","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"FAIL","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Not ready","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Fix issues before implementing","type":"text"}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4: Write Pre-Mortem Report","type":"text"}]},{"type":"paragraph","content":[{"text":"Write to:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":".agents/council/YYYY-MM-DD-pre-mortem-\u003ctopic>.md","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"code_block","attrs":{"wrap":false,"language":"markdown"},"content":[{"text":"---\nid: pre-mortem-YYYY-MM-DD-\u003ctopic-slug>\ntype: pre-mortem\ndate: YYYY-MM-DD\nsource: \"[[.agents/plans/YYYY-MM-DD-\u003cplan-slug>]]\"\nprediction_ids:\n - pm-YYYYMMDD-001\n - pm-YYYYMMDD-002\n---\n\n# Pre-Mortem: \u003cTopic>\n\n## Council Verdict: PASS / WARN / FAIL\n\n| ID | Judge | Finding | Severity | Prediction |\n|----|-------|---------|----------|------------|\n| pm-YYYYMMDD-001 | Missing-Requirements | ... | significant | \u003cwhat will go wrong> |\n| pm-YYYYMMDD-002 | Feasibility | ... | significant | \u003cwhat will go wrong> |\n| pm-YYYYMMDD-003 | Scope | ... | moderate | \u003cwhat will go wrong> |\n\n## Pseudocode Fixes\n\n**Every finding that implies a code change MUST include implementation-ready pseudocode**, not prose-only descriptions. Write the pseudocode in the language of the target file. Workers read issue descriptions, not pre-mortem reports — vague prose leads to workers reimplementing the bug.\n\nFormat each code-fix finding as:\n","type":"text"}]},{"type":"paragraph","content":[{"text":"Finding: F1 — \u003cconcise description> Severity: \u003cseverity> Fix (pseudocode):","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"\u003clanguage>"},"content":[{"text":"// pseudocode in the target file's language\nif tier == \"inherit\" || tier == \"\" {\n return \"balanced\" // inherit always resolves to balanced\n}","type":"text"}]},{"type":"paragraph","content":[{"text":"Affected files: \u003cpath(s)>","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"\nProse-only fix descriptions (e.g., \"The inherit tier should fall back to balanced\") are insufficient when the fix involves specific logic. If a finding is purely architectural or process-related with no code change, prose is acceptable.\n\n## Shared Findings\n- ...\n\n## Known Risks Applied\n- `\u003cfinding-id>` — `\u003cwhy it matched this plan>`\n\n## Concerns Raised\n- ...\n\n## Recommendation\n\u003ccouncil recommendation>\n\n## Decision Gate\n\n[ ] PROCEED - Council passed, ready to implement\n[ ] ADDRESS - Fix concerns before implementing\n[ ] RETHINK - Fundamental issues, needs redesign","type":"text"}]},{"type":"paragraph","content":[{"text":"Each finding gets a unique prediction ID (","type":"text"},{"text":"pm-YYYYMMDD-NNN","type":"text","marks":[{"type":"code_inline"}]},{"text":") for downstream correlation. See ","type":"text"},{"text":"references/prediction-tracking.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/prediction-tracking.md","title":null}}]},{"text":" for the full tracking lifecycle.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4.5: Persist Reusable Findings","type":"text"}]},{"type":"paragraph","content":[{"text":"If the verdict is ","type":"text"},{"text":"WARN","type":"text","marks":[{"type":"code_inline"}]},{"text":" or ","type":"text"},{"text":"FAIL","type":"text","marks":[{"type":"code_inline"}]},{"text":", persist only the reusable plan/spec failures to ","type":"text"},{"text":".agents/findings/registry.jsonl","type":"text","marks":[{"type":"code_inline"}]},{"text":".","type":"text"}]},{"type":"paragraph","content":[{"text":"Use the finding-registry contract:","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"required fields: ","type":"text"},{"text":"dedup_key","type":"text","marks":[{"type":"code_inline"}]},{"text":", provenance, ","type":"text"},{"text":"pattern","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"detection_question","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"checklist_item","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"applicable_when","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":"confidence","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"applicable_when","type":"text","marks":[{"type":"code_inline"}]},{"text":" must use the controlled vocabulary from the contract","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"append or merge by ","type":"text"},{"text":"dedup_key","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"use the contract's temp-file-plus-rename atomic write rule","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Do NOT write every comment. Persist only findings that should change future planning or review behavior.","type":"text"}]},{"type":"paragraph","content":[{"text":"After the registry update, if ","type":"text"},{"text":"hooks/finding-compiler.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" exists, run:","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"bash hooks/finding-compiler.sh --quiet 2>/dev/null || true","type":"text"}]},{"type":"paragraph","content":[{"text":"Every reusable finding write must include ","type":"text"},{"text":"dedup_key","type":"text","marks":[{"type":"code_inline"}]},{"text":" and refresh compiled findings with ","type":"text"},{"text":"finding-compiler.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" when that hook exists.","type":"text"}]},{"type":"paragraph","content":[{"text":"This refreshes ","type":"text"},{"text":".agents/findings/*.md","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".agents/planning-rules/*.md","type":"text","marks":[{"type":"code_inline"}]},{"text":", ","type":"text"},{"text":".agents/pre-mortem-checks/*.md","type":"text","marks":[{"type":"code_inline"}]},{"text":", and draft constraint metadata in the same session. ","type":"text"},{"text":"session-end-maintenance.sh","type":"text","marks":[{"type":"code_inline"}]},{"text":" remains the idempotent backstop.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 4.6: Copy Pseudocode Fixes into Plan Issues","type":"text"}]},{"type":"paragraph","content":[{"text":"When pre-mortem findings are applied to plan issues (via ","type":"text"},{"text":"bd update","type":"text","marks":[{"type":"code_inline"}]},{"text":" or manual issue/task edits), ","type":"text"},{"text":"copy the pseudocode block verbatim into the issue body","type":"text","marks":[{"type":"strong"}]},{"text":". Workers read issue descriptions — they do not read pre-mortem reports. If the pseudocode lives only in the pre-mortem report, workers will reimplement the fix from scratch and often get it wrong.","type":"text"}]},{"type":"paragraph","content":[{"text":"For each finding with a pseudocode fix:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Identify which plan issue the finding applies to","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Append a ","type":"text"},{"text":"## Pre-Mortem Fix","type":"text","marks":[{"type":"code_inline"}]},{"text":" section to that issue's description containing the pseudocode block and affected file paths","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"If no matching issue exists, note the gap in the report's Recommendation section","type":"text"}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 5: Record Ratchet Progress","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":"bash"},"content":[{"text":"ao ratchet record pre-mortem 2>/dev/null || true","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Step 6: Report to User","type":"text"}]},{"type":"paragraph","content":[{"text":"Tell the user:","type":"text"}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Council verdict (PASS/WARN/FAIL)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Key concerns (if any)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Recommendation","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Location of pre-mortem report","type":"text"}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Integration with Workflow","type":"text"}]},{"type":"code_block","attrs":{"wrap":false,"language":""},"content":[{"text":"$plan epic-123\n │\n ▼\n$pre-mortem ← You are here\n │\n ├── PASS → $implement\n ├── WARN → Review, then $implement or fix\n └── FAIL → Fix plan, re-run $pre-mortem","type":"text"}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"Examples","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Validate a Plan (Default — Inline)","type":"text"}]},{"type":"paragraph","content":[{"text":"User says:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"$pre-mortem .agents/plans/2026-02-05-auth-system.md","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"What happens:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent reads the auth system plan","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Runs ","type":"text"},{"text":"$council --quick validate \u003cplan-path>","type":"text","marks":[{"type":"code_inline"}]},{"text":" (inline, no spawning)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Single-agent structured review finds missing error handling for token expiry","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Council verdict: WARN","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Output written to ","type":"text"},{"text":".agents/council/2026-02-13-pre-mortem-auth-system.md","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"paragraph","content":[{"text":"Result:","type":"text","marks":[{"type":"strong"}]},{"text":" Fast pre-mortem report with actionable concerns. Use ","type":"text"},{"text":"--deep","type":"text","marks":[{"type":"code_inline"}]},{"text":" for high-stakes plans needing multi-judge consensus.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Cross-Vendor Plan Validation","type":"text"}]},{"type":"paragraph","content":[{"text":"User says:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"$pre-mortem --mixed .agents/plans/2026-02-05-auth-system.md","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"What happens:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent runs mixed-vendor council (3 Claude + 3 Codex)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Cross-vendor perspectives catch platform-specific issues","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Verdict: PASS with 2 warnings","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Result:","type":"text","marks":[{"type":"strong"}]},{"text":" Higher confidence from cross-vendor validation before committing resources.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Auto-Find Recent Plan","type":"text"}]},{"type":"paragraph","content":[{"text":"User says:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"$pre-mortem","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"What happens:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent scans ","type":"text"},{"text":".agents/plans/","type":"text","marks":[{"type":"code_inline"}]},{"text":" for most recent plan","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Finds ","type":"text"},{"text":"2026-02-13-add-caching-layer.md","type":"text","marks":[{"type":"code_inline"}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Runs inline council validation (no spawning, ~10% of full council cost)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Records ratchet progress","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Result:","type":"text","marks":[{"type":"strong"}]},{"text":" Frictionless validation of most recent planning work.","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"Deep Review for High-Stakes Plan","type":"text"}]},{"type":"paragraph","content":[{"text":"User says:","type":"text","marks":[{"type":"strong"}]},{"text":" ","type":"text"},{"text":"$pre-mortem --deep .agents/plans/2026-02-05-migration-plan.md","type":"text","marks":[{"type":"code_inline"}]}]},{"type":"paragraph","content":[{"text":"What happens:","type":"text","marks":[{"type":"strong"}]}]},{"type":"ordered_list","attrs":{"order":1,"listStyle":"number"},"content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Agent reads the migration plan","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Searches knowledge flywheel for prior migration learnings","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Checks PRODUCT.md for product context","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Runs ","type":"text"},{"text":"$council --deep --preset=plan-review validate \u003cplan-path>","type":"text","marks":[{"type":"code_inline"}]},{"text":" (4 judges)","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"Council verdict with multi-perspective consensus","type":"text"}]}]}]},{"type":"paragraph","content":[{"text":"Result:","type":"text","marks":[{"type":"strong"}]},{"text":" Thorough multi-judge review for plans where the stakes justify spawning agents.","type":"text"}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Troubleshooting","type":"text"}]},{"type":"table","attrs":{"layout":null},"content":[{"type":"tr","content":[{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Problem","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Cause","type":"text"}]}]},{"type":"th","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Solution","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Council times out","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Plan too large or complex for judges to review in allocated time","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Split plan into smaller epics or increase timeout via council config","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"FAIL verdict on valid plan","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Judges misunderstand domain-specific constraints","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Add context via ","type":"text"},{"text":"--perspectives-file","type":"text","marks":[{"type":"code_inline"}]},{"text":" with domain explanations","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Product perspectives missing","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"PRODUCT.md exists but not included in council packet","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Verify PRODUCT.md is in project root and no explicit ","type":"text"},{"text":"--preset","type":"text","marks":[{"type":"code_inline"}]},{"text":" override was passed","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Pre-mortem gate blocks $crank","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Epic has 3+ issues and no pre-mortem ran","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"$pre-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":" before ","type":"text"},{"text":"$crank","type":"text","marks":[{"type":"code_inline"}]},{"text":", or use ","type":"text"},{"text":"--skip-pre-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":" flag (not recommended)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Spec-completeness judge warns","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Plan lacks Boundaries or Conformance Checks sections","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Add SDD sections or accept WARN (backward compatibility — not a failure)","type":"text"}]}]}]},{"type":"tr","content":[{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Mandatory for epics enforcement","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Hook blocks $crank on 3+ issue epic without pre-mortem","type":"text"}]}]},{"type":"td","attrs":{"colspan":1,"rowspan":1,"colwidth":null,"alignment":""},"content":[{"type":"paragraph","content":[{"text":"Run ","type":"text"},{"text":"$pre-mortem","type":"text","marks":[{"type":"code_inline"}]},{"text":" first, or set ","type":"text"},{"text":"AGENTOPS_SKIP_PRE_MORTEM_GATE=1","type":"text","marks":[{"type":"code_inline"}]},{"text":" to bypass","type":"text"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}},{"type":"heading","attrs":{"level":2},"content":[{"text":"See Also","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"../council/SKILL.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Multi-model validation council","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"../plan/SKILL.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Create implementation plans","type":"text"}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"../vibe/SKILL.md","type":"text","marks":[{"type":"code_inline"}]},{"text":" — Validate code after implementation","type":"text"}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Reference Documents","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/council-fail-patterns.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/council-fail-patterns.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/enhancement-patterns.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/enhancement-patterns.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/error-rescue-map-template.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/error-rescue-map-template.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/failure-taxonomy.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/failure-taxonomy.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/simulation-prompts.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/simulation-prompts.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/prediction-tracking.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/prediction-tracking.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/spec-verification-checklist.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/spec-verification-checklist.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/temporal-interrogation.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/temporal-interrogation.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/scope-predicate-positive-negative-cases.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/scope-predicate-positive-negative-cases.md","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":2},"content":[{"text":"Local Resources","type":"text"}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"references/","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/council-fail-patterns.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/council-fail-patterns.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/enhancement-patterns.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/enhancement-patterns.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/error-rescue-map-template.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/error-rescue-map-template.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/failure-taxonomy.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/failure-taxonomy.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/prediction-tracking.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/prediction-tracking.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/scope-predicate-positive-negative-cases.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/scope-predicate-positive-negative-cases.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/simulation-prompts.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/simulation-prompts.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/spec-verification-checklist.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/spec-verification-checklist.md","title":null}}]}]}]},{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"references/temporal-interrogation.md","type":"text","marks":[{"type":"link","attrs":{"href":"references/temporal-interrogation.md","title":null}}]}]}]}]},{"type":"heading","attrs":{"level":3},"content":[{"text":"scripts/","type":"text"}]},{"type":"bullet_list","content":[{"type":"list_item","content":[{"type":"paragraph","content":[{"text":"scripts/validate.sh","type":"text","marks":[{"type":"code_inline"}]}]}]}]},{"type":"hr","attrs":{"markup":"---"}}]},"metadata":{"date":"2026-06-05","name":"pre-mortem","author":"@skillopedia","source":{"stars":375,"repo_name":"agentops","origin_url":"https://github.com/boshu2/agentops/blob/HEAD/skills-codex/pre-mortem/SKILL.md","repo_owner":"boshu2","body_sha256":"4981a0e14fbba617cbcc16ec8e9db92c4884bff4a3c228603ba85091bb357d6a","cluster_key":"6cf757f7e7372a59d400abb2f93a5ab09a2fcb3a5ed4b46593c5a79639121928","clean_bundle":{"format":"clean-skill-bundle-v1","source":"boshu2/agentops/skills-codex/pre-mortem/SKILL.md","attachments":[{"id":"ca7e4c94-c74a-5172-8f2a-f45105f2bb14","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/ca7e4c94-c74a-5172-8f2a-f45105f2bb14/attachment.json","path":".agentops-generated.json","size":274,"sha256":"79b1a90e2d079be049afa7c0dba5d6b4d67f0ba8a6413d50ef4fd8251ddf3dd6","contentType":"application/json; charset=utf-8"},{"id":"38217d33-30d7-552c-a920-21f20f23cb06","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/38217d33-30d7-552c-a920-21f20f23cb06/attachment.md","path":"prompt.md","size":766,"sha256":"106c8750431a7fc446bc04cd8f3d57c0b60f8ee55f9469bcbd3b9d34c4e4d79b","contentType":"text/markdown; charset=utf-8"},{"id":"023a7573-8078-5380-be36-5aca71544401","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/023a7573-8078-5380-be36-5aca71544401/attachment.md","path":"references/council-fail-patterns.md","size":8459,"sha256":"286c07cea777866bb9bbeb7fd1df0e831ba0174a9129f0636cfdee7dc2135e0a","contentType":"text/markdown; charset=utf-8"},{"id":"b7245ff5-62d1-5640-ac29-7d0bc9176c75","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/b7245ff5-62d1-5640-ac29-7d0bc9176c75/attachment.md","path":"references/enhancement-patterns.md","size":8180,"sha256":"486f0296b1f2f0a3a75a91d48c1a5eb593bdebaf2666c169ad769a37ec61aa59","contentType":"text/markdown; charset=utf-8"},{"id":"5c3e0ac0-ee68-5911-afd1-d42400da76df","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/5c3e0ac0-ee68-5911-afd1-d42400da76df/attachment.md","path":"references/error-rescue-map-template.md","size":3383,"sha256":"608ab861dced2e145982f22d66e1fc9f9f6aeb30f2f6385957e8e6f467c9159c","contentType":"text/markdown; charset=utf-8"},{"id":"d7862e26-6b16-5c6c-866f-8e02d7f47ae1","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/d7862e26-6b16-5c6c-866f-8e02d7f47ae1/attachment.md","path":"references/failure-taxonomy.md","size":10205,"sha256":"161e6d8fdab4c4f5dbb2810884e7b7930a316cee278583ec3a6f98460620bc5e","contentType":"text/markdown; charset=utf-8"},{"id":"a4af87b4-1505-525a-8c24-2daa434dfca3","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a4af87b4-1505-525a-8c24-2daa434dfca3/attachment.md","path":"references/prediction-tracking.md","size":2082,"sha256":"7a64c69d3346f86373fa54d729168d0c66293abd6526d3bf5ce4b75866abcbf9","contentType":"text/markdown; charset=utf-8"},{"id":"a7ae94cc-3754-5c86-b77b-c1b21f90e78e","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/a7ae94cc-3754-5c86-b77b-c1b21f90e78e/attachment.md","path":"references/scope-predicate-positive-negative-cases.md","size":4293,"sha256":"7507cc47d73510032c8f4bdb6a671883c12bb0a6dd91bee6c8968ce0de0ad170","contentType":"text/markdown; charset=utf-8"},{"id":"91477e3f-b98b-5a27-b7c3-a5bff4d25302","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/91477e3f-b98b-5a27-b7c3-a5bff4d25302/attachment.md","path":"references/simulation-prompts.md","size":5013,"sha256":"ac21247ed7bde5decf5bc9f2e8aa47649eff069a21998f0c307140779b42d9d6","contentType":"text/markdown; charset=utf-8"},{"id":"9e702d1a-9f13-5c38-9820-3dadfa1fbd52","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/9e702d1a-9f13-5c38-9820-3dadfa1fbd52/attachment.md","path":"references/spec-verification-checklist.md","size":4638,"sha256":"996bea0fc8b02af664546cd1e3f0e63f038e65cee6fd10d564ab344200f6a32a","contentType":"text/markdown; charset=utf-8"},{"id":"73c59503-ff13-5130-b04f-94621515f37b","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/73c59503-ff13-5130-b04f-94621515f37b/attachment.md","path":"references/temporal-interrogation.md","size":3382,"sha256":"92852cc7aa9ebe3081756938928719cdb59b4dcf90a5b3cc5f23da2a8c2d42db","contentType":"text/markdown; charset=utf-8"},{"id":"f4f43fc3-b52c-5cdb-894a-0ca94bd37aa2","key":"uploads/10433ee7-ad12-4ae0-b34e-97553e46c6c8/f4f43fc3-b52c-5cdb-894a-0ca94bd37aa2/attachment.sh","path":"scripts/validate.sh","size":1974,"sha256":"9ed160caa5b35fdc4b7328540e323279d45b49ecaed9b3ecb932cde32ea205a2","contentType":"application/x-sh; charset=utf-8"}],"bundle_sha256":"bb08e851e8feaa48e97e49af505e20eb133a1dc4509c6af29af16c66b2b7d980","attachment_count":12,"text_attachments":12,"attachment_storage":"skillopedia-attachments-v1","binary_attachments":0,"excluded_attachments":[]},"cluster_size":1,"skill_md_path":"skills-codex/pre-mortem/SKILL.md","import_metadata":{"date":"2026-06-05","author":"@skillopedia","version":"v1","category":"testing-qa","category_label":"Testing"},"exact_dupes_collapsed_into_this":0},"version":"v1","category":"testing-qa","import_tag":"clean-skills-v1","description":"Stress-test plans before work."}},"renderedAt":1782980894139}

Pre-Mortem Skill Purpose: Is this plan/spec good enough to implement? Mandatory for 3+ issue epics. Pre-mortem is enforced by hook when is invoked on epics with 3+ child issues. 6/6 consecutive positive ROI. Bypass: flag or . Run on a plan or spec to get multi-model judgment before committing to implementation. --- Quick Start --- Execution Steps Step 0: Bead-Input Pre-Flight (Mandatory) When the input to is a bead ID ( ) and the plan is full-complexity, older than 7 days, or inherited from a prior session, run as the first action. If verification reports STALE citations, stop in interactive…