chore: split cursor rules into focused files and improve tooling#823
chore: split cursor rules into focused files and improve tooling#823
Conversation
- Split monolithic project-rules.mdc into focused rule files with proper frontmatter and glob patterns (project-overview, handler- development, testing, coding-standards, ci-workflows) - Add GCP log analysis rule with query templates and MCP workarounds - Add cursor-tooling awareness rule listing available agents/commands/skills - Add deployment-ops agent for post-deploy health checks and troubleshooting - Fix serve-docs command to use direct venv binaries instead of source - Fix add-handler skill to use ESM syntax matching the project Signed-off-by: Tomer Figenblat <[email protected]> Co-authored-by: Cursor <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 📝 WalkthroughWalkthroughSplits and expands the monolithic project rules into focused Cursor documentation: adds deployment ops, CI workflows, coding standards, GCP log analysis, handler development, project overview, testing, and tooling docs; removes the old Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #823 +/- ##
=======================================
Coverage 99.21% 99.21%
=======================================
Files 8 8
Lines 1022 1022
=======================================
Hits 1014 1014
Misses 8 8 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
.cursor/rules/handler-development.mdc (1)
9-16: Optional: add error-handling rule to complete the handler contract.The retrieved learnings include a rule — "Always catch and report API errors in handler logic" — that isn't surfaced here. The rule file is the primary guidance an AI agent will consult when working in
src/handlers/, so omitting it risks newly generated handlers silently swallowing errors.✏️ Suggested addition
Every handler in `src/handlers/` MUST export: 1. `match(context)` - Returns boolean, determines if handler should run 2. `run(context, config, startedAt)` - Async function that executes handler logic +3. Always catch and report API errors inside `run()` — do not let errors propagate silentlyBased on learnings: "Applies to src/handlers/*.js : Always catch and report API errors in handler logic."
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.cursor/rules/handler-development.mdc around lines 9 - 16, Add a mandatory error-handling rule to the handler spec: require that every handler exporting match(context) and run(context, config, startedAt) must catch and report API errors (e.g., network/HTTP errors) inside run, log the error details, and ensure the PR lifecycle is honored by updating the check-run to a completed state with an appropriate failing conclusion when an error occurs; reference match(context) and run(context, config, startedAt) in the rule and explicitly state that handlers must not silently swallow exceptions but must surface them to processLogger/check-run update logic.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.cursor/agents/deployment-ops.md:
- Line 5: Add a blank line after each second-level heading to satisfy
markdownlint MD022: insert an empty line immediately after the "## Environment",
"## Capabilities", and "## Post-Deploy Health Check" headings so that each
heading is followed by a blank line before the next paragraph or content.
- Line 47: Edit the line that reads "Compare revision name to previous to
confirm new revision is active" and replace the phrase "previous to" with
"before" so it reads "Compare revision name to before to confirm new revision is
active" (better: "Compare revision name to the previous one to confirm the new
revision is active"); update the sentence text in
.cursor/agents/deployment-ops.md accordingly.
In @.cursor/rules/cursor-tooling.mdc:
- Around line 8-10: The file has a duplicated heading—use the plural "## Agents"
block (the existing "## Agents (.cursor/agents/)" list) and move the misplaced
`deployment-ops` entry from the second "## Agent" heading into that first list,
then remove the second "## Agent" heading entirely so all agent entries
(including `code-reviewer`, `docs-writer`, and `deployment-ops`) live under a
single consistent "## Agents" section.
---
Nitpick comments:
In @.cursor/rules/handler-development.mdc:
- Around line 9-16: Add a mandatory error-handling rule to the handler spec:
require that every handler exporting match(context) and run(context, config,
startedAt) must catch and report API errors (e.g., network/HTTP errors) inside
run, log the error details, and ensure the PR lifecycle is honored by updating
the check-run to a completed state with an appropriate failing conclusion when
an error occurs; reference match(context) and run(context, config, startedAt) in
the rule and explicitly state that handlers must not silently swallow exceptions
but must surface them to processLogger/check-run update logic.
- Add blank lines after headings in deployment-ops.md (MD022) - Fix wording "previous to" -> "the previous one to" - Merge duplicate Agents section in cursor-tooling.mdc Signed-off-by: Tomer Figenblat <[email protected]> Co-authored-by: Cursor <[email protected]>
|
@coderabbitai resolve |
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.cursor/agents/deployment-ops.md:
- Line 30: Several sub-headings inside the document (notably "### Service not
ready" under "Troubleshooting Playbook" and the "## Deployment Verification"
section) are missing a blank line after the heading which triggers MD022; fix by
inserting a single empty line immediately after each affected heading (e.g.,
after "### Service not ready", after other "###" sub-headings referenced on
lines 34, 38, 43, and after "## Deployment Verification" on lines 47-48) so
every heading is followed by a blank line before the next content block.
✅ Actions performedComments resolved. Auto-approval is disabled; enable |
Add blank lines after all ### sub-headings and ## Deployment Verification. Signed-off-by: Tomer Figenblat <[email protected]> Co-authored-by: Cursor <[email protected]>
Summary
project-rules.mdcinto 6 focused rule files with proper frontmatter, glob patterns, and apply modes (always, file-pattern, intelligent)gcp-log-analysis.mdcrule with query templates and GCP MCP tool workaroundscursor-tooling.mdcawareness rule so the agent knows about available agents, commands, and skillsdeployment-opsagent for post-deploy health checks and GCP troubleshootingserve-docscommand to use direct venv binaries instead ofsource activateadd-handlerskill to use ESM syntax (export default) matching the projectNew Rule Files
project-overview.mdchandler-development.mdcsrc/handlers/**testing.mdctests/**coding-standards.mdc**/*.jsci-workflows.mdc.github/workflows/**gcp-log-analysis.mdccursor-tooling.mdcSummary by CodeRabbit
Documentation
Chores
Refactor