Skip to content

chore: restructure Claude review prompt with clear sections and issues-only guidance#47

Merged
bkrem merged 2 commits intomasterfrom
chore/clean-up-claude-review-base-prompt
Oct 31, 2025
Merged

chore: restructure Claude review prompt with clear sections and issues-only guidance#47
bkrem merged 2 commits intomasterfrom
chore/clean-up-claude-review-base-prompt

Conversation

@bkrem
Copy link
Member

@bkrem bkrem commented Oct 31, 2025

Summary

Restructures the Claude Auto Review action prompt to improve clarity and prevent positive feedback in reviews.

Changes Made

  1. Organized prompt into clear markdown sections:

    • CRITICAL - OPERATING CONSTRAINTS - Operating rules and limitations
    • REVIEW SCOPE - Review scope and incremental review guidelines
    • REVIEW FOCUS AREAS - What to analyze for issues
    • AUTOMATED CHECKS - External domain and cache-control validation
    • RESPONSE FORMAT - Output formatting guidelines
  2. Added ISSUES-ONLY REPORTING guidance:

    • Explicitly prohibits Claude from praising code quality
    • Prevents pointing out good practices or using complimentary language
    • Clarifies Claude should only identify and report problems
    • Added critical reminders to skip commentary on well-functioning code
  3. Added concision directive:

    • Instructs Claude to be extremely concise and sacrifice grammar for concision
    • Applied to all review interactions
  4. Improved visual hierarchy:

    • Clear section headers with horizontal separators
    • Better grouping of related instructions
    • Easier to scan and understand prompt structure

Rationale

The previous prompt structure mixed different types of instructions together, making it harder to parse. More importantly, Claude was sometimes providing positive feedback or describing what was working well, which adds noise to PR reviews. This change ensures Claude's reviews are concise and focused exclusively on actionable issues that need fixing.

Test Plan

  • Deploy action and test on a PR with no issues (should output "✅ No issues found")
  • Deploy action and test on a PR with actual issues (should report only problems, no praise)
  • Verify incremental reviews work correctly
  • Confirm automated checks still function (external domains, cache-control)

…s-only guidance

- Organize prompt into distinct markdown sections (Operating Constraints, Review Scope, Focus Areas, Automated Checks, Response Format)
- Add critical ISSUES-ONLY REPORTING section preventing positive feedback
- Explicitly prohibit Claude from praising code or mentioning what works well
- Clarify that Claude should only report problems and skip well-functioning code
- Improve visual hierarchy with clear section headers
@claude
Copy link

claude bot commented Oct 31, 2025

Claude Code is working…

I'll analyze this and get back to you.

View job run

@lukaisailovic
Copy link

@bkrem I saw this online and tried it for a week or so, really does help. Would add it:

In all interactions be extremely concise and sacrifice grammar for the sake of concision.

Add Luka's suggestion to prioritize concise communication over grammar
@claude
Copy link

claude bot commented Oct 31, 2025

Claude finished @bkrem's task —— View job


Review Complete

Tasks:

  • Read the modified action.yml file
  • Analyze prompt restructuring and new sections
  • Check issues-only guidance implementation
  • Verify concision directive presence
  • Provide review feedback

Analysis

Reviewed prompt restructuring in claude/auto-review/action.yml. Changes improve organization and add explicit issues-only guidance.

Issues

Issue 1: Inconsistent section title formatting
File: claude/auto-review/action.yml:109

Section title "External Domain URL Detection" uses heading level 3 (###) while parent section uses level 2 (##). Same for "Static Resource Cache-Control Validation" at line 117. This breaks markdown hierarchy since both are subsections under "AUTOMATED CHECKS".

Suggestion: Either:

  • Change "## AUTOMATED CHECKS" to "### AUTOMATED CHECKS" to maintain consistent heading levels
  • OR change both subsections to plain bold text "External Domain URL Detection" and "Static Resource Cache-Control Validation"

Issue 2: Redundant emphasis in response format
File: claude/auto-review/action.yml:167-168

Two back-to-back CRITICAL bullets say essentially the same thing:

  • Line 167: "CRITICAL: Do NOT praise code, describe what works well, or use positive language"
  • Line 168: "CRITICAL: If something doesn't need fixing, don't mention it at all"

These overlap significantly with the already comprehensive ISSUES-ONLY REPORTING section (lines 54-68). The repetition reduces the impact of "CRITICAL" markers.

Suggestion: Remove one of these bullets or consolidate into single directive since issues-only reporting is already thoroughly covered above.

Issue 3: Missing horizontal separator consistency
File: claude/auto-review/action.yml:70, 88, 103

Horizontal separators (---) appear after sections at lines 70, 88, and 103, but not after the AUTOMATED CHECKS section (line 105-145). This creates inconsistent visual separation between major sections.

Suggestion: Add "---" separator after line 145 (end of AUTOMATED CHECKS section) before the project_context conditional block to maintain consistent section separation.

@bkrem
Copy link
Member Author

bkrem commented Oct 31, 2025

@bkrem I saw this online and tried it for a week or so, really does help. Would add it:

In all interactions be extremely concise and sacrifice grammar for the sake of concision.

Yeah great one liner, added, thank you 💯

@bkrem bkrem merged commit 8146dd1 into master Oct 31, 2025
@bkrem bkrem deleted the chore/clean-up-claude-review-base-prompt branch October 31, 2025 20:23

## REVIEW SCOPE

Review this pull request with focus on code quality, security, and best practices.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Redundant?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants