WORK-128
ID:WORK-128Status:done

Add source, milestone, and complexity validation to plan validate

The validate command has blind spots: source attribute references to non-existent specs/decisions go undetected, milestone references to non-existent milestones pass silently, and complexity values aren't checked at all. These gaps let broken references and invalid data persist.

Priority:highComplexity:simpleSource:SPEC-037
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 2
  1. a295513
    Content editedby Claude
    Mark all SPEC-037 work items done with acceptance criteria and resolutio
  2. 1676387
    Created (done)by Claude
    Accept SPEC-037 and break into work items; fix plan validation issues

Acceptance Criteria

  • validate resolves each comma-separated ID in source against the entity index and reports broken references as errors
  • validate checks that milestone values match an existing milestone entity
  • validate checks complexity values against the valid set (trivial, simple, moderate, complex, unknown)
  • Broken source references report the referencing entity ID and the missing target ID
  • Tests for source validation, milestone validation, and complexity validation

Dependencies

  • WORK-127 — schema bug fixes should land first (especially the severity/complexity alignment)

References

  • SPEC-037 — Plan Package Hardening (Part 2: Validation Gaps)

Resolution

Completed: 2026-04-12

Branch: claude/spec-037-breakdown-docs-Whj40

What was done

  • Added checkSourceRefs(): validates comma-separated source IDs against entity index
  • Added checkMilestoneRefs(): validates milestone values against existing milestones
  • Complexity validation already handled by WORK-127
  • 5 new tests for source/milestone validation