This is a book for enterprise architects who have spent careers watching their best ideas decay in translation.
You sketch a service boundary on a whiteboard. Six months later you read the code and find a different shape. You publish a data model. A year later, three teams have invented their own versions. You write a security policy. A year later, no one can tell you which routes enforce it. Architecture, as a craft, has been chronically under-served by the languages and frameworks that implement it.
Carrier is a small bet on a bigger idea: that architecture should be compilable. That the service boundary, the data model, the contract, the action, the policy — the things you actually care about — should not merely be documented. They should be the source.
Enterprise architecture and domain knowledge, brought to life.
This is also, urgently, a book for the age of automation.
AI agents can already write code at extraordinary speed. They are also, in conventional stacks, extraordinarily prone to drift. The same business request produces different shapes from run to run. One agent puts logic in a controller, another in a service class, a third in a database procedure. Each generated codebase needs its own review, its own remediation, its own slow climb back to consistency. The promised speed advantage evaporates in the cleanup.
Carrier inverts that pattern. Its construct vocabulary is small. Its rules are tight. Once a business domain is captured — entities, contracts, roles, tenants, policies, workflows — an agent can generate Carrier source that compiles to the same shape, the same OpenAPI, the same migrations, the same manifest, every time. No wandering. No invention. No quiet drift. The compiler keeps the agent honest, and the architect inherits a system that looks the way it was meant to look.
This book is for the architect who has felt the gap between the system they designed and the system that got built — and who suspects that closing that gap is the central problem of enterprise software in the next decade. Carrier is one answer. It will not be the only one. But it is what a domain-native, compiler-assisted, automation-ready platform actually looks like, today, in source you can read and run.
Appendices give you a one-page construct selection guide, layouts, checklists, and a glossary you can lift straight into your team's playbook.
Wherever possible, code samples in this book are taken verbatim from working Carrier projects in the reference repository — including a booking service, an inventory-control service, FHIR instruments, and a hello-carrier starter — rather than invented for the page.