adversarial-ddd
Adversarial DDD Gate
A domain-driven design and ubiquitous-language gate for any codebase — a pass/fail gate: a single blind reviewer subagent judges the work against this gate's rules with an adversarial mandate, and the work passes only when every rule is PASS or N/A. This skill renders verdicts; it never fixes the work.
The gate's engine is the glossary lifecycle: once a target contains domain concepts, a recorded ubiquitous language (a glossary) must exist — its absence is a FAIL whose fix list names the exact file to create and the terms it must define. Run the gate on any project and the first verdict forces the vocabulary into existence; every later run holds the code, tests, docs, and customer-facing copy to it and keeps it well-sized. That is how one skill produces a common, well-understood vocabulary across many projects, exactly as DDD prescribes.
When to Apply
- Domain code is about to merge and needs an objective PASS/FAIL on ubiquitous-language and domain-model quality, not advisory feedback.
- A project is being started or adopted and you want the shared vocabulary forced into existence — the first run's fix list is the glossary's initial contents.
- An agent (Claude, Codex) authored the code and you want an independent check on its known defaults:
*Manager/*Helpertypes,setStatus()transitions, anemic entities, vendor types absorbed into the model. - A DSL, fluent builder, or declarative spec format is being introduced and its surface needs judging as a domain-vocabulary artifact.
- A periodic audit — the codebase, docs, and stakeholder-facing surfaces have drifted and you want the divergences named with locations.
Do not apply to targets with no domain concepts — pure infrastructure, build tooling, generic libraries (the reviewer prompt's precondition aborts with "GATE NOT APPLICABLE"). Do not apply when the user wants explanations or refactoring rather than a verdict. Rules whose prerequisite structure is absent (no identifiable contexts, no DSL, no glossary yet for the conformance rules) go N/A, not FAIL — except the two absence rules (gloss-language-recorded, dsl-deterministic-validator-exists), where the missing artifact is itself the FAIL.
Review Protocol
Follow these steps exactly — the gate's value is that every review runs the same way.