production-premortem
Skill2 starsChanged 4 months agoMITView on GitHub
Analyzes a branch diff as if it already caused a production incident and identifies the most plausible failure reasons before commit.
In this repository67 other files it gives its agents.
- acceptance-criteria-testabilitySkill
- api-test-validationSkill
- architecture-decision-recordSkill
- architecture-drift-detectionSkill
- architecture-guard-detectorSkill
- architecture-riskSkill
- business-continuity-checkSkill
- changed-files-risk-classifierSkill
- change-impact-previewSkill
- concurrency-riskSkill
- contributor-pattern-analysisSkill
- cross-service-contractSkill
- database-driftSkill
- database-read-verificationSkill
- delivery-risk-radarSkill
- dependency-security-evidenceSkill
- developer-decision-reviewSkill
- developer-handoffSkill
- developer-readiness-checkSkill
- development-summarySkill
- epic-goal-extractionSkill
- epic-implementation-graphSkill
- epic-story-partitioningSkill
- epic-structure-analysisSkill
- flaky-failure-classificationSkill
- green-border-planSkill
- gui-testbook-authoringSkill
- gui-testbook-learningSkill
- gui-test-context-discoverySkill
- gui-test-executionSkill
- incident-risk-forecastSkill
- java-performance-smellSkill
- java-targeted-build-verificationSkill
- jira-acceptance-criteria-normalizerSkill
- jira-release-state-evidenceSkill
- knowledge-transfer-briefSkill
- known-pitfalls-extractionSkill
- legacy-characterizationSkill
- liquibase-production-riskSkill
- liquibase-syntaxSkill
- mana-governance-regression-verificationSkill
- mana-usage-helpSkill
- non-functional-requirements-reviewSkill
- null-safety-riskSkill
- post-merge-incident-learningSkill
- pre-review-defectSkill
- profile-selectorSkill
- regression-selectionSkill
- release-impact-summarySkill
- review-load-balancingSkill
- rollback-safetySkill
- rule-update-suggestionSkill
- service-boundary-fitSkill
- service-knowledge-captureSkill
- shell-syntax-verificationSkill
- sonar-change-riskSkill
- sonar-evidence-triageSkill
- source-impact-mapSkill
- story-effort-estimationSkill
- story-qualitySkill
- The first 60 shown.
The file
Show its rules and text
We split this skill into the rules it gives an agent
23 rules. About 0 are common, 20 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈20
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- could be automatic: a setting could enforce it
- Distinctive: line 63
Before committing or pushing a risky branch.
- Distinctive: line 64
When the diff touches payments, persistence, concurrency, security, external calls, messaging, scheduling, retries, feature flags, …
- Distinctive: line 67
When test evidence exists but production risk still feels unclear.
- Distinctive: line 68
When a reviewer asks for "what could break in prod?"
- Distinctive: line 69
When Jira MCP is unavailable and a Markdown story pack is being used.
- Distinctive: line 72
Do not use it as a substitute for deterministic tests, CI, or owner review.
- Distinctive: line 73
Do not use it to justify skipping Branch Validation or PR Readiness.
- Distinctive: line 74
Do not use it on an empty diff and treat the result as meaningful.
- Distinctive: line 75
Do not infer production facts that are not present in service context, architecture docs, logs, or repository evidence.
- Distinctive: line 100
Do not use staged diff as the analysis boundary.
- Very specific: line 105
If the filtered diff is larger than roughly 80 changed files or 2,000 changed lines, or is dominated by generated/vendor-like churn, stop …
- Distinctive: line 113
Treat missing requested behavior, unrequested scope, and contradicted acceptance criteria as production-risk hypotheses.
- Distinctive: line 115
Ask the incident question for each touched domain: "if this caused production trouble, what failed first and why?"
- Distinctive: line 148
If the main branch is ambiguous, the runner must ask the user which base branch to compare against before producing findings.
- Distinctive: line 189
Run on a branch diff before commit and ask for likely production failure modes.
- Very specific: line 190
Run on git diff <main-branch>...HEAD plus uncommitted local changes.
- Distinctive: line 191
Run after tests pass but before PR to identify missing production safeguards.
- Distinctive: line 192
Use the report to add targeted tests or ask for owner approval.
- Distinctive: line 195
Do not treat "no findings" as production safety proof.
- Distinctive: line 196
Do not ignore blocker findings because local unit tests passed.
- Distinctive: line 197
Do not use this skill to expand scope without approval.
- Distinctive: line 198
Do not invent production traffic, data, or topology facts.
- Very specific: line 201
Follow docs/standards/agent-skill-output-standard.md (Agent And Skill Output Standard) for all generated artifacts.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Production Premortem
Purpose
Analyze introduced branch changes from the incident question:
The code introduced in this branch is causing production problems. Find the most plausible reasons.
This skill is optimized for Codex repository-level reasoning before commit, pre-push, branch validation, or PR readiness. It produces ranked hypotheses, evidence, missing checks, and mitigation options. It does not change code or approve risk.
When To Use It
- Before committing or pushing a risky branch.
- When the diff touches payments, persistence, concurrency, security, external calls, messaging, scheduling, retries, feature flags, configuration, or observability.
- When test evidence exists but production risk still feels unclear.
- When a reviewer asks for "what could break in prod?"
- When Jira MCP is unavailable and a Markdown story pack is being used.
When Not To Use It
- Do not use it as a substitute for deterministic tests, CI, or owner review.
- Do not use it to justify skipping Branch Validation or PR Readiness.
- Do not use it on an empty diff and treat the result as meaningful.
- Do not infer production facts that are not present in service context, architecture docs, logs, or repository evidence.
Inputs
- main_branch
- local_branch_diff
- branch_diff
- uncommitted_diff
- story_context
- source_impact_map
- green_border_plan
- test_evidence
- service_context
- production_characteristics
Outputs
- premortem_report
- likely_failure_modes
- production_blast_radius
- missing_detection_signals
- mitigation_checklist
Execution Logic
- Build a filtered diff inventory against the resolved main branch before reading full files. Include uncommitted working-tree changes when present. Do not use staged diff as the analysis boundary.
- Exclude Mana framework/bootstrap noise from production hypotheses, findings,
evidence, missing-test lists, and failure modes:
.mana/**,AGENTS.md,CLAUDE.md,mana, and Mana-only.gitignoreor env ignore changes. Mention these only as operational setup notes when relevant. - If the filtered diff is larger than roughly 80 changed files or 2,000 changed
lines, or is dominated by generated/vendor-like churn, stop with
needs_human_decisionand ask the user to choose a review scope. - Classify touched risk domains from the filtered inventory, then read full file contents only where needed to validate plausible blocker or warning hypotheses.
- Compare changed files with Jira story text, acceptance criteria, story context, impact map, service context, and engineering guards. Treat missing requested behavior, unrequested scope, and contradicted acceptance criteria as production-risk hypotheses.
- Ask the incident question for each touched domain: "if this caused production trouble, what failed first and why?"
- Rank hypotheses by plausibility, impact, and evidence strength.
- Identify missing tests, missing observability, unsafe defaults, config drift, rollback gaps, and owner approvals.
- Produce a mitigation checklist with stop/go guidance.
Failure Mode Catalogue
Review at least these classes when relevant:
- wrong requirement interpretation or partial story implementation
- unplanned file or protected-area change
- transaction boundary, rollback, idempotency, or retry bug
- concurrency, ordering, duplicate processing, or race condition
- nullability, default value, mapping, enum, timezone, precision, or rounding bug
- validation, authorization, trust-boundary, or sensitive-data handling issue
- external API timeout, retry storm, circuit breaker, contract, or error mapping
- database migration, Liquibase rollback, locking, index, drift, or data backfill
- message schema, event compatibility, topic, consumer, or dead-letter behavior
- feature flag, configuration, environment, secret, or deployment ordering issue
- performance regression, N+1 query, memory growth, batch size, or cache behavior
- missing logs, metrics, traces, alerting, or runbook
- inadequate tests, mocked-away behavior, flaky evidence, or missing regression
Decision Rules
blocker: highly plausible production failure with code evidence, missing rollback for risky DB/config changes, guard violation, missing critical tests, or unapproved protected-area change.warning: plausible production failure that needs owner review, extra tests, or observability before push/PR.info: low-risk hypothesis or reviewer note useful for PR context.
Failure Modes
- If the main branch is ambiguous, the runner must ask the user which base branch to compare against before producing findings.
- Missing production topology, traffic, data volume, or incident history can understate risk.
- Repository-only analysis cannot prove runtime behavior.
- Diff-only analysis can miss generated code, config outside the repo, or environment-specific behavior.
- AI hypotheses must be checked against tests, owners, and runtime evidence.
Required Human Review
The owner role Team Leader / Architect / Developer reviews blocker and warning
findings. Database, security, trust-boundary, architecture, and production
operations blockers require their accountable owners.
Service Context Layer
Read .mana/global/service-mission.md,
.mana/global/architecture.md, .mana/global/engineering-guards.md,
.mana/global/integration-map.md, .mana/global/testing-policy.md,
and .mana/global/database-policy.md when present.
Missing context files should be reported as warnings. A violation of
.mana/global/engineering-guards.md must be treated as a blocker or routed
to the accountable owner for explicit approval.
Interaction With Codex
Codex is the preferred runner. Codex should inspect branch diffs, read nearby code, compare against planning artifacts, and produce a written report with ranked evidence. Codex should not make destructive edits or approve its own findings.
Interaction With Junie
Junie may use the output to implement targeted fixes, add missing tests, or add local observability inside the approved impact map.
Interaction With MCP
MCP access is read-only by default. Jira and Confluence can provide requirement and design evidence. Logs or observability tools can provide known failure patterns when available. Writes, comments, transitions, database execution, or CI triggers require human approval.
Correct Usage Examples
- Run on a branch diff before commit and ask for likely production failure modes.
- Run on
git diff <main-branch>...HEADplus uncommitted local changes. - Run after tests pass but before PR to identify missing production safeguards.
- Use the report to add targeted tests or ask for owner approval.
Incorrect Usage Examples
- Do not treat "no findings" as production safety proof.
- Do not ignore blocker findings because local unit tests passed.
- Do not use this skill to expand scope without approval.
- Do not invent production traffic, data, or topology facts.
Output Standard
Follow docs/standards/agent-skill-output-standard.md (Agent And Skill Output Standard) for all generated artifacts. Use templates/standard-agent-skill-report.template.md when no more specific template exists.
Internal reasoning must use compact caveman mode: terse fragments, evidence-first notes, no long narrative, and no private chain-of-thought in final artifacts. Maintain a context budget: keep a short working summary with objective, base branch or PR, issue keys, workspace path, checked evidence, open hypotheses, discarded hypotheses, and next checks instead of accumulating raw transcripts, full diffs, repeated file dumps, or copied tool output.
Diagram
flowchart TD
Base[Resolved main branch] --> Diff[Full local branch diff]
Diff --> Domains[Risk domain classification]
Domains --> Incident[Production incident hypotheses]
Incident --> Evidence[Evidence and missing evidence]
Evidence --> Rank[Rank plausibility and impact]
Rank --> Mitigate[Mitigation checklist]
Mitigate --> Gate[Stop go recommendation]Example Output
skill: production-premortem
status: blocker
summary: "Two plausible production failure modes were found before commit."
likely_failure_modes:
- severity: blocker
hypothesis: "Duplicate payment event processing after retry."
evidence:
- "Idempotency key no longer includes payment instrument id."
- "No regression test covers duplicate callback delivery."
production_symptom: "Double state transition or duplicate downstream event."
recommended_action: "Restore idempotency key semantics and add duplicate callback test."
- severity: warning
hypothesis: "Missing metric for fallback path."
evidence:
- "New fallback catches external timeout but only logs debug."
production_symptom: "Silent conversion drop without alert."
recommended_action: "Add counter and alertable error log."
missing_detection_signals:
- "No metric for new error path."
mitigation_checklist:
- "Run regression test for duplicate callback."
- "Confirm rollback behavior with Team Leader."
human_review_required: trueDoes it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

