| name | codd-validate |
| description | Validate CoDD frontmatter and dependency references before scan, impact, generation, or propagation work continues. Use when the user needs to confirm YAML frontmatter, required metadata, dependency references, and graph inputs are parseable and internally consistent.
|
CoDD Validate
Validate CoDD frontmatter and dependency references before impact analysis so broken metadata does not poison the graph or downstream change-propagation work.
Usage
Run this skill after codd scan --path ., after editing requirement or design documents, or any time you suspect frontmatter or dependency references may be inconsistent.
Instructions
-
Preflight:
- Work from the project root.
- Verify
codd/codd.yaml exists. If not, run codd init first.
- If the
codd command is not available, install the package so the CLI entry point is on PATH before continuing.
-
Run validation:
codd validate --path .
-
Interpret the result:
- PASS: Treat
OK: validated ... output as a pass. Frontmatter is structurally valid enough to proceed, and dependency references are consistent enough for the next step. After a clean pass, codd impact is safe to run.
- ERROR: Stop and fix the reported documents before continuing. Use the categories below to decide the repair.
- BLOCKED or WARNING: Read the message, fix what is actionable, and re-run validation until the remaining output is understood.
-
ERROR triage by category:
missing_field: Required frontmatter data is missing or malformed. Open the affected design document and add or repair the needed fields, especially node_id, title, and depends_on when the design requires declared upstream dependencies. In current validator output, this often appears as missing or invalid frontmatter rather than a literal missing_field code.
invalid_reference: A document references a node_id that does not exist or is misspelled. Correct the typo or point the reference at the real upstream node. In current validator output, this usually shows up as undefined-reference messages such as dangling depends_on or depended_by.
circular_dependency: Two or more documents depend on each other in a loop. Revisit depends_on, remove the back-edge, and restore a one-way dependency order.
-
Fix broken frontmatter step by step:
- Open the document named in the validation error.
- Inspect the YAML frontmatter at the top of the file, bounded by
---.
- Confirm the required fields are present and valid:
node_id, title, and depends_on where applicable.
- Save the correction.
- Re-run
codd validate --path . and confirm the error is gone.
-
Recommended scan -> validate flow:
codd scan --path .
codd validate --path .
codd validate --path .
-
Troubleshooting:
Error: codd/ not found. Run 'codd init' first.: Initialize the project before validating.
command not found: codd: Install the package or activate the environment that exposes the codd console script.
invalid_frontmatter: Fix YAML syntax first. Common causes are missing : separators, bad indentation, or an unclosed list entry.
missing_frontmatter or missing_field: Add the missing CoDD frontmatter block and required fields, then validate again.
dangling_depends_on or dangling_depended_by: Treat these as invalid_reference problems and repair the referenced node_id.
- Repeated
circular_dependency errors: Draw the dependency chain on paper, decide which document is the real upstream source of truth, and remove the reverse dependency.
-
Exit condition:
- Do not move on to
codd impact until validation is clean or the remaining warnings are explicitly understood and accepted.