mismagent-realize-application-service

Implements thin application services that delegate domain rules to aggregate roots and ports.

Updated Jun 12, 2026
One-click install
npx skills add https://github.com/lucolucus/mismagent --skill mismagent-realize-application-service-lucolucus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mismagent-realize-application-service
Source: https://github.com/lucolucus/mismagent/tree/main/codex/skills/mismagent-realize-application-service
Command: npx skills add https://github.com/lucolucus/mismagent --skill mismagent-realize-application-service-lucolucus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building a use-case in a domain-driven architecture, developers often duplicate business rules inside the service layer or reach directly into another bounded context's internals, breaking invariants and coupling contexts. This Skill guides the implementation of a thin Application Service that orchestrates without owning rules. ## Core Features & Use Cases - Boundary-respecting orchestration: Mutations always go through the Aggregate root that owns the invariant; cross-context reads happen only through the consumer-owned port interface, never the other context's source or domain types. - Bounce detection: Flags any raw-field evaluation (e.g. attivo == true) inside the service as a domain decision that belongs in a root or port predicate. - Fake-port AC testing: Translates the user's natural-language tests_nl into acceptance tests run against a fake port, keeping the block green on its own while preserving the Aggregate's invariant tests. - Use Case: While building a 'confirm order' use-case, the worker calls the Order aggregate root to apply the state change and reads pricing from the Catalog context only via its port interface, then verifies behavior with a fake port before the worker-composer welds the real sides in D2. ## Quick Start Ask the worker to realize the application-service block for your feature, going through the aggregate root for mutations and the port for cross-context reads, with AC-tests against a fake port.

Frequently Asked Questions about mismagent-realize-application-service

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

FAQPage Schema
How do I implement an application service without duplicating domain logic?

Keep the service thin: route every mutation through the aggregate root that owns the invariant instead of rewriting the rule. If you catch yourself evaluating a raw field like attivo == true, move that decision into a predicate on the root or port.

How should an application service read data from another bounded context?

Read the other context only through the consumer-owned port interface, expressed in primitives. Never import the other context's source code or domain types; only the port's signature is allowed.

How do I test a use-case that depends on another context?

Write acceptance tests against a fake implementation of the port so the block stays green on its own without the real other side. The real-on-real welding is handled later by the worker-composer in phase D2.

When is an application service considered green on its own?

It is green when its own AC-tests pass with the fake port and the owning aggregate's invariant tests still pass. Breaking a root invariant means the block is not green, even if the use-case tests succeed.

When should logic live in the service instead of the aggregate?

Almost never for domain decisions: the service only orchestrates and stays mute on persistence details, writing via the repository or adapter. Any business rule or invariant belongs to the aggregate root or a port predicate.