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, andValidates).
Structs§
Enums§
- Validation
Error - 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
directionis not set withoutlink_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 ofValidationErrorif 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§
- Validation
Result - Result type alias for validation.