@roarpeng/graphflow 1.9.13 → 1.9.15

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 (151) hide show
  1. package/AGENTS.md +2 -0
  2. package/CHANGELOG.md +43 -0
  3. package/CLAUDE.md +2 -0
  4. package/README.md +63 -9
  5. package/README.zh.md +137 -0
  6. package/cordis.patch.yml +42 -0
  7. package/dist/config/defaults.d.ts.map +1 -1
  8. package/dist/config/defaults.js +1 -0
  9. package/dist/config/defaults.js.map +1 -1
  10. package/dist/config/loader.d.ts.map +1 -1
  11. package/dist/config/loader.js +1 -0
  12. package/dist/config/loader.js.map +1 -1
  13. package/dist/config/schema.d.ts +6 -0
  14. package/dist/config/schema.d.ts.map +1 -1
  15. package/dist/graph/context-slicer-types.d.ts +7 -1
  16. package/dist/graph/context-slicer-types.d.ts.map +1 -1
  17. package/dist/graph/context-slicer-types.js.map +1 -1
  18. package/dist/graph/context-slicer.d.ts +6 -1
  19. package/dist/graph/context-slicer.d.ts.map +1 -1
  20. package/dist/graph/context-slicer.js +120 -39
  21. package/dist/graph/context-slicer.js.map +1 -1
  22. package/dist/graph/snapshot-view.d.ts +4 -0
  23. package/dist/graph/snapshot-view.d.ts.map +1 -1
  24. package/dist/graph/snapshot-view.js +36 -2
  25. package/dist/graph/snapshot-view.js.map +1 -1
  26. package/dist/graph/token-savings.d.ts +13 -0
  27. package/dist/graph/token-savings.d.ts.map +1 -1
  28. package/dist/graph/token-savings.js +36 -6
  29. package/dist/graph/token-savings.js.map +1 -1
  30. package/dist/hooks/auto-capture.d.ts +3 -2
  31. package/dist/hooks/auto-capture.d.ts.map +1 -1
  32. package/dist/hooks/auto-capture.js +3 -2
  33. package/dist/hooks/auto-capture.js.map +1 -1
  34. package/dist/index.d.ts +6 -2
  35. package/dist/index.d.ts.map +1 -1
  36. package/dist/index.js +13 -2
  37. package/dist/index.js.map +1 -1
  38. package/dist/integrations/agent-mcp-installer.d.ts.map +1 -1
  39. package/dist/integrations/agent-mcp-installer.js +8 -0
  40. package/dist/integrations/agent-mcp-installer.js.map +1 -1
  41. package/dist/integrations/agent-profiles/index.d.ts +2 -0
  42. package/dist/integrations/agent-profiles/index.d.ts.map +1 -1
  43. package/dist/integrations/agent-profiles/index.js +2 -0
  44. package/dist/integrations/agent-profiles/index.js.map +1 -1
  45. package/dist/integrations/agent-profiles/profiles/dsh.d.ts +2 -0
  46. package/dist/integrations/agent-profiles/profiles/dsh.d.ts.map +1 -0
  47. package/dist/integrations/agent-profiles/profiles/dsh.js +16 -0
  48. package/dist/integrations/agent-profiles/profiles/dsh.js.map +1 -0
  49. package/dist/integrations/agent-profiles/skills/dsh.d.ts +2 -0
  50. package/dist/integrations/agent-profiles/skills/dsh.d.ts.map +1 -0
  51. package/dist/integrations/agent-profiles/skills/dsh.js +13 -0
  52. package/dist/integrations/agent-profiles/skills/dsh.js.map +1 -0
  53. package/dist/integrations/claude-code-hooks.d.ts +6 -3
  54. package/dist/integrations/claude-code-hooks.d.ts.map +1 -1
  55. package/dist/integrations/claude-code-hooks.js +20 -8
  56. package/dist/integrations/claude-code-hooks.js.map +1 -1
  57. package/dist/integrations/dsh-harness-installer.d.ts +53 -0
  58. package/dist/integrations/dsh-harness-installer.d.ts.map +1 -0
  59. package/dist/integrations/dsh-harness-installer.js +211 -0
  60. package/dist/integrations/dsh-harness-installer.js.map +1 -0
  61. package/dist/integrations/skill-installer.d.ts.map +1 -1
  62. package/dist/integrations/skill-installer.js +6 -0
  63. package/dist/integrations/skill-installer.js.map +1 -1
  64. package/dist/learning/canary-gate.d.ts +5 -2
  65. package/dist/learning/canary-gate.d.ts.map +1 -1
  66. package/dist/learning/canary-gate.js +11 -3
  67. package/dist/learning/canary-gate.js.map +1 -1
  68. package/dist/learning/dialogue-thread.d.ts +88 -0
  69. package/dist/learning/dialogue-thread.d.ts.map +1 -0
  70. package/dist/learning/dialogue-thread.js +419 -0
  71. package/dist/learning/dialogue-thread.js.map +1 -0
  72. package/dist/learning/episodic-memory.d.ts +16 -0
  73. package/dist/learning/episodic-memory.d.ts.map +1 -1
  74. package/dist/learning/episodic-memory.js +61 -1
  75. package/dist/learning/episodic-memory.js.map +1 -1
  76. package/dist/learning/skill-admission.d.ts +38 -0
  77. package/dist/learning/skill-admission.d.ts.map +1 -0
  78. package/dist/learning/skill-admission.js +195 -0
  79. package/dist/learning/skill-admission.js.map +1 -0
  80. package/dist/learning/skill-consolidate.d.ts +4 -1
  81. package/dist/learning/skill-consolidate.d.ts.map +1 -1
  82. package/dist/learning/skill-consolidate.js +56 -6
  83. package/dist/learning/skill-consolidate.js.map +1 -1
  84. package/dist/learning/skill-flywheel.d.ts +8 -2
  85. package/dist/learning/skill-flywheel.d.ts.map +1 -1
  86. package/dist/learning/skill-flywheel.js +65 -38
  87. package/dist/learning/skill-flywheel.js.map +1 -1
  88. package/dist/learning/skill-opt-lite.d.ts +17 -0
  89. package/dist/learning/skill-opt-lite.d.ts.map +1 -1
  90. package/dist/learning/skill-opt-lite.js +108 -0
  91. package/dist/learning/skill-opt-lite.js.map +1 -1
  92. package/dist/learning/skill-store.d.ts.map +1 -1
  93. package/dist/learning/skill-store.js +44 -4
  94. package/dist/learning/skill-store.js.map +1 -1
  95. package/dist/learning/skill-types.d.ts +15 -0
  96. package/dist/learning/skill-types.d.ts.map +1 -1
  97. package/dist/learning/skill-types.js +11 -0
  98. package/dist/learning/skill-types.js.map +1 -1
  99. package/dist/learning/workbench-topic.d.ts +116 -0
  100. package/dist/learning/workbench-topic.d.ts.map +1 -0
  101. package/dist/learning/workbench-topic.js +642 -0
  102. package/dist/learning/workbench-topic.js.map +1 -0
  103. package/dist/learning/workflow-skill.d.ts +25 -0
  104. package/dist/learning/workflow-skill.d.ts.map +1 -0
  105. package/dist/learning/workflow-skill.js +91 -0
  106. package/dist/learning/workflow-skill.js.map +1 -0
  107. package/dist/surfaces/cli/index.js +124 -6
  108. package/dist/surfaces/cli/index.js.map +1 -1
  109. package/dist/surfaces/cli/init.d.ts +3 -0
  110. package/dist/surfaces/cli/init.d.ts.map +1 -1
  111. package/dist/surfaces/cli/init.js +44 -3
  112. package/dist/surfaces/cli/init.js.map +1 -1
  113. package/dist/surfaces/cli/output.d.ts.map +1 -1
  114. package/dist/surfaces/cli/output.js +4 -1
  115. package/dist/surfaces/cli/output.js.map +1 -1
  116. package/dist/surfaces/cli/runtime/dialogue.d.ts +23 -0
  117. package/dist/surfaces/cli/runtime/dialogue.d.ts.map +1 -0
  118. package/dist/surfaces/cli/runtime/dialogue.js +50 -0
  119. package/dist/surfaces/cli/runtime/dialogue.js.map +1 -0
  120. package/dist/surfaces/cli/runtime/graph.d.ts +24 -22
  121. package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
  122. package/dist/surfaces/cli/runtime/graph.js +284 -26
  123. package/dist/surfaces/cli/runtime/graph.js.map +1 -1
  124. package/dist/surfaces/cli/runtime/memory.d.ts +7 -6
  125. package/dist/surfaces/cli/runtime/memory.d.ts.map +1 -1
  126. package/dist/surfaces/cli/runtime/memory.js +12 -21
  127. package/dist/surfaces/cli/runtime/memory.js.map +1 -1
  128. package/dist/surfaces/cli/runtime/routing.d.ts +4 -1
  129. package/dist/surfaces/cli/runtime/routing.d.ts.map +1 -1
  130. package/dist/surfaces/cli/runtime/routing.js +54 -7
  131. package/dist/surfaces/cli/runtime/routing.js.map +1 -1
  132. package/dist/surfaces/cli/runtime/types.d.ts +63 -0
  133. package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
  134. package/dist/surfaces/cli/runtime.d.ts +2 -1
  135. package/dist/surfaces/cli/runtime.d.ts.map +1 -1
  136. package/dist/surfaces/cli/runtime.js +7 -2
  137. package/dist/surfaces/cli/runtime.js.map +1 -1
  138. package/dist/surfaces/cursor-rules/graphflow.mdc +10 -3
  139. package/dist/surfaces/mcp/tool-definitions.d.ts.map +1 -1
  140. package/dist/surfaces/mcp/tool-definitions.js +24 -4
  141. package/dist/surfaces/mcp/tool-definitions.js.map +1 -1
  142. package/dist/surfaces/mcp/tool-handlers.d.ts.map +1 -1
  143. package/dist/surfaces/mcp/tool-handlers.js +27 -3
  144. package/dist/surfaces/mcp/tool-handlers.js.map +1 -1
  145. package/dist/surfaces/trae-skill/graphflow/SKILL.md +51 -5
  146. package/dsh/plugin.mjs +255 -0
  147. package/package.json +20 -2
  148. package/plugin.json +27 -4
  149. package/skills/graphflow/SKILL.md +51 -5
  150. package/src/surfaces/cursor-rules/graphflow.mdc +10 -3
  151. package/src/surfaces/trae-skill/graphflow/SKILL.md +51 -5
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "graphflow"
3
- description: "Graph-based code context compression, task planning, and knowledge graph orchestration (10 MCP tools). Invoke before ANY code question, bug fix, debugging, file reading, Chinese/CJK query, refactor, or multi-step edit — ALWAYS call graphflow_context MCP first when GraphFlow is connected."
3
+ description: "图谱上下文压缩、任务规划与知识图谱编排(10 MCP 工具)。任何读代码、改代码、排错、中文问题之前必须先调 graphflow_context。DeepSeek Harness 下工具名为 mcp__graphflow__graphflow_*。"
4
4
  ---
