Skip to content

Commit a745453

Browse files
committed
docs(workflow): enforce PR body accuracy checks
1 parent e582ec3 commit a745453

2 files changed

Lines changed: 22 additions & 3 deletions

File tree

.github/agents/github-operator.agent.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,10 @@ Do not jump directly to raw API calls if a dedicated MCP or CLI command covers t
3939
2. Read any local specification or context file needed to perform the task correctly.
4040
3. Load the relevant repository skill when one exists.
4141
4. Choose the highest-level GitHub interface that can perform the task safely.
42-
5. Execute the operation with the minimum number of calls needed.
43-
6. Verify the result by reading the updated GitHub object or returned URL.
44-
7. Report only the outcome and key identifiers back to the caller.
42+
5. For PR descriptions, reconcile the proposed body with the actual branch diff and commit list before applying updates.
43+
6. Execute the operation with the minimum number of calls needed.
44+
7. Verify the result by reading the updated GitHub object or returned URL.
45+
8. Report only the outcome and key identifiers back to the caller.
4546

4647
## Repository Guidance
4748

@@ -58,6 +59,7 @@ Do not jump directly to raw API calls if a dedicated MCP or CLI command covers t
5859
- Do not assume the visible issue number is the same identifier required by a GitHub API.
5960
- For sub-issue linking, remember that the REST API expects the child issue's internal GitHub ID,
6061
not its visible issue number.
62+
- Do not claim PR implementation changes that are not present in the current HEAD diff.
6163
- Do not mix GitHub task execution with unrelated code changes.
6264
- If a PR review comment requires code changes, stop after identifying the actionable request and
6365
hand control back to the caller or a code-focused agent.
@@ -70,3 +72,4 @@ When finishing a task, return:
7072
1. What was changed or verified
7173
2. The key GitHub identifiers or URLs
7274
3. Any blockers, permissions issues, or follow-up needed
75+
4. For PR body updates, a short evidence line showing the checked commit range and changed files

.github/skills/dev/git-workflow/open-pull-request/SKILL.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ Before opening a PR:
2222
- [ ] Branch is pushed to your fork remote
2323
- [ ] Commits are GPG signed (`git log --show-signature -n 1`)
2424
- [ ] All pre-commit checks passed (`linter all`, `cargo machete`, tests)
25+
- [ ] PR body claims are aligned with the actual commit range (`origin/develop..HEAD`)
26+
- [ ] If manual verification used temporary local-only patches, PR body explicitly says they are not included
2527

2628
> Important: always open the PR in the **upstream repository**, not in your fork.
2729
> Resolve upstream from `Cargo.toml` (`repository = "https://github.com/torrust/torrust-tracker"`) and use that value for `gh pr create --repo ...`.
@@ -42,6 +44,11 @@ PR body must include:
4244
- Validation performed
4345
- Issue link (`Closes #<issue-number>`)
4446

47+
PR body must not include:
48+
49+
- Claims about code changes that are not present in the branch diff
50+
- Ambiguous wording that mixes temporary local verification patches with committed implementation
51+
4552
## Option A (Preferred): GitHub CLI
4653

4754
```bash
@@ -76,6 +83,15 @@ When MCP pull request management tools are available, create the PR with:
7683
- [ ] Head branch is correct
7784
- [ ] CI workflows started
7885
- [ ] Issue linked in description
86+
- [ ] PR body still matches branch diff and commit history after final rebases/edits
87+
88+
Quick body-accuracy verification:
89+
90+
```bash
91+
gh pr view <pr-number> --repo <upstream-owner>/<upstream-repo> --json body
92+
git diff --name-only origin/develop...HEAD
93+
git log --oneline origin/develop..HEAD
94+
```
7995

8096
## Troubleshooting
8197

0 commit comments

Comments
 (0)