@roarpeng/graphflow 1.4.0 → 1.4.2
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.
- package/CHANGELOG.md +25 -0
- package/README.md +36 -12
- package/dist/core/agent-delegation.d.ts +1 -1
- package/dist/core/agent-delegation.d.ts.map +1 -1
- package/dist/graph/context-slicer-types.d.ts +4 -0
- package/dist/graph/context-slicer-types.d.ts.map +1 -1
- package/dist/graph/context-slicer-types.js.map +1 -1
- package/dist/graph/context-slicer.d.ts.map +1 -1
- package/dist/graph/context-slicer.js +4 -3
- package/dist/graph/context-slicer.js.map +1 -1
- package/dist/graph/file-indexer-nodes.d.ts.map +1 -1
- package/dist/graph/file-indexer-nodes.js +4 -1
- package/dist/graph/file-indexer-nodes.js.map +1 -1
- package/dist/graph/graph-utils.d.ts +12 -0
- package/dist/graph/graph-utils.d.ts.map +1 -1
- package/dist/graph/graph-utils.js +132 -7
- package/dist/graph/graph-utils.js.map +1 -1
- package/dist/graph/graphify-client.d.ts +0 -2
- package/dist/graph/graphify-client.d.ts.map +1 -1
- package/dist/graph/graphify-client.js +4 -5
- package/dist/graph/graphify-client.js.map +1 -1
- package/dist/graph/graphify-file-client.d.ts.map +1 -1
- package/dist/graph/graphify-file-client.js +2 -3
- package/dist/graph/graphify-file-client.js.map +1 -1
- package/dist/graph/query-expand.d.ts +8 -0
- package/dist/graph/query-expand.d.ts.map +1 -0
- package/dist/graph/query-expand.js +23 -0
- package/dist/graph/query-expand.js.map +1 -0
- package/dist/graph/query-translate.d.ts +7 -0
- package/dist/graph/query-translate.d.ts.map +1 -0
- package/dist/graph/query-translate.js +61 -0
- package/dist/graph/query-translate.js.map +1 -0
- package/dist/graph/sqlite-client.d.ts.map +1 -1
- package/dist/graph/sqlite-client.js +5 -5
- package/dist/graph/sqlite-client.js.map +1 -1
- package/dist/surfaces/cli/runtime/graph.d.ts +1 -1
- package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/graph.js +34 -4
- package/dist/surfaces/cli/runtime/graph.js.map +1 -1
- package/dist/surfaces/cli/runtime/types.d.ts +12 -0
- package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
- package/dist/surfaces/cursor-rules/graphflow.mdc +19 -3
- package/dist/surfaces/mcp/tool-definitions.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.js +5 -1
- package/dist/surfaces/mcp/tool-definitions.js.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.js +1 -1
- package/dist/surfaces/mcp/tool-handlers.js.map +1 -1
- package/dist/surfaces/trae-skill/graphflow/SKILL.md +45 -54
- package/package.json +1 -1
- package/src/surfaces/cursor-rules/graphflow.mdc +19 -3
- package/src/surfaces/trae-skill/graphflow/SKILL.md +45 -54
|
@@ -80,11 +80,15 @@ function getToolDefinitions() {
|
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
82
|
name: "graphflow_preview_context",
|
|
83
|
-
description: "[Core] Preview GraphFlow near-lossless context packaging for a query. ALWAYS CALL THIS FIRST for code exploration, multi-step edits, refactors, debugging, or codebase-wide questions. Returns compressed context with anchors (Symbol/File/Module pointers) and token budget showing 70-95% savings.
|
|
83
|
+
description: "[Core] Preview GraphFlow near-lossless context packaging for a query. ALWAYS CALL THIS FIRST for code exploration, multi-step edits, refactors, debugging, or codebase-wide questions. Returns compressed context with anchors (Symbol/File/Module pointers) and token budget showing 70-95% savings. For Chinese/CJK queries, pass englishQuery (agent-translated English code keywords) or answer agentWorkItems when anchorCount is low.",
|
|
84
84
|
inputSchema: {
|
|
85
85
|
type: "object",
|
|
86
86
|
properties: {
|
|
87
87
|
query: { type: "string", description: "Query to preview. Be specific about what you need to understand." },
|
|
88
|
+
englishQuery: {
|
|
89
|
+
type: "string",
|
|
90
|
+
description: "Optional English code-search keywords when query is Chinese/CJK. The connected agent should translate user intent to English file/symbol terms before or after the first preview call.",
|
|
91
|
+
},
|
|
88
92
|
configPath: { type: "string", description: "Optional path to graphflow.config.json." },
|
|
89
93
|
rootDir: { type: "string", description: "Optional workspace root override." },
|
|
90
94
|
},
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-definitions.js","sourceRoot":"","sources":["../../../src/surfaces/mcp/tool-definitions.ts"],"names":[],"mappings":";;AAWA,
|
|
1
|
+
{"version":3,"file":"tool-definitions.js","sourceRoot":"","sources":["../../../src/surfaces/mcp/tool-definitions.ts"],"names":[],"mappings":";;AAWA,gDAsPC;AAtPD,SAAgB,kBAAkB;IAChC,OAAO;QACL;YACE,IAAI,EAAE,eAAe;YACrB,WAAW,EAAE,6QAA6Q;YAC1R,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uCAAuC,EAAE;oBAC9E,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yCAAyC,EAAE;iBACvF;gBACD,QAAQ,EAAE,CAAC,MAAM,CAAC;gBAClB,oBAAoB,EAAE,KAAK;aAC5B;SACF;QACD;YACE,IAAI,EAAE,0BAA0B;YAChC,WAAW,EAAE,6TAA6T;YAC1U,WAAW,EAAE;gBACX,IAAI,EAAE,QAAQ;gBACd,UAAU,EAAE;oBACV,SAAS,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,0CAA0C,EAAE;oBACtF,OAAO,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,WAAW,EAAE,6DAA6D,EAAE;oBACxG,OAAO,EAAE;wBACP,IAAI,EAAE,OAAO;wBACb,KAAK,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;wBACzB,WAAW,EAAE,mCAAmC;qBACjD;oBACD,UAAU,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,yCAAyC,EAAE;iBACvF;gBACD,QAAQ,E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B;SACF;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-handlers.d.ts","sourceRoot":"","sources":["../../../src/surfaces/mcp/tool-handlers.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,cAAc;CAC9B;AAED,eAAO,MAAM,uBAAuB,SAAU,CAAC;AAE/C,wBAAsB,eAAe,CACnC,IAAI,EAAE,QAAQ,EACd,OAAO,CAAC,EAAE,SAAS,EACnB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,gBAAgB,CAAC,
|
|
1
|
+
{"version":3,"file":"tool-handlers.d.ts","sourceRoot":"","sources":["../../../src/surfaces/mcp/tool-handlers.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAI7C,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrC;AAED,MAAM,WAAW,gBAAgB;IAC/B,OAAO,EAAE,KAAK,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;KACd,CAAC,CAAC;CACJ;AAED,MAAM,WAAW,cAAc;CAC9B;AAED,eAAO,MAAM,uBAAuB,SAAU,CAAC;AAE/C,wBAAsB,eAAe,CACnC,IAAI,EAAE,QAAQ,EACd,OAAO,CAAC,EAAE,SAAS,EACnB,MAAM,CAAC,EAAE,cAAc,GACtB,OAAO,CAAC,gBAAgB,CAAC,CAwH3B;AAqHD,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,CAWxE;AA0BD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAEzE;AAED,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAW9F"}
|
|
@@ -30,7 +30,7 @@ async function executeToolCall(call, _server, _hooks) {
|
|
|
30
30
|
case "graphflow_plan_insight":
|
|
31
31
|
return textResponse(await (0, runtime_1.planInsightResult)(readRequiredString(args.task, "task"), readOptionalString(args.configPath)));
|
|
32
32
|
case "graphflow_preview_context":
|
|
33
|
-
return textResponse(await (0, runtime_1.previewContext)(readRequiredString(args.query, "query"), readOptionalString(args.configPath), readOptionalString(args.rootDir)));
|
|
33
|
+
return textResponse(await (0, runtime_1.previewContext)(readRequiredString(args.query, "query"), readOptionalString(args.configPath), readOptionalString(args.rootDir), readOptionalString(args.englishQuery)));
|
|
34
34
|
case "graphflow_expand_anchor":
|
|
35
35
|
return textResponse(await (0, runtime_1.expandAnchor)(readRequiredString(args.anchorId, "anchorId"), readOptionalString(args.configPath), readOptionalString(args.rootDir)));
|
|
36
36
|
case "graphflow_index":
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-handlers.js","sourceRoot":"","sources":["../../../src/surfaces/mcp/tool-handlers.ts"],"names":[],"mappings":";;;AAwCA,
|
|
1
|
+
{"version":3,"file":"tool-handlers.js","sourceRoot":"","sources":["../../../src/surfaces/mcp/tool-handlers.ts"],"names":[],"mappings":";;;AAwCA,0CA4HC;AAqHD,gDAWC;AA0BD,4BAEC;AAED,8CAWC;AA7UD,4CAk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AAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC9C,CAAC;AACJ,CAAC;AAED,SAAgB,QAAQ,CAAC,KAAc;IACrC,OAAO,OAAO,CAAC,KAAK,CAAC,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAgB,iBAAiB,CAAC,MAA+B;IAC/D,MAAM,MAAM,GAAG,MAAM,CAAC,aAAa,CAAC;IACpC,IAAI,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE,CAAC;QAC7D,OAAO,MAAM,CAAC;IAChB,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC;IAC1B,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,CAAC;QACpB,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,KAAK,GAAG,IAAI,CAAC,aAAa,CAAC;IACjC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC;AACpF,CAAC"}
|
|
@@ -21,10 +21,10 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
21
21
|
┌─────────────────────────────────────────────────┐
|
|
22
22
|
│ GraphFlow MCP Server (persistent backend) │
|
|
23
23
|
│ 18 tools: preview, expand, plan, plan_insight, │
|
|
24
|
-
│ run, report_outcome,
|
|
25
|
-
│
|
|
26
|
-
│ diagnose, export_artifact, import_artifact
|
|
27
|
-
│ stats
|
|
24
|
+
│ run, report_outcome, submit_insight, merge_insight,│
|
|
25
|
+
│ index, index_file, rebuild, inspect, skill_insights,│
|
|
26
|
+
│ skill_guide, diagnose, export_artifact, import_artifact,│
|
|
27
|
+
│ stats │
|
|
28
28
|
└──────────────────┬──────────────────────────────┘
|
|
29
29
|
│
|
|
30
30
|
▼
|
|
@@ -72,6 +72,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
72
72
|
| `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
|
|
73
73
|
| `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
|
|
74
74
|
| `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
|
|
75
|
+
| `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
|
|
76
|
+
| `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
|
|
75
77
|
|
|
76
78
|
### Graph Management Tools (Medium Frequency)
|
|
77
79
|
|
|
@@ -81,8 +83,6 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
81
83
|
| `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
|
|
82
84
|
| `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
|
|
83
85
|
| `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
|
|
84
|
-
| `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
|
|
85
|
-
| `graphflow_model_download` | Download local compression model | Rare - offline setup |
|
|
86
86
|
|
|
87
87
|
### Collaboration & Insights Tools (Low Frequency)
|
|
88
88
|
|
|
@@ -91,8 +91,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
91
91
|
| `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
|
|
92
92
|
| `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
|
|
93
93
|
| `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
|
|
94
|
+
| `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
|
|
94
95
|
| `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
|
|
95
|
-
| `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
|
|
96
96
|
| `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
|
|
97
97
|
|
|
98
98
|
---
|
|
@@ -113,9 +113,10 @@ Step 4: Read full files only when exact edits required
|
|
|
113
113
|
**Input - preview_context:**
|
|
114
114
|
```typescript
|
|
115
115
|
{
|
|
116
|
-
query: string; // Required -
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
query: string; // Required - user question (Chinese OK)
|
|
117
|
+
englishQuery?: string; // Agent-translated English code search terms (recommended for CJK)
|
|
118
|
+
configPath?: string;
|
|
119
|
+
rootDir?: string;
|
|
119
120
|
}
|
|
120
121
|
```
|
|
121
122
|
|
|
@@ -123,35 +124,44 @@ Step 4: Read full files only when exact edits required
|
|
|
123
124
|
```typescript
|
|
124
125
|
{
|
|
125
126
|
anchorId: string; // Required - anchor id from preview_context
|
|
126
|
-
configPath?: string;
|
|
127
|
-
rootDir?: string;
|
|
127
|
+
configPath?: string;
|
|
128
|
+
rootDir?: string;
|
|
128
129
|
}
|
|
129
130
|
```
|
|
130
131
|
|
|
131
132
|
**Output structure (preview_context):**
|
|
132
133
|
```typescript
|
|
133
134
|
{
|
|
134
|
-
summary: string[];
|
|
135
|
-
anchors: Array<{
|
|
136
|
-
id: string;
|
|
137
|
-
type: "Module" | "File" | "Symbol";
|
|
138
|
-
layer: "L1" | "L2" | "L3";
|
|
139
|
-
}>;
|
|
135
|
+
summary: string[];
|
|
136
|
+
anchors: Array<{ id: string; type: string; layer: "L1" | "L2" | "L3" }>;
|
|
140
137
|
tokenBudget: {
|
|
141
|
-
maxContextTokens: number;
|
|
142
|
-
estimatedRawTokens: number;
|
|
143
|
-
compressedTokens: number;
|
|
144
|
-
estimatedSavingsPercent: number;
|
|
145
|
-
budgetUsedPercent: number;
|
|
138
|
+
maxContextTokens: number;
|
|
139
|
+
estimatedRawTokens: number;
|
|
140
|
+
compressedTokens: number;
|
|
141
|
+
estimatedSavingsPercent: number;
|
|
142
|
+
budgetUsedPercent: number;
|
|
146
143
|
};
|
|
147
|
-
|
|
144
|
+
agentWorkItems?: Array<{ id: string; kind: string; prompt: string }>; // CJK low-match delegation
|
|
145
|
+
englishQuery?: string;
|
|
148
146
|
}
|
|
149
147
|
```
|
|
150
148
|
|
|
151
|
-
**Always report to user:**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
**Always report to user:** token savings %, anchor count, key summary findings
|
|
150
|
+
|
|
151
|
+
### Workflow 1b: Chinese / CJK queries (agent translates → English search)
|
|
152
|
+
|
|
153
|
+
**Use when:** User asks in Chinese but the codebase uses English symbols
|
|
154
|
+
|
|
155
|
+
GraphFlow tokenizes CJK and expands workspace path hints. When that is not enough, **YOU must translate** to English code keywords.
|
|
156
|
+
|
|
157
|
+
**Preferred (proactive):**
|
|
158
|
+
```
|
|
159
|
+
Step 1: Translate user intent to English file/symbol terms with YOUR model
|
|
160
|
+
Step 2: graphflow_preview_context({ query: "<Chinese>", englishQuery: "battle combat ...", rootDir })
|
|
161
|
+
Step 3: Use summary + anchors
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Fallback:** If `anchorCount < 3` and `agentWorkItems` includes `query-translate-en`, answer JSON prompt and retry with `englishQuery`.
|
|
155
165
|
|
|
156
166
|
---
|
|
157
167
|
|
|
@@ -300,14 +310,6 @@ graphflow_import_artifact(inputPath?)
|
|
|
300
310
|
|
|
301
311
|
### Workflow 7: Advanced Capabilities
|
|
302
312
|
|
|
303
|
-
#### Semantic Enrichment (LLM required)
|
|
304
|
-
```
|
|
305
|
-
graphflow_enrich_graph(batchSize?, sleepMs?, timeoutMs?)
|
|
306
|
-
```
|
|
307
|
-
- Adds semantic descriptions to symbol nodes
|
|
308
|
-
- Improves context quality for complex queries
|
|
309
|
-
- Requires configured LLM provider
|
|
310
|
-
|
|
311
313
|
#### Skill Insights (learning flywheel)
|
|
312
314
|
```
|
|
313
315
|
graphflow_skill_insights(limit?, rootDir?)
|
|
@@ -324,14 +326,6 @@ graphflow_stats(configPath?, rootDir?)
|
|
|
324
326
|
- ROI tracking
|
|
325
327
|
- See how much GraphFlow has saved
|
|
326
328
|
|
|
327
|
-
#### Prometheus Metrics
|
|
328
|
-
```
|
|
329
|
-
graphflow_metrics(configPath?, rootDir?)
|
|
330
|
-
```
|
|
331
|
-
- Prometheus text exposition format
|
|
332
|
-
- Token savings, graph size, compression ratio
|
|
333
|
-
- For observability dashboards
|
|
334
|
-
|
|
335
329
|
#### Diagnostics
|
|
336
330
|
```
|
|
337
331
|
graphflow_diagnose(configPath?)
|
|
@@ -377,9 +371,8 @@ Start
|
|
|
377
371
|
├─ Do you want to leverage prior learning?
|
|
378
372
|
│ └─ YES → graphflow_skill_insights
|
|
379
373
|
│
|
|
380
|
-
├─ Tracking ROI
|
|
381
|
-
│
|
|
382
|
-
│ └─ Prometheus → graphflow_metrics
|
|
374
|
+
├─ Tracking ROI?
|
|
375
|
+
│ └─ graphflow_stats
|
|
383
376
|
│
|
|
384
377
|
└─ Is routing/models misbehaving?
|
|
385
378
|
└─ YES → graphflow_diagnose
|
|
@@ -456,9 +449,10 @@ Always pay attention to `tokenBudget`:
|
|
|
456
449
|
## Troubleshooting
|
|
457
450
|
|
|
458
451
|
### "0 anchors found" or empty results
|
|
459
|
-
1.
|
|
460
|
-
2.
|
|
461
|
-
3. If
|
|
452
|
+
1. **Chinese/CJK:** translate to English keywords; pass `englishQuery` or answer `agentWorkItems` id `query-translate-en`
|
|
453
|
+
2. Check if graph exists: `graphflow_inspect_graph`
|
|
454
|
+
3. If empty: run `graphflow_index`
|
|
455
|
+
4. If still empty: verify `rootDir` points to correct project
|
|
462
456
|
|
|
463
457
|
### Results seem stale
|
|
464
458
|
1. Run `graphflow_index` (incremental, fast)
|
|
@@ -467,7 +461,7 @@ Always pay attention to `tokenBudget`:
|
|
|
467
461
|
### Context quality is poor
|
|
468
462
|
1. Try more specific query terms
|
|
469
463
|
2. Check if symbols are indexed (inspect graph)
|
|
470
|
-
3. Run `
|
|
464
|
+
3. Run `graphflow_rebuild` if the graph may be stale
|
|
471
465
|
|
|
472
466
|
### Tool errors / configuration issues
|
|
473
467
|
1. Run `graphflow_diagnose` to check provider health
|
|
@@ -527,9 +521,6 @@ await graphflow_skill_insights({ limit: 5 });
|
|
|
527
521
|
// Token savings stats
|
|
528
522
|
await graphflow_stats();
|
|
529
523
|
|
|
530
|
-
// Prometheus metrics
|
|
531
|
-
await graphflow_metrics();
|
|
532
|
-
|
|
533
524
|
// Diagnose issues
|
|
534
525
|
await graphflow_diagnose();
|
|
535
526
|
```
|
package/package.json
CHANGED
|
@@ -27,6 +27,22 @@ Before broad code exploration, implementation, debugging, review, planning, or a
|
|
|
27
27
|
|
|
28
28
|
Do not scan the whole repository, recursively inspect many files, or read large files before trying GraphFlow context.
|
|
29
29
|
|
|
30
|
+
## Chinese / CJK queries (agent must translate)
|
|
31
|
+
|
|
32
|
+
Code symbols are mostly English. For Chinese user questions:
|
|
33
|
+
|
|
34
|
+
1. **Proactive:** Before or with `graphflow_preview_context`, translate intent to English file/symbol keywords and pass `englishQuery`.
|
|
35
|
+
2. **Reactive:** If preview returns `agentWorkItems` with `query-translate-en` (low `anchorCount`), answer the JSON prompt with your model, then retry preview with `englishQuery`.
|
|
36
|
+
3. Keep `query` as the original Chinese text; use `englishQuery` for search terms only.
|
|
37
|
+
|
|
38
|
+
```typescript
|
|
39
|
+
graphflow_preview_context({
|
|
40
|
+
query: "游戏战斗系统怎么实现的",
|
|
41
|
+
englishQuery: "battle combat fight damage scene system",
|
|
42
|
+
rootDir: "/absolute/path/to/project"
|
|
43
|
+
})
|
|
44
|
+
```
|
|
45
|
+
|
|
30
46
|
## Tool Inventory (18 MCP Tools)
|
|
31
47
|
|
|
32
48
|
### Core Context Tools (Highest Frequency)
|
|
@@ -44,6 +60,8 @@ Do not scan the whole repository, recursively inspect many files, or read large
|
|
|
44
60
|
| `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
|
|
45
61
|
| `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
|
|
46
62
|
| `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
|
|
63
|
+
| `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
|
|
64
|
+
| `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
|
|
47
65
|
|
|
48
66
|
### Graph Management Tools (Medium Frequency)
|
|
49
67
|
|
|
@@ -53,8 +71,6 @@ Do not scan the whole repository, recursively inspect many files, or read large
|
|
|
53
71
|
| `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
|
|
54
72
|
| `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
|
|
55
73
|
| `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
|
|
56
|
-
| `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
|
|
57
|
-
| `graphflow_model_download` | Download local compression model | Rare - offline setup |
|
|
58
74
|
|
|
59
75
|
### Collaboration & Insights Tools (Low Frequency)
|
|
60
76
|
|
|
@@ -63,8 +79,8 @@ Do not scan the whole repository, recursively inspect many files, or read large
|
|
|
63
79
|
| `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
|
|
64
80
|
| `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
|
|
65
81
|
| `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
|
|
82
|
+
| `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
|
|
66
83
|
| `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
|
|
67
|
-
| `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
|
|
68
84
|
| `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
|
|
69
85
|
|
|
70
86
|
## Standard Workflows
|
|
@@ -21,10 +21,10 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
21
21
|
┌─────────────────────────────────────────────────┐
|
|
22
22
|
│ GraphFlow MCP Server (persistent backend) │
|
|
23
23
|
│ 18 tools: preview, expand, plan, plan_insight, │
|
|
24
|
-
│ run, report_outcome,
|
|
25
|
-
│
|
|
26
|
-
│ diagnose, export_artifact, import_artifact
|
|
27
|
-
│ stats
|
|
24
|
+
│ run, report_outcome, submit_insight, merge_insight,│
|
|
25
|
+
│ index, index_file, rebuild, inspect, skill_insights,│
|
|
26
|
+
│ skill_guide, diagnose, export_artifact, import_artifact,│
|
|
27
|
+
│ stats │
|
|
28
28
|
└──────────────────┬──────────────────────────────┘
|
|
29
29
|
│
|
|
30
30
|
▼
|
|
@@ -72,6 +72,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
72
72
|
| `graphflow_plan_insight` | Six Thinking Hats + 5-Why deep analysis | Medium - ambiguous/high-stakes tasks |
|
|
73
73
|
| `graphflow_run` | Plan + context package (bridge mode) | Medium - full task packaging |
|
|
74
74
|
| `graphflow_report_outcome` | Report bridge-mode execution outcome back | Medium - close the learning loop |
|
|
75
|
+
| `graphflow_submit_insight` | Submit agent answers to Six Hats / plan prompts | Medium - no external LLM API |
|
|
76
|
+
| `graphflow_merge_insight` | Merge submitted insights into unified plan | Medium - after submit_insight |
|
|
75
77
|
|
|
76
78
|
### Graph Management Tools (Medium Frequency)
|
|
77
79
|
|
|
@@ -81,8 +83,6 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
81
83
|
| `graphflow_index_file` | Single file incremental index | Medium-High - after saving a file |
|
|
82
84
|
| `graphflow_rebuild` | Clear cache + full re-index | Low - when graph is stale/corrupted |
|
|
83
85
|
| `graphflow_inspect_graph` | Graph stats & sample nodes/edges | Low - check graph health |
|
|
84
|
-
| `graphflow_enrich_graph` | Semantic enrichment of symbols | Rare - LLM-powered enrichment |
|
|
85
|
-
| `graphflow_model_download` | Download local compression model | Rare - offline setup |
|
|
86
86
|
|
|
87
87
|
### Collaboration & Insights Tools (Low Frequency)
|
|
88
88
|
|
|
@@ -91,8 +91,8 @@ GraphFlow is a graph-based context and planning service backed by a persistent M
|
|
|
91
91
|
| `graphflow_export_artifact` | Export graph to portable artifact | Low - team sharing |
|
|
92
92
|
| `graphflow_import_artifact` | Import graph artifact | Low - skip full index on new machine |
|
|
93
93
|
| `graphflow_skill_insights` | Learned skill patterns | Low - leverage prior learning |
|
|
94
|
+
| `graphflow_skill_guide` | Skill usage guide for connected agents | Low - onboarding |
|
|
94
95
|
| `graphflow_stats` | Cumulative token savings stats | Low - ROI tracking |
|
|
95
|
-
| `graphflow_metrics` | Prometheus-compatible metrics | Low - observability |
|
|
96
96
|
| `graphflow_diagnose` | Provider health & model routing | Rare - config issues |
|
|
97
97
|
|
|
98
98
|
---
|
|
@@ -113,9 +113,10 @@ Step 4: Read full files only when exact edits required
|
|
|
113
113
|
**Input - preview_context:**
|
|
114
114
|
```typescript
|
|
115
115
|
{
|
|
116
|
-
query: string; // Required -
|
|
117
|
-
|
|
118
|
-
|
|
116
|
+
query: string; // Required - user question (Chinese OK)
|
|
117
|
+
englishQuery?: string; // Agent-translated English code search terms (recommended for CJK)
|
|
118
|
+
configPath?: string;
|
|
119
|
+
rootDir?: string;
|
|
119
120
|
}
|
|
120
121
|
```
|
|
121
122
|
|
|
@@ -123,35 +124,44 @@ Step 4: Read full files only when exact edits required
|
|
|
123
124
|
```typescript
|
|
124
125
|
{
|
|
125
126
|
anchorId: string; // Required - anchor id from preview_context
|
|
126
|
-
configPath?: string;
|
|
127
|
-
rootDir?: string;
|
|
127
|
+
configPath?: string;
|
|
128
|
+
rootDir?: string;
|
|
128
129
|
}
|
|
129
130
|
```
|
|
130
131
|
|
|
131
132
|
**Output structure (preview_context):**
|
|
132
133
|
```typescript
|
|
133
134
|
{
|
|
134
|
-
summary: string[];
|
|
135
|
-
anchors: Array<{
|
|
136
|
-
id: string;
|
|
137
|
-
type: "Module" | "File" | "Symbol";
|
|
138
|
-
layer: "L1" | "L2" | "L3";
|
|
139
|
-
}>;
|
|
135
|
+
summary: string[];
|
|
136
|
+
anchors: Array<{ id: string; type: string; layer: "L1" | "L2" | "L3" }>;
|
|
140
137
|
tokenBudget: {
|
|
141
|
-
maxContextTokens: number;
|
|
142
|
-
estimatedRawTokens: number;
|
|
143
|
-
compressedTokens: number;
|
|
144
|
-
estimatedSavingsPercent: number;
|
|
145
|
-
budgetUsedPercent: number;
|
|
138
|
+
maxContextTokens: number;
|
|
139
|
+
estimatedRawTokens: number;
|
|
140
|
+
compressedTokens: number;
|
|
141
|
+
estimatedSavingsPercent: number;
|
|
142
|
+
budgetUsedPercent: number;
|
|
146
143
|
};
|
|
147
|
-
|
|
144
|
+
agentWorkItems?: Array<{ id: string; kind: string; prompt: string }>; // CJK low-match delegation
|
|
145
|
+
englishQuery?: string;
|
|
148
146
|
}
|
|
149
147
|
```
|
|
150
148
|
|
|
151
|
-
**Always report to user:**
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
149
|
+
**Always report to user:** token savings %, anchor count, key summary findings
|
|
150
|
+
|
|
151
|
+
### Workflow 1b: Chinese / CJK queries (agent translates → English search)
|
|
152
|
+
|
|
153
|
+
**Use when:** User asks in Chinese but the codebase uses English symbols
|
|
154
|
+
|
|
155
|
+
GraphFlow tokenizes CJK and expands workspace path hints. When that is not enough, **YOU must translate** to English code keywords.
|
|
156
|
+
|
|
157
|
+
**Preferred (proactive):**
|
|
158
|
+
```
|
|
159
|
+
Step 1: Translate user intent to English file/symbol terms with YOUR model
|
|
160
|
+
Step 2: graphflow_preview_context({ query: "<Chinese>", englishQuery: "battle combat ...", rootDir })
|
|
161
|
+
Step 3: Use summary + anchors
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
**Fallback:** If `anchorCount < 3` and `agentWorkItems` includes `query-translate-en`, answer JSON prompt and retry with `englishQuery`.
|
|
155
165
|
|
|
156
166
|
---
|
|
157
167
|
|
|
@@ -300,14 +310,6 @@ graphflow_import_artifact(inputPath?)
|
|
|
300
310
|
|
|
301
311
|
### Workflow 7: Advanced Capabilities
|
|
302
312
|
|
|
303
|
-
#### Semantic Enrichment (LLM required)
|
|
304
|
-
```
|
|
305
|
-
graphflow_enrich_graph(batchSize?, sleepMs?, timeoutMs?)
|
|
306
|
-
```
|
|
307
|
-
- Adds semantic descriptions to symbol nodes
|
|
308
|
-
- Improves context quality for complex queries
|
|
309
|
-
- Requires configured LLM provider
|
|
310
|
-
|
|
311
313
|
#### Skill Insights (learning flywheel)
|
|
312
314
|
```
|
|
313
315
|
graphflow_skill_insights(limit?, rootDir?)
|
|
@@ -324,14 +326,6 @@ graphflow_stats(configPath?, rootDir?)
|
|
|
324
326
|
- ROI tracking
|
|
325
327
|
- See how much GraphFlow has saved
|
|
326
328
|
|
|
327
|
-
#### Prometheus Metrics
|
|
328
|
-
```
|
|
329
|
-
graphflow_metrics(configPath?, rootDir?)
|
|
330
|
-
```
|
|
331
|
-
- Prometheus text exposition format
|
|
332
|
-
- Token savings, graph size, compression ratio
|
|
333
|
-
- For observability dashboards
|
|
334
|
-
|
|
335
329
|
#### Diagnostics
|
|
336
330
|
```
|
|
337
331
|
graphflow_diagnose(configPath?)
|
|
@@ -377,9 +371,8 @@ Start
|
|
|
377
371
|
├─ Do you want to leverage prior learning?
|
|
378
372
|
│ └─ YES → graphflow_skill_insights
|
|
379
373
|
│
|
|
380
|
-
├─ Tracking ROI
|
|
381
|
-
│
|
|
382
|
-
│ └─ Prometheus → graphflow_metrics
|
|
374
|
+
├─ Tracking ROI?
|
|
375
|
+
│ └─ graphflow_stats
|
|
383
376
|
│
|
|
384
377
|
└─ Is routing/models misbehaving?
|
|
385
378
|
└─ YES → graphflow_diagnose
|
|
@@ -456,9 +449,10 @@ Always pay attention to `tokenBudget`:
|
|
|
456
449
|
## Troubleshooting
|
|
457
450
|
|
|
458
451
|
### "0 anchors found" or empty results
|
|
459
|
-
1.
|
|
460
|
-
2.
|
|
461
|
-
3. If
|
|
452
|
+
1. **Chinese/CJK:** translate to English keywords; pass `englishQuery` or answer `agentWorkItems` id `query-translate-en`
|
|
453
|
+
2. Check if graph exists: `graphflow_inspect_graph`
|
|
454
|
+
3. If empty: run `graphflow_index`
|
|
455
|
+
4. If still empty: verify `rootDir` points to correct project
|
|
462
456
|
|
|
463
457
|
### Results seem stale
|
|
464
458
|
1. Run `graphflow_index` (incremental, fast)
|
|
@@ -467,7 +461,7 @@ Always pay attention to `tokenBudget`:
|
|
|
467
461
|
### Context quality is poor
|
|
468
462
|
1. Try more specific query terms
|
|
469
463
|
2. Check if symbols are indexed (inspect graph)
|
|
470
|
-
3. Run `
|
|
464
|
+
3. Run `graphflow_rebuild` if the graph may be stale
|
|
471
465
|
|
|
472
466
|
### Tool errors / configuration issues
|
|
473
467
|
1. Run `graphflow_diagnose` to check provider health
|
|
@@ -527,9 +521,6 @@ await graphflow_skill_insights({ limit: 5 });
|
|
|
527
521
|
// Token savings stats
|
|
528
522
|
await graphflow_stats();
|
|
529
523
|
|
|
530
|
-
// Prometheus metrics
|
|
531
|
-
await graphflow_metrics();
|
|
532
|
-
|
|
533
524
|
// Diagnose issues
|
|
534
525
|
await graphflow_diagnose();
|
|
535
526
|
```
|