Inferensys

Prompt

ADR Consistency Check Prompt

A practical prompt playbook for detecting contradictions, incompatible constraints, and undermining decisions across an ADR repository using AI.
Developer doing prompt engineering on laptop, prompt variations visible on screen, casual coding session.
PROMPT PLAYBOOK

When to Use This Prompt

Understand the job-to-be-done, ideal user, required context, and when not to use the ADR Consistency Check Prompt.

This prompt is designed for architects and engineering leads who maintain a repository of 10 or more Architecture Decision Records (ADRs) and need to detect silent conflicts between decisions made at different times, by different teams, or for different subsystems. The job-to-be-done is pairwise comparison of decision records to surface contradictory choices, incompatible constraints, and decisions that undermine each other. Use this prompt before architecture review boards, during dependency mapping exercises, or as a pre-merge gate when a new ADR is proposed against an existing repository. The output is a structured conflict report with severity classification, evidence from the source ADRs, and recommended resolution paths.

The ideal user has a directory of ADRs in a consistent format—typically Markdown files following a template with sections for Context, Decision, Consequences, and Constraints. The prompt expects you to provide the full text of two or more ADRs as input. It performs pairwise comparison, so for a repository of N ADRs, you should run it systematically across all pairs or use a script to batch the comparisons. Each comparison identifies conflicts such as incompatible technology choices (e.g., one ADR mandates synchronous communication while another assumes eventual consistency), contradictory constraints (e.g., one ADR requires strong consistency guarantees while another selects an eventually consistent data store), and undermining decisions (e.g., a later ADR introduces a dependency that violates the isolation boundary established by an earlier ADR). The prompt classifies each conflict by severity—Critical for decisions that cannot coexist without breaking correctness guarantees, High for decisions that create significant operational friction or rework, Medium for decisions that introduce inconsistency but can be mitigated, and Low for stylistic or minor divergence.

Do not use this prompt when you have fewer than 10 ADRs, as manual review is more efficient and the pairwise comparison overhead isn't justified. Do not use it as a substitute for human architectural judgment—the prompt identifies syntactic and structural conflicts but cannot assess whether a deliberate departure from an earlier decision is justified by changed circumstances. Do not use it on ADRs that lack consistent structure or are missing key sections like Constraints and Consequences, as the comparison logic depends on extracting comparable elements. If your ADRs are spread across multiple repositories or formats, normalize them into a consistent structure before running this prompt. For high-risk domains such as safety-critical systems, financial compliance, or healthcare, always pair automated conflict detection with human review—the prompt can miss conflicts that require domain-specific reasoning about regulations, failure modes, or operational context. After receiving the conflict report, prioritize Critical and High-severity findings for immediate discussion in an architecture review, and use Medium-severity findings as input for dependency mapping and technical debt tracking.

PRACTICAL GUARDRAILS

Use Case Fit

Where the ADR Consistency Check prompt delivers reliable value and where it introduces risk. Use these cards to decide whether to deploy this prompt, add a human review step, or choose a different approach.

01

Good Fit: Mature ADR Repositories

Use when: you have 10+ accepted ADRs with consistent structure and clear decision statements. The prompt excels at finding contradictions across a corpus where decisions have stabilized. Guardrail: run the check after every new ADR merge to catch regressions early.

02

Bad Fit: Draft or In-Flux Decisions

Avoid when: most ADRs are in 'proposed' or 'draft' status with unresolved options. The prompt will flag expected inconsistencies as conflicts, producing noise. Guardrail: filter the input set to only 'accepted' ADRs or add a status field to the prompt's context to suppress draft comparisons.

03

Required Inputs

Must provide: a set of ADRs with at minimum a title, decision statement, and constraints section. Without explicit constraints, the prompt cannot detect incompatible choices. Guardrail: validate each ADR has a non-empty 'Constraints' field before feeding it to the prompt. Reject or flag incomplete records.

04

Operational Risk: Pairwise Explosion

Risk: comparing every ADR against every other ADR produces O(n²) comparisons. At 50+ ADRs, context windows overflow and latency becomes unacceptable. Guardrail: implement a pre-filter that only compares ADRs sharing domain tags, bounded contexts, or overlapping constraint categories before calling the prompt.

05

Operational Risk: False Positives from Implicit Context

Risk: two ADRs may appear contradictory but are actually compatible due to unwritten context (e.g., different deployment environments, different time horizons). The prompt will flag these as conflicts. Guardrail: require a human review step for all HIGH-severity conflicts. Track false-positive rate and adjust severity thresholds if it exceeds 20%.

06

Bad Fit: Single-Decision Review

Avoid when: you only have one ADR to review. The prompt is designed for pairwise comparison and will hallucinate conflicts or produce empty results when given insufficient input. Guardrail: use the ADR Review or ADR Validation Checklist prompt for single-document quality checks instead.

PROMPT PLAYBOOK

Copy-Ready Prompt Template

A reusable prompt template for detecting conflicts, contradictions, and incompatibilities across a repository of Architecture Decision Records.

The template below is designed to be pasted directly into your AI harness. It accepts a list of ADRs and performs pairwise comparison to identify decisions that conflict, constrain, or undermine each other. Every variable is enclosed in square brackets—replace them with your actual ADR content, output schema, and operational constraints before execution. The prompt is structured to force structured reasoning before producing a final report, which reduces the risk of superficial or missed conflicts.

text
You are an architecture reviewer analyzing a repository of Architecture Decision Records (ADRs) for consistency. Your task is to detect conflicts, contradictions, and incompatibilities between decisions.

## INPUT ADRs
[ADR_LIST]

## OUTPUT SCHEMA
Return a JSON object with the following structure:
{
  "conflicts": [
    {
      "adr_pair": ["ADR-001", "ADR-002"],
      "severity": "critical" | "high" | "medium" | "low",
      "conflict_type": "direct_contradiction" | "incompatible_constraint" | "undermining_decision" | "timing_conflict" | "resource_conflict",
      "description": "Specific description of what conflicts and why",
      "adr_excerpts": [
        {"adr_id": "ADR-001", "relevant_text": "..."},
        {"adr_id": "ADR-002", "relevant_text": "..."}
      ],
      "impact": "What breaks, is blocked, or becomes inconsistent if both ADRs stand",
      "resolution_options": ["Option 1", "Option 2"]
    }
  ],
  "consistent_pairs_checked": 0,
  "total_adrs_analyzed": 0,
  "analysis_notes": "Any patterns observed across the repository"
}

## CONSTRAINTS
[CONSTRAINTS]

