Neal Ford  |
  • Software Architect, Author, & Speaker

How to Teach Your Agents About Architecture

How to Teach Your Agents About Architecture


1 Abstract

Agentic AI shows new possibilities in software architecture, including the ability to work towards a solution as long as deterministic constraints exist. Suddenly, developers and architects are trying to build ways for agents to determine success, which requires a deterministic method of defining these important constraints: Architecture as Code.

An increasingly common practice in agentic AI is separating foundational constraints from desired behavior. This class shows how to use the concepts in Architecture as Code to help build foundational constraints to help guide agents to build properly architected code.

We have been thinking about this problem for several years, even before agents. How is that? A funny thing happened on the way to writing our book Architecture as Code–the entire industry shifted. Generally, we write books iteratively–starting with a seed of an idea, then developing it through workshops, conference presentations, online classes, and so on. That's exactly what we did about a year ago with our Architecture as Code book. We started with the concept of describing all the ways that software architecture intersects with other parts of the software development ecosystem: data, engineering practices, team topologies, and more–nine in total–in code, as a way of creating a fast feedback loop for architects to react to changes in architecture. In other words, we're documenting the architecture through code, defining the structure and constraints we want to guide the implementation through.

2 Outline

  1. What
    1. From prompt-to-context engineering
    2. setting foundational rules for agentic code generation
  2. How
    1. Building deterministic guardrails for agentic behavior
      • architectural fitness functions
        • Scope
        • Platforms
      • LLM as an interpolator: generating fitness functions
      • Architecture Definition Language
        • Defined
        • Examples
        • Alternatives
    2. exercise: generating concrete fitness functions
    3. MCP and governance Mesh
    4. Break
    5. Case study: Building implementation constraints
      • code quality
      • code structure
      • code constraints/governance
    6. exercise: Make the Grade guardrails
  3. Where
    1. Engineering practices
      • controlling version control
        • Preventing cheating in mono-repos
        • Preventing code duplication in repo-per-service
      • preventing churn
    2. exercise: how much copy/paste is OK?
    3. Break
    4. Integration
      • architecture quantum coupling
        • static
        • exercise: limiting static coupling
        • dynamic
        • exercise: limiting dynamic coupling
        • contract
        • temporal
    5. Infrastructure
      • Architecture as Code -> Infrastructure as Code
      • Governing generated infrastructure
      • ADL alternatives
    6. exercise: translate CALM to ADL
    7. Break
    8. Data
      • Handing problems in distributed architectures
        • data consistency
        • referenial integrity
        • cascading updates/deletes
      • controlling data coupling
    9. exercise: Math the Grade data integrity
    10. Team topologies
      • How to tell if you have the correct distribution of agents/team members
      • building process feedback loops
    11. Enterprise architecture
      • global governance
      • Governance strategies
        • Centralized
          • Prescriptive
          • Classic alternative
        • Decentralized
          • Distributed
          • Durable interface
      • Adapting governance to the AI age
    12. Summary



  

Neal Ford  |
  • Software Architect, Author, & Speaker