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
docs: update PR description format and finding parsing guidelines
- Revised the structure of `PR_DESCRIPTION.md` to include the title as a markdown heading (`# Title`) followed by a summary section (`## Summary`).
- Clarified the process for extracting the title and description when updating GitHub PRs.
- Added a new section in `review-implement.md` detailing the format for parsing findings, including extraction of key components such as ID, severity, and change recommendations.
These updates aim to improve the clarity and usability of PR descriptions and enhance the documentation for implementing review findings.
Copy file name to clipboardExpand all lines: .cursor/commands/pr-desc.md
+15-17Lines changed: 15 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,10 +6,10 @@ Generate or update `PR_DESCRIPTION.md` so it reflects the current diff against t
6
6
7
7
For combined work across the backend API, CLI, and data models—call out each surface area's feature set, integration touchpoints, and manual verification steps independently so reviewers understand the scope split.
8
8
9
-
**IMPORTANT - Title vs Description Separation**:
10
-
- The PR **title** is stored separately and used for the GitHub PR `title` field (Conventional Commit format: `type(scope): description`)
11
-
- The PR **description** body starts with `## Summary`(NOT `# Title`) and is used for the GitHub PR `body` field
12
-
- When updating GitHub PRs, ensure the title does NOT appear as a markdown heading in the description body to avoid duplication
9
+
**IMPORTANT - Title Format**:
10
+
- The PR **title** is included as a `# Title` heading at the top of `PR_DESCRIPTION.md` (Conventional Commit format: `type(scope): description`)
11
+
- The PR **description** body starts with `## Summary`after the title heading
12
+
- When updating GitHub PRs, extract the title from the first line (`# Title`) and use it for the PR `title` field, and use the rest of the content (starting from `## Summary`) for the PR `body` field
13
13
14
14
**GitHub PR Sync**:
15
15
- After generating/updating `PR_DESCRIPTION.md` locally, the command will detect if there's an open PR for the current branch
@@ -184,18 +184,18 @@ Based on the file analysis from Step 2, automatically determine which testing ap
184
184
- Custom notes under **Additional Notes** are preserved unless clearly obsolete.
185
185
- Previous manual edits provided via $ARGUMENTS are respected.
186
186
3. Overwrite (or create) `PR_DESCRIPTION.md` with the following sections, in template order, incorporating any human-provided clarification answers into the relevant sections and removing resolved `Clarification Needed` items.
187
-
-**CRITICAL**: The file should start with `## Summary` (not `# Title`). The title is stored separately and should NOT appear as a markdown heading in the description body.
188
-
- When updating GitHub PRs, use the title for the PR `title` field and the description content (starting from `## Summary`) for the PR `body` field.
187
+
-**CRITICAL**: The file should start with `# Title` as a markdown heading, followed by `## Summary`. The title is included as the first line of the file.
188
+
- When updating GitHub PRs, extract the title from the first line (`# Title`) and use it for the PR `title` field, and use the rest of the content (starting from `## Summary`) for the PR `body` field.
189
189
190
190
### Title
191
191
192
-
-**IMPORTANT**: The title is separate from the description body. Generate ONLY the title text (no markdown heading, no `#` prefix).
192
+
-**IMPORTANT**: The title is included as a `# Title` markdown heading at the top of `PR_DESCRIPTION.md`.
193
193
- Provide a Conventional Commit-style title (`type(scope): description`) following the [Conventional Commits v1.0.0](https://www.conventionalcommits.org/en/v1.0.0/) specification. Derive the subject from the current diff and `.github/pull_request_template.md`, not from any previously generated `PR_DESCRIPTION.md`.
194
194
-**Analyze the diff to determine the primary change type**: Use the file changes and modifications to identify if this is a `feat`, `fix`, `refactor`, `test`, `docs`, etc.
195
195
-**Scope identification**: Look at which components were most heavily modified to determine the scope (e.g., `api`, `cli`, `models`, `services`, `docs`).
196
196
-**Description synthesis**: Based on the actual changes observed in the diff, create a concise description that captures the essence of what was modified.
197
197
-**User clarification**: If the primary purpose isn't clear from the diff analysis, ask the user to clarify the main objective of these changes.
198
-
-**Store separately**: Save the title as a separate variable/field. When updating GitHub PRs, use the title for the `title` parameter and the description body (without title heading) for the `body` parameter.
198
+
-**Format**: Write the title as `# type(scope): description` at the very beginning of `PR_DESCRIPTION.md`, followed by a blank line, then `## Summary`.
199
199
200
200
### Summary
201
201
@@ -298,10 +298,10 @@ Based on the file analysis from Step 2, automatically determine which testing ap
298
298
- Merge new review areas/testing steps with existing ones, de-duplicating while keeping stable ordering (stable = by file path).
299
299
- Retain any user-edited checklist states unless contradicted by automated checks.
300
300
3. Save the file at the repository root: `$REPO_ROOT/PR_DESCRIPTION.md`.
301
-
-**File format**: The file should start directly with `## Summary` (no title heading). Store the title separately.
301
+
-**File format**: The file should start with `# Title` as a markdown heading, followed by a blank line, then `## Summary`.
302
302
-**GitHub PR updates**: When updating GitHub PRs via API, use:
303
-
-`title`: The Conventional Commit-style title (e.g., `docs: restructure documentation and improve code quality`)
304
-
-`body`: The full content from `PR_DESCRIPTION.md` starting from `## Summary` (do NOT include the title as a heading)
303
+
-`title`: Extract the title from the first line of `PR_DESCRIPTION.md` by removing the `# ` prefix (e.g., if file starts with `# docs: restructure documentation`, use `docs: restructure documentation`)
304
+
-`body`: The full content from `PR_DESCRIPTION.md` starting from `## Summary` (do NOT include the title heading)
305
305
4. Print (or log) a short status summary for the user including: title string, number of files changed, and whether the checklist sync item is checked.
306
306
307
307
5.**GitHub PR Sync (Optional)**:
@@ -312,16 +312,14 @@ Based on the file analysis from Step 2, automatically determine which testing ap
312
312
- Find a PR where the head branch matches the current branch (check `head.ref` field)
313
313
-**Prompt user**: If an open PR is found, ask the user: "Found open PR #X for branch 'Y'. Would you like to update the PR title and description on GitHub with the generated content? (yes/no)"
314
314
-**Update PR if confirmed**: If the user confirms "yes" (or if `$ARGUMENTS` contains `--sync` or `--update-pr`):
315
-
-**Extract title**:
316
-
- First, check if `PR_TITLE.txt` exists and read from it
317
-
- If not, generate the title using the same logic from step 3 (Conventional Commit format based on diff analysis)
318
-
-**Extract description**: Read the full content from `PR_DESCRIPTION.md` (it should start with `## Summary`, not `# Title`)
315
+
-**Extract title**: Read the first line of `PR_DESCRIPTION.md` (should be `# type(scope): description`) and remove the `# ` prefix to get the title
316
+
-**Extract description**: Read the full content from `PR_DESCRIPTION.md` starting from `## Summary` (skip the title heading and blank line)
319
317
-**Update PR**: Use GitHub MCP `update_pull_request` tool with:
320
318
-`owner`: Repository owner
321
319
-`repo`: Repository name
322
320
-`pullNumber`: The PR number found
323
-
-`title`: The Conventional Commit-style title (without markdown formatting)
324
-
-`body`: The full content from `PR_DESCRIPTION.md`(starting from `## Summary`, ensuring no title heading is included)
321
+
-`title`: The Conventional Commit-style title extracted from the first line (without the `# `markdown heading prefix)
322
+
-`body`: The full content from `PR_DESCRIPTION.md` starting from `## Summary` (do NOT include the title heading)
325
323
-**Print confirmation**: "✓ Updated PR #X on GitHub: title and description synced"
326
324
-**Skip if no PR found**: If no open PR is found, print: "No open PR found for current branch. PR description saved locally in `PR_DESCRIPTION.md`. You can create a PR or update manually later."
327
325
-**Skip if user declines**: If user declines or answers "no", print: "PR description saved locally in `PR_DESCRIPTION.md`. You can update the PR manually when ready."
0 commit comments