Validation Rules¶
The ABC Validation Rules define the mechanical checks required to verify that an ABC architecture conforms to the ABC Schema and the normative rules of the specification. These rules are intended for:
automated validators
linters
compilers
agent‑driven code generation
CI/CD enforcement
Validation Rules are not conceptual rules; they are operational constraints that ensure an ABC description is structurally correct and unambiguous.
Validation Rules follow the canonical identifier format:
ABC-VALID-R#
They are grouped into:
Structural Validation
Contract Validation
Data‑Flow Validation
Hierarchy Validation
Profile‑Specific Validation (optional)
Structural Validation Rules¶
These rules ensure the ABC hierarchy is well‑formed.
ABC-VALID-R1 (MUST)¶
Every construct MUST have exactly one parent, except the ApplicationStack which MUST have none.
ABC-VALID-R2 (MUST)¶
The hierarchy MUST follow the pattern:
ApplicationStack → LogicalUnit → ResourceGroup.
ABC-VALID-R3 (MUST)¶
Construct trees MUST NOT contain cycles.
ABC-VALID-R4 (MUST)¶
Construct IDs MUST be unique within the architecture.
ABC-VALID-R5 (MUST)¶
Construct types MUST be one of: ApplicationStack, LogicalUnit, ResourceGroup.
ABC-VALID-R6 (MUST)¶
ResourceGroups MUST NOT have children.
ABC-VALID-R7 (MUST)¶
LogicalUnits MUST NOT have parents that are not ApplicationStacks.
ABC-VALID-R8 (MUST)¶
ResourceGroups MUST NOT have parents that are not LogicalUnits.
Contract Validation Rules¶
These rules ensure Input/Output Contracts are well‑defined and consistent.
ABC-VALID-R10 (MUST)¶
Every construct MUST define both an InputContract and an OutputContract.
ABC-VALID-R11 (MUST)¶
InputContracts MUST be immutable after instantiation.
ABC-VALID-R12 (MUST)¶
Constructs MUST NOT reference values not present in their InputContract.
ABC-VALID-R13 (MUST)¶
Constructs MUST NOT expose outputs not declared in their OutputContract.
ABC-VALID-R14 (SHOULD)¶
OutputContracts SHOULD be minimal and stable across versions.
ABC-VALID-R15 (MUST)¶
InputContracts MUST NOT reference parent or sibling constructs directly.
ABC-VALID-R16 (MUST)¶
OutputContracts MUST NOT expose internal implementation details (e.g., resource objects).
Data‑Flow Validation Rules¶
These rules enforce Capturing Down and Bubbling Up.
ABC-VALID-R20 (MUST)¶
All downward references MUST originate from:
parent.InputContract
parent.OutputContract
ABC-VALID-R21 (MUST)¶
All upward references MUST originate from:
child.OutputContract
ABC-VALID-R22 (MUST)¶
No lateral data flow is permitted between siblings.
ABC-VALID-R23 (MUST)¶
Constructs MUST NOT read values from grandparents or ancestors except through parent‑mediated Capturing Down.
ABC-VALID-R24 (MUST)¶
Constructs MUST NOT write values to ancestors except through Bubbling Up.
ABC-VALID-R25 (MUST)¶
Constructs MUST NOT read or write values from siblings or cousins.
Instantiation Validation Rules¶
These rules ensure constructs are instantiated correctly.
ABC-VALID-R30 (MUST)¶
Constructs MUST be instantiated using the Instantiation Interface: (scope, id, inputs).
ABC-VALID-R31 (MUST)¶
Instantiation MUST NOT accept parameters outside the InputContract.
ABC-VALID-R32 (MUST)¶
Instantiation MUST NOT produce side effects beyond constructing children.
ABC-VALID-R33 (MUST)¶
Constructs MUST NOT mutate their InputContract after instantiation.