It seems that we can't escape AI lately. Even at the last week's Europe 2025 DDD conference, Large Language Models managed to creep in most presentations, like the Cyrille Martraire's 'Breaking conventions for more performant models'
A key takeaway from these presentations was the importance of good prompting to get satisfying results. By telling ChatGPT or Gemini that it should create bounded contexts or domain objects as a 'DDD expert', we can achieve better outcomes.
Curious to try this out, I decided to create a 'DDD Expert' Gem in Gemini. Here are the steps I took:
Generate the DDD Expert Prompt
Gemini can generate its own custom persona. There is no added value in handcrafting it unless you require something truly exotic:
Save the persona
To easily find and reuse the DDD expert persona prompt I'm saving it as a Gemini Gem. This way, I'll always have a DDD expert AI just one click away!
Use the gem
I'm now asking my DDD gem to generate bounded contexts and suggest aggregate roots for a DnD character sheet management tool.
Looking at the full output for my request, I can see recommendations for the bounded contexts, along with their responsabilities, aggregates, domain objects and ubiquitous language. Event if the result is not perfect that's a good draft to refine my first prompt with more requirements and details.
Let's note the context map at the end explaining how my bounded contexts interacts together with events and where to use anticorruption layers. The AI now invites the user to generate the domain objects or dig further into any context.
Going deeper
You can follow the suggestion of the LLM to go deeper in a specific context: 'Can you dig deeper in the character creation context?'. In my case, the LLM explored the character creation process step by step with Java code mentioning command objects, updates to the aggregate and the need to complete the character creation and generate the CharacterCreated event transactionally.
Key takeaways
Determinism
While writing this blog post, I ran the same prompt with the persona five or six times. The result was never exactly the same, but that might be a good thing; it provides quickly provides different perspectives on how this application could be built and sparks further reflection.
Speed
For my simple use case ( with not much context or business constraints ), the chatbot generated a draft quickly. An interesting experiment would be to see how well it performs when it needs to evolve a system with already defined domain objects, aggregates, and bounded contexts. I would also like to try implementing my AI-generated design to see how practical it actually is for developers.
Reuse
Given the simplicity of creating 'Gems' in Gemini, I could imagine myself creating many of them to gain perspectives using different paradigms like evolutionary architecture, DDD, hexagonal architecture, and more.
Conclusion
Those were my thoughts while playing with Gemini, Gems, and DDD design. I hope you enjoyed the post, and feel free to point me to any resources on architecture design prompting!