Skip to main content

Module validator

Module validator 

Source
Expand description

Validator: checks a parsed AST for AGM spec compliance.

Produces a DiagnosticCollection of errors and warnings covering file-level checks, node-level checks, reference resolution, cycle detection, field compatibility, code block validation, and more.

§Validation passes

  1. File-level (file): header required fields, at least one node.
  2. Node-level (node): ID pattern/uniqueness, summary, dates, status.
  3. Structural per-node (code, verify, context, orchestration, execution, memory): structured sub-field validation.
  4. Type schema (type_schema): per-type field schema enforcement.
  5. Cross-node (references, cycles, compatibility): reference resolution, cycle detection, conflict detection.
  6. Cross-package (imports): import resolution and cross-package refs. Only runs when ValidateOptions.import_resolver is Some.

Modules§

code
Code block validation (spec S23, S23.6).
compatibility
Conflict detection between active nodes (spec S11).
context
Agent context validation (spec S25).
cycles
Depends-chain cycle detection (spec S11).
execution
Execution state validation (spec S26).
file
File-level validation (spec S8, S9).
imports
Import validation (spec S10).
memory
Memory entry validation (spec S28).
node
Per-node structural validation (spec S11, S12).
orchestration
Orchestration node validation (spec S13.10, S27).
references
Reference resolution across relationship fields (spec S11).
type_schema
Type schema enforcement (spec S14).
verify
Verify entry validation (spec S24).

Structs§

ValidateOptions
Options controlling validation behavior.

Functions§

validate
Validates a parsed AGM file against all spec rules.