Przejdź do treści
Biblioteka skilli
Programowanie · Przegląd i audyt

hexagonal

/hexagonal

Pomaga projektować i sprawdzać granice pakietów i modułów w stylu portów i adapterów, z kierunkiem zależności i limitami SOLID.

Repozytorium
ai-loops ↗
Licencja
MIT
Ostatnia zmiana repozytorium
13.11.2026

Ocena i bezpieczeństwo

100/ 100Klasa: dobry
Format25 / 25
Frontmatter z nazwą i opisem, poprawna nazwa, opis do 1024 znaków, nazwa zgodna z folderem.
Odkrywalność25 / 25
Opis mówi, kiedy użyć skilla, ma sensowną długość i jest w 3. osobie.
Treść35 / 35
Co najmniej 150 słów i do 500 linii, nagłówki, listy kroków, przykłady albo kod.
Higiena15 / 15
Bez zaślepek typu TODO, bez ścieżek Windows, z licencją.
Ryzykobrak sygnałów w skanie
Pliki w paczce
1
Skrypty
0
Komentarze HTML
0
Adresy URL w SKILL.md
0
Przestarzałość

Brak sygnałów. Repozytorium zmienione 13.11.2026, bez odwołań do wycofanych modeli i API.

Licencja

MIT, otwarta: można używać i zmieniać, z zachowaniem informacji o autorze.

Co robi i kiedy

Pomaga projektować i sprawdzać granice pakietów i modułów w stylu portów i adapterów, z kierunkiem zależności i limitami SOLID.

Oryginalny opis (EN)

Use when designing or reviewing package or module boundaries in any language pack - ports, adapters, dependency direction, cross-layer interfaces, wiring at the composition root, or SOLID size limits and splitting a god type.

Jak działa

  1. Load
  2. Boundary test
  3. Ports
  4. Cross-package design
  5. Domain vs application
  6. Transport and persistence rules
  7. Adding to a type, interface or package
  8. Architecture review checklist
  9. ADR trigger
Sekcje z nagłówków SKILL.md, w oryginale · 71 linii, 559 słów
Podgląd SKILL.md
---
name: hexagonal
description: Use when designing or reviewing package or module boundaries in any language pack - ports, adapters, dependency direction, cross-layer interfaces, wiring at the composition root, or SOLID size limits and splitting a god type.
---

# Hexagonal architecture

## Load

- `specs/ARCHITECTURE.md §3` dependency rule, `§6` consumer-owned ports, `§15` package boundaries, `§27` smells, `§29` compliance.
- `specs/SOLID.md §6-7` interfaces, `§8` limits, `§9` package state, `§10` splitting.
- Your language's layout tree and its domain bans (`arch.forbidden_in_domain`, `impure_calls`): `skills/lang-<id>/architecture.md` (load `loops:lang-<id>`).

## Boundary test

For every dependency ask: does the inner model need to know this technology exists? If not, keep it outside.

Forbidden in `domain`: HTTP/gRPC, SQL drivers and ORMs, queue clients, OS and filesystem access, generated transport or persistence types, YAML/JSON parsers, CLI frameworks, config loaders, vendor SDKs, behaviour-changing logging.

## Ports

- Create a port only at a real boundary. Consumer-owned, narrow, at most 8 methods. The language's form of a port (interface, protocol, trait, behaviour, abstract class) is in its language skill.
- Consumers depend on a small interface for the behaviour they call, never the concrete type; construct concrete types only at the composition root.
- Do not create an interface merely because a concrete type exists, but always create one at an adapter/application or application/domain boundary.

Go example:

```go
type OrderWriter interface { Save(ctx context.Context, o order.Order) error }
```

## Cross-package design

Before adding a shared interface or type: search for an existing one; find the consumer; define the minimum behaviour; keep technology types out; document ownership and ordering assumptions.

## Domain vs application

