Skip to content

Debugging Failures

This guide helps you interpret SpecLeft failures and fix them quickly.

Common cause: missing prd.md in the repository root.

Fix:

Terminal window
# Create prd.md and try again
specleft plan --dry-run

2. 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:

Terminal window
specleft features validate --format json

Then 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:

Terminal window
specleft status
specleft coverage

Focus on the missing scenarios and implement the highest priority first.

Use JSON output in CI for predictable parsing:

Terminal window
specleft enforce --format json
Terminal window
specleft doctor
specleft features list
specleft next --priority high