5
5
 
6
6
  # GraphFlow Skill
@@ -91,6 +91,42 @@ Run `npx @roarpeng/graphflow install` from the project root. Do **not** hardcode
91
91
  | `.vscode/mcp.json` | Project MCP (optional, team-shared) |
92
92
  | `.github/copilot-instructions.md` | Repo-level Copilot instructions |
93
93
 
94
+ ### DeepSeek Harness(`dsh`)插件:用法与能力
95
+
96
+ GraphFlow 是 DeepSeek Harness 的 `dsh-plugin`。装入后模型看到的工具名带前缀 `mcp__graphflow__`。
97
+
98
+ **能力**
99
+
100
+ | 能力 | 工具(dsh 名) |
101
+ |------|----------------|
102
+ | 压缩上下文(先调用) | `mcp__graphflow__graphflow_context` |
103
+ | 任务规划 DAG | `mcp__graphflow__graphflow_plan` |
104
+ | 桥接执行包 | `mcp__graphflow__graphflow_run` |
105
+ | 回填飞轮 | `mcp__graphflow__graphflow_report_outcome` |
106
+ | ATP insight | `mcp__graphflow__graphflow_insight` |
107
+ | 增量/全量建图 | `mcp__graphflow__graphflow_index` |
108
+ | 技能洞察 | `mcp__graphflow__graphflow_skill_insights` |
109
+ | 诊断 | `mcp__graphflow__graphflow_diagnose` |
110
+ | 图谱产物 | `mcp__graphflow__graphflow_artifact` |
111
+ | 技能指南 | `mcp__graphflow__graphflow_skill_guide` |
112
+
113
+ **安装**
114
+
115
+ ```sh
116
+ dsh plugin --profile web add @roarpeng/graphflow
117
+ npx @deepseek-ai/dsh web
118
+ # 或已有 ~/.dsh 时写 home overlay + skill 文件:
119
+ npx @roarpeng/graphflow install
120
+ ```
121
+
122
+ | 路径 | 作用 |
123
+ |------|------|
124
+ | 包内 `cordis.patch.yml` | `dsh plugin add` 插入的 bundle 层:MCP(`cwd: process.cwd()`)+ `@roarpeng/graphflow/dsh` glue |
125
+ | `$DSH_HOME/cordis.patch.yml`(默认 `~/.dsh`) | `graphflow install` 写的 home overlay |
126
+ | `$DSH_HOME/skills/graphflow/SKILL.md` | 本 Skill(install 复制);glue 也会在运行时 `ctx.skills.register` |
127
+
128
+ **用法:** 第一轮先 `mcp__graphflow__graphflow_context`(`rootDir` = 仓库绝对路径)。不要在 patch 里写死 `GRAPHFLOW_WORKSPACE_ROOT`。走了 `graphflow_run` 后必须 `graphflow_report_outcome`。会话结束时 glue 会 best-effort 关闭 pending episode(`GRAPHFLOW_AUTO_CAPTURE=0` 可关)。VS Code 图谱面板 / Workbench Tree 不在 dsh 上。
129
+
94
130
  ---
