Skip to content

Commit 9cd9a98

Browse files
docs: add PR creation guidelines to prevent stale local ref comparisons
Co-authored-by: Cursor <cursoragent@cursor.com>
1 parent 9030916 commit 9cd9a98

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

AGENTS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,15 @@ Use `ultrathink` for complex architectural decisions.
237237

238238
See `.agents/workflows/development-cycle.md` for details.
239239

240+
## Pull Requests
241+
242+
When creating a pull request:
243+
244+
1. **Always fetch first** — Run `git fetch origin` before comparing branches
245+
2. **Compare against remote** — Use `origin/main` (not local `main`) for diffs and commit logs. Local `main` may be stale.
246+
3. **Verify commit count** — Run `git log origin/main..HEAD --oneline` and confirm the number matches what GitHub will show
247+
4. **Scope the description** — The PR body must reflect only the commits unique to the branch, not the full history since an outdated local ref
248+
240249
---
241250

242251
*~200 lines. For detailed patterns, see `.cursor/rules/` and `.agents/skills/`.*

CLAUDE.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ When debugging issues:
219219
- **Auth**: Uses Clerk for authentication; avoid touching `middleware.ts` without review
220220
- **File Storage**: Uses Convex storage for file uploads
221221
- **Model terminology**: See `.agents/context/glossary.md` for precise definitions
222+
- **Pull requests**: Always `git fetch origin` first and compare against `origin/main`, never local `main`. Local main can be arbitrarily stale, causing commit/diff inflation in PR descriptions.
222223

223224
---
224225

0 commit comments

Comments
 (0)