- Domain: `PriceOrder`, `ApplyDiscount`, `AllocateStock`, `TransferFunds`.
- Application: `PlaceOrder`, `CancelSubscription`, `ImportCatalog`, `RetryFailedPayments`.

## Transport and persistence rules

- Handlers receive requests, build typed commands, call an inbound port, map the result and errors to the transport. They hold no business rules.
- Domain types are not the storage schema; repositories translate (`specs/ARCHITECTURE.md §18`).
- Reads return read models, never mutable entities or rows (`§11`).

## Adding to a type, interface or package

When a change adds a method or field to an existing type, declares an interface, adds module-level mutable state or import-time registration (Go: a package var or `init()`), or creates or splits a package or module:

1. Read `specs/SOLID.md §8` before adding to a type or package already over a limit.
2. Put new state and behaviour on its own type with a consumer-owned interface and a constructor called from the composition root.
3. Register tables at the composition root, never at import time (Go: `init()`); a test hook is a field, not a global.
4. Run `loops arch` (and the pack's native arch check if it has one: `loops lang show <id>`); fix errors, and treat warnings on code you touched as a prompt to split.

Skip this for a task that touches no type, interface, module-level state or layout.

## Architecture review checklist

Reject or request redesign when:

- domain imports adapter or platform code;
- a "service" owns unrelated concerns;
- an interface has broad CRUD merely for abstraction;
- mutable stores or entities cross the adapter boundary;
- a package becomes a dumping ground;
- a change adds import-time registration (Go `init()`) or grows a type already over its limit instead of splitting it;
- shared primitives are duplicated;
- technology dictates domain modelling;
- a new abstraction adds indirection without boundary value.

## ADR trigger

Write or update an ADR (`templates/ADR.md`) for changes to layers, state ownership, canonical primitives, the command protocol, the persistence or wire schema strategy, the concurrency model or the consistency model (`specs/ARCHITECTURE.md §26`).

Wersje

RepozytoriumWynikLicencja
Ta strona · arxdsilva/ai-loops100MIT
G1Joshi/Agent-Skills100MIT
Tyler-R-Kendrick/agent-skills100MIT

Migawka bazy z 13.11.2026 · wersja paczki 83a0de035b11 (skrót SHA-256 całej paczki)

Pobrania w ostatnich 30 dniach: 0 · ranking

Zgłoś problem z tym skillem: szkodliwa treść, błędny opis albo prośba autora o usunięcie.

Podobne skille

  • 100707-technologies-hexagonal-architecture
    Doradza w architekturze heksagonalnej dla projektów Java: granice portów i adapterów, niezależność jądra aplikacji i kierunek zależności.
  • 95hexagonal-architecture
    Projektuje i refaktoryzuje systemy portów i adapterów w TypeScript, Javie, Kotlinie i Go, oddzielając logikę domeny od I/O.
  • 100hexagonal-architecture
    Układa aplikację Symfony w architekturze heksagonalnej (porty i adaptery): domena wolna od frameworka, interfejsy portów w domenie i implementacje adapterów w infrastrukturze.
  • 100hexagonal-architecture
    Projektuje i refaktoryzuje systemy portów i adapterów, oddzielając logikę domeny od wejścia i wyjścia, w TypeScript, Java, Kotlin i Go.
  • 100clean-architecture
    Pomaga projektować granice systemu, kierunek zależności i warstwy według „Clean Architecture” Roberta C. Martina.
  • 100hexagonal-pattern-guide
    Prowadzi przez izolowanie rdzenia aplikacji od wejścia i wyjścia za interfejsami w architekturze heksagonalnej, czystej i cebulowej: adaptery pierwotne i wtórne, odwrócenie zależności, composition root i podmiana adaptera.

Uwagi i zgłoszenia

Wiadomość trafi do Bartosza Sokolińskiego. Adres e-mail jest potrzebny tylko do odpowiedzi. Szczegóły w polityce prywatności.