Add Reference First rule to Build Tools and Development#334
Conversation
📝 WalkthroughWalkthroughAdds a new optional Cursor rule requiring reference scouting before implementation in applicable scenarios, and registers it in the README rules list. ChangesReference First rule
Estimated code review effort: 1 (Trivial) | ~3 minutes Possibly related PRs
Suggested reviewers: 🚥 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.
Actionable comments posted: 1
🤖 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.
Inline comments:
In `@rules/reference-first.mdc`:
- Around line 8-14: Clarify the trigger policy in the reference-scouting rule:
run automatically only when a listed “When to trigger” condition matches, ask
whether to run it when applicability is ambiguous, and always honor an explicit
user request to skip references. Update the introductory “Force the step to
happen” wording and the corresponding guidance in the later section so these
precedence rules are consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: de91e816-2421-4a62-9799-0f8d40f0e62d
📒 Files selected for processing (2)
README.mdrules/reference-first.mdc
| Before building anything new, scout references first, then build. Force the step to happen and point the search in a useful direction; which references to pick and what to conclude stays with the user. | ||
|
|
||
| ## When to trigger | ||
|
|
||
| Output a short "Reference Scouting Brief" BEFORE proposing a solution or writing code when: starting a new project or product, adding a new feature, interaction paradigm, or page type, or entering an unfamiliar domain (new algorithm, category, or platform convention). | ||
|
|
||
| Do NOT trigger for bug fixes, changes that follow an existing in-project pattern, or pure copy tweaks. When unsure, ask "should we run the reference step this time?" — do not trigger by default. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Clarify the rule’s trigger precedence.
“Force the step to happen” conflicts with “do not trigger by default” and “the user can say skip references.” State one policy explicitly: trigger automatically only when the listed conditions match, ask when applicability is ambiguous, and always honor an explicit skip.
Also applies to: 23-25
🤖 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 `@rules/reference-first.mdc` around lines 8 - 14, Clarify the trigger policy in
the reference-scouting rule: run automatically only when a listed “When to
trigger” condition matches, ask whether to run it when applicability is
ambiguous, and always honor an explicit user request to skip references. Update
the introductory “Force the step to happen” wording and the corresponding
guidance in the later section so these precedence rules are consistent.
Summary
Contribution Type
rules/*.mdcruleValue To Cursor Users
Added Or Changed Files
Quality Checklist
react-typescript.mdc.rules/*.mdcfiles include frontmatter with a non-emptydescription, relevantglobs, andalwaysApply: falseunless the rule is universal.Notes For Maintainers
Summary by CodeRabbit