tld validate & check
View MarkdownTwo commands for quality assurance. validate checks your YAML. check goes further, it verifies symbols against source code and catches stale diagrams.
tld validate
Section titled “tld validate”Validates the structure of your workspace. Catches problems before you try to plan or apply.
tld validateWhat it catches
Section titled “What it catches”- Missing elements: A connector references an element that doesn’t exist
- Duplicate refs: Two elements with the same key
- Invalid types: An element kind that isn’t recognized
- Circular parent references: A diagram that’s its own ancestor
- Broken view references: Connectors pointing to views that don’t exist
Output
Section titled “Output”Everything good:
✓ Workspace valid: 42 elements, 12 diagrams, 35 connectorsProblems found:
✗ Validation errors: - element "payment-svc" not found (referenced by connector payment-svc:gateway:calls) - circular parent reference detected: api-gateway -> api-gateway
2 validation error(s)Architectural warnings
Section titled “Architectural warnings”After structural validation, tld validate also runs the same architectural analysis as tld plan:
## Architectural Warnings (Level 2: Standard)
[isolated-object] Isolated Object (1 violations)Consider removing or connecting these standalone objects. * cache-redis has no connectors in its view
[high-density] High Density (1 violations)Consider splitting this view or moving detail into child diagrams. * root has 17 elements (max recommended: 12)Strictness levels
Section titled “Strictness levels”# Standard (default)tld validate --strictness 2
# Minimal checkstld validate --strictness 1
# Strict , checks labels, descriptions, namingtld validate --strictness 3
# Verbose , show full violation detailstld validate --strictness 3 --verboseSymbol verification
Section titled “Symbol verification”tld validate also verifies that element refs match actual source paths (when has_source: true is set). It checks your exclude patterns, verifies git link URLs actually point to valid places, and makes sure your diagrams reference real code.
Use tld validate before tld plan or tld apply. Use tld check in CI or as a pre-commit hook.
Quick reference
Section titled “Quick reference”# Structural checktld validate
# Strict quality gatetld validate --strictness 3