domain-service-creation
Use when creating or changing domain services, coordinated domain creation, business invariant checks, repository-backed invariants, or their service contracts, mocks, tests, and IoC wiring.
- License 许可
- AGPL-3.0
- 最近更新
- 2026-11-11
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- domain-service-creation
- description
- Use when creating or changing domain services, coordinated domain creation, business invariant checks, repository-backed invariants, or their service contracts, mocks, tests, and IoC wiring.
02 资源文件 1
- 参考文档agents/openai.yaml223 B
03 SKILL.md 正文
Domain Service Creation
Load
- Implementation Workflow
- Folder Responsibility
- Service Philosophy
- Service Ownership
- Readability
- Domain Modeling
- Domain Validations And Helpers
- Error Creation
- Domain Unit Tests
- Inversion of Control when wiring changes
Work
- Inspect the nearby service, type contract, mock, tests, repositories, and IoC before editing.
- Name the domain capability and the invariants it owns.
- Put reusable service validation in
services/validations/<subject>.validation.tsas a default-exported frozen object. Keep each genuine helper as one default-exported function per file. - Confirm the service can complete the service-philosophy sentence with a clear domain owner.
- Keep the service dependency-free unless persisted state is required for an invariant.
- Keep workflow persistence, transactions, context updates, event publication, and cross-domain orchestration outside the domain service.
- Follow nearby immutable return, event, audit, contract, and mock patterns.
- Test invariants through the public service API at the domain layer.
04 同仓库更多 Skills
testing
Use when adding, changing, or reviewing tests in this repository.
reporting-usecase-creation
Use when creating, changing, or reorganizing reporting use cases and their DTOs, read queries, tests, wiring, or HTTP endpoints. Does not cover accounting reporting-period or reporting-context management.
pr-reviewer
Use when reviewing code changes, pull requests, or branch diffs.
planner
Use whenever the user asks for a plan, implementation plan, approach, roadmap, or planning, and whenever the agent decides to create or present a plan before doing work.
pair-programmer
Use when implementing code changes in this repository.
migration
Use when creating, running, or reviewing database migrations.