Skip to content

refactor: rename ruff-format to python-format #15553

Closed

Description

@kyle-sexton

Problem

Rename the ruff-format plugin to python-format, completely. The new name says what the plugin covers (Python formatting and lint); the old one names the tool it runs (Ruff). When this is done:

  • no current-state reference to the old name remains in this repository or its companion repositories;
  • every lane runs python-format@melodic-software and not ruff-format@melodic-software;
  • no saved setting or git-hook artifact is left under the old name.

This issue holds everything needed to build and verify the rename. 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 means two things here:

  • Every item a previous rename treated as optional is required.
  • Saved option values are migrated, not reset. #15372 is the precedent for the changelog fragment's form only; it let stored values reset.

The playbook rule "no deprecation shim, alias, or pointer to the old name" (docs/migration-playbook.md, rename section, about lines 465-473) still holds: the old name must not keep working. One-time migration code that reads the old name to move 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/ruff-format plugins/python-format.
  • .claude-plugin/marketplace.json: the entry's name and source.
  • plugin.json name and the userConfig keys below.
  • /ruff-format:setup and /ruff-format:check become /python-format:setup and /python-format:check. The install id becomes python-format@melodic-software.

Option keys and environment variables

Old key New key
ruff_format_enabled python_format_enabled
ruff_format_lint_gitignored python_format_lint_gitignored
ruff_format_end_of_turn python_format_end_of_turn

Each variable follows its key:

  • CLAUDE_PLUGIN_OPTION_RUFF_FORMAT_* becomes CLAUDE_PLUGIN_OPTION_PYTHON_FORMAT_*.
  • hook::check_enabled "RUFF_FORMAT" and RUFF_FORMAT_ENABLED in prerequisites.json session_probe follow.
  • So do the HOOK_RUFF_FORMAT_ENABLED test variables.

No key keeps its old name, and nothing outside this repository reads these variables.

Files whose names carry the old name

  • hooks/ruff-format.sh, hooks/ruff-format.test.sh and hooks/ruff-format-end-of-turn.test.sh become hooks/python-format*.sh. Update hooks/hooks.json to match.
  • .claude/skills/control-claude-code-plugins/features/ruff-format/ becomes features/python-format/.
  • After the move, git ls-files | grep -i -e ruff-format -e ruff_format prints only the third-party fixtures listed under Traps.

References inside the moved directory (about 42 files)

  • plugin.json, README.md, hooks/hooks.json, prerequisites.json, the hook scripts and tests, skills/setup/SKILL.md, and the evals (tags, /ruff-format:setup, sample commands, checks.ruff-format.* keys).
  • git-hooks/ruff-check.sh: the entry name ruff-check names the tool and stays, but any user-facing ruff-format: prefix becomes python-format:.
  • CHANGELOG.md: the title line and the released sections are renamed; see "Owner ruling on released history" below.

References outside the moved directory (about 20 files)

  • Other plugins:
    • plugins/toolchain/reference/ecosystems/python.yaml (a comment);
    • plugins/toolchain/skills/check/context/python.md;
    • plugins/go-format/README.md.
  • docs/:
    • ADR 0028;
    • docs/contracts/check-placement/README.md and docs/contracts/check-placement/adopting-git-hooks.md;
    • docs/contracts/hook-budget/README.md;
    • docs/contracts/hook-precision/README.md (two places, including ruff_format_lint_gitignored);
    • docs/cursor-compatibility.md (two places);
    • docs/formatter-path-probes.md.
  • Root and scripts:
    • .performance/ratchets.json (a ratchet name and its command);
    • scripts/affected-tests-live.sh (two lines);
    • the control skill SKILL.md row;
    • the sorted lists, where the entry moves and must be re-sorted: scripts/fragment-plugins.txt, scripts/em-dash-purged-paths.txt, scripts/shared-copies.txt (several lines), scripts/suite-seconds.txt.
  • .github/: none today. Grep it anyway.

Generated files: regenerate, never hand-edit

  • docs/catalog.md: node scripts/generate-catalog.mjs.
  • The skill cheat sheet: node scripts/generate-cheatsheet.mjs.
  • docs/architecture/landscape.json: plugins/architecture/skills/map-landscape/scripts/landscape-record.sh.
  • Vendored copies: scripts/sync-shared-copies.sh.

Traps: do not run a blind sed

