Usage
Arguments
| Argument | Description | Default |
|---|---|---|
paths | Files or globs containing devgraph-* blocks | **/*.md |
Options
| Option | Description | Default |
|---|---|---|
--json | Output validation result as JSON | - |
--config <path> | Path to config file | .devgraph/config.yaml |
--report <path> | Write JSON report to file | - |
Description
Validatesdevgraph-* blocks without generating build outputs. Validation focuses on the authoritative service layer that feeds the hybrid graph.
Runs three types of validation:
- Schema validation: YAML syntax, required fields, valid references
- Consistency checks: Missing dependencies, duplicates, orphans, cycles
- Architecture rules: Custom rules defined in your config file
Examples
Validate a docs tree:Exit Codes
| Code | Description |
|---|---|
0 | All blocks valid |
1 | Validation errors found |
2 | Tooling error (config not found, etc.) |
What it validates
Schema Validation
- YAML syntax in all
devgraph-*blocks - Required fields (
name,typefor services) - Service references in
devgraph-apianddevgraph-envblocks - Line numbers included in error messages for easier debugging
Consistency Checks
- Missing dependencies: Services reference non-existent dependencies
- Duplicate services: Multiple blocks define the same service name
- Orphan blocks: API/env blocks reference non-existent services
- Dependency cycles: Circular dependency detection
Architecture Rules
Define rules in.devgraph/config.yaml: