You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update /pr skill to honor PR template on docs/ branches
The PR template's Lane 1 Technical edit checkbox is what stage-progression.yml
watches to advance new-doc PRs from AI editor review to Director review. The
skill previously always passed --body to gh pr create, which fully overrides
the template, dropping the checkbox. The skill now forks on branch prefix:
docs/ branches get the template structure with auto-filled Description and
Affected documents sections; non-doc branches keep the existing bullet summary.
Copy file name to clipboardExpand all lines: .claude/skills/pr/SKILL.md
+29-11Lines changed: 29 additions & 11 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -68,28 +68,46 @@ Read `.claude/skills/git-conventions.md` for PR conventions.
68
68
- Derived from the **overall purpose** of all commits on the branch, not just the latest commit
69
69
- Example: "Redesign homepage with product tile grid layout"
70
70
71
-
### Body
72
-
Use this format — **Summary section only, no Test plan**:
71
+
### Body — choose the format based on the branch prefix
73
72
74
-
```markdown
75
-
## Summary
76
-
- {1-3 bullet points describing the changes and their purpose}
77
-
```
73
+
**If the current branch starts with `docs/`** → use the **Template Style** (Step 5a). The repo's PR template at `.github/pull_request_template.md` contains a checklist for document authors, including the Lane 1 "Technical edit comments addressed" checkbox that the stage-progression workflow watches for. Passing `--body` to `gh pr create` overrides the template entirely, so the skill must reproduce the template structure with the auto-generated content filled in.
78
74
79
-
**Do NOT include:**
75
+
**Otherwise (infrastructure, tooling, dependency, or any non-doc branch)** → use the **Summary Style** (Step 5b). These PRs are silently ignored by the review workflow and don't need the doc-author checklist.
76
+
77
+
In both styles, the summary content should be based on **ALL** commits on the branch, not just the most recent one. Read through all the commit messages and the diff to understand the full scope. If `$ARGUMENTS` was provided, use it to focus the title and description.
78
+
79
+
**Do NOT include in either style:**
80
80
- A "Test plan" section
81
81
- Any AI attribution, "Generated with Claude", or "Co-Authored-By" lines
82
82
83
-
If `$ARGUMENTS` was provided, use it to focus the title and description.
1. Read [.github/pull_request_template.md](.github/pull_request_template.md). Use it as the structural skeleton.
86
+
2. Compute the auto-generated summary: 1–3 bullets describing the changes.
87
+
3. Compute the list of affected MDX documents: from `git diff --name-only main...HEAD`, keep entries matching `docs/**/*.mdx`. If the base is not `main`, use that instead.
88
+
4. Build the PR body by transforming the template:
89
+
- Under `## Description`, replace the `<!-- Briefly describe what this PR does and why. -->` comment with the summary bullets.
90
+
- Under `## Affected documents`, replace the bare `- ` line with the list of affected MDX files. Format each as a markdown link relative to the repo root: `- [filename.mdx](docs/full/path/filename.mdx)`. If there are no changed MDX files, write `- _No MDX files changed in this PR._`
91
+
- Leave the `## Related issue(s)` section's comment placeholder unchanged so the author can fill it in.
92
+
- Leave **all checklist items unchecked**, including the Lane 1 Technical edit checkbox. The author checks them as they complete each item; the workflow specifically depends on the Technical edit checkbox being present and unchecked at PR open time.
93
+
- Leave the `## Notes for reviewers` comment placeholder unchanged.
94
+
95
+
The result should be a complete copy of the template with the Description and Affected documents sections populated.
84
96
85
-
The summary should be based on ALL commits on the branch, not just the most recent one. Read through all the commit messages and the diff to understand the full scope.
0 commit comments