agent-domain

Model lottery domain entities and orchestrate use cases in pure Kotlin.

Updated Feb 3, 2026
One-click install
npx skills add https://github.com/pliniou/loto-generator --skill agent-domain
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: agent-domain
Source: https://github.com/pliniou/loto-generator/tree/main/.windsurf/skills/agent-domain
Command: npx skills add https://github.com/pliniou/loto-generator --skill agent-domain

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill encapsulates the domain layer of the Loto Generator, providing a pure Kotlin core that models business rules, entities, and use cases, while remaining UI- and Android-free to ensure portability and testability.

Core Features & Use Cases

  • Domain modelling: define core entities and invariants for lottery concepts (tickets, draws, results).
  • Use case orchestration: coordinate multiple entities and repositories to perform domain actions such as ticket validation, outcome calculation, and rule enforcement.
  • Clear boundaries and testability: provide repository interfaces and sealed result types to decouple UI and data layers and enable thorough unit testing.
  • Rule configuration: maintain constants and configuration that encode business rules (thresholds, validation rules, and validation workflows).

Quick Start

Define a new domain use case for validating lottery tickets and run its unit tests.

Frequently Asked Questions about agent-domain

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

FAQPage Schema
How do I isolate domain logic in Kotlin to keep business rules testable and UI-agnostic?

To isolate domain logic in Kotlin, you model entities and use cases in a pure core layer, defining repository interfaces and sealed result types. This enforces clear boundary contracts, decoupling business rules from UI and data layers for safe, testable orchestration.

How do you orchestrate use cases in a Kotlin domain layer without coupling to the UI?

You orchestrate use cases in a Kotlin domain layer by coordinating entities and repository interfaces to perform actions like ticket validation. Using sealed result types and clear boundary contracts ensures the UI remains decoupled from the core domain logic.

What is the best way to enforce business rule invariants in a Kotlin domain model?

The best way to enforce business rule invariants in a Kotlin domain model is by encapsulating them within pure domain entities. Maintaining constants and configuration for thresholds and validation workflows ensures rules are safely maintained and UI-agnostic.

Can I use a pure Kotlin domain layer for lottery applications across different platforms?

Yes, you can use a pure Kotlin domain layer for lottery applications across platforms. By remaining Android-free and utilizing repository interfaces, the domain model maintains portability and testability while encapsulating lottery concepts like tickets and draws.

Why use sealed result types for domain-level use cases in Kotlin architecture?

Use sealed result types for domain-level use cases in Kotlin to ensure maintainable and safe collaboration with data and UI layers. Sealed classes provide explicit boundary contracts, allowing the pure domain core to handle outcomes without exposing internal errors.

Do I need Android dependencies to implement a pure Kotlin domain layer?

No, you do not need Android dependencies to implement a pure Kotlin domain layer. The architecture explicitly remains UI- and Android-free, relying on repository interfaces to decouple the core business logic and ensure maximum portability and testability.