AI is changing how we build software, but many teams still work as if nothing has changed. They treat code as the only reliable artifact. Everything else slowly gets outdated:
AI code generation tools can make this even worse if used without structure. They produce code fast, but the process behind the code remains the same.
Spec-Driven Development (SDD) solves this by starting from clear specifications instead of starting from code. AI then uses these specifications to generate consistent code, tests, and documentation.
The AI Unified Process (AIUP) is a practical way to apply SDD in real projects. It keeps requirements, code, and documentation in sync. In this article, we look at AIUP in the context of a full-stack Java application built with Spring Boot, jOOQ, and Vaadin.
From Code-Centered To Spec-DrivenIn most teams, development is code-centered:
This leads to long-term problems:
Spec-Driven Development flips this:
When requirements change, you update the specification first, then regenerate.
The AI Unified Process (AIUP)AIUP is an iterative process with a simple but powerful structure.
It is built on three core specification artifacts:
These artifacts are always updated in this order. Everything else flows from them.
It contains three types of requirements:
Functional RequirementsThese describe what the system should do. In AIUP, they are usually written as user stories.
Examples:
Functional requirements describe user goals and expected behavior, not code.
Non-Functional RequirementsThese describe qualities of the system, like:
Example:
ConstraintsThese describe rules that must always be enforced.
Examples:
The Requirements Catalog is written in simple, precise language. It is reviewed frequently and kept under version control. Everything in AIUP starts with this catalog.
Which concepts exist, and how do they relate?
The Entity Model is based on the Requirements Catalog. Functional requirements describe what users want to do. Constraints often describe the domain rules. From both, you extract stable domain objects.
For example, from the requirements above, you define:
Entities:
Attributes:
Relationships:
The Entity Model lets AI generate:
It ensures that back end, database, and UI use the same domain structure.
A System Use Case describes how the system behaves when triggered by a user or external system. It defines:
System Use Cases transform requirements into explicit logic.
Example System Use Case: Deactivate CustomerName: Deactivate Customer
Actor: Administrator
Preconditions:
Main Flow:
Postconditions:
How AIUP Runs In IterationsAIUP uses short iterations. Each cycle follows this sequence:
This creates a stable, controlled development loop.
Example: A Java Feature With AIUPImagine you add a “Deactivate Customer” feature. All documentation is code and under version control.
The example uses Markdown, but you could also use AsciiDoc to get a richer Markdown syntax.
Step 1: Requirements Catalog
| Category | Description ||---------------------------|------------------------------------------------------------|| Functional requirement | As an admin, I want to deactivate a customer who has no open orders. || Non-functional requirement| All write operations must be audited. || Constraint | Customer email must be unique.
Step 2: Entity Model
Entity: Customer with id, name, email, active Entity: Order with id, status, customerId Relation: Customer 1..* Order Rule: Status can be OPEN, COMPLETED, or CANCELLED
AI generates:
Step 3: Use Cases ```
``` AI generates:
You review, adjust, and commit.
Why This Fits Full-Stack Java So WellAIUP fits the Java ecosystem because:
AIUP connects these elements with a straightforward process.
Benefits For Teams Clear Requirements
Rules, constraints, and user stories are explicit.
* Consistent Architecture
UI, Backend, and database reflect the same model.
* Faster Onboarding
New developers read the specs instead of guessing
* Safer Use Of AI
AI follows the spec and avoids random patterns.
* Higher Speed
AI handles repetitive tasks
* Lower Risk*
System Use Cases generate strong test coverage.
AI Is A Partner, Not A ReplacementAIUP assumes a skilled development team. Developers still:
AI accelerates work. Developers ensure correctness.
ConclusionSpec-Driven Development with AIUP provides teams with a structured approach to using AI. AI can generate code, tests, and diagrams that stay consistent with the specification.
In a Java stack using Spring Boot, jOOQ, and Vaadin, this approach is a natural fit. It increases speed, improves quality, and keeps the system aligned with business needs.
To get started:
This is how AIUP makes full-stack Java development faster, safer, and more consistent.
See it in ActionTwo webinar recordings show how to work with the AIUP: Spec-driven Development and Spec-driven Testing
The post Spec-Driven Development in Practice: How AI Simplify Full-Stack Java appeared first on JVM Advent.