Inferensys

Prompt

Resilience Anti-Pattern Detection Prompt

A practical prompt playbook for using the Resilience Anti-Pattern Detection Prompt in production AI workflows. Scan system designs for common resilience anti-patterns, produce prioritized findings with severity ratings, and get remediation guidance.
Wide-angle shot of a modern WeWork open floor plan with creative walls covered in AI system architecture diagrams, product team collaborating in standing desk area with industrial lighting.
PROMPT PLAYBOOK

When to Use This Prompt

Learn the ideal scenarios, required inputs, and critical limitations for using the resilience anti-pattern detection prompt.

This prompt is designed for architects, SREs, and platform engineers who need a fast, automated first pass at identifying common resilience weaknesses in a system design. The primary job-to-be-done is to scan a structured description of a system's components, their interactions, and their stated resilience mechanisms, then produce a prioritized list of detected anti-patterns. Use it during design review meetings to ensure no obvious failure modes are overlooked, as a pre-production readiness gate before a service launches, or as a diagnostic tool during incident postmortems to map a recent outage back to a known architectural flaw. The ideal user has a solid understanding of distributed systems but wants a systematic checklist applied to their design to catch blind spots before they manifest in production.

To use this prompt effectively, you must provide a structured description of the system under review. This includes a list of components (services, databases, message queues), their synchronous and asynchronous interactions, and any explicitly configured resilience patterns like retries, timeouts, circuit breakers, or bulkheads. The prompt is most effective when the input is detailed and specific; a vague, high-level diagram will yield generic results. The output is a prioritized list of detected anti-patterns, each with a severity rating (e.g., Critical, High, Medium), the affected components, and actionable remediation guidance. This output is designed to be a starting point for a deeper discussion, not a final verdict. You should wire this into a review pipeline where the results are automatically attached to a design document or an architecture decision record (ADR) for traceability.

This prompt is not a replacement for formal failure mode and effects analysis (FMEA), chaos engineering experiments, or a thorough review by a senior principal engineer. It operates on known patterns and cannot reason about novel, system-specific failure modes that fall outside its catalog. Do not use it as the sole safety check for life-critical, financial, or high-safety systems where a missed anti-pattern could have severe consequences. In those high-risk contexts, the prompt's output must be treated as one input among many, requiring mandatory human review and approval before any design is finalized. The next step after receiving the output is to validate each finding against the actual system context, filter out false positives, and then create actionable tickets for the remediation of confirmed high-severity issues.

PRACTICAL GUARDRAILS

Use Case Fit

Where this prompt works, where it fails, and the operational boundaries you need before putting it into a production review pipeline.

01

Good Fit: Architecture Review Sessions

Use when: You have a concrete system design document, architecture diagram, or component specification and need a structured anti-pattern scan before implementation begins. Guardrail: Always provide explicit component boundaries and interaction paths in [SYSTEM_DESIGN]; the prompt cannot infer missing dependencies.

02

Bad Fit: Runtime Incident Triage

Avoid when: You are diagnosing a live production incident from logs or metrics alone. This prompt analyzes design patterns, not runtime symptoms. Guardrail: Route incident diagnosis to the Operational Incident and Runbook Prompts pillar; use this prompt during postmortem design review, not during active firefighting.

03

Required Inputs

What you must provide: A [SYSTEM_DESIGN] with component topology, communication patterns, data flows, and resilience mechanism descriptions. Guardrail: If your design document lacks timeout configurations, retry policies, or circuit breaker placements, the prompt will flag missing information rather than fabricate findings.

04

Operational Risk: False Positives

What to watch: The prompt may flag patterns that appear anti-resilient but are intentional trade-offs documented elsewhere. Guardrail: Require human review of all HIGH and CRITICAL severity findings before filing remediation tickets; maintain a suppression list for accepted risks with documented rationale.

05

Operational Risk: Incomplete Pattern Coverage

What to watch: The known anti-pattern catalog may not cover domain-specific failure modes unique to your system. Guardrail: Maintain an evolving [CUSTOM_PATTERNS] appendix with organization-specific anti-patterns; periodically review false negatives from production incidents to expand the catalog.

06

Integration Boundary

