Skip to content

[API Compatibility] Modify and supplement documents Edit By AI Agent#7901

Open
zhwesky2010 wants to merge 1 commit intoPaddlePaddle:developfrom
zhwesky2010:claude
Open

[API Compatibility] Modify and supplement documents Edit By AI Agent#7901
zhwesky2010 wants to merge 1 commit intoPaddlePaddle:developfrom
zhwesky2010:claude

Conversation

@zhwesky2010
Copy link
Copy Markdown
Collaborator

API Compatibility 项目文档更新:

本次更新优化了 Paddle API 对齐 PyTorch 项目的相关文档和 skill 定义:

  • 更新 api-change-decider skill 描述
  • 更新 api-compatibility 主文档,优化步骤说明
  • 更新 api-docs-updater skill 描述和配置
  • 更新 cpp-sink skill 描述和配置
  • 更新 create-pr skill 描述和工作流程文档
  • 更新 python-decorator skill 描述
  • 更新 pytorch-alignment-validator skill 描述

这些更改优化了项目的文档结构和 skill 定义,为 API 对齐工作流程提供了更清晰的指导。

Copilot AI review requested due to automatic review settings April 30, 2026 12:36
@paddle-bot
Copy link
Copy Markdown

paddle-bot Bot commented Apr 30, 2026

感谢你贡献飞桨文档,文档预览构建中,Docs-New 跑完后即可预览,预览链接:http://preview-pr-7901.paddle-docs-preview.paddlepaddle.org.cn/documentation/docs/zh/api/index_cn.html
预览工具的更多说明,请参考:飞桨文档预览工具

@github-actions
Copy link
Copy Markdown

📚 本次 PR 文档预览链接(点击展开)
ℹ️ 预览提醒
请等待 Docs-NEW 流水线运行完成后再点击预览链接,否则可能会看到旧版本内容或遇到链接无法访问的情况。
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-change-decider/SKILL.md: 点击预览
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-compatibility/SKILL.md: 点击预览
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-docs-updater/SKILL.md: 点击预览
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/cpp-sink/SKILL.md: 点击预览
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/create-pr/SKILL.md: 点击预览
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/python-decorator/SKILL.md: 点击预览
  • docs/dev_guides/coding_agent/api_compatibility/.claude/skills/pytorch-alignment-validator/SKILL.md: 点击预览

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

本 PR 针对《Paddle API 对齐 PyTorch 项目》的 coding agent 文档(skills)进行更新,主要是统一/补充各阶段 skill 的说明文字,并细化代码提交与建 PR 的操作流程,以便更清晰地指导 API 对齐工作流落地。

Changes:

  • 更新多个 skill 的 description 表述,使其更明确对应的 Step 与职责范围。
  • 大幅补充 /create-pr 的工作流程说明(改动检查、API 名单汇总、提交/推送/建 PR 的分步指导)。
  • 更新总控 /api-compatibility 中关于批处理执行与豁免策略的描述。

Reviewed changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/pytorch-alignment-validator/SKILL.md 调整 Step3 校验 skill 的描述文案
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/python-decorator/SKILL.md 调整 Step2 Python 装饰器 skill 的描述,并新增部分 front-matter 字段
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/create-pr/SKILL.md 细化 Step5 提交与建 PR 的流程(检查改动、汇总 API 名单、提交/推送/创建 PR)
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/cpp-sink/SKILL.md 调整 Step2 C++ 下沉 skill 的描述,并新增部分 front-matter 字段
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-docs-updater/SKILL.md 调整 Step4 文档更新 skill 的描述文案,并变更 front-matter 字段
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-compatibility/SKILL.md 微调总控流程说明(批处理、豁免策略、Step 说明文案)
docs/dev_guides/coding_agent/api_compatibility/.claude/skills/api-change-decider/SKILL.md 调整 Step1 方案决策 skill 的描述文案

Comment on lines 82 to 86
# Paddle 仓库
cd /path/to/Paddle
git add -A
git add -u
git commit -m "[API Compatibility] api_name_1/api_name_2/api_name_3/... Edit By AI Agent"
# 等待 pre-commit hook 完成
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里使用 git add -u 只会暂存已跟踪文件的修改/删除,不会把新增文件(例如新增的 docs 页面或新增测试文件)加入提交,容易造成提交不完整。建议改为在确认无多余文件后使用 git add -A,或在保留 -u 的同时补充明确步骤:对需要纳入的新增文件单独 git add <path> 并在提交前检查 git diff --cached

