seizu

Implement domain-driven design business logic with contract-based state transitions in TypeScript.

Updated Jan 21, 2026
One-click install
npx skills add https://github.com/fyuuki0jp/seizu --skill seizu
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: seizu
Source: https://github.com/fyuuki0jp/seizu/tree/main/.claude/skills/seizu
Command: npx skills add https://github.com/fyuuki0jp/seizu --skill seizu

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

This Skill helps developers build trustworthy code by implementing business logic as declarative contracts, enabling automated verification and reducing review overhead.

Core Features & Use Cases

  • Contract-Based State Transitions: Define state, errors, and transitions using TypeScript.
  • Automated Verification: Utilizes Property-Based Testing (PBT) to verify invariants and postconditions.
  • Use Case: Implement the command handlers for an e-commerce shopping cart, ensuring business rules like item duplication and stock availability are strictly enforced and automatically tested.

Quick Start

Use the seizu skill to define a new cart contract for adding items.

Frequently Asked Questions about seizu

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

FAQPage Schema
How do I implement domain-driven design business logic in TypeScript?

You can implement domain-driven design business logic in TypeScript by defining declarative contracts for state transitions. This approach enforces immutability and uses Railway Oriented Programming to handle domain errors functionally.

How does contract-based state transition work for domain logic?

Contract-based state transitions work by declaratively defining aggregate states, domain errors, and command handlers in TypeScript. Business rules are enforced strictly through these contracts, ensuring valid state changes within the domain layer.

How do I verify domain logic invariants and business rules automatically?

You can verify domain logic invariants and business rules automatically using Property-Based Testing. This method tests postconditions against defined contracts to ensure state transitions and use case scenarios function correctly.

What is the best way to enforce immutability and functional programming in a domain layer?

The best way to enforce immutability and functional programming in a domain layer is by using contract-based state transitions with Railway Oriented Programming. This ensures state changes are predictable and domain errors are handled functionally.

Can I use this approach to build an e-commerce shopping cart with strict business rules?

Yes, you can build an e-commerce shopping cart by implementing command handlers as contracts. This ensures business rules like item duplication and stock availability are strictly enforced and automatically tested.

What are the limitations of using contract-based domain logic?

A limitation of contract-based domain logic is that it requires strict adherence to immutability and functional programming principles. It may not suit applications where domain rules are highly dynamic or frequently change at runtime.