Upgrade to Pro — share decks privately, control downloads, hide ads and more …

AI-Powered Domain-Driven Design

AI-Powered Domain-Driven Design

LLMs are powerful, but they are not very sophisticated in managing business language. Their very nature can accelerate the software development trajectory towards Big Balls of Mud. We are going faster, but in the wrong direction.
Luckily, Domain-Driven Design offers useful constructs for building our harnesses and supporting business-oriented agentic development.
At the same time, Domain-Driven Design emphasizes learning and mastering domain complexity, and this is where the AI contribution must be managed wisely.

Avatar for Alberto Brandolini

Alberto Brandolini

October 22, 2026

More Decks by Alberto Brandolini

Other Decks in Programming

Transcript

  1. A picture of three controversial heads of state That I

    removed, to check whether this was activating any filter
  2. AI and US Our skills aren’t evenly distributed Domain Models

    AI won’t beat you in what you’re really good at. Framed for disappointment AI will help you A LOT in what you’re not that good at Unfortunately, this is also where you’ll be fooled. Frontend development Regexp
  3. Lessons from Vibe Coding Amazing prototyping speed Integrations almost for

    free! ❤ Genie approach: “You only have three Desires” You have to think like a developer You don’t want to see the code.
  4. Context Post Vibe Coding (🗑🗑😒😏) -> Harness Engineering In-House Exploration

    Solo Mode One Legacy Application (15 Bounded Contexts) Two Main Scenarios: Rewrite / Porting (Ruby to Java) Refactoring -> later.
  5. Training Set Hypothesis Average Code & Reinforcement Learning might not

    be enough Code Good DDD Code I actually like Good DDD Code Wannabe DDD Code Good Code
  6. First Experiment Provide Robust Domain Knowledge Escaping the prompt ->

    Harness Establish a Reference Glossary Describe the desired Architecture(s) setup
  7. Greenfield approach Turn it into a clean brownfield Example features

    Reference implementation Add features incrementally Inside a coherent harness
  8. Progressive Disclosure Agents.md Agents.md A single markdown file is token-heavy

    and progressively inefficient A structured tree of ondemand information keeps the Token usage under control Frontmatter to fine-tune loading info TopicA.md TopicB.md TopicC.md
  9. Vision Summary An AI-Readable short document, containing: A short description

    of the business scenario, A list of the known Bounded Contexts, with a single paragraph description. Domain-Vision.md
  10. Bounded Context Descriptor BoundedContext-A.md A single file per Bounded Context

    Domain Narrative Key features Scenarios Integrations Glossary Banned Terms Our canvas may help! -> https://www.avanscoperta.it/en/bounded-context/
  11. CQRS-ES.md Architectural Styles Multiple Bounded Contexts can have the same

    architectural approach Externalize with examples and common practices
  12. ACL Descriptor Business Rationale History: “We used this tool till

    2023, then …” Translation logic Local Glossary Disclaimer: really “fresh” ACL-X.md
  13. Domain-Aware Harness Probably the single most effective move Convergence on

    the official narrative “Plausible” test cases appeared naturally The initial context matters
  14. Where should they live? Markdown files in GIT? Only the

    development team knows about it Wiki pages? Non-developers can alter the source of truth Read-only Wiki pages? Giving a weird message…
  15. Enforcing Coherence Matters A non-contradicting harness speeds up operations AI

    generates redundancy for free Be prepared for some pruning work
  16. Well… more of • Seamless integration - WOW! • Disappointing

    results • Optimizing felt like the wrong thing to do
  17. EventStorming to AI Technically doable Missing details EventStorming is a

    draft model, not a specification Digital format is already a loss Summarizing Matters There are better formats for consumers
  18. BDD as a discovery tool Given an open sale for

    event “X” with a capacity of 200 seats When we register a sale for 5 tickets Then the resulting capacity should be 195 seats
  19. BDD as a validation tool Given an open sale for

    event “X” with a capacity of 200 seats And we agreed with company ABC to resell 80 tickets And we sold 140 tickets overall Then the resulting capacity should be 60 seats And Company ABC could not offer more than 60 seats Did we understand correctly?
  20. Software development is a learning process Working code is a

    side effect https://blog.avanscoperta.it/2026/08/27/code-is-still-a-side-effect/
  21. Conversations Drafted Acceptance Tests Workshops Sketches Speech Prompt AI generation

    AI Plans Code gen era er n e g AI tio n n o i t a Presentations Digital Images Docs A g I a r e en n o ti
  22. BDD is not what it used to be The business

    validation is not part of the flow 😒 Less interactive sharpening 😒 A different test runner, trained the wrong way. 😔 You may want to have a look to: https://varar.dev/
  23. TDD is not what it used to be Fast support

    to complete coverage. 😏 No design friction. 🤔 No Red/Green/Refactor. Hiding technical debt under test coverage. 😳
  24. How the brain works Language inconsistencies Learning Context Le a

    Translation AI Harness Information availability rn Models in Politics g g n i n r a Le Token efficiency Harness
  25. Optimize for learning Our brain hasn’t changed, yet Hands-on, Lo-fi

    activities are still more brain-friendly Shortcuts are not helping learning Summarizing is (painful) learning too
  26. How can AI help? Covering areas where we have no

    expertise Challenging the current assumptions Analyzing competitors …
  27. Grill-me & Friends Pull towards a waterfallish approach “Give me

    all the details NOW, so that I can do my magic in one shot” Where do we get all the details?
  28. The Wrong Whirlpool Getting pulled into the wrong media, Ideal

    for AI, but not for you Photo by Simon Hurry on Unsplash
  29. The whirlpool principles Different perspectives provide more insights A single

    tool will progressively have decreasing ROI Switch to the tool that provides the most useful feedback!
  30. Land and explore Get to a plausible implementation ASAP Refine

    with more precise details once you have established actionable feedback loops Reinforce with Examples and specifications for corner cases
  31. Structured Flows Pressure for “the perfect flow” Every feature feels

    different Negleted details can make a difference “Styles” need to be maintained and selected upfront Everything will be obsolete next week. Expand your toolkit, establish the mandatory parts, keep experimenting
  32. Who should we believe? Code says one story; documentation says

    a different one. AI uses AI-generated sources to back itself up Experiment: Block proliferation Experiment: Every Bounded Context defines its source of truth and its evolution stance Specific skills to monitor /language-drift
  33. Without Touching the code Good exploration practice A new Forming

    (bad) Habit Code is not dirty Maybe the marketing message is not for you Running on 40+ Years of experience. What happens without it?
  34. The Accountability problem Con dence Code Accountability Con dence Code

    fi fi Accountability • We can write more code faster! • Yay! • But coding speed was constrained by confidence. (With exceptions) • AI brings more code with less confidence 🤞 • Accountability followed up code and confidence…
  35. Non-neutral tool • AI is a continuous pull into bad

    habits • Sicophancy • Channel choice • Boredom and multitasking
  36. Engineered addiction Chat interface pulls your brain in the wrong

    direction You need to be in control Offline exploration (paper, markers, whiteboard, parks) Time-Boxed sessions Safeguards …
  37. Domain-Aware Harness Domain-Vision.md CQRS-ES.md BoundedContext-A.md • Describes our domain •

    Leverages Bounded Contexts • Durable knowledge for the organization BoundedContext-B.md ACL-X.md ACL-Y.md
  38. Domain-Aware Developer • Understands the business domain • Connected to

    experts and practitioners • Autonomous in making experiments
  39. Contacts: • Blog: • https://blog.avanscoperta.it • https://medium.com/@ziobrando • https://ziobrando.substack.com/ •

    BlueSky: @ziobrando.bsky.social • Consulting & Training: [email protected] • https://eventstorming.com • http://www.avanscoperta.it