Prompt file imported from zacol/happyrisk (
.windsurf/workflows/coderabbit-fix-finding.md). Fill in{{issue}},{{prompt}}before use. Copyright stays with the author.
coderabbit-fix-finding
Description
Verify and resolve a Code Rabbit review finding using the issue description and the AI agent remediation prompt provided by Code Rabbit.
Use this workflow when:
- Code Rabbit reports an issue in a file
- The review includes both a finding description and an AI remediation prompt
- You want to validate the finding before applying any fix
- You want to avoid fixing false positives or outdated comments
Inputs
{{issue}}
The Code Rabbit issue description explaining the reported problem.
Example:
Clarify SLACK_REDIRECT_URI fail-fast behavior.
Line 26 lists SLACK_REDIRECT_URI as a required environment variable, but line 31 only mentions SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, and SLACK_SIGNING_SECRET as variables that should trigger fail-fast in non-development environments. Should SLACK_REDIRECT_URI also be included in the fail-fast check, or is it acceptable for it to be missing?
{{prompt}}
The AI remediation instruction generated by Code Rabbit.
Example:
Verify each finding against the current code and only fix it if needed.
In @docs/slackIntegration.md around lines 26 - 31, update the security note to explicitly state whether SLACK_REDIRECT_URI is required at startup and, if required, include it alongside SLACK_CLIENT_ID, SLACK_CLIENT_SECRET, and SLACK_SIGNING_SECRET as a variable that triggers fail-fast in non-development environments...
Instructions
1. Analyze the Review Finding
Carefully read the reported issue:
{{issue}}
Determine:
- What inconsistency or defect is being reported
- Which file(s) are affected
- Whether the finding concerns:
- Documentation mismatch
- Code bug
- Missing validation
- Incorrect implementation
- Stale or outdated review feedback
2. Review Code Rabbit Suggested Fix Context
Read and interpret the remediation prompt:
{{prompt}}
Extract:
- Exact file(s) to inspect
- Relevant line ranges
- Expected corrective action
- Whether Code Rabbit suggests:
- Clarification only
- Code modification
- Documentation update
- Validation logic change
3. Verify Against Current Repository State
Inspect the current codebase before making changes:
- Open referenced files
- Review surrounding implementation context
- Confirm whether the issue still exists in the latest version
Important:
- Do not assume Code Rabbit is always correct
- Ignore findings already resolved by later edits
- Detect false positives
4. Apply Fix Only If Necessary
If the issue is valid:
- Implement the minimal correct fix
- Preserve existing style and conventions
- Avoid unrelated refactors
- Update only affected files
If the issue is no longer valid:
- Do not modify code unnecessarily
- Explain clearly why no change is needed
5. Validate the Result
After applying changes:
- Re-check consistency across related files
- Ensure documentation matches implementation
- Verify no contradictory behavior remains
Output Format
Status:
Fixed | No change needed
Summary:
<brief explanation of what was changed or why no fix was required>
Files Updated:
<list of modified files, if any>