Prompt file imported from dartsim/dart (
.claude/commands/dart-mechanical-refactor.md). Fill in{{arguments}}before use. Copyright stays with the author.
Perform mechanical refactor: {{arguments}}
Required Reading
@AGENTS.md @CONTRIBUTING.md @docs/onboarding/code-style.md
Workflow
- Define the exact transformation and scope before editing.
- Create a topic branch from the target branch, for example
git switch --no-track -c refactor/<topic> origin/main. - Prefer scriptable or automated edits when the transformation is repetitive.
- Keep behavior unchanged; do not mix in feature work or cleanup outside scope.
- If reorganizing files, update CMake, pixi tasks, generated indexes, and docs.
- Run focused checks first, then broader checks according to risk:
pixi run lintpixi run buildpixi run testpixi run test-allwhen feasiblepixi run -e gazebo test-gzwhen package, collision, constraint, or downstream Gazebo/gz-physics compatibility could be affected
- Ask for explicit maintainer/user approval before pushing or opening a PR. After approval, open a PR with a clear scope statement and no behavior-change claim unless tested.
Output
- Transformation summary
- Files or areas changed
- Verification run
- Any residual risk
