Debugging
AuraScore 83/100

Core Banking Ledger Double-Posting Root Cause Matrix

Diagnoses distributed ledger discrepancies, settlement batch out-of-order execution, and idempotency key failures in core banking systems.

Use this template when reconciliation jobs detect imbalance between multi-leg accounts, shadow ledgers, or external payment rails. It structures distributed transaction traces into a comprehensive discrepancy matrix to guide zero-downtime database correction scripts.

Template

Role: Lead Financial Core Banking Integration Engineer specializing in distributed ledger integrity and high-volume transaction reconciliation.

Context

  • Core ledger service identifier: {{ledger_system_id}}
  • Settlement trace and transaction payloads: {{settlement_batch_trace}}
  • Idempotency key implementation: {{idempotency_key_format}}
  • Balance discrepancy magnitude: {{mismatch_threshold_amount}}
  • Database transaction isolation level: {{database_isolation_level}}
  • Payment rail and messaging standard: {{payment_rail_type}}

Task

Deliver an authoritative Ledger Reconciliation and Integrity Matrix that identifies the technical points of failure causing transaction duplication, unbalanced journal entries, or distributed commit partial writes across core banking services.

Method

  1. Ingest {{settlement_batch_trace}} and cross-reference entry sequence against {{payment_rail_type}} message lifecycle standards.
  2. Trace {{idempotency_key_format}} lifecycle through API gateway, message broker queues, and persistence layers to detect key collisions or premature TTL expiries.
  3. Analyze transaction boundary declarations in {{ledger_system_id}} under {{database_isolation_level}} to uncover phantom reads, write skew, or non-serializable commits.
  4. Audit double-entry accounting invariants (Assets = Liabilities + Equity) across all impacted transaction IDs exceeding {{mismatch_threshold_amount}}.
  5. Isolate edge cases where network timeouts between two-phase commits generated orphan debit/credit legs.
  6. Classify transaction discrepancies by ledger partition, clearing window, and partner entity.
  7. Formulate compensating transaction scripts and database constraint enhancements to eliminate recurring state divergence.

Constraints

  • MUST maintain strict double-entry balance validation across all analyzed scenarios.
  • MUST NOT recommend direct manual SQL balance mutations without compensatory audit trail journal entries.
  • Proposed database fixes MUST be compatible with {{database_isolation_level}} without inducing global table lockups.
  • Remediation timeline MUST prioritize accounts with imbalances exceeding {{mismatch_threshold_amount}}.

Output format

  1. Ledger Discrepancy Overview: Precise accounting impact breakdown.
  2. Root Cause Discrepancy Matrix: Markdown table containing [Transaction ID / Batch | Ledger Account Type | Isolation / Lock Fault | Idempotency Failure Mode | Discrepancy Amount | Compensatory Action | Permanent Architectural Fix].
  3. Database Remediation Script Strategy: Detailed SQL/ORM transactional compensating logic.
  4. Idempotency Key Hardening Rules: Bulleted specification for distributed deduplication.

Self-review

  • Does the matrix explicitly detail why {{idempotency_key_format}} failed to stop duplication?
  • Are all compensating transactions compliant with double-entry accounting principles?
  • Does the analysis evaluate isolation boundary failures specific to {{database_isolation_level}}?
AuraScore breakdown
83/100Provisional
Instruction clarity15/15 · Strong

Explicit role, a named task, and discrete steps the model can follow.

Context architecture12/12 · Strong

Background, inputs and variables the model needs before it starts.

Constraint engineering12/12 · Strong

Hard boundaries — what the model must and must not do.

Output specification6/14 · Thin

A named, field-level shape for the response.

Reasoning structure10/10 · Strong

Ordered work items that force analysis before an answer.

Model compatibility10/10 · Strong

Length and structure that travel across frontier models.

Token efficiency5/10 · Thin

Signal density — instruction weight without padding.

Reusability7/7 · Strong

Documented variables so the scaffold adapts to new inputs.

Robustness5/5 · Strong

Quality bar, assumptions and behaviour when inputs are thin.

Observed performance1/5 · Thin

How much real usage the template has behind it.

developers
developers-debugging
financial-services
core-banking
ledger-reconciliation
database-isolation