已合并
docs(agent): finish #321 P0 rules cleanup and catalog drift fixes #1130
changzherui创建于 8月7日
docs(agent): finish #321 P0 rules cleanup and catalog drift fixes #1130
已合并
Pull Request已成功合入, 合并人@MindSpore-Bot
(感谢 changzherui 的贡献)8月7日 创建了 pull request,commit cb82efc9
8月7日 关联了issue:[RFC]: 重构 .agent 体系,提升 Agent 编程能力(progressive disclosure)
atomgit-bot
8月7日 评论:
8月7日 评论:
变更摘要
此 PR 完成 #321 剩余的 P0 清理工作,仅涉及 .agent/ 目录与 AGENTS.md 的文档整理,不修改任何产品代码。核心目标是将 rules(硬约束)与 skill(流程指南)分层、统一多处内容漂移的口径、新增 catalog 校验脚本以检测 AGENTS.md 中 Skills/Agents 表格与磁盘文件之间的不一致。
主要改动
- 新增 catalog 校验脚本:添加
.agent/scripts/check_agents_catalog.py,通过解析AGENTS.md中### Skills和### Agents表格的加粗名称,与.agent/skills/下的SKILL.md及.agent/agents/下的.md文件逐一比对,不一致时以非零退出码报错,确保文档表格与磁盘文件始终同步 - Rules / Skills 分层:将
unit_test流程指南从 rules 迁入 skilladd-unit-test(references/guide.md),rules 侧仅保留短约束unit-test.md;同时为 rules frontmatter 统一补充name字段,multi-platform-features补全paths声明 - 内容漂移归一:统一 pytest runner 与
unittest.TestCaseauthoring 的口径(涉及testing.md、distributed-op-testing.md与 guide);断言格式在distributed-op-testing中改为指向test-assertion-style规则而非重复复述;commit subject 长度统一为 ~80 字符并收敛至code-style.md,修正gen-commit-msg中原 50–72 的冲突定义 - AGENTS.md 集成边界与交叉引用更新:新增 Hooks(harness-specific)说明与跨工具降级策略;Testing / Git Workflow 章节与 rules 对齐,索引加入
add-unit-test;增加llamafactory-hp↔activation-dev交叉引用以避免 activation 细节双写;distributed-guidelines.md标明 SoT 为rules/distributed.md并压缩 Platform API 复述


不准确?
atomgit-bot
8月7日 评论:
8月7日 评论:
8月7日 添加了label:mindspore-cla/yes
8月7日 添加了label:pr-check-pass
changzherui
8月7日 评论:
8月7日 评论:
/retest


8月7日 添加了label:ci-pipeline-running
8月7日 修改了pull request 的描述
8月7日 预合并成功(commit_id: b84c1572eddd4c9afe6d4c8e005304fcae4750e7)
8月7日 审查状态已重置,审查人: yangzhenzhang,yao_yf,suteng
8月7日 强制推送 1 个提交:593116f0-docs(agent): finish #321 P0 rules cleanup and catalog drift fixes
8月7日 强制推送 1 个提交:593116f0-docs(agent): finish #321 P0 rules cleanup and catalog drift fixes
8月7日 预合并成功(commit_id: 24905d1953aa20cf8b8182ad8eb5ae1fd30337ed)
司小南(机器人)
8月7日 评论:
8月7日 评论:
| Project Name | Build_Stage | Build Result | Details |
|---|---|---|---|
| Hyper-parallel_Atomgit_Gate | - | ❌ FAILURE | 6613 |


MindSpore-Bot
8月7日 评论:
8月7日 评论:
8月7日 删除了label:ci-pipeline-running
8月7日 添加了label:ci-pipeline-failed
司小南(机器人)
8月7日 评论:
8月7日 评论:
检测到Pull Request代码更新,即将终止当前正在执行的门禁任务(若存在),请基于当前版本的代码重新触发。


changzherui
8月7日 评论:
8月7日 评论:
/retest


8月7日 删除了label:ci-pipeline-failed
8月7日 添加了label:ci-pipeline-running
8月7日 通过审查
司小南(机器人)
8月7日 评论:
8月7日 评论:
🎉 恭喜!代码检查通过
本次 PR 未发现关键问题 ✅
此评论由 AI Code Review Bot 自动生成


司小南(机器人)
8月7日 评论:
8月7日 评论:
📖 Markdown文件检查:
1.💡问题描述:代码块前缺少空行
- 📄 文件:
.agent/skills/code-review/distributed-guidelines.md - ✍ 修改建议:
- **Good:** - ```python + **Good:** + + ```python
2.💡问题描述:行尾存在多余空格
- 📄 文件:
.agent/skills/code-review/distributed-guidelines.md - ✍ 修改建议:
- This document covers distributed system correctness for HyperParallel PR reviews - **with Bad/Good examples**. + This document covers distributed system correctness for HyperParallel PR reviews + **with Bad/Good examples**.
3.💡问题描述:文件末尾缺少换行符
- 📄 文件:
.agent/rules/distributed-op-testing.md - ✍ 修改建议:
- Op-specific extras above (e.g. `assertRaisesRegex` substring matching) still apply. \ No newline at end of file + Op-specific extras above (e.g. `assertRaisesRegex` substring matching) still apply.
🤗 上述内容仅供参考。


8月7日 添加了label:ai-reviewed
8月7日 通过审查
司小南(机器人)
8月7日 评论:
8月7日 评论:
| Platform Type | Module | Excution Time | Time Limit |
|---|---|---|---|
| _mindspore | - | - | - |
| - | activation_checkpoint | 280.394s | 300.0s |
| - | shard | 610.409s | 600.0s |
| - | pipeline_parallel | 682.29525s | 675.0s |
| - | fully_shard | 1245.145s | 1375.0s |
| - | swap_optimizer | 110.062s | 120.0s |
| - | context_parallel | 89.89s | 120.0s |
| - | process_group | 91.778s | 120.0s |
| - | checkpoint | 89.812s | 120.0s |
| - | init_weights | 82.876s | 120.0s |
| - | st | 10.10575s | 15.0s |
| _torch | - | - | - |
| - | shard | 208.412s | 300.0s |
| - | pipeline_parallel | 346.804s | 600.0s |
| - | context_parallel | 108.047s | 120.0s |
| - | expert_parallel | 76.023s | 120.0s |
| - | activation_checkpoint | 129.17688s | 143.75s |
| - | tensor_parallel | 258.171s | 300.0s |
| - | fully_shard | 453.913s | 600.0s |
| - | accuracy | 86.479s | 120.0s |
| - | clip_grad | 88.532s | 120.0s |
| - | init_weights | 77.858s | 118.75s |
| - | dtensor | 76.713s | 120.0s |
| - | checkpoint | 107.024s | 120.0s |
| - | trainer | 81.949s | 120.0s |
| - | swap_optimizer | 77.617s | 120.0s |
| - | process_group | 67.161s | 90.0s |
| - | llama3_examples | 61.858s | 120.0s |


司小南(机器人)
8月7日 评论:
8月7日 评论:
| Project Name | Build_Stage | Build Result | Details |
|---|---|---|---|
| Hyper-parallel_Atomgit_Gate | - | ✅ SUCCESS | 6615 |


8月7日 删除了label:ci-pipeline-running
8月7日 添加了label:ci-pipeline-passed
8月7日 合入了pull request,合并节点 SHA:8b4036a80275c3a4d8235f4cf23e355d9720cdf5
司小南(机器人)
8月7日 评论:
8月7日 评论:
🎉 恭喜!代码检查通过
本次 PR 未发现关键问题 ✅
此评论由 AI Code Review Bot 自动生成


司小南(机器人)
8月7日 评论:
8月7日 评论:
司小南(机器人)
8月7日 评论:
8月7日 评论:
📖 Python注释检查:
1.💡问题描述:Args部分参数格式不规范。参数定义中有默认值,但文档字符串中缺少参数类型、optional标识及Default说明。
- 📄 文件:
.agent/skills/autogit/scripts/lint_check.py - ✍ 修改建议:
- Args: - files: Unused; kept so this checker fits ``_build_check_plan``. + Args: + files (Optional[List[str]], optional): Unused; kept so this checker fits ``_build_check_plan``. Default: ``None``.
🤗 上述内容仅供参考。


What type of PR is this?
/kind clean_code
What does this PR do / why do we need it:
完成 #321 剩余 P0(#1110 已合入瘦身主轴之后)。本 PR 不改产品代码,只整理
.agent/+AGENTS.md:1. Rules / Skills 分层
unit_test流程指南迁到 skilladd-unit-test(references/guide.md)unit-test.mdname;multi-platform-features补paths)2. 内容漂移归一
unittest.TestCaseauthoring 口径统一(testing.md/distributed-op-testing.md/ guide)distributed-op-testing指向test-assertion-style(不再双份复述)code-style.md,修正gen-commit-msg的 50–72 冲突distributed-guidelines.md标明 SoT =rules/distributed.md,压缩 Platform API 复述3. AGENTS.md / 集成边界
add-unit-testllamafactory-hp↔activation-dev交叉引用,避免 activation 细节双写4. 短 why 注释 + catalog 校验
code-style.md增加行内 why-only 规则;review checklist 同步.agent/scripts/check_agents_catalog.py(Skills/Agents 表 vs 磁盘)Which issue(s) this PR fixes:
Related to #321(关闭剩余 P0;P1/P2 仍 open)
Test Plan and Test result:
python3 .agent/scripts/check_agents_catalog.pynameupstream/mastercommit 数Self-checklist: