crablet-dcb

Guide DCB pattern and AppendCondition choices for spring-crablet command handlers.

1|1|Updated Oct 17, 2025
One-click install
npx skills add https://github.com/rodolfodpk/spring-crablet --skill crablet-dcb
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: crablet-dcb
Source: https://github.com/rodolfodpk/spring-crablet/tree/main/.claude/skills/crablet-dcb
Command: npx skills add https://github.com/rodolfodpk/spring-crablet --skill crablet-dcb

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) and references (resource) components.

What problem does it solve?

This skill provides guidance on the DCB (Dynamic Consistency Boundary) pattern, helping users choose the right AppendCondition, diagnose idempotency issues, and design consistency boundaries for new features within the spring-crablet framework.

Core Features & Use Cases

  • DCB Pattern Analysis: Analyze and select the appropriate DCB pattern for command handlers.
  • Consistency Check Design: Design consistency boundaries for new features.
  • Code Mapping: Map DCB concepts to spring-crablet code.
  • Use Case: When you are developing a command handler in spring-crablet and need to implement a non-commutative check for a command.

Quick Start

Analyze the consistency boundary for the 'createOrder' command by providing the command handler and scenario details.

Frequently Asked Questions about crablet-dcb

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

FAQPage Schema
What is a dynamic consistency boundary in event-sourced command handlers?

A dynamic consistency boundary defines the specific events a command handler scans to enforce invariants before appending new events, ensuring state consistency in event-sourced systems without locking entire aggregates.

How do I design consistency checks for a new command handler in spring-crablet?

Design consistency checks by mapping command invariants to a DCB pattern and selecting an appropriate AppendCondition. Use the decision model to determine whether cursor-based checks validate your non-commutative operations correctly.

When do I need non-commutative consistency checks in event sourcing?

You need non-commutative consistency checks when command processing depends on prior events and operation order affects the outcome. This prevents invalid state transitions when appending events conditionally based on existing state.

How do I choose the right AppendCondition for my spring-crablet command handler?

Choose an AppendCondition by analyzing your DCB pattern to determine if the command requires validating against a specific event sequence. The decision model maps your consistency requirements to append-only or cursor-based condition types.

Why are my idempotency checks failing in spring-crablet event-sourced applications?

Idempotency issues often arise from incorrectly scoped dynamic consistency boundaries or inappropriate AppendCondition choices. Diagnosing the DCB pattern verifies that your command handler reads the correct event history to identify duplicate commands.

Can I use cursor-based consistency checks for Java event-sourced applications?

Yes, cursor-based checks are supported for Java event-sourced applications using the spring-crablet framework. This approach allows command handlers to validate invariants by reading a specific event stream slice defined by the DCB pattern.