Skip to content

Commit 620d9f7

Browse files
authored
docs(agents): require PR description updates when pushing to a PR branch (#244)
## Summary - Adds a rule to `AGENTS.md` requiring agents to update the PR description with `gh pr edit` whenever new commits are pushed to a PR branch that introduce changes not covered by the existing summary. - Includes the exact command pattern and a one-sentence rationale (stale summaries waste reviewer time). ## Sync recommendation `hand-written`
1 parent ecfef03 commit 620d9f7

1 file changed

Lines changed: 11 additions & 0 deletions

File tree

AGENTS.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,17 @@ EOF
9090
git checkout main
9191
```
9292

93+
**Any time commits are pushed to a PR branch** — check whether the PR description still accurately reflects the complete set of changes on the branch. If new commits introduce changes not covered by the existing summary, update the description immediately:
94+
```bash
95+
gh pr edit <PR#> --body "$(cat <<'EOF'
96+
<updated full description>
97+
EOF
98+
)"
99+
```
100+
Do not leave a PR description that no longer matches the branch. The description is the reviewer's first read; a stale summary wastes review time and creates confusion.
101+
102+
**PR body formatting rule (applies to `gh pr create`, `gh pr edit`, and `gh pr comment`)** — always pass the body through a single-quoted heredoc (`<<'EOF'`). Single-quoted heredocs suppress all shell expansion, so backticks and other special characters are passed through literally. Never manually escape backticks with `\`` inside the heredoc: the backslash will appear verbatim in the rendered output.
103+
93104
**Rebase approved PR with merge conflicts:**
94105
```bash
95106
git fetch origin && git checkout <branch>

0 commit comments

Comments
 (0)