Annotation Primitives
Annotation primitives are the atomic units from which AXAG semantic contracts are composed. Every annotation consists of one or more primitives attached to an HTML element.
Primitive Categories
1. Identity Primitives
Declare what the operation is:
axag-intent— The semantic purposeaxag-entity— The domain objectaxag-action-type— The operation classification
2. Interface Primitives
Declare what the operation requires:
axag-required-parameters— Mandatory inputsaxag-optional-parameters— Optional inputs- Parameter detail attributes on input elements
3. State Primitives
Declare preconditions and postconditions:
axag-preconditions— Required state before executionaxag-postconditions— Guaranteed state after executionaxag-side-effects— Observable changes
4. Safety Primitives
Declare risk and authorization:
axag-risk-level— Danger classificationaxag-confirmation-required— Confirmation gateaxag-approval-required— Approval gateaxag-idempotent— Retry safety
5. Context Primitives
Declare operational boundaries:
axag-scope— Boundary levelaxag-required-roles— Role constraintsaxag-tenant-context— Tenant isolation
Composition Rules
Primitives compose according to these rules:
- Identity is mandatory — Every annotated element MUST have at least
axag-intent,axag-entity, andaxag-action-type - Safety follows action type — Mutating actions SHOULD declare risk level
- Context is inheritable — Child elements inherit parent context primitives
- Parameters are element-scoped — Parameter detail attributes attach to input elements