AI Unified Process for the Vaadin/jOOQ stack - migrations, implementation, tests
89
93%
Does it follow best practices?
Impact
89%
1.21xAverage score across 15 eval scenarios
Passed
No findings from the security scan
Implement the use case $ARGUMENTS using Hilla (React) for the UI layer and jOOQ for data access. Don't create tests – there are dedicated testing skills for that.
If the Vaadin and jOOQ MCP servers are configured, check them for guidance; otherwise rely on your own knowledge and the documentation links below.
A diff of the specification change may follow the file path in the arguments. When it is there, it is the definitive list of what changed — work through it change by change. A removed line is an instruction to delete the behaviour it described: the remaining specification is already satisfied by the existing code, so a removal is invisible unless you compare code to spec in both directions.
Before writing any code, check whether this use case is already implemented — search for the view,
service, repository, and DTO names the spec implies, and for existing UC-XXX references. If an
implementation exists, reconcile it with the specification instead of building a parallel one:
fetchInto(SomeDto.class) for projected queries — use Records.mapping(SomeDto::new) instead@BrowserCallable classdocs/use_cases/docs/entity_model.md@BrowserCallable service that delegates to the data access layer and returns DTOs.tsx file under src/main/frontend/views/, calling the
generated TypeScript client of the service/coverage-check UC-XXX — see
Coverage Check belowcom.vaadin.hilla.BrowserCallable; secure it with @AnonymousAllowed, @PermitAll, or
@RolesAllowed following the conventions of the existing services. Hilla generates a
type-safe TypeScript client for it — call that client from the view, never fetch directly.src/main/frontend/views/ (views/persons.tsx → /persons). Export a ViewConfig
(export const config: ViewConfig = { ... }) for the title and menu entry when the
existing views do.@vaadin/react-components):
Grid with GridColumn for listings, field components inside forms.useForm from @vaadin/hilla-react-form with the generated model class
(e.g. PersonDtoModel) so validation rules flow from the Java annotations into the browser.@NonNull or Jakarta validation annotations such as
@NotNull/@NotBlank where the entity model requires a value, so the generated TypeScript
types are non-optional and forms validate consistently on both sides.When a query projects columns into a DTO, Java record, or any immutable class,
map the result with org.jooq.Records.mapping(...) and a constructor reference.
Do not use fetchInto(Dto.class) — it uses reflection and is not checked
against the projection at compile time.
import org.jooq.Records;
// List
List<PersonDto> persons = ctx
.select(PERSON.ID, PERSON.FIRST_NAME, PERSON.LAST_NAME, PERSON.EMAIL)
.from(PERSON)
.fetch(Records.mapping(PersonDto::new));
// Single (optional) row
Optional<PersonDto> person = ctx
.select(PERSON.ID, PERSON.FIRST_NAME, PERSON.LAST_NAME, PERSON.EMAIL)
.from(PERSON)
.where(PERSON.ID.eq(id))
.fetchOptional(Records.mapping(PersonDto::new));
// Stream
try (Stream<PersonDto> stream = ctx
.select(PERSON.ID, PERSON.FIRST_NAME, PERSON.LAST_NAME, PERSON.EMAIL)
.from(PERSON)
.fetchStream()
.map(Records.mapping(PersonDto::new))) {
...
}The order of the projected columns must match the constructor parameter order of the target type — the compiler will enforce this.
Exception: when fetching a generated table record without projection
(ctx.selectFrom(PERSON).fetchInto(Person.class) using the generator-produced
POJO), the generated into mapper is fine.
https://mcp.vaadin.com/docs)https://jooq-mcp.martinelli.ch/mcp)https://www.javadocs.dev/mcp)Do not run the uc-coverage sub-agent from this skill, and do not audit the use case against
its specification yourself. The audit is a separate, explicit step that belongs to
/coverage-check: it judges implementation and tests together in
one matrix, and it is the only audit behind a justified **Status:** change.
Finish instead by:
Next: /coverage-check UC-XXX implementation — or plain
/coverage-check UC-XXX once tests exist. For a large use case that is still mid-way, suggest
/coverage-check UC-XXX implementation wip so the audit lists remaining work instead of defects.**Status:** line alone; the audit suggests the next value.Running the audit here would triple it — once after implementation, once after tests, once in
/coverage-check. Each run re-reads the specification and the code base and takes minutes; one
run at the end, in both mode, is the one that counts. Whether to run it now, later, or not at
all is the user's call.