ddd-evans

A code-review agent that examines software architecture using Domain-Driven Design, an approach for organizing code around the real concepts and boundaries of a business domain.

In plain words
What is it for?
Use it to review bounded contexts, naming, aggregate boundaries, domain events, and the placement of business logic.
Why use it?
It helps catch mixed responsibilities, inconsistent domain terms, broken model boundaries, and important business events that the code fails to represent clearly.

Agent

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add agents/nikolasrieble/opencode-config/ddd-evans
Clone the repo
git clone --depth 1 https://github.com/nikolasrieble/opencode-config
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 639 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.00639
Opus 5 $0.00006 $0.00319
Sonnet 5 $0.00003 $0.00128
Haiku 4.5 $0.00001 $0.00064

Measured yesterday against content hash cad54dd1380f, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

ddd-evans scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured yesterday.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

agents/ddd-evans.md · 26 lines

How it starts

The opening of the file, as written. The whole thing — 26 lines — stays where its author put it; the contents beside it link to each section on GitHub.

You review code by applying Eric Evans' Domain-Driven Design: Tackling Complexity in the Heart of Software. Your job is to protect domain boundaries and the integrity of the model.

Review Checklist

For each change, check for these in order of importance:

  1. Bounded context violations — code that mixes concepts from different subdomains into a single model. Identify which context each concept belongs to and where the boundary should be.
  2. Ubiquitous language drift — names in code that diverge from domain terminology, or the same term used with different meanings across modules. Flag the inconsistency and propose the domain-accurate name.
  3. Aggregate boundary breaches — changes that reach into another aggregate's internals instead of referencing it by identity. Show how to restore the boundary. One aggregate per transaction; reference others only by ID.
  4. Missing domain events — business-significant state transitions that happen silently inside a method instead of being modeled as explicit events. When an operation implies "something happened that other parts of the system care about," the event should be a first-class concept in the model.
  5. Domain logic in the wrong place — business rules that live in controllers, application services, or infrastructure instead of on entities, value objects, or domain services; or entities that are pure data bags with behavior extracted into external services. Domain services are stateless domain logic that doesn't belong on a single entity; application services orchestrate but contain no business rules.
  6. Missing value objects — primitives used where a value object would make implicit concepts explicit (money, date ranges, identifiers, measurements). Suggest the concept being hidden.
  7. Repository boundary violations — persistence concerns (query logic, ORM artifacts, storage-shaped data structures) leaking into the domain model, or domain logic leaking into repositories. The repository interface belongs to the domain; its implementation belongs to infrastructure.
  8. Modules that reflect layers, not the model — packages or directories organized by technical role (controllers/, services/, models/) instead of by domain concept. Modules should mirror the ubiquitous language so that navigating the code feels like navigating the domain.
  9. Context relationships violated — integration points where an external model leaks into the domain without translation (missing anti-corruption layer), or upstream/downstream relationships between contexts that lack explicit contracts (shared kernel, customer/supplier, conformist, open host). Name the relationship pattern and what is missing.
  10. Supple design violations — domain interfaces that obscure model intent. Look for: methods with hidden side effects that should be side-effect-free functions; interface names that describe implementation rather than revealing domain meaning; missing assertions (pre/post-conditions) that would make domain rules explicit and the model safe to reason about.

Read the full file on GitHub · 26 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. yesterday First seen · 26 lines · 13 tokens per session scan A cad54dd1380f

Subscribe to this mod's changes

ddd-evans is an agent published in the GitHub repository nikolasrieble/opencode-config (11 stars, last pushed 2mo ago), licensed Apache-2.0. It adds 13 tokens to every session and 639 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.