# Domains and business language

> Domain-Driven Design splits software along the lines of the business: domains, clear boundaries and a vocabulary for each. With agents, that split decides what you hand them and what context they get.

Strategic DDD starts by classifying the company’s subdomains. The core domain is what sets the company apart from its competitors. Supporting subdomains serve it. Generic subdomains look the same everywhere, like billing or identity management. You invest in the core, buy what is generic and keep supporting subdomains simple or outsource them. The software factory’s building blocks are rarely core: they are often bought or assembled. The context and rules that make it useful stay specific to the company.

The same classification tells you where to hand work to agents. A supporting subdomain with clear boundaries makes a good first workflow. In the core domain, the rules are subtler and often not written down anywhere, so keep more human review there.

This classification shifts over time. AI changes the economics of each activity, but it does not reclassify domains by itself. A capability built in-house can turn into a reliable off-the-shelf product, which makes it generic. Conversely, a new AI model can make a new offering possible, and the data, know-how or decisions behind it become a core domain. Anyone can now generate code, but that does not make an insurer’s pricing or claims expertise generic: what sets a company apart lies less in its code and more in its data and decisions. So revisit the classification when costs, customer expectations or what the market offers change.

A bounded context is the boundary within which a domain model and its words have a single meaning. “Customer” does not mean the same thing to billing and to support. The same boundary is a good way to split the agent’s context: one instructions file, one set of skills and one set of permissions per context and often one session or subagent per context. The agent’s context window stays small, and the agent stops mixing up two meanings of the same word. The context map shows how contexts depend on each other and where a word needs translating.

Ubiquitous language is the vocabulary that domain experts, developers and the code share within a context. A language model works from the words it reads. Vague instructions or inconsistent names force it to guess what you meant. A glossary for each context, kept in the repository, gives it the exact terms and the synonyms to avoid. The agent can help write it: it asks questions, suggests a term, and the team decides. The same words then show up in the spec, the tickets, the names in the code and the tests.

An enterprise ontology often aims for one model for the whole organization. DDD takes the opposite approach: one language per context, with explicit mappings from one context to another. For agents, an ontology is better kept the same way. Each team maintains the glossary for its context, and the context map ties them together. Shared metrics are the exception. A semantic layer gives each one a single versioned definition, such as revenue or the number of active customers, and agents that write queries read it too.

Tactical DDD gives the code the same boundaries. A language model does not know business rules it cannot see. Written into types, invariants and tests, those rules bind it: if it breaks one, CI fails. An anti-corruption layer translates the model of an external or legacy system into the context’s own model.

The context map also decides how to plug in an external tool. Plugging in an MCP server as-is, say from a ticketing tool, pushes that tool’s vocabulary onto the agent. Domain-specific tools with typed inputs act as an anti-corruption layer: they translate more reliably than written instructions.

**When**: As soon as the code spans several business domains or several teams share it. A product owned by one team, in one domain, only needs a short glossary in the repository.

**Trade-offs**: Splitting into contexts and keeping a glossary current takes time. Splitting too finely means more translation between contexts. A split lifted from a book, without domain experts, produces boundaries nobody respects.

## Where to start

- Sort subdomains into core, supporting and generic
- Revisit that classification when costs, customer expectations or vendor offerings change
- Draw the context map, with the team that owns each context
- Write a glossary for each context, with the synonyms to avoid
- Give each context its own instructions file and skills
- Put a translation layer in front of external tools connected through MCP

## Common mistakes

- Looking for one model for the whole company
- Plugging an MCP server in as-is at the heart of a domain whose vocabulary differs from the tool’s
- Handing the core domain to agents before the supporting subdomains
- Applying tactical DDD everywhere, down to generic code

## Metrics

- Agent mistakes caused by a misunderstood term
- Share of agent PRs that span several contexts

## Sources

- [Eric Evans, Domain-Driven Design Reference](https://www.domainlanguage.com/ddd/reference/)
- [Martin Fowler, Bounded Context](https://martinfowler.com/bliki/BoundedContext.html)
- [DDD Crew, Core Domain Charts](https://github.com/ddd-crew/core-domain-charts)
- [Unmesh Joshi, What Is Code? (martinfowler.com)](https://martinfowler.com/articles/what-is-code.html)
- [Thoughtworks, Your agent skill is not an anti-corruption layer](https://www.thoughtworks.com/en-gb/insights/blog/generative-ai/your-agent-skill-not-anti-corruption-layer)
- [Matt Pocock, Software Fundamentals Matter More Than Ever](https://ai.engineer/talks/software-fundamentals-for-ai-coding)
- [Matt Pocock, skill domain-modeling](https://github.com/mattpocock/skills/tree/main/skills/engineering/domain-modeling)
