agentleFS
h0rn3th0rn3t/graft/.cursor/rules/graft.mdc

graft / rules

Cursor rule9 starsChanged 22 days agoMITView on GitHub

Use the Graft context graph in graft/ before exploring source

We split this graft.mdc into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈0

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 1

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Use --in when the relevant path is already known.

    line 14

≈ “Common” is an estimate: at least 1 in 5 of the 6,350 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
graft.mdc
---
description: Use the Graft context graph in graft/ before exploring source
alwaysApply: true
---
## Graft — repo context graph

This repo is indexed in `graft/`: a prebuilt graph of every symbol, its exact
file:line span, and who calls what. Get context from graft before grepping or
opening source files. Every query refreshes the graph first, so results include
uncommitted edits; there is no need to run `graft build` after editing.

- `graft ask "<question>" --source`: how X works or where Y lives, as ranked
  hits with code excerpts inlined. For a known symbol, call `graft read` directly.
  Use `--in` when the relevant path is already known.
- `graft grep "<name or literal>"`: every occurrence over indexed files, grouped
  by enclosing symbol. Use it only when you need every occurrence. A symbol you
  can already name is `graft read`; several go in one call with repeated `--also`.
  Raw `grep -rn` is only for files graft doesn't index.
- `graft skeleton <file>`: a file's signatures and spans, ~10× cheaper than
  reading it.
- `graft read <symbol>`: first choice for a known symbol; no preceding search
  or skeleton call is needed. Returns the complete source plus its
  same-directory callees. Use `path::name` or a node ID to disambiguate.
  Collect related definitions together with repeated `--also <symbol>`.
  A definition over the budget comes back as an outline of its members or its
  head, with `⋮` lines naming what was left out: read those by name.
- `graft callers <symbol>`: exact call edges. `--direction out` for
  dependencies, `--depth 2` before a rename or signature change, `--depth all`
  before a multi-file refactor.
- `graft map`: orientation when you're new to the repo.

Act on the answer: cite and edit from the returned spans without re-opening
files to confirm them. Weak hits mean switch tool, not re-ask the same question
reworded; a `[graft] weak match` notice names the tool and term to try. When an
excerpt ends in `… +N lines`, use `graft read path::name` to expand that symbol,
never the whole file. In a multi-repo workspace, hits carry `[scope/]`
labels; narrow with `--in <scope>/`. With the graft MCP server connected, the
same tools are `graft_find_code`, `graft_find_all`, `graft_file_api`,
`graft_trace_calls`, `graft_read_symbol` and `graft_repo_map`.

Download now (ZIP)

  • Where files are headingNew Cursor rule files have more rules about planning and tracking tasks, and fewer about code style.

    Of the Cursor rule files we read, the 3,978 first seen in the last six months, against the older ones: the kind of rule that gained most share, and the kind that lost most. About files like this in general, not this one, and an estimate, since a kind is a pattern in the words.

  • In this repositoryOne other file it gives its agents.

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.