Skip to content

fix(pipeline): keep the plan number in a completed plan's filename - #7

Open
prorochestvo wants to merge 1 commit into
mainfrom
fix/complete-plan-keeps-the-plan-number
Open

fix(pipeline): keep the plan number in a completed plan's filename#7
prorochestvo wants to merge 1 commit into
mainfrom
fix/complete-plan-keeps-the-plan-number

Conversation

@prorochestvo

Copy link
Copy Markdown
Owner

The NNNN field in plans/completed/YYMMDD.NNNN.slug.md was 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.NNNN prefix — 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

  • A collision guard on the destination path, which the counter should always
    have had.
  • A step to re-point citations after the move.
  • A note that whatever a plan leaves behind is written into the plan before
    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 the
collision guard regardless.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XbFNCpaG9aoVaooPvjHKxv

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant