BUG-041
ID:BUG-041Status:fixed

plan create milestone names the file after the title, not the version

Milestones keep their semver name as the filename (v1.0.0.md). CLAUDE.md states the convention, and so does the comment above the line in runCreate that breaks it (plugins/plan/src/commands/create.ts):

Severity:minorMilestone:v0.41.1

Criteria completion

Criteria completion: 5 of 5 (100%) checked; tracking started on Oct 16, no incremental history yet0%25%50%75%100%Oct 16Oct 28

Tracking started Oct 16 — check back for trends.

Steps to Reproduce

  1. refrakt plan create milestone --id v9.9.9 --title "Something to ship"

Expected

plan/milestones/v9.9.9.md.

Actual

plan/milestones/something-to-ship.md, containing {% milestone name="v9.9.9" … %}.

Environment

  • @refrakt-md/plan at the current main.

Acceptance Criteria

  • plan create milestone --id <name> writes milestones/<name>.md, whatever the title
  • Two milestones with different names and the same title both create, and the test that expected them to collide is replaced by one that expects two files
  • Creating a milestone whose name already exists still fails with the duplicate-ID error
  • plan migrate filenames renames a milestone whose filename is not <name>.md, and still never touches one that already is
  • Docs that describe milestone filenames match the behaviour

References

  • The 17 renames: commit "plan: rename slug-named milestone files to their semver names" on claude/site-changelog-readability-k4p902.

Resolution

Completed: 2026-10-15

Branch: claude/site-changelog-readability-k4p902 PR: refrakt-md/refrakt#704

What was done

  • create.ts: a milestone is written as <name>.md.
  • migrate.ts: migrate filenames renames a milestone whose filename is not <name>.md (a missing name is reported); skipped.milestones removed from the result and CLI output.
  • Tests: four that pinned the slug filename (create x2, plan init, create-refrakt scaffold) now assert the version filename; new tests for rename and missing name.
  • plan-cli docs and CLAUDE.md describe milestone renames; patch changeset.

Notes

  • A dry run over this repository plans nothing: all 941 files, milestones included, are already correctly named.