Guide

Layer plugins

One plugin per layer, combined per project: how construction works since marketplace 3.0.
Until now a project installed aiup-core plus one stack plugin that owned a fixed combination of UI, backend, and data access. Marketplace 3.0 replaces that with layer plugins: one plugin per technology of one technical layer, combined to fit the project, and driven by six stack-agnostic commands in aiup-core. This page explains the old way and the new way, why the change was made, and how to move an existing project.
The old way, until 2.x

One plugin per stack #

The AI Unified Process (AIUP) has always separated the stack-independent specifications from their construction. In the old marketplace, construction lived in a combined stack plugin: one plugin bundled everything downstream of the specifications for one fixed combination of technologies.

How it worked #

aiup-core wrote the requirements, the entity model, the use cases, and the test cases. A project then installed exactly one stack plugin, and that plugin shipped a migration skill, /implement, one or two test skills, /playwright-test, and in two cases /coverage-check. The four stacks:

aiup-vaadin-jooq– Vaadin Flow or Hilla with jOOQ: /flyway-migration, /implement, /implement-hilla, /browserless-test, /hilla-test, /playwright-test, /coverage-check
aiup-angular-jpa– Angular with Spring Boot and JPA: /flyway-migration, /implement, /spring-boot-test, /vitest-test, /playwright-test, /coverage-check
aiup-blazor-dotnet– Blazor and EF Core on .NET 10: /ef-migration, /implement, /dotnet-test, /bunit-test, /playwright-test
aiup-nestjs-nextjs– NestJS and Drizzle with Next.js: /drizzle-migration, /implement, /nest-test, /react-test, /playwright-test

Where it reached its limits #

  • Fixed combinations. /implement in aiup-vaadin-jooq always built Vaadin on jOOQ. A REST API with Spring Boot and jOOQ and no UI at all had no plugin.
  • Every combination a plugin. JPA instead of jOOQ, Angular in front of jOOQ, Hilla with JPA: each would have been a new plugin with its own copy of the same skills.
  • Rules drifted. The reconcile rules, the handling of specification gaps, and the marker convention lived in every plugin's /implement, written four times and kept in sync by hand.
  • Nothing to reuse. A new stack started from a copy of the closest plugin. Even the parts every JVM stack shares, such as Flyway migrations or Spring services, were duplicated.
Still in the marketplace. The combined plugins keep working for now. aiup-vaadin-jooq and aiup-angular-jpa are deprecated and will be removed with aiup-core 4.0.0; move an existing project before then. aiup-blazor-dotnet stays combined for good: its Vertical Slice Architecture keeps a use case's handler and data access in one slice, which horizontal layers would split apart. aiup-nestjs-nextjs is deprecated as well since aiup-core 3.14.0 and is removed together with them: aiup-drizzle, aiup-nestjs, and aiup-nextjs replace it.
The new way, since 3.0.0

One plugin per layer #

A project combines aiup-core with one plugin per technical layer. The combination is recorded in the stack file of the project, and six commands in aiup-core run the layer skills in order. aiup-core itself knows nothing about any technology.

The six technical layers, the plugins that cover them, and their skills
Layer Builds Plugin Skills
Migration Versioned schema changes from the entity model aiup-flyway or aiup-drizzle /flyway-schema, /drizzle-schema
Persistence Queries, repositories, entity mapping, projections aiup-jooq, aiup-jpa, or aiup-drizzle /jooq-persistence, /jpa-persistence, /drizzle-persistence, each with a -test skill
Client Port and adapter for an external system the use case calls, from its contract aiup-spring-boot /spring-client, /spring-client-test
Service Business logic, transactions, business rules aiup-spring-boot or aiup-nestjs /spring-service, /nest-service, each with a -test skill
API Endpoints, DTOs, and error format for a separate client aiup-spring-boot or aiup-nestjs /spring-rest, /nest-rest, each with a -test skill
UI Views, forms, grids, navigation aiup-vaadin, aiup-angular, or aiup-nextjs /vaadin-flow-ui, /hilla-ui, /angular-ui, /nextjs-ui, each with a -test skill
E2E Browser tests of a use case or a test case journey aiup-vaadin or aiup-playwright /vaadin-e2e-test, /playwright-e2e-test

The contract: the stack file #

The stack file records which layer skill builds and tests each layer. It always lives at docs/architecture/stack.md, one path that every skill reads. The stack file belongs to the AI Unified Process, not to your architecture documentation: whether the team writes arc42, C4, Kruchten's 4+1 views, a single docs/architecture.md, or nothing, the stack file sits next to it and looks the same. /stack reads those documents and the architecture decision records as input and never writes, moves, or indexes them.

/stack detects the stack of an existing project from pom.xml, package.json, and the source tree, asks what it cannot detect, and records which skill builds and tests each layer. A layer the project does not have is marked with a dash. Below the Layers table, an Integration layer table names, for each entry layer, the layer a use case is tested in, and with an end-to-end layer an E2E scope line records whether browser tests cover every use case offered through the UI or only the test case journeys. The file also holds the module layout, the API contract, the build and test commands, and the Markers table the coverage audit reads. With a Client layer, an External systems table maps each external system the use cases call to its OpenAPI or AsyncAPI contract. It owns only the Layers, External systems, and Markers sections and writes the other three only when their heading is missing or they still hold the template's placeholder, so what the team wrote by hand stays.

Migration– Flyway: flyway-schema
Persistence– jOOQ: jooq-persistence, jooq-persistence-test
Service– Spring Boot: spring-service, spring-service-test
API– Spring REST: spring-rest, spring-rest-test
UI–
E2E–

This is the Layers table of a REST API with Spring Boot and jOOQ: a project the old marketplace could not express. Its integration layer is the API.

Six commands in aiup-core #

The orchestration moved from the stack plugin into aiup-core. The commands are named use-case-<step> and test-case-<step>, next to /use-case-spec and /test-case, so they never collide with the /implement of a combined stack plugin, and old and new plugins can coexist in one agent host. The names are final: they stay when the combined stacks are gone.

/stack– Write or update the stack file
/use-case-implement UC-001– Run the layer skills of the Skill column bottom-up: migration, persistence, client, service, API, UI
/use-case-test UC-001– Run the test skills from the integration layer up
/use-case-coverage UC-001– Audit code and tests against the specification with the markers from the stack file
/test-case-implement TC-001– Automate a test case journey with the end-to-end test skill
/test-case-coverage TC-001– Audit a journey test against its test case

/use-case-implement and /use-case-test also accept layer names, so "/use-case-implement UC-001 api" builds only the API layer. And every layer skill still runs on its own: "/jooq-persistence UC-001" reads the same inputs and follows the same rules.

A use case names its entry layers #

UI, API, and, for a use case no actor reaches through either, such as a scheduled job, Service are the entry layers: where an actor reaches the system. A use case can name the entry layers that offer it in an optional Layers line. Without the line, every entry layer of the project offers it. That is what makes a Vaadin Flow application with a REST API next to it expressible: an administration screen without an API says "Layers: UI", a partner interface without a screen says "Layers: API".

**Requirements:** [FR-012](../requirements.md)
**Layers:** UI

/use-case-implement builds only the named entry layers, plus the migration, persistence, and service the use case needs. /use-case-test tests in the topmost in-process layer the use case uses, so an API-only use case of a Vaadin Flow application is tested in the API layer. /use-case-coverage reports no gap for a layer the line leaves out. The line names entry points, never a technology; /use-case-spec writes it, and the German specification calls it Schichten.

A specification says what happens, not how the screen looks. When the team has designed the screen, the use case links the design in an optional Mockup line: a Figma file, an image, or a Markdown sketch under docs/, several comma-separated when the use case has a list and a dialog.

**Layers:** UI
**Mockup:** [Guests view](../mockups/uc-020-guests.png), [Figma](https://www.figma.com/design/…)

The UI layer skills, /vaadin-flow-ui, /hilla-ui, and /angular-ui, take the layout from it: which view holds what, the order of the fields, the columns of a grid, where the actions sit. The specification stays authoritative for everything else: which fields exist, the rules, and every message. A field the mockup shows but neither the use case nor the entity model backs is not built, a label that contradicts a message of the specification uses the specification's text, and each disagreement is recorded in docs/open_questions.md as a non-blocking question. A Figma link is read through the Figma MCP server where it is installed. The Handover names what was followed and what was left out. A use case without a mockup is built as before, and /spec-review never reports a missing one; it warns only when a link points to a file that does not exist.

A use case calls an external system #

A payment provider or a channel manager that the system calls is a secondary actor of the use case. /stack lists each such system in the External systems table of the stack file, under the name the use cases write on their Secondary Actors line, with its contract: the provider's OpenAPI document for HTTP, or its AsyncAPI document for messaging.

| System | Contract | Location |
| Payment Provider | docs/api/external/payment-provider.yaml | com.example.hotel.client.paymentprovider |

For a use case that calls such a system, /use-case-implement runs the Client layer before the service: /spring-client builds an outbound port in the business module and an adapter that calls the system as its contract says, and maps the provider's errors to domain exceptions the service turns into the use case's alternative flows. Retry, timeout, and fallback are asked first, never chosen by the agent. No test reaches the real system: /spring-client-test tests the adapter against a stub of the contract and writes a fake of the port, which the service, API, and UI tests put in its place. A step that calls a system the table does not list hands off to /stack.

The other direction: a partner system that calls our system is the primary actor, and the use case is offered through the API layer. When the partner's team has agreed an API contract with yours, the use case links the operation in an optional API line: a Markdown link to the OpenAPI file with the operationId as fragment, or to an AsyncAPI channel.

**Layers:** API
**API:** [registerGuest](../api/booking-portal.yaml#registerGuest)

Unlike a mockup, the contract is binding: the partner has already built against it. In a contract-first project, which /stack records under the stack file's API contract, /spring-rest builds the operation as written: the path, the parameters, the property names, the statuses, and the error responses, even where the project's conventions differ, and those choices drop out of the decision rights. /spring-rest-test takes its expected statuses and payloads from the same operation. The specification still decides the flows, the rules, and the messages; the steps describe the messages in business terms and never copy field names. Where the two disagree, a required field nothing supplies or a rejected request without a documented response, the agent decides nothing: the part in question is left out and recorded as a blocking question in docs/open_questions.md. In a code-first project the generated OpenAPI document is output, and the line is ignored. An AsyncAPI channel is accepted but not yet built, since no layer skill writes an inbound listener. /spec-review never reports a missing line; it warns when a link points to a file or an operation that does not exist.

Bottom-up with a handover #

The implementation runs in the order migration, persistence, client, service, API, UI. The tests run from the integration layer up and end with end-to-end, as far as the E2E scope in the stack file asks for it. Each layer skill ends with a Handover block naming the tables, record types, method signatures, or endpoints it created or changed. The next layer builds on exactly that contract and does not reinvent a DTO or a method the layer below already provides.

Handover from jooq-persistence (UC-001)
- PersonRepository
  - List<PersonListItem> findAll(PersonFilter filter, int offset, int limit)
  - Optional<PersonDetail> findById(long id)

Shared rules live once #

  • /use-case-implement owns the inputs, the status check, reconciling an existing implementation, open questions for specification gaps, the decision rights, and the UC-XXX BR-YYY markers.
  • /use-case-test owns the specification as the oracle, updating existing tests instead of duplicating them, a failing test that stays failing when the code disagrees with the specification, and the rule that a use case is tested once, in the integration layer.
  • Layer skills refer to those rules by command name and never copy them back. A rule changes in one place.
  • Markers come from the project. Each layer skill keeps its own rows in the Markers table of the stack file. /use-case-coverage reads that table, so aiup-core needs no knowledge of any stack's markers.

Tested once, in the integration layer #

The stack file also names the integration layer, one row per entry layer the project has (UI, API, Service): the layer whose test skill runs in process against the real service and database. A use case is tested in the first row its Layers line names. In a Vaadin Flow application that is the UI, because its Browserless tests run the service and the repository for real. In a REST service, or behind an Angular client, it is the API. Behind a Hilla UI it is the service. /use-case-test runs the test skills from that layer up and writes no tests of its own for the layers below. The integration layer's tests cover the whole use case: the main success scenario, every alternative flow, every business rule with its allowed and its rejected case, and the postconditions read back from the persisted state.

A lower layer still gets tests in four cases: when it is a second entry layer of the use case, such as a REST API next to a Vaadin Flow or Hilla UI, which then tests its own contract (the main success scenario through its endpoint, each alternative flow's response, and the validation mapping) but not the business rules again; when a run names it, as in "/use-case-test UC-001 persistence"; when it already holds tests of the use case that need reconciling; or when the integration layer's skill reports a unit it cannot reach through its entry point. The coverage audit reads the same table, so a skipped layer is never reported as a gap. A stack file that still has a single integration layer line gets the table on the next /stack run; until then /use-case-test hands over to /stack.

Comparison

Old and new side by side #

What changed for a team that installs the plugins, and what the change buys.

Comparison of combined stack plugins and layer plugins
Combined stack plugin, until 2.x Layer plugins, since 3.0.0
What you install aiup-core plus exactly one stack plugin aiup-core plus one plugin per layer
Combinations Fixed stacks, one plugin each Any combination from the catalog, including a REST API without a UI, or a Vaadin UI with a REST API next to it
Where the layers are recorded Hard-wired in the plugin The stack file, docs/architecture/stack.md, written by /stack
Implementation /implement of the stack plugin builds the whole slice /use-case-implement in aiup-core runs the layer skills bottom-up with a handover between them
Tests One test skill per tool: /browserless-test, /spring-boot-test, /vitest-test, /playwright-test /use-case-test runs the test skills from the integration layer up, so a use case is tested once; each test skill still runs on its own
Coverage audit /coverage-check, only in aiup-vaadin-jooq and aiup-angular-jpa /use-case-coverage in aiup-core, for every combination
Shared rules Copied into every plugin's /implement Once, in /use-case-implement and /use-case-test
Markers for the audit A fixed list inside each plugin's agent The Markers table in the stack file, maintained by the layer skills
Adding a technology A new stack plugin with five or more skills One layer plugin with one or two skills; its references/layer.md lets /stack discover it without a core release. A team's own skill counts too, with or without a layer.md
Version Each plugin on its own version aiup-core and the layer plugins share one major version; the layer plugins need aiup-core 3.0.0 or later
Install

Choose your combination #

Install aiup-core in every project, then one plugin per layer the project has. Use either layer plugins or one combined stack plugin, never both: the combined plugins do not read the stack file.

Common combinations #

REST API, Spring Boot, jOOQ– aiup-flyway, aiup-jooq, aiup-spring-boot. Integration layer: API
REST API, Spring Boot, JPA– aiup-flyway, aiup-jpa, aiup-spring-boot. Integration layer: API
Vaadin Flow or Hilla, jOOQ– aiup-flyway, aiup-jooq, aiup-spring-boot, aiup-vaadin. Integration layer: UI with Flow, service with Hilla
Vaadin Flow and a REST API, jOOQ– aiup-flyway, aiup-jooq, aiup-spring-boot, aiup-vaadin. Integration layer: UI, and the API for use cases whose Layers line names only the API. For a use case offered through both, the API tests its own contract
Angular, Spring Boot, JPA– aiup-flyway, aiup-jpa, aiup-spring-boot, aiup-angular, aiup-playwright. Integration layer: API
REST API, NestJS, Drizzle– aiup-drizzle, aiup-nestjs. Integration layer: API
Next.js, NestJS, Drizzle– aiup-drizzle, aiup-nestjs, aiup-nextjs, aiup-playwright. Integration layer: API
Next.js, Spring Boot, JPA– aiup-flyway, aiup-jpa, aiup-spring-boot, aiup-nextjs, aiup-playwright. Integration layer: API

A server-side UI such as Vaadin Flow calls the service layer directly and needs no API layer; in a project without a service layer it may call the repositories, as long as Flow is the only entry layer; an API layer next to it serves other clients, such as a mobile app or a partner system. A client-side UI such as Angular or Next.js always needs one: a use case offered through it is also built in the API layer and tested there. Hilla's endpoint belongs to /hilla-ui, not to a separate API layer. When no layer plugin covers a technology you use, /stack records the technology with a dash in the Skill column, and /use-case-implement builds that layer from its own knowledge and the project's conventions.

Claude Code #

/plugin marketplace add ai-unified-process/marketplace
/plugin install aiup-core
/plugin install aiup-flyway
/plugin install aiup-jooq
/plugin install aiup-spring-boot

The example is a REST API with Spring Boot and jOOQ. Add aiup-vaadin for a Vaadin UI, or aiup-angular and aiup-playwright for an Angular UI.

Other agents through Tessl #

tessl init --agent agents
tessl install ai-unified-process/aiup-core
tessl install ai-unified-process/aiup-flyway
tessl install ai-unified-process/aiup-jooq
tessl install ai-unified-process/aiup-spring-boot

Tessl installs the skills for Codex, Cursor, GitHub Copilot, Gemini CLI, and OpenCode and pins the versions. See other AI coding tools.

Day to day

A construction round #

Once the specifications are approved, one use case goes through four commands. The first one runs once per project.

  1. Record the architecture #

    /stack

    Once per project, and again when a layer changes. In an existing project the skill detects the stack and asks only where two technologies fit, for example JPA and jOOQ both on the classpath. In a new project it asks for a technology per layer, and offers a dash for a layer the project does not need. It writes the stack file to docs/architecture/stack.md, then checks that every skill it recorded is installed and names the missing plugins. It also offers to create docs/architecture/decision-rights.md from the default decision rights, for a team that wants to tighten or loosen them; while the defaults fit, leave it out.

  2. Implement #

    /use-case-implement UC-001

    Reads the use case, exactly the requirements its Requirements line links, the entity model, the glossary, the stack file, and the decision rights. It checks the Status line, collects the gaps of all layers so you answer once, then states what will run and what the use case's Layers line leaves out, and runs the layer skills bottom-up, passing each handover to the next layer. It writes no tests and ends with a Decisions list, the choices it made on its own for the reviewer to check, and an Open questions list for the specification.

    No assumptions. A step, flow, or rule that allows more than one reading is asked about or left out, never closed with a guess. The answer goes into the specification through /use-case-spec, not into the code alone.
    Decision rights. The agent decides alone on internal structure, labels, layout, endpoint paths, and DTO shapes within the project's conventions; asks first about gaps, values and messages the specification does not state, data model changes, a deviation from a constraint or an ADR, and a new dependency; and never changes a specification or an existing test or sets a Status line. A team moves the first two lines in docs/architecture/decision-rights.md; the never rules always apply.
  3. Test #

    /use-case-test UC-001  # every layer of one use case
    /test-case-implement TC-001  # a journey: the end-to-end test skill

    Runs the test skills from the integration layer up. That layer's tests exercise the whole use case against the real service and database: every business rule with its allowed and its rejected case, every alternative flow, and the postconditions read back from the persisted state. A UI that mocks its backend, such as Hilla or Angular, tests only what the UI decides and that a rejection reaches the actor; the end-to-end layer tests the scenarios an actor sees in the browser. Existing tests are updated, not duplicated. A test that fails because the code disagrees with the specification stays failing and is reported; which side is wrong is your call.

  4. Audit #

    /use-case-coverage UC-001
    /test-case-coverage TC-001  # a journey test

    A read-only sub-agent maps every step, alternative flow, business rule, precondition, postcondition, and linked NFR or constraint onto the code and the tests behind it, using the markers from the stack file. A failure postcondition written as _None — the use case changes no data._ counts as n/a. It reports gaps and drift and suggests the next value for the Status line, which you then set yourself. It never edits a file; closing a gap is /use-case-implement or /use-case-test again.

Migration

Moving an existing project #

A project on aiup-vaadin-jooq, aiup-angular-jpa, or aiup-nestjs-nextjs keeps its code, its tests, and its documents. The plugins, the command names, and the location of the UseCase annotation change. The migration guide in the marketplace has the full walkthrough.

  1. Replace the plugins #

    Remove the combined plugin through your agent's plugin management, update aiup-core to 3.0.0 or later (3.14.0 for aiup-nestjs-nextjs), and install the layer plugins of your stack.

    aiup-vaadin-jooq– becomes aiup-flyway, aiup-jooq, aiup-spring-boot, aiup-vaadin
    aiup-angular-jpa– becomes aiup-flyway, aiup-jpa, aiup-spring-boot, aiup-angular, aiup-playwright
    aiup-nestjs-nextjs– becomes aiup-drizzle, aiup-nestjs, aiup-nextjs, aiup-playwright
  2. Run /stack once #

    The skill detects Flyway or Drizzle, jOOQ or JPA, Spring Boot or NestJS, and the UI framework from the build files and the source tree, records the module layout, the commands, and the integration layer, and writes the stack file to docs/architecture/stack.md. Architecture documentation the project already has, a docs/architecture.md, arc42, or C4, is read as input and stays where it is. Nothing in the code changes. The Markers table fills up the next time each layer skill runs.

  3. Move the UseCase annotation #

    The combined plugins created the annotation under src/main/java. The layer test skills look for it in the test sources of the module under test and would create a second copy there. Move the file to src/test/java before the first /use-case-test and keep its package, so no import changes. The layer test skills add the attribute requirements, which names the NFR and constraint ids a test asserts, to an annotation that lacks it. A hexagonal project gets one copy per module that holds use case tests. A project coming from aiup-nestjs-nextjs has no annotation: its tests carry the id in describe('UC-XXX: …'), which stays, so it skips this step.

    src/main/java/com/example/app/usecase/UseCase.java
      → src/test/java/com/example/app/usecase/UseCase.java
  4. Use the new command names #

    /flyway-migration– /flyway-schema, normally run by /use-case-implement
    /implement– /use-case-implement
    /implement-hilla– /use-case-implement, with hilla-ui in the UI row of the Layers table
    /browserless-test– /vaadin-flow-ui-test, the integration layer of a Vaadin Flow application, run by /use-case-test
    /hilla-test– /hilla-ui-test for the views, /spring-service-test for the service behind them
    /spring-boot-test– /spring-rest-test as the integration layer behind Angular; /spring-service-test and /jpa-persistence-test only when a run names them or a unit is out of the API's reach
    /vitest-test– /angular-ui-test
    /drizzle-migration– /drizzle-schema, normally run by /use-case-implement
    /nest-test– /nest-rest-test as the integration layer; /nest-service-test and /drizzle-persistence-test only when a run names them or a unit is out of the API's reach
    /react-test– /nextjs-ui-test
    /playwright-test– /vaadin-e2e-test or /playwright-e2e-test, also as /test-case-implement TC-001
    /coverage-check– /use-case-coverage UC-XXX, /test-case-coverage TC-XXX
    /karibu-test– Not carried over. Browserless Testing supersedes Karibu; existing Karibu tests keep running
  5. Reconcile on the next change #

    The next time a use case changes, /use-case-implement finds the existing views, services, and repositories by the names the specification implies and by their UC-XXX references, and changes them in place. Code the combined plugin wrote is reconciled exactly like code the layer plugins wrote. The service layer, which the old /implement built as part of the slice, now belongs to /spring-service and is reconciled by it.

Why these names. The orchestrators are named use-case-<step> and test-case-<step>, next to /use-case-spec and /test-case, and the layer skills technology-layer, so old and new plugins never collide in an agent host or on Tessl. The names are final: they stay when the combined stacks are gone.
Unchanged

What did not change #

The layer plugins change how construction is organised, not what it reads or how it is traced. Everything the stack guide describes still holds.

Same inputs

The use case, exactly the requirements it links, the entity model, the glossary, and the architecture decision records. The boundary between aiup-core and construction is still the set of files under docs/.

Same markers

A UC-XXX BR-YYY comment above the code that enforces a business rule, and @UseCase or a describe block naming the use case, scenario, and rules in every test.

Reconcile, never copy

A new feature, a change, and a bug all end in a changed use case. The skills find the existing code and change it in place; a second view for the same use case is still the failure mode they exist to prevent.

The specification is the oracle

Expected values come from the specification, never from what the code returns. A disagreement is reported, not papered over by weakening an assertion.

Status stays with you

No skill edits the Status line of a use case. The coverage audit suggests the next value; a person sets it.

One traceability chain

Requirement to use case to business rule to code and test, and business process to test case to journey test, in the same identifiers as before.

Your own stack. A technology the catalog does not cover now needs a layer plugin with one or two skills, not a complete stack plugin. Its build skill ships a references/layer.md with its catalog row, and /stack discovers it from there, so a layer plugin outside the marketplace works without a release of aiup-core. The same holds for a team's own skill, a mybatis-persistence or a skill with the company's Spring conventions; without a layer.md it counts once you name it for a layer in /stack, which then asks what its tests run against. The stack guide describes the contract.
Next step

Combine the layers of your project #

Install aiup-core 3.0.0 and the layer plugins of your stack, run /stack, and the next use case goes through /use-case-implement. AI Unified Process Studio writes the specifications these commands read; request an invitation, or get in touch if you want help choosing the combination for your architecture.