95
131
 
96
132
  ## Tool Inventory (10 MCP Tools)
@@ -138,13 +174,21 @@ Step 1: graphflow_context(query: "<your question>")
138
174
  Step 2: Read summary + anchors as primary context
139
175
  Step 3: Expand specific anchors with graphflow_context(anchorId: "...") when needed
140
176
  Step 4: Read full files only when exact edits required
177
+ Step 5: After answering the user, call graphflow_context({ assistantReply: "<original answer>" })
178
+ (query optional). This fills the pending turn/topic. Store original text, not an extracted abstract.
141
179
  ```
142
180
 
181
+ Complex tasks: `graphflow_plan` seeds a **workbench** of topic containers (function nodes on the canvas). Pass `topicId` to refine a node or return to the mainline. Drift auto-forks an isolated side node; messages stay inside the topic — the canvas is not one-turn-one-node. Without a workbench, previews still record as dialogue-turn nodes (`resumeFromTurnId`). Workbench titles/Path labels are **display only**; next-turn context is Goal + path titles + local original Q/A.
182
+
143
183
  **Input - context (preview):**
144
184
  ```typescript
145
185
  {
146
- query: string; // Required for preview - user question (Chinese OK)
186
+ query?: string; // User question (Chinese OK). Omit when only filling assistantReply.
147
187
  englishQuery?: string; // Agent-translated English code search terms (recommended for CJK)
188
+ topicId?: string; // Click a workbench function node to refine / return to mainline
189
+ sessionId?: string; // Dialogue session name (default "main")
190
+ resumeFromTurnId?: string; // Continue from a clicked dialogue-turn node (legacy, no workbench)
191
+ assistantReply?: string; // Original assistant answer to store on the pending turn/topic
148
192
  configPath?: string;
149
193
  rootDir?: string;
150
194
  }
