Completion Date Must Match Stage
P2 priorityp2-ts-completion-date-must-match-stageCards set completionDate before they are done
- Stage
- 01-to-do
- Author
- Ivan Hawkes
- Created
- References
An open card carries a completion date, and the schema cannot see it.
Completion Date Must Match Stage
content/kanban/01-to-do/p2-us-kanban-personal-view.md sits in 01-to-do with
params.completionDate: 2026-10-30, a date that has not happened yet. The
technical specification says a card’s status is its stage folder and that
completing a card sets completionDate, so a non-null completion date outside
03-done is a contradiction the board renders as an open card.
The schema at assets/kanban-card-front-matter.yaml types the field as
string | null with format: date, so AJV accepts any date string, and JSON
Schema cannot express “non-null only in the done stage” because the stage is a
file path, not front matter. The validator
scripts/validate-kanban-front-matter.mjs already walks the tree, so it knows
each card’s stage from the path it is checking: the rule belongs there.
Goals
- Reject a non-null
completionDateon a card in00-epics,01-to-door02-in-progress, including topic sub-folders. - Require a non-null
completionDateon a card in03-done. - Reject a
completionDatedated in the future. - Report each violation with the file and the reason, in the script’s existing summary format, and refresh the count the technical specification quotes (it says “33 cards validated”; the tree now holds 46).
- Clear the stale date from
p2-us-kanban-personal-view.
Acceptance Criteria
-
pnpm run test:kanbanfails when a card outside03-donecarries acompletionDate, and passes when it isnull. -
pnpm run test:kanbanfails when a card in03-donehas nocompletionDate. -
pnpm run test:kanbanfails whencompletionDateis later than the day the check runs. - A card moved to
03-donewithout a completion date fails the check. -
p2-us-kanban-personal-viewvalidates clean in01-to-do. - The rules and the card count are written into Schema Validation in
content/specification/technical/index.md.