transaction-consistency-designer

Design transaction boundaries for Kotlin and Spring workflows.

14|1|Updated Mar 6, 2026
One-click install
npx skills add https://github.com/yalishevant/kotlin-backend-agent-skills --skill transaction-consistency-designer-yalishevant
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: transaction-consistency-designer
Source: https://github.com/yalishevant/kotlin-backend-agent-skills/tree/main/.agents/skills/transaction-consistency-designer
Command: npx skills add https://github.com/yalishevant/kotlin-backend-agent-skills --skill transaction-consistency-designer-yalishevant

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Designs safe transaction boundaries, rollback behavior, idempotency, locking, and consistency strategies for Kotlin + Spring business workflows. Use when a feature writes to the database, spans multiple repositories, publishes messages, calls external systems, suffers from partial commits or duplicate processing, or needs precise @Transactional, propagation, or isolation guidance.

Core Features & Use Cases

  • Define atomic boundaries: place transactions around steps to enforce invariants and avoid long-held transactions.
  • Idempotency and outbox patterns: outline strategies to prevent duplicate processing and ensure reliable message delivery across services.
  • Isolation & propagation guidance: provide Spring-specific checks for transactional boundaries, including propagation behavior and exception handling.
  • Use Case: When processing a multi-step business workflow that touches DB, messages, and external calls, apply these guidelines to maintain consistency.

Quick Start

Provide a concrete transaction boundary design for the current Kotlin + Spring workflow: identify invariants, steps, and exceptions, and output a suggested boundary plan.

Frequently Asked Questions about transaction-consistency-designer

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I define transaction boundaries in Spring to prevent partial commits across multiple repositories?

To define transaction boundaries in Spring, you wrap atomic workflow steps with @Transactional while avoiding long-held transactions. This isolates multi-repository writes to enforce invariants and prevents partial commits by rolling back the entire operation on failure.

What is the outbox pattern and when do I need it for reliable message publishing?

The outbox pattern ensures reliable message delivery by writing messages to a database table within the same transaction as business data. You need it when publishing messages to external systems to prevent data inconsistency if the message broker becomes temporarily unavailable.

How do I implement idempotency in Kotlin to prevent duplicate processing of external calls?

Implement idempotency in Kotlin by tracking processed identifiers or applying deterministic operations for external calls. This prevents duplicate processing when retries occur due to network timeouts, ensuring consistent system state without repeating side effects.

Does Spring @Transactional propagation and isolation work the same way in Kotlin workflows?

Spring @Transactional propagation and isolation behave identically in Kotlin workflows. You must apply Spring-specific checks to configure propagation behavior and exception handling correctly, ensuring transactional boundaries are enforced without triggering common anti-patterns.

What are common transaction anti-patterns when spanning database writes and external calls?

Common transaction anti-patterns include holding long transactions during external calls and improper exception handling. Enforcing proper transaction boundaries prevents these issues by separating external system calls from the core database transaction scope.