realize-port

Implements consumer-owned port interfaces with reusable contract tests for inter-context boundaries.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building features across bounded contexts, teams often couple consumers directly to supplier types, recreating hidden dependencies. This Skill guides the worker to realize a Port — a consumer-owned, read-only interface expressed in primitives — so each block stays green on its own and the boundary is explicitly declared. ## Core Features & Use Cases - Consumer-owned port realization: Generates the interface that expresses the consumer's need, using primitive or shared-kernel types pinned in the manifest, never the supplier's domain types. - Reusable contract test spec: Produces an abstract test class plus factory with a fake implementation, so the consumer passes tests without the real supplier and the same test later welds the real adapter. - tests_nl translation: Converts the user's natural-language boundary tests into concrete contract test cases. - Use Case: While building a Sales block that needs product data from Catalog, the worker loads this Skill to declare a sellable predicate port typed on Int IDs, with a fake-backed contract test proving Sales works standalone. ## Quick Start Ask the worker to realize the port block defined in your building-block manifest, including its consumer-driven contract test with a fake supplier.

Frequently Asked Questions about realize-port

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

FAQPage Schema
How do I implement a consumer-driven contract test for a port interface?

Define an abstract test class plus a factory for the subject under test, then supply a fake implementation that makes it pass. The same test later runs against the real adapter to weld the boundary.

What is a consumer-owned port in domain-driven design?

A consumer-owned port is an interface belonging to the consuming context that declares what it needs from a supplier. It is read-only and typed in primitives or shared-kernel types, never the supplier's domain types.

Why should a port not use the supplier's domain types?

Using supplier types like Catalog's ProductId on a Sales port recreates the coupling the boundary exists to remove. The port pins the identity type from the manifest, such as Int, keeping contexts independent.

When is a port projected into OpenAPI instead of staying in-process?

The worker-composer decides via the seam type: seam-in-process keeps the port as a code interface, while seam-cross-deploy projects it into OpenAPI with per-side types and Pact CDCs. The port skill itself only builds the interface and contract test.

How does the contract test work with event-schema contracts?

With contract_form set to event-schema, the schema is the contract and there is no remote supplier to fake. The consumer-driven test becomes a descriptor-reflection CDC using a mutated in-memory descriptor to prove red-on-removal and red-on-rename.