@@ -210,9 +254,11 @@ Step 2: graphflow_plan(task: "<task description>")
210
254
  (simple-plan-intent, simple-plan-decomposition) and optional suggestedNodes.
211
255
  MUST submit/merge via graphflow_insight before treating the DAG as final.
212
256
  - Local suggestedNodes are heuristic hints only.
213
- Step 3: Review plan steps and dependencies
214
- Step 4: Execute step by step, using GraphFlow context for each step
215
- Step 5: graphflow_index() after major changes
257
+ - Result includes workbench.topics and workbench.outline (mainline DAG + side branches).
258
+ Step 3: Review workbench.outline (function nodes), not chat turns. Wake later with graphflow workbench tree or graphflow_diagnose (graph.workbenchOutline).
259
+ Step 4: Refine a node: graphflow_context({ query, topicId: "<topic:...>" })
260
+ Step 5: If the conversation drifted, click a 主线 node (same topicId) to restore trunk context
261
+ Step 6: graphflow_index() after major changes
216
262
  ```
217
263
 
218
264
  **Input:**
@@ -87,8 +87,11 @@ Step 1: graphflow_context(query: "<your question>")
87
87
  Step 2: Read summary + anchors as primary context
88
88
  Step 3: Expand specific anchors with graphflow_context(anchorId: "...") when needed
89
89
  Step 4: Read full files only when exact edits required
90
+ Step 5: After answering, graphflow_context({ assistantReply: "<original answer>" }) to fill the pending turn
90
91
  ```
91
92
 
