agentsclimarketplace

Ddd cross aggregate constraints

Skill amadeus-dlc/amadeus/amadeus/spaces/default/knowledge/amadeus-shared/software-design/ddd-cross-aggregate-constraints

Agent skills, templates, examples, validators, and docs for operating Amadeus DLC, a lifecycle contract for AI driven software development.

Install
npx -y skills add amadeus-dlc/amadeus --skill ddd-cross-aggregate-constraints

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 5 stars5 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Use when a use case wants to check another aggregate's state before changing the current aggregate. Helps separate true invariants from policies, detect Saga misuse, reason about CQRS/Event Sourcing lookup limits, and decide whether inconsistent data is acceptable. Trigger for cross-aggregate validation, checking another aggregate, command-side read-model access, reverse lookup constraints, or Saga-based validation.

SKILL.md

1.9 KB, 279 tokens by cl100k_base, as published. Nobody here has run it

DDD Cross-Aggregate Constraints

A cross-aggregate constraint is usually a requirements question before it is a technical question.

Workflow

  1. Restate the rule in business language and ask whether it must be immediately true.

  2. If it is a true invariant, consider merging the aggregate boundary or changing the command owner.

  3. If it is a policy, use events, reservations, or compensating actions; use a saga only for multi-step orchestration and compensation, not for synchronous existence checks.

  4. In CQRS/ES, avoid command decisions based on stale read models unless the business accepts that staleness.

  5. Document the inconsistency window and repair mechanism.

Decision Options

  • Same aggregate: use when the rule is a true invariant.

  • Reservation aggregate: use when scarce resources need temporary holds.

  • Policy or saga: use when the reaction can be eventual; reject saga for rules that must block the first command synchronously.

  • Read-model check: use only when stale decisions are acceptable.

Detailed Reference

For non-trivial implementation, review, or refactoring work, read references/details.md before giving final guidance. It contains the detailed rules, examples, smells, and migration notes that do not belong in the short invocation body.

Output

Return the business interpretation, chosen consistency model, rejected options, and exact failure/retry behavior.

What ships with it: 1 file

1.2 KB alongside SKILL.md

references/

Keep looking

Skills are one crate of 326,984. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.