=== root/.cursor/mcp.json ===
{
  "mcpServers": {
    "gortex": {
      "args": [
        "mcp"
      ],
      "command": "gortex",
      "env": {
        "GORTEX_INDEX_WORKERS": "8"
      }
    }
  }
}
=== root/.cursor/rules/gortex-communities.mdc ===
---
description: Gortex code intelligence — prefer graph tools over file reads
alwaysApply: true
---

<!-- gortex:communities:start -->
- [example-community](.claude/skills/example/SKILL.md) — example routing block

<!-- gortex:communities:end -->
=== root/.cursor/rules/gortex-workflow.mdc ===
---
description: Gortex code intelligence — prefer graph tools over file reads
alwaysApply: true
---

## Gortex in Cursor

This repository wires the **gortex** MCP server via .cursor/mcp.json (merge-managed by Gortex).

**MANDATORY: use graph tools, not blind file reads**

You **MUST** prefer Gortex graph queries over text search and whole-file opens on every task. These are not suggestions.

- **Start** a new chat with **index_health** to confirm the daemon/index (cheap); use **graph_stats** only when you need node/edge counts or multi-repo orientation.
- **Use** **search_symbols**, **get_symbol_source**, **get_file_summary**, **get_call_chain**, **find_usages**, and **smart_context** instead of opening whole files or guessing with text search.
- Before any signature or API change, **run** **verify_change**; for test selection **run** **get_test_targets**.

**MANDATORY: session memory**

- **At session start**, call **distill_session** to recover decisions, pinned notes, and recent excerpts saved in prior sessions in this workspace.
- **At every decision point** (picking an approach, rejecting an alternative, spotting a non-obvious constraint), call **save_note** with `tags:"decision"` and mention affected symbol IDs in the body — they auto-link.
- **Before editing a symbol you've touched before**, call **query_notes** with `symbol_id:"<id>"` to surface prior warnings and decisions.

**MANDATORY: development memories (cross-session)**

- **Immediately after smart_context** on every task, call **surface_memories** with `task:"<task>"` and `symbol_ids:"<top hits>"` — returns memories ranked by anchor overlap, importance, pinning, recency.
- **When you find a durable invariant, gotcha, or decision worth teaching the team**, call **store_memory** with `kind:"<invariant|gotcha|convention|decision>"`, `symbol_ids:"<id>"`, `importance:5`. Pin load-bearing memories. Use `supersedes:"<old-id>"` when newer knowledge replaces older.
- Memories are workspace-wide and outlive sessions, agents, and teammates — every future agent inherits them.