What to watch: This prompt detects design-level anti-patterns but does not validate implementation correctness. Guardrail: Pair this prompt with the Resilience Testing Coverage Analysis Prompt to verify that detected anti-patterns have corresponding chaos experiments and integration tests before closing remediation items.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt for scanning system designs to detect resilience anti-patterns, ready to paste into your AI harness.

This prompt template is designed to be copied directly into your AI orchestration layer, evaluation harness, or internal tooling. It accepts a system design description and a set of constraints, then produces a structured, prioritized list of detected resilience anti-patterns. Every placeholder is enclosed in square brackets and must be replaced with concrete values before execution. The template is self-contained and does not depend on external retrieval or tool calls unless you explicitly wire them in.

text
You are a senior reliability architect reviewing a system design for resilience anti-patterns.

Your task is to analyze the provided system design and identify specific, named resilience anti-patterns that could lead to production failures.

## INPUT
System Design Description:
[SYSTEM_DESCRIPTION]

## CONSTRAINTS
- Focus on the following resilience dimensions: [RESILIENCE_DIMENSIONS]
- Known technology stack: [TECH_STACK]
- Deployment model: [DEPLOYMENT_MODEL]
- Risk tolerance level: [RISK_LEVEL]

## OUTPUT SCHEMA
Return a valid JSON object with the following structure:
{
  "analysis_summary": "A one-paragraph summary of the overall resilience posture.",
  "detected_anti_patterns": [
    {
      "anti_pattern_name": "Name from the resilience anti-pattern catalog.",
      "severity": "CRITICAL | HIGH | MEDIUM | LOW",
      "affected_components": ["component_name"],
      "description": "How this anti-pattern manifests in the provided design.",
      "failure_scenario": "A concrete scenario where this anti-pattern causes an incident.",
      "remediation_guidance": "Specific, actionable steps to fix or mitigate the anti-pattern.",
      "references": ["Optional link or standard reference."]
    }
  ],
  "false_positive_notes": ["Any patterns that might look like anti-patterns but are acceptable given the constraints."]
}

## INSTRUCTIONS
1. Scan the entire design for patterns from the standard resilience anti-pattern catalog, including but not limited to: Single Point of Failure, Retry Storm, Cascading Failure, Thundering Herd, Unbounded Queue, Missing Circuit Breaker, Tight Coupling, No Idempotency, Timeout Mismatch, Missing Health Checks, Shared Fate, and No Graceful Degradation.
2. For each detected anti-pattern, explain exactly where it appears in the design and why it is a risk.
3. Do not invent anti-patterns that are not present in the design.
4. If the design is incomplete, note what information is missing and how it affects your analysis.
5. Prioritize findings by severity: CRITICAL (will cause an outage under normal conditions), HIGH (will cause an outage under failure conditions), MEDIUM (degrades reliability), LOW (best-practice gap).

To adapt this template, replace each square-bracket placeholder with concrete values. For [SYSTEM_DESCRIPTION], provide a detailed architectural description including service boundaries, communication patterns, data flows, and infrastructure choices. For [RESILIENCE_DIMENSIONS], specify which aspects of resilience to focus on, such as network failures, database outages, downstream service degradation. The [RISK_LEVEL] field calibrates the analysis sensitivity; use high for critical production systems where false negatives are unacceptable, or low for early-stage designs where you want to avoid overwhelming the team with findings. After generating output, always validate the JSON structure against the schema and run the results through your evaluation harness to filter false positives before presenting findings to the engineering team.

IMPLEMENTATION TABLE

Prompt Variables

Required inputs for the Resilience Anti-Pattern Detection Prompt. Each placeholder must be populated before the prompt is assembled and sent. Validation notes describe the checks to apply at the application layer before the model call.

PlaceholderPurposeExampleValidation Notes

[SYSTEM_DESIGN_DOC]

The architecture document, diagram description, or design spec to scan for anti-patterns

Service A calls Service B synchronously with a 30s timeout. No circuit breaker is configured. Retries are set to 3 with no backoff.

Required. Must be non-empty string. Reject if under 50 characters. Warn if over 15k tokens to avoid context truncation.

[COMPONENT_LIST]

Comma-separated list of component names referenced in the design doc to scope the analysis

api-gateway, payment-service, inventory-db, notification-queue

