fix: Consolidate-Tasks preserves dates and chronological order - #175
fix: Consolidate-Tasks preserves dates and chronological order#175MarkMichaelis wants to merge 1 commit into
Conversation
Get-FeatureSlug stripped the leading YYYY-MM-DD- prefix from every imported artifact, discarding the only ordering signal legacy design notes and PRDs carried. The date was recorded nowhere. - Preserve an embedded YYYY-MM-DD- prefix on the destination name. - Add -InsertDatePrefix (default on): for sources lacking an embedded date, synthesize a prefix from the most recent git commit date, falling back to the file's last-write time. - Add a Source Date column to tasks/MIGRATION.md; sort rows chronologically. - New helpers Get-DatePrefix, Get-GitDate, Get-SourceDate; tests for each plus integration coverage; update help and tasks/README.md. New agent-created PRDs/plans intentionally keep the bare <feature> slug so the @prd/@plan agents can resolve them by exact path. Closes #174 Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Decision: revive, but expect rework rather than a rebase. The bug is still live. $stem = $stem -replace "^\d{4}-\d{2}-\d{2}-", ""Nothing else records it, so the ordering signal is still being destroyed — the PR body's "seven dated design notes collapsed into undated slugs" remains reproducible. The friction is that the script was renamed ( Assessed alongside #250 (revive) and #161 (closed). Recorded here because the decision was made in a session that ended before acting on it. |
|
Flagging for closure — this PR cannot be rebased, because all three files it edits no longer exist:
Opened 2026-05-31; both structural changes landed after it. There is nothing to rebase onto. The issue it fixes, #174, may still be valid — Suggested: close this PR as superseded by the rename, leave #174 open, and re-confirm the bug reproduces against Tracked in #465. |
Summary
Consolidate-Tasks.ps1stripped the leadingYYYY-MM-DD-prefix from everyimported artifact via
Get-FeatureSlug, discarding the only chronologicalordering signal that legacy design notes / PRDs carried. The date was recorded
nowhere -- a real run collapsed seven dated design notes into undated slugs.
Changes
YYYY-MM-DD-prefix on the destination name so thetasks/listing sorts chronologically.-InsertDatePrefixswitch(default on): most-recent git commit date, falling back to the file's
last-write time. Pass
-InsertDatePrefix:$falseto opt out.tasks/MIGRATION.mdand sort rowschronologically.
Get-DatePrefix,Get-GitDate,Get-SourceDatewith unittasks/README.md.Scope decision (needs sign-off)
New
@prd/@planartifacts intentionally keep the bare<feature>slug(no date, no issue number in the filename) so the agents can resolve them by
exact path. Their ordering/identity lives in the branch (
feat/<issue#>-...),issue, and git history -- not the filename. Date-prefixing new files would
require switching the agents to glob lookups, a cross-cutting change to the
upstream naming convention affecting all consumers. Deliberately not done
here. See the open question below.
Open question
Should newly created PRDs/plans also carry a sortable prefix (date or issue
number) in the filename, accepting the agent-lookup change? Flagging for a human
decision rather than guessing.
Test
Closes #174