Skip to content

feat: restructure review prompt with caveman pipeline approach - #19

Merged
anuragk16 merged 3 commits into
mainfrom
feat/codereview-caveman-output
Apr 15, 2026
Merged

anuragk16 merged 3 commits into
mainfrom
feat/codereview-caveman-output

Conversation

@anuragk16

@anuragk16 anuragk16 commented Apr 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Restructures the Claude code review prompt using a caveman pipeline approach — separates internal reasoning from output style
  • Rewrites the guidelines template to be terse by default, so projects inherit compact guidelines without any tooling dependency

What changed

claude-code-review.yml — prompt restructured into 3 layers:

  • Reasoning mode (internal): Claude told to think terse and focused — reduces reasoning verbosity without affecting output quality
  • Output style (caveman-light): No filler, hedging, or pleasantries. Direct language, full sentences. ~30-40% shorter comments than before
  • Severity prefixes: bug: / risk: / nit: / q: per finding, format <file>:L<line>: <severity>: <problem>. <fix>.

automated-code-review/templates/review-guidelines.md — rewritten terse:

  • Removed verbose prose from the template
  • Projects that copy this template inherit compact guidelines by default
  • No caveman-compress tool or any external dependency needed

Why caveman-light over full caveman

Full caveman output (fragments, dropped articles) hurt PR comment readability with minimal extra token savings. Caveman-light keeps full sentences but removes all fluff — better tradeoff for human-facing output.

Token impact

Layer Savings
Guidelines input Smaller template = fewer input tokens per run
Reasoning Less verbose internal processing
Output ~30-40% shorter PR comments

Thinking tokens (billed same as output) are not controllable via prompt — model decides thinking depth based on complexity.

No new dependencies

Projects do not need to install caveman plugin or run any tool. All optimization is baked into the shared workflow prompt and the guidelines template.

Test plan

  • Trigger review by applying ready for review label on a test PR
  • Verify comment uses <file>:L<line>: [bug|risk|nit|q]: format
  • Verify no filler phrases ("I noticed", "you might want to", "consider")
  • Verify security findings still get full paragraph explanation
  • Verify no section headers (Critical Issues / Suggestions / etc.)

🤖 Generated with Claude Code

anuragk16 and others added 2 commits April 15, 2026 19:31
Separates internal reasoning (terse caveman-full) from output style (caveman-light).
Reasoning mode compresses how Claude thinks through the diff without impacting
comment readability. Output switches from full caveman to caveman-light — no filler
or hedging, but full sentences and clear explanations preserved.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
Removes verbose prose from the template so projects inherit compact guidelines
by default. No caveman-compress dependency needed — small files stay small naturally.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@anuragk16 anuragk16 self-assigned this Apr 15, 2026
@anuragk16
anuragk16 marked this pull request as ready for review April 15, 2026 14:14
@anuragk16

This comment was marked as resolved.

HTML comment was invisible in rendered Markdown. Converted back to a
blockquote so teams copying the template can see the multi-file guidance.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
@anuragk16
anuragk16 merged commit 823f6c4 into main Apr 15, 2026
1 check failed
anuragk16 added a commit that referenced this pull request Apr 17, 2026
Reverts changes from PR #18 and PR #19 that applied caveman-style
formatting to the code review workflow prompt and guidelines template.

Co-Authored-By: Claude Sonnet 4.6 <[email protected]>
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.

1 participant