This prompt is designed for staff engineers and SRE leads who need to bridge the gap between operational incident response and deliberate architectural governance. The core job-to-be-done is transforming a completed, blameless postmortem into a traceable Architecture Decision Record (ADR) that documents the systemic architectural gap revealed by the incident, the chosen remediation, and the rationale linking the decision directly to the root cause analysis. The ideal user has already completed a thorough postmortem with a confirmed timeline, root cause analysis, and contributing factors. They are now facing the question: 'How do we prevent this class of failure from recurring, and how do we document that decision for future maintainers?'
Prompt
ADR for Incident Postmortem Prompt

When to Use This Prompt
Determines the right conditions for converting a production incident postmortem into a formal Architecture Decision Record.
Use this prompt when the incident exposes a gap that requires a deliberate change to the system's architecture—such as introducing a circuit breaker, changing a data consistency guarantee, splitting a service boundary, or adding a new infrastructure dependency. The prompt forces a structured link between the incident's specific failure mode and the architectural decision, ensuring the ADR's context section cites the incident timeline and root cause, the decision section addresses the identified gap, and the consequences section evaluates whether the chosen solution actually prevents the observed failure. Do not use this prompt for minor bug fixes, standard operational procedure updates, capacity adjustments, or decisions that do not alter the system's fundamental structure or contracts. It is also inappropriate when the postmortem is incomplete, the root cause remains unconfirmed, or the incident was caused by a one-off human error with no architectural dimension.
Before running this prompt, confirm that you have the postmortem document with a finalized timeline, a confirmed root cause, and a clear statement of the architectural gap. The prompt assumes these inputs are available as [POSTMORTEM_DOCUMENT] and [ROOT_CAUSE_SUMMARY]. If the postmortem is still in draft or the root cause is disputed, resolve those uncertainties first. The output ADR should be reviewed by at least one engineer who was not directly involved in the incident response to ensure the decision logic holds up under scrutiny. After generating the ADR, submit it through your team's standard ADR review process and link it to the incident ticket for bidirectional traceability.
Use Case Fit
Where the ADR for Incident Postmortem prompt delivers value and where it introduces risk. Use these cards to decide if this prompt fits your current incident review workflow.
Good Fit: Structured Post-Incident Review
Use when: a production incident has been resolved and the team needs to capture the architectural gap that caused it. Guardrail: ensure the incident timeline, root cause analysis, and remediation steps are documented before invoking the prompt. The prompt synthesizes existing facts; it does not investigate.
Bad Fit: Real-Time Incident Response
Avoid when: the incident is still active or the root cause is unknown. Guardrail: this prompt requires a complete postmortem input. Using it during an active incident produces speculative architecture decisions based on incomplete information. Route active incidents to your runbook and escalation prompts instead.
Required Inputs: Timeline, Root Cause, and Gap Analysis
What to watch: the prompt cannot invent the incident timeline or root cause. Guardrail: require a structured input containing the incident summary, timeline of events, confirmed root cause, and the architectural gap identified. If any of these are missing, the ADR will contain hallucinations or placeholder text that looks plausible but is wrong.
Operational Risk: Decision Drift from Actual Remediation
What to watch: the prompt may propose a remediation decision that differs from what the on-call team actually implemented. Guardrail: always reconcile the generated ADR against the actual fix deployed. If the prompt suggests a different architectural decision, flag it for explicit team review before accepting the ADR into the repository.
Operational Risk: Blame Language Leakage
What to watch: incident narratives can contain implicit blame toward teams or individuals. The model may reproduce or amplify this tone in the ADR. Guardrail: review the generated ADR for blameless language. Replace any phrasing that attributes fault to individuals with system-level descriptions of the gap and contributing conditions.
Process Fit: ADR Repository Integration
What to watch: a generated ADR that sits outside your existing ADR workflow becomes stale and unsearchable. Guardrail: ensure the output conforms to your team's ADR template, status workflow, and linking conventions before merging. Validate that the decision status field, supersession links, and related ADR references are populated correctly.
Copy-Ready Prompt Template
Paste this prompt into your AI harness to generate an incident-informed Architecture Decision Record. Replace all square-bracket placeholders with your incident data.
This prompt template is designed to produce a complete, standards-compliant ADR from a production incident's postmortem data. It forces the model to connect the incident's root cause directly to a specific architectural decision, ensuring the remediation is traceable and the rationale is preserved for future maintainers. The template is structured to be dropped into any AI harness that accepts system and user messages, with placeholders for your specific incident timeline, root cause analysis, and team context.
textSYSTEM: You are a staff engineer documenting an architecture decision that resulted from a production incident. Your output must be a complete Architecture Decision Record (ADR) in the format specified. The decision must directly address the root cause identified in the incident postmortem. Do not propose generic improvements; every recommendation must trace back to a specific finding in the incident timeline or root cause analysis. USER: Generate an ADR based on the following incident postmortem data. INCIDENT TITLE: [INCIDENT_TITLE] INCIDENT DATE: [INCIDENT_DATE] INCIDENT SEVERITY: [SEVERITY_LEVEL] INCIDENT TIMELINE: [TIMELINE_OF_EVENTS] ROOT CAUSE ANALYSIS: [ROOT_CAUSE_DESCRIPTION] ARCHITECTURAL GAP IDENTIFIED: [GAP_DESCRIPTION] PROPOSED REMEDIATION: [REMEDIATION_PROPOSAL] AFFECTED COMPONENTS: [LIST_OF_AFFECTED_COMPONENTS] CONSIDERED ALTERNATIVES: [LIST_OF_ALTERNATIVES_CONSIDERED] TEAM CONTEXT: [TEAM_OR_ORGANIZATIONAL_CONTEXT] OUTPUT_SCHEMA: { "adr": { "title": "ADR-[NNN]: [Decision Title]", "status": "proposed", "date": "[ISO_DATE]", "incident_link": "[INCIDENT_TICKET_OR_POSTMORTEM_LINK]", "context": "Summary of the incident and the architectural gap it exposed.", "decision": "The specific architectural change we are making.", "considered_alternatives": [ { "alternative": "Description", "pros": ["Pro 1"], "cons": ["Con 1"], "reason_rejected": "Why this was not chosen." } ], "consequences": { "positive": ["Easier rollback", "Reduced latency"], "negative": ["Increased operational complexity"], "mitigations": ["Runbook update for new component"], "affected_components": ["Component A", "Component B"] }, "prevention_measures": [ "Measure that prevents this class of incident from recurring." ], "validation_criteria": [ "How we will confirm the decision resolves the root cause." ] } } CONSTRAINTS: - The 'decision' field must describe a concrete architectural change, not a process change. - Every 'prevention_measures' entry must directly mitigate the identified root cause. - The 'considered_alternatives' array must include the option of doing nothing. - If the incident severity is SEV1 or SEV2, the status must be 'proposed' and require human review before acceptance.
To adapt this template, replace every square-bracket placeholder with data from your incident postmortem. The [TIMELINE_OF_EVENTS] should be a concise, chronological list of what happened, as this provides the model with the causal chain it needs to validate the decision. The [ROOT_CAUSE_DESCRIPTION] is the most critical field; a vague root cause will produce a vague ADR. After pasting the prompt, always run the output through a validation step that checks for the presence of all required ADR fields and confirms that the prevention_measures array is not empty. For high-severity incidents, the generated ADR should be treated as a draft and routed for human engineering review before it is committed to the decision log.
Prompt Variables
Every placeholder required by the ADR for Incident Postmortem Prompt. Use this table to wire inputs from your incident management system, monitoring tools, and runbooks before generating the ADR.
| Placeholder | Purpose | Example | Validation Notes |
|---|---|---|---|
[INCIDENT_TIMELINE] | Chronological sequence of events from detection to resolution, including timestamps and responsible responders | 2025-03-15 14:32 UTC - PagerDuty alert fired for checkout-svc p99 latency > 2s 14:34 - On-call engineer acknowledged 14:41 - Identified connection pool exhaustion in payments-adapter 14:52 - Rolled back payments-adapter to v2.4.1 15:03 - Latency returned to baseline | Must contain at least one detection event, one diagnosis action, and one resolution action. Timestamps must be ISO 8601. Null not allowed. |
[ROOT_CAUSE_DESCRIPTION] | Technical explanation of what caused the incident, not just the symptom | Connection pool max size was reduced from 50 to 10 in payments-adapter v2.5.0 without corresponding timeout adjustment, causing pool exhaustion under normal peak load of 35 concurrent requests | Must reference a specific code change, configuration change, infrastructure change, or external dependency change. Must distinguish root cause from symptom. Minimum 20 words. Null not allowed. |
[ARCHITECTURAL_GAP] | The system design weakness that allowed the root cause to produce an incident | No circuit breaker or graceful degradation path existed between checkout-svc and payments-adapter; connection pool exhaustion propagated as 5xx errors to end users rather than triggering fallback payment methods | Must identify a missing safeguard, missing observability, missing redundancy, or missing isolation boundary. Must connect the root cause to user-visible impact. Null not allowed. |
[INCIDENT_SEVERITY] | Severity level per the organization's incident classification framework | SEV2 - Degraded service for 31 minutes affecting approximately 15% of checkout attempts | Must match one of the organization's defined severity levels. Must include duration and scope of impact. If organization uses numeric levels, include the definition. Null not allowed. |
[REMEDIATION_DECISION] | The specific architecture or process change being adopted to close the architectural gap | Add a circuit breaker to checkout-svc that opens after 5 consecutive failures to payments-adapter and redirects to a degraded payment fallback queue; set connection pool timeout to 200ms to fail fast | Must be a concrete, verifiable change to code, configuration, infrastructure, or process. Must directly address the architectural gap. Must not be a restatement of the rollback. Null not allowed. |
[ALTERNATIVES_CONSIDERED] | Other remediation options evaluated and why they were rejected |
| Must list at least one alternative with explicit rejection rationale. Each alternative must be a plausible remediation, not a straw man. Null allowed only if no alternatives were genuinely considered. |
[PREVENTION_MEASURES] | Process or tooling changes to prevent similar incidents from reaching production |
| Must include at least one prevention measure that is not the remediation itself. Measures must be testable or verifiable. Null not allowed. |
[EVIDENCE_SOURCES] | Links or references to supporting data: monitoring dashboards, logs, chat transcripts, incident tickets | Datadog dashboard: checkout-svc latency (Mar 15 14:30-15:10 UTC) Slack channel: #incident-2025-03-15-checkout Jira ticket: INC-4821 PR: payments-adapter #3421 (v2.5.0) Revert PR: payments-adapter #3427 | Must include at least one link or reference to a monitoring source and one to a communication record. URLs should be resolvable by the intended audience. Null not allowed. |
Implementation Harness Notes
How to wire the incident-informed ADR prompt into a production postmortem workflow with validation, retries, and human review.
This prompt is designed to sit inside a postmortem or incident-review pipeline, not as a standalone chat interaction. The typical trigger is a completed incident document (timeline, 5-whys, remediation items) plus relevant monitoring data. The harness should assemble these inputs, call the model, validate the output against the ADR schema, and route the result for human engineering review before the ADR is committed to the repository. Do not treat this as a fire-and-forget generation step—the output is an architecture decision record that will be referenced by future maintainers, so correctness and traceability matter more than speed.
Wire the prompt into an application function that accepts an incident_report object (containing timeline, root_cause, impact, remediation_actions) and an optional system_context string (architecture diagrams, recent ADRs, service dependency maps). The function should inject these into the [INCIDENT_DOCUMENT] and [SYSTEM_CONTEXT] placeholders respectively. Set [CONSTRAINTS] to enforce a maximum ADR length, required sections (Context, Decision, Alternatives Considered, Consequences, Prevention), and a rule that every claim must cite a specific incident finding. Use a model with strong structured-output support—GPT-4o or Claude 3.5 Sonnet with JSON mode enabled—and set temperature to 0.2 or lower to reduce creative drift in the decision rationale.
After generation, run a schema validator that checks for the presence of all required ADR fields, verifies that the root_cause referenced in the ADR matches the incident report's root cause, and confirms that every prevention item maps to at least one remediation_action from the incident. If validation fails, retry once with the validation errors injected into the prompt as additional [CONSTRAINTS]. If the second attempt also fails, escalate to a human reviewer with the raw incident document, both failed outputs, and the validator error log. Log every generation attempt, validation result, and reviewer action for auditability. Never auto-commit an incident-informed ADR without human sign-off—these decisions often carry operational risk and budget implications that require engineering judgment.
For teams using an ADR repository (e.g., a docs/decisions/ directory in version control), the harness should prepend the generated ADR with a status of proposed and a metadata block linking to the incident ticket. Only after human review and approval should the status be updated to accepted. If the incident postmortem reveals that a previous ADR was invalidated or needs revision, the harness should flag this and suggest creating a superseding ADR rather than silently editing the original. Avoid wiring this prompt directly into a chatbot or Slack command without the validation and review gates—the risk of generating a plausible but incorrect architecture decision is high when the model lacks full context on system constraints and team capacity.
Expected Output Contract
The generated ADR must conform to this schema. Use these fields and validation rules to programmatically verify the output before accepting it into your ADR repository.
| Field or Element | Type or Format | Required | Validation Rule |
|---|---|---|---|
Title | String | Must match pattern 'ADR-[0-9]{4}: .+'. Must be unique in the target repository. | |
Status | Enum: Proposed | Accepted | Deprecated | Superseded | Must be one of the allowed values. If incident is closed, default to 'Accepted'. | |
Incident ID | String | Must reference a valid incident identifier from the source system. Parse check: non-empty, matches org incident ID format. | |
Incident Timeline | Array of {timestamp, event, impact} objects | Must contain at least one entry for detection, diagnosis, mitigation, and resolution. Timestamps must be ISO 8601. | |
Root Cause | String | Must be a non-empty statement that explains the underlying architectural gap, not just the trigger event. Minimum 50 characters. | |
Architectural Gap | String | Must explicitly connect the root cause to a missing or insufficient architectural capability. Cannot be identical to Root Cause. | |
Decision | String | Must describe the concrete architectural change to remediate the gap. Must include what, how, and scope. Minimum 100 characters. | |
Prevention Measures | Array of strings | Must contain at least one item that directly addresses the identified root cause. Each item must be a testable or observable action. |
Common Failure Modes
When generating an incident-informed ADR, the model can produce a document that looks correct but fails under scrutiny. These are the most common failure patterns and how to prevent them before the ADR is accepted.
Root Cause Is Paraphrased, Not Analyzed
What to watch: The model restates the incident timeline but fails to identify the specific architectural gap that allowed the failure. The ADR reads like a summary, not a diagnosis. Guardrail: Require a dedicated 'Architectural Gap' section that explicitly names the missing abstraction, missing guard, or violated invariant. Validate that the gap statement is distinct from the symptom description.
Decision Does Not Address the Root Cause
What to watch: The proposed architectural decision solves a related problem or adds general resilience but does not directly remediate the identified gap. The ADR creates work without closing the failure path. Guardrail: Add a traceability check: for each decision, require an explicit sentence linking it to the root cause. If the link is missing or weak, flag the ADR for revision before review.
Alternatives Section Is Hollow
What to watch: The model lists generic alternatives ('do nothing,' 'add monitoring') without evaluating them against the incident's actual constraints, cost, or operational impact. The section becomes filler. Guardrail: Require each alternative to include a concrete trade-off tied to the incident context. Validate that at least one alternative was seriously considered and rejected with a specific, non-obvious reason.
Timeline Is Included Without Causal Structure
What to watch: The ADR includes a chronological timeline but does not connect events to architectural decisions. The timeline becomes a narrative appendix rather than evidence for the decision. Guardrail: Require the timeline to annotate each event with the architectural component or boundary that failed. Validate that the timeline directly supports the root cause statement, not just the incident summary.
Prevention Measures Are Vague Aspirations
What to watch: The ADR lists prevention measures like 'improve testing' or 'add alerts' without specifying what test, what alert condition, or how the measure would have caught this specific incident. Guardrail: Require each prevention measure to include a falsifiable condition: 'This measure would have prevented the incident if X had been true.' Validate that at least one measure is testable before the ADR is accepted.
Consequences Ignore Downstream Systems
What to watch: The ADR documents consequences only for the owning team, ignoring dependent services, client libraries, or operational runbooks that must change. Guardrail: Require a 'Dependent System Impact' subsection. Validate that every external interface mentioned in the system boundary is checked for impact. If a dependency is missed, flag the ADR for broader review.
Evaluation Rubric
Criteria for testing the quality of an incident-informed ADR before it reaches human review. Each row defines a pass standard, a failure signal, and a concrete test method.
| Criterion | Pass Standard | Failure Signal | Test Method |
|---|---|---|---|
Root Cause Linkage | The [DECISION] section explicitly references the root cause identified in the [INCIDENT_TIMELINE] and explains how the decision prevents recurrence. | The decision reads as a generic improvement with no direct connection to the specific incident trigger. | Keyword search for root cause terms from the timeline in the decision rationale; manual check for logical causation. |
Alternative Consideration | At least two viable alternatives are documented with clear pros, cons, and a reason for rejection that is specific to the incident context. | Alternatives are missing, are straw-man options, or are dismissed with generic reasons like 'too complex' without elaboration. | Count distinct alternatives; verify each has a unique rejection reason tied to incident constraints. |
Consequence Completeness | The [CONSEQUENCES] section covers positive outcomes, negative trade-offs, affected components, and a mitigation strategy for each negative trade-off. | Only positive outcomes are listed, or negative trade-offs are mentioned without any plan to manage them. | Checklist scan for four required sub-elements; flag any missing mitigation for a documented negative trade-off. |
Timeline Fidelity | The [INCIDENT_TIMELINE] includes detection time, escalation time, mitigation time, and resolution time with UTC timestamps and responsible parties. | Timestamps are missing, relative ('5 minutes later'), or lack timezone; key events like escalation are omitted. | Regex check for ISO 8601 timestamps; verify presence of all four required event types. |
Status and Supersession | The ADR status is set to 'Proposed' or 'Accepted' and any superseded ADR is explicitly linked with a rationale for the change. | Status is missing or set to 'Draft'; a previous ADR on the same component is not referenced despite clear overlap. | Parse frontmatter for status field; search ADR repository for related decisions on the same component. |
Evidence Grounding | All factual claims about the incident are backed by a reference to a monitoring dashboard, log line, alert ID, or incident ticket. | Claims about duration, impact, or error rates are stated without any source; hallucinated metrics are present. | Assertion check: every quantitative claim must have a parenthetical source reference; flag unsourced numbers. |
Actionability of Prevention | The prevention measures include at least one concrete, verifiable change: a new alert threshold, a code change, a runbook update, or a deployment gate. | Prevention measures are vague recommendations like 'improve monitoring' or 'be more careful' with no specific implementation. | Scan for specific artifacts: alert rule names, PR links, runbook section IDs, or pipeline stage names. |
Enabling Efficiency, Speed & Accuracy
Intelligent Analysis, Decision & Execution
We build AI systems for teams that need search across company data, workflow automation across tools, or AI features inside products and internal software.
Talk to Us
Search across company data
Give teams answers from docs, tickets, runbooks, and product data with sources and permissions.
Useful when people spend too long searching or get different answers from different systems.

Automate internal workflows
Use AI to route work, draft outputs, trigger actions, and keep approvals and logs in place.
Useful when repetitive work moves across multiple tools and teams.

Add AI to products and internal tools
Build assistants, guided actions, or decision support into the software your team or customers already use.
Useful when AI needs to be part of the product, not a separate tool.
Adapt This Prompt
How to adapt
Start with the base prompt and a simple markdown output expectation. Remove strict schema enforcement and focus on getting the narrative right: timeline, root cause, architectural gap, decision, and prevention. Use a single model call with the incident report and relevant logs concatenated into [INCIDENT_CONTEXT].
codeYou are an incident-aware architect. Given the incident report and logs in [INCIDENT_CONTEXT], produce an ADR that covers: - Incident timeline - Root cause - Architectural gap exposed - Decision to remediate - Prevention measures
Watch for
- Missing root cause analysis when logs are incomplete
- Overly broad decisions that don't address the specific gap
- Timeline sections that paraphrase the incident report without adding architectural insight
- No distinction between immediate fix and long-term prevention

About the author
Prasad Kumkar
CEO & MD, Inference Systems
Prasad Kumkar is the CEO & MD of Inference Systems and writes about AI systems architecture, LLM infrastructure, model serving, evaluation, and production deployment. Over 5+ years, he has worked across computer vision models, L5 autonomous vehicle systems, and LLM research, with a focus on taking complex AI ideas into real-world engineering systems.
His work and writing cover AI systems, large language models, AI agents, multimodal systems, autonomous systems, inference optimization, RAG, evaluation, and production AI engineering.
Partnered with leading AI, data, and software stack.
How We Work
Custom AI workflows for your Business
One-fit-all AI don't work for modern businesses. At Inferensys, we aim to understand your business & custom requirements; which we use to define most efficient agentic workflows, the data, and the tools for your business.
01
Review the use case
We understand the task, the users, and where AI can actually help.
Read more02
Pick the right approach
We define what needs search, automation, or product integration.
Read more03
Build the first useful version
We implement the part that proves the value first.
Read more04
Improve from there
We add the checks and visibility needed to keep it useful.
Read moreThe first call is a practical review of your use case and the right next step.
Talk to Us