business-logic-entry-point-domain-entity-payload-types

Installation
SKILL.md

Domain Entity Payload Types for Business Logic Entry Points

Goal

When a business-logic entry point returns domain-entity data, the payload type must be the domain-entity type itself.

Do not transform or map a domain entity into another return payload type at the business-logic entry point. If the payload is meant to carry a Customer, return Customer. If it is meant to carry several Order entities, return a collection of Order. Keep the domain-entity type intact.

This rule applies to the payload type, not merely to the runtime value. The return signature must expose the domain-entity type directly.

What Counts as In Scope

Apply this skill to code that does one or more of these things:

  • defines the success payload of a business-logic entry point
  • defines a ...QueryHandlerSuccess or ...CommandHandlerSuccess type that carries domain-entity data
  • maps domain entities into intermediate payload types at business-logic boundaries
  • returns one or more domain entities from business logic
  • introduces DTO, view-model, projection, response-model, or similar wrapper types where the payload is supposed to contain domain-entity data
Installs
10
First Seen
Mar 24, 2026
business-logic-entry-point-domain-entity-payload-types — code-sherpas/agent-skills