Files
karuo-ai/.cursor/rules/codegraph.mdc
2026-07-19 00:21:46 +08:00

32 lines
1.3 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

---
description: 卡若AI F21a CodeGraph — 全项目读/写代码优先语义图谱(真源在火种 Skill
alwaysApply: true
---
<!-- CODEGRAPH_START · 卡若AI F21a -->
## CodeGraph全局 · 不依赖业务仓科室)
**真源 Skill**`04_卡火/火种_知识模型/CodeGraph_MCP语义代码图谱/SKILL.md`
MCP 由 **卡若AI 全局脚本** 启动(`~/.cursor/mcp.json` → `codegraph_mcp_serve.sh``${workspaceFolder}` 自动指向当前工作区根。**禁止**在各业务仓重复写 `.cursor/mcp.json` 的 codegraph 条目。
### 调用链(强制)
```
读/写/改代码 → 读 F21a SKILL → codegraph_* MCP
MCP 不可用 → bash …/CodeGraph_MCP语义代码图谱/脚本/codegraph_cli.sh
无 .codegraph → bash …/codegraph_init_repo.sh <仓库根>
```
### 工具选型
| 场景 | 工具 |
|:---|:---|
| 任务上下文 | `codegraph_context` → `codegraph_explore` |
| 找符号 | `codegraph_search` |
| 调用链 | `codegraph_callers` / `codegraph_callees` |
| 改公共 API | 改前 search改后 `codegraph_impact` |
| 字面量/日志 | grep/read |
**通用**存客宝、工作手机、神射手、AI数智员工等**任意**开发仓库均同一套 F21a仅需该仓根目录有 `.codegraph/` 索引。
<!-- CODEGRAPH_END -->