liveBook · Manning

Architectural rule

As explained in Vibe Engineering

An architectural rule is a constraint governing the allowed structure, dependencies, or interaction patterns of a software system.

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

How Vibe Engineering covers it

How deep it goes
Explains executable lint checks and an incident-to-rule process, without detailing check implementation.
Examples
Shows direct database calls from API layers and direct HTTP calls between services as violations to prevent.
What you can do after
Apply it via lint rules by converting recurring architectural violations into build-failing checks.
How it connects
Connects architectural rules to monorepos, dependency graphs, linting, and message queues.

Also explained in

Compare how 2 books explain architectural rule →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Vibe Engineering. The section links point to the parts of the book it draws on.