← ClaudeAtlas

flat-layeredlisted

Use when structuring a worker, crawler, pipeline, ETL job or integration service whose family is already settled as flat — one distribution on its own by default, and one of several in a repository under the same rules. Defines the four role kinds a flat service divides into and the import contract between them, the packages named for the roles this service actually has, the package and settings class each configured component owns, the single-implementation client holding one pooled transport and a refreshable credential, and why no `Protocol` appears until a second real implementation does. Data access is one package per store, named for its technology, whose rules are `flat-persistence`; several distributions sharing one repository is `python-workspace`; an unsettled family is `architecture-choice`. - Also when asked for a worker's or a pipeline's package layout, where a client class or a settings class belongs, whether a dependency deserves an interface, or how to lay out a single-distribution repository
wntic/pyhouse · ★ 3 · Code & Development · score 76
Install: claude install-skill wntic/pyhouse
# Flat-Layered Architecture — package-by-technology, no ports Covers project layout for services where the ports-and-adapters split (domain/application/ infrastructure/entrypoints, `Protocol` ports, DIP) would add indirection with nothing to protect. The code groups by **technical role**, dependencies point wherever they need to, and an interface is introduced only when a second real implementation is about to exist — not in anticipation of one. This skill assumes the family is already chosen; `architecture-choice` chooses it. **The worked example throughout is a service that fetches from an upstream and lands rows in a store**, because it exercises every role at once. The roles are not that workload: a service that consumes a queue and calls an API, one that renders reports, one that only transforms what it is handed, fills the same four roles and leaves empty the ones it has no use for. A role with nothing in it is not a gap. **The subject is one distribution on its own** — its own package and its own datastores where it has any. A service that shares a repository with siblings is the same service under the same rules with a workspace root above it, and that root is a separate skill. Nothing below requires one. The style has established names: what the literature calls **package by layer**, after Simon Brown, with what Fowler calls **transaction scripts** above it. ## When to use vs. neighbours - The style is not settled yet — a greenfield service, or one that may hav