Architecture
Designing systems that stay simple to change as the product grows.
ADRs give AI agents the history your code can't tell
README, CLAUDE.md and AGENTS.md only describe the current state of the code. ADRs add the missing history: why that decision, which alternatives were ruled out.
A good AI harness lets you use much cheaper models
On a codebase with broken import rules, Opus fixes it alone, Haiku falls for it, until an ESLint rule corrects it for 4 to 5 times less money.
ALL-CAPS Driven Development: shouting at AI does not work
Shouting in capital letters at an AI to enforce an architecture rule does not work: a deterministic tool can check it for you instead.
Software architecture and craftsmanship in the AI era
Transaction Script, DDD, Clean Architecture, CQRS, TDD, SOLID, Big Ball of Mud: working on software architecture has never been more useful or accessible.
The boy scout rule: clean up a codebase without a big rewrite
Updating a codebase's conventions without a big bang rewrite: every time you touch a file, you apply the latest rules the team agreed on.
The Result Pattern: telling bugs from business errors
Your cancelOrder() can fail in many predictable ways. The Result Pattern separates the business error you return from the bug that goes to Sentry.
The first week without writing a line of code
On any project, greenfield or brownfield, leave the keyboard alone the first week: understand, challenge the architecture, model the business.
Maintenance effort = Integration strength × Distance × Volatility
Vlad Khononov's formula from DDD Europe: maintenance effort is strength times distance times volatility, and zeroing just one dimension collapses it.
Where the value of a tech project really lives
Business rules, not technology, hold 80% of a tech project's value. Yet most projects start with code choices or the first screens instead.
Zero hand-written code: my harness engineering experiment
I set myself the challenge of writing a program without typing a single line myself, pushing the AI harness to its limit, inspired by an OpenAI experiment.
Why I ask for an ADR before every architecture decision
An ADR fits on one page: context, decision, consequences. Michael Nygard's 2011 idea hasn't aged, and it doubles as a free guide for AI reading the repo.
Opinionated frameworks are an AI harness
AdonisJS is famously opinionated. A talk with Jonathan Serra (AI2H) on why that rigidity gives an AI an extra harness, and an open question.
Multi-tenancy: the four levels of data isolation
A SaaS handling sensitive data has to keep each customer’s data apart. Four levels, from a tenant_id column to dedicated infra, and the one I usually pick.
What is a "Model"? Two things that have nothing in common
"Model" means both an ORM Model and the DDD domain model. Confusing them makes you think you modelled your business when you only described your tables.
Functional Core, Imperative Shell: the end of mocks everywhere
Gary Bernhardt's 2012 talk Boundaries is still some of the best testing advice around: separate decisions from actions, and pass only values between them.
dependency-cruiser: a computational sensor for your AI agents
dependency-cruiser maps imports and fails CI when a boundary is violated. A sensor for AI agents that only works if the architecture is clear enough to describe.
Vertical Slice Architecture: organise code by request
When adding one field touches six files in four folders, the feature lives nowhere. Jimmy Bogard's Vertical Slice Architecture flips the way code is organised.
How many of your architecture rules break the build?
With AI, a standardised architecture becomes an asset: every rule a machine can verify is a constraint. The others are only intentions.
"A depends on B": what exactly are we talking about?
A dependency can be seen by the compiler, by a test, or by nobody. Three questions to stay precise, with developers and with an AI.
What is a "layer" in software architecture?
Abstraction, technical role, call flow, dependencies, deployment: "layer" names five ways of slicing a program, and yours probably has all of them.
Clean Architecture is one rule: the Dependency Rule
What Robert C. Martin extracted in 2012 from Hexagonal, Onion and friends: a single rule you can verify in the code, the Dependency Rule.
Onion Architecture: business code at the centre
What Jeffrey Palermo proposed in 2008 with Onion Architecture: a single dependency rule so that business code stops paying for every technology change.