93
+ Each `graphflow_context` preview records the user question into the graph (workbench topic if a plan DAG exists, otherwise a dialogue-turn). After answering, call again with `assistantReply` (query optional) so the original answer is stored. Workbench titles are display labels only — do not replace stored messages with an extracted abstract.
94
+
92
95
  ### Workflow 2: Plan Before Coding (complex tasks)
93
96
 
94
97
  **Use when:** Multi-step changes, refactors, features with unclear scope
@@ -96,11 +99,14 @@ Step 4: Read full files only when exact edits required
96
99
  ```
97
100
  Step 1: graphflow_context(query: "<task>")
98
101
  Step 2: graphflow_plan(task: "<task description>")
99
- Step 3: Review plan steps and dependencies
100
- Step 4: Execute step by step, using GraphFlow context for each step
101
- Step 5: graphflow_index() after major changes
102
+ Step 3: Review workbench.topics (function nodes on the canvas). Wake the outline later with graphflow workbench tree / graphflow_diagnose.graph.workbenchOutline.
103
+ Step 4: Refine a node with graphflow_context({ query, topicId })
104
+ Step 5: If the chat drifted, click a 主线 node (same topicId) to return
105
+ Step 6: graphflow_index() after major changes
102
106
  ```
103
107
 
108
+ Each `graphflow_plan` seeds a **workbench** of topic containers (function nodes). Click a node and pass `topicId` to `graphflow_context` to refine that function. Drift auto-forks an isolated side node; click a 主线 node to return. Messages stay inside the topic — the canvas is not one-turn-one-node. Wake the outline with `graphflow workbench tree`, VS Code **GraphFlow: Workbench Tree**, or chat `/tree`. The tree stays collapsed until you open it.
109
+
104
110
  ### Workflow 3: Deep Analysis (complex/ambiguous tasks)
105
111
 
106
112
  **Use when:** High-stakes changes, root-cause analysis, ambiguous requirements
@@ -131,6 +137,7 @@ If MCP is unavailable, use the CLI fallback and always request JSON output:
131
137
  graphflow --json context preview "<query>"
132
138
  graphflow --json plan "<task>"
133
139
  graphflow --json graph inspect
140
+ graphflow --json workbench tree
134
141
  graphflow --json skill insights
135
142
  graphflow --json route diagnose
136
143
  ```
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: "graphflow"
3
- description: "Graph-based code context compression, task planning, and knowledge graph orchestration (10 MCP tools). Invoke before ANY code question, bug fix, debugging, file reading, Chinese/CJK query, refactor, or multi-step edit — ALWAYS call graphflow_context MCP first when GraphFlow is connected."
3
+ description: "图谱上下文压缩、任务规划与知识图谱编排(10 MCP 工具)。任何读代码、改代码、排错、中文问题之前必须先调 graphflow_context。DeepSeek Harness 下工具名为 mcp__graphflow__graphflow_*。"
4
4
  ---
5
5
 
6
6
  # GraphFlow Skill
@@ -91,6 +91,42 @@ Run `npx @roarpeng/graphflow install` from the project root. Do **not** hardcode
91
91
  | `.vscode/mcp.json` | Project MCP (optional, team-shared) |
92
92
  | `.github/copilot-instructions.md` | Repo-level Copilot instructions |
93
93
 
94
+ ### DeepSeek Harness(`dsh`)插件:用法与能力
95
+
96
+ GraphFlow 是 DeepSeek Harness 的 `dsh-plugin`。装入后模型看到的工具名带前缀 `mcp__graphflow__`。
97
+
98
+ **能力**
99
+
100
+ | 能力 | 工具(dsh 名) |
101
+ |------|----------------|
102
+ | 压缩上下文(先调用) | `mcp__graphflow__graphflow_context` |
103
+ | 任务规划 DAG | `mcp__graphflow__graphflow_plan` |
104
+ | 桥接执行包 | `mcp__graphflow__graphflow_run` |
105
+ | 回填飞轮 | `mcp__graphflow__graphflow_report_outcome` |
106
+ | ATP insight | `mcp__graphflow__graphflow_insight` |
107
+ | 增量/全量建图 | `mcp__graphflow__graphflow_index` |
108
+ | 技能洞察 | `mcp__graphflow__graphflow_skill_insights` |
109
+ | 诊断 | `mcp__graphflow__graphflow_diagnose` |
110
+ | 图谱产物 | `mcp__graphflow__graphflow_artifact` |
111
+ | 技能指南 | `mcp__graphflow__graphflow_skill_guide` |
112
+
113
+ **安装**
114
+
115
+ ```sh
116
+ dsh plugin --profile web add @roarpeng/graphflow
117
+ npx @deepseek-ai/dsh web
118
+ # 或已有 ~/.dsh 时写 home overlay + skill 文件:
119
+ npx @roarpeng/graphflow install
120
+ ```
121
+
122
+ | 路径 | 作用 |
123
+ |------|------|
124
+ | 包内 `cordis.patch.yml` | `dsh plugin add` 插入的 bundle 层:MCP(`cwd: process.cwd()`)+ `@roarpeng/graphflow/dsh` glue |
125
+ | `$DSH_HOME/cordis.patch.yml`(默认 `~/.dsh`) | `graphflow install` 写的 home overlay |
126
+ | `$DSH_HOME/skills/graphflow/SKILL.md` | 本 Skill(install 复制);glue 也会在运行时 `ctx.skills.register` |
127
+
128
+ **用法:** 第一轮先 `mcp__graphflow__graphflow_context`(`rootDir` = 仓库绝对路径)。不要在 patch 里写死 `GRAPHFLOW_WORKSPACE_ROOT`。走了 `graphflow_run` 后必须 `graphflow_report_outcome`。会话结束时 glue 会 best-effort 关闭 pending episode(`GRAPHFLOW_AUTO_CAPTURE=0` 可关)。VS Code 图谱面板 / Workbench Tree 不在 dsh 上。
129
+
94
130
  ---
95
131
 
96
132
  ## Tool Inventory (10 MCP Tools)
@@ -138,13 +174,21 @@ Step 1: graphflow_context(query: "<your question>")
138
174
  Step 2: Read summary + anchors as primary context
139
175
  Step 3: Expand specific anchors with graphflow_context(anchorId: "...") when needed
140
176
  Step 4: Read full files only when exact edits required
177
+ Step 5: After answering the user, call graphflow_context({ assistantReply: "<original answer>" })
178
+ (query optional). This fills the pending turn/topic. Store original text, not an extracted abstract.
141
179
  ```
