Skip to main content

axag validate

Validate existing AXAG annotations in your source files against the AXAG specification.

Usage

axag validate [target] [options]

Examples

# Validate current directory
axag validate

# Validate specific directory
axag validate ./src

# Validate at AA conformance level
axag validate --level AA

# Strict mode — fail on warnings too
axag validate --strict

Options

FlagDefaultDescription
--level <level>AConformance level: A (basic), AA (intermediate), AAA (full)
--strictfalseTreat warnings as errors
--format <format>textOutput format: text, json

Conformance Levels

LevelNameChecks
ABasicRequired attributes present (axag-intent, axag-action-type)
AAIntermediate+ entity, risk-level, description, idempotency
AAAFull+ parameters, preconditions, confirmation gates, tenant boundaries

Exit Codes

CodeMeaning
0All validations passed
1Validation errors found
2Validation warnings found (strict mode only)

Example Output

✓  button#submit     — A: pass, AA: pass
✗ button#delete-all — AA: missing axag-risk-level (expected "high" or "critical")
⚠ a#nav-home — AA: missing axag-description

Results: 18 passed, 2 errors, 1 warning
Conformance: AA — FAIL

CI Usage

See CI Integration for using axag validate in GitHub Actions.