Skip to main content

Crate agileplus_trace_validator

Crate agileplus_trace_validator 

Source
Expand description

AgilePlus trace validator: structural and semantic checks for intent graphs.

Public entry point is validate_intent_graph, which composes the individual validator functions across the rule categories. Each category lives in its own submodule:

  • [metadata]: graph-metadata field validation
  • [nodes]: node completeness + ID format
  • [edges]: ontology-driven edge constraints
  • [dag]: acyclicity + DAG flow rules
  • [canonical]: canonical_map field checks
  • [ontology]: bundled ontology re-exports

The public API of the crate (validate_intent_graph, is_valid, first_error, validate_node_ids_only, ValidationError, ValidationResult) is preserved by re-exporting each category’s public functions from this module.

Re-exports§

pub use ontology_ext::extended_relationship_of;
pub use ontology_ext::validate_extended_edge;
pub use ontology_ext::validate_extended_edge_constraints;
pub use ontology_ext::EXTENDED_RELATIONSHIP_PROPERTY;

Modules§

ontology_ext
Validators for the three extended relationship types (DecomposesInto, Mitigates, and Validates).

Structs§

DagFlow
DagFlowStage
DagValidationRules
EdgeConstraint
EdgeConstraintEntry
EdgeConstraints
Ontology

Enums§

ValidationError
High-level validation error for intent graphs.

Functions§

first_error
Quick validation that returns only the first error, if any.
is_valid
Quick validation that returns a boolean. Suitable for backward-compatible use.
validate_canonical_map
Validate canonical_map fields on edges. Checks that direction is not set without link_type.
validate_dag_acyclicity
Ensure the graph contains no cycles using DFS-based cycle detection.
validate_dag_flow
Validate that the graph follows the canonical DAG flow rules. Root nodes must be Intent, leaf nodes should be Test or Artifact.
validate_edge_constraints
Validate each edge against the ontology edge constraints.
validate_intent_graph
Validate an entire intent graph. Returns Ok(()) if valid, or a list of ValidationError if issues found. Checks run in order: metadata -> nodes -> edges -> DAG -> flow -> canonical maps.
validate_metadata
Validate graph metadata fields (version, schema_uri, created_at, counts).
validate_node_completeness
Validate that every node has required fields, correct ID format, and valid status.
validate_node_ids_only
Validate only node IDs without full graph traversal. Fast check.

Type Aliases§

ValidationResult
Result type alias for validation.