Skip to content

Add Reference First rule to Build Tools and Development#334

Open
southyang99 wants to merge 1 commit into
PatrickJS:mainfrom
southyang99:main
Open

Add Reference First rule to Build Tools and Development#334
southyang99 wants to merge 1 commit into
PatrickJS:mainfrom
southyang99:main

Conversation

@southyang99

@southyang99 southyang99 commented Jul 17, 2026

Copy link
Copy Markdown

Summary

Contribution Type

  • New Cursor rule file or rules folder
  • Update/fix to an existing rule
  • New rules/*.mdc rule
  • Documentation or README cleanup

Value To Cursor Users

Added Or Changed Files

Quality Checklist

  • The contribution includes original rule content, or clearly credits the source.
  • New rule files use a descriptive kebab-case filename, such as react-typescript.mdc.
  • New rules/*.mdc files include frontmatter with a non-empty description, relevant globs, and alwaysApply: false unless the rule is universal.
  • README links use canonical GitHub URLs for repo files and point to the correct category.
  • The text is neutral and useful, not sales copy.
  • This is not a standalone external tool, product, directory, marketplace, or service listing.
  • No secrets, tokens, affiliate links, tracking links, or unrelated product claims are included.
  • I checked for duplicate or near-duplicate existing entries.

Notes For Maintainers

Summary by CodeRabbit

  • Documentation
    • Added a new Reference First guidance rule for scouting relevant references before proposing solutions or writing code.
    • Documented when the rule applies, required brief format, search limits, verification steps, and summary expectations.
    • Updated the Rules documentation to include the new guidance.

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Adds a new optional Cursor rule requiring reference scouting before implementation in applicable scenarios, and registers it in the README rules list.

Changes

Reference First rule

Layer / File(s) Summary
Rule definition
rules/reference-first.mdc
Defines optional rule metadata, reference-scouting triggers, the required brief format, and search and verification constraints.
README registration
README.md
Adds the Reference First rule to the Build Tools and Development list.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Possibly related PRs

Suggested reviewers: patrickjs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The template headings are present, but most required sections are left blank and need project-specific details. Fill in Summary, Value To Cursor Users, Added or Changed Files, and Notes For Maintainers, and complete the relevant checklist items.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly matches the change: adding the Reference First rule under Build Tools and Development.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

📥 Commits

Reviewing files that changed from the base of the PR and between b044f95 and e49857f.

📒 Files selected for processing (2)
  • README.md
  • rules/reference-first.mdc

Comment thread rules/reference-first.mdc
Comment on lines +8 to +14
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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 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.

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