142
180
 
181
+ Complex tasks: `graphflow_plan` seeds a **workbench** of topic containers (function nodes on the canvas). Pass `topicId` to refine a node or return to the mainline. Drift auto-forks an isolated side node; messages stay inside the topic — the canvas is not one-turn-one-node. Without a workbench, previews still record as dialogue-turn nodes (`resumeFromTurnId`). Workbench titles/Path labels are **display only**; next-turn context is Goal + path titles + local original Q/A.
182
+
143
183
  **Input - context (preview):**
144
184
  ```typescript
145
185
  {
146
- query: string; // Required for preview - user question (Chinese OK)
186
+ query?: string; // User question (Chinese OK). Omit when only filling assistantReply.
147
187
  englishQuery?: string; // Agent-translated English code search terms (recommended for CJK)
188
+ topicId?: string; // Click a workbench function node to refine / return to mainline
189
+ sessionId?: string; // Dialogue session name (default "main")
190
+ resumeFromTurnId?: string; // Continue from a clicked dialogue-turn node (legacy, no workbench)
191
+ assistantReply?: string; // Original assistant answer to store on the pending turn/topic
148
192
  configPath?: string;
149
193
  rootDir?: string;
150
194
  }
@@ -210,9 +254,11 @@ Step 2: graphflow_plan(task: "<task description>")
210
254
  (simple-plan-intent, simple-plan-decomposition) and optional suggestedNodes.
211
255
  MUST submit/merge via graphflow_insight before treating the DAG as final.
212
256
  - Local suggestedNodes are heuristic hints only.
213
- Step 3: Review plan steps and dependencies
214
- Step 4: Execute step by step, using GraphFlow context for each step
215
- Step 5: graphflow_index() after major changes
257
+ - Result includes workbench.topics and workbench.outline (mainline DAG + side branches).
258
+ Step 3: Review workbench.outline (function nodes), not chat turns. Wake later with graphflow workbench tree or graphflow_diagnose (graph.workbenchOutline).
259
+ Step 4: Refine a node: graphflow_context({ query, topicId: "<topic:...>" })
260
+ Step 5: If the conversation drifted, click a 主线 node (same topicId) to restore trunk context
261
+ Step 6: graphflow_index() after major changes
216
262
  ```
217
263
 
218
264
  **Input:**