Repository navigation
refactor(hooks): one format-on-edit dispatcher in code-tools; releases for all four plugins - #20
Merged
Merged
Conversation
…e dispatcher astro-tools, go-tools and rust-tools each registered a PostToolUse Edit|Write hook, so every edit in every repo spawned three processes, two or three of which were silent no-ops. code-tools now ships a single format-file.sh that routes by extension to Biome (still gated on a biome.json), goimports/gofmt, templ fmt or rustfmt (edition-detected). Per-route behaviour is unchanged. The stack plugins no longer format on their own; code-tools must be installed. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…de-tools dispatcher; v0.6.0 - hooks/format-file.sh and hooks/hooks.json removed; the Biome route now lives in clownware-code-tools' single format-file.sh dispatcher - description, marketplace entry and README synced Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… the code-tools dispatcher; v0.4.0 - hooks/format-file.sh and hooks/hooks.json removed; the .go and .templ routes now live in clownware-code-tools' single format-file.sh dispatcher - description, marketplace entry and README synced Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ode-tools dispatcher; v0.2.0 - hooks/format-file.sh and hooks/hooks.json removed; the .rs route (edition-detected) now lives in clownware-code-tools' single format-file.sh dispatcher - description, marketplace entry and README synced Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ck; v0.16.0 - hooks/format-file.sh added and registered as PostToolUse Edit|Write; replaces the three per-stack format hooks (three processes per edit down to one) - description, marketplace entry and README synced Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The three identical-shaped
format-file.shhooks (astro-tools, go-tools, rust-tools) each registeredPostToolUseonEdit|Write, so every edit in every repo spawned three processes, most of them silent no-ops (~4.8k edits in the audited window). They are collapsed into a single dispatcher inclownware-code-tools, routed by extension:biome.jsonat or above the filetempl fmtPer-route logic is copied unchanged from the three originals.
Commits (one release = one plugin = one commit)
refactor(code-tools): the dispatcher + removal of the three hooksfeat(astro-tools)v0.6.0,feat(go-tools)v0.4.0,feat(rust-tools)v0.2.0: hook removed; descriptions, marketplace entry and README syncedfeat(code-tools)v0.16.0: dispatcher registered; descriptions, marketplace entry and README syncedMerge with rebase, not squash, so the per-plugin release commits survive (this repo's history is linear).
Tradeoff
The stack plugins no longer format on their own;
clownware-code-toolsmust be installed alongside them. The README says so under each plugin.Verification
python3 scripts/validate_plugins.py: 5 in-repo plugins validpython3 -m unittest discover -s scripts -p 'test_*.py': 8 tests OK.goreformatted by goimports;.rsby rustfmt (edition 2021 from Cargo.toml);.tsunder astro-performance-starter reformatted by Biome;.tswith nobiome.jsonuntouched;.md, empty payload and garbage payload exit 0 silentlyInstallers pick this up on the next marketplace refresh /
/plugin update.🤖 Generated with Claude Code