Skip to content

[skip deploy] docs(agents): specify how to write a PR description - #117

Merged
yurenju merged 1 commit into
mainfrom
docs/pr-description-guide
Aug 18, 2026
Merged

[skip deploy] docs(agents): specify how to write a PR description#117
yurenju merged 1 commit into
mainfrom
docs/pr-description-guide

Conversation

@yurenju

@yurenju yurenju commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

遇到的問題

PR 敘述愈寫愈像 diff 的複述。GitHub 已經把 diff 顯示出來了,所以那部分是白寫的;而 reviewer 真正從 diff 看不出來的三件事,反而常常沒寫:

  • 使用者到底遇到什麼
  • 舊的寫法為什麼看起來是對的
  • 這次刻意沒修什麼

結果就是 review 的人得自己把 context 重建一遍,或者更糟,以為問題已經結案了。

改動

把最近實際用起來順的順序寫進 AGENTS.md,放在「開發風格」後面:使用者症狀、背景、問題出在哪(用講給 junior engineer 聽的方式)、修法與為什麼這樣修、這個 PR 不修什麼、已知副作用、測試怎麼紅的。

另外列了三個不要寫的東西:不要重複 commit message、不要只貼 diff 摘要、不要用「修了一個 edge case」帶過。

參考範例是 sadcoderlabs/wspc-drive#80。

不規範內文語言

新段落只講順序與內容,沒有規定 PR 內文要用哪種語言。標題維持英文 conventional 格式,那條規則沒動。

這個 repo 的語言規則原本就只規定標題(issue/PR 標題:英文),沒有碰描述,所以那一行不用動。wspc monorepo 那邊原本多規定了描述要用英文,會另外拿掉以求三個 repo 一致。

PR descriptions have been drifting toward a restatement of the diff, which
GitHub already shows. What a reviewer cannot recover from the diff is the
symptom a user reported, why the old code looked correct, and what the change
deliberately leaves unfixed.

Record the ordering that has been working: user-visible symptom first, then
background, then the defect explained at a level a junior engineer can follow,
then the fix and why it is shaped that way, then scope limits, side effects,
and how the tests failed before the change.
@yurenju
yurenju merged commit 55c6bbf into main Aug 18, 2026
2 checks passed
@yurenju
yurenju deleted the docs/pr-description-guide branch August 18, 2026 05:20
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.

1 participant