feat(core): add buzzword overuse evaluation rule#93
Conversation
|
Warning Review limit reached
Next review available in: 42 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughAdds a new "Buzzword overuse" critical-severity issue to the ChangesBuzzword overuse detection
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/core/src/evaluator/index.ts (1)
185-194: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winDecouple buzzword count from
issuesarray ordering.
issues.length >= 5only reflects anti-pattern matches because this block sits immediately after the anti-pattern loop and before any otherissues.pushcalls. That's an implicit ordering dependency — if a future rule is inserted earlier infindIssues(e.g., before line 185), the buzzword threshold will silently count unrelated issues instead of anti-pattern matches, contrary to the stated objective of countingUNIVERSAL_RULES.antiPatternsmatches specifically.♻️ Suggested refactor: use a dedicated counter
function findIssues(cv: string, _archetype: RoleArchetype) { const issues: EvaluationResult["issues"] = []; + let antiPatternMatches = 0; for (const pattern of UNIVERSAL_RULES.antiPatterns) { if (new RegExp(pattern.match, "i").test(cv)) { + antiPatternMatches++; issues.push({ element: pattern.name, why: pattern.why, fix: pattern.fix, severity: pattern.severity as "critical" | "major" | "minor", }); } } // Buzzword overuse: if 5+ anti-patterns matched, surface a critical issue - if (issues.length >= 5) { + if (antiPatternMatches >= 5) { issues.push({ element: "Buzzword overuse", - why: `Your CV triggered ${issues.length} cliche patterns. This signals AI-generated or template-copied content to screeners.`, + why: `Your CV triggered ${antiPatternMatches} cliche patterns. This signals AI-generated or template-copied content to screeners.`, fix: "Replace each flagged phrase with a specific achievement. One real number beats ten adjectives.", severity: "critical", }); }As per path instructions, "Prioritize correctness of rules, evaluator scoring, and types" — this reduces the risk of silently incorrect scoring if the function is later reordered.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/core/src/evaluator/index.ts` around lines 185 - 194, The buzzword threshold in findIssues is implicitly tied to issues.length, so it can drift if new rules add issues earlier in the function. Introduce a dedicated counter for UNIVERSAL_RULES.antiPatterns matches in packages/core/src/evaluator/index.ts, increment it inside the anti-pattern loop, and use that counter in the Buzzword overuse check instead of issues.length. Keep the critical issue push for “Buzzword overuse” unchanged, but make its condition depend only on the anti-pattern match count so ordering of other issues cannot affect it.Source: Path instructions
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@packages/core/src/evaluator/index.ts`:
- Around line 185-194: The buzzword threshold in findIssues is implicitly tied
to issues.length, so it can drift if new rules add issues earlier in the
function. Introduce a dedicated counter for UNIVERSAL_RULES.antiPatterns matches
in packages/core/src/evaluator/index.ts, increment it inside the anti-pattern
loop, and use that counter in the Buzzword overuse check instead of
issues.length. Keep the critical issue push for “Buzzword overuse” unchanged,
but make its condition depend only on the anti-pattern match count so ordering
of other issues cannot affect it.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: f5521b8b-0ee4-4c0a-b0c0-4eac39f15caa
📒 Files selected for processing (2)
packages/core/src/__tests__/evaluator.test.tspackages/core/src/evaluator/index.ts
9a80261 to
d56eccc
Compare
What does this PR do?
Adds a new CV evaluation rule that detects excessive buzzword usage.
The evaluator now counts how many entries from
UNIVERSAL_RULES.antiPatternsmatch a CV. When 5 or more cliché patterns are detected, it surfaces a critical issue named "Buzzword overuse", encouraging candidates to replace generic buzzwords with measurable achievements.This PR also adds a test case to verify the new behavior.
Related issue
Closes #43
Type of change
Checklist
Screenshots (if UI change)
Summary by CodeRabbit
New Features
Tests