Required. Must contain at least 2 components. Parse as array. Reject if any component name is empty or duplicates exist.

[ANTI_PATTERN_CATALOG]

Reference list of known resilience anti-patterns to match against, with definitions and severity defaults

Single Point of Failure, Retry Storm, Unbounded Queue, Missing Dead Letter Queue, Synchronous Chain > 3 deep

Required. Must contain at least 5 entries. Validate each entry has a name and description field. Warn if catalog is empty or contains only generic entries.

[SEVERITY_THRESHOLD]

Minimum severity level to include in output. Lower-severity findings are filtered out

MEDIUM

Required. Must be one of: CRITICAL, HIGH, MEDIUM, LOW. Default to MEDIUM if not specified. Reject invalid values.

[FALSE_POSITIVE_PATTERNS]

Known patterns that look like anti-patterns but are acceptable in this context, to suppress false positives

Synchronous call to auth-service is intentional and short-lived; No DLQ on audit-log queue is acceptable because loss is tolerable

Optional. If provided, each entry must be a non-empty string. Parse as array. Null allowed if no known false-positive patterns exist.

[OUTPUT_FORMAT]

Desired output structure: list, JSON, or markdown table with specific fields

JSON array with fields: anti_pattern_name, severity, affected_components, evidence_quote, remediation_guidance

Required. Must be one of: json, markdown_table, list. If json, validate that a schema is provided. Reject unrecognized formats.

[MAX_FINDINGS]

Upper bound on the number of anti-patterns to return, to prevent output bloat

10

Required. Must be integer between 1 and 25. Default to 10 if not specified. Reject values outside range.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the Resilience Anti-Pattern Detection prompt into a CI pipeline, design review tool, or manual architecture audit workflow.

This prompt is designed to be integrated into a structured review pipeline, not used as a one-off chat. The most effective implementation treats the prompt as a stateless function that accepts a system design document and a reference pattern catalog, then returns a structured anti-pattern report. The harness is responsible for providing the correct inputs, validating the output schema, filtering false positives, and routing high-severity findings for human review. Do not rely on the model's internal knowledge of resilience patterns alone—always supply a [PATTERN_CATALOG] with explicit definitions, severity criteria, and example signatures to ground the detection logic and reduce hallucinated findings.

Integration pattern: Wrap the prompt in a service or CI job that accepts a design document (markdown, JSON, or structured architecture description) and a catalog version. The harness should: (1) preprocess the design document to extract component boundaries, communication paths, and dependency graphs; (2) assemble the prompt with the extracted context, catalog, and output schema; (3) call the model with response_format set to the JSON schema defined in the prompt; (4) validate the returned JSON against the schema, rejecting malformed responses and retrying once with a repair prompt if validation fails; (5) run a false-positive filter that cross-references each detected anti-pattern against the catalog's required preconditions—if a finding claims a missing circuit breaker but the component is a batch processor with no external calls, suppress it; (6) route findings with severity: critical or severity: high to a human review queue with the source design excerpt and catalog reference attached. Log every step, including the raw prompt, model response, validation result, and suppression decisions, for auditability and prompt iteration.

Model choice and performance: Use a model with strong structured output support and a context window large enough to hold the design document plus the pattern catalog. GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro are suitable for production use. For design documents exceeding ~20K tokens, implement a chunking strategy: split the design by architectural layer or bounded context, run the prompt on each chunk independently, then merge findings and deduplicate by component name and anti-pattern type. Set temperature=0 for deterministic, repeatable results. If your pipeline runs on every design change, cache results keyed by a hash of the design document and catalog version to avoid redundant model calls. For high-throughput CI environments, batch reviews and enforce a timeout of 30–60 seconds per prompt call, with a fallback that flags the component as unreviewed rather than blocking the pipeline.

Evals and continuous improvement: Before deploying, build a golden test set of 10–15 design documents with known anti-patterns (both present and absent) and expected findings. Run the harness against this set and measure precision (what fraction of reported findings are real) and recall (what fraction of real anti-patterns were found). Set a release gate: precision must exceed 0.85 and recall must exceed 0.80 before the prompt enters production. After deployment, sample 5% of findings weekly for human review and track the false-positive rate over time. When the pattern catalog is updated, re-run the golden set and review any regressions. Store all eval results alongside the prompt version and catalog version so you can trace performance shifts to specific changes. Avoid the temptation to tune the prompt for a single design—optimize for consistent behavior across diverse architectures.

IMPLEMENTATION TABLE

Expected Output Contract

Fields, types, and validation rules for the resilience anti-pattern detection response. Use this contract to parse, validate, and integrate the model output into downstream tooling.

Field or ElementType or FormatRequiredValidation Rule

findings

Array of objects

Must be a non-empty JSON array. If no anti-patterns are detected, return an empty array [].

findings[].anti_pattern_name

String

Must match an entry from the provided [PATTERN_CATALOG] or be a well-known resilience anti-pattern (e.g., 'Retry Storm', 'Single Point of Failure').

findings[].severity

Enum: CRITICAL, HIGH, MEDIUM, LOW

Must be one of the four defined severity levels. CRITICAL reserved for patterns that guarantee cascading failure under known conditions.

findings[].affected_components

Array of strings

Each string must reference a component name present in the provided [ARCHITECTURE_DESCRIPTION] or [DEPENDENCY_GRAPH].

findings[].evidence

String

Must contain a direct quote or specific reference from the input context. Validation: substring match against [ARCHITECTURE_DESCRIPTION] or [CONFIGURATION] input.

findings[].remediation

String

Must be a concrete, actionable recommendation. Validation: minimum 20 characters, must not be a generic placeholder like 'Fix the issue'.

findings[].false_positive_risk

Enum: LOW, MEDIUM, HIGH

Must be one of the three defined risk levels. HIGH indicates the detection relies on a naming convention or incomplete context rather than a confirmed structural flaw.

meta.analysis_confidence

Number (0.0-1.0)

Must be a float between 0.0 and 1.0 inclusive. Represents overall confidence in the full finding set. Validation: parse as float, check range.

PRACTICAL GUARDRAILS

Common Failure Modes

Resilience anti-pattern detection prompts can produce false positives, miss subtle coupling failures, or generate remediation advice that doesn't fit the actual system. These cards cover the failure modes that surface first in production and how to guard against them before shipping.

01

False-Positive Anti-Pattern Flagging

What to watch: The prompt flags a pattern as an anti-pattern when the design intentionally uses it with compensating controls—for example, marking a legitimate retry-with-backoff as a retry storm risk because the timeout window looks aggressive on paper. Guardrail: Require the prompt to cite specific evidence from the design document before classifying. Add a confidence qualifier and a 'likely intentional if' clause in the output schema. Run a second-pass verification prompt that argues the opposite position before finalizing the report.

02

Missing Transitive Dependency Failures

What to watch: The prompt analyzes direct service dependencies but misses cascading failure paths through shared infrastructure—such as a connection pool exhaustion in Service A caused by Service B's retry storms, where A and B appear independent in the architecture diagram. Guardrail: Include a dependency graph traversal step in the prompt instructions. Require the output to enumerate second-order and third-order failure propagation paths. Validate outputs against a known dependency map and flag any anti-pattern report that only covers direct neighbors.

03

Remediation Advice Mismatched to System Constraints

What to watch: The prompt recommends adding a circuit breaker to a latency-sensitive path where the added overhead violates the p99 budget, or suggests a message queue where the team has no operational experience with asynchronous infrastructure. Guardrail: Include system constraints in the input context—latency budgets, team capabilities, infrastructure limitations, and regulatory requirements. Add an output field for 'constraint conflicts' that flags when a remediation violates a known constraint. Require human review for any remediation that touches a latency-critical path.

04

Severity Inflation on Low-Impact Components

What to watch: The prompt assigns 'critical' severity to an anti-pattern in a non-critical batch processing component while missing a 'medium' severity issue in the payment path because the batch component's pattern matches a well-known catalog entry more cleanly. Guardrail: Weight severity by component criticality, not just pattern match confidence. Include a 'business impact' dimension in the severity rubric. Validate that every 'critical' finding maps to a component on the critical path. Run a calibration pass comparing severity assignments across components of known differing criticality.

05

Catalog Blindness to Novel Anti-Patterns

