dart-mechanical-refactor
GitHub执行 DART 项目的机械式重构工作流。在保持行为不变的前提下,通过自动化或脚本化手段进行代码重构。需严格界定范围,更新构建配置,运行 lint/build/test 验证,并在推送前获取审批。
Trigger Scenarios
Install
npx skills add dartsim/dart --skill dart-mechanical-refactor -g -y
SKILL.md
Frontmatter
{
"name": "dart-mechanical-refactor",
"description": "DART Mechanical Refactor: perform a behavior-preserving mechanical refactor"
}
dart-mechanical-refactor
Use this skill in Codex to run the DART dart-mechanical-refactor workflow. The editable
workflow source currently lives in .claude/commands/, and this generated
Codex skill is a generated Codex adapter entrypoint.
Invocation
- Claude Code/OpenCode:
/dart-mechanical-refactor <arguments> - Codex:
$dart-mechanical-refactor <arguments>
Treat the text after the skill name as $ARGUMENTS. When the workflow
references $1, $2, etc., map those to the positional values supplied by the
user.
Command Body
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 branch from the target branch, usually
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 test-unitpixi run test-allwhen feasiblepixi run -e cuda test-allwhen feasible on Linux CUDA hosts
- 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
Version History
-
51b2d25
Current 2026-07-11 18:26
澄清 AI 工作流术语(#3289)
- e0d13fd 2026-07-05 10:37


