{"id":4021,"date":"2026-08-19T10:00:00","date_gmt":"2026-08-19T14:00:00","guid":{"rendered":"https:\/\/www.mymiller.name\/wordpress\/?p=4021"},"modified":"2026-08-16T08:31:43","modified_gmt":"2026-08-16T12:31:43","slug":"spec-driven-ai-architecture-designing-applications-with-app_spec-md-design-md-agents-md-and-adrs","status":"publish","type":"post","link":"https:\/\/www.mymiller.name\/wordpress\/spring_ai\/spec-driven-ai-architecture-designing-applications-with-app_spec-md-design-md-agents-md-and-adrs\/","title":{"rendered":"Spec-Driven AI Architecture: Designing Applications with APP_SPEC.md, DESIGN.md, AGENTS.md, and ADRs"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">In the era of AI-assisted software engineering, traditional high-level architecture diagrams and scattered wiki pages are no longer sufficient. When human developers and AI coding agents (such as Claude Code, Cursor, Windsurf, or Aider) collaborate on a codebase, the architecture must be <strong>explicit, machine-readable, version-controlled, and deterministic<\/strong>.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This document outlines a modern architectural pattern called <strong>Spec-Driven AI Architecture<\/strong>, built around four core markdown artifacts:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong><code>APP_SPEC.md<\/code><\/strong>: The functional product specification defining <em>what<\/em> is being built from a business and feature standpoint.<\/li>\n\n\n\n<li><strong><code>DESIGN.md<\/code><\/strong>: The technical system design detailing <em>how<\/em> systems interact, component hierarchies, sequence flows, and internal contracts.<\/li>\n\n\n\n<li><strong><code>AGENTS.md<\/code><\/strong>: The operational guardrails defining <em>how<\/em> AI agents must write, test, structure, and validate code.<\/li>\n\n\n\n<li><strong><code>doc\/adr\/*.md<\/code> (Architectural Decision Records)<\/strong>: The immutable history detailing <em>why<\/em> specific technical choices and trade-offs were made.<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">1. The Four-Pillar Architecture Framework<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>                 +-----------------------+\n                 |     APP_SPEC.md       |\n                 | (Functional Spec,     |\n                 |  Features &amp; Product)  |\n                 +-----------+-----------+\n                             |\n                             v\n                 +-----------------------+\n                 |       DESIGN.md       |\n                 | (Technical System     |\n                 |  Design &amp; Workflows)  |\n                 +-----------+-----------+\n                             |\n         +-------------------+-------------------+\n         |                                       |\n         v                                       v\n+-----------------------+               +-----------------------+\n|      AGENTS.md        | &lt;-----------&gt; |    doc\/adr\/*.md       |\n| (Execution Rules,     |  References   | (Architecture Records,|\n| Code Quality &amp; Stack) |   Constraints | Trade-offs &amp; History) |\n+-----------------------+               +-----------------------+\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Roles and Responsibilities<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Artifact<\/strong><\/td><td><strong>Audience<\/strong><\/td><td><strong>Primary Purpose<\/strong><\/td><td><strong>Key Content<\/strong><\/td><\/tr><tr><td><strong><code>APP_SPEC.md<\/code><\/strong><\/td><td>Product &amp; Engineering<\/td><td>Product Blueprint<\/td><td>User personas, functional scope, feature requirements, high-level user stories<\/td><\/tr><tr><td><strong><code>DESIGN.md<\/code><\/strong><\/td><td>Engineering &amp; AI Agents<\/td><td>Technical Blueprint<\/td><td>Component topology, sequence diagrams, class\/interface models, internal data flows<\/td><\/tr><tr><td><strong><code>AGENTS.md<\/code><\/strong><\/td><td>AI Agents<\/td><td>Execution Guardrails<\/td><td>File structure rules, library choices, forbidden patterns, testing commands<\/td><\/tr><tr><td><strong>ADR (<code>000x-*.md<\/code>)<\/strong><\/td><td>Humans &amp; AI<\/td><td>Rationale &amp; Context<\/td><td>Historical decision context, trade-offs, accepted consequences<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\">2. Defining Product Requirements (<code>APP_SPEC.md<\/code>)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><code>APP_SPEC.md<\/code> serves as the functional source of truth. It translates business intent into actionable engineering scope without getting bogged down in low-level code implementation details.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Sections of a Production-Grade <code>APP_SPEC.md<\/code><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Executive Overview<\/strong>: Core business objective and target audience.<\/li>\n\n\n\n<li><strong>Feature Scope &amp; Capabilities<\/strong>: Functional requirements grouped by domain.<\/li>\n\n\n\n<li><strong>User Experience Goals<\/strong>: Primary navigation flows and user journey steps.<\/li>\n\n\n\n<li><strong>Non-Functional Requirements<\/strong>: Performance targets, security standards, and accessibility expectations.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Template: <code>APP_SPEC.md<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Application Specification: Document Management System\n\n## 1. Product Overview\n- **Name**: DocuFlow\n- **Type**: Web Application (REST API + SPA)\n- **Goal**: Enable teams to securely index, search, and analyze corporate documents using AI assistance.\n\n## 2. Functional Requirements\n### FR-1: Document Ingestion\n- Users can upload PDF and Markdown files up to 25MB.\n- The system must automatically parse and index uploaded documents.\n\n### FR-2: Document Search &amp; Retrieval\n- Users can perform full-text and semantic search.\n- Search results must display document title, status, creation date, and relevancy score.\n\n### FR-3: AI Summarization\n- Users can request an AI-generated summary of selected documents.\n- Summarization must execute using strictly local inference engines to protect sensitive data.\n\n## 3. User Experience &amp; Flows\n1. **Dashboard**: Displays recent documents and upload trigger.\n2. **Document Viewer**: Split pane with document preview on the left and AI chat\/summary on the right.\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">3. Defining Technical System Architecture (<code>DESIGN.md<\/code>)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">While <code>APP_SPEC.md<\/code> describes <em>what<\/em> the product does, <code>DESIGN.md<\/code> specifies <em>how<\/em> the software is technically constructed. It serves as the architectural blueprint that AI agents consult to understand service interactions, interface designs, state machines, and data schemas.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Key Sections of <code>DESIGN.md<\/code><\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>System Topology &amp; Component Diagram<\/strong>: High-level structural organization.<\/li>\n\n\n\n<li><strong>Detailed API &amp; Service Contracts<\/strong>: Endpoint definitions, request\/response models, and status codes.<\/li>\n\n\n\n<li><strong>Data Schemas &amp; Persistence<\/strong>: Database models, indexing strategies, and relationships.<\/li>\n\n\n\n<li><strong>Sequence &amp; Workflow Diagrams<\/strong>: ASCII or Mermaid diagrams detailing step-by-step execution.<\/li>\n\n\n\n<li><strong>Frontend Component Architecture<\/strong>: View hierarchy, state management strategy, and UI library binding.<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Template: <code>DESIGN.md<\/code><\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># Technical System Design: DocuFlow\n\n## 1. High-Level Component Topology\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">[ Angular SPA ] \u2500\u2500(HTTP\/REST)\u2500\u2500&gt; [ Spring Boot API Gateway ]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2502<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u250c\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2534\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2510<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u25bc \u25bc<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">[ Document Service ] [ AI Indexer Service ]<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2502 \u2502<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u25bc \u25bc<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">(PostgreSQL \/ JPA) (Spring AI + Ollama)<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\n## 2. Data Models &amp; Database Schemas\n\n### 2.1 Schema: `documents`\n| Field | Type | Constraints | Description |\n| :--- | :--- | :--- | :--- |\n| `id` | UUID | Primary Key | Unique document ID |\n| `title` | VARCHAR(255) | NOT NULL | Document title |\n| `status` | VARCHAR(32) | NOT NULL | Enum: `DRAFT`, `PROCESSING`, `PUBLISHED` |\n| `created_at` | TIMESTAMP WITH TIMEZONE | NOT NULL | Creation timestamp |\n\n## 3. REST API Contracts\n\n### POST \/api\/v1\/documents\n- **Description**: Upload and initiate parsing for a new document.\n- **Request Body**: `MultipartFile file`, `String title`\n- **Response**: `201 Created`\n  ```json\n  {\n    \"id\": \"123e4567-e89b-12d3-a456-426614174000\",\n    \"title\": \"Quarterly Report\",\n    \"status\": \"PROCESSING\",\n    \"createdAt\": \"2026-03-15T10:00:00Z\"\n  }\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">GET \/api\/v1\/documents<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Description<\/strong>: Search and list documents.<\/li>\n\n\n\n<li><strong>Query Parameters<\/strong>: <code>page<\/code> (int), <code>size<\/code> (int), <code>status<\/code> (String)<\/li>\n\n\n\n<li><strong>Response<\/strong>: <code>200 OK<\/code> (<code>Page&lt;DocumentDTO><\/code>)<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4. Sequence Diagram: Document Processing<\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code>User             Angular UI            Document Controller       Spring AI (Ollama)\n \u2502                   \u2502                          \u2502                          \u2502\n \u251c\u2500\u2500 Upload File \u2500\u2500\u2500&gt;\u2502                          \u2502                          \u2502\n \u2502                   \u251c\u2500\u2500 POST \/api\/v1\/docs \u2500\u2500\u2500\u2500&gt;\u2502                          \u2502\n \u2502                   \u2502                          \u251c\u2500\u2500 Generate Embedding \u2500\u2500\u2500&gt;\u2502\n \u2502                   \u2502                          \u2502&lt;\u2500\u2500 Embedding Vector \u2500\u2500\u2500\u2500\u2500\u2524\n \u2502                   \u2502                          \u251c\u2500\u2500 Save Entity &amp; Vector   \u2502\n \u2502                   \u2502&lt;\u2500\u2500 201 Created (DTO) \u2500\u2500\u2500\u2500\u2500\u2500\u2524                          \u2502\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5. Frontend UI Component Hierarchy<\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>AppComponent<\/code> (Root layout with <code>MatSidenav<\/code>)\n<ul class=\"wp-block-list\">\n<li><code>DocumentListComponent<\/code> (Displays data via Angular Material <code>MatTable<\/code>)<\/li>\n\n\n\n<li><code>DocumentUploadDialogComponent<\/code> (Material <code>MatDialog<\/code> form for uploads)<\/li>\n\n\n\n<li><code>DocumentDetailComponent<\/code> (Split viewer using Signals for reactive state)<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code>\n---\n\n## 4. Guiding the AI Developer (`AGENTS.md`)\n\n`AGENTS.md` governs *how* AI agents operate inside your repository. It enforces technical stack selections, coding standards, prohibited patterns, and test execution procedures.\n\n### Core Objectives of `AGENTS.md`\n\n- **Enforce Architectural Boundaries**: Prevent agents from mixing presentation, business logic, or data access layers.\n- **Lock Down Technology Choices**: Enforce specific tooling (e.g., Gradle build scripts, Angular Material components, Spring AI modules).\n- **Define Code Quality Rules**: Enforce DTO encapsulation, parameter usage rules, and immutability.\n- **Provide Verification Commands**: Detail command-line instructions for build and test validation.\n\n### Template: `AGENTS.md`\n\n```markdown\n# Agent Directives &amp; Repository Rules\n\n## 1. Role &amp; Behavior\nYou are an expert Principal Software Architect and Developer.\nBefore generating or modifying code, inspect `APP_SPEC.md`, `DESIGN.md`, and relevant ADRs in `doc\/adr\/`.\nNever alter core architectural patterns without creating a new ADR proposal.\n\n## 2. Technology Stack &amp; Tooling Constraints\n- **Build Tool**: Gradle ONLY (Do not generate or edit `pom.xml` files).\n- **Backend**: Java 21+, Spring Boot 3.x, Spring Data JPA.\n- **Frontend**: Angular 18+, Angular Material UI components.\n- **AI\/LLM Integrations**: Spring AI modules routed to local Ollama instances.\n\n## 3. Architectural Rules &amp; Standards\n### Backend (Spring Boot)\n- **Layering**: Controller -&gt; Service -&gt; Repository. Controllers must never access Repositories directly.\n- **REST Protocol Rules**:\n  - `POST` and `PUT` request payloads MUST use strongly-typed `@RequestBody` DTOs.\n  - Query parameters (`@RequestParam`) are strictly reserved for search, pagination, and filter parameters on `GET` requests.\n- **Persistence**: Never expose JPA entities over REST endpoints. Always convert entities to DTOs in the Service layer.\n\n### Frontend (Angular)\n- **UI Components**: Use Angular Material primitives (`MatButtonModule`, `MatTableModule`, `MatSidenavModule`, etc.).\n- **State Management**: Prefer Angular Signals for local state management and RxJS for asynchronous stream handling.\n- **Structure**: Feature-based folder organization (`\/src\/app\/features\/documents\/...`).\n\n## 4. Testing &amp; Verification Requirements\nBefore marking any task as complete, execute and verify using:\n- `.\/gradlew test` (Backend validation)\n- `ng test --watch=false` (Frontend validation)\n\n## 5. Prohibited Actions\n- DO NOT add external dependencies to `build.gradle` without explicit permission.\n- DO NOT hardcode credentials, tokens, or local file paths.\n- DO NOT remove or bypass failing unit tests.\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">5. Recording Architecture Decision Records (ADRs)<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Architectural Decision Records capture significant technical choices, including their context and trade-offs.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In AI-driven development, <strong>ADRs are critical guardrails<\/strong>. AI agents lack persistent memory across distinct sessions. Without recorded ADRs, an agent might inadvertently refactor a deliberate trade-off (e.g., replacing a local Ollama integration with a cloud API, or switching build systems).<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where ADRs Live<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Store ADRs in the repository under a structured directory:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/doc\n  \/adr\n    0001-record-architecture-decisions.md\n    0002-use-spring-boot-and-gradle.md\n    0003-use-angular-material-for-ui.md\n    0004-use-spring-ai-with-ollama.md\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Standard ADR Format (MADR \/ Nygard Format)<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Every ADR should follow a strict, lightweight Markdown schema:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Title<\/strong>: Sequentially numbered decision (e.g., <code>0004-use-spring-ai-with-ollama.md<\/code>).<\/li>\n\n\n\n<li><strong>Status<\/strong>: Proposed, Accepted, Rejected, Deprecated, or Superseded.<\/li>\n\n\n\n<li><strong>Context<\/strong>: What problem are we solving? What constraints exist?<\/li>\n\n\n\n<li><strong>Decision<\/strong>: What choice was made?<\/li>\n\n\n\n<li><strong>Consequences<\/strong>: What becomes easier or harder as a result?<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">Template: Architecture Decision Record<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># &#91;Number]. &#91;Short Title of Decision]\n\n* **Status**: &#91;Proposed | Accepted | Superseded by ADR-XXXX]\n* **Date**: YYYY-MM-DD\n* **Deciders**: &#91;Architect \/ Tech Lead Name(s)]\n\n## Context and Problem Statement\n&#91;Describe the technical context, business requirement, or problem requiring an architectural decision. Keep it concise.]\n\n## Decision Drivers\n* &#91;Driver 1: e.g., Local data privacy constraints]\n* &#91;Driver 2: e.g., Team expertise in Java and Angular]\n* &#91;Driver 3: e.g., Low latency requirements]\n\n## Considered Options\n1. &#91;Option 1]\n2. &#91;Option 2]\n3. &#91;Option 3]\n\n## Decision Outcome\nChosen Option: **&#91;Option X]**, because &#91;brief justification].\n\n### Positive Consequences\n* &#91;Benefit 1]\n* &#91;Benefit 2]\n\n### Negative Consequences \/ Trade-offs\n* &#91;Drawback or operational complexity accepted]\n* &#91;Maintenance burden accepted]\n\n## Pros and Cons of Options\n\n### &#91;Option 1]\n* Good, because &#91;...]\n* Bad, because &#91;...]\n\n### &#91;Option 2]\n* Good, because &#91;...]\n* Bad, because &#91;...]\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Sample ADR: Integrating Local LLMs<\/h3>\n\n\n\n<pre class=\"wp-block-code\"><code># 0004. Use Spring AI with Ollama for Local Inference\n\n* **Status**: Accepted\n* **Date**: 2026-03-15\n* **Deciders**: Lead Architect\n\n## Context and Problem Statement\nThe application requires intelligent document indexing and semantic extraction. Data privacy policies prohibit sending internal document content to third-party public cloud LLM endpoints.\n\n## Decision Drivers\n* Strict data sovereignty and zero external telemetry requirements.\n* Need for seamless integration with our Spring Boot infrastructure.\n* Reproducible local developer environment.\n\n## Considered Options\n1. Cloud-hosted LLM APIs (OpenAI, Anthropic) via direct REST calls.\n2. Spring AI integrated with local Ollama instances.\n3. Custom Python sidecar microservice running HuggingFace models.\n\n## Decision Outcome\nChosen Option: **Spring AI with Ollama**, because Spring AI provides standard abstractions inside our existing Java ecosystem while Ollama manages local model lifecycles securely inside our deployment perimeter.\n\n### Positive Consequences\n* No sensitive document data leaves the host infrastructure.\n* Standardized `ChatModel` interface allows swapping local models easily.\n* Native Java configuration via `build.gradle` without Python sidecars.\n\n### Negative Consequences \/ Trade-offs\n* Developer machines must have sufficient GPU\/RAM resources to run Ollama locally.\n<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">6. The Integrated End-to-End Workflow<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">How do <code>APP_SPEC.md<\/code>, <code>DESIGN.md<\/code>, <code>AGENTS.md<\/code>, and ADRs interact in day-to-day development?<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code> &#91;1. Product\/Architect] \u2500\u2500&gt; Drafts APP_SPEC.md (Functional Scope)\n                                  \u2502\n                                  \u25bc\n &#91;2. Tech Architect]    \u2500\u2500&gt; Drafts DESIGN.md &amp; Initial ADRs\n                                  \u2502\n                                  \u25bc\n &#91;3. Agent Execution]   \u2500\u2500&gt; Reads APP_SPEC.md + DESIGN.md + AGENTS.md + ADRs\n                                  \u2502\n                                  \u25bc\n &#91;4. Implementation]    \u2500\u2500&gt; Generates code adhering to specs &amp; constraints\n                                  \u2502\n                                  \u25bc\n &#91;5. Verification]      \u2500\u2500&gt; Runs Gradle &amp; Angular test suites (per AGENTS.md)\n                                  \u2502\n                                  \u25bc\n &#91;6. Architectural Change?] \u2500\u2500 YES \u2500\u2500&gt; Drafts new ADR (000X-title.md)\n          \u2502\n          \u2514\u2500\u2500 NO \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500&gt; Merges Code &amp; Updates DESIGN.md if needed\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step-by-Step Execution Protocol<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Functional Definition<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The Product Manager or Architect writes <code>APP_SPEC.md<\/code> defining key features and user flows.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Technical Blueprinting<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The Software Architect creates <code>DESIGN.md<\/code> defining data schemas, API payload structures, sequence flows, and Angular Material component layouts.<\/li>\n\n\n\n<li>Initial foundational choices (frameworks, build tools, database setups) are logged in <code>doc\/adr\/<\/code>.<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Agent Directives Setup<\/strong>:\n<ul class=\"wp-block-list\">\n<li><code>AGENTS.md<\/code> is verified or updated to enforce repository rules (e.g., Gradle commands, Spring Boot DTO patterns, testing instructions).<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Agent Prompting Phase<\/strong>:\n<ul class=\"wp-block-list\">\n<li>Prompt the AI coding agent with explicit artifact references:<em>&#8220;Agent, review <code>APP_SPEC.md<\/code> Section 2 (FR-1) and <code>DESIGN.md<\/code> Section 3. Implement the <code>POST \/api\/v1\/documents<\/code> endpoint using Spring Boot DTOs and Angular Material frontend upload components. Follow all rules in <code>AGENTS.md<\/code> and check <code>doc\/adr\/0004<\/code>.&#8221;<\/em><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><strong>Validation &amp; ADR Evolution<\/strong>:\n<ul class=\"wp-block-list\">\n<li>The agent runs <code>.\/gradlew test<\/code> and <code>ng test --watch=false<\/code> as instructed in <code>AGENTS.md<\/code>.<\/li>\n\n\n\n<li>If a new structural trade-off arises during execution, a new ADR is recorded in <code>doc\/adr\/<\/code> before committing architectural updates.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n\n\n\n<h2 class=\"wp-block-heading\">7. Summary Checklist for Teams<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To establish a successful Spec-Driven AI Architecture, ensure your repository contains:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>[ ] <strong><code>APP_SPEC.md<\/code><\/strong>: Product blueprint defining features, user flows, and functional requirements.<\/li>\n\n\n\n<li>[ ] <strong><code>DESIGN.md<\/code><\/strong>: Technical blueprint defining schemas, sequence diagrams, API contracts, and component trees.<\/li>\n\n\n\n<li>[ ] <strong><code>AGENTS.md<\/code><\/strong>: AI execution directives detailing stack rules, styling guidelines, forbidden practices, and test commands.<\/li>\n\n\n\n<li>[ ] <strong><code>doc\/adr\/<\/code><\/strong>: Directory containing sequentially numbered Architecture Decision Records.<\/li>\n\n\n\n<li>[ ] <strong>Automated CI\/CD<\/strong>: Integration pipelines that execute tests specified in <code>AGENTS.md<\/code>.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">By combining <strong>functional scope (<code>APP_SPEC.md<\/code>)<\/strong>, <strong>technical architecture (<code>DESIGN.md<\/code>)<\/strong>, <strong>execution guardrails (<code>AGENTS.md<\/code>)<\/strong>, and <strong>decision history (ADRs)<\/strong>, teams achieve a clear, repeatable workflow for both human software engineers and AI coding agents.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the era of AI-assisted software engineering, traditional high-level architecture diagrams and scattered wiki pages are no longer sufficient. When human developers and AI coding agents (such as Claude Code, Cursor, Windsurf, or Aider) collaborate on a codebase, the architecture must be explicit, machine-readable, version-controlled, and deterministic. This document outlines a modern architectural pattern called [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":4025,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[495,443],"tags":[],"series":[],"class_list":["post-4021","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ai","category-spring_ai"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/08\/1786883436935.avif","jetpack-related-posts":[{"id":4004,"url":"https:\/\/www.mymiller.name\/wordpress\/ai\/the-complete-guide-to-modern-ai-terminology-from-neural-networks-to-rag-mcp-and-agentic-systems\/","url_meta":{"origin":4021,"position":0},"title":"The Complete Guide to Modern AI Terminology: From Neural Networks to RAG, MCP, and Agentic Systems","author":"Jeffery Miller","date":"July 29, 2026","format":false,"excerpt":"Artificial Intelligence is evolving rapidly, bringing with it a wave of new concepts, acronyms, and technical jargon. Whether you are building AI applications, reading tech news, or evaluating tools for work, understanding this vocabulary is essential. This guide breaks down modern AI terminology into logical categories\u2014from foundational computer science principles\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.mymiller.name\/wordpress\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_t8nujmt8nujmt8nu-scaled.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_t8nujmt8nujmt8nu-scaled.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_t8nujmt8nujmt8nu-scaled.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_t8nujmt8nujmt8nu-scaled.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_t8nujmt8nujmt8nu-scaled.avif 3x"},"classes":[]},{"id":3970,"url":"https:\/\/www.mymiller.name\/wordpress\/architecture\/vibe-coding-the-next-generation-how-we-built-aimud-using-an-ai-ensemble\/","url_meta":{"origin":4021,"position":1},"title":"Vibe Coding the Next Generation: How We Built AIMUD Using an AI Ensemble","author":"Jeffery Miller","date":"April 21, 2026","format":false,"excerpt":"In the traditional world of software engineering, building a Multi-User Dungeon (MUD) is a rite of passage. It requires handling complex state, real-time networking, concurrency, and deep game logic. Usually, this takes months of meticulous, line-by-line keyboard grinding. But for AIMUD, we didn't just code; we vibe coded. By leveraging\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.mymiller.name\/wordpress\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6veptk6veptk6vep-scaled.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6veptk6veptk6vep-scaled.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6veptk6veptk6vep-scaled.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6veptk6veptk6vep-scaled.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/04\/Gemini_Generated_Image_6veptk6veptk6vep-scaled.avif 3x"},"classes":[]},{"id":3987,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_ai\/enterprise-ai-at-scale-why-spring-ai-and-java-are-built-for-the-long-run\/","url_meta":{"origin":4021,"position":2},"title":"Enterprise AI at Scale: Why Spring AI and Java are Built for the Long Run","author":"Jeffery Miller","date":"July 23, 2026","format":false,"excerpt":"While Python remains the undisputed king of AI research, data exploration, and model training, the landscape shifts dramatically when moving from experimental notebooks to high-throughput, mission-critical production systems. For enterprise engineering teams building user-facing applications, workflow automations, and LLM-powered services, the real challenge isn't training a model\u2014it's integrating, scaling, securing,\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.mymiller.name\/wordpress\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_rht72frht72frht7-scaled.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_rht72frht72frht7-scaled.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_rht72frht72frht7-scaled.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_rht72frht72frht7-scaled.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_rht72frht72frht7-scaled.avif 3x"},"classes":[]},{"id":3995,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_ai\/mastering-retrieval-augmented-generation-rag-with-spring-ai\/","url_meta":{"origin":4021,"position":3},"title":"Mastering Retrieval-Augmented Generation (RAG) with Spring AI","author":"Jeffery Miller","date":"July 27, 2026","format":false,"excerpt":"Retrieval-Augmented Generation (RAG) has become the gold standard architecture for extending the capabilities of Large Language Models (LLMs) with enterprise domain knowledge. By combining the natural language understanding of LLMs with real-time retrieval from dynamic data stores, RAG eliminates hallucinations, enhances accuracy, and avoids the costly alternative of fine-tuning models\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.mymiller.name\/wordpress\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_v05lpdv05lpdv05l-scaled.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_v05lpdv05lpdv05l-scaled.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_v05lpdv05lpdv05l-scaled.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_v05lpdv05lpdv05l-scaled.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_v05lpdv05lpdv05l-scaled.avif 3x"},"classes":[]},{"id":4000,"url":"https:\/\/www.mymiller.name\/wordpress\/ai\/bridging-knowledge-and-action-how-rag-and-mcp-power-the-next-era-of-ai-agents\/","url_meta":{"origin":4021,"position":4},"title":"Bridging Knowledge and Action: How RAG and MCP Power the Next Era of AI Agents","author":"Jeffery Miller","date":"July 28, 2026","format":false,"excerpt":"As Large Language Models (LLMs) continue to evolve, two fundamental limitations persist: knowledge cutoffs and isolation from execution environments. An AI model may possess impressive reasoning capabilities, but without direct access to your private documentation or live production APIs, its ability to solve real-world problems remains severely constrained. To solve\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.mymiller.name\/wordpress\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_gavzhugavzhugavz-scaled.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_gavzhugavzhugavz-scaled.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_gavzhugavzhugavz-scaled.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_gavzhugavzhugavz-scaled.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/07\/Gemini_Generated_Image_gavzhugavzhugavz-scaled.avif 3x"},"classes":[]},{"id":4019,"url":"https:\/\/www.mymiller.name\/wordpress\/spring_ai\/standard-mechanisms-for-installing-and-managing-agent-skills\/","url_meta":{"origin":4021,"position":5},"title":"Standard Mechanisms for Installing and Managing Agent Skills","author":"Jeffery Miller","date":"August 18, 2026","format":false,"excerpt":"As the Agent Skills specification (SKILL.md) matures, managing skill lifecycles\u2014discovering, installing, updating, and sandboxing skills\u2014has settled into several standard mechanisms. Because skills are fundamentally directory-based packages (containing SKILL.md, scripts, and resources), installation boils down to placing verified directory structures into an agent's configured skills directory (typically .\/skills or .agent\/skills). Below\u2026","rel":"","context":"In &quot;AI&quot;","block_context":{"text":"AI","link":"https:\/\/www.mymiller.name\/wordpress\/category\/ai\/"},"img":{"alt_text":"","src":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/08\/1786883167765.avif","width":350,"height":200,"srcset":"https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/08\/1786883167765.avif 1x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/08\/1786883167765.avif 1.5x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/08\/1786883167765.avif 2x, https:\/\/www.mymiller.name\/wordpress\/wp-content\/uploads\/2026\/08\/1786883167765.avif 3x"},"classes":[]}],"jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/4021","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/comments?post=4021"}],"version-history":[{"count":1,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/4021\/revisions"}],"predecessor-version":[{"id":4022,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/posts\/4021\/revisions\/4022"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media\/4025"}],"wp:attachment":[{"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/media?parent=4021"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/categories?post=4021"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/tags?post=4021"},{"taxonomy":"series","embeddable":true,"href":"https:\/\/www.mymiller.name\/wordpress\/wp-json\/wp\/v2\/series?post=4021"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}