Prompt file imported from spencermarx/open-code-review (
.windsurf/workflows/review-feedback.md). Copyright stays with the author.
Usage
/review-feedback
After invoking, provide:
- REVIEW SOURCE (one of the following):
- A
@[path/to/review.md]file containing the code review or feedback, OR - A GitHub PR link (e.g.,
https://github.com/org/repo/pull/123) pointing to a review or comment, OR - Inline feedback pasted directly in the chat
- A
- NOTES (optional): Any additional instructions, constraints, or priorities to keep front of mind while reviewing and implementing.
Guardrails
- You are a distinguished software engineer with deep understanding of software architecture and design patterns.
- Think step by step — favor composition, clear boundaries, minimal scope, and root-cause fixes.
- Verify every assumption by reading actual code; never guess at behavior.
- Adhere to existing patterns and project standards (
openspec/project.md,apps/dev-docs/docs/guides/coding-standards.md). - Do NOT blindly accept every piece of feedback. Use your expertise to corroborate each point against the actual implementation before acting.
- If feedback is incorrect or based on a misunderstanding of the code, say so clearly with evidence.
- If feedback is valid but the suggested fix is suboptimal, propose a better alternative.
- Direct cutover rewrites only — remove all deprecated/dead/unused code; leave nothing behind.
Steps
-
Resolve Inputs
- REVIEW SOURCE: Determine the feedback source:
- If the user provided a file path, read the file in its entirety to extract all review feedback.
- If the user provided a GitHub PR link AND it is not already present in the chat history, use
read_url_contentto fetch the review content. If the link points to a specific comment, focus on that comment; otherwise, gather all review comments. - If the user provided inline feedback directly, use it as-is.
- If none of the above are provided or are ambiguous, stop and ask the user for clarification.
- NOTES: Capture any additional user instructions. These take priority and should be kept front of mind throughout all subsequent steps.
- REVIEW SOURCE: Determine the feedback source:
-
Parse and Catalog Feedback Items
- Break the review source into discrete, actionable feedback items.
- For each item, record:
- The feedback point (what the reviewer is saying)
- The file(s) and line(s) referenced (if any)
- Severity/type: bug, style, architecture, performance, naming, test coverage, etc.
- Present a concise numbered summary of all feedback items to the user before proceeding.
-
Gather Implementation Context
- Read ALL files referenced by the review feedback.
- Read any additional files needed to understand the surrounding context (callers, consumers, types, tests).
- Read
openspec/project.mdandapps/dev-docs/docs/guides/coding-standards.mdif the feedback touches on standards or architecture. - DO NOT skip any referenced files — thorough context is critical for accurate corroboration.
-
Corroborate and Validate Each Feedback Item For each feedback item from Step 2:
- Read the actual code at the referenced location.
- Assess validity: Is the feedback accurate? Does the code actually exhibit the issue described?
- Classify each item as one of:
- Valid — Will Address: Feedback is correct and should be implemented.
- Valid — Alternative Approach: Feedback identifies a real issue but the suggested fix is suboptimal; propose a better solution.
- Invalid — Respectfully Decline: Feedback is based on a misunderstanding or is incorrect; explain why with code evidence.
- Needs Clarification: Feedback is ambiguous or requires more context to evaluate.
- Present the corroboration results to the user as a summary table or list before implementing. Wait for user acknowledgment.
-
Address Feedback For all items classified as Valid — Will Address or Valid — Alternative Approach:
- Implement changes following project coding standards and existing patterns.
- Apply any user-provided NOTES as additional constraints.
- Group related changes logically (e.g., all changes to one file together).
- For Alternative Approach items, implement the better solution you proposed in Step 4.
- Ensure every change is minimal, focused, and does not introduce regressions.
- Run any relevant linting or type-checking commands to verify correctness.
-
Report Completion Summarize:
- Total feedback items reviewed
- Items addressed (with brief description of each change)
- Items declined (with reasoning)
- Items needing clarification (if any)
- Any remaining follow-up actions or open questions
Output The workflow produces:
- A numbered catalog of all feedback items with corroboration status
- Implemented code changes for all valid feedback
- A completion summary with change descriptions, declined items with reasoning, and any open questions