fix(pipeline): keep the plan number in a completed plan's filename - #7
Open
prorochestvo wants to merge 1 commit into
Open
fix(pipeline): keep the plan number in a completed plan's filename#7prorochestvo wants to merge 1 commit into
prorochestvo wants to merge 1 commit into
Conversation
The NNNN field was a per-day counter, which destroyed the only identifier a plan is cited by. After a move, nothing in the filename said which plan the file had been, so every reference to it by number — from a README index, a decision record, or another plan's dependency graph — resolved to nothing, and a project that checks for dangling plan references failed the moment a plan completed. The counter was also not an ordinal in practice. Across the projects using it, seven pairs of completed files share a YYMMDD.NNNN prefix: step 4's scan is easy to skip and nothing downstream noticed. A plan number is unique per repository by construction, needs no scan, and is the string a reader already has. Filenames written under the old rule are left as they are. Renaming history to match a new rule breaks the links that already point at it, and the rule earns its keep on the plans still to come. Also adds a collision guard the counter should always have had, a step to re-point citations after the move, and a note that whatever a plan leaves behind is written into it before this skill runs rather than during the move. What would reverse this: a project that numbers plans non-uniquely, or one that reuses numbers across a plans/history/ archive. Neither exists today. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01XbFNCpaG9aoVaooPvjHKxv
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
NNNNfield inplans/completed/YYMMDD.NNNN.slug.mdwas a per-day counter.It is now the plan's own number.
Why
The counter destroyed the only identifier a plan is cited by. After a move,
nothing in the filename said which plan the file had been, so every reference to
it by number — from a README index, a decision record, or another plan's
dependency graph — resolved to nothing. A project that checks for dangling plan
references fails the moment a plan completes, which is how this was found.
It was also not an ordinal in practice. Across the projects using it, seven
pairs of completed files share a
YYMMDD.NNNNprefix — five in one repository,two in another. Step 4's scan is easy to skip and nothing downstream noticed.
A plan number is unique per repository by construction, needs no scan, and is
the string a reader already has in hand.
What else changed
have had.
this skill runs, not during the move.
What is not changed
Filenames written under the old rule stay as they are. Renaming history to match
a new rule breaks the links that already point at it, and the rule earns its
keep on the plans still to come.
What would reverse this
A project that numbers plans non-uniquely, or one that reuses numbers across a
plans/history/archive. Neither exists today, and either would need thecollision guard regardless.
🤖 Generated with Claude Code
https://claude.ai/code/session_01XbFNCpaG9aoVaooPvjHKxv