WORK-127
ID:WORK-127Status:donePriority:highComplexity:simpleSource:SPEC-037

Fix plan schema bugs: pending status, severity mismatch, tag filtering

Four small bugs identified in the SPEC-037 audit that need immediate fixes.

Acceptance Criteria

  • pending added to work schema status enum in runes/plan/src/tags/work.ts
  • Severity enum aligned: both bug.ts and validate.ts use cosmetic (not trivial)
  • validate checks complexity values against the valid set (trivial, simple, moderate, complex, unknown)
  • Tag filtering splits on comma, trims whitespace, and matches terms exactly
  • Tests cover all four fixes

References

Resolution

Completed: 2026-04-12

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

What was done

  • Added pending to work.ts statusValues and update.ts VALID_STATUS
  • Changed validate.ts VALID_SEVERITIES from trivial to cosmetic
  • Added VALID_COMPLEXITIES set and complexity check in checkInvalidAttributes()
  • Tag filtering was already correct (exact match via split+includes)
  • Added 4 new tests: cosmetic severity, invalid complexity, valid complexity, pending status

History

  1. a295513
    statusin-progressdone
    • ☑ `pending` added to work schema status enum in `runes/plan/src/tags/work.ts`
    • ☑ Severity enum aligned: both `bug.ts` and `validate.ts` use `cosmetic` (not `trivial`)
    • ☑ `validate` checks complexity values against the valid set (`trivial`, `simple`, `moderate`, `complex`, `unknown`)
    • +2 more criteria
  2. 59ded4a
    statusreadyin-progress
  3. 1676387
    Created (ready, high, simple, SPEC-037, plan, cli, validation)