已开启
feat: add code-optimization skill #2723
Ruiyu_Qiu创建于 6月25日
feat: add code-optimization skill #2723
已开启
合并受阻
6月25日 添加了label:stat/needs-squash
6月25日 添加了label:ascend-cla/no
ascend-robot
6月25日 评论:
6月25日 评论:
Thanks for your pull-request.
The full list of commands accepted by me can be found at here.
You can get sig-info at here.
You can self-configure the PR merge rules for this repository. For more details, please refer to Here.
PR Approval Progress
⚠️ This PR does not yet meet the following requirements:lgtm (requires ≥ 2 person(s) per module)、approve (requires ≥ 1 person(s) per module)
Module Approval Details
| module | lgtm status | approve status |
|---|---|---|
| repo-Ascend/MindSpeed-MM | ❌ (0/2)(You can also ask: liuxi_, wanglikai1019, song_hello_world, 刘启元, ningmenglh) | ❌ (0/1)(You can also ask: cxiaolong, bigdog1206, 陈志国, yaoyaoxu, 王海涛) |
💡 Tip:
- Committer can comment
/approveor/lgtm- Commenting
/approveimplies both code review (lgtm) and intent to merge (approve)
CLA Signature Pass
qiuruiyu531, thanks for your pull request. All authors of the commits have signed the CLA. 👍


此处折叠了89条消息 查看更多
9月12日 删除了label:docs-ci-pipeline-success
9月12日 添加了label:docs-ci-pipeline-running
ascend-robot
9月12日 评论:
9月12日 评论:
9月12日 删除了label:docs-ci-pipeline-running
9月12日 添加了label:docs-ci-pipeline-success
What this PR does / why we need it?
Implements issue #363: a reusable, agent-facing code-optimization skill under
.agents/skills/code-optimization/. This PR is skill-only; it does not change anyfile under
mindspeed_mm/.How the skill works (per reviewer feedback): it does not edit code. Running it
produces a Markdown report (
code_optimization_report_<date>.md) that lists everycandidate cleanup as one row of a checklist table with a 决策 column, plus for each
candidate a full
diff, the ripple analysis (callers / registration / YAML / import /tests) and a semantics-preservation rationale, and finally a section of items the
skill saw but deliberately did not propose (with reasons). Reviewers go through the
report one by one and decide which items to apply; nothing is applied automatically.
Files:
SKILL.md— when to use, the 3-phase workflow (locate → judge → ripple + report), rejectcriteria, no-touch zones, anti-patterns.
references/optimization_map.md— where to look first; reuses the repo's ownfsdp2_code_boundaries.mdchange tiers as the no-touch baseline.references/finding_schema.md— per-finding field contract and the report-file layout.examples/code_optimization_report_example.md— a real report produced by runningthe skill on
mindspeed_mm/: 8 candidates (2 structural: a byte-identical duplicatemethod and a dead private function pair; 6 zero-risk: duplicate imports and dead
stores) and 10 deliberately skipped items, including two shadowed duplicate
definitions with different bodies that the skill flags as suspected bugs for a
human instead of proposing a deletion.
Related issue: https://gitcode.com/Ascend/MindSpeed-MM/issues/363
Does this PR introduce any user-facing change?
No. Documentation / agent skill only. No source, config, or training-behavior change.
How was this patch tested?
git apply --checkagainstmaster(7a54aa84, the branch base) and against thecurrent
masterhead (60591711); all 8 applied together compile (py_compile) andpyflakes warnings only decrease.
all files in the skill directory.
pre-commitexcludes*.md, so it has nothing tocheck for this PR.