## ANALYSIS RULES
1. Compare every ADR against every other ADR in the list.
2. For each pair, check for:
   - Direct contradictions (ADR-A says X, ADR-B says not-X)
   - Incompatible constraints (ADR-A requires Y, ADR-B forbids Y)
   - Undermining decisions (ADR-B makes ADR-A's rationale invalid or obsolete)
   - Timing or sequencing conflicts (ADR-A assumes Z exists, ADR-B deprecates Z)
   - Resource or ownership conflicts (both ADRs claim the same team, budget, or system)
3. Classify severity:
   - critical: System cannot function or build if both decisions stand
   - high: Major rework required; one decision must be substantially revised
   - medium: Tension exists but workarounds are possible
   - low: Minor inconsistency; documentation or clarification likely sufficient
4. Only report actual conflicts. Do not flag differences in scope or context that are compatible.
5. If no conflicts exist, return an empty conflicts array with accurate counts.

## EXAMPLES
[EXAMPLES]

## RISK LEVEL
[RISK_LEVEL]

To adapt this template, start by replacing [ADR_LIST] with your actual ADR documents, each prefixed with its identifier. The [CONSTRAINTS] placeholder should include any domain-specific rules, such as regulatory requirements or organizational policies that ADRs must satisfy. Use [EXAMPLES] to provide one or two annotated conflict examples that demonstrate your expected severity calibration—this is especially important if your team has specific definitions for what constitutes a critical versus medium conflict. Set [RISK_LEVEL] to guide the model's caution: for production systems, use high to require explicit evidence for every flagged conflict; for exploratory analysis, medium may be acceptable. After generating the report, always validate the output against your schema before surfacing it to architects. For high-risk systems, route critical and high-severity conflicts to a human reviewer before accepting the analysis.

IMPLEMENTATION TABLE

Prompt Variables

Inputs the ADR Consistency Check prompt needs to produce a reliable conflict report. Each placeholder must be populated before the prompt is sent. Validation notes describe how to verify the input is well-formed before execution.

PlaceholderPurposeExampleValidation Notes

[ADR_REPOSITORY]

Collection of ADRs to check for pairwise conflicts

A JSON array of ADR objects, each with id, title, decision, constraints, and rationale fields

Schema check: array length >= 2. Each object must have non-empty id and decision fields. Reject if fewer than 2 ADRs provided.

[ADR_ID_FIELD]

Field name used as the unique identifier for each ADR in the repository

adr-042

Parse check: value must match the key used in [ADR_REPOSITORY] objects. Null not allowed. Must be a string present in every ADR object.

[CONFLICT_SEVERITY_LEVELS]

Ordered list of severity classifications the model should assign to detected conflicts

["critical", "high", "medium", "low"]

Schema check: must be a non-empty array of strings. At least 2 levels required. Order implies escalation priority. Reject if empty or contains duplicates.

[CONSTRAINT_CATEGORIES]

Taxonomy of constraint types the model should use when comparing ADR decisions

["technology", "team", "cost", "latency", "compliance", "operational"]

Schema check: must be a non-empty array of strings. Used to group incompatible constraints. Reject if fewer than 3 categories provided for meaningful comparison.

[OUTPUT_SCHEMA]

Expected JSON schema for the conflict report output

{"conflicts": [{"adr_a": "string", "adr_b": "string", "conflict_type": "string", "severity": "string", "description": "string", "resolution_suggestion": "string"}]}

Schema check: must be a valid JSON Schema object. Required fields in conflict objects: adr_a, adr_b, conflict_type, severity, description. Reject if schema is not parseable.

[MAX_CONFLICTS]

Upper bound on the number of conflicts to report before truncation

20

Parse check: must be a positive integer. Prevents unbounded output when checking large ADR repositories. Default to 50 if not specified. Reject if zero or negative.

[INCLUDE_RESOLVED_CONFLICTS]

Flag indicating whether to include conflicts already marked as resolved in prior checks

Parse check: must be boolean true or false. When true, the model re-evaluates previously resolved conflicts. When false, resolved conflicts are excluded from the report.

PROMPT PLAYBOOK

Implementation Harness Notes

How to wire the ADR Consistency Check prompt into a CI/CD pipeline or architecture review workflow with validation, retries, and human review gates.

The ADR Consistency Check prompt is designed to operate as a batch analysis step within a documentation pipeline, not as a real-time interactive assistant. The typical integration point is a CI/CD check that runs when new ADRs are proposed or existing ADRs are modified. The harness should collect all active ADRs from the repository, format them into the [ADR_LIST] placeholder, and invoke the model. The output is a structured conflict report that downstream systems can parse and act on. Because this prompt performs pairwise comparison across all ADRs, the token budget grows quadratically with the number of documents. For repositories with more than 30-40 ADRs, implement a pre-filtering step that selects only ADRs in related domains or with overlapping architectural concerns before invoking the full consistency check.

The implementation harness requires several validation layers before the model output can be trusted. First, validate the JSON schema of the response against the expected [OUTPUT_SCHEMA]—reject any response where conflicts is not an array or where severity values fall outside the allowed enum. Second, verify that each reported conflict includes valid ADR identifiers that exist in the input list; flag any hallucinated ADR references for human review. Third, implement a retry loop with exponential backoff (max 3 attempts) for schema validation failures, using a repair prompt that includes the validation error message and the original ADR list. For high-risk architectural decisions where a false conflict or missed conflict could cause significant rework, route all critical severity findings to a human architect for confirmation before blocking a merge. Log every invocation with the model version, input ADR count, conflict count by severity, and validation pass/fail status for observability.

Model choice matters for this workflow. Use a model with strong reasoning capabilities and a large context window—GPT-4o, Claude 3.5 Sonnet, or Gemini 1.5 Pro are appropriate starting points. Avoid smaller or faster models for the initial consistency check because pairwise comparison across architectural documents requires careful logical reasoning that weaker models often fumble, producing false conflicts or missing genuine contradictions. If cost or latency is a concern, implement a two-stage pipeline: use a smaller model to identify candidate ADR pairs with potential overlap, then run the full consistency check prompt only on those pairs with a stronger model. Do not use this prompt as a real-time gate in a chat interface; the analysis is too complex and the stakes too high for synchronous human-AI interaction without review. The output conflict report should be stored alongside the ADRs in version control, creating an audit trail of when conflicts were detected, reviewed, and resolved.

IMPLEMENTATION TABLE

Expected Output Contract

Defines the structure, types, and validation rules for the ADR Consistency Check conflict report. Use this contract to parse, validate, and integrate the model output into downstream tooling or review queues.

Field or ElementType or FormatRequiredValidation Rule

conflict_report

object

Top-level object must parse as valid JSON. Schema check: contains required keys 'conflicts', 'severity_summary', 'unaffected_adrs'.

conflicts

array of objects

Must be a JSON array. Each element must contain 'adr_pair', 'conflict_type', 'severity', 'description', 'recommendation'. Empty array allowed if no conflicts found.

conflicts[].adr_pair

array of two strings

Must contain exactly two string elements matching the pattern 'ADR-XXXX'. Both values must exist in the provided ADR index. Self-pairing is invalid.

conflicts[].conflict_type

enum string

Must be one of: 'direct_contradiction', 'constraint_incompatibility', 'undermining_decision', 'resource_contention', 'timeline_conflict'. No other values accepted.

conflicts[].severity

enum string

Must be one of: 'critical', 'high', 'medium', 'low'. Severity must be justified by the description field. Critical conflicts must cite a system failure or safety risk.

conflicts[].description

string

Non-empty string between 30 and 500 characters. Must reference specific sections or statements from both ADRs. Citation check: each claim must be traceable to a named ADR section.

conflicts[].recommendation

string

Non-empty string between 20 and 300 characters. Must propose a resolution action: 'supersede', 'reconcile', 'escalate', or 'accept_risk'. Recommendation must match severity level.

severity_summary

object

Must contain integer counts for 'critical', 'high', 'medium', 'low'. Sum of counts must equal length of conflicts array. Null counts not allowed.

unaffected_adrs

array of strings

List of ADR IDs from the input index that were checked and found to have no conflicts. Must not overlap with any ADR ID in conflicts[].adr_pair. Empty array allowed if all ADRs have conflicts.

PRACTICAL GUARDRAILS

Common Failure Modes

What breaks first when running ADR consistency checks and how to guard against it.

01

False Positives from Semantic Overlap

What to watch: The prompt flags decisions as conflicting when they address different scopes, layers, or timeframes but use similar terminology. Two ADRs may both mention 'event-driven architecture' without actually contradicting each other. Guardrail: Require the prompt to output a 'scope alignment' field before declaring a conflict. If scopes differ, downgrade severity to 'info' and add a note that human review should confirm whether the overlap is benign.

02

Missed Conflicts from Implicit Assumptions

What to watch: The prompt fails to detect contradictions when one ADR makes an implicit assumption that another ADR explicitly rejects. For example, ADR-1 assumes synchronous communication while ADR-2 mandates async without stating the incompatibility. Guardrail: Include an assumption extraction step before pairwise comparison. Run each ADR through an assumption-listing pass, then compare the assumption sets alongside the explicit decisions. Flag assumption-level conflicts with 'high' severity.

03

Severity Inflation on Minor Inconsistencies

What to watch: The prompt assigns 'critical' or 'high' severity to every detected inconsistency, making the report noisy and causing reviewers to ignore real problems. Minor terminology drift or non-normative statements get the same weight as architectural contradictions. Guardrail: Define a severity rubric in the prompt with concrete criteria: 'critical' requires that two decisions cannot both be implemented as written; 'high' requires significant rework to reconcile; 'medium' indicates tension but compatible with clarification; 'low' indicates stylistic or terminology differences only.

04

Temporal Ordering Blindness

What to watch: The prompt treats all ADRs as simultaneously active and flags a newer ADR that intentionally supersedes an older one as a conflict. Without temporal awareness, every superseding decision looks like a contradiction. Guardrail: Require the prompt to check ADR status and chronology before declaring a conflict. If ADR-B explicitly supersedes ADR-A, classify the relationship as 'expected evolution' rather than 'conflict.' Only flag temporal issues when a newer ADR contradicts an older one without acknowledging the change.

05

Context Window Truncation on Large Repositories

What to watch: When checking consistency across many ADRs, the prompt exceeds context limits and silently drops older or longer documents from comparison. Missing ADRs produce false negatives—real conflicts go undetected because one side of the pair wasn't evaluated. Guardrail: Implement batching logic outside the prompt. Process pairwise comparisons in chunks small enough to fit in context, then aggregate results. Add a coverage check that confirms every ADR pair was evaluated. If the repository is too large for exhaustive pairwise comparison, prioritize by dependency proximity and recent changes.

06

Rationale-Only Conflicts Without Implementation Impact

What to watch: The prompt flags conflicts in rationale or stated principles even when the actual decisions are compatible. Two ADRs may justify different choices with contradictory reasoning but arrive at implementable, non-conflicting outcomes. Guardrail: Separate the conflict analysis into two passes: first compare the decisions themselves (what was chosen), then compare the rationale (why it was chosen). Flag decision-level conflicts at higher severity. For rationale-only conflicts, note the inconsistency but classify as 'advisory' unless the rationale contradiction creates future decision risk.

IMPLEMENTATION TABLE

Evaluation Rubric

Use this rubric to test the ADR Consistency Check Prompt before shipping. Each criterion targets a specific failure mode observed in pairwise conflict detection. Run these checks against a curated set of ADR pairs with known conflicts and non-conflicts.

CriterionPass StandardFailure SignalTest Method

Conflict Detection Recall

All known conflicts in the test set are flagged with severity Medium or higher

Known conflicting ADR pair is classified as No Conflict or severity Low

Run prompt against 10 ADR pairs with 5 known conflicts; verify all 5 are detected

False Positive Rate

No more than 1 false positive per 10 non-conflicting ADR pairs

Prompt flags a conflict where decisions are compatible or operate in different scopes

Run prompt against 10 ADR pairs with no semantic conflicts; count false positives

Severity Classification Accuracy

High-severity conflicts (blocking, data-incompatible) are never classified as Low; Low-severity conflicts (stylistic, non-blocking) are never classified as High

A data schema incompatibility is marked Low; a naming convention difference is marked High

Include 3 severity-labeled conflict pairs in test set; check that severity ordering is preserved

Pairwise Comparison Completeness

Every ADR pair in the input set appears in the output conflict report exactly once

Output omits a pair, duplicates a pair, or includes self-comparison pairs

Verify output pair count equals n*(n-1)/2 for n input ADRs; check for duplicate or missing pairs

Rationale Grounding

Every conflict rationale cites a specific section or statement from both ADRs

Rationale contains generic language like 'these decisions conflict' without quoting or referencing ADR content

Scan all conflict rationales for direct quotes, section references, or specific constraint mentions from both ADRs

Incompatibility Type Labeling

Each conflict is assigned exactly one type from the defined taxonomy: Constraint, Data, Dependency, Semantic, Temporal

Conflict is unlabeled, assigned multiple conflicting types, or uses a type not in the taxonomy

Validate that every conflict entry has a type field matching one of the five allowed values

Output Schema Compliance

Output is valid JSON matching the [OUTPUT_SCHEMA] with all required fields present and correctly typed

Missing required fields, wrong types, or malformed JSON that fails schema validation

Parse output with a JSON schema validator using the defined output contract; reject on any validation error

ADAPTATION OPTIONS

Adapt This Prompt

How to adapt

Use the base prompt with a small ADR corpus (5-10 decisions) and a single model call. Drop severity classification and pairwise comparison logic in favor of a flat list of potential conflicts. Accept a looser output schema.

code
Review these ADRs for obvious contradictions:
[ADR_LIST]

Return a list of conflicts with:
- adr_a: [ADR_ID]
- adr_b: [ADR_ID]
- conflict_summary: [ONE_SENTENCE]

Watch for

  • False positives when decisions address different system layers
  • Missed conflicts because the model skips subtle incompatibilities
  • No severity ranking, so teams can't prioritize
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.