Architectural rule
An architectural rule is a constraint or guiding requirement governing the permitted structure, dependencies, or interactions of a software system.
Clean Applications with Hexagonal Architecture
An architectural rule is a constraint that specifies an allowed or required structural property of a software system.
- How it is used
- Enforces structural constraints that module dependencies and the compiler do not fully express.
- How deep it goes
- Checks compiled-class dependencies, annotations, naming, structural shape, and project-specific method access.
- Examples
- Checks handler dependencies, annotation placement, naming conventions, and calls to domain reconstitution methods.
- What you can do after
- Apply them via ArchUnit tests that fail the build when code violates declared boundaries.
Read how Clean Applications with Hexagonal Architecture explains architectural rule →
Vibe Engineering
An architectural rule is a constraint governing the allowed structure, dependencies, or interaction patterns of a software system.
- How it is used
- Uses architectural rules to make repository conventions clear and enforceable for agents and teams.
- 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.
Also covered in
- Build High Value Software SystemsIn early access (MEAP)
- Grokking Software ArchitectureIn early access (MEAP)
- Machines that ThinkIn early access (MEAP)
- Microservices Patterns, Second EditionIn early access (MEAP)
- Decision EngineeringIn early access (MEAP)
What to know first
- layered architectureLayered architecture is a software organization pattern that separates responsibilities into ordered layers with defined roles and constrained dependencies, typically from higher-level layers to lower-level ones.
Related concepts
- modulecontrasts with · A module is a cohesive unit of code or computation that groups related functionality within a larger system and defines a scope or boundary for organizing or sharing it.
- ArchUnituses · ArchUnit is a Java library for expressing, testing, and enforcing architectural rules and constraints in code.
- deployment pipelinepart of · A deployment pipeline is a repeatable sequence of stages that builds, tests or validates, packages, and delivers software changes toward release or deployment.
- contextproduces · Context is the relevant information, state, or circumstances surrounding an input, decision, or activity that influence its interpretation or behavior.
- sandboxinguses · Sandboxing is the isolation of software execution in a restricted environment that limits access to resources and effects on surrounding systems.
Questions about architectural rule
What is architectural rule?
An architectural rule is a constraint or guiding requirement governing the permitted structure, dependencies, or interactions of a software system.
Which Manning books explain architectural rule?
Clean Applications with Hexagonal Architecture and Vibe Engineering.
What should I know before learning architectural rule?
Manning books that teach architectural rule usually introduce layered architecture first.
What is the difference between architectural rule and module?
An architectural rule is a constraint or guiding requirement governing the permitted structure, dependencies, or interactions of a software system. A module is a cohesive unit of code or computation that groups related functionality within a larger system and defines a scope or boundary for organizing or sharing it.
What is architectural rule part of?
Architectural rule is part of deployment pipeline. A deployment pipeline is a repeatable sequence of stages that builds, tests or validates, packages, and delivers software changes toward release or deployment.
What is architectural rule also called?
Architectural rule is also called architectural constraint.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.

