@roarpeng/graphflow 1.7.7 → 1.7.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (97) hide show
  1. package/CHANGELOG.md +57 -2
  2. package/README.md +265 -264
  3. package/dist/config/embedding-factory.d.ts.map +1 -1
  4. package/dist/config/embedding-factory.js +8 -0
  5. package/dist/config/embedding-factory.js.map +1 -1
  6. package/dist/graph/artifact-manager.d.ts +1 -0
  7. package/dist/graph/artifact-manager.d.ts.map +1 -1
  8. package/dist/graph/artifact-manager.js +15 -8
  9. package/dist/graph/artifact-manager.js.map +1 -1
  10. package/dist/graph/file-indexer-walker.d.ts.map +1 -1
  11. package/dist/graph/file-indexer-walker.js +1 -0
  12. package/dist/graph/file-indexer-walker.js.map +1 -1
  13. package/dist/graph/file-watcher.d.ts.map +1 -1
  14. package/dist/graph/file-watcher.js +1 -0
  15. package/dist/graph/file-watcher.js.map +1 -1
  16. package/dist/graph/hit-diversify.js +1 -1
  17. package/dist/graph/hit-diversify.js.map +1 -1
  18. package/dist/graph/language-indexers/dart.d.ts +9 -0
  19. package/dist/graph/language-indexers/dart.d.ts.map +1 -0
  20. package/dist/graph/language-indexers/dart.js +225 -0
  21. package/dist/graph/language-indexers/dart.js.map +1 -0
  22. package/dist/graph/language-indexers/index.d.ts.map +1 -1
  23. package/dist/graph/language-indexers/index.js +2 -0
  24. package/dist/graph/language-indexers/index.js.map +1 -1
  25. package/dist/graph/language-indexers/tree-sitter-loader.d.ts +2 -1
  26. package/dist/graph/language-indexers/tree-sitter-loader.d.ts.map +1 -1
  27. package/dist/graph/language-indexers/tree-sitter-loader.js +5 -2
  28. package/dist/graph/language-indexers/tree-sitter-loader.js.map +1 -1
  29. package/dist/integrations/agent-mcp-installer.d.ts +8 -2
  30. package/dist/integrations/agent-mcp-installer.d.ts.map +1 -1
  31. package/dist/integrations/agent-mcp-installer.js +62 -1
  32. package/dist/integrations/agent-mcp-installer.js.map +1 -1
  33. package/dist/integrations/agent-profiles/index.d.ts +2 -0
  34. package/dist/integrations/agent-profiles/index.d.ts.map +1 -1
  35. package/dist/integrations/agent-profiles/index.js +2 -0
  36. package/dist/integrations/agent-profiles/index.js.map +1 -1
  37. package/dist/integrations/agent-profiles/profiles/opencode.d.ts +2 -0
  38. package/dist/integrations/agent-profiles/profiles/opencode.d.ts.map +1 -0
  39. package/dist/integrations/agent-profiles/profiles/opencode.js +28 -0
  40. package/dist/integrations/agent-profiles/profiles/opencode.js.map +1 -0
  41. package/dist/integrations/agent-profiles/skills/opencode.d.ts +2 -0
  42. package/dist/integrations/agent-profiles/skills/opencode.d.ts.map +1 -0
  43. package/dist/integrations/agent-profiles/skills/opencode.js +13 -0
  44. package/dist/integrations/agent-profiles/skills/opencode.js.map +1 -0
  45. package/dist/integrations/agent-profiles/types.d.ts +2 -2
  46. package/dist/integrations/agent-profiles/types.d.ts.map +1 -1
  47. package/dist/integrations/skill-installer.d.ts.map +1 -1
  48. package/dist/integrations/skill-installer.js +7 -0
  49. package/dist/integrations/skill-installer.js.map +1 -1
  50. package/dist/learning/embedding-quality.d.ts +4 -0
  51. package/dist/learning/embedding-quality.d.ts.map +1 -1
  52. package/dist/learning/embedding-quality.js +10 -0
  53. package/dist/learning/embedding-quality.js.map +1 -1
  54. package/dist/learning/embeddings.d.ts +31 -2
  55. package/dist/learning/embeddings.d.ts.map +1 -1
  56. package/dist/learning/embeddings.js +114 -22
  57. package/dist/learning/embeddings.js.map +1 -1
  58. package/dist/learning/episodic-memory.d.ts +3 -0
  59. package/dist/learning/episodic-memory.d.ts.map +1 -1
  60. package/dist/learning/episodic-memory.js +13 -0
  61. package/dist/learning/episodic-memory.js.map +1 -1
  62. package/dist/learning/skill-flywheel.d.ts +11 -0
  63. package/dist/learning/skill-flywheel.d.ts.map +1 -1
  64. package/dist/learning/skill-flywheel.js +85 -0
  65. package/dist/learning/skill-flywheel.js.map +1 -1
  66. package/dist/learning/skill-store.d.ts.map +1 -1
  67. package/dist/learning/skill-store.js +1 -0
  68. package/dist/learning/skill-store.js.map +1 -1
  69. package/dist/learning/skill-types.d.ts +1 -0
  70. package/dist/learning/skill-types.d.ts.map +1 -1
  71. package/dist/learning/skill-types.js.map +1 -1
  72. package/dist/surfaces/cli/index.js +44 -1
  73. package/dist/surfaces/cli/index.js.map +1 -1
  74. package/dist/surfaces/cli/output.d.ts.map +1 -1
  75. package/dist/surfaces/cli/output.js +5 -1
  76. package/dist/surfaces/cli/output.js.map +1 -1
  77. package/dist/surfaces/cli/runtime/graph.d.ts +1 -0
  78. package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
  79. package/dist/surfaces/cli/runtime/graph.js.map +1 -1
  80. package/dist/surfaces/cli/runtime/learning.d.ts +13 -0
  81. package/dist/surfaces/cli/runtime/learning.d.ts.map +1 -1
  82. package/dist/surfaces/cli/runtime/learning.js +27 -0
  83. package/dist/surfaces/cli/runtime/learning.js.map +1 -1
  84. package/dist/surfaces/cli/runtime/routing.d.ts.map +1 -1
  85. package/dist/surfaces/cli/runtime/routing.js +65 -0
  86. package/dist/surfaces/cli/runtime/routing.js.map +1 -1
  87. package/dist/surfaces/cli/runtime/types.d.ts +25 -0
  88. package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
  89. package/dist/surfaces/cli/runtime.d.ts +1 -1
  90. package/dist/surfaces/cli/runtime.d.ts.map +1 -1
  91. package/dist/surfaces/cli/runtime.js +5 -1
  92. package/dist/surfaces/cli/runtime.js.map +1 -1
  93. package/package.json +13 -8
  94. package/scripts/safe-postinstall.cjs +38 -1
  95. package/wasm/.grammar-version +1 -0
  96. package/wasm/tree-sitter-dart.wasm +0 -0
  97. package/wasm/tree-sitter-kotlin.wasm +0 -0
package/README.md CHANGED
@@ -1,24 +1,24 @@
1
1
  # GraphFlow
2
2
 
3
- > **Local-first 代码知识图谱 + 跨会话学习记�?* —�?不只是压缩上下文,还记住项目的决策与教训�?
3
+ > **Local-first ?????? + ????????* ?????????????????????????
4
4
 
5
- GraphFlow 把你的仓库变成一�?*可查询的代码图谱**,在 agent 读全文之前先返回压缩摘要与锚点(入门钩子�?*图谱 + 90%+ token 压缩**);更进一步,它用 **Episodic / Skill / Decision 节点**把每次任务的决策与教训沉淀回图谱,形成跨会话的**学习飞轮**(差异化纵深)�?
5
+ GraphFlow ??????????*????????**?? agent ??????????????????????*?? + 90%+ token ??**????????? **Episodic / Skill / Decision ??**???????????????????????**????**?????????
6
6
 
