Spec Driven Development in Java

Course Length: 3 Days

AI can generate code faster than ever, but how do we ensure that the resulting software is correct, maintainable, and architecturally sound? Spec-Driven Development (SDD) shifts the focus from generating code to defining what the software must accomplish and establishing the guardrails that guide its implementation.

In this hands-on course, developers learn to combine iterative specifications, modern Java features, architectural enforcement, and multiple layers of automated testing. Using tools such as ArchUnit, jqwik, mutation testing, REST Assured, and Testcontainers, participants explore how to guide AI-assisted development while continuously verifying correctness, quality, and architectural integrity.

AI coding assistants have fundamentally changed how software is developed. Generating an implementation is now easier than ever, but producing reliable, maintainable, production-ready software remains an engineering challenge.

Spec-Driven Development in Java introduces a disciplined approach to AI-assisted software development in which specifications guide implementation and automated guardrails continuously verify the results. Rather than relying on AI-generated code and reviewing it afterward, participants learn to establish expectations, constraints, and verification mechanisms before and throughout development.

The course emphasizes an iterative approach to specifications. Requirements evolve alongside the software, with each iteration producing testable expectations and opportunities for feedback. Participants explore how modern Java language features, strong type systems, and intentional architectural decisions can reduce ambiguity and prevent entire categories of defects.

A central theme is architecture as an enforceable constraint. Using established architectural patterns such as Ports and Adapters, participants learn to define clear boundaries and to use ArchUnit to automatically detect violations. AI assistants can generate implementations, but they must operate within the architectural decisions established by the development team.

The course also explores a layered approach to software verification
  1. Property-Based Testing: Use jqwik to generate test cases, explore edge conditions, and verify invariants beyond traditional example-based testing. We will also discuss the protestware episode.

  2. Mutation Testing: Evaluate the effectiveness of test suites by deliberately introducing defects and determining whether existing tests detect them.

  3. API and Integration Testing: Verify application contracts using REST Assured and exercise real infrastructure with Testcontainers.

  4. End-to-End and UI Testing: Validate complete workflows and user interactions, ensuring that individual components work together as intended.

  5. Non-Functional Requirements and Fitness Functions: Define measurable expectations for performance, security, accessibility, reliability, and maintainability, then enforce them through automated checks where practical.

Finally, participants review emerging SDD frameworks and methodologies, including TestKit, Kiro, GSD, and OpenSpec, examining how these tools organize specifications, coordinate AI-assisted implementation, and integrate with established Java engineering practices.

Throughout the course, the emphasis remains on applying proven engineering principles to a new development workflow, rather than abandoning those principles in favor of AI-generated code.

The goal is not simply to generate more code. It is to produce better software with greater confidence, using specifications to guide development and guardrails to enforce quality.

See the contact page for questions and scheduling.