What to watch: The prompt only detects anti-patterns that match its known catalog and silently ignores novel failure modes—such as a resilience risk created by a unique combination of a feature flag system and a canary deployment that doesn't fit any standard pattern description. Guardrail: Add an explicit instruction to identify design elements that don't match known anti-patterns but still exhibit resilience risk characteristics. Include an 'uncategorized concerns' section in the output. Periodically review production incidents to backfill the catalog with patterns the prompt missed.

06

Overconfident Remediation Without Evidence Grounding

What to watch: The prompt generates specific remediation steps—such as 'set circuit breaker threshold to 50% failures over 30 seconds'—without grounding those numbers in the system's actual traffic patterns, latency profiles, or capacity limits. Guardrail: Require the prompt to mark any numeric recommendation as a placeholder requiring empirical validation. Add a 'requires measurement' flag to remediation steps that reference thresholds, timeouts, or capacity numbers. Route all threshold-bearing remediations to human review with a note to validate against production telemetry before implementation.

IMPLEMENTATION TABLE

Evaluation Rubric

Criteria for testing the Resilience Anti-Pattern Detection Prompt before production deployment. Each row defines a pass standard, a failure signal, and a concrete test method to validate output quality.

CriterionPass StandardFailure SignalTest Method

Anti-Pattern Coverage

Output detects at least 80% of anti-patterns seeded in a known-bad design document

Output misses high-severity anti-patterns present in the input or reports fewer than 50% of seeded patterns

Run prompt against a golden dataset of 10 design documents with pre-labeled anti-patterns; compute recall

Severity Rating Accuracy

Severity ratings match expert-assigned labels within one level on a 4-point scale for 90% of detected patterns

Critical anti-patterns rated as low severity or informational patterns rated as critical

Pairwise comparison of model-assigned severity vs. expert labels on 20 known anti-pattern instances

Affected Component Identification

Each detected anti-pattern maps to at least one specific component name from the input design

Anti-pattern listed with generic or missing component references such as 'the system' or 'multiple services'

Parse output for component field; validate each value against a list of components extracted from the input document

False Positive Rate

Fewer than 15% of reported anti-patterns are false positives when reviewed by a domain expert

Output flags correct patterns as anti-patterns or invents patterns not present in the design

Human review of 50 prompt outputs against source designs; count false positives and compute rate

Remediation Guidance Relevance

Each remediation suggestion addresses the specific anti-pattern context and includes an actionable step

Remediation text is generic boilerplate such as 'add retries' without specifying where or how

Spot-check 20 remediation entries; verify each contains a component-specific action and a rationale tied to the detected pattern

Output Schema Compliance

Output is valid JSON matching the expected schema with all required fields present and correctly typed

Missing required fields, wrong types, or unparseable JSON in the response

Validate output against JSON Schema using a programmatic validator; reject on schema violation

Catalog Grounding

Each detected anti-pattern references a known pattern name from the provided anti-pattern catalog when a catalog is supplied

Output uses invented pattern names not present in the catalog or fails to map findings to catalog entries

Extract pattern names from output; cross-reference against the input catalog list; flag unmatched names

Confidence Calibration

Confidence scores correlate with actual correctness: high-confidence outputs are correct at least 85% of the time

High confidence assigned to false positives or low confidence assigned to correctly identified critical patterns

Bin outputs by confidence score ranges; compute precision per bin across 100 labeled examples

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Add strict JSON output schema, severity scoring rules, component-to-pattern mapping, and remediation priority ordering. Wire in a validation harness that checks output against a known anti-pattern catalog and flags hallucinations.

code
Analyze [SYSTEM_DESIGN_DOC] against the full resilience anti-pattern catalog in [CATALOG_REFERENCE].
For each detected anti-pattern, return:
- pattern_id matching catalog entry
- affected_component
- severity (CRITICAL/HIGH/MEDIUM/LOW) with justification
- evidence_quote from the design doc
- remediation_guidance
- false_positive_risk (HIGH/MEDIUM/LOW)

Output as valid JSON matching [OUTPUT_SCHEMA].
If no anti-patterns detected, return empty array with confidence note.

Watch for

  • Schema drift between model versions
  • Missing evidence quotes that break traceability
  • Severity inflation on ambiguous patterns
  • Catalog mismatches when the reference taxonomy changes
Prasad Kumkar

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.