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
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."
Read a validated review report and implement actionable findings, prioritizing Critical and High severity items with clear implementation paths.
4
+
5
+
---
6
+
7
+
The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
8
+
9
+
User input:
10
+
11
+
$ARGUMENTS
12
+
13
+
## Goal
14
+
15
+
After a review has been validated via `/review-validate`, implement the remaining actionable findings from the review report. Focus on Critical and High priority items that have clear implementation paths, and update the review file so it reflects the current state using the same format as `.cursor/commands/review.md`.
16
+
17
+
**Note**: This command can be used alongside manual fixes. The author may choose to fix issues manually or use this command to automate implementation.
18
+
19
+
## Execution Steps
20
+
21
+
1.**Select Target Review File**
22
+
- If the user supplies a path, use it.
23
+
- Otherwise, pick the most recent `reviews/REVIEW_*.md` file. **Hard error**: If no review file found, fail with clear error message.
24
+
25
+
2.**Parse & Filter Findings**
26
+
- Read the review file and extract: Review Summary, Metrics, and Findings grouped by severity.
27
+
-**Include**: Critical and High severity findings with `file:line` references and explicit "Change:" recommendations.
28
+
-**Exclude**: Findings marked as "Out of scope", "Deferred", or requiring external clarification ("NEEDS CLARIFICATION").
29
+
-**Exclude**: Findings related to `PR_DESCRIPTION.md` (this file is for PR authoring and should not be modified).
30
+
-**User Override**: If `$ARGUMENTS` contains specific finding IDs (e.g., `--findings Spec-1`), implement only those.
Validate current specs after a review and refresh the existing review report to match the current state.
4
+
5
+
---
6
+
7
+
The user input to you can be provided directly by the agent or as a command argument - you **MUST** consider it before proceeding with the prompt (if not empty).
8
+
9
+
User input:
10
+
11
+
$ARGUMENTS
12
+
13
+
## Goal
14
+
15
+
After a review report exists in `reviews/`, re-check the current state, validate specs, and update that review file using the same format defined in `.cursor/commands/review.md`.
16
+
17
+
## Execution Steps
18
+
19
+
1.**Select Target Review File**
20
+
- If the user supplies a path, use it.
21
+
- Otherwise, pick the most recent `reviews/REVIEW_*.md`.
22
+
2.**Capture Baseline**
23
+
-**Ensure `main` is up-to-date**: `git fetch origin main:main` (if exists) or `git fetch origin main`.
24
+
- Record `git branch --show-current`, `git rev-parse main`, `git merge-base main HEAD`, and `git diff --stat main...HEAD`.
25
+
3.**Validate State**
26
+
- Run `uv run python scripts/check_docs.py` for spec integrity.
27
+
- If validation fails, capture errors as new findings.
28
+
4.**Re-evaluate Findings**
29
+
- Compare the current repo state to the review file contents.
30
+
- Remove or downgrade findings that no longer apply.
31
+
- Add new findings based on the current diff/state, using deterministic IDs that continue existing sequences.
32
+
-**Ignore `PR_DESCRIPTION.md`**: Do not flag issues in `PR_DESCRIPTION.md`; it is for PR authoring purposes only.
33
+
5.**Update Review Report**
34
+
- Keep the same template and formatting as `.cursor/commands/review.md`.
0 commit comments