ruff-format is also astral's pre-commit hook id. These hits are third-party names, not this plugin. They stay:

  • plugins/harness-config/evals/fixtures/quay-repo.sh (- id: ruff-format);
  • plugins/harness-config/evals/ag-formatter-already-enforced/ (prompt.md and samples/*.json);
  • samples/no-automation-write.json in ag-grep-count-ceiling and ag-premature-db-mcp, where /ws/.claude/hooks/ruff-format.sh is a consumer's own hook;
  • every ruff format command;
  • test_ruff_format_* function names that test the ruff format command. A test that tests this plugin is renamed. Check each one.

The same false positives exist in other repositories. Do not change them:

  • dotfiles: .lefthook/python.yml and .github/workflows/pr-require-checks.yml (three places);
  • melodic-software/claude-code-proxy .lefthook/python.yml;
  • melodic-software/standards components/lefthook-python/lefthook.yml;
  • medley tests/python-infra/test_config_validation.py.

After the git mv, run /docs-hygiene:rename-references ruff-format python-format.

Changelog

Use #15372's fragment form:

  • Run scripts/new-changelog-fragment.sh python-format major, which writes .changes/python-format/<slug>.md with bump: major.
  • Leave the plugin.json version alone. Rename the old name in the released CHANGELOG.md sections too.
  • The fragment names the new id, commands and keys. The old-to-new mapping and the consumer steps go in the PR body.
  • scripts/check-changelog-parity.sh --check-preserved exempts the moved changelog. Released-entry body edits follow the in-place correction rule in the header of scripts/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-preserved watches version headings only; keep every heading and do not change the gate.

After merge, confirm the release PR releases python-format and records nothing under ruff-format.

Companion changes in other repositories (each its own paired PR)

Repo Change
melodic-software/dotfiles See below. Required.
melodic-software/medley Prose naming ruff-format@melodic-software: .claude/rules/cloud-conventions.md, .claude/rules/hooks/conventions.md (about three lines), .claude/rules/observability/conventions.md, .claude/rules/python/conventions.md, .claude/skills/onboard/research/per-concern/linters.md, docs/ecosystems/python-reference.md. The shared rules files also name biome-format; coordinate with the javascript-format issue, or change both names in one PR.
melodic-software/github-iac docs/plugin-policy.md (it names both formatters).

Not edited, with the reason:

dotfiles PR:

  • .chezmoidata/claude.json:
    • In claudeSettings.force.enabledPlugins, replace "ruff-format@melodic-software": true with "python-format@melodic-software": true in sorted position.
    • force.pluginConfigs has no entry for ruff-format today. Move any that exists at build time to the new id with the new key names and the values unchanged.
    • Add "ruff-format@melodic-software" to claudeSettings.uninstallPlugins.
  • Rename map: add the entry ruff-format → python-format, with the three key pairs, to the saved-settings rename map that the spelling issue builds (Migration item 2).
  • Golden files: regenerate the affected tools/chezmoi-template-lint/golden/*.sha256 with Get-RenderHash.ps1 -Fixture <fixture>, and log the regeneration in golden/README.md.
  • docs/claude-hook-fanout.md: a dated measurement record. Rename it too, per the owner ruling below.
  • Self-Modification: this PR edits .chezmoidata/claude.json. Cite Q107/Q133 and the 2026-11-12 quote as the owner naming the change.
  • Merge timing: tools/check-plugin-manifest/check.sh passes only after the ccp PR merges. Merge this PR right after it.

Migration: nothing left behind

  1. Installed old id. It is uninstalled on every lane at the next fleet-converge through uninstallPlugins, without --keep-data, so ~/.claude/plugins/data/ruff-format-melodic-software/ goes too.
  2. Saved option values are migrated, not reset. dot_claude/modify_settings.json copies each old-id pluginConfigs value to the new id under its new key, unless the new key already holds a value, then deletes the old entry. It uses the rename-map entry above. This mechanism is built in the spelling issue's dotfiles PR.
  3. Consumer git-hook artifacts. Use the lib/git-hooks/ migration built in the spelling issue:
    • /python-format:setup check reports each artifact left under the old name as drift and names the fix: .githooks/ruff-format/, the <event>.d/ruff-format.ruff-check marker, the lefthook job ruff-format-ruff-check, and the git config keys hook.ruff-format-ruff-check and checks.ruff-format.ruff-check.declined.
    • /python-format:setup apply install-git-hooks installs the new entry, carries a recorded decline over to the new key, and removes the old artifacts.
  4. On-disk data: none beyond item 1. This plugin has no machine-scope directory.

Acceptance criteria

  • On merged ccp main, git grep -n -i -e 'ruff-format' -e 'ruff_format' -e 'ruffformat' returns only:

    • the third-party hits listed under Traps;
    • the migration lines named in the PR.

    The PR lists every remaining hit with its class.

  • git grep -n -i -e 'ruff format' on the same tree hits only the tool's own ruff format subcommand, never the plugin's name written with a space; the PR says so.

  • The same grep over dotfiles, medley and github-iac returns only:

    • the dotfiles uninstallPlugins entry and rename-map entry;
    • the third-party hook ids listed under Traps;
    • the migration lines listed in each PR.
  • The plugin's tests pass: bash plugins/python-format/hooks/python-format.test.sh and bash plugins/python-format/hooks/python-format-end-of-turn.test.sh.

  • ci-status is green, including the changelog fragment and parity checks, check-killswitch-hoist.sh and check-hook-userconfig-argv.sh, and the catalog and shared-copies drift checks.

  • dotfiles tools/check-plugin-manifest/check.sh and the golden render check pass on the dotfiles PR after the ccp merge.

  • After both PRs merge and one fleet-converge on a lane:

    • claude plugin list shows python-format@melodic-software and not ruff-format@melodic-software;
    • ~/.claude/settings.json has no ruff-format@melodic-software pluginConfigs entry;
    • any value the lane saved under an old key sits under the new key, unchanged.
  • In a test repository with the old git hook installed, setup check reports the old artifacts. After apply install-git-hooks, none remain and a prior decline is kept.

Order and dependencies

  • Starts after: the spelling rename merges. This issue reuses its dotfiles rename map and its git-hook artifact migration, and the two share sorted lists and doc lines.
  • Parallel work: it can run alongside javascript-format. They share only sorted-list and shared-doc lines (ADR 0028, hook-budget, hook-precision, cursor-compatibility, formatter-path-probes, check-placement, adopting-git-hooks, shared-copies.txt, fragment-plugins.txt, ratchets.json), which are trivial rebases.
  • Merge order: the ccp PR first, then the dotfiles PR in the same hour.

Open PRs to rebase around

Re-run gh pr list -R melodic-software/claude-code-plugins --state open before starting. At filing time:

  • #15504 adds .changes/ fragments for all five plugins.
  • #15508 adds .changes/ruff-format/… fragments.

If a fragment under .changes/ruff-format/ merges after this rename, git reports no conflict, and the fragment sits under a plugin that no longer exists. Before merging, git mv any such fragment into .changes/python-format/.

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, Q133 (2026-11-11), and the 2026-11-12 complete-rename decision.
  • Precedent: #15372.

Blocked by #15552

Activity

  1. added
    agent-ready
    on Nov 12, 2026
  2. self-assigned this
    on Nov 12, 2026
  3. added
    needs-triage
    on Nov 12, 2026
  4. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    Size: Large
    Complexity: Medium
    Uncertainty: Known
    Flags: none
    Blocked by: #15552

    I read this as a complete rename of the ruff-format plugin to python-format. It covers the directory, manifest, option keys and env vars, hook files, docs and generated files. It also covers paired changes in dotfiles, medley and github-iac, plus a migration of saved settings and git-hook artifacts. The issue lists the third-party ruff-format hits to leave alone and gives acceptance criteria.

    The issue says it starts after the spelling rename (#15552) merges, so I listed that as a blocker. The sibling renames (#15554, #15555, #15556) are separate work, not duplicates. I found no merged PR that already does this.

    The work spans several repositories and many files, so it likely needs splitting by repository.

    Automated triage. A maintainer reviews it.

  5. removed
    needs-triage
    on Nov 12, 2026
  6. removed
    agent-ready
    on Nov 12, 2026
  7. github-actions commented on Nov 12, 2026

    @github-actions
    Contributor

    The triage sweep dispatched intake triage for this issue (dispatch 1; 2 runs that reach intake, or 6 dispatches, hand it to a maintainer).

  8. kyle-sexton commented on Nov 14, 2026

    @kyle-sexton
    MemberAuthor

    Closed by hand after the fleet check on the WSL lane (2026-11-14): ruff-format@melodic-software is not installed, python-format@melodic-software is; the empty ruff-format-melodic-software data folder that sessions on the old code kept recreating was removed and stayed gone for ten minutes after every running session was reloaded with /reload-plugins --force. The only old-id hit in user settings is the false entry the dotfiles uninstallPlugins list renders.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Fields

Work status

ready

Priority

medium

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions