WORK-033
ID:WORK-033Status:done

plan validate Command

Priority:mediumComplexity:moderateSource:SPEC-022
changeset-release/main View source

Criteria completion

No incremental history — criteria tracking started on Apr 19.

Branches 2
changeset-release/main current done
main doneclaude/file-naming-convention-LJdwR done
History 5
  1. f2b3512
    Content editedby Claude
    Add {ID}-{slug}.md filename convention + migrate filenames subcommand
  2. f262d7b
    Content editedby Claude
    Backfill source attributes on all 123 work items
  3. d9a8fae
    Content editedby Claude
    Implement `plan validate` command (WORK-033)
  4. ebe0c64
    Content editedby Claude
    Migrate plan files to {% ref %} xref syntax (WORK-021)
  5. 30b2ae0
    Created (done)by Claude
    Add 9 work items for SPEC-022 (Plan CLI) implementation

Summary

Structural validation for plan files with CI-friendly exit codes. Checks for broken references, duplicate IDs, invalid attribute values, circular dependencies, and consistency issues. Add npx refrakt plan validate --strict to CI in one line.

Acceptance Criteria

  • Detects broken ref/xref links — entity ID not found (error)
  • Detects duplicate IDs across all plan files (error)
  • Detects invalid status, priority, and severity values (error)
  • Detects circular dependencies (error)
  • Detects orphaned work items with no milestone assigned (warning)
  • Detects completed milestones with open work items (warning)
  • --strict promotes warnings to errors
  • Exit codes: 0 = clean, 1 = errors found, 2 = bad arguments
  • --format json for programmatic consumption
  • Tests for each check type

Dependencies

  • WORK-027 (plugin architecture)
  • WORK-028 (plan file scanner)

References

  • SPEC-022 (Plan CLI)