7
- �?TypeScript/Node 本地运行,通过 CLIMCPVS Code 扩展对外暴露�?*无需 API key、无需配置**即可起步:结构索�?+ 离线压缩开箱即用�?
7
+ ??TypeScript/Node ??????? CLI?MCP?VS Code ????????*?? API key?????**??????????+ ??????????
8
8
 
9
- ## 30 秒上�?
9
+ ## 30 ????
10
10
 
11
- 无需 API key、无需注册——结构图谱与离线压缩本地直接跑:
11
+ ?? API key??????????????????????
12
12
 
13
13
  ```bash
14
- # 1. 建立结构图谱(纯 AST,零 LLM、零网络�?
14
+ # 1. ???????? AST?? LLM??????
15
15
  npx @roarpeng/graphflow graph index .
16
16
 
17
- # 2. 压缩预览:读全文前先拿摘�?+ 锚点(通常�?90%+ token�?
17
+ # 2. ??????????????+ ???????90%+ token??
18
18
  npx @roarpeng/graphflow context preview "orchestrator" --json
19
19
  ```
20
20
 
21
- 接入 MCPCursor / Claude Code 等),最小配置:
21
+ ?? MCP?Cursor / Claude Code ????????
22
22
 
23
23
  ```json
24
24
  {
@@ -31,162 +31,162 @@ npx @roarpeng/graphflow context preview "orchestrator" --json
31
31
  }
32
32
  ```
33
33
 
34
- 接好后让 agent 优先调用 `graphflow_context` 取压缩上下文;多步任务用 `graphflow_plan`。配�?provider API key �?*可�?*的——只在需�?LLM 规划增强时才用�?
34
+ ???? agent ???? `graphflow_context` ???????????? `graphflow_plan`????provider API key ??*???*????????LLM ?????????
35
35
 
36
- ## 为什么�?GraphFlow(与同类对比�?
36
+ ## ?????GraphFlow????????
37
37
 
38
- 这个赛道里有许多优秀的单点工具,GraphFlow 的定位不�?某一项最�?,而是**在代码图谱之上叠加了上下文压缩、规划编排与跨会话学习记�?*——尤其是"记忆型代码图�?这一块目前少有人占据。诚实对比如下:
38
+ ????????????????GraphFlow ???????????????**?????????????????????????????*?????"??????????????????????????
39
39
 
40
- | 维度 | **GraphFlow** | CodeGraph | Serena | Repomix |
40
+ | ?? | **GraphFlow** | CodeGraph | Serena | Repomix |
41
41
  | --- | --- | --- | --- | --- |
