agentleFS
davekilleendavekilleen/Dex/.cursor/rules/search-routing.mdc

Dex / rules

Cursor rule509 starsChanged 2 months agoMITView on GitHub

Smart Search Routing — always use QMD semantic search when available, never bypass with grep for vault content

The file

We split this search-routing.mdc into the rules it gives an agent

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

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈2

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 2

    Very specific

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

  • Common
  • Distinctive
  • Very specific
  1. Distinctive:

    Before ANY vault search operation, check QMD availability:

    line 9
  2. Very specific:

    Use qmd query "your intent" -c <collection> for all vault content searches:

    line 19
  3. Very specific:

    Never: use grep -r or file globbing for natural language vault searches

    line 41
  4. Distinctive:

    Always: check availability first — QMD unavailable = grep fallback, not skip

    line 42

≈ “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
search-routing.mdc
---
description: Smart Search Routing — always use QMD semantic search when available, never bypass with grep for vault content
globs: ["**"]
alwaysApply: true
---

# Smart Search Routing (All Platforms)

Before ANY vault search operation, check QMD availability:

```bash
node .scripts/semantic-search/check-availability.cjs --quiet
# Exit 0 = QMD available → use qmd query
# Exit 1 = QMD unavailable → fall back to grep
```

## Collection Mapping

Use `qmd query "your intent" -c <collection>` for all vault content searches:

| Content Type | QMD Collection | Fallback Path |
|--------------|---------------|---------------|
| Meeting notes | `meetings` | `00-Inbox/Meetings` |
| Archived meeting notes | `meetings_archive` | `07-Archives/Meetings` |
| People / person pages | `people` | `05-Areas/People` |
| Projects / initiatives | `projects` | `04-Projects` |
| Accounts / deals | `accounts` | `05-Areas/Relationships/Key_Accounts` |
| Tasks | `tasks` | `03-Tasks` |
| Goals | `goals` | `01-Quarter_Goals` |
| Weekly priorities | `priorities` | `02-Week_Priorities` |
| PRDs / feature specs | `prds` | `System/PRDs` |
| Implementation plans | `plans` | `plans/` |
| Session learnings | `learnings` | `System/Session_Learnings` |
| Reference / guides | `resources` | `06-Resources` |
| Career / content / events | `areas` | `05-Areas` |
| LinkedIn / newsletter / YouTube intel | `intel` | `00-Inbox/*_Intel` |

## Rules

- **Never** hardcode vault folder paths for content covered by a QMD collection
- **Never** use `grep -r` or file globbing for natural language vault searches
- **Always** check availability first — QMD unavailable = grep fallback, not skip
- **Code files** (`.ts`, `.tsx`, `.py`, `.json`) are NOT in QMD — use grep/glob for those

## Example

```bash
# ✅ Correct — semantic intent, QMD routes it
qmd query "renewal risk accounts not touched" -c accounts

# ❌ Wrong — bypasses routing
grep -r "renewal" 05-Areas/Relationships/Key_Accounts/
```

This routing applies in Cursor, Claude Code, and Pi sessions — no exceptions.

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.

Reviews can't be read right now.

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.