Understanding the Severity Prefixes (π΄/π‘/π΅/β) in caveman-review Comments
The caveman-review tool uses four emoji prefixesβπ΄ bug, π‘ risk, π΅ nit, and β questionβto instantly communicate the severity and nature of each code review finding.
When you run code reviews in the JuliusBrussee/caveman repository, the caveman review command annotates every generated comment with a colored emoji that signals how critical the issue is. These severity prefixes in caveman-review comments follow a strict classification defined in the skill configuration, allowing developers to prioritize fixes at a glance without parsing lengthy explanations.
What Each Severity Prefix Means in caveman-review
The canonical definitions are established in skills/caveman-review/SKILL.md at lines 17β20, with additional context in skills/caveman-review/README.md. Each emoji maps to a specific classification that determines how the author should respond.
π΄ Bug β Critical Defects
π΄ (Red circle) marks a bugβbroken behavior that will cause an incident or defect and must be fixed before merge. These represent hard errors or guaranteed runtime failures.
π‘ Risk β Fragile Code
π‘ (Yellow circle) indicates riskβcode that functions today but is fragile. This includes race conditions, missing null checks, swallowed errors, or patterns that could escalate into production problems under future changes.
π΅ Nit β Style and Polish
π΅ (Blue circle) denotes a nitβstylistic, naming, or micro-optimization issues. These are optional suggestions that authors can ignore without functional impact, though they may improve maintainability.
β Question β Clarification Requests
β (Question mark) signals a questionβa genuine query about intent or unclear logic. Unlike other prefixes, this is not a directive to change code but a request for clarification from the author.
How caveman-review Generates Severity Prefixes
When the caveman-review command executes, it analyzes the diff and classifies each finding according to the schema documented in src/plugins/opencode/commands/caveman-review.md at line 7. The output follows a standardized format that places the emoji immediately after the line reference:
L<line>: <severity> <problem>. <fix>.
Concrete examples from the documentation include:
L42: π΄ bug: user can be null after .find(). Add guard before .email.
L88β140: π΅ nit: 50βline fn does 4 things. Extract validate/normalize/persist.
L23: π‘ risk: no retry on 429. Wrap in withBackoff(3).
L107: β q: why drop the cache here?
Parsing caveman-review Output Programmatically
You can consume these severity prefixes programmatically to route findings to appropriate handlers. The emojis map to the lowercase severity strings defined in skills/caveman-review/SKILL.md.
import { parseReview } from '@caveman/review-utils';
// Suppose `output` is the raw string from `caveman review`
const findings = parseReview(output);
findings.forEach(f => {
switch (f.severity) {
case 'bug': handleCritical(f); break; // π΄
case 'risk': handleRisk(f); break; // π‘
case 'nit': handleNitpick(f); break; // π΅
case 'question': askAuthor(f); break; // β
}
});
Source Files Defining Severity Prefixes
The severity prefix system is distributed across several files in the JuliusBrussee/caveman repository:
skills/caveman-review/SKILL.md(lines 17β20): Canonical definitions of bug, risk, nit, and question.skills/caveman-review/README.md(lines 7β9): Overview of the comment format and severity meanings.src/plugins/opencode/commands/caveman-review.md(line 7): Documentation of the command output format and emoji placement.README.md(line 143): Brief emoji legend in the root documentation.
Summary
- π΄ bug indicates critical defects that must be fixed immediately to prevent incidents.
- π‘ risk flags fragile code that works now but could cause future failures.
- π΅ nit marks optional style, naming, or micro-optimization improvements.
- β question requests clarification on intent rather than prescribing changes.
- Definitions reside in
skills/caveman-review/SKILL.mdand the format is enforced by the command implementation insrc/plugins/opencode/commands/caveman-review.md.
Frequently Asked Questions
What is the difference between π΄ bug and π‘ risk in caveman-review?
A π΄ bug represents definitively broken behavior that will cause an error or incident, while a π‘ risk indicates code that functions correctly but contains fragilityβsuch as missing null checks or lack of retry logicβthat could fail under specific conditions or future changes.
Can I disable π΅ nit comments in caveman-review output?
The severity prefixes are fixed classifications hardcoded into the review format. While you cannot disable generation at the source, you can filter the output programmatically by checking for the nit severity string or π΅ emoji when parsing results.
Where are the severity emoji definitions stored in the caveman repository?
The canonical definitions are located in skills/caveman-review/SKILL.md at lines 17β20, with supplementary documentation in skills/caveman-review/README.md and the command reference at src/plugins/opencode/commands/caveman-review.md.
Does the β question prefix require action from the author?
Unlike π΄, π‘, or π΅, the β question prefix is not a directive to modify code but a request for explanation. Authors should respond to clarify intent, but no code change is strictly required unless the discussion reveals an underlying issue.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too β