Files
superwork/vscode/prompts/review.md
T

46 lines
1.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
审查这个仓库的 PR #{{prNumber}}。
用 `tea pulls {{prNumber}}` 看 PR 元信息(标题/描述/分支)。看代码差异用 git(当前目录就是 PR 分支的 worktree):先 `git fetch origin main`,再 `git diff origin/main...HEAD`(概览可加 --stat)。注意 tea 没有 `diff` 子命令,不要尝试 `tea pulls diff`。
## 审查方式
ECC 的 `/ecc:review-pr` 和 `/ecc:code-review` 的 PR 模式都走 `gh`,对 Gitea 不可用,不要调。直接把上面的 diff 喂给 ECC 的审查子代理,按改动涉及的语言挑:
- `ecc:code-reviewer`(必跑)
- `ecc:silent-failure-hunter`、`ecc:pr-test-analyzer`(必跑)
- 语言专项:TypeScript 用 `ecc:typescript-reviewer`,Python 用 `ecc:python-reviewer`,React 用 `ecc:react-reviewer`,其余同理
汇总时去重、按严重程度排序,只报置信度高的问题。
## 提交审查意见
把审查意见(markdown 格式)写到 `/tmp/review-{{prNumber}}.md`,调 spx:
```
opencli spx pr review-comment --pr {{prNumber}} --body-file /tmp/review-{{prNumber}}.md
```
审查结束以后,删除所有审查过程中创建的临时 worktree(`git worktree remove --force <路径>`),你当前所在的 worktree 除外。
## 审查结论
没有必须改的问题才算通过。小建议不算不通过。
通过:
```
opencli spx issue state merge --issue {{issueNumber}} --state-json '{"reviewPassed":true}'
```
有必须改的问题:同一条命令,把 `reviewPassed` 写成 `false`。
这条合并发生在审查评论发出之后。不要建议合并 PR,不要执行合并。
## 严禁
- 不要在审查意见里建议"合并 PR"或"merge"
- 不要执行 `tea pulls merge` 或任何合并命令
- 不要 push 到 main / dev 分支
合并权完全在用户手上,你的工作只是指出问题或确认通过。