architecture/
The style itself
The four layers · use cases · aggregates and value objects · which way dependencies run · integration between contexts · the rule catalog in prose.
Domain-Centric Development
Business rules end up scattered across controllers, entities and services. Domain-Centric Architecture (DCA) puts them in the domain; web and persistence stay outside, as adapters. An architecture test fails the build when technology reaches in — in Java and .NET.
What you get framework updates stay out of the domain, the build names the boundary that broke, and an agent is held to the same bar as a colleague.
the mark is the architecture: adapters on the boundary, the domain at the core, neighbor contexts with a core of their own
Infrastructure → Adapters → Application → Domain
One rule governs everything: dependencies point inward. The domain knows no framework, no database, no protocol, and the build checks it. Whether the model is right stays a human question.
package shop.checkout.domain; import shop.checkout .infrastructure.persistence .OrderRow;
An entity reaches for its table row. A year later the model cannot change without the database.
DCA-LAY-002
Domain must not depend on
Infrastructure
selects classes in *.domain..
checks no dependency on
*.infrastructure..
One structural rule, the same in Java and .NET. The mistake becomes a red test, not a review comment.
checkout.application.shared OrderRepository ← interface checkout.adapter.outgoing .persistence JpaOrderRepository
The application states what it needs; the adapter implements it. The same rule keeps it that way.
One architecture, six artifacts
Guide, libraries, two shops, catalog and plugins describe one system. The catalog is generated; maintenance keeps the rest in step.
Guide
The architectural decisions for team members and agents: tactical DDD, ports & adapters, naming, package layout, the purpose of each rule.
dca-guideBuilding Blocks
Marker interfaces for the DDD and hexagonal building blocks, plus the architecture rules, on Maven Central and NuGet. The markers have no dependencies.
Already on jMolecules? Point the rules at org.jmolecules.ddd.types.* —
no type needs migrating.
Reference implementation · Java
Java 25, Spring Boot 4, eight bounded contexts, full tactical patterns. The rules run in the build.
dca-ecommerce-sample-javaReference implementation · .NET
ASP.NET Core, one project per bounded context, the same Ubiquitous Language. The evidence that DCA carries over to C# unchanged.
dca-ecommerce-sample-dotnetKnowledge catalog
Guide, markers and rules as one graph of over 500 nodes for agents to look up and cite. Generated, tool-agnostic.
dca-knowledge-catalogTooling
dca-core describes, creates and reviews a project.dca-factory delivers stories, with a gate between the stages.dca-craft carries TDD, clean code, ADRs and reviews.dca-factory-cockpit shows and steers the cycle, in Claude Code only.Claude Code, Codex and OpenCode read the same skill folders.
dca-marketplaceWhy it is built this way
DCA is the architecture, a synthesis of Domain-Driven Design, Hexagonal and Clean Architecture. Domain-Centric Development is how software is built with it, with AI support. What a machine can check should be deterministic: the structure and red before green. Whether an agent gets the domain right is not measured yet.
121 shared ids like DCA-USE-009, for Java and .NET. A shared id means the same
intent; what each platform checks is in its rule list.
The catalog connects guide, markers and rules in one graph. Agents look things up in it and cite them.
Gate scripts require an end-user test per acceptance criterion and read red before green from the test report, not from an exit code. A story with a page counts as delivered only once a person has accepted it.
watch one cycle in the cockpit, from the first topic to the app
An agent built the same story in both stacks, and two divergences showed. Both were closed in a rule and the catalog, not in the shop code — that is what the pair is for.
Start small
DCA does not begin with a rewrite, but with one test that fails when a dependency points the wrong way.
# in Claude Code; Codex and OpenCode read the same skill folders /plugin marketplace add domain-centric-development/dca-marketplace /plugin install dca-core@dca-marketplace # on an existing Java or .NET project /dca-init # Building Blocks and an architecture test, fitted to the existing layout /dca-new # or: a new project in an empty directory ./gradlew test-architecture # Java dotnet test # .NET — the architecture project, Debug build
Existing marker interfaces are kept or aliased. Nothing is replaced just because it has a different name.
Rules come in sets. One that does not fit yet is switched off by id — in writing, not quietly.
Then aggregates, value objects and use cases, with naming conventions and a glossary per context.
One story through every stage, with gates. Optional: the architecture works without it.
The rule suites check structure: where a type lives, what it depends on, how it is named. Whether the model is correct and a use case does what the business meant needs behaviour tests, a domain expert and review.
Deliver with the factory
dca-factory delivers one story at a time, with a gate between the stages.
It needs a project description, a backlog and a stack profile; /factory-setup adds what
is missing.
# once per machine, next to dca-core from above /plugin install dca-craft@dca-marketplace # tests, reviews, glossary for the stages /plugin install dca-factory@dca-marketplace # the foundation — once per project, and when something moves /factory-setup # description, git, runner, gate, hook, profile — only what is missing # the cycle — discover → backlog → run → decide → delivered /factory-discover # optional: which problem is worth solving /factory-backlog # epic and story with checkable criteria /factory-run # plan → test → build → tidy → judge → document /factory-decisions # answer questions, accept results /factory-status # what is delivered, running, waiting, what it cost # unattended, from a shell bash .agents/factory/factory.sh run
/dca-describe writes project/ with you: product, technology,
domain. Every stage reads it; none invents what it leaves open.
dca-factory.profile.yaml holds the build and test commands. Detection prefills it,
a person corrects it. A run never guesses a command.
/factory-backlog writes stories with scenarios. Only status: approved
runs; an open question stops the run and waits in /factory-decisions.
/factory-run runs in the session, factory.sh run unattended from a
shell. Both write the same files; /factory-status shows either.
watch one run below · read how the stages and gates work · install the plugins
Principles
The rule suites encode structural conventions for developers and agents.
Helper, Util or Impl on domain types.