Repository navigation
Description
Problem
Rename the rate-limit-guard plugin to rate-limits, completely. The new name says what the plugin reports: the account's rate-limit windows. "Guard" names one behavior.
When this is done:
- no current-state reference to the old name remains in this repository or its companion repositories;
- every lane runs
rate-limits@melodic-software; - the runtime directory
~/.claude/rate-limit-guard/and the MCP toolmcp__rate-limit-guard__statusare gone, replaced by~/.claude/rate-limits/andmcp__rate-limits__status; - no saved setting or recorded data is left under the old name.
Locations were taken on main at 606fdf680205dc1f7039aab0531ea6043b5ed85f. Line numbers move, so find each location by its quote or by grep.
Why
Q107 and Q133 are the owner's decisions to rename five plugins after their concern rather than their tool or current behavior: typos-format to spelling, ruff-format to python-format, biome-format to javascript-format, context-guard to context-usage, and rate-limit-guard to rate-limits.
- Owner, 2026-11-11: "We do need to decouple ... low coupling, high cohesion".
- Owner, 2026-11-12: "we need to make sure everything's migrated: nothing cosmetic, nothing left behind. For rename, it needs to be a complete rename, and nothing left over with the old name."
The 2026-11-12 decision has three consequences here:
- Every item a previous rename treated as optional is required. That includes the account-rotation
RateLimitGuard*identifiers. - The runtime directory and the MCP tool rename too.
- Saved values are migrated, not reset. #15372 sets the precedent for the changelog fragment's form only.
The playbook rule "no deprecation shim, alias, or pointer to the old name" (docs/migration-playbook.md, rename section) still holds. One-time migration code that moves data and then deletes it is not an alias. List each such line in the PR with its removal condition.
Scope in this repository
Identity
git mv plugins/rate-limit-guard plugins/rate-limits..claude-plugin/marketplace.json:nameandsource.plugin.json:name, plus the keys below.- Commands:
/rate-limit-guard:setup,/rate-limit-guard:bandand the other skill commands become/rate-limits:…. - Install id:
rate-limits@melodic-software.
Option keys and environment variables
| Old key | New key |
|---|---|
rate_limit_guard_enabled |
rate_limits_enabled |
rate_limit_guard_band |
rate_limits_band |
rate_limit_guard_toast |
rate_limits_toast |
These keys keep their names, because they carry no plugin name: rate_limit_report_mode, rate_limit_line_threshold, rate_limit_approach_pct, rate_limit_line_data. This matches #15372, which renamed only the key that carried the renamed name.
The environment variables follow their keys:
CLAUDE_PLUGIN_OPTION_RATE_LIMIT_GUARD_*becomesCLAUDE_PLUGIN_OPTION_RATE_LIMITS_*.hook::check_enabled "RATE_LIMIT_GUARD"changes the same way.lib/hook-utils.test.sh(around lines 3724-3777) usesRATE_LIMIT_GUARDas its examplecheck_enabledname. Change it to the new name.
Runtime contracts
Directory. ~/.claude/rate-limit-guard/ becomes ~/.claude/rate-limits/.
- It holds
rate-limits.json, the snapshot, which keeps its file name because the name describes the content. - It also holds
stop-events.jsonl, the StopFailure record. - The directory name comes from the
CONTRACT_DIRliteral inhooks/register.tsx. reference/reader-contract.mdowns the paths.
MCP tool. mcp__rate-limit-guard__status becomes mcp__rate-limits__status with no code change: the tool registers as name: 'status', and the server name comes from the plugin name. Update every caller and mention:
- the plugin's
README.md,reference/reader-contract.md,scripts/check-mod-load.shand its test,skills/setup/SKILL.md, andhooks/rate-limit-guard.test.ts; plugins/session-flow/skills/keep-going/SKILL.md(two places);plugins/session-flow/skills/orchestrate/context/sources.md;plugins/source-control/skills/babysit-loop/SKILL.md;plugins/work-items/skills/work-loop/SKILL.md.
No allowed-tools: or settings allow rule names the tool anywhere in the org. Grep again before closing.
Mod literals in hooks/register.tsx that the directory move does not change:
CONTRACT_DIR;- the transcript prefix;
- the
/rate-limit-guardslash command, which becomes/rate-limits. It appears in its registration and in thecommand.runmatcher; - the README URL.
Readers outside the plugin. All of them move to the new path:
- The inline floor. The loop-lane prompts and skills copy the fixed snapshot path verbatim. These copies must stay identical to
reference/reader-contract.mdunderscripts/check-loop-lane-floor-drift.sh, so all of them change in this one PR:plugins/work-items/skills/work-loop/SKILL.md,plugins/work-items/skills/work-loop/reference/paused-wait.mdandplugins/work-items/skills/work-loop/reference/guard-reader-rules.md;plugins/work-items/skills/attend-queue/SKILL.md;plugins/source-control/skills/babysit-loop/SKILL.mdandplugins/source-control/skills/babysit-loop/reference/paused-wait.md;plugins/source-control/skills/pull-request/reference/watch-handoff.md;plugins/docs-hygiene/skills/extract-ssot/context/orchestrated-mode.md;prompts/loops/loop-lane-profile-claude-code-plugins.mdandprompts/loops/loop-lane-prompts.md.
- The audit-install-state path matcher.
plugins/harness-ops/skills/audit-install-state/scripts/install_state.pymatchesr"rate-limit-guard/.*\.tmp\.\d+", and its testtest_install_state.pychecks that matcher. - The account-rotation dashboard (see Companion changes).
Files whose names carry the old name
hooks/rate-limit-guard.test.tsbecomeshooks/rate-limits.test.ts..claude/skills/control-claude-code-plugins/features/rate-limit-guard/becomesfeatures/rate-limits/.git ls-files | grep -i -e rate-limit-guard -e rate_limit_guardmust print nothing.
References inside the moved directory (about 17 files)
plugin.jsonandREADME.md(24 lines).hooks/register.tsx(16 lines) andhooks/rate-limit-guard.test.ts(68 lines).hooks/record-rate-limit-stop.shand its test. Their file names describe the content, so they keep them.reference/reader-contract.md,scripts/check-mod-load.shand its test, andskills/setup/SKILL.md(12 lines).- Five eval prompts.
lib/write-snapshot.mjs, a vendored copy.- In
CHANGELOG.md, the title line and the released sections are renamed; see "Owner ruling on released history" below.
References outside the moved directory (about 58 files)
Other plugins' code:
plugins/context-usage/hooks/post-compact-mark.sh;plugins/context-usage/lib/write-snapshot.mjs(vendored);plugins/harness-ops/skills/audit-install-state/scripts/install_state.py;plugins/harness-ops/skills/lanes/scripts/lane-launcher.sh, a comment.
These paths assume the context-usage rename has merged.
Other plugins' prose, beyond the floor copies:
plugins/docs-hygiene/skills/extract-ssot/actions/batch.md;plugins/docs-hygiene/skills/audit-encapsulation/SKILL.md;plugins/session-flow/skills/orchestrate/context/sources.md;plugins/harness-ops/skills/lanes/SKILL.md(two places);plugins/harness-ops/skills/audit-install-state/SKILL.mdandreference/name-schemes.md;plugins/autonomy/reference/prerequisite-resolution.md;plugins/context-usage/skills/setup/SKILL.mdandplugins/context-usage/README.md.
docs/:
- ADRs 0018, 0028 and 0052.
- ADR 0093: rename the dated review headings too and change the current-state carve-out paths.
- ADR 0048 holds release counts, which are history. Rename that line too, per the owner ruling below.
docs/contracts/config-cascade/README.md.docs/contracts/hook-budget/README.mdanddocs/contracts/hook-observability/README.md.docs/contracts/loop-lane/README.md. Its heading anchor#6-rate-limit-guard-bindingis linked fromdocs/conventions/loop-lane/README.mdandprompts/loops/loop-lane-prompts.md. Rename the heading and every link together.docs/contracts/retired-conventions/README.md.docs/cursor-compatibility.md.docs/upstream/claudedevs-cost-performance.md.
.github/: none today. Grep it anyway.
Tests:
lib/write-snapshot.test.mjs;lib/hook-utils.test.sh;plugins/context-usage/hooks/context-usage.test.ts, one line;plugins/harness-ops/skills/audit-install-state/scripts/test_install_state.py;plugins/session-flow/skills/keep-going/evals/evals.json;plugins/source-control/skills/babysit-loop/evals/evals.json;plugins/work-items/evals/wl-adaptive-cap-clamp-and-guard-pause/prompt.md;scripts/check-loop-lane-floor-drift.test.sh.
Code comments that name a past run: plugins/evals/skills/plugin-eval/scripts/convert-evals-json.py and plugins/evals/skills/validate/scripts/validate-cases.py name "#8635 rate-limit-guard run". Reword both to cite the run by number only.
Recorded data: plugins/source-control/skills/babysit-prs/scripts/verify-legacy-fails.json holds head_ref: fix/lane-rate-limit-guard, a real branch name copied from a past PR. It is a record. Rename it too, per the owner ruling below.
Root and scripts:
lib/write-snapshot.mjs;scripts/check-loop-lane-floor-drift.sh(header andSOURCE=);scripts/cross-plugin-source-registry.txt(two lines);- the control skill's
SKILL.mdrow; - the sorted lists
scripts/em-dash-purged-paths.txt,scripts/fragment-plugins.txt,scripts/shared-copies.txt(several lines) andscripts/suite-seconds.txt. The entry moves, so re-sort each list.
Generated files: regenerate, never hand-edit
docs/catalog.md:node scripts/generate-catalog.mjs.- The cheat sheet:
node scripts/generate-cheatsheet.mjs. docs/architecture/landscape.json:plugins/architecture/skills/map-landscape/scripts/landscape-record.sh.- The vendored copies, including
lib/write-snapshot.mjs:scripts/sync-shared-copies.sh.
Traps: do not run a blind sed
- Keys that keep their names.
rate_limit_report_modeand the otherrate_limit_*keys, plusrate-limits.jsonandrecord-rate-limit-stop.sh, do not contain the old name. A loose pattern such asrate.limitwould catch them. Grep with the exact old forms only. - The floor drift gate.
scripts/check-loop-lane-floor-drift.shexits 2 when its source is unreadable, and fails when any floor copy differs from the source. Change the source and every copy in the same commit. - Directory-only hits.
register.tsxholds the path literal, and so do the vendoredwrite-snapshot.mjscomments. - After the
git mv, run/docs-hygiene:rename-references rate-limit-guard rate-limits.
Changelog
- Run
scripts/new-changelog-fragment.sh rate-limits major, which writes.changes/rate-limits/<slug>.mdwithbump: major. Add any fragment the checks require for the other plugins whose skills change (work-items, source-control, docs-hygiene, session-flow, harness-ops). - The fragment names the new id, commands, keys, directory and MCP tool. The old-to-new mapping goes in the PR body.
- Rename the old name in the released
CHANGELOG.mdsections too. Released-entry body edits follow the in-place correction rule in the header ofscripts/check-changelog-parity.sh(Released CHANGELOG entries are being edited in place (#2312 rewrote two lines inside the shipped 0.51.12) — decide whether that is sanctioned #2388): name each edit in the PR body and in the new release entry.--check-preservedwatches version headings only; keep every heading and do not change the gate. - After merge, confirm the release PR releases
rate-limitsand records nothing underrate-limit-guard.
Companion changes in other repositories (each its own paired PR)
| Repo | Change |
|---|---|
melodic-software/dotfiles |
See below. Required. |
melodic-software/claude-code-account-rotation |
Required. src/ClaudeCodeAccountRotation.App/Configuration/ConfigurationDefaults.cs: TeeDirectoryName = "rate-limit-guard" becomes "rate-limits". TeeFileName = "rate-limits.json" stays. Rename every RateLimitGuard* identifier and file, for example RateLimitGuardTeeFileReader.cs, along with doc comments and tests. About 14 files name it: ConfigurationDefaults.cs, RateLimitGuardTeeFileReader.cs, DashboardAssembler.cs, ImportEndpoints.cs, SwitchEndpoints.cs, AppComposition.cs, WslSwitch.cs, IPeerRotationInstance.cs, src/ClaudeCodeAccountRotation.Core/Quota/StatuslineSnapshot.cs, and their tests. The local clone used for this list predates that repository's latest main, so re-grep it. Cut a release. If dotfiles pins the account-rotation version, bump the pin in the dotfiles PR. |
Not edited, and why:
claude-lane-sandboxis archived.pr-pipeline-sandboxholds mirror copies, which refactor(source-control)!: rename worktree-add-claim-gate to worktree-add-claim #15372 left untouched.- The
knowledge-corpusresearch records are history. - Nothing else is held back: the released sections of the account-rotation
CHANGELOG.mdare renamed too, per the owner ruling below.
dotfiles PR:
.chezmoidata/claude.json:claudeSettings.force.enabledPlugins: replace"rate-limit-guard@melodic-software": truewith"rate-limits@melodic-software": true, in sorted position. The plugin isdefaultEnabled: false, so the new id installs only when declared here.force.pluginConfigs: norate-limit-guardentry exists today. If one exists at build time, move it under the new id, with new key names and values unchanged.- Add
"rate-limit-guard@melodic-software"toclaudeSettings.uninstallPlugins.
- Saved-settings rename map: add
rate-limit-guard→rate-limits, with the three key pairs. The spelling issue builds this map. .chezmoiignore: the.claude/rate-limit-guardline becomes.claude/rate-limits.dot_claude/statusline/tests/entrypoint.test.sh(around lines 49-54): the test checks that a leftoverrate-limit-guard@melodic-softwareinstall record is ignored. Rewrite it with a generic made-up plugin id. The behavior under test stays; the old name goes.- Dated records:
docs/adr/0002…anddot_claude/statusline/perf/RESULTS.mdare renamed too, per the owner ruling below. - Golden files: regenerate the affected
tools/chezmoi-template-lint/golden/*.sha256withGet-RenderHash.ps1 -Fixture <fixture>, and log the regeneration ingolden/README.md. - Self-Modification soft-deny: cite Q107/Q133 and the 2026-11-12 quote.
- Merge timing:
tools/check-plugin-manifest/check.shpasses only after the ccp PR merges. Merge right after it.
Migration: nothing left behind
-
Installed old id. The next
fleet-convergeuninstalls it on every lane throughuninstallPlugins. It runs without--keep-data, so~/.claude/plugins/data/rate-limit-guard-melodic-software/goes too. -
Saved option values: migrate, do not reset.
dot_claude/modify_settings.jsonuses the rename map:- each old-id
pluginConfigsvalue is copied to its new key unless that key is already set; - keys that keep their names are copied as they are;
- the old entry is then deleted.
- each old-id
-
On-disk data under
~/.claude/rate-limit-guard/: move it, regenerate the rest, then remove the old directory.stop-events.jsonl: a record of past stops. Append it to~/.claude/rate-limits/stop-events.jsonl, keeping line order.rate-limits.json: the snapshot. The new mod rewrites it from the next API response, so do not carry it over.- Leftover
*.tmp.*files: drop them. - Then remove
~/.claude/rate-limit-guard/.
Where it runs: in the dotfiles plugin-installer step that already handles
uninstallPlugins(run_after_install-claude-plugins.sh.tmpl,run_install-claude-plugins.ps1.tmpl), unattended on every lane. On a machine without dotfiles,/rate-limits:setup checkreports a leftover old directory as drift with the fix, and/rate-limits:setup applyperforms the move. List these as migration lines with their removal condition.
The lane window
Loop lanes read the snapshot path. If a lane's work-items or source-control skills read the new path while the old mod still writes the old one, or the reverse, the lane reads no snapshot. It then goes reactive-only and gets no early pause at 95% (reference/reader-contract.md: an absent snapshot classifies as unknown). It fails soft, but keep the window short:
- merge the ccp and dotfiles PRs together;
- run
fleet-convergeon each lane promptly.
The account-rotation dashboard also shows no quota until both its release and the new mod are on a host. Its reader treats an absent snapshot as no data, not an error.
Acceptance criteria
-
On merged ccp
main,git grep -n -i -e 'rate-limit-guard' -e 'rate_limit_guard' -e 'ratelimitguard' -e 'rate limit guard'returns only the migration lines named in the PR, and the PR lists every remaining hit with its removal condition. -
The same grep over dotfiles and claude-code-account-rotation
mainreturns only:- the dotfiles
uninstallPluginsentry, rename-map entry and migration step; - the migration lines each PR lists.
No
RateLimitGuardidentifier remains in account-rotation. - the dotfiles
-
git ls-files | grep -i -e rate-limit-guard -e rate_limit_guard -e ratelimitguardprints nothing in ccp, dotfiles or account-rotation. -
These ccp tests pass:
plugins/rate-limits/hooks/rate-limits.test.ts;plugins/rate-limits/scripts/check-mod-load.test.sh;- the
record-rate-limit-stoptest; lib/write-snapshot.test.mjs;lib/hook-utils.test.sh;scripts/check-loop-lane-floor-drift.sh, which exits 0;scripts/check-loop-lane-floor-drift.test.sh;- the harness-ops
test_install_state.py.
-
ci-statusis green, including the changelog fragment and parity checks and the shared-copies drift check. -
Account-rotation CI passes.
-
On the dotfiles PR, after the ccp merge, dotfiles
tools/check-plugin-manifest/check.sh, the golden render check and the statusline tests pass. -
After all PRs merge and one
fleet-convergeon a lane:claude plugin listshowsrate-limits@melodic-softwareand notrate-limit-guard@melodic-software;~/.claude/rate-limit-guard/does not exist;~/.claude/rate-limits/rate-limits.jsonis written after the next API response;- the lane's previous
stop-events.jsonllines are present under the new directory; - a new session lists
mcp__rate-limits__statusand not the old tool; ~/.claude/settings.jsonhas norate-limit-guard@melodic-softwarepluginConfigsentry, and every saved value sits under its new key unchanged;- the account-rotation dashboard shows quota again.
Order and dependencies
- Prerequisite: start after the context-usage rename merges. Each plugin's directory and tests name the other, and both touch
lane-launcher.sh,harness-ops/skills/lanes/SKILL.mdand ADRs 0018, 0052 and 0093. - Why this one goes last: its dotfiles and account-rotation follow-ups can then land together.
- Merge order:
- The ccp PR.
- The dotfiles PR, within the same hour.
- The account-rotation release, with the dotfiles pin bump if one is needed, as soon as possible after that.
Open PRs to rebase around
Re-run gh pr list -R melodic-software/claude-code-plugins --state open before starting. At filing time, these were open:
- #15504 adds
.changes/fragments for all five plugins. - #15507 adds
.changes/rate-limit-guard/…and editsplugins/rate-limit-guard/README.md,hooks/record-rate-limit-stop.shandplugins/autonomy/reference/prerequisite-resolution.md. - #15536 edits
docs/contracts/loop-lane/README.mdandharness-ops/skills/lanes/SKILL.md.
A fragment under .changes/rate-limit-guard/ that merges after this rename leaves a fragment for a plugin that no longer exists, and git reports no conflict. Before merging, git mv any such fragment into .changes/rate-limits/.
Owner ruling on released history
Owner, 2026-11-12: "I want a clean cutover". Released CHANGELOG sections, ADR text and dated records are renamed to the new name too. The only old-name hits allowed after the rename are the dotfiles uninstallPlugins entry, the rename-map migration entry, and one-time migration lines that must read the old name, each listed in the PR with its removal condition.
Related
- Owner decisions Q107 and Q133 (2026-11-11), and the 2026-11-12 complete-rename decision.
- Precedent: #15372.
Blocked by #15555
Metadata
Metadata
Assignees
Labels
Type
Fields
Work status
Priority
Activity
github-actions commentedon Nov 12, 2026
Size: Large
Complexity: Medium
Uncertainty: Known
Flags: none
Blocked by: #15555
Thanks. I read this as a complete rename of the
rate-limit-guardplugin torate-limits. It covers the plugin identity, option keys, the runtime directory, the MCP tool name, references in other plugins and docs, and the paired dotfiles and account-rotation PRs. It also includes a one-time migration of saved settings and on-disk data.The scope and acceptance criteria are already exact. The work spans three repositories and many files, so it likely needs splitting.
The issue says it must start after the context-usage rename, which is #15555 and still open. I listed that as the blocker.
I found no duplicate among the open issues. No merged pull request already covers this rename.
Automated triage. A maintainer reviews it.
github-actions commentedon Nov 12, 2026
The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).
melodic-automation-lanes commentedon Nov 12, 2026
Not admitted to the issue lane: its body or a criterion names .claude/skills/control-claude-code-plugins/features/rate-limit-guard/, .claude/rate-limit-guard, .claude/rate-limits, which the issue lane cannot push (patch-protected-path); a builder session takes it. Admission takes the issue once each of those is met, when intake triages it again (
.github/actions/resolve-config/admission-rules.json).refactor(rate-limits)!: name the renamed floor and binding sections b…
refactor(rate-limits)!: drop the spaced old name and the removed tee …
refactor(usage): read the live-session tee from the rate-limits direc…
fix(rate-limits)!: merge the old stop record first, under the hook's …
chore(release): 3.0.0 (#442)
kyle-sexton commentedon Nov 14, 2026
Closed by hand after the fleet check on the WSL lane (2026-11-14):
rate-limit-guard@melodic-softwareis not installed,rate-limits@melodic-softwareis; a reloaded session listsmcp__rate-limits__statusand not the old tool;~/.claude/rate-limits/rate-limits.jsonis written after API responses. Sessions on the old code had kept writing~/.claude/rate-limit-guard/: after every running session was reloaded with/reload-plugins --forceit stayed unwritten for ten minutes, its three strandedstop-events.jsonllines were appended to the new file, and the folder was removed. The only old-id hit in user settings is thefalseentry the dotfilesuninstallPluginslist renders.