42
- | 结构代码图谱 | �?多语言 AST 图谱 | �?更成熟(�?更高�?| ⚠️ LSP 符号(非全图谱) | �?|
43
- | 上下文压�?| �?两层渐进(结�?向量�?| ⚠️ 图查询为�?| ⚠️ 符号级精�?| �?整库打包(无压缩�?|
44
- | 规划编排 | �?DAG / 六顶思考帽 | �?| �?| �?|
45
- | **跨会话学习记�?* | �?Episodic / Skill / Decision 节点 | �?| �?| �?|
46
- | Local-first | �?| �?| �?| �?|
47
- | 许可 | Apache-2.0 | MIT | MIT | 宽松开�?|
42
+ | ?????? | ????? AST ?? | ????????????| ?? LSP ???????? | ??|
43
+ | ??????| ??????????????| ?? ??????| ?? ??????| ????????????|
44
+ | ???? | ??DAG / ????? | ??| ??| ??|
45
+ | **????????* | ??Episodic / Skill / Decision ?? | ??| ??| ??|
46
+ | Local-first | ??| ??| ??| ??|
47
+ | ?? | Apache-2.0 | MIT | MIT | ?????|
48
48
 
49
- > 实话实说:论纯图谱的成熟度与社区规模,CodeGraph 更领先;�?LSP 符号编辑标准,Serena 更专精;论整库打包,Repomix 更简单。GraphFlow 的价值在于把"图谱 + 压缩 + 规划 + 学习记忆"合到一处,�?agent 不仅�?token,还能跨会话复用项目经验�?
49
+ > ???????????????????CodeGraph ??????LSP ???????Serena ??????????Repomix ????GraphFlow ??????"?? + ?? + ?? + ????"???????agent ????token??????????????
50
50
 
51
- ## 当前能力总览(v1.7.7+�?
51
+ ## ???????v1.7.9+??
52
52
 
53
- | 能力�?| 说明 |
53
+ | ????| ?? |
54
54
  | --- | --- |
55
- | **任务规划与移�?* | 按任务复杂度分流 simple / complex / insightDAG 规划�?*ATP v1.0 Agent Thinking Protocol**:Intent �?Requirement �?Six Hats �?5-Why �?First Principles �?Decision Matrix �?Planning �?Reflection(`planInsight(task, opts, true)` 开启完�?8 阶段分析,简单任务自�?short-circuit);Agent 委托模式生成 work items;默�?**bridge 模式**输出结构化任务描述符交给外部 coding agent 执行 |
55
+ | **????????* | ???????? simple / complex / insight?DAG ????*ATP v1.0 Agent Thinking Protocol**?Intent ??Requirement ??Six Hats ??5-Why ??First Principles ??Decision Matrix ??Planning ??Reflection?`planInsight(task, opts, true)` ?????8 ????????????short-circuit??Agent ?????? work items????**bridge ??**?????????????? coding agent ?? |
56
56
 
57
- | **模型路由** | Smart / Economy �?tier;多 provider 健康探测�?fallback�?*DeepSeek**、OpenAI、Anthropic、百炼、豆包) |
58
- | **知识图谱** | 工作�?AST 索引(TS/JS/Python/Rust/Go/C/C++/Java/Ruby/Kotlin/Swift);File / Module / Symbol 节点 + 依赖/引用/定义/调用/继承边;图谱 artifact 导入/导出 |
59
- | **上下文压�?* | L1/L2/L3 分层锚点;近无损打包;图结构压缩(边权重+PageRank,零成本默认开启);向量召�?+ RRF 融合;RepoMap 概览;自适应预算 |
60
- | **持续建图** | 默认 `autoIndexOnSave`;MCP 启动时自动启�?FileWatcher;preview / run 前按需增量索引;MCP `graphflow_index` 单文件增�?|
61
- | **学习飞轮** | Episodic Memory(Jaccard + embedding RRF 语义检索)、Reflection(聚�?+ Lesson 提取)、Skill 节点(score ±1,bounded [-20,20])、nightly 学习、技能提示注入规�?|
62
- | **可观测�?* | `graphflow_diagnose` 累计 token 节省;VS Code 知识图谱 Snapshot |
63
- | **Agent 接入** | CLI `--json`;MCP stdio�?*10 工具**);自动安装 MCP �?15+ Agent(Cursor / Claude Code / Windsurf / Cline / Codex / Gemini 等) |
64
- | **VS Code 扩展** | Settings、建图、路由测试、Context Preview�?*知识图谱可视�?*、Skill Insights、Chat Agent、一键安�?MCP |
65
- | **存储后端** | `file`(JSON�? `memory` / `sqlite`(FTS5�? `mcp-http`(Graphify�?|
66
- | **多项目隔�?* | 全局配置共享 LLM/路由�?*图谱路径按当前工作区解析**,不再串读其它项目的 `graphflow-out` |
67
- | **工程质量** | TypeScript strict�?*59 测试文件 / 280+ tests**;`npm run ci` 含扩�?esbuild 打包�?bundled runtime smoke |
57
+ | **模型路由** | Smart / Economy tier;多 provider 健康探测与 fallback(**DeepSeek**、OpenAI、Anthropic、百炼、豆包) |
58
+ | **知识图谱** | 工作区 AST 索引(TS/JS/Python/Rust/Go/C/C++/Java/Ruby/Kotlin/Swift/Dart);File / Module / Symbol 节点 + 依赖/引用/定义/调用/继承边;图谱 artifact 导入/导出 |
59
+ | **上下文压缩** | L1/L2/L3 分层锚点;近无损打包;图结构压缩(边权重+PageRank,零成本默认开启);向量召回 + RRF 融合;RepoMap 概览;自适应预算 |
60
+ | **持续建图** | 默认 `autoIndexOnSave`;MCP 启动时自动启动 FileWatcher;preview / run 前按需增量索引;MCP `graphflow_index` 单文件增量 |
61
+ | **学习飞轮** | Episodic Memory(Jaccard + embedding RRF 语义检索)、Reflection(聚类 + Lesson 提取)、Skill 节点(score ±1,bounded [-20,20])、nightly 学习、技能提示注入规划 |
62
+ | **可观测性** | `graphflow_diagnose` 累计 token 节省;VS Code 知识图谱 Snapshot |
63
+ | **Agent 接入** | CLI `--json`;MCP stdio(**10 工具**);自动安装 MCP 15+ Agent(Cursor / Claude Code / Windsurf / Cline / Codex / Gemini / Opencode 等) |
64
+ | **VS Code 扩展** | Settings、建图、路由测试、Context Preview、**知识图谱可视化**、Skill Insights、Chat Agent、一键安装 MCP |
65
+ | **存储后端** | `file`(JSON)/ `memory` / `sqlite`(FTS5)/ `mcp-http`(Graphify) |
66
+ | **多项目隔离** | 全局配置共享 LLM/路由;**图谱路径按当前工作区解析**,不再串读其它项目的 `graphflow-out` |
67
+ | **工程质量** | TypeScript strict;**72 测试文件 / 357+ tests**;`npm run ci` 含扩展 esbuild 打包与 bundled runtime smoke |
68
68
 
69
- ### 一句话总结
69
+ ### ?????
70
70
 
71
- > �?task 描述出发,自动规�?�?路由模型 �?压缩图谱上下文(含向量召回)�?**输出结构化执行描述符交给外部 coding agent**,并把经验沉淀回知识图谱;定位�?**上下文与规划服务(context service�?*,而非独立执行器�?
71
+ > ??task ???????????????? ??????????????????**?????????????? coding agent**?????????????????**?????????context service??*??????????
72
72
 
73
- ### v1.7.0 核心�?026-07�?
73
+ ### v1.7.0 ????026-07??
74
74
 
75
- **P0 向量召回修正**:废�?FNV-1a hash embedding,引�?`@xenova/transformers` + `all-MiniLM-L6-v2`�?84 维,�?22MB,纯 JS 推理),实现真正的本地语义召回�?
75
+ **P0 ??????**????FNV-1a hash embedding????`@xenova/transformers` + `all-MiniLM-L6-v2`??84 ????22MB?? JS ?????????????????
76
76
 
77
- **P1 移除 hnswlib-node**:彻底移�?C++ 编译依赖,向量召回统一使用纯线性扫描(典型仓库 <10K 节点性能完全够用)�?
77
+ **P1 ?? hnswlib-node**??????C++ ??????????????????????? <10K ???????????
78
78
 
79
- **P2 MCP 工具精简**�?8 个工具合并为 10 个核心工具(contextplanindexinsightdiagnoseartifact 等合并),降�?LLM 工具调用认知负荷�?
79
+ **P2 MCP ????**??8 ?????? 10 ??????context?plan?index?insight?diagnose?artifact ????????LLM ??????????
80
80
 
81
- **P2 ATP 自适应截断**:简单任务(低优先级、无约束、短描述)自�?short-circuit,跳�?First Principles / Decision Matrix / Reflection,节�?4-6 �?LLM 调用�?
81
+ **P2 ATP ?????**??????????????????????short-circuit????First Principles / Decision Matrix / Reflection????4-6 ??LLM ????
82
82
 
83
83
  ---
84
84
 
85
- ### v1.5.0 核心�?026-07�?
85
+ ### v1.5.0 ????026-07??
86
86
 
87
- **ATP v1.0 Agent Thinking Protocol**:以文档驱动的全链路思考协议增强深度分析流程�?
87
+ **ATP v1.0 Agent Thinking Protocol**????????????????????????
88
88
 
89
- **新增 5 个分析阶�?*(在 Six Hats + 5-Why 基础上补齐)�?
89
+ **?? 5 ??????*?? Six Hats + 5-Why ????????
90
90
 
91
- 1. **Intent Analysis** �?区分显式/隐式意图、核心问题、非目标、成功标�?
92
- 2. **Requirement Analysis** �?结构化功�?非功能需求、优先级、范围(included/excluded�?
93
- 3. **First Principles** �?拆解到不可再分事实、挑战假�?
94
- 4. **Decision Matrix** �?多方案按 5 维度打分(complexity/cost/risk/maintainability/impact)比较后推荐
95
- 5. **Plan Reflection** �?规划阶段自评置信度、不确定性、缺失信息、改进方�?
91
+ 1. **Intent Analysis** ??????/???????????????????
92
+ 2. **Requirement Analysis** ?????????????????????included/excluded??
93
+ 3. **First Principles** ?????????????????
94
+ 4. **Decision Matrix** ?????? 5 ?????complexity/cost/risk/maintainability/impact??????
95
+ 5. **Plan Reflection** ???????????????????????????
96
96
 
97
- **ATP 类型 IR**:`atp-schema.ts` 导出 `AgentThinkingProtocol` 完整接口,作�?Multi-Agent 共享中间表示�?
97
+ **ATP ?? IR**?`atp-schema.ts` ?? `AgentThinkingProtocol` ????????Multi-Agent ????????
98
98
 
99
- **TaskNode 丰富**:新�?`priority`、`complexity`、`verification`、`inputs`、`outputs`、`risks` 6 个可选字段�?
99
+ **TaskNode ??**????`priority`?`complexity`?`verification`?`inputs`?`outputs`?`risks` 6 ???????
100
100
 
101
- **Agent 委托扩展**:work items 扩展�?intent +requirement +first-principles +decision-matrix +reflection),submit/merge 闭环不变�?
101
+ **Agent ????**?work items ????intent +requirement +first-principles +decision-matrix +reflection??submit/merge ??????
102
102
 
103
- **向后兼容**:`planInsight(task, options)` 不传第三参数时行为不变;`runFullAtp=true` 启用完整 ATP 8 阶段�?
103
+ **????**?`planInsight(task, options)` ????????????`runFullAtp=true` ???? ATP 8 ????
104
104
 
105
- **P0 残留清理**:移�?VS Code 扩展中对已删�?runtime 方法的调用(`enrichGraph`/`downloadModel`/`showSetupGuide` 命令 + `/enrich` 聊天命令);清理 87 �?OpenBMB/enrichment 残留代码;移�?`canaryAllowed`/`canaryReason` �?5 �?enrichment 类型字段�?
105
+ **P0 ????**????VS Code ????????runtime ??????`enrichGraph`/`downloadModel`/`showSetupGuide` ?? + `/enrich` ???????? 87 ??OpenBMB/enrichment ????????`canaryAllowed`/`canaryReason` ??5 ??enrichment ??????
106
106
 
107
- ### v1.4.0 核心�?026-07�?
107
+ ### v1.4.0 ????026-07??
108
108
 
109
- **奥卡姆剃刀精简**:移�?OpenBMB 本地部署、语义压缩模型、语义增强器、技能进化、金丝雀门控、本地嵌入模型、向量存储等未产生真实价值的模块。留下的是三条经过验证的闭环链路�?
109
+ **???????**????OpenBMB ?????????????????????????????????????????????????????????????????????
110
110
 
111
- **三大核心功能验证修复**�?
111
+ **??????????**??
112
112
 
113
- 1. **HNSW 向量召回完全打�?*(P0 修复�?
114
- - `file-indexer` 现在为所�?File/Symbol/Module 节点附加真正的语�?embedding(`@xenova/transformers` + `all-MiniLM-L6-v2`�?84 维)
115
- - `orchestrator-context` 现在传�?`embeddingProvider` + `enableVectorRecall` 到压缩管�?
116
- - 向量召回统一使用纯线性扫描,无需 C++ 编译依赖
113
+ 1. **HNSW ?????????*?P0 ????
114
+ - `file-indexer` ??????File/Symbol/Module ??????????embedding?`@xenova/transformers` + `all-MiniLM-L6-v2`??84 ??
115
+ - `orchestrator-context` ?????`embeddingProvider` + `enableVectorRecall` ??????
116
+ - ???????????????? C++ ????
117
117
 
118
- 2. **FileWatcher 接入 MCP 启动**(P0 修复�?
119
- - `startFileWatcherIfEnabled` 此前是死代码,现已接�?MCP 服务器启动路�?
120
- - �?`autoIndexOnSave: true` 时自动监听文件变化并增量索引
118
+ 2. **FileWatcher ?? MCP ??**?P0 ????
119
+ - `startFileWatcherIfEnabled` ????????????MCP ????????
120
+ - ??`autoIndexOnSave: true` ??????????????
121
121
 
122
- 3. **技能飞轮闭环修�?*(P1 修复�?
123
- - `skillHints` 解耦:不再依赖 `enableGraphContextInPrompt`,独立注�?worker prompt
124
- - Dangling edges 修复:`applySkillLearning` 现在先创�?Decision 节点再连 `improves` �?
122
+ 3. **?????????*?P1 ????
123
+ - `skillHints` ??????? `enableGraphContextInPrompt`??????worker prompt
124
+ - Dangling edges ???`applySkillLearning` ??????Decision ???? `improves` ??
125
125
 
126
- ### 历史演进
126
+ ### ????
127
127
 
128
- - **v1.3.x**:多项目图谱隔离、Java/Ruby 索引器、MCP 工具扩展、知识图谱可视化
129
- - **v1.0.x**:诚实执行语义(bridge 模式)、三层渐进压缩、混合压缩模�?
130
- - **v0.6.x**:全局配置脚手架、autoIndexOnSaveruntime 模块化、VS Code esbuild bundle
128
+ - **v1.3.x**?????????Java/Ruby ????MCP ????????????
129
+ - **v1.0.x**????????bridge ??????????????????
130
+ - **v0.6.x**?????????autoIndexOnSave?runtime ????VS Code esbuild bundle
131
131
 
132
- ### 发布信息
132
+ ### ????
133
133
 
134
- - 最新版本:**v1.7.7**(root + vscode-extension);npm:`@roarpeng/graphflow@1.7.7`
135
- - **GitHub Release**:push �?`main` �?CI �?`windows-2022` 上自动构�?VSIX 并发布到 [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases)
136
- - **npm 发布**:push tag `v*`(如 `v1.4.1`)触�?[Publish npm](https://github.com/Roarpeng/GraphFlow/actions/workflows/publish-npm.yml) 工作�?
137
- - 变更日志:`CHANGELOG.md`
134
+ - ?????**v1.7.9**?root + vscode-extension??npm?`@roarpeng/graphflow@1.7.9`
135
+ - **GitHub Release**?push ??`main` ??CI ??`windows-2022` ??????VSIX ???? [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases)
136
+ - **npm ??**?push tag `v*`?? `v1.4.1`????[Publish npm](https://github.com/Roarpeng/GraphFlow/actions/workflows/publish-npm.yml) ????
137
+ - ?????`CHANGELOG.md`
138
138
 
139
- ## 环境要求
139
+ ## ????
140
140
 
141
141
  1. Node.js >= 20
142
142
  2. npm >= 10
143
- 3. Windows / macOS / Linux 均可
144
- 4. **npm 安装 `@roarpeng/graphflow` �?*:纯 JS/TS 依赖,无原生模块编译
143
+ 3. Windows / macOS / Linux ??
144
+ 4. **npm ?? `@roarpeng/graphflow` ??*?? JS/TS ??????????
145
145
 
146
- ## 5 分钟本地试跑
146
+ ## 5 ??????
147
147
 
148
148
  ```bash
149
149
  npm install
150
150
  npm run ci
151
151
  ```
152
152
 
153
- 预期:`lint` 无错误、`build` 成功�?*280+ tests** 通过、扩�?bundle �?runtime smoke 通过�?
153
+ 预期:`lint` 无错误、`build` 成功、**357+ tests** 通过、扩展 bundle runtime smoke 通过。
154
154
 
155
- ## Agent 工具接入
155
+ ## Agent ????
156
156
 
157
- GraphFlow 支持两种对外接入方式�?
157
+ GraphFlow ????????????
158
158
 
159
- 1. **CLI 机器输出**:核心命令均支持 `--json`
160
- 2. **MCP stdio server**:CursorClaude Code 等可直接调用
159
+ 1. **CLI ????**???????? `--json`
160
+ 2. **MCP stdio server**?Cursor?Claude Code ??????
161
161
 
162
- 本仓库启�?MCP�?
162
+ ??????MCP??
163
163
 
164
164
  ```bash
165
165
  npm run start:mcp
166
166
  ```
167
167
 
168
- ### MCP 工具一览(10 个)
168
+ ### MCP ?????10 ??
169
169
 
170
- | 工具 | 用�?|
170
+ | ?? | ???|
171
171
  | --- | --- |
172
- | `graphflow_context` | 预览压缩上下文(query)或扩展锚点(anchorId)(**优先调用**�?|
173
- | `graphflow_plan` | 多步任务分解�?DAG 规划(mode='simple' �?'insight'�?|
174
- | `graphflow_run` | 规划 + 压缩上下文,输出 bridge 执行描述�?|
175
- | `graphflow_report_outcome` | �?GraphFlow 汇报任务执行结果,用于学习飞�?|
176
- | `graphflow_insight` | 提交或合�?agent 分析结果(Six Hats / plan prompts�?|
177
- | `graphflow_index` | 全工作区增量建图、单文件建图或全量重�?|
178
- | `graphflow_skill_insights` | 技能学习洞�?|
179
- | `graphflow_diagnose` | 路由健康、图谱统计与 token 节省 |
180
- | `graphflow_artifact` | 导出或导入压缩图�?artifact |
181
- | `graphflow_skill_guide` | 获取 GraphFlow Skill 使用指南 |
172
+ | `graphflow_context` | ????????query???????anchorId??**????**??|
173
+ | `graphflow_plan` | ????????DAG ???mode='simple' ??'insight'??|
174
+ | `graphflow_run` | ?? + ???????? bridge ??????|
175
+ | `graphflow_report_outcome` | ??GraphFlow ????????????????|
176
+ | `graphflow_insight` | ??????agent ?????Six Hats / plan prompts??|
177
+ | `graphflow_index` | ????????????????????|
178
+ | `graphflow_skill_insights` | ???????|
179
+ | `graphflow_diagnose` | ?????????? token ?? |
180
+ | `graphflow_artifact` | ??????????artifact |
181
+ | `graphflow_skill_guide` | ?? GraphFlow Skill ???? |
182
182
 
183
- **MCP 建图提示**:用户级 MCP 进程�?`cwd` 不一定是当前项目。请任选其一�?
183
+ **MCP ????**???? MCP ????`cwd` ????????????????
184
184
 
185
- - 调用 `graphflow_index` 时传�?`rootDir`(项目绝对路径)
186
- - �?MCP 配置中设�?`GRAPHFLOW_WORKSPACE_ROOT` 环境变量
187
- - 使用 VS Code 扩展「建立图谱」或项目�?`.cursor/mcp.json`
185
+ - ?? `graphflow_index` ????`rootDir`????????
186
+ - ??MCP ??????`GRAPHFLOW_WORKSPACE_ROOT` ????
187
+ - ?? VS Code ?????????????`.cursor/mcp.json`
188
188
 
189
- CLI 示例�?
189
+ CLI ????
190
190
 
191
191
  ```bash
192
192
  npm run start -- plan "refactor planner and add tests" --json
@@ -194,34 +194,34 @@ npm run start -- context preview "orchestrator" --json
194
194
  npm run start -- graph inspect --json
195
195
  ```
196
196
 
197
- 外部 agent 约定文件:`AGENTS.md`、`CLAUDE.md`、`.cursor/rules/graphflow.mdc`
197
+ ?? agent ?????`AGENTS.md`?`CLAUDE.md`?`.cursor/rules/graphflow.mdc`
198
198
 
199
- ## 本地功能验证(CLI�?
199
+ ## ???????CLI??
200
200
 
201
- ### 图谱索引
201
+ ### ????
202
202
 
203
203
  ```bash
204
204
  npm run start -- graph index .
205
205
  ```
206
206
 
207
- 预期:`indexedFiles=�? indexedSymbols=…`
207
+ ???`indexedFiles=?? indexedSymbols=?`
208
208
 
209
- ### 上下文压缩预�?
209
+ ### ????????
210
210
 
211
211
  ```bash
212
212
  npm run start -- context preview "orchestrator"
213
213
  ```
214
214
 
215
- 预期:`summary=�? anchors=�? tokens=…`(相对原始上下文通常可节�?**90%+ token**�?
215
+ ???`summary=?? anchors=?? tokens=?`??????????????**90%+ token**??
216
216
 
217
- ### 执行任务 / 规划
217
+ ### ???? / ??
218
218
 
219
219
  ```bash
220
220
  npm run start -- run "update readme and add tests"
221
221
  npm run start -- plan "update readme and add tests and refactor architecture module"
222
222
  ```
223
223
 
224
- ### 路由诊断 / 学习 / 洞察
224
+ ### ???? / ?? / ??
225
225
 
226
226
  ```bash
227
227
  npm run start -- route diagnose
@@ -230,27 +230,27 @@ npm run start -- graph inspect
230
230
  npm run start -- skill insights
231
231
  ```
232
232
 
233
- ## 进阶能力
233
+ ## ????
234
234
 
235
- ### 上下文压�?
235
+ ### ??????
236
236
 
237
- GraphFlow 的压缩采用「两层渐进」策略,先用零成本图结构压缩砍掉冗余节点,再用向量召回补充语义相关节点:
237
+ GraphFlow ??????????????????????????????????????????????
238
238
 
239
- | �?| 机制 | 成本 | 默认 |
239
+ | ??| ?? | ?? | ?? |
240
240
  | --- | --- | --- | --- |
241
- | 图结构压�?| 边权重连通子�?+ PageRank 中心性重�?| �?LLM | **开�?* |
242
- | 向量召回 | transformers.js embedding + 线性扫�?+ RRF 融合 | 本地模型 | **开�?* |
243
- | RepoMap 概览 | 预算紧张时返回模块级地图 | �?LLM | opt-in |
244
- | 自适应预算 | 按任务复杂度动态调�?token 预算 | �?LLM | opt-in |
241
+ | ??????| ????????+ PageRank ??????| ??LLM | **???* |
242
+ | ???? | transformers.js embedding + ?????+ RRF ?? | ???? | **???* |
243
+ | RepoMap ?? | ???????????? | ??LLM | opt-in |
244
+ | ????? | ???????????token ?? | ??LLM | opt-in |
245
245
 
246
- **向量召回设计**�?
246
+ **??????**??
247
247
 
248
- - 索引时:`file-indexer` 为每个节点生�?384 维语�?embedding(`@xenova/transformers` + `all-MiniLM-L6-v2`,约 22MB,纯 JS 推理�?
249
- - 查询时:�?query 生成同样维度�?embedding,与图中节点�?cosine similarity
250
- - 统一使用线性扫描(典型仓库 <10K 节点性能完全够用,无需 HNSW ANN�?
251
- - 关键词检�?+ 向量召回结果通过 RRFReciprocal Rank Fusion, k=60)融�?
248
+ - ????`file-indexer` ????????384 ????embedding?`@xenova/transformers` + `all-MiniLM-L6-v2`?? 22MB?? JS ????
249
+ - ??????query ????????embedding????????cosine similarity
250
+ - ????????????? <10K ??????????? HNSW ANN??
251
+ - ??????+ ???????? RRF?Reciprocal Rank Fusion, k=60????
252
252
 
253
- 配置示例�?
253
+ ??????
254
254
 
255
255
  ```json
256
256
  {
@@ -270,15 +270,15 @@ GraphFlow 的压缩采用「两层渐进」策略,先用零成本图结构压
270
270
  }
271
271
  ```
272
272
 
273
- 离线环境可提前预下载 `@xenova/transformers` 模型缓存,并通过 `embeddingPolicy.modelCacheDir` 或环境变�?`GRAPHFLOW_EMBEDDING_CACHE_DIR` 指向该目录�?
273
+ ?????????? `@xenova/transformers` ???????? `embeddingPolicy.modelCacheDir` ??????`GRAPHFLOW_EMBEDDING_CACHE_DIR` ???????
274
274
 
275
- 查看当前压缩与路由状态:
275
+ ????????????
276
276
 
277
277
  ```bash
278
278
  npm run start -- route diagnose
279
279
  ```
280
280
 
281
- ### SQLite / FTS5 后端
281
+ ### SQLite / FTS5 ??
282
282
 
283
283
  ```json
284
284
  {
@@ -290,7 +290,7 @@ npm run start -- route diagnose
290
290
  }
291
291
  ```
292
292
 
293
- WAL + FTS5 全文索引;与 `file` / `memory` 接口一致�?
293
+ WAL + FTS5 ?????? `file` / `memory` ??????
294
294
 
295
295
  ### Episodic Memory + Reflection
296
296
 
@@ -301,18 +301,18 @@ const run = await orchestrate(
301
301
  );
302
302
  ```
303
303
 
304
- 每次 task 写入 Episode(附�?embedding);相似 task 注入历史决策(Jaccard + embedding RRF 融合检索);`learn nightly` 合成 Lesson 节点;Lesson 自动注入后续任务�?planner prompt�?
304
+ ?? task ?? Episode????embedding???? task ???????Jaccard + embedding RRF ??????`learn nightly` ?? Lesson ???Lesson ??????????planner prompt??
305
305
 
306
- ### 技能学习飞�?
306
+ ### ???????
307
307
 
308
- - `applySkillLearning`:每次任务结束后提取技能原子,更新 Skill 节点 scorepass +1 / fail -1bounded [-20,20]�?
309
- - `suggestSkillHints`:查�?Skill 节点,按 score/uses 排序,返�?top-N 技能提�?
310
- - 技能提示独立注�?worker prompt,不依赖图谱上下文是否启�?
311
- - 复合技能:技能对共现次数达阈值后自动创建 composite skill 节点
308
+ - `applySkillLearning`????????????????? Skill ?? score?pass +1 / fail -1?bounded [-20,20]??
309
+ - `suggestSkillHints`????Skill ???? score/uses ??????top-N ?????
310
+ - ?????????worker prompt??????????????
311
+ - ???????????????????? composite skill ??
312
312
 
313
- ### 跨语言 AST 索引
313
+ ### ??? AST ??
314
314
 
315
- | 语言 | 扩展 |
315
+ | ?? | ?? |
316
316
  | --- | --- |
317
317
  | TypeScript / JavaScript | `.ts .tsx .js .jsx` |
318
318
  | Python | `.py` |
@@ -323,158 +323,159 @@ const run = await orchestrate(
323
323
  | Ruby | `.rb` |
324
324
  | Kotlin | `.kt` |
325
325
  | Swift | `.swift` |
326
+ | Dart | `.dart` |
326
327
 
327
- 通过 `graphPolicy.includeExtensions` 限制扫描范围。tree-sitter WASM 语法包在 `npm run build` 时打�?`wasm/` 并随 npm 包分发,安装后无需联网下载�?
328
+ ?? `graphPolicy.includeExtensions` ???????tree-sitter WASM ???? `npm run build` ????`wasm/` ?? npm ???????????????
328
329
 
329
- ### Agent MCP 自动安装
330
+ ### Agent MCP ????
330
331
 
331
- GraphFlow CLI 可自动检测并安装 MCP 配置�?15+ 编码 Agent�?
332
+ GraphFlow CLI ???????? MCP ????15+ ?? Agent??
332
333
 
333
334
  ```bash
334
- # 检测已安装�?Agent �?MCP 配置状�?
335
+ # ???????Agent ??MCP ?????
335
336
  npx @roarpeng/graphflow doctor
336
337
 
337
- # 一键安�?MCP + Skill + Cursor Rules(推荐)
338
+ # ?????MCP + Skill + Cursor Rules????
338
339
  npx @roarpeng/graphflow install
339
340
 
340
- # 或仅初始化项目级配置�?graphflow/config.json 等)
341
+ # ????????????graphflow/config.json ??
341
342
  npx @roarpeng/graphflow init
342
343
  ```
343
344
 
344
- **本地 `npm install` �?*:若项目已有 `.cursor/mcp.json` �?`.vscode/mcp.json`,postinstall 会自动注�?workspace �?GraphFlow MCP �?Skill;完整用户级安装请运�?`npx @roarpeng/graphflow install`�?
345
+ **?? `npm install` ??*?????? `.cursor/mcp.json` ??`.vscode/mcp.json`?postinstall ??????workspace ??GraphFlow MCP ??Skill????????????`npx @roarpeng/graphflow install`??
345
346
 
346
- ### Trae / Trae CN 推荐配置
347
+ ### Trae / Trae CN ????
347
348
 
348
- Trae 区分 **Rules**(每轮自动加载)�?**Skill**(按需匹配)。仅�?Skill �?GraphFlow 触发频率偏低;`install` / `init` 会在项目内写入:
349
+ Trae ?? **Rules**??????????**Skill**??????????Skill ??GraphFlow ???????`install` / `init` ????????
349
350
 
350
- | 路径 | 作用 |
351
+ | ?? | ?? |
351
352
  |------|------|
352
- | `.trae/rules/graphflow.md` | `alwaysApply: true` �?每轮强制先调 `graphflow_context` |
353
- | `.trae/skills/graphflow/SKILL.md` | 详细 10 工具工作流;可用 `#graphflow` 手动触发 |
354
- | `~/.config/Trae CN/User/skills/graphflow/SKILL.md` | 用户�?Skill(跨项目�?|
355
- | `User/mcp.json` | GraphFlow MCP 服务�?|
353
+ | `.trae/rules/graphflow.md` | `alwaysApply: true` ???????? `graphflow_context` |
354
+ | `.trae/skills/graphflow/SKILL.md` | ?? 10 ???????? `#graphflow` ???? |
355
+ | `~/.config/Trae CN/User/skills/graphflow/SKILL.md` | ????Skill??????|
356
+ | `User/mcp.json` | GraphFlow MCP ????|
356
357
 
357
358
  ```bash
358
- # 在项目根目录执行(fat-battle/webGraphFlow 等)
359
+ # ?????????fat-battle/web?GraphFlow ??
359
360
  npx @roarpeng/graphflow install
360
- npx @roarpeng/graphflow doctor # 检�?Trae CN rules/skill/MCP 是否就绪
361
+ npx @roarpeng/graphflow doctor # ???Trae CN rules/skill/MCP ????
361
362
  ```
362
363
 
363
- **注意**:MCP 配置中不要硬编码 `GRAPHFLOW_WORKSPACE_ROOT` 到其他项目;�?Trae 打开哪个仓库,就�?Agent �?`graphflow_context` 里传该仓库的 `rootDir`�?
364
+ **??**?MCP ???????? `GRAPHFLOW_WORKSPACE_ROOT` ????????Trae ??????????Agent ??`graphflow_context` ?????? `rootDir`??
364
365
 
365
- ### Antigravity IDE 推荐配置
366
+ ### Antigravity IDE ????
366
367
 
367
- | 路径 | 作用 |
368
+ | ?? | ?? |
368
369
  |------|------|
369
- | `~/.gemini/antigravity/mcp_config.json` | 全局 MCP(`mcpServers` 键) |
370
- | `~/.gemini/antigravity/skills/graphflow/SKILL.md` | 全局 Skill |
371
- | `.agent/rules/graphflow.md` | 项目�?Rules |
372
- | `.agent/skills/graphflow/SKILL.md` | 项目�?Skill |
373
- | `GEMINI.md` | 项目级受管指令块 |
370
+ | `~/.gemini/antigravity/mcp_config.json` | ?? MCP?`mcpServers` ?? |
371
+ | `~/.gemini/antigravity/skills/graphflow/SKILL.md` | ?? Skill |
372
+ | `.agent/rules/graphflow.md` | ????Rules |
373
+ | `.agent/skills/graphflow/SKILL.md` | ????Skill |
374
+ | `GEMINI.md` | ???????? |
374
375
 
375
- ### Gemini CLI 推荐配置
376
+ ### Gemini CLI ????
376
377
 
377
- | 路径 | 作用 |
378
+ | ?? | ?? |
378
379
  |------|------|
379
- | `~/.gemini/settings.json` | MCP 服务�?|
380
- | `~/.gemini/GEMINI.md` | 全局受管指令�?|
380
+ | `~/.gemini/settings.json` | MCP ????|
381
+ | `~/.gemini/GEMINI.md` | ????????|
381
382
 
382
- ### VS Code / GitHub Copilot 推荐配置
383
+ ### VS Code / GitHub Copilot ????
383
384
 
384
- | 路径 | 作用 |
385
+ | ?? | ?? |
385
386
  |------|------|
386
- | `~/.config/Code/User/mcp.json` | 用户�?MCP(`servers` 键) |
387
- | `.github/copilot-instructions.md` | 仓库�?Copilot 指令(token-first�?|
388
- | `.vscode/mcp.json` | 可选项目级 MCP |
387
+ | `~/.config/Code/User/mcp.json` | ????MCP?`servers` ?? |
388
+ | `.github/copilot-instructions.md` | ????Copilot ???token-first??|
389
+ | `.vscode/mcp.json` | ????? MCP |
389
390
 
390
391
  ```bash
391
- npx @roarpeng/graphflow install # 用户�?MCP + Skills
392
- npx @roarpeng/graphflow install --scope all # 含项目级 Rules / Copilot 指令
392
+ npx @roarpeng/graphflow install # ????MCP + Skills
393
+ npx @roarpeng/graphflow install --scope all # ???? Rules / Copilot ??
393
394
  npx @roarpeng/graphflow doctor
394
395
  ```
395
396
 
396
- 支持�?AgentCursorVS CodeTraeClaude CodeWindsurfClineRoo CodeKilo CodePearAIGeminiCodexAntigravityAmazon QZedContinue�?
397
+ ????Agent?Cursor?VS Code?Trae?Claude Code?Windsurf?Cline?Roo Code?Kilo Code?PearAI?Gemini?Codex?Antigravity?Amazon Q?Zed?Continue??
397
398
 
398
- ## 配置文件
399
+ ## ????
399
400
 
400
- 默认:`graphflow.config.json`(也可使�?`~/.graphflow.config.json` 全局配置)�?
401
+ ???`graphflow.config.json`??????`~/.graphflow.config.json` ???????
401
402
 
402
403
  ```bash
403
404
  cp graphflow.config.example.json graphflow.config.json
404
405
  ```
405
406
 
406
- ### 全局 vs 项目配置
407
+ ### ?? vs ????
407
408
 
408
- | 层级 | 路径 | 适合存放 |
409
+ | ?? | ?? | ???? |
409
410
  | --- | --- | --- |
410
- | 全局 | `~/.graphflow.config.json` | ProviderAPI KeySmart/Economy 模型、路由策�?|
411
- | 项目�?| `graphflow.config.json` | 项目专属覆盖(可选) |
412
- | 项目覆盖 | `.graphflow/config.json` | 工作区局部覆盖(`graphflow init` 生成�?|
411
+ | ?? | `~/.graphflow.config.json` | Provider?API Key?Smart/Economy ????????|
412
+ | ????| `graphflow.config.json` | ?????????? |
413
+ | ???? | `.graphflow/config.json` | ????????`graphflow init` ????|
413
414
 
414
- **多项目重要约�?*�?
415
+ **????????*??
415
416
 
416
- - 图谱文件默认写在**当前工作�?*下的 `graphflow-out/graphflow-graph.json`
417
- - 全局配置**不应**包含固定�?`workspaceRoot`(旧版本若已写入,请删除该字段)
418
- - MCP / 脚本可通过环境变量指定工作区:`GRAPHFLOW_WORKSPACE_ROOT=/path/to/project`
417
+ - ????????**??????*?? `graphflow-out/graphflow-graph.json`
418
+ - ????**??**??????`workspaceRoot`????????????????
419
+ - MCP / ???????????????`GRAPHFLOW_WORKSPACE_ROOT=/path/to/project`
419
420
 
420
- 关键项:
421
+ ????
421
422
 
422
- | 配置 | 说明 |
423
+ | ?? | ?? |
423
424
  | --- | --- |
424
425
  | `graphPolicy.transport` | `file` / `memory` / `sqlite` / `mcp-http` |
425
- | `graphPolicy.graphStorePath` | 相对当前工作区的 JSON �?`.sqlite` 路径 |
426
- | `graphPolicy.maxContextTokens` | 压缩上下文预算(默认 **1500**�?|
427
- | `graphPolicy.autoIndexOnSave` | 保存后增量索引(默认 **true**�?|
428
- | `graphPolicy.autoIndexOnPreview` / `autoIndexOnRun` | preview / run 前自动索�?|
429
- | `graphPolicy.enableNearLosslessMode` | 近无损上下文打包 |
426
+ | `graphPolicy.graphStorePath` | ???????? JSON ??`.sqlite` ?? |
427
+ | `graphPolicy.maxContextTokens` | ?????????? **1500**??|
428
+ | `graphPolicy.autoIndexOnSave` | ?????????? **true**??|
429
+ | `graphPolicy.autoIndexOnPreview` / `autoIndexOnRun` | preview / run ??????|
430
+ | `graphPolicy.enableNearLosslessMode` | ???????? |
430
431
 
431
- | `graphPolicy.layerQuota` | L1/L2/L3 锚点配额 |
432
- | `routingPolicy.enableDynamicRouting` | provider 健康路由 |
433
- | `skillPolicy.enableSkillFlywheel` | 技能飞�?|
434
- | `embeddingPolicy.provider` | embedding 提供者(`transformers` 本地 / `openai`�?|
432
+ | `graphPolicy.layerQuota` | L1/L2/L3 ???? |
433
+ | `routingPolicy.enableDynamicRouting` | provider ???? |
434
+ | `skillPolicy.enableSkillFlywheel` | ?????|
435
+ | `embeddingPolicy.provider` | embedding ????`transformers` ?? / `openai`??|
435
436
 
436
- ## VS Code / Cursor 扩展
437
+ ## VS Code / Cursor ??
437
438
 
438
- 扩展内置 GraphFlow runtime�?*安装 VSIX 后无需�?clone 本仓库或配置 `npm run start`**。VSIX 仍不捆绑 `@xenova/transformers` 模型包;需要本地语义向量时可预置缓存并设置 `GRAPHFLOW_EMBEDDING_CACHE_DIR`。Installer 支持面已冻结,后续不再继续扩展新�?IDE 安装目标�?
439
+ ???? GraphFlow runtime??*?? VSIX ?????clone ?????? `npm run start`**?VSIX ???? `@xenova/transformers` ????????????????????? `GRAPHFLOW_EMBEDDING_CACHE_DIR`?Installer ??????????????????IDE ??????
439
440
 
440
- ### 安装 VSIX(推荐)
441
+ ### ?? VSIX????
441
442
 
442
- 1. 打开 [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases),下载最�?`graphflow-tool-<version>.vsix`(CI 在每�?push `main` / tag 后自动构建)
443
- 2. **VS Code**:扩展视�?�?`…` �?**�?VSIX 安装�?* �?选择下载的文�?
444
- 3. **Cursor**:扩展视�?�?右上�?`…` �?**Install from VSIX** �?选择下载的文�?
445
- 4. 重启编辑器;首次激活会自动尝试安装 GraphFlow MCP 到本�?Agent 配置
446
- 5. 命令面板运行 **GraphFlow: Show Settings** �?**建立图谱(无需 LLM�?* �?即可使用 Context Preview / 知识图谱
443
+ 1. ?? [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases)??????`graphflow-tool-<version>.vsix`?CI ????push `main` / tag ??????
444
+ 2. **VS Code**????????`?` ??**??VSIX ????* ??????????
445
+ 3. **Cursor**????????????`?` ??**Install from VSIX** ??????????
446
+ 4. ????????????????? GraphFlow MCP ????Agent ??
447
+ 5. ?????? **GraphFlow: Show Settings** ??**??????? LLM??* ?????? Context Preview / ????
447
448
 
448
- CLI 安装(若已安�?`code` / `cursor` 命令):
449
+ CLI ????????`code` / `cursor` ????
449
450
 
450
451
  ```bash
451
- code --install-extension graphflow-tool-1.7.7.vsix
452
- cursor --install-extension graphflow-tool-1.7.7.vsix
452
+ code --install-extension graphflow-tool-1.7.9.vsix
453
+ cursor --install-extension graphflow-tool-1.7.9.vsix
453
454
  ```
454
455
 
455
- ### 命令面板
456
+ ### ????
456
457
 
457
- | 命令 | 说明 |
458
+ | ?? | ?? |
458
459
  | --- | --- |
459
- | GraphFlow: Show Settings | 配置、建图、路由测�?|
460
- | GraphFlow: Show Graph | **知识图谱可视�?*(分层、搜索、跳转源码) |
461
- | GraphFlow: Preview Context | 上下文压缩与 Token Budget |
462
- | GraphFlow: Plan & Brainstorm | 任务规划 |
463
- | GraphFlow: Run Task | 执行任务 |
464
- | GraphFlow: Skill Insights | 技能学习面�?|
465
- | GraphFlow: Install MCP | 注入 MCP 配置 |
460
+ | GraphFlow: Show Settings | ???????????|
461
+ | GraphFlow: Show Graph | **????????*???????????? |
462
+ | GraphFlow: Preview Context | ?????? Token Budget |
463
+ | GraphFlow: Plan & Brainstorm | ???? |
464
+ | GraphFlow: Run Task | ???? |
465
+ | GraphFlow: Skill Insights | ???????|
466
+ | GraphFlow: Install MCP | ?? MCP ?? |
466
467
 
467
- Chat Agent(`@graphflow`):`/run`、`/plan`、`/graph`、`/skills`、`/diagnose`、`/learn`、`/history`
468
+ Chat Agent?`@graphflow`??`/run`?`/plan`?`/graph`?`/skills`?`/diagnose`?`/learn`?`/history`
468
469
 
469
- ### Settings 推荐流程
470
+ ### Settings ????
470
471
 
471
- 1. 填写 Graph Store Path �?**Save Settings**
472
- 2. **建立图谱(无需 LLM�?* �?生成结构图谱
473
- 3. (可选)配置 Provider �?**测试路由并建立图�?*
472
+ 1. ?? Graph Store Path ??**Save Settings**
473
+ 2. **??????? LLM??* ????????
474
+ 3. ?????? Provider ??**??????????*
474
475
 
475
- 其它建图入口:`graph index` CLIMCP `graphflow_index`、`autoIndexOnPreview` / `autoIndexOnRun` / `autoIndexOnSave`
476
+ ???????`graph index` CLI?MCP `graphflow_index`?`autoIndexOnPreview` / `autoIndexOnRun` / `autoIndexOnSave`
476
477
 
477
- ### 开发模式(贡献者)
478
+ ### ?????????
478
479
 
479
480
  ```bash
480
481
  cd vscode-extension
@@ -482,76 +483,76 @@ npm install
482
483
  npm run build
483
484
  ```
484
485
 
485
- �?VS Code �?`F5` 启动 Extension Development Host�?
486
+ ??VS Code ??`F5` ?? Extension Development Host??
486
487
 
487
- ### 本地打包 VSIX
488
+ ### ???? VSIX
488
489
 
489
490
  ```bash
490
491
  npm run package:extension
491
- # 输出:artifacts/graphflow-tool-<version>.vsix
492
+ # ???artifacts/graphflow-tool-<version>.vsix
492
493
  ```
493
494
 
494
- ## 本地验收清单
495
+ ## ??????
495
496
 
496
- 1. `npm run ci` 全绿
497
- 2. `graph index` �?`indexedFiles > 0`
498
- 3. `context preview` �?`summary > 0` �?`anchors > 0`
499
- 4. VS Code **Show Graph** �?画布正常显示节点聚类(非角落小点�?
500
- 5. `plan` / `run` 返回正常输出
501
- 6. `route diagnose` �?显示 provider 路由状�?
497
+ 1. `npm run ci` ??
498
+ 2. `graph index` ??`indexedFiles > 0`
499
+ 3. `context preview` ??`summary > 0` ??`anchors > 0`
500
+ 4. VS Code **Show Graph** ????????????????????
501
+ 5. `plan` / `run` ??????
502
+ 6. `route diagnose` ???? provider ?????
502
503
 
503
- ## 常见问题
504
+ ## ????
504
505
 
505
- **切换项目�?Snapshot 显示别的仓库的图�?*
506
+ **??????Snapshot ??????????*
506
507
 
507
- - 检�?`~/.graphflow.config.json` 是否含有旧的 `workspaceRoot`�?*删除该字�?*后重载窗�?
508
- - 在当前项目重新「建立图谱」,确认顶栏 `store` 路径指向本项目的 `graphflow-out/`
508
+ - ???`~/.graphflow.config.json` ?????? `workspaceRoot`??*??????*??????
509
+ - ?????????????????? `store` ???????? `graphflow-out/`
509
510
 
510
- **MCP 建图失败或索引到错误目录**
511
+ **MCP ????????????**
511
512
 
512
- - `graphflow_index` 传入 `rootDir: "/你的项目绝对路径"`
513
- - 或在 MCP 配置中加 `"env": { "GRAPHFLOW_WORKSPACE_ROOT": "/你的项目绝对路径" }`
514
- - 离线环境索引多语言项目时,WASM 语法包已�?`@roarpeng/graphflow` 安装包内置,无需联网下载
513
+ - `graphflow_index` ?? `rootDir: "/????????"`
514
+ - ?? MCP ???? `"env": { "GRAPHFLOW_WORKSPACE_ROOT": "/????????" }`
515
+ - ?????????????WASM ??????`@roarpeng/graphflow` ????????????
515
516
 
516
- **`context preview` 返回 0 anchors**
517
+ **`context preview` ?? 0 anchors**
517
518
 
518
- - 先执�?`graph index` �?Settings 建图
519
- - 检查查询词是否命中代码符号(如 `orchestrator`、`planner`�?
519
+ - ????`graph index` ??Settings ??
520
+ - ??????????????? `orchestrator`?`planner`??
520
521
 
521
- **知识图谱面板空白或只有小�?*
522
+ **??????????????*
522
523
 
523
- - 点击画布工具�?**「适应�?*
524
- - 注意:画布展示的�?*采样子图**(约 120 节点),全库规模请看顶栏统计
524
+ - ????????**?????*
525
+ - ??????????*????**?? 120 ??????????????
525
526
 
526
- **API Key 未配�?*
527
+ **API Key ????*
527
528
 
528
- - �?`graphflow.config.json` 配置 provider `apiKey`,支�?`${ENV_VAR}` 占位
529
- - **DeepSeek(推荐)**:`providers.deepseek` + `tiers.*.provider: "deepseek"`,Base URL 默认 `https://api.deepseek.com`,模型用 `deepseek-v4-pro` / `deepseek-v4-flash`(见 [DeepSeek API 文档](https://api-docs.deepseek.com/zh-cn/)�?
529
+ - ??`graphflow.config.json` ?? provider `apiKey`????`${ENV_VAR}` ??
530
+ - **DeepSeek????**?`providers.deepseek` + `tiers.*.provider: "deepseek"`?Base URL ?? `https://api.deepseek.com`???? `deepseek-v4-pro` / `deepseek-v4-flash`?? [DeepSeek API ??](https://api-docs.deepseek.com/zh-cn/)??
530
531
 
531
- **�?LLM 时能用吗**
532
+ **??LLM ????**
532
533
 
533
- - 可以:结构索引、图谱可视化、context preview(基于结构图�?+ transformers.js 语义向量召回)、MCP `graphflow_diagnose` 均不强制 LLM
534
- - 只有 Six Hats 深度规划�?LLM 语义压缩需要配�?provider
534
+ - ??????????????context preview????????+ transformers.js ????????MCP `graphflow_diagnose` ???? LLM
535
+ - ?? Six Hats ??????LLM ?????????provider
535
536
 
536
- ## 项目结构
537
+ ## ????
537
538
 
538
539
  ```text
539
540
  GraphFlow/
540
541
  ├── src/
541
- �? ├── core/ # 编排核心:orchestrator, triage, dag-engine, types
542
- �? ├── graph/ # 索引、上下文切片、图压缩、snapshot
543
- �? ├── routing/ # 模型路由与健康探测(deepseek/openai/anthropic/bailian/doubao�?
544
- �? ├── learning/ # embeddings, episode, skill-flywheel, reflector, hnsw
545
- �? └── surfaces/
546
- �? ├── cli/ # CLI + runtime 子模�?
547
- �? └── mcp/ # MCP server (10 tools)
548
- ├── tests/ # 59 文件 / 280+ tests
549
- ├── vscode-extension/ # VS Code 面板与命�?
542
+ ├── core/ # 编排核心:orchestrator, triage, dag-engine, types
543
+ ├── graph/ # 索引、上下文切片、图压缩、snapshot
544
+ ├── routing/ # 模型路由与健康探测(deepseek/openai/anthropic/bailian/doubao
545
+ ├── learning/ # embeddings, episode, skill-flywheel, reflector, hnsw
546
+ └── surfaces/
547
+ ├── cli/ # CLI + runtime 子模块
548
+ └── mcp/ # MCP server (10 tools)
549
+ ├── tests/ # 72 文件 / 357+ tests
550
+ ├── vscode-extension/ # VS Code 面板与命令
550
551
  ├── docs/
551
552
  └── CHANGELOG.md
552
553
  ```
553
554
 
554
- ## 版本与变�?
555
+ ## ??????
555
556
 
556
- - 变更日志:`CHANGELOG.md`
557
- - LicenseApache-2.0
557
+ - ?????`CHANGELOG.md`
558
+ - License?Apache-2.0