AI Unified Process persistence layer with Spring Data JPA - entities, repositories, and repository tests
95
96%
Does it follow best practices?
Impact
91%
1.12xAverage score across 3 eval scenarios
Passed
No findings from the security scan
aiup-jpa is the Persistence layer plugin of the AI Unified Process for Spring
Data JPA and Hibernate. It maps the tables of the Flyway schema onto JPA entities, writes the Spring Data
repositories, queries, and projections a use case needs, and tests the queries that have logic of their own against
a real database in a Testcontainers container.
It is one plugin per layer: combine it with aiup-core and the plugins of the other layers instead of a combined
stack plugin such as aiup-angular-jpa.
aiup-core 3.0.0 or later. Its /stack records this plugin as the Persistence layer in
docs/architecture/stack.md; /use-case-implement and /use-case-test run the skills below in their place in the layer order, and
/use-case-coverage finds their code and tests by the markers they keep in that document.aiup-flyway with /flyway-schema. Hibernate only validates
the schema (ddl-auto=validate); it never creates it.| Skill | Layer | Result |
|---|---|---|
/jpa-persistence | Persistence | @Entity classes, Spring Data repositories, queries, projections, converters; in a hexagonal backend the outbound port and its adapter |
/jpa-persistence-test | Persistence | UC<id><Name>RepositoryTest with @DataJpaTest, Testcontainers, and Flyway test data |
Both skills are normally run by /use-case-implement UC-XXX and /use-case-test UC-XXX; each can also be run directly for one
use case. Neither runs the coverage audit — that is /use-case-coverage UC-XXX.
/jpa-persistence detects the module layout. In a flat single module, the service layer calls the Spring Data
repository directly. In a hexagonal multi-module backend (*-domain, *-business, *-postgres, …), it writes the
@Entity, the Spring Data repository, the converters, and the adapter in the persistence-adapter module — and,
because persistence runs before the service layer, the domain record and the outbound port interface the adapter
implements when they do not exist yet. The service layer then builds on that port. No inbound port is ever invented,
and no Lombok is used.
| Project | Plugins next to aiup-core |
|---|---|
| REST API, Spring Boot, JPA | aiup-flyway, aiup-jpa, aiup-spring-boot |
| Angular, Spring Boot, JPA | aiup-flyway, aiup-jpa, aiup-spring-boot, aiup-angular, aiup-playwright |
Do not combine the layer plugins with a combined stack plugin (aiup-angular-jpa); it ships its own /implement.
tessl install ai-unified-process/aiup-core
tessl install ai-unified-process/aiup-flyway
tessl install ai-unified-process/aiup-jpa
tessl install ai-unified-process/aiup-spring-boot/plugin marketplace add ai-unified-process/marketplace
/plugin install aiup-core
/plugin install aiup-flyway
/plugin install aiup-jpa
/plugin install aiup-spring-bootSee the marketplace installation guides for other agents and manual adoption.
The plugin configures the optional JavaDocs server (https://www.javadocs.dev/mcp) for Spring Data JPA, Hibernate,
and Testcontainers API lookups. See rules/mcp-servers.md.
Apache-2.0 · © 2025-2026 Simon Martinelli and the AI Unified Process contributors
See LICENSE and NOTICE. "AI Unified Process" identifies the original methodology; derived works must retain the NOTICE file and must not present themselves as the official AI Unified Process.