Skip to content

docs(harness): commit 规范分两层,squash 用 PR description - #2650

Merged
ShadowLemoon merged 6 commits into
mainfrom
docs/squash-pr-desc
Aug 4, 2026
Merged

docs(harness): commit 规范分两层,squash 用 PR description#2650
ShadowLemoon merged 6 commits into
mainfrom
docs/squash-pr-desc

Conversation

@DoctorReid

@DoctorReid DoctorReid commented Aug 3, 2026

Copy link
Copy Markdown
Collaborator

回应 issue #2615(@ShadowLemoon):squash 后拼迭代 commit,可读性低。仓库 squash + merge commit 设置改用 PR description,收尾时维护 PR title + description 成 Conventional Commits;commit 规范分两层(单个迭代 commit 宽松 / 需要 commit message 的 merge 严格)。两层规范在 AGENTS.md,收尾动作在 pr-finishing skill。

关联

  • issue: Squash内容可读性不高 #2615
  • 仓库设置:主仓 + 测试仓 squash + merge commit 都 PR_BODY + PR_TITLE
  • 实测:取整段 desc(含 CR summary);commit message 在 merge 时用 gh pr merge --subject --body 单独定(desc 给 review,commit message 给 history)

Summary by CodeRabbit

  • 文档
    • 更新提交信息与 PR 标题、描述规范,明确 Conventional Commits 格式及必备内容。
    • 补充合并前整理提交信息的网页和命令行操作说明。
    • 更新关联 PR 验证步骤、章节编号及远程仓库校验命令。
    • 完善合并条件、提交信息决策和合并后清理说明。
    • 优化代码审查摘要的语言、分类与简洁性规范。

DoctorReid and others added 3 commits August 3, 2026 14:37
回应 issue #2615:仓库 squash 设置改用 PR description(PR_BODY),收尾
时把 PR title+desc 维护成 Conventional Commits 总结。commit 规范分两层
(依据 Conventional Commits 1.0.0):单个迭代 commit 宽松 / 需要额外
提供 commit message 的 merge 严格。

- AGENTS.md「提交流程」加两层 commit 规范
- pr-finishing skill 加「收尾维护 PR title+desc」步骤(design.md 决策 12)
- CLAUDE.local.md Conventional Commits 重新定位两层

Closes #2615

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- AGENTS.md:squash → squash/merge commit 都用 PR description(+ rebase 靠 commit 本身)
- SKILL.md 流程 5:去假设、直接陈述;关联仓未切 PR desc 时暂缓整理
- SKILL.md 流程 7 + design.md 决策 11:fetch https → origin(标准 remote,非本地约定)
- design.md 决策 12:标题准确化 + 本项目设置/查询命令 + ## 截断标「待验证,非合同」

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
实测 squash 取整段 desc(`##` 截断假设错),改为:desc 给 reviewer、
commit message 给 git 历史的分工,merge 时 review/edit commit message。

- AGENTS.md:两层规范第二条改「merge 时 review/edit commit message」,去 ## 截断错误
- SKILL.md 流程 5:merge 前/时整理 commit message(gh pr merge --subject --body / 网页框),不改 desc
- design.md 决策 12:方法论 + 实测取整段 + CodeRabbit summary 进 desc 机制

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@DoctorReid
DoctorReid requested a review from ShadowLemoon August 3, 2026 09:13
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4029fbb4-b141-4a02-9d20-638efa51305e

📥 Commits

Reviewing files that changed from the base of the PR and between c683e24 and 58ff32b.

📒 Files selected for processing (2)
  • skills/zzz-od-dev-pr-finishing/SKILL.md
  • skills/zzz-od-dev-pr-finishing/design.md
🚧 Files skipped from review as they are similar to previous changes (2)
  • skills/zzz-od-dev-pr-finishing/design.md
  • skills/zzz-od-dev-pr-finishing/SKILL.md

📝 Walkthrough

Walkthrough

本次变更新增 commit 与 PR 规范,更新 PR 合并前检查、关联 PR 校验、分支清理提示及 CodeRabbit walkthrough 配置。

Changes

提交信息与 PR 收尾流程

Layer / File(s) Summary
Commit message 规范
AGENTS.md, skills/zzz-od-dev-pr-finishing/design.md
新增普通 commit、PR description 和 merge commit 的格式、内容及审核规则。
PR 合并前流程
skills/zzz-od-dev-pr-finishing/SKILL.md, skills/zzz-od-dev-pr-finishing/design.md
新增 PR title、description 和 commit message 检查。流程编号顺延,关联测试仓校验命令改用 origin,合并后分支清理改为提示。
Walkthrough 输出配置
.coderabbit.yaml
新增中文高层总结配置,并按 Added、Changed、Deprecated、Removed、Fixed、Security 类型分组实质改动。

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested reviewers: shadowlemoon

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 标题准确概括了本次 PR 的主要变更,包括 commit 规范分层和使用 PR description 生成 squash 内容。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs/squash-pr-desc

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Comment thread skills/zzz-od-dev-pr-finishing/SKILL.md Outdated
Comment thread skills/zzz-od-dev-pr-finishing/SKILL.md Outdated
Comment thread skills/zzz-od-dev-pr-finishing/SKILL.md Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 105: 统一合并流程表述:在 AGENTS.md 第105行将“AI 用 gh pr merge”改为 AI 仅生成命令、由用户确认并执行;在
skills/zzz-od-dev-pr-finishing/design.md 第36-40行和
skills/zzz-od-dev-pr-finishing/SKILL.md 第63-66行保留命令示例并明确 AI 不执行 merge,确保三处边界一致。

In `@skills/zzz-od-dev-pr-finishing/design.md`:
- Line 31: Update the branch comparison guidance in
skills/zzz-od-dev-pr-finishing/design.md:31-31 and
skills/zzz-od-dev-pr-finishing/SKILL.md:75-75 to compare origin/main against
origin/<同名分支> after fetching, not an unconstrained local branch. Also require
checking for relevant unpushed local commits so the verification cannot skip
changes that exist only locally; preserve the existing validation that detects
test-repository commits absent from the main branch.
- Around line 36-38: 更新本项目设置中查询 GitHub 仓库合并配置的记录,使用 gh api 同时读取
squash_merge_commit_title、merge_commit_title、squash_merge_commit_message 和
merge_commit_message;明确说明 squash 与 merge commit 均为
*_title=PR_TITLE、*_message=PR_BODY,并保留现有查询说明。

In `@skills/zzz-od-dev-pr-finishing/SKILL.md`:
- Line 15: 更新关联 PR 收尾说明及其外部引用,确保 docs/develop/development_workflow.md 中 Line 48
的流程编号从 §6 改为 §7,并指向“关联 PR”流程。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: ec25a0dd-bdfa-4411-bcd5-56e464a26924

📥 Commits

Reviewing files that changed from the base of the PR and between ae00153 and 4fefd88.

📒 Files selected for processing (3)
  • AGENTS.md
  • skills/zzz-od-dev-pr-finishing/SKILL.md
  • skills/zzz-od-dev-pr-finishing/design.md

Comment thread AGENTS.md Outdated
Comment thread skills/zzz-od-dev-pr-finishing/design.md Outdated
Comment thread skills/zzz-od-dev-pr-finishing/design.md Outdated
Comment thread skills/zzz-od-dev-pr-finishing/SKILL.md Outdated
DoctorReid and others added 2 commits August 3, 2026 18:06
- high_level_summary_in_walkthrough: true:summary 放 comment,不进 PR desc/commit body
- high_level_summary_instructions:Keep a Changelog 分类(Added/Changed/Deprecated/Removed/Fixed/Security),只写 what
- 配合「作者写 desc 作 commit body」:CR summary 给 review,作者写 why 进 body

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
- AGENTS.md:commit/PR 规范重组 5 点(单个 commit / PR title / PR desc why+改动要点+关联 / merge 时编辑 / rebase)
- SKILL.md:流程 5+6 整合成「合并前」,原 7→6(关联 PR);合并后清理单独章节;不主动 merge
- design.md 决策 12:方法论(作者写/合并者 review)+ CR summary 配置 + 查询 4 字段 + 实测取整段;决策 11 origin/<同名分支>;§6
- development_workflow.md L46:§6

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>
@DoctorReid
DoctorReid requested a review from ShadowLemoon August 3, 2026 11:20

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@AGENTS.md`:
- Line 110: 统一 AGENTS.md 第110行与 skills/zzz-od-dev-pr-finishing/SKILL.md 第65行的
merge 执行边界:在 AGENTS.md 中将“作者按上面写好就直接 merge”改为由用户或合并者确认并执行 merge,AI 仅提供检查结果和命令;在
SKILL.md 对应位置保留 AI 不主动执行 merge,并采用与 AGENTS.md 一致的表述。

In `@skills/zzz-od-dev-pr-finishing/SKILL.md`:
- Around line 63-65: 将 SKILL.md 中涉及
zzz-od-test、origin/main、测试仓合并顺序及其他仓库专属流程移至同目录 design.md;在 SKILL.md 中改用适用于 fork
的通用占位符,并保留可复用的方法论。更新其中的 gh pr list --head 命令,显式加入 --repo <测试仓
owner/repo>,同时确保相关段落不再硬编码具体远端、分支或仓库。
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 593281ec-a287-4a05-adfa-de5fa728e096

📥 Commits

Reviewing files that changed from the base of the PR and between 7f36b7f and c683e24.

📒 Files selected for processing (3)
  • AGENTS.md
  • skills/zzz-od-dev-pr-finishing/SKILL.md
  • skills/zzz-od-dev-pr-finishing/design.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • skills/zzz-od-dev-pr-finishing/design.md

Comment thread AGENTS.md
Comment thread skills/zzz-od-dev-pr-finishing/SKILL.md
- SKILL.md 流程 6 + design.md 决策 11:gh pr list --head → --repo OneDragon-Anything/zzz-od-test --head

Co-Authored-By: Claude Code <noreply@anthropic.com>
Co-Authored-By: glm-5.2 <noreply@bigmodel.cn>

@ShadowLemoon ShadowLemoon left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@ShadowLemoon

Copy link
Copy Markdown
Collaborator

兔子的设置在哪里改?

@ShadowLemoon
ShadowLemoon merged commit 2901ac3 into main Aug 4, 2026
8 of 9 checks passed
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Aug 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants