Skip to content

docs: refresh CLAUDE.md to match current state#96

Merged
dipto0321 merged 1 commit into
mainfrom
fix/docs/claude-md-stale
Jul 3, 2026
Merged

docs: refresh CLAUDE.md to match current state#96
dipto0321 merged 1 commit into
mainfrom
fix/docs/claude-md-stale

Conversation

@dipto0321

Copy link
Copy Markdown
Owner

Summary

Three docs-only fixes to CLAUDE.md that have drifted out of sync with the actual code and with README.md / CHANGELOG.md:

  1. "Known bugs (do not re-introduce)" entry described an already-fixed bug. It said ManifestVersion.LTS is typed bool with a useless TS string \json:"ts"`fallback. The actual code atinternal/node/dist.go:25-62already usesLTSCodename *stringwith a customUnmarshalJSONthat correctly handles the nodejs.orgltsJSON union — matchingCHANGELOG.md`'s Unreleased section which documents this exact fix as already shipped. As written, this section could mislead a future contributor (or AI assistant) into "fixing" something that isn't broken, or cause confusion hunting for a bug that no longer exists.

  2. Phase-status table is stale. It listed Phase 5 (Config subsystem) and Phase 6 (Cross-platform polish) as "Not started." Both are fully implemented per CHANGELOG.md's Unreleased section (YAML config + subcommands; QuotePath; interrupted-upgrade sentinel; system-node classifier) and per README.md's own Project-status table, which marks Phases 1-6 done. Updated Phases 4-6 to "Done" and Phase 7 to "In progress" (GoReleaser / brew / scoop / npm distribution work tracked by chore(release): finalize GoReleaser config and npm wrapper #17 / chore(release): prepare v1.0.0 release #18 is genuinely outstanding).

  3. Architecture table is wrong about internal/packages/restore.go. It documented a file restore.go with Restore(ctx, managerName, version). No such file exists — Restore (and an additional RestoreFromSnapshot(ctx, path)) both live in snapshot.go. Updated the architecture diagram to point at the actual file and to document both functions.

Bonus: the dependencies line listed gjson and yaml.v3 as "planned but not yet in go.mod" — yaml.v3 is in go.mod (used by the config subsystem), gjson was never added. Removed gjson from the planned list and moved yaml.v3 to the core deps line.

Linked issues

Closes #54

Type of change

  • docs — documentation only
  • feat — new feature (MINOR bump)
  • fix — bug fix (PATCH bump)
  • refactor — no behavior change
  • perf — performance improvement
  • test — tests only
  • chore — maintenance / dependency bump
  • ci — CI/CD only
  • build — build system only
  • Breaking change (MAJOR bump) — explain below

Checklist

  • Title follows Conventional Commits (feat(scope): subject)
  • I ran make ci locally and it passes (Go-side tidy/fmt/vet/lint/test all green; the change is to a Markdown doc only and doesn't affect the Go pipeline)
  • I added or updated tests for the change (no test added — docs-only change; the "test" is whether the doc now matches reality, which is what git blame and the internal/node/dist.go reference verify)
  • I updated relevant docs (this PR is the doc update; CHANGELOG.md gets a ### Fixed entry under [Unreleased])
  • No new linter warnings (make lint green)
  • If breaking: I documented the migration path in the PR body and updated CHANGELOG.md

Screenshots / output

Pre-fix, the "Known bugs (do not re-introduce)" section was actively misleading:

## Known bugs (do not re-introduce)

`ManifestVersion.LTS` in `internal/node/dist.go:22` is typed `bool`,
but the nodejs.org API returns a union: `false` for Current
releases and a string codename (e.g. `"Iron"`) for LTS releases.
The fallback `TS string \`json:"ts"\`` on line 23 does not help
because the real JSON key is `lts`, not `ts`. Fix requires a
custom `UnmarshalJSON` or `json.RawMessage` on the `LTS` field.
This is a latent bug activated by `upgrade.go` calling
`FetchManifest()`. Tracked in PR #20 review.

Pre-fix, the phase-status table was 3 phases behind reality:

| 4 — Upgrade command + UI | In progress | `feat/upgrade/end-to-end` / PR #20 |
| 5 — Config subsystem | Not started | — |
| 6 — Cross-platform polish | Not started | — |
| 7 — Distribution packaging | Not started | — |
| 8 — v1.0.0 release | Not started | — |

Post-fix:

| 4 — Upgrade command + UI | Done | merged |
| 5 — Config subsystem | Done | merged |
| 6 — Cross-platform polish | Done | merged (interrupted-upgrade sentinel, `QuotePath`, system-node classifier) |
| 7 — Distribution packaging | In progress | partial — post-upgrade cleanup prompt merged; GoReleaser/brew/scoop/npm tracked by #17 / #18 |
| 8 — v1.0.0 release | In progress | blocked on Phase 7 distribution (#17 / #18) |

Pre-fix, the architecture diagram pointed at a non-existent file:

internal/packages/         npm global snapshot / restore / migrate (merged in PR #19)
  snapshot.go              Snapshot(ctx, managerName, version) → ~/.../snapshots/<mgr>-<ver>.json
  restore.go               Restore(ctx, managerName, version)

Post-fix:

internal/packages/         npm global snapshot / restore / migrate (merged in PR #19)
  snapshot.go              Snapshot(ctx, managerName, version) → ~/.../snapshots/<mgr>-<ver>.json
                          Restore(ctx, managerName, version)
                          RestoreFromSnapshot(ctx, path)

Files touched

  • CLAUDE.md
    • Replaces the stale "Known bugs (do not re-introduce)" entry with a description of the fixed LTSCodename *string shape, so a future reader knows not to "fix" it back to a plain bool.
    • Updates the phase-status table: Phases 4-6 to "Done", Phase 7 to "In progress" (with a pointer at the unfinished distribution work), Phase 8 to "In progress" (blocked on chore(release): finalize GoReleaser config and npm wrapper #17 / chore(release): prepare v1.0.0 release #18).
    • Updates the architecture diagram's internal/packages/ entry: drops the non-existent restore.go, points at snapshot.go instead, and adds RestoreFromSnapshot (which the previous diagram didn't mention).
    • Updates the dependencies line: yaml.v3 is now a core runtime dep (it's in go.mod); gjson is removed from the "planned" list (it was never added).
  • CHANGELOG.md### Fixed entry under [Unreleased] documenting the doc refresh with docs: CLAUDE.md known-bugs section and phase-status table are stale #54 reference.

Three concrete inaccuracies and one bonus cleanup in CLAUDE.md:

- Known-bugs entry described an already-fixed bug (LTSCodename *string
  with custom UnmarshalJSON, shipped per CHANGELOG.md Unreleased).
  Reworded to describe the FIXED shape and warn against "fixing" it
  back to a plain bool.
- Phase-status table listed Phases 5-6 as Not started; both are
  merged. Updated Phases 4-6 to Done, Phase 7 to In progress, Phase 8
  to In progress (blocked on #17/#18).
- Architecture diagram pointed at a non-existent restore.go; both
  Restore and RestoreFromSnapshot live in snapshot.go. Replaced.
- Bonus: yaml.v3 is in go.mod (core dep); gjson was never added —
  removed from the planned list.

CHANGELOG entry added under [Unreleased] / ### Fixed.

Closes #54
@cocogitto-bot

cocogitto-bot Bot commented Jul 3, 2026

Copy link
Copy Markdown

✔️ f4cb2c9 - Conventional commits check succeeded.

@dipto0321 dipto0321 merged commit 9617a6c into main Jul 3, 2026
10 checks passed
@dipto0321 dipto0321 deleted the fix/docs/claude-md-stale branch July 3, 2026 06:16
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.

docs: CLAUDE.md known-bugs section and phase-status table are stale

1 participant