intra-invariant

Official

Enforce intra-aggregate invariants on commit

Authorsocialsoftware
Version1.0.0
Installs0

System Documentation

What problem does it solve?

This Skill enables adding a Layer 1 intra-invariant to an existing aggregate to enforce a rule that must always hold within a single aggregate instance. It ensures consistency by hooking into the verifyInvariants() workflow so violations are detected during every Unit of Work commit.

Core Features & Use Cases

  • Define a private invariant helper named invariant<RuleName>() that returns a boolean indicating whether the invariant holds.
  • Wire the helper into verifyInvariants() with the appropriate state scope (ACTIVE vs ALL states) and throw an invariant violation when needed.
  • Update the INTRA-INVARIANTS block and add tests to cover both compliant and violated states.

Quick Start

Add a new intra-invariant on the target aggregate and wire it into the invariants checks.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: intra-invariant
Download link: https://github.com/socialsoftware/microservices-simulator/archive/main.zip#intra-invariant

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.