Skip to content

ai-unified-process/aiup-drizzle

v3.1.1

AI Unified Process migration and persistence layers - Drizzle ORM schema, generated PostgreSQL migrations, repositories, and their tests

drizzle-persistence

Builds the persistence layer of a use case (UC-XXX) with Drizzle ORM in a NestJS API: one @Injectable repository per aggregate with the injected Drizzle database, every query of the feature in that file, explicit projections, joins or relational queries instead of a query per row, paging and dynamic filters, optimistic locking when the entity has a version, and UC-XXX BR-YYY markers on the query conditions that enforce a business rule. Drizzle has no ambient transaction, so the repository owns db.transaction and hands an optional tx parameter to writes that span repositories. Hands the repository method signatures and row types to the service layer. Normally run by /use-case-implement after the migration layer; can be run directly. Use when the user asks to "write the Drizzle repository", "implement the data access for UC-001", "add a Drizzle query", "write the data access layer", or mentions Drizzle queries, db.transaction, *.repository.ts, or a repository in a project that combines layer plugins.

Read SKILL.md at the source

Pinned to revision 648476b42261, so it is the text this page describes rather than whatever the author pushed since.

Files

Every link opens the file at its source, pinned to the revision this page describes.