Skip to content

Commit 01c72f0

Browse files
authored
docs: add PR metadata guardrails
1 parent d925527 commit 01c72f0

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

.github/copilot-instructions.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ Always include `Closes #N` in **both** the commit message AND the PR body's "Rel
7474

7575
**⚠️ CRITICAL:** When creating a pull request, the title and description must summarize **ALL changes in the branch**, not just the last commit.
7676

77+
**⚠️ CRITICAL:** Once a pull request already exists, do **not** change its title or description unless the user explicitly asks you to do so.
78+
7779
### Before Creating Any PR
7880

7981
1. Run `git log main..HEAD --oneline` to see ALL commits in the branch
@@ -86,6 +88,12 @@ Always include `Closes #N` in **both** the commit message AND the PR body's "Rel
8688
- New files added
8789
- Modified functionality
8890

91+
### After a PR Already Exists
92+
93+
1. Treat the current PR title and description as user-approved context unless the user explicitly asks for a change
94+
2. If the user does ask for an update, keep the title and description aligned with the **entire branch**, not just the latest iteration
95+
3. Do not overwrite a good PR summary just because you made a new commit, merged `main`, or addressed review feedback
96+
8997
### Common Mistake
9098

9199
**Wrong:** PR titled after the most recent commit ("fix: resolve Windows test failures")

.squad/templates/copilot-instructions.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ Always include `Closes #N` or `Fixes #N` in commit messages when the change reso
5151

5252
When opening a PR:
5353
- **Title and description must summarize ALL changes in the branch**, not just the last commit. Use `git log main..HEAD --oneline` (or the appropriate base branch) to review all commits and write a comprehensive PR title and description.
54+
- Once a PR already exists, **do not change its title or description unless the user explicitly asks you to do so**.
55+
- If the user does ask for an update, preserve the full-branch summary instead of rewriting the PR around only the most recent iteration.
5456
- Reference the issue in **both** the commit message AND the PR body: `Closes #{issue-number}`. The PR body is a redundant safety net if commit message formatting fails.
5557
- If the issue had a `squad:{member}` label, mention the member: `Working as {member} ({role})`
5658
- If this is a 🟡 needs-review task, add to the PR description: `⚠️ This task was flagged as "needs review" — please have a squad member review before merging.`

0 commit comments

Comments
 (0)