mismagent-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 mismagent-realize-adapter-lucolucus
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mismagent-realize-adapter
Source: https://github.com/lucolucus/mismagent/tree/main/codex/skills/mismagent-realize-adapter
Command: npx skills add https://github.com/lucolucus/mismagent --skill mismagent-realize-adapter-lucolucus

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? When building hexagonal/DDD systems, adapters often leak domain decisions or violate write boundaries. This Skill realizes a single Adapter block — either a READ adapter toward another context or a PERSISTENCE repository — while enforcing the architectural gates that keep the domain pure. ## Core Features & Use Cases - READ Adapter Realization: Implements a read port by delegating the predicate to the supplier's aggregate root instead of re-deciding business rules, and makes the consumer-driven contract test pass real-on-real (D2). - PERSISTENCE Adapter Realization: Builds the repository with a round-trip test (save → reload → equivalent Aggregate), keeping the Aggregate agnostic of the storage technology. - §14 Write-Confinement Gate: Ensures the persistence adapter is the only place performing INSERT/UPDATE/DELETE on the Aggregate's tables, honoring enforced_by constraints like soft-delete and write-once. - Use Case: During a mismAgent build wave, the worker loads this Skill when a block has type = adapter, and it returns a BOUNDARY_HONORED report confirming contract tests, write confinement, and predicate delegation. ## Quick Start Ask the worker to realize the adapter block defined in the building-block manifest, for example: implement the persistence adapter for the Product aggregate with its round-trip test.

Frequently Asked Questions about mismagent-realize-adapter

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

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

Implement the port's interface in a dedicated adapter that knows only the supplier's public API signature. For read ports, delegate the predicate to the supplier's aggregate root rather than re-reading state and re-deciding, then make the consumer-driven contract test pass.

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's root. A PERSISTENCE adapter is a repository that saves and reloads an Aggregate while keeping the domain agnostic of the storage technology.

How do I test a repository with a round-trip test?

Save the Aggregate through the repository, reload it, and assert the reconstructed instance is equivalent in identity, state, and invariants. This verifies the mapping between domain object and storage schema without exposing persistence details to the domain.

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

No. The persistence adapter is the only place authorized to run INSERT, UPDATE, or DELETE on the Aggregate's tables. This write-confinement gate generalizes rules like no DELETE FROM prodotti and no direct updates of applied prices.

When is this Skill loaded in the mismAgent workflow?

The worker loads it during the build movement when a block in the building-block manifest has type = adapter. It runs after the port and contract test exist, and returns a BOUNDARY_HONORED report to the worker-composer.