Debugging Failures
This guide helps you interpret SpecLeft failures and fix them quickly.
1. Planning failures (specleft plan)
Section titled “1. Planning failures (specleft plan)”Common cause: missing prd.md in the repository root.
Fix:
# Create prd.md and try againspecleft plan --dry-run2. Validation errors (specleft features validate)
Section titled “2. Validation errors (specleft features validate)”Common causes:
- Missing required frontmatter fields
- Duplicate IDs
- Invalid ID format (must match
^[a-z0-9-]+$)
Fix workflow:
specleft features validate --format jsonThen open the referenced file and fix the field or ID.
3. Enforcement failures (specleft enforce)
Section titled “3. Enforcement failures (specleft enforce)”Enforcement fails when required intent is missing or coverage is below threshold.
Fix workflow:
specleft statusspecleft coverageFocus on the missing scenarios and implement the highest priority first.
4. CI log readability
Section titled “4. CI log readability”Use JSON output in CI for predictable parsing:
specleft enforce --format json5. Common quick checks
Section titled “5. Common quick checks”specleft doctorspecleft features listspecleft next --priority high