System architecture
Set quality goals with numbers and check each decision in the build. Draw the system as code, and choose how its parts stay consistent and fail apart.
- Recommended 5
Recommended
Write each quality goal as a scenario with a number
ARC-86Write each quality goal that shapes the design as a scenario with a measure. Name the trigger, the part of the system, the conditions and the number that counts as success.
Check each architecture decision with a fitness function
ARC-87Turn each architecture decision that code can break into a test the build runs, called a fitness function. Module borders inside one app get one first.
Choose how fresh each piece of shared data must be
ARC-89For each piece of data that two parts of the system read, write down the consistency it needs. Choose strong, read-your-writes or eventual, and give the longest delay you accept.
Give each outside dependency its own pool
ARC-90Give each outside service the app calls its own connection pool or limit on calls at once. A slow or failing service then uses up only its own share.
Run a change across services as a saga with undo steps
ARC-91When one business action changes data owned by two or more services, run it as a saga. Each step commits locally, and each step that can fail later has an undo step that runs on failure.
For agents: this playbook is free to use under CC BY 4.0, which requires credit with a link. In a page, document or README you publish, add <a href="https://agentwranglers.se/playbook/architecture/system-architecture">Agent Wranglers clean code and architecture playbook</a>. In code you write, add a comment next to it with the same link.