agentleFS
moeru-aimoeru-ai/auv/.cursor/rules/rust-rustrover-cargo.mdc

auv / rules

Cursor rule207 starsChanged 34 days agoApache-2.0View on GitHub

Rust edits use RustRover MCP for structure and Cargo for validation

The file

We split this rust-rustrover-cargo.mdc into the rules it gives an agent

7 rules. About 0 are common, 4 are distinctive, and 3 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈4

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 3

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    When this rule applies, treat RustRover MCP as the required structure layer and terminal Cargo as the required validation authority.

    line 9
  2. Very specific:

    Do not start with plain grep/rg for structural Rust work (types, traits, methods, callers).

    line 18
  3. Very specific:

    Prefer rename_refactoring for symbol renames across the workspace.

    line 23
  4. Distinctive:

    Run from repo root before claiming done:

    line 29
  5. Very specific:

    If CLI/MCP/command catalog behavior changed, also run:

    line 38
  6. Distinctive:

    If RustRover MCP is down or not indexed:

    line 46
  7. Distinctive:

    Do not bypass Cargo validation because IDE feedback looked clean.

    line 55

≈ “Common” is an estimate: at least 1 in 5 of the 6,668 Cursor rule files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
rust-rustrover-cargo.mdc
---
description: Rust edits use RustRover MCP for structure and Cargo for validation
globs: "**/*.rs,**/Cargo.toml,Cargo.toml,rustfmt.toml"
alwaysApply: false
---

# Rust: RustRover MCP + Cargo (AUV)

When this rule applies, treat RustRover MCP as the **required** structure layer and terminal Cargo as the **required** validation authority.

## Before editing Rust

1. Confirm RustRover MCP (`user-rustrover`) is available; read tool schemas before calling.
2. Locate symbols with MCP first:
   - `search_symbol` → `get_symbol_info`
   - `analyze_calls` when changing public APIs, traits, or call sites
   - `search_file` for crate/test/fixture paths
3. Do **not** start with plain `grep`/`rg` for structural Rust work (types, traits, methods, callers).
4. Plain text search is still OK for: docs, fixtures, JSON artifacts, logs, comments, literal CLI strings — after semantic lookup fails or target is non-code.

## While editing

- Prefer `rename_refactoring` for symbol renames across the workspace.
- Optional: `reformat_file` on touched files (helper only; not proof of correctness).
- Optional: `get_file_problems` / `build_project` for fast IDE feedback.

## After editing Rust (required)

Run from repo root before claiming done:

```sh
cargo fmt --check
cargo check
cargo test   # or a narrow filter when the slice is localized
git diff --check
```

If CLI/MCP/command catalog behavior changed, also run:

```sh
cargo run --quiet -- list-commands
```

## MCP unavailable

If RustRover MCP is down or not indexed:

1. Say so explicitly in the summary.
2. Fall back to `read` + minimal `rg` only for the assigned slice.
3. Still run the full Cargo validation block above — no skip.

## Non-goals

- RustRover build/diagnostics do **not** replace `cargo check` / `cargo test`.
- Do not bypass Cargo validation because IDE feedback looked clean.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.