realize-adapter

Implements Port adapters and persistence repositories with contract and round-trip tests.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building hexagonal or DDD-style systems, adapters often drift from their ports: they re-implement business predicates, leak persistence concerns into the domain, or write to aggregate tables from unauthorized places. This Skill guides the worker to realize exactly one Adapter that honors the port contract and the write-confinement gates. ## Core Features & Use Cases - READ Adapter realization: Implements a read port by delegating the predicate to the supplier's aggregate root, knowing only the supplier's public API, and making the consumer-driven contract test pass real-on-real (D2). - PERSISTENCE Adapter realization: Builds the repository that keeps the Aggregate agnostic of storage technology, verified by a save-reload round-trip test. - §14 gate enforcement: Confines all INSERT/UPDATE/DELETE on the Aggregate's tables to the persistence adapter and honors enforced_by constraints like soft-delete and write-once. - Use Case: During a mismAgent build wave, a block with type = adapter is loaded; this Skill drives its TDD red-green-refactor loop until the contract test, round-trip test, and write-confinement gate are all green. ## Quick Start Ask the worker to realize the adapter block defined in the building-block manifest, delegating predicates to the supplier root and confining all writes to the persistence adapter.

Frequently Asked Questions about realize-adapter

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

FAQPage Schema
How do I implement a Port adapter in hexagonal architecture?

Implement the port by delegating the predicate to the supplier's aggregate root rather than re-deciding from raw state. The adapter knows only the supplier's public API signature and must make the consumer-driven contract test pass, first on a fake then real-on-real.

How do I keep an Aggregate agnostic of persistence technology?

Place all persistence logic in a dedicated repository adapter so the domain stays pure. Verify correctness with a round-trip test: save the Aggregate, reload it, and confirm identity, state, and invariants are equivalent.

What is the difference between a READ adapter and a PERSISTENCE adapter?

A READ adapter implements a read port toward another context by delegating predicates to the supplier root. A PERSISTENCE adapter is a repository that stores and reconstructs Aggregates and is the only place allowed to touch the Aggregate's schema.

Can other components write to an Aggregate's database tables?

No. The §14 gate confines all INSERT, UPDATE, and DELETE operations on the Aggregate's tables to its persistence adapter. The adapter must also respect enforced_by constraints declared in the block-spec ADRs, such as soft-delete or write-once.

When is the seam-in-process versus seam-cross-deploy projection used?

The worker-composer chooses the projection: seam-in-process realizes the adapter as a code object with in-process tests, while seam-cross-deploy generates an HTTP client with CDC verification on the producer side. The adapter realizes the implementation either way.