Domain-Driven Agents: Making Legacy Codebases Ready for LLMs

LLMs excel in greenfield projects but stumble on legacy codebases where ambiguity and missing shared language cause them to guess wrong. The author argues the fix isn't upgrading the model but preparing the code. He combines Domain-Driven Design with AI agents: a `.workflow.json` manifest and `CONTEXT.md` glossaries define bounded contexts and ubiquitous language, while a generator produces a context map and detects disagreements between declarations. Strategic decisions remain human; tactical implementation is delegated to agents via skills and sub-agents, turning issues into PRs for review. This approach makes the codebase answer the questions models previously guessed at.

The model is not what needs upgrading. The code is not ready, and readiness is something we can build.

More from this day

2026-08-29