Architectural rules constrain how parts of a system may depend on or communicate with one another. They work as guardrails only when they are explicit and enforceable: agents cannot rely on conventions learned through onboarding or code review. section 10.1.1 section 10.5.1
Make the constraints operational:
- Centralize shared conventions in root guidance and lint configuration; keep domain-specific rules close to the relevant package. section 10.1.1
- Encode important constraints as checks that fail the build, rather than relying on documentation alone. section 10.5.1
- Keep the dependency graph queryable so changes can be checked against their downstream effects. section 10.1.1
Turn violations into guardrails
If an API layer makes a direct database call, fix the incident first. When the violation recurs, add a lint rule or architectural check; do not wait for a third occurrence. section 10.5.1
Figure 10.6 Bug → Codify → Lint Rule.

Use the incident-to-rule sequence as a compact guide for turning architectural failures into automated checks. section 10.5.1

