Loading...
Loading...
Compare original and translation side by side
-1. Prior Work Check -> BLOCKING: Final check for competing PRs
0. Isolation Check -> BLOCK if PR mixes unrelated changes
1. Context Discovery -> Understand target repo conventions
2. Git Archaeology -> Analyze commit patterns, PR history
3. Pre-Flight Checks -> Run tests, linting, build
4. Change Analysis -> Summarize what changed and why
5. PR Body Generation -> Create structured PR description
6. USER REVIEW GATE -> STOP. User must approve before submission.
7. Submission -> Only after explicit user approval-1. 前期工作检查 -> 阻塞型:最终检查是否存在竞争PR
0. 独立性检查 -> 若PR混合不相关更改则阻塞
1. 上下文探索 -> 了解目标仓库约定
2. Git溯源 -> 分析提交模式、PR历史
3. 预提交检查 -> 运行测试、代码检查、构建
4. 变更分析 -> 总结变更内容及原因
5. PR正文生成 -> 创建结构化的PR描述
6. 用户审核环节 -> 停止。提交前必须获得用户批准。
7. 提交 -> 仅在获得用户明确批准后执行undefinedundefined
**Rule**: If more than one commit type prefix exists, the PR is mixing concerns.
**规则**:如果存在一种以上的提交类型前缀,说明该PR混合了不同关注点的内容。undefinedundefinedundefinedundefined| Check | Pass Criteria |
|---|---|
| Single commit type | All commits share same prefix |
| Thematic files | All changed files relate to PR scope |
| No main overlap | Changes not already merged |
| Atomic scope | Can explain in one sentence |
| 检查项 | 通过标准 |
|---|---|
| 单一提交类型 | 所有提交使用相同前缀 |
| 主题一致的文件 | 所有变更文件与PR范围相关 |
| 无main分支重复 | 变更内容未被合并 |
| 原子化范围 | 可用一句话说明 |
gh pr createundefinedgh pr createundefined
---
---undefinedundefinedundefinedundefinedundefinedundefinedgo build ./...go test ./...
**Key conventions:**
- Test plan items are **checked** `[x]` (you ran them before PR)
- `Fixes #NNN` goes at the end
---go build ./...go test ./...
**核心约定**:
- 测试计划项需标记为**已完成** `[x]`(PR前已执行)
- `Fixes #NNN` 放在末尾
---undefinedundefined
**Remember**: This command should ONLY run after user explicitly approves.
---
**注意**:仅在用户明确批准后执行此命令。
---| DON'T | DO INSTEAD |
|---|---|
| Submit without approval | ALWAYS stop for user review |
| Skip isolation check | Run Phase 0 FIRST |
| Bundle lint fixes into feature PRs | Lint fixes get their own PR |
| Giant PRs | Split into logical chunks |
| Vague PR body | Detailed summary with context |
| Skip pre-flight | Always run tests locally |
| 错误做法 | 正确做法 |
|---|---|
| 未经批准提交 | 始终暂停等待用户审核 |
| 跳过独立性检查 | 首先运行阶段0检查 |
| 将代码检查修复与功能PR捆绑 | 代码检查修复单独提交PR |
| 大型PR | 拆分为逻辑独立的小块 |
| PR正文模糊 | 提供包含上下文的详细摘要 |
| 跳过预提交检查 | 始终在本地运行测试 |
| Problem | Cause | Solution |
|---|---|---|
| PR body is weak | Missing context from commits/tests | Re-run evidence collection and expand summary |
| Submission blocked | Mandatory review gate not passed | Get explicit user approval before |
| Test plan incomplete | Commands/results not captured | Add executed checks and outcomes explicitly |
| Title/body mismatch | Scope drift during edits | Regenerate from latest branch diff and constraints |
| 问题 | 原因 | 解决方案 |
|---|---|---|
| PR正文质量差 | 缺少提交/测试的上下文 | 重新收集证据并扩展摘要 |
| 提交被阻塞 | 未通过强制审核环节 | 在执行 |
| 测试计划不完整 | 未记录命令/结果 | 明确添加已执行的检查及结果 |
| 标题与正文不匹配 | 编辑过程中范围偏离 | 根据最新分支差异和约束重新生成 |