chore(rules): Configure AI agent rules and improve project guidelines#734
chore(rules): Configure AI agent rules and improve project guidelines#734
Conversation
- Add alwaysApply and inclusion fields to base.md frontmatter - Create symlinks for Cursor (.cursor/rules/base.mdc) and Kiro (.kiro/steering/base.md) - Update .gitignore to allow .cursor/rules/ directory - Enable rule sharing across multiple AI coding assistants - Fix trailing whitespace in base.md
…Claude commands - Add guideline to maintain feature-based directory structure and avoid cross-feature dependencies - Reorganize .claude/commands/ files into categorized subdirectories: - agent/ for AI agent-related commands - code/ for code quality commands - git/ for git workflow commands - Translate gemini-discuss.md and lint-fix.md to English - Improve code organization and maintainability guidelines
There was a problem hiding this comment.
Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.
WalkthroughThis update adds new documentation and configuration files referencing a central rules file, updates the central rules file with additional metadata and guidelines, and modifies the Changes
Possibly related PRs
✨ Finishing Touches🧪 Generate 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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
|
Claude finished @yamadashy's task —— View job PR Review: AI Agent Rules Configuration and Project GuidelinesTasks:
SummaryThis PR effectively improves AI agent configuration and project organization. The changes are well-structured and address real needs for cross-tool compatibility and better command organization. Detailed Review✅ Strengths1. Frontmatter Enhancement (
|
There was a problem hiding this comment.
Summary of Changes
Hello @yamadashy, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!
This pull request focuses on standardizing and improving the project's development environment by enhancing AI agent rules, refining coding guidelines, and reorganizing AI-assisted command structures. The changes aim to foster greater consistency across various AI coding assistants, enforce better code organization, and streamline the use of AI-driven development tools, ultimately contributing to a more maintainable codebase and an improved developer experience.
Highlights
- AI Agent Rules Configuration: Configured core AI agent rules in
.agents/rules/base.mdwithalwaysApply: trueandinclusion: alwaysto ensure consistent application. Symlinks (.cursor/rules/base.mdcand.kiro/steering/base.md) were created to enable rule sharing across Cursor AI and Kiro AI, improving consistency across different AI coding tools. - Enhanced Coding Guidelines: Added a new coding guideline to
.agents/rules/base.mdemphasizing the maintenance of a feature-based directory structure and the avoidance of cross-feature dependencies, aiming to improve overall code organization and maintainability. - Claude Commands Reorganization: Reorganized Claude AI command files into categorized subdirectories (
agent/,code/) for better structure and accessibility. New commands likegemini-discuss.mdandlint-fix.mdwere added within these new categories.
Using Gemini Code Assist
The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.
Invoking Gemini
You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.
| Feature | Command | Description |
|---|---|---|
| Code Review | /gemini review |
Performs a code review for the current pull request in its current state. |
| Pull Request Summary | /gemini summary |
Provides a summary of the current pull request in its current state. |
| Comment | @gemini-code-assist | Responds in comments when explicitly tagged, both in issue comments and review comments. |
| Help | /gemini help |
Displays a list of available commands. |
Customization
To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.
Limitations & Feedback
Gemini Code Assist is currently in preview and may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments to provide feedback.
You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.
Footnotes
-
Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution. ↩
There was a problem hiding this comment.
Pull Request Overview
This PR configures AI agent rules for cross-tool consistency, reorganizes Claude command files, and strengthens project coding guidelines.
- Expanded AI agent frontmatter with
alwaysApplyandinclusionand created symlink wrappers for Kiro and Cursor. - Reorganized Claude commands into
agent/,code/, andgit/subdirectories with English translations. - Added a guideline enforcing feature-based directory structure for improved maintainability.
Reviewed Changes
Copilot reviewed 5 out of 12 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| .kiro/steering/base.md | Added wrapper to include core agent rules |
| .cursor/rules/base.mdc | Added wrapper to include core agent rules |
| .claude/commands/code/lint-fix.md | Added documentation for lint-fix command |
| .claude/commands/agent/gemini-discuss.md | Added documentation for Gemini discussion workflow |
| .agents/rules/base.md | Enhanced frontmatter and added feature-based guideline |
Comments suppressed due to low confidence (3)
.claude/commands/agent/gemini-discuss.md:3
- [nitpick] The description references "Claude Code's accuracy" in a Gemini-focused command; this may confuse readers. Consider rephrasing to clarify the intended target (e.g., "project code" or remove the specific tool reference).
Conduct detailed discussions about current work and use Gemini CLI to improve Claude Code's accuracy through multi-faceted analysis and iterative improvements.
.agents/rules/base.md:3
- Add a brief comment or doc snippet explaining the purpose and valid values for the new
alwaysApplyandinclusionfrontmatter fields so maintainers understand when and how these rules are applied.
alwaysApply: true
Deploying repomix with
|
| Latest commit: |
8f0b74b
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://58093303.repomix.pages.dev |
| Branch Preview URL: | https://chore-rules.repomix.pages.dev |
There was a problem hiding this comment.
Code Review
This pull request effectively configures rules for AI agents and improves project guidelines. The changes are well-structured and align with the goal of enhancing developer experience and maintainability. I've left a few minor suggestions regarding file formatting to ensure consistency and adherence to best practices for text files. Overall, great work!
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #734 +/- ##
=======================================
Coverage 90.23% 90.23%
=======================================
Files 100 100
Lines 5768 5768
Branches 1205 1205
=======================================
Hits 5205 5205
Misses 563 563 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
.kiro/steering/base.md (1)
1-145: Same duplication issue as Cursor rules
base.mdis embedded rather than referenced, risking divergence between agents. Apply the same symlink/one-liner fix recommended for.cursor/rules/base.mdc.
🧹 Nitpick comments (3)
.agents/rules/base.md (1)
51-51: Clarify “feature-based directory” rule to avoid ambiguityThe new bullet is valuable, yet “feature” can be interpreted differently by backend vs. frontend teams. Consider adding a one-sentence example (e.g., src/user/, src/billing/) or linking to a doc so reviewers have a shared baseline.
.claude/commands/code/lint-fix.md (1)
1-1: Offer an auto-fix variantMost teams run
npm run lint -- --fixto resolve trivial issues automatically. Adding that note keeps the command self-contained.-Run `npm run lint` and fix any errors that occur. +Run `npm run lint -- --fix` to auto-resolve trivial issues, then address any remaining errors manually..claude/commands/agent/gemini-discuss.md (1)
7-9: Specify language for fenced code block (markdownlint MD040)Add a language identifier (
bashorshell) to silence linters and improve syntax highlighting.-``` -gemini -p "<discussion content>" -``` +```bash +gemini -p "<discussion content>" +```
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
.agents/rules/base.md(3 hunks).claude/commands/agent/gemini-discuss.md(1 hunks).claude/commands/code/lint-fix.md(1 hunks).cursor/rules/base.mdc(1 hunks).gitignore(0 hunks).kiro/steering/base.md(1 hunks)
💤 Files with no reviewable changes (1)
- .gitignore
🧰 Additional context used
📓 Path-based instructions (1)
.agents/rules/base.md
Instructions used from:
Sources:
📄 CodeRabbit Inference Engine
- .cursorrules
🧠 Learnings (4)
📓 Common learnings
Learnt from: CR
PR: yamadashy/repomix#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:20.939Z
Learning: Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: .cursorrules:0-0
Timestamp: 2025-06-30T16:07:18.316Z
Learning: Applies to .agents/rules/base.md : Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
.cursor/rules/base.mdc (2)
Learnt from: CR
PR: yamadashy/repomix#0
File: .cursorrules:0-0
Timestamp: 2025-06-30T16:07:18.316Z
Learning: Applies to .agents/rules/base.md : Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:20.939Z
Learning: Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
.kiro/steering/base.md (2)
Learnt from: CR
PR: yamadashy/repomix#0
File: .cursorrules:0-0
Timestamp: 2025-06-30T16:07:18.316Z
Learning: Applies to .agents/rules/base.md : Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:20.939Z
Learning: Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
.agents/rules/base.md (3)
Learnt from: CR
PR: yamadashy/repomix#0
File: .cursorrules:0-0
Timestamp: 2025-06-30T16:07:18.316Z
Learning: Applies to .agents/rules/base.md : Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:20.939Z
Learning: Check the rules written in `.agents/rules/base.md` as they contain important project-specific guidelines and instructions.
Learnt from: CR
PR: yamadashy/repomix#0
File: browser/CLAUDE.md:0-0
Timestamp: 2025-06-30T16:07:27.184Z
Learning: Applies to browser/app/_locales/[a-zA-Z-]*/ : Create a directory in app/_locales/[language_code]/ when adding a new language
🪛 markdownlint-cli2 (0.17.2)
.claude/commands/agent/gemini-discuss.md
7-7: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
🔇 Additional comments (2)
.agents/rules/base.md (1)
3-4: Validate custom front-matter keys with downstream tooling
alwaysApplyandinclusionlook sensible, but these keys are non-standard. Double-check that every consumer (Cursor, Kiro, Claude, docs generators, etc.) actually parses and honours them; otherwise they risk becoming dead config..cursor/rules/base.mdc (1)
1-145: Symlink intent lost – file now duplicates entire rulesetThe summary claims this is a symlink, yet the blob contains the full text of
.agents/rules/base.md. This will drift out of sync.Convert the file to a real Git symlink (or keep only the single relative path line) to guarantee a single source of truth.
# From repo root rm .cursor/rules/base.mdc ln -s ../../.agents/rules/base.md .cursor/rules/base.mdc git add .cursor/rules/base.mdcLikely an incorrect or invalid review comment.
Summary
This PR enhances the project's AI agent rules and development guidelines with the following improvements:
Key Changes
AI Agent Rules Configuration
alwaysApplyandinclusionfields to.agents/rules/base.mdfrontmatter.cursor/rules/base.mdcfor Cursor AI.kiro/steering/base.mdfor Kiro AI.gitignoreto allow.cursor/rules/directoryEnhanced Coding Guidelines
Claude Commands Reorganization
.claude/commands/files into categorized subdirectories:agent/for AI agent-related commandscode/for code quality commandsgit/for git workflow commandsImpact
Checklist