Architecture Checks in CI/CD
Reading the O’Reilly book “Software Architecture: The Hard Parts” (Neal Ford, Mark Richards).
The key idea that stuck with me: architecture isn’t diagrams or one-time decisions - it’s rules that should be verified automatically.

Fitness functions
The authors propose embedding architecture checks directly into CI/CD - just like tests or security scans. Break a rule and the pipeline fails. No manual oversight, no “we’ll sort it out later.”
Examples from the book:
- You can’t silently break APIs - contract verification
- You can’t mix domain and infrastructure - architecture tests
- You can’t deploy a service without basic production readiness - automated gates
The authors call this approach fitness functions - functions that evaluate architectural fitness.
A simple question
After changes like these, will the architecture be better or worse?
In practice, I’ve seen very few teams that actually implemented automated architecture checks. Usually it all stops at “agreements” and code review. And then they’re surprised that a year later a monolith has grown inside their microservices.
The approach is hard, but it’s the right one. If your CI/CD can already check security and test coverage - why not check architecture too?


