flat-persistencelisted
Install: claude install-skill wntic/pyhouse
# Flat Persistence — one package per store owns the data access
The package a `flat-layered` service keeps its data access in — the *data access* role kind in that
skill's import contract — named for the store's technology: `postgres/` for the relational store the
templates bind. It holds the table definitions, the write path and the mapping from stored rows back to
the service's own types. Where the service owns the store's schema, its migration history is data, not code, and
sits at the distribution root under `migrations/` in a directory named for the same store.
**Load `persistence` before writing any file below**; the templates satisfy its rules and do not
restate them. It owns the store-generic obligations — the declared transaction owner, translation at
this package's edge, generated constraint names, the pure row mapping, stored types, conflicts and
ordering, deduplication left to the store, batched writes, paged reads, and migrations — and which of
them bind, answered once there from the store's properties. This skill adds the flat family's shape
around them — one package per store, its settings class and engine factory, the key policy and where
the history lives — and binds all of it to one stack.
Its own rules carry preconditions of the same kind. Rule 6 holds wherever the schema is versioned by
migrations at all, rule 2 wherever the service mints keys, and the rest for any store.
The default subject is **one distribution with one store**. **A service with a se