Cohesive Systems retweeted
We keep reinventing how software executes and recovers, but still lack a model of how systems compose and what must stay true across boundaries. Why I'd separate domain semantics, composition, and infrastructure.
Formalizing DDD 👀
I’ve been practicing DDD for many years, so this is good to hear.
But I think we need to say more about what DDD means in the agentic era.
Beyond telling agents to “do DDD,” we can use them to:
- Formalize the model
- Benchmark what works
Formalization
Today we guide agents mostly through skills and .md files. That’s a natural instinct, since agents follow prose instructions well in the small. But benchmarks call this into question at scale: adherence is inconsistent, especially for architectural rules.
Formalization moves the domain’s rules out of prose and into structure that can be mechanically checked. Rigor that used to take too much manual effort is now within reach.
What I’d try:
- Define types, interfaces, and module structure first, and make "illegal states unrepresentable".
- Route every change to aggregate state through operations that enforce its invariants.
- Model aggregate lifecycles as explicit state machines.
- Model cross-aggregate interactions as explicit, formal workflows and protocols, with sequencing, retries, and compensation spelled out.
- Enforce bounded contexts as module boundaries.
- Write property-based tests for domain invariants.
- Apply formal methods where justified, such as model checking a protocol.
Benchmarking
Many claims about DDD’s benefits remain subjective. There’s now a growing set of published agent benchmarks for code, and building your own is cheaper.
That evidence matters more now than it ever has. Without it, we’re producing far more code, far faster, without knowing whether we’re building better systems.
1
67
Cohesive Systems retweeted
Interesting paper: coding agents do well on tasks they can script their way through (grep, AST rewrites). Accuracy falls when they have to reason about behavior, like identifying which lines in two nearly identical classes actually behave differently.
On SWE-bench, the number of reading and analysis steps correlated more strongly with failure than lines edited.
Finding code isn’t the same as understanding its behavior. Better comprehension tools will help…but why not make system meaning explicit so agents don’t have to reconstruct it from implementations?
arxiv.org/abs/2610.10610
Make the model the implementation!
When an LLM writes a formal spec from requirements plus possibly buggy code, it can produce a spec that the buggy code satisfies: either too weak, or shaped by the implementation. The verifier passes it. Advanced prompting didn't fully fix it.
This is verification vs. validation. Proving code meets a spec says nothing about whether the spec captures intent.
One way out: make the model the implementation. Compile it instead of hand-writing code that's supposed to match it. That closes the model-to-code gap. Validation remains, but it happens against a model a domain expert can read and explore through generated scenarios, not against thousands of lines of code.
arxiv.org/abs/2610.32053
2
84
Agents make code cheap. Understanding the system is still the bottleneck.
Cohesive is a language for describing systems: their rules, workflows, and guarantees.
People and agents work from the same model. Machines check and compile it.
Here’s a brief introduction.
Cohesive Systems retweeted
The AI era has given formal methods a reemerging role.
As code production becomes increasingly automated, formal methods are moving upstream, from verifying code to formalizing intent. The scarce resource is no longer writing software; it’s expressing precisely what the software should do.
That makes executable specifications, constraints, and semantic models far more valuable than they were when humans wrote every line of code.
Why people don't use formal methods hillelwayne.com/post/why-don…