Copilot uses AI. Check for mistakes.
## Step 5:创建 PR

根据自动获取的 PyTorch API 名单生成 PR,执行以下命令创建 PR(顺序:Paddle → Docs → PaConvert):
根据自动获取的 PyTorch API 名单生成 PR,**仅对有代码改动的仓库**执行以下命令创建 PR(顺序:Paddle → Docs → PaConvert):
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Step 2 描述的是“从多个渠道获取并取并集”,这里却写成“根据自动获取的 PyTorch API 名单生成 PR”,表述不一致,容易让执行者误以为一定能自动得到名单。建议改为“根据 Step 2 获取/汇总的 PyTorch API 名单生成 PR”,或补充明确哪些渠道是自动、哪些需要人工输入。

Suggested change
根据自动获取的 PyTorch API 名单生成 PR,**仅对有代码改动的仓库**执行以下命令创建 PR(顺序:Paddle → Docs → PaConvert):
根据 Step 2 获取/汇总的 PyTorch API 名单生成 PR,**仅对有代码改动的仓库**执行以下命令创建 PR(顺序:Paddle → Docs → PaConvert):

Copilot uses AI. Check for mistakes.
---
name: cpp-sink
description: 仅用于《Paddle API 对齐 PyTorch 项目》,负责 Step2:API 代码修改,实施 C++下沉的代码开发。通过将 Python API 下沉至 C++层,可以减少 Python 装饰器带来的性能开销,提升 API 调度效率。
description: 负责《Paddle API 对齐 PyTorch 项目》 Step2:API 代码修改,实施 C++下沉的代码开发。通过将 Python API 下沉至 C++层,可以减少 Python 装饰器带来的性能开销,提升 API 调度效率。
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

该描述中英文与中文之间缺少空格(如“C++下沉”“C++层”)。按本仓库中文文档书写规范,建议改为“C++ 下沉”“C++ 层”,以保持中英文混排一致性。

Suggested change
description: 负责《Paddle API 对齐 PyTorch 项目》中 Step2:API 代码修改,实施 C++下沉的代码开发。通过将 Python API 下沉至 C++层,可以减少 Python 装饰器带来的性能开销,提升 API 调度效率。
description: 负责《Paddle API 对齐 PyTorch 项目》中 Step 2:API 代码修改,实施 C++ 下沉的代码开发。通过将 Python API 下沉至 C++ 层,可以减少 Python 装饰器带来的性能开销,提升 API 调度效率。

Copilot uses AI. Check for mistakes.
---
name: pytorch-alignment-validator
description: 仅用于《Paddle API 对齐 PyTorch 项目》,负责 Step3:Pytorch 对齐验证,基于 PaConvert 工具验证 Paddle API 与 PyTorch API 是否用法完全对齐一致
description: 负责《Paddle API 对齐 PyTorch 项目》 Step3:Pytorch 对齐验证,基于 PaConvert 工具验证 Paddle API 与 PyTorch API 是否用法完全对齐一致
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里同一句里同时出现了 “Pytorch 对齐验证” 和 “PyTorch API”,大小写不一致。建议统一使用官方写法 “PyTorch”(即改为“PyTorch 对齐验证”)。

Copilot uses AI. Check for mistakes.
Comment on lines +18 to +29
三个仓库的本地目录名称分别为 Paddle、PaConvert、docs,自行找到对应本地路径,检查三个仓库是否有未提交的改动,**只对有代码改动的仓库进行后续提交**(排除未跟踪文件)

```bash
cd /path/to/Paddle && git status
cd /path/to/PaConvert && git status
cd /path/to/docs && git status
cd /path/to/Paddle && git status --untracked-files=no
cd /path/to/PaConvert && git status --untracked-files=no
cd /path/to/docs && git status --untracked-files=no
```

## Step 2:添加改动并提交
判断标准:
- 若仓库中有 `M`、`A`、`D` 等标记的**已跟踪文件**,则该仓库**需要提交**
- 若仓库中只有 `??` 标记的**未跟踪文件**,则该仓库**无需提交**
- 若仓库无任何改动,则该仓库**无需提交**
Copy link

Copilot AI Apr 30, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这里用 git status --untracked-files=no 并在判断标准中将“只有 ?? 未跟踪文件”视为“无需提交”,会导致新增但应纳入提交的文件(如新增测试/文档)被忽略,最终 PR 缺文件。建议保留对未跟踪文件的可见性(不加 --untracked-files=no),并在流程里明确:需要人工甄别未跟踪文件是否属于本次改动,属于则应纳入提交。

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants