Code Formatter
Apply the project's own formatter — never impose a different style.
Workflow
- Detect the formatter from config files (
.prettierrc,pyproject.toml
[tool.black], .editorconfig, rustfmt.toml) or the CI step that failed.
If none exists, ask before introducing one.
- Run it on the changed files only (
git diff --name-only), not the whole
repository, unless the user asks for a full pass.
- Re-run the exact failing CI command locally to confirm it now passes.
- Show the user a summary: which files changed and which tool/version ran.
Rules
- Formatting commits must contain no semantic changes; if the formatter's
output alters behavior (rare, but possible with aggressive import sorting),
stop and report it.
- Respect ignore files (
.prettierignore,# fmt: offmarkers).