AI Unified Process service and API layers - NestJS services, REST controllers, and their tests
94%
Does it follow best practices?
Impact
100%
1.11x2 of 3 eval scenarios. Add 1 more for a full score.
Low
Low-risk findings worth noting
aiup-nestjs is the AI Unified Process layer plugin for the service and API layers of a
NestJS application: the business logic with its rules and domain errors, and a REST API with
class-validator DTOs and RFC 9457 Problem Details, each with its test skill.
It is one layer of a stack, not a stack. Combine it with aiup-core (3.14.0 or later) and one plugin per other layer
of your project. /stack records which plugin builds which layer in docs/architecture/stack.md; /use-case-implement,
/use-case-test, and /use-case-coverage run the layer skills from there.
The skills derive from the combined plugin aiup-nestjs-nextjs, written by a contributor to
the AI Unified Process, which this plugin and aiup-drizzle and aiup-nextjs supersede.
| Layer | Skill | Result |
|---|---|---|
| Service | /nest-service | @Injectable() services, business rules with markers, domain errors, the feature module |
| API | /nest-rest | Controllers, class-validator DTOs, mapped response types, Problem Details, status codes; an agreed OpenAPI operation built as written |
| Service | /nest-service-test | UC-001-<slug>.service-spec.ts: every business rule allowed and rejected, against a real database |
| API | /nest-rest-test | UC-001-<slug>.e2e-spec.ts: statuses, JSON contract, error bodies, through the full stack with Supertest |
Each skill is normally run by /use-case-implement UC-XXX or /use-case-test UC-XXX, which pass the Handover of the
layer below to the next. Each can also be run directly, for example /nest-rest UC-001 to change only the API of a use
case.
Two TypeScript-specific concerns are handled explicitly:
.js suffix on every relative import, even though the source is
TypeScript; a project on other module settings must not get one.unplugin-swc; from Vite 8, Oxc reads it from tsconfig.json. The test skills check this first.| Project | Plugins next to aiup-core |
|---|---|
| REST API, NestJS, Drizzle | aiup-drizzle, aiup-nestjs |
| Next.js, NestJS, Drizzle | aiup-drizzle, aiup-nestjs, aiup-nextjs, aiup-playwright |
A use case is tested once, in the integration layer of the entry layer it is offered through, which /stack records in
the Integration layer table of docs/architecture/stack.md:
| Project | Integration layer | What this plugin's test skills write |
|---|---|---|
| REST API only, or Next.js | API | /nest-rest-test: every business rule; /nest-service-test nothing new |
| No entry layer | Service | /nest-service-test: every business rule |
Both test skills run in process against PostgreSQL in Testcontainers, so Docker is required. The shared setup, including
the per-use-case seed test/data/uc<id>-<slug>.ts and the entry point the E2E tests start, is
test-setup.md.
This plugin ships no Client layer skill: a use case that calls an external system has no layer skill to build the
adapter yet, and /stack asks which technology calls it.
/plugin marketplace add ai-unified-process/marketplace
/plugin install aiup-nestjsaiup-core is installed with it as a plugin dependency.
tessl install ai-unified-process/aiup-core
tessl install ai-unified-process/aiup-nestjsTessl does not install dependencies, so name aiup-core too. See the marketplace
installation guides for other agents and manual adoption.
aiup-core and a reviewed docs/use_cases/UC-*.md, with /stack run once.The plugin configures the optional context7 MCP server for NestJS, Vitest, Supertest, and Testcontainers documentation.
The skills work without it.
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.