@roarpeng/graphflow 1.9.4 → 1.9.12
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 +133 -0
- package/README.md +193 -107
- package/dist/agents/atp-example-producer.d.ts +33 -0
- package/dist/agents/atp-example-producer.d.ts.map +1 -0
- package/dist/agents/atp-example-producer.js +154 -0
- package/dist/agents/atp-example-producer.js.map +1 -0
- package/dist/agents/planner.d.ts.map +1 -1
- package/dist/agents/planner.js +14 -8
- package/dist/agents/planner.js.map +1 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +5 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/config/include-extensions.d.ts +3 -1
- package/dist/config/include-extensions.d.ts.map +1 -1
- package/dist/config/include-extensions.js +6 -3
- package/dist/config/include-extensions.js.map +1 -1
- package/dist/config/loader.js +1 -1
- package/dist/config/loader.js.map +1 -1
- package/dist/core/agent-delegation.d.ts +16 -2
- package/dist/core/agent-delegation.d.ts.map +1 -1
- package/dist/core/agent-delegation.js +48 -5
- package/dist/core/agent-delegation.js.map +1 -1
- package/dist/core/merge-agent-insight.d.ts.map +1 -1
- package/dist/core/merge-agent-insight.js +10 -0
- package/dist/core/merge-agent-insight.js.map +1 -1
- package/dist/core/orchestrator-episode.d.ts.map +1 -1
- package/dist/core/orchestrator-episode.js +24 -0
- package/dist/core/orchestrator-episode.js.map +1 -1
- package/dist/core/orchestrator.js +52 -1
- package/dist/core/orchestrator.js.map +1 -1
- package/dist/core/submit-agent-insight.d.ts +17 -0
- package/dist/core/submit-agent-insight.d.ts.map +1 -1
- package/dist/core/submit-agent-insight.js +28 -0
- package/dist/core/submit-agent-insight.js.map +1 -1
- package/dist/core/types.d.ts +35 -2
- package/dist/core/types.d.ts.map +1 -1
- package/dist/graph/client-factory.d.ts +4 -0
- package/dist/graph/client-factory.d.ts.map +1 -1
- package/dist/graph/client-factory.js +83 -7
- package/dist/graph/client-factory.js.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 +3 -0
- 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 +154 -6
- package/dist/graph/context-slicer.js.map +1 -1
- package/dist/graph/document-convert.d.ts +33 -0
- package/dist/graph/document-convert.d.ts.map +1 -0
- package/dist/graph/document-convert.js +137 -0
- package/dist/graph/document-convert.js.map +1 -0
- package/dist/graph/document-semantic-bridge.d.ts +23 -0
- package/dist/graph/document-semantic-bridge.d.ts.map +1 -0
- package/dist/graph/document-semantic-bridge.js +61 -0
- package/dist/graph/document-semantic-bridge.js.map +1 -0
- package/dist/graph/document-semantic-ingest.d.ts +48 -0
- package/dist/graph/document-semantic-ingest.d.ts.map +1 -0
- package/dist/graph/document-semantic-ingest.js +229 -0
- package/dist/graph/document-semantic-ingest.js.map +1 -0
- package/dist/graph/episode-engineering-links.d.ts +29 -0
- package/dist/graph/episode-engineering-links.d.ts.map +1 -0
- package/dist/graph/episode-engineering-links.js +63 -0
- package/dist/graph/episode-engineering-links.js.map +1 -0
- package/dist/graph/file-indexer-edges.d.ts +26 -0
- package/dist/graph/file-indexer-edges.d.ts.map +1 -1
- package/dist/graph/file-indexer-edges.js +120 -20
- package/dist/graph/file-indexer-edges.js.map +1 -1
- package/dist/graph/file-indexer-nodes.d.ts +18 -0
- package/dist/graph/file-indexer-nodes.d.ts.map +1 -1
- package/dist/graph/file-indexer-nodes.js +0 -0
- package/dist/graph/file-indexer-nodes.js.map +1 -1
- package/dist/graph/file-indexer-walker.d.ts +4 -1
- package/dist/graph/file-indexer-walker.d.ts.map +1 -1
- package/dist/graph/file-indexer-walker.js +33 -16
- package/dist/graph/file-indexer-walker.js.map +1 -1
- package/dist/graph/file-indexer.d.ts +5 -0
- package/dist/graph/file-indexer.d.ts.map +1 -1
- package/dist/graph/file-indexer.js +162 -50
- package/dist/graph/file-indexer.js.map +1 -1
- package/dist/graph/graph-compression.d.ts +11 -2
- package/dist/graph/graph-compression.d.ts.map +1 -1
- package/dist/graph/graph-compression.js +153 -16
- package/dist/graph/graph-compression.js.map +1 -1
- package/dist/graph/graphify-client.d.ts +1 -0
- package/dist/graph/graphify-client.d.ts.map +1 -1
- package/dist/graph/graphify-client.js +24 -9
- package/dist/graph/graphify-client.js.map +1 -1
- package/dist/graph/graphify-file-client.d.ts +1 -0
- package/dist/graph/graphify-file-client.d.ts.map +1 -1
- package/dist/graph/graphify-file-client.js +8 -2
- package/dist/graph/graphify-file-client.js.map +1 -1
- package/dist/graph/language-indexers/c-cpp.d.ts.map +1 -1
- package/dist/graph/language-indexers/c-cpp.js +19 -13
- package/dist/graph/language-indexers/c-cpp.js.map +1 -1
- package/dist/graph/language-indexers/dart.d.ts.map +1 -1
- package/dist/graph/language-indexers/dart.js +2 -6
- package/dist/graph/language-indexers/dart.js.map +1 -1
- package/dist/graph/language-indexers/go.d.ts.map +1 -1
- package/dist/graph/language-indexers/go.js +3 -6
- package/dist/graph/language-indexers/go.js.map +1 -1
- package/dist/graph/language-indexers/java.d.ts.map +1 -1
- package/dist/graph/language-indexers/java.js +2 -6
- package/dist/graph/language-indexers/java.js.map +1 -1
- package/dist/graph/language-indexers/kotlin.d.ts.map +1 -1
- package/dist/graph/language-indexers/kotlin.js +2 -6
- package/dist/graph/language-indexers/kotlin.js.map +1 -1
- package/dist/graph/language-indexers/python.d.ts.map +1 -1
- package/dist/graph/language-indexers/python.js +4 -6
- package/dist/graph/language-indexers/python.js.map +1 -1
- package/dist/graph/language-indexers/ruby.d.ts.map +1 -1
- package/dist/graph/language-indexers/ruby.js +2 -6
- package/dist/graph/language-indexers/ruby.js.map +1 -1
- package/dist/graph/language-indexers/rust.d.ts.map +1 -1
- package/dist/graph/language-indexers/rust.js +3 -6
- package/dist/graph/language-indexers/rust.js.map +1 -1
- package/dist/graph/language-indexers/swift.d.ts.map +1 -1
- package/dist/graph/language-indexers/swift.js +2 -6
- package/dist/graph/language-indexers/swift.js.map +1 -1
- package/dist/graph/language-indexers/tree-sitter-loader.d.ts +20 -0
- package/dist/graph/language-indexers/tree-sitter-loader.d.ts.map +1 -1
- package/dist/graph/language-indexers/tree-sitter-loader.js +42 -0
- package/dist/graph/language-indexers/tree-sitter-loader.js.map +1 -1
- package/dist/graph/memory-pack.d.ts +46 -0
- package/dist/graph/memory-pack.d.ts.map +1 -0
- package/dist/graph/memory-pack.js +204 -0
- package/dist/graph/memory-pack.js.map +1 -0
- package/dist/graph/snapshot-view.d.ts.map +1 -1
- package/dist/graph/snapshot-view.js +26 -1
- package/dist/graph/snapshot-view.js.map +1 -1
- package/dist/graph/sqlite-client.d.ts +1 -0
- package/dist/graph/sqlite-client.d.ts.map +1 -1
- package/dist/graph/sqlite-client.js +15 -4
- package/dist/graph/sqlite-client.js.map +1 -1
- package/dist/graph/symbol-extract.d.ts +39 -0
- package/dist/graph/symbol-extract.d.ts.map +1 -0
- package/dist/graph/symbol-extract.js +187 -0
- package/dist/graph/symbol-extract.js.map +1 -0
- package/dist/hooks/auto-capture.d.ts +87 -0
- package/dist/hooks/auto-capture.d.ts.map +1 -0
- package/dist/hooks/auto-capture.js +182 -0
- package/dist/hooks/auto-capture.js.map +1 -0
- package/dist/index.d.ts +7 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +21 -2
- package/dist/index.js.map +1 -1
- package/dist/integrations/agent-mcp-installer.d.ts +87 -5
- package/dist/integrations/agent-mcp-installer.d.ts.map +1 -1
- package/dist/integrations/agent-mcp-installer.js +418 -60
- package/dist/integrations/agent-mcp-installer.js.map +1 -1
- package/dist/integrations/agent-profiles/profiles/qoder.d.ts.map +1 -1
- package/dist/integrations/agent-profiles/profiles/qoder.js +14 -2
- package/dist/integrations/agent-profiles/profiles/qoder.js.map +1 -1
- package/dist/integrations/agent-profiles/skills/qoder.js +6 -0
- package/dist/integrations/agent-profiles/skills/qoder.js.map +1 -1
- package/dist/integrations/claude-code-hooks.d.ts +95 -0
- package/dist/integrations/claude-code-hooks.d.ts.map +1 -0
- package/dist/integrations/claude-code-hooks.js +321 -0
- package/dist/integrations/claude-code-hooks.js.map +1 -0
- package/dist/integrations/ensure-anydoc.d.ts +41 -0
- package/dist/integrations/ensure-anydoc.d.ts.map +1 -0
- package/dist/integrations/ensure-anydoc.js +221 -0
- package/dist/integrations/ensure-anydoc.js.map +1 -0
- package/dist/integrations/skill-installer.d.ts +26 -3
- package/dist/integrations/skill-installer.d.ts.map +1 -1
- package/dist/integrations/skill-installer.js +148 -4
- package/dist/integrations/skill-installer.js.map +1 -1
- package/dist/learning/canary-gate.d.ts +39 -0
- package/dist/learning/canary-gate.d.ts.map +1 -0
- package/dist/learning/canary-gate.js +57 -0
- package/dist/learning/canary-gate.js.map +1 -0
- package/dist/learning/skill-consolidate.d.ts +84 -0
- package/dist/learning/skill-consolidate.d.ts.map +1 -0
- package/dist/learning/skill-consolidate.js +353 -0
- package/dist/learning/skill-consolidate.js.map +1 -0
- package/dist/learning/skill-flywheel.d.ts +26 -0
- package/dist/learning/skill-flywheel.d.ts.map +1 -1
- package/dist/learning/skill-flywheel.js +192 -29
- package/dist/learning/skill-flywheel.js.map +1 -1
- package/dist/learning/skill-opt-lite.d.ts +46 -0
- package/dist/learning/skill-opt-lite.d.ts.map +1 -0
- package/dist/learning/skill-opt-lite.js +270 -0
- package/dist/learning/skill-opt-lite.js.map +1 -0
- package/dist/learning/skill-package.d.ts.map +1 -1
- package/dist/learning/skill-package.js +80 -6
- package/dist/learning/skill-package.js.map +1 -1
- package/dist/learning/skill-store.d.ts.map +1 -1
- package/dist/learning/skill-store.js +13 -0
- package/dist/learning/skill-store.js.map +1 -1
- package/dist/learning/skill-types.d.ts +32 -0
- package/dist/learning/skill-types.d.ts.map +1 -1
- package/dist/learning/skill-types.js +17 -0
- package/dist/learning/skill-types.js.map +1 -1
- package/dist/skills/index.js +1 -1
- package/dist/skills/index.js.map +1 -1
- package/dist/surfaces/cli/index.js +46 -5
- package/dist/surfaces/cli/index.js.map +1 -1
- package/dist/surfaces/cli/init.d.ts +17 -4
- package/dist/surfaces/cli/init.d.ts.map +1 -1
- package/dist/surfaces/cli/init.js +71 -8
- package/dist/surfaces/cli/init.js.map +1 -1
- package/dist/surfaces/cli/output.d.ts.map +1 -1
- package/dist/surfaces/cli/output.js +4 -2
- package/dist/surfaces/cli/output.js.map +1 -1
- package/dist/surfaces/cli/runtime/facade.d.ts +2 -1
- package/dist/surfaces/cli/runtime/facade.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/facade.js +1 -0
- package/dist/surfaces/cli/runtime/facade.js.map +1 -1
- package/dist/surfaces/cli/runtime/graph.d.ts +59 -2
- package/dist/surfaces/cli/runtime/graph.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/graph.js +120 -7
- package/dist/surfaces/cli/runtime/graph.js.map +1 -1
- package/dist/surfaces/cli/runtime/learning.d.ts +19 -0
- package/dist/surfaces/cli/runtime/learning.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/learning.js +46 -0
- package/dist/surfaces/cli/runtime/learning.js.map +1 -1
- package/dist/surfaces/cli/runtime/routing.d.ts +6 -3
- package/dist/surfaces/cli/runtime/routing.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime/routing.js +70 -7
- package/dist/surfaces/cli/runtime/routing.js.map +1 -1
- package/dist/surfaces/cli/runtime/types.d.ts +54 -0
- package/dist/surfaces/cli/runtime/types.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime.d.ts +3 -3
- package/dist/surfaces/cli/runtime.d.ts.map +1 -1
- package/dist/surfaces/cli/runtime.js +6 -2
- package/dist/surfaces/cli/runtime.js.map +1 -1
- package/dist/surfaces/mcp/server.d.ts +12 -4
- package/dist/surfaces/mcp/server.d.ts.map +1 -1
- package/dist/surfaces/mcp/server.js +270 -97
- package/dist/surfaces/mcp/server.js.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-definitions.js +15 -0
- package/dist/surfaces/mcp/tool-definitions.js.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.d.ts +5 -3
- package/dist/surfaces/mcp/tool-handlers.d.ts.map +1 -1
- package/dist/surfaces/mcp/tool-handlers.js +36 -6
- package/dist/surfaces/mcp/tool-handlers.js.map +1 -1
- package/dist/utils/logger.d.ts +8 -0
- package/dist/utils/logger.d.ts.map +1 -1
- package/dist/utils/logger.js +54 -5
- package/dist/utils/logger.js.map +1 -1
- package/mcp.json +14 -0
- package/package.json +19 -1
- package/plugin.json +21 -0
- package/scripts/safe-postinstall.cjs +36 -1
- package/skills/graphflow/SKILL.md +565 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,139 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
+
## [Unreleased]
|
|
6
|
+
|
|
7
|
+
## [1.9.12] - 2026-08-12
|
|
8
|
+
|
|
9
|
+
### Added
|
|
10
|
+
|
|
11
|
+
- **Episode ↔ Engineering KG on outcome path**: `graphflow_report_outcome` / CLI `outcome report` accept optional `requirementIds` / `conceptIds` / `codeHints` and write episode → `derived_from` → eng nodes via `linkEpisodeToEngineeringNodes`
|
|
12
|
+
- **Document-semantic insight ↔ episode provenance**: when `episodeId` is passed with a document-semantic submit, the same eng links are written for experience↔eng consistency
|
|
13
|
+
- **ATP minimal producer atp-ir/1.2**: optional `memory-recall` / `memory-backfill` markers (host-managed); fixture + README updated; still runnable without GraphFlow MCP
|
|
14
|
+
- **P0 skill consolidate apply**:`graphflow skill consolidate` 默认 dry-run;`--apply` / `--execute` 安全调用 `applySkillConsolidation`(未知 id skip)
|
|
15
|
+
- **代码域检索评测公开数据集**:`benchmarks/datasets/retrieval-golden-v1.json`(+ `.jsonl`),含 schema / license / domainCounts / Hit@5·MRR·NDCG 映射说明;`npm run dataset:retrieval` 从 `benchmarks/retrieval-golden-data.ts` 再生,避免漂移
|
|
16
|
+
- **Agent Plugins 1.0** packaging at repo root: `plugin.json`, `mcp.json` (`type: stdio`), and canonical `skills/graphflow/SKILL.md`
|
|
17
|
+
- README section for local plugin install (`~/.cursor/plugins/local`) and Team Marketplace / Git discovery
|
|
18
|
+
- `npm run sync:surfaces` keeps `src/surfaces/trae-skill/graphflow/SKILL.md` aligned with the Agent Plugins skill source
|
|
19
|
+
- Conformance test `tests/agent-plugins-1.0.test.ts`
|
|
20
|
+
- **P1 Context Engineering contract**: [docs/context-contract.md](docs/context-contract.md) — budget fields, L0–L3 anchors/refill, positioning vs platform indexing / RL; links MCP `graphflow_context` and Agent Plugins
|
|
21
|
+
- **P1 Experience memory guide**: [docs/experience-memory.md](docs/experience-memory.md) — Storage → Reflection → Experience; artifact / memory-pack / skill-sync; Agent Plugin vs `install` matrix
|
|
22
|
+
- **Experience memory pack**: `exportExperienceMemoryPack` + CLI `graphflow artifact export-memory` → `graphflow-out/memory-pack/{README,skills,episodes}.md`
|
|
23
|
+
- README: Agent Plugins as **primary** install; `graphflow install` as Rules / multi-agent fallback; links to the two new docs
|
|
24
|
+
- **install/doctor 接入 Claude Code 飞轮 hooks**:`graphflow install` 在检测到 Claude Code home 时自动调用 `installClaudeCodeHooks`(SessionStart / SessionEnd / Stop);`doctor --json` 新增 `hooks` 类别自检;InstallReport 增加 `claudeCodeHooks`;`GRAPHFLOW_CLAUDE_HOME` 便于测试覆盖
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- **扩展升级后 MCP launcher 路径失效**:`repairStaleGraphFlowMcpLaunchers` 在扩展激活时扫描用户级与工作区 MCP 配置;若 `graphflow` 仍指向已删除的旧版 `mcp-launcher.cjs/.cmd`(如 `roarpeng.graphflow-1.9.6`),自动改写为当前扩展启动器。修复 Cursor Agents 依赖项目级 `.cursor/mcp.json` 而 IDE 仍可用的不一致。
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
|
|
32
|
+
- ATP/IR spec status line marks **`atp-ir/1.2` Stable**; §5 / §8 document optional Engineering KG link fields on `report_outcome`
|
|
33
|
+
- ROADMAP P2 rows (ATP producer + Engineering KG episode chain; ATP/IR v1.2 protocol) → ✅
|
|
34
|
+
- **P0 Experience 飞轮可观测**:`getFlywheelReport` / `skill report` / `route diagnose` / `graphflow_diagnose` 的 `experience` 增加 dry-run `consolidation` 动作计数(UPDATE/DELETE/ADD)与建议 hint;ROADMAP P0 ✅
|
|
35
|
+
- Skill resolution (`resolveSkillSourcePath` / MCP `graphflow_skill_guide`) prefers `skills/graphflow` before legacy `trae-skill` paths
|
|
36
|
+
- `package.json` `files` publishes `plugin.json`, `mcp.json`, and `skills/`
|
|
37
|
+
- ROADMAP (2026-08-12): Experience-layer P0–P2 ✅ (skill consolidate --apply; retrieval golden dataset; ATP/IR v1.2 + episode↔eng KG)
|
|
38
|
+
- **`graphflow uninstall`** now removes **MCP + Skills + Rules + hooks** (user + workspace MCP). After removing an Agent Plugin in Cursor, run `uninstall` so leftover `~/.cursor/skills/graphflow` cannot keep steering the agent.
|
|
39
|
+
|
|
40
|
+
### Tests
|
|
41
|
+
|
|
42
|
+
- `tests/m-install-hooks-wiring.test.ts`:hooks status + install/doctor 接线
|
|
43
|
+
- `tests/m-stale-mcp-launcher-repair.test.ts`:失效 mcp-launcher 路径检测与改写
|
|
44
|
+
- `tests/atp-ir-v1.2-conformance.test.ts`:ATP/IR v1.2 memory markers + producer protocol
|
|
45
|
+
- `tests/report-outcome-engineering-links.test.ts`:outcome / insight eng-link wiring
|
|
46
|
+
- `tests/retrieval-dataset.test.ts`:公开检索数据集与 TS 真源条目数/内容一致
|
|
47
|
+
|
|
48
|
+
## [1.9.11] - 2026-08-08
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- **VSIX 激活时按需下载 anydoc**:设置 `graphflow.downloadAnydoc`(默认 true)→ `npm install @firecrawl/anydoc` 到 `~/.graphflow/optional-deps`;MCP launcher / `document-convert` 经 `GRAPHFLOW_ANYDOC_NODE_MODULES` 加载。失败则跳过 Office/PDF,源码索引照常
|
|
53
|
+
- README / 扩展 README 说明 VSIX 不内置、可自动下载、可关闭
|
|
54
|
+
- **emilkowalski/skills**:项目安装 design-eng 等 skill;扩展 webview 面板统一 soft elevation、`:active` scale(0.97)、`--ease-out`、reduced-motion
|
|
55
|
+
|
|
56
|
+
## [1.9.10] - 2026-08-08
|
|
57
|
+
|
|
58
|
+
### Added
|
|
59
|
+
|
|
60
|
+
- **Engineering KG 跨层边**:`documents`(文档 File→Concept/Requirement)、`implements`(代码→Requirement)、`derived_from`(语义节点→来源 File/insight)
|
|
61
|
+
- **文档域一等节点**:`Concept` / `Requirement`;`document-semantic` insight submit 自动写入并尝试用 `relatedCodeHints` 链接已有 File/Symbol
|
|
62
|
+
- **说明**:VS Code/Cursor **VSIX 不打包** `@firecrawl/anydoc`;自 v1.9.11 起扩展激活时可自动下载到 `~/.graphflow/optional-deps`(`graphflow.downloadAnydoc`)。CLI/`npm i` 仍可通过 optionalDependency 安装。无 anydoc 时跳过 Office/PDF,源码索引不受影响
|
|
63
|
+
|
|
64
|
+
### Changed
|
|
65
|
+
|
|
66
|
+
- 逻辑三分(code / doc / experience)落在**单图 + type/domain + 跨层边**,不拆物理三库
|
|
67
|
+
|
|
68
|
+
## [1.9.9] - 2026-08-08
|
|
69
|
+
|
|
70
|
+
### Fixed
|
|
71
|
+
|
|
72
|
+
- **CI macOS ENAMETOOLONG**:`walkFiles` 深度目录测试从 400 段降至 80 段,保留迭代遍历断言,避免 APFS 路径过长导致 Action 失败
|
|
73
|
+
|
|
74
|
+
### Added
|
|
75
|
+
|
|
76
|
+
- **Office/PDF 文档建图**:可选依赖 `@firecrawl/anydoc`,将 PDF/DOCX/PPTX/XLSX 等转为 Markdown 后走既有 markdown 章节/链接图谱;缺省扩展名已包含办公文档;单文件上限约 5MB
|
|
77
|
+
- **Document semantic bridge**:索引成功后返回 optional `document-semantic-*` `agentWorkItems`,由宿主 Agent 抽取关键实体/主张并经 `graphflow_insight(mode=submit)` 回写
|
|
78
|
+
|
|
79
|
+
### Research note
|
|
80
|
+
|
|
81
|
+
文档→MD 选型:优先 Firecrawl **anydoc**(Node、多格式、本地);备选 Microsoft MarkItDown(Python)、Pandoc(系统依赖)。npm 上无关的旧包 `anydoc` 勿用。
|
|
82
|
+
|
|
83
|
+
## [1.9.8] - 2026-08-08
|
|
84
|
+
|
|
85
|
+
### Added
|
|
86
|
+
|
|
87
|
+
- **P0 飞轮可观测性**:`getFlywheelReport` / `skill report` / `graphflow_diagnose` / `route diagnose` 暴露 `autoCaptureEnabled`、`sessionJournal`、`skills.byOutcomeKind`;`npm run backfill:episodes` 包装历史回填脚本
|
|
88
|
+
- **Skill-conditioned DAG**:plan 节点可选 `skillRefs` / `avoidPatterns`;bridge 指令要求执行前审阅 skills / 避开 anti-patterns
|
|
89
|
+
- **SkillOpt-lite**:无 LLM 的有界 skill guidance 编辑(最多 3 次,严格提升才接受);接入 `applySkillLearning` lessons 路径
|
|
90
|
+
- **团队记忆 canary 门控**:`canary-gate.ts`——sync/import 技能须本地成功 N 次(或显式 validate)才可晋升 `proven`;anti-pattern 仅隔离
|
|
91
|
+
- **Codex Windows MCP**:安装写入 `NODE` / `NPX_CLI` 8.3 短路径,修复 Codex 注册失败
|
|
92
|
+
|
|
93
|
+
### Changed
|
|
94
|
+
|
|
95
|
+
- **图噪声**:引用边前缀 Trie 预过滤;子图 PageRank LRU 缓存键按节点集排序哈希
|
|
96
|
+
- **planAndBrainstorm** 异步化以在 flywheel 开启时注入 skill 条件
|
|
97
|
+
|
|
98
|
+
### Tests
|
|
99
|
+
|
|
100
|
+
- 新增 `tests/m81-skill-conditioned-dag.test.ts`、`tests/canary-gate.test.ts`;扩展 flywheel-report / graph-noise / mcp-resources / Codex MCP install
|
|
101
|
+
|
|
102
|
+
## [1.9.7] - 2026-08-03
|
|
103
|
+
|
|
104
|
+
### Added
|
|
105
|
+
|
|
106
|
+
- **综合能力 Benchmark(P1-P6 六维度)**:`benchmarks/run-comprehensive-bench.ts`,覆盖图谱索引、上下文压缩、规划与分诊、学习飞轮、Bridge 模式、端到端性能,总体得分 **92.9%**
|
|
107
|
+
- **CodeGraph 风格独立 Benchmark**:`benchmarks/run-independent-bench.ts`,5 域(core/graph/learning/config/integrations)评测,Hit@5 96%、Token 节省 96.6%、总体 **96.2%**
|
|
108
|
+
- **SWE-bench 风格上下文就绪评测**:`benchmarks/run-swe-bench-eval.ts`,12 实例(easy/medium/hard × bug-fix/feature/refactor/test),多查询策略下上下文就绪率 100%(非真实 SWE-bench,仅测量压缩上下文是否包含任务所需文件/符号)
|
|
109
|
+
- **检索质量 IR 指标评测**:`benchmarks/run-retrieval-eval.ts`,132 条 golden 查询,Hit@5=100%、MRR=0.836、NDCG@5=0.601
|
|
110
|
+
- **符号提取模块**:`src/graph/symbol-extract.ts`,从任务描述提取 camelCase/PascalCase 符号名,补充图查询提升召回
|
|
111
|
+
- **同文件符号提升 + 导入图扩展**:`buildEnhancedContextPackage` 新增 Step 5,自动从已锚定文件提取同文件 Symbol 节点,并通过 import 关系扩展跨文件召回
|
|
112
|
+
- **Bridge+DAG 混合执行模式**:`enableBridgeDagExecution` 选项,bridge 模式下可选择同时本地执行 DAG(`tests/m81-bridge-dag-execution.test.ts`,5 个用例)
|
|
113
|
+
|
|
114
|
+
### Changed
|
|
115
|
+
|
|
116
|
+
- **上下文压缩优化**:anchor 上限 15(`maxAnchors`)、L2 module 注入、L3 always-on 层;压缩得分 38.4% → 64.9%
|
|
117
|
+
- **DAG 并行度提升**:单 clause 任务拆分 4 节点(实现∥测试设计),并行度 1.2x → 1.40x
|
|
118
|
+
- **Skill hints 修复**:传入 evidence 通过 P0-2 质量门控,skill hints 从 0 恢复到正常生成
|
|
119
|
+
|
|
120
|
+
### Tests
|
|
121
|
+
|
|
122
|
+
- 99 测试文件 / 692 tests(+1 m81 bridge+DAG、m79 plan clause split 更新)
|
|
123
|
+
|
|
124
|
+
## [1.9.6] - 2026-08-03
|
|
125
|
+
|
|
126
|
+
### Fixed
|
|
127
|
+
|
|
128
|
+
- **Cursor/VS Code MCP 启动失败**:扩展 vendor 打包漏掉 `@modelcontextprotocol/sdk`,MCP launcher 加载 `vendor/graphflow/dist/surfaces/mcp/server.js` 时抛出 `Cannot find module '@modelcontextprotocol/sdk/server/index.js'`(Connection closed / -32000)。`sync-runtime.mjs` 已将 MCP SDK 纳入 `runtimeRoots`,并在同步后校验必选包存在;新增 `test:mcp` 烟雾测试防止回归
|
|
129
|
+
|
|
130
|
+
## [1.9.5] - 2026-08-01
|
|
131
|
+
|
|
132
|
+
### Fixed
|
|
133
|
+
|
|
134
|
+
- **图谱索引排除 Agent 工具目录(P1)**:`IGNORED_DIRS` 新增 `.agent` / `.claude` / `.cursor` / `.gemini` / `.joycode` / `.trae` / `Cursor`——`.claude/worktrees` 为每个 worktree 保存完整仓库副本,此前被当作源码索引进图(本地实测 1421 个 File 节点中 1076 个来自 worktrees,占 76%),污染检索锚点、PageRank 与存储;修复后 `graph rebuild` 扫描文件数从 ~1500+ 降至 326,旧图可在下次增量/全量索引时自动清理
|
|
135
|
+
- **增量索引剪枝批量删除(P1,读写放大修复的伴生问题)**:排除目录后首次增量索引需从缓存差集剪除大量过期节点,而 `pruneFileFromGraph` 逐节点 `deleteNode`(file 后端每次全量读写 JSON,实测 62MB 图 × 1000+ 节点 → 305s 挂起);新增可选能力 `GraphClient.deleteNodes(ids)`(file 单次读+写、sqlite 单事务分块 IN、memory 批处理,均级联清理悬空边),剪枝改为单次快照读取 + 单次批量删除,mcp-http 试点保留逐节点回退路径
|
|
136
|
+
- **测试 95 文件 / 656**(+2 walker 排除、+1 剪枝批量删除、+1 file 批量删除用例)
|
|
137
|
+
|
|
5
138
|
## [1.9.4] - 2026-08-01
|
|
6
139
|
|
|
7
140
|
### Changed
|
package/README.md
CHANGED
|
@@ -1,26 +1,58 @@
|
|
|
1
1
|
# GraphFlow
|
|
2
2
|
|
|
3
|
-
[](https://www.npmjs.com/package/@roarpeng/graphflow)
|
|
4
4
|
|
|
5
|
-
>
|
|
5
|
+
> **The memory & context harness for coding agents.** Local-first code knowledge graph · bounded context compression (~98% token savings) · cross-session learning flywheel.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
The community is converging on an "agent harness" vocabulary: **memory + hooks + skills** are the harness primitives that turn a stateless model into a reliable long-running agent. GraphFlow implements all three for coding agents and ships them through a portable MCP surface (Cursor, Claude Code, 15+ agents):
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
| Harness primitive | GraphFlow implementation |
|
|
10
|
+
| --- | --- |
|
|
11
|
+
| **Memory** | 12-language AST code graph + Episodic / Skill / Decision nodes — project knowledge *and* project experience persist across sessions |
|
|
12
|
+
| **Hooks** | Outcome auto-capture (on by default) + Claude Code `SessionEnd` / `Stop` hooks close the learning loop automatically — no manual outcome reporting required |
|
|
13
|
+
| **Skills** | A four-class flywheel (`proven` / `correctable` / `anti-pattern` / `noise`) with canary validation — skills are promoted by evidence, not by assertion |
|
|
14
|
+
|
|
15
|
+
Pure TypeScript/Node. CLI + MCP + VS Code extension. Fully offline, no API key required.
|
|
16
|
+
|
|
17
|
+
## Why a harness, not another RAG
|
|
18
|
+
|
|
19
|
+
Most "memory" products are either **static injection** (load `CLAUDE.md` / rules files in full on every session) or **plain RAG** (retrieve chunks, no learning). Both fail in long-lived projects:
|
|
20
|
+
|
|
21
|
+
- Static injection pays the same token cost every session regardless of the task, and grows until it is truncated or ignored.
|
|
22
|
+
- Plain RAG retrieves text but never accumulates *experience* — the thousandth task pays the same cost as the first.
|
|
23
|
+
|
|
24
|
+
GraphFlow is a harness: **memory is dynamic and typed**. Each request retrieves only what the current decision needs — graph anchors, compressed summaries, similar past episodes, applicable skills — under an explicit token budget (L0–L3 layered compression, ~98% savings measured). What the agent learns (outcomes, lessons, skills) is written back through hooks, so the harness gets better with use.
|
|
25
|
+
|
|
26
|
+
It is also **local-first and portable**: everything runs offline with no API key, and the whole surface is exposed over MCP, so the same memory travels across agents instead of being locked into one vendor's format.
|
|
27
|
+
|
|
28
|
+
## Proof, not promises
|
|
29
|
+
|
|
30
|
+
All headline numbers come from a **public, reproducible benchmark suite** ([benchmarks/README.md](benchmarks/README.md)) with published methodology ([docs/benchmark-standards.md](docs/benchmark-standards.md)) and machine-readable JSON dumps pinned to commits:
|
|
10
31
|
|
|
11
|
-
|
|
32
|
+
- **~98% token savings** (8-query suite, 262,926 → 2,843 tokens; independently re-counted with `gpt-tokenizer`)
|
|
33
|
+
- **132-query golden retrieval set** in CI (Hit@5 = 100%, MRR = 0.836, NDCG@5 = 0.601); downloadable open dataset: [`benchmarks/datasets/retrieval-golden-v1.json`](benchmarks/datasets/retrieval-golden-v1.json) — run `npm run bench:retrieval`
|
|
34
|
+
- **Skill A/B: 100% vs 61.5%** task success with the flywheel on vs off (26 tasks)
|
|
35
|
+
- **Memory ROI: 100% vs 56.5%** with episodic memory on vs off (62 tasks, with attribution chains)
|
|
12
36
|
|
|
13
|
-
|
|
37
|
+
Results are commit-anchored so any number above can be checked out and re-run. Third-party reproduction is actively welcomed — see [ROADMAP.md](ROADMAP.md) for the open invitation.
|
|
38
|
+
|
|
39
|
+
## Memory poisoning protection
|
|
40
|
+
|
|
41
|
+
Shared and synced memory is only useful if it cannot be silently corrupted. Skills merged from external sources (e.g. `skill sync` imports) are **treated as unproven until validated locally**: imported skills carry provenance markers, never enter the `proven` class directly, must pass canary validation on real tasks before promotion, and `anti-pattern` skills are isolated rather than deleted so they can be audited. Promotion is gated by the four-class lifecycle, not by trust in the source. See [docs/team-memory-security.md](docs/team-memory-security.md).
|
|
42
|
+
|
|
43
|
+
## Quick start
|
|
44
|
+
|
|
45
|
+
No API key needed (offline AST indexing + graph compression):
|
|
14
46
|
|
|
15
47
|
```bash
|
|
16
|
-
# 1.
|
|
48
|
+
# 1. Build the graph offline (AST indexing, no LLM)
|
|
17
49
|
npx @roarpeng/graphflow graph index .
|
|
18
50
|
|
|
19
|
-
# 2.
|
|
51
|
+
# 2. Preview compressed context (anchors + summaries, 90%+ token savings)
|
|
20
52
|
npx @roarpeng/graphflow context preview "orchestrator" --json
|
|
21
53
|
```
|
|
22
54
|
|
|
23
|
-
|
|
55
|
+
Connect via MCP (Cursor / Claude Code / …):
|
|
24
56
|
|
|
25
57
|
```json
|
|
26
58
|
{
|
|
@@ -33,159 +65,213 @@ npx @roarpeng/graphflow context preview "orchestrator" --json
|
|
|
33
65
|
}
|
|
34
66
|
```
|
|
35
67
|
|
|
36
|
-
|
|
68
|
+
The agent calls `graphflow_context` for compressed context, then `graphflow_plan` to plan; without a provider API key GraphFlow automatically bridges the ATP thinking protocol to the host agent (agent-delegated mode).
|
|
37
69
|
|
|
38
|
-
##
|
|
70
|
+
## Why GraphFlow
|
|
39
71
|
|
|
40
|
-
|
|
72
|
+
Single-purpose tools each do one thing well; GraphFlow combines graph + compression + planning protocol + learning memory in one place:
|
|
41
73
|
|
|
42
|
-
|
|
|
74
|
+
| Capability | **GraphFlow** | CodeGraph | Serena | Repomix |
|
|
43
75
|
| --- | --- | --- | --- | --- |
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
47
|
-
|
|
|
76
|
+
| Code graph | 12-language AST index | more mature | LSP symbols | — |
|
|
77
|
+
| Context compression | layered + graph compression + vector recall | partial | partial | whole-repo dump |
|
|
78
|
+
| Planning protocol | ATP IR + DAG + agent bridge | — | — | — |
|
|
79
|
+
| **Learning memory** | Episodic / Skill / Decision flywheel | — | — | — |
|
|
48
80
|
| Local-first | ✅ | ✅ | ✅ | ✅ |
|
|
49
|
-
|
|
|
81
|
+
| Open protocol | [ATP/IR public spec](docs/atp-ir-spec-v1.md) | — | — | — |
|
|
50
82
|
|
|
51
|
-
>
|
|
83
|
+
> The differentiator is the **learning flywheel**: graph indexing and token compression are replicable; project-private experience (skills, lessons, decisions) accumulated across sessions is not — it compounds with use. Serena is a complement, not a competitor — see [GraphFlow + Serena: better together](docs/comparison.md#graphflow--serena-better-together联合方案).
|
|
52
84
|
|
|
53
|
-
##
|
|
85
|
+
## Core capabilities (v1.7.15+)
|
|
54
86
|
|
|
55
|
-
|
|
|
87
|
+
| Module | Capability |
|
|
56
88
|
| --- | --- |
|
|
57
|
-
|
|
|
58
|
-
|
|
|
59
|
-
|
|
|
60
|
-
|
|
|
61
|
-
|
|
|
62
|
-
|
|
|
63
|
-
|
|
|
64
|
-
|
|
|
65
|
-
|
|
|
66
|
-
|
|
|
67
|
-
|
|
|
68
|
-
|
|
|
69
|
-
| **Agent
|
|
70
|
-
|
|
|
71
|
-
|
|
72
|
-
###
|
|
73
|
-
|
|
74
|
-
> GraphFlow
|
|
75
|
-
|
|
76
|
-
## MCP
|
|
77
|
-
|
|
78
|
-
|
|
|
89
|
+
| **Planning protocol** | ATP v1.1 (Intent / Requirement / Six Hats / 5-Why / First Principles / Decision Matrix / Planning / Reflection); simple / complex / insight modes; agent-delegated bridge without an LLM; **skill-conditioned DAG** (`skillRefs` / `avoidPatterns` on plan nodes); [ATP/IR public spec v1.1](docs/atp-ir-spec-v1.md) |
|
|
90
|
+
| **Goal alignment** | Goal anchor nodes (intent five-tuple as first-class citizen, original requirement auto-injected); low-confidence clarification gate (no plan below 0.6); runtime alignment-check; deviation classification (misread-requirement / scope-creep / tech-drift); goal version chain + diffs |
|
|
91
|
+
| **Knowledge graph** | 12-language AST indexing; File / Module / Symbol + **Concept / Requirement**; cross-layer edges `documents` / `implements` / `derived_from`; Office/PDF → Markdown via optional **`@firecrawl/anydoc`** (MIT). **CLI/npm**: optionalDependency. **VSIX**: not bundled; on activate the extension **auto-downloads the current-OS binary** into `~/.graphflow/optional-deps` when `graphflow.downloadAnydoc` is true (default). Disable the setting to skip network; source indexing still works. |
|
|
92
|
+
| **Context compression** | L1/L2/L3 layered anchors; graph compression (edge weights + PageRank, LRU cache); stem-matching recall (orchestrate ↔ orchestration); vector recall + RRF; RepoMap overview; adaptive budget |
|
|
93
|
+
| **Retrieval quality** | Golden-set regression gate (132 queries, Hit@5=100%, MRR=0.836, NDCG@5=0.601) |
|
|
94
|
+
| **Vector index** | In-process memoization + disk persistence (fingerprint-checked, seconds to restore after MCP restart) |
|
|
95
|
+
| **Storage backends** | `file` / `memory` / `sqlite` (FTS5, tokenizer-enhanced `searchtext`, camelCase searchable) / **`auto` (sqlite-first with fallback)** / `mcp-http` |
|
|
96
|
+
| **Learning flywheel** | Episodic memory, reflection, skill nodes (score ±1, bounded [-20,20]), nightly training, skill decay/pruning, **auto-capture + Claude Code hooks (on by default)**, **SkillOpt-lite** bounded guidance edits, four-class lifecycle + **canary gate for synced skills**, `npm run backfill:episodes`, contribution reports (`skill report` / `graphflow_diagnose` / `route diagnose`) |
|
|
97
|
+
| **Team sharing** | `skill sync`: export/import skill packs to a committable `.graphflow/skills/team-skills.json`; imports are a **bidirectional MERGE** (per-skill-id union, newer `updatedAt` wins, ties keep local, local-only skills preserved; `--force` to overwrite); golden retrieval queries round-trip via `.graphflow/team-golden.json`; [security model](docs/team-memory-security.md) |
|
|
98
|
+
| **Benchmarks** | [Comprehensive 92.9%](benchmarks/COMPREHENSIVE-RESULTS.md) · [Independent-style 96.2%](benchmarks/INDEPENDENT-RESULTS.md) · [context-readiness eval](benchmarks/SWE-BENCH-RESULTS.md) · [98.2% token savings](benchmarks/RESULTS.md) |
|
|
99
|
+
| **Model routing** | Smart / Economy tiers; multi-provider health probes and fallback (DeepSeek, OpenAI, Anthropic, Bailian, Doubao) |
|
|
100
|
+
| **Observability** | `graphflow_diagnose` / `route diagnose`: provider health + graph stats + token savings + **flywheel health** (auto-capture, episodes, skills by class, session journal) |
|
|
101
|
+
| **Agent surfaces** | CLI `--json`; MCP stdio (10 tools); auto-install into 15+ agents (incl. **Codex Windows NODE/NPX_CLI short-path MCP**) |
|
|
102
|
+
| **Engineering quality** | TypeScript strict; vitest suite; `npm run ci` includes extension packaging and smoke tests |
|
|
103
|
+
|
|
104
|
+
### Positioning
|
|
105
|
+
|
|
106
|
+
> GraphFlow is **not an orchestrating executor** — it is the **memory & context harness** for coding agents. Task execution is delegated to the host coding agent via bridge mode (honest semantics, no faked COMPLETED); GraphFlow's job is to make the agent see clearly and remember.
|
|
107
|
+
|
|
108
|
+
## MCP tools (10)
|
|
109
|
+
|
|
110
|
+
| Tool | Function |
|
|
79
111
|
| --- | --- |
|
|
80
|
-
| `graphflow_context` |
|
|
81
|
-
| `graphflow_plan` |
|
|
82
|
-
| `graphflow_run` |
|
|
83
|
-
| `graphflow_report_outcome` |
|
|
84
|
-
| `graphflow_insight` | ATP
|
|
85
|
-
| `graphflow_index` |
|
|
86
|
-
| `graphflow_skill_insights` |
|
|
87
|
-
| `graphflow_diagnose` |
|
|
88
|
-
| `graphflow_artifact` |
|
|
89
|
-
| `graphflow_skill_guide` | GraphFlow
|
|
112
|
+
| `graphflow_context` | Compressed context package (query → anchors + summaries; anchorId → expand) |
|
|
113
|
+
| `graphflow_plan` | Task planning (mode='simple' or 'insight'; agent-delegated without an LLM) |
|
|
114
|
+
| `graphflow_run` | Orchestration + bridge execution descriptor |
|
|
115
|
+
| `graphflow_report_outcome` | Outcome backfill (incl. deviation classification), closes the learning flywheel |
|
|
116
|
+
| `graphflow_insight` | ATP insight submit / merge (agent bridge protocol) |
|
|
117
|
+
| `graphflow_index` | Incremental / full indexing |
|
|
118
|
+
| `graphflow_skill_insights` | Skill insights |
|
|
119
|
+
| `graphflow_diagnose` | Diagnostics (provider + graph + token savings + flywheel) |
|
|
120
|
+
| `graphflow_artifact` | Graph artifact import / export |
|
|
121
|
+
| `graphflow_skill_guide` | GraphFlow skill usage guide |
|
|
90
122
|
|
|
91
|
-
**MCP
|
|
123
|
+
**MCP workspace resolution**: the workspace is discovered automatically from the MCP client `cwd`; override with `GRAPHFLOW_WORKSPACE_ROOT`.
|
|
92
124
|
|
|
93
|
-
## CLI
|
|
125
|
+
## CLI quick reference
|
|
94
126
|
|
|
95
127
|
```bash
|
|
96
|
-
graphflow graph index . #
|
|
97
|
-
graphflow context preview "orchestrator" #
|
|
98
|
-
graphflow plan "refactor planner" --json #
|
|
99
|
-
graphflow run "update readme" #
|
|
100
|
-
graphflow skill insights #
|
|
101
|
-
graphflow skill report #
|
|
102
|
-
graphflow skill sync export #
|
|
103
|
-
graphflow skill sync import #
|
|
104
|
-
graphflow route diagnose #
|
|
105
|
-
graphflow learn nightly #
|
|
106
|
-
graphflow doctor #
|
|
128
|
+
graphflow graph index . # build the graph
|
|
129
|
+
graphflow context preview "orchestrator" # preview compressed context
|
|
130
|
+
graphflow plan "refactor planner" --json # plan
|
|
131
|
+
graphflow run "update readme" # orchestrate (bridge)
|
|
132
|
+
graphflow skill insights # skill insights
|
|
133
|
+
graphflow skill report # flywheel contribution report
|
|
134
|
+
graphflow skill sync export # export team skill pack + golden queries (share via git)
|
|
135
|
+
graphflow skill sync import # import team skill pack (MERGE; --force to overwrite) + golden merge into .graphflow/team-golden.json
|
|
136
|
+
graphflow route diagnose # routing diagnostics
|
|
137
|
+
graphflow learn nightly # nightly learning
|
|
138
|
+
graphflow doctor # install self-check
|
|
107
139
|
```
|
|
108
140
|
|
|
109
|
-
##
|
|
141
|
+
## Configuration
|
|
110
142
|
|
|
111
|
-
|
|
143
|
+
Three-layer merge: global `~/.graphflow.config.json` → project `graphflow.config.json` → project `.graphflow/config.json`. Copy [graphflow.config.example.json](graphflow.config.example.json) to get started.
|
|
112
144
|
|
|
113
|
-
|
|
145
|
+
Key options:
|
|
114
146
|
|
|
115
|
-
|
|
|
147
|
+
| Option | Description |
|
|
116
148
|
| --- | --- |
|
|
117
|
-
| `graphPolicy.transport` | `file` / `memory` / `sqlite` / **`auto
|
|
118
|
-
| `graphPolicy.maxContextTokens` |
|
|
119
|
-
| `graphPolicy.autoIndexOnSave` |
|
|
120
|
-
| `embeddingPolicy.provider` | `transformers
|
|
121
|
-
| `embeddingPolicy.vectorStorePath` |
|
|
122
|
-
| `skillPolicy.enableSkillFlywheel` |
|
|
149
|
+
| `graphPolicy.transport` | `file` / `memory` / `sqlite` / **`auto` (recommended: sqlite-first, falls back to file)** / `mcp-http` |
|
|
150
|
+
| `graphPolicy.maxContextTokens` | Context budget (default 1500) |
|
|
151
|
+
| `graphPolicy.autoIndexOnSave` | Auto incremental index on save (default true) |
|
|
152
|
+
| `embeddingPolicy.provider` | `transformers` (local default) / `openai` / `hash` |
|
|
153
|
+
| `embeddingPolicy.vectorStorePath` | Vector index persistence path (`.hnsw` derived automatically) |
|
|
154
|
+
| `skillPolicy.enableSkillFlywheel` | Learning flywheel switch |
|
|
123
155
|
|
|
124
|
-
## Team backend pilot
|
|
156
|
+
## Team backend pilot
|
|
125
157
|
|
|
126
|
-
|
|
158
|
+
Set `graphPolicy.transport` to `mcp-http` to host the graph on a remote Graphify service (shared by the team); requires `graphPolicy.mcpEndpoint` (http(s) URL, optional `mcpApiKey` bearer token):
|
|
127
159
|
|
|
128
160
|
```json
|
|
129
161
|
{ "graphPolicy": { "transport": "mcp-http", "mcpEndpoint": "http://graphify.team.internal:8080" } }
|
|
130
162
|
```
|
|
131
163
|
|
|
132
|
-
|
|
164
|
+
A missing/malformed endpoint fails at config validation; connection or runtime request failures degrade transparently to local JSON storage (`graphPolicy.graphStorePath`, default `graphflow-out/graphflow-graph.json`) with a `logger.warn`, consistent with the sqlite→file fallback, never interrupting the agent. The pilot protocol does not yet support full snapshots: `readSnapshot` returns the local mirror file (possibly stale). For the team-sharing security model, see [docs/team-memory-security.md](docs/team-memory-security.md).
|
|
165
|
+
|
|
166
|
+
## Benchmarks
|
|
133
167
|
|
|
134
|
-
|
|
168
|
+
- **Comprehensive**: [COMPREHENSIVE-RESULTS.md](benchmarks/COMPREHENSIVE-RESULTS.md) — P1–P6 six-dimension evaluation, overall **92.9%** (indexing 100% / compression 64.9% / planning 100% / learning 100% / bridge 100% / performance 99.7%)
|
|
169
|
+
- **Independent-style**: [INDEPENDENT-RESULTS.md](benchmarks/INDEPENDENT-RESULTS.md) — CodeGraph-style 5-domain evaluation, Hit@5 **96%**, token savings **96.6%**, overall **96.2%**
|
|
170
|
+
- **SWE-bench-style**: [SWE-BENCH-RESULTS.md](benchmarks/SWE-BENCH-RESULTS.md) — self-built 12-instance context-readiness eval; [SWE-BENCH-REAL-RESULTS.md](benchmarks/SWE-BENCH-REAL-RESULTS.md) — Flask real-project 10-instance file-recall eval (48.3%)
|
|
171
|
+
- **Token savings**: [RESULTS.md](benchmarks/RESULTS.md) — 8 representative queries, **98.2%** savings, re-counted with independent gpt-tokenizer
|
|
172
|
+
- **Retrieval quality**: [RETRIEVAL-EVAL-RESULTS.md](benchmarks/RETRIEVAL-EVAL-RESULTS.md) — 132 queries, Hit@5=100%, MRR=0.836, NDCG@5=0.601
|
|
173
|
+
- **Skill flywheel A/B**: [SKILL-AB-RESULTS.md](benchmarks/SKILL-AB-RESULTS.md) — injection rate 100%, recall 100%, overhead 25.6 tok/task
|
|
135
174
|
|
|
136
|
-
|
|
137
|
-
- **Skill 飞轮 A/B**:[benchmarks/SKILL-AB-RESULTS.md](benchmarks/SKILL-AB-RESULTS.md) — 注入率 100%、episode 召回 100%、平均开销 25.6 tokens/任务,`npm run benchmark:skills` 可复现。
|
|
138
|
-
- **检索召回**:golden set(26 查询)纳入 CI 回归门禁,防止压缩/排序改动悄悄劣化召回。
|
|
175
|
+
## VS Code / Cursor extension
|
|
139
176
|
|
|
140
|
-
|
|
177
|
+
Download `graphflow-<version>.vsix` from [GitHub Releases](https://github.com/Roarpeng/GraphFlow/releases) (or Open VSX: `roarpeng.graphflow`).
|
|
141
178
|
|
|
142
|
-
|
|
179
|
+
Commands: Settings / Show Graph (graph visualization) / Preview Context / Plan & Brainstorm / Run Task / Skill Insights / Install MCP; chat agent `@graphflow` (`/run` `/plan` `/graph` `/skills` `/diagnose` `/learn` `/history`).
|
|
143
180
|
|
|
144
|
-
|
|
181
|
+
## Agent Plugins 1.0
|
|
182
|
+
|
|
183
|
+
**Primary install path** for hosts that support [Agent Plugins](https://agent-plugins.org). GraphFlow ships as a portable package at the repository root:
|
|
184
|
+
|
|
185
|
+
```text
|
|
186
|
+
plugin.json # Agent Plugins 1.0 manifest
|
|
187
|
+
mcp.json # stdio MCP (type required by the spec)
|
|
188
|
+
skills/graphflow/SKILL.md
|
|
189
|
+
```
|
|
145
190
|
|
|
146
|
-
|
|
191
|
+
**Install in Cursor (local):**
|
|
147
192
|
|
|
148
193
|
```bash
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
194
|
+
mkdir -p ~/.cursor/plugins/local
|
|
195
|
+
ln -s /absolute/path/to/GraphFlow ~/.cursor/plugins/local/graphflow
|
|
196
|
+
# then Restart Cursor / Developer: Reload Window
|
|
152
197
|
```
|
|
153
198
|
|
|
154
|
-
|
|
199
|
+
**Install via Team Marketplace / Git:** import this repository; clients discover `plugin.json`, then load `skills/` and `mcp.json`.
|
|
200
|
+
|
|
201
|
+
Docs: [Context Engineering contract](docs/context-contract.md) · [Experience memory](docs/experience-memory.md)
|
|
202
|
+
|
|
203
|
+
**Uninstall:** Removing the Agent Plugin in Cursor only drops the plugin package. Skills/Rules/MCP written by `graphflow install` remain and will keep steering the agent — run:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
npx @roarpeng/graphflow uninstall
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
That removes user + workspace MCP entries, `skills/graphflow` folders, GraphFlow rules/instruction blocks, and Claude Code hooks. Also delete any local symlink under `~/.cursor/plugins/local/graphflow` if you used one.
|
|
210
|
+
|
|
211
|
+
## Agent integrations
|
|
212
|
+
|
|
213
|
+
Use **`npx @roarpeng/graphflow install` as the fallback** when you need Rules, multi-agent wiring, or a host that does not load Agent Plugins:
|
|
214
|
+
|
|
215
|
+
```bash
|
|
216
|
+
npx @roarpeng/graphflow doctor # detect installed agents
|
|
217
|
+
npx @roarpeng/graphflow install # auto-install MCP + Skill + Rules
|
|
218
|
+
npx @roarpeng/graphflow uninstall # remove MCP + Skill + Rules + hooks
|
|
219
|
+
npx @roarpeng/graphflow init # write a minimal project config
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
Supported: Cursor, VS Code, Trae (incl. CN), Claude Code, Windsurf, Cline, Roo Code, Kilo Code, Gemini CLI, Codex, Antigravity, Opencode, Qoder, Amazon Q, Zed, Continue, and more (15+).
|
|
223
|
+
|
|
224
|
+
| Path | When to use |
|
|
225
|
+
| --- | --- |
|
|
226
|
+
| **Agent Plugins** | Preferred single-host Skill + MCP discovery |
|
|
227
|
+
| **`graphflow install`** | Rules / multi-agent / non-plugin hosts |
|
|
228
|
+
| **`graphflow uninstall`** | After removing a plugin (or anytime) — clears leftover Skill/MCP/Rules |
|
|
229
|
+
|
|
230
|
+
## Protocol
|
|
231
|
+
|
|
232
|
+
[ATP/IR — Agent Thinking Protocol public specification v1.0](docs/atp-ir-spec-v1.md): work-item registry, submit/merge contract, compatibility rules. Third-party tools can implement compatible producers / consumers. Minimal Producer example: [`examples/atp-minimal-producer/`](examples/atp-minimal-producer/).
|
|
233
|
+
|
|
234
|
+
## Community
|
|
155
235
|
|
|
156
|
-
|
|
236
|
+
GraphFlow is a single-maintainer project (bus factor = 1); community collaboration is the key to reducing single-point risk. Contributions welcome:
|
|
157
237
|
|
|
158
|
-
[
|
|
238
|
+
- [Contributing guide](CONTRIBUTING.md): dev environment, code style, test requirements and PR checklist
|
|
239
|
+
- [Roadmap](ROADMAP.md): completed milestones and next steps (P0–P2)
|
|
240
|
+
- [Issues](https://github.com/Roarpeng/GraphFlow/issues): bug reports and feature requests (please use the built-in templates)
|
|
241
|
+
- [Discussions](https://github.com/Roarpeng/GraphFlow/discussions): questions and ideas
|
|
159
242
|
|
|
160
|
-
##
|
|
243
|
+
## Development
|
|
161
244
|
|
|
162
245
|
```bash
|
|
163
246
|
npm install
|
|
164
|
-
npm run ci # lint + build +
|
|
247
|
+
npm run ci # lint + build + tests + extension packaging + smoke
|
|
165
248
|
```
|
|
166
249
|
|
|
167
|
-
|
|
250
|
+
Requires Node.js ≥ 20, npm ≥ 10. Expected: lint clean, build succeeds, 692 tests pass.
|
|
168
251
|
|
|
169
|
-
##
|
|
252
|
+
## Project structure
|
|
170
253
|
|
|
171
254
|
```text
|
|
172
255
|
GraphFlow/
|
|
256
|
+
├── plugin.json # Agent Plugins 1.0 manifest
|
|
257
|
+
├── mcp.json # Agent Plugins MCP (stdio)
|
|
258
|
+
├── skills/graphflow/ # portable Agent Skill (canonical SKILL.md)
|
|
173
259
|
├── src/
|
|
174
|
-
│ ├── core/ #
|
|
175
|
-
│ ├── graph/ #
|
|
176
|
-
│ ├── routing/ #
|
|
260
|
+
│ ├── core/ # orchestration core: orchestrator, triage, dag-engine, agent-delegation
|
|
261
|
+
│ ├── graph/ # indexing, context slicing, graph compression, sqlite/auto storage, snapshot
|
|
262
|
+
│ ├── routing/ # model routing and health probes (5 providers)
|
|
177
263
|
│ ├── learning/ # embeddings, episodic, skill-flywheel, hnsw, nightly
|
|
178
264
|
│ ├── agents/ # ATP schema, planner, insight, brainstormer
|
|
179
265
|
│ └── surfaces/
|
|
180
266
|
│ ├── cli/ # CLI + runtime
|
|
181
|
-
│ └── mcp/ # MCP server
|
|
182
|
-
├── tests/ #
|
|
183
|
-
├── benchmarks/ # token
|
|
184
|
-
├── docs/ # ATP
|
|
185
|
-
├── vscode-extension/ # VS Code
|
|
267
|
+
│ └── mcp/ # MCP server (10 tools)
|
|
268
|
+
├── tests/ # 99 files / 692 tests (incl. retrieval golden set, bridge+DAG)
|
|
269
|
+
├── benchmarks/ # comprehensive + independent + SWE-bench + token savings + skill A/B (reproducible)
|
|
270
|
+
├── docs/ # ATP spec + context contract + experience memory + comparisons
|
|
271
|
+
├── vscode-extension/ # VS Code panel and commands
|
|
186
272
|
└── CHANGELOG.md
|
|
187
273
|
```
|
|
188
274
|
|
|
189
|
-
##
|
|
275
|
+
## Changelog
|
|
190
276
|
|
|
191
|
-
|
|
277
|
+
Full history in [CHANGELOG.md](CHANGELOG.md). License: Apache-2.0.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal ATP/IR producer helpers for third-party–compatible simple-plan work items.
|
|
3
|
+
* Pure builders (no network / no GraphFlow LLM). See examples/atp-minimal-producer/.
|
|
4
|
+
*
|
|
5
|
+
* Emits atp-ir/1.1 required simple-plan items plus optional alignment-check and
|
|
6
|
+
* atp-ir/1.2 optional memory markers (memory-recall / memory-backfill). v1.1
|
|
7
|
+
* consumers ignore unknown optional items per spec §7.
|
|
8
|
+
*/
|
|
9
|
+
import { SIMPLE_PLAN_BRIDGE_REQUIRED_IDS, type AgentWorkItem } from "../core/agent-delegation.js";
|
|
10
|
+
export { SIMPLE_PLAN_BRIDGE_REQUIRED_IDS };
|
|
11
|
+
/** Protocol version emitted by the reference minimal producer. */
|
|
12
|
+
export declare const ATP_MINIMAL_PRODUCER_PROTOCOL: "atp-ir/1.2";
|
|
13
|
+
export type MinimalProducerOptions = {
|
|
14
|
+
/**
|
|
15
|
+
* Include atp-ir/1.2 optional memory-recall / memory-backfill markers.
|
|
16
|
+
* Default true. Set false for a pure v1.1 work-item set.
|
|
17
|
+
*/
|
|
18
|
+
includeMemoryItems?: boolean;
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Optional host-managed memory markers (atp-ir/1.2 §8). Agents MUST NOT treat
|
|
22
|
+
* these as required or answerable; consumers targeting v1.1 ignore them.
|
|
23
|
+
*/
|
|
24
|
+
export declare function buildOptionalMemoryWorkItems(): AgentWorkItem[];
|
|
25
|
+
/**
|
|
26
|
+
* Build the documented simple-plan bridge work-item set (intent + decomposition
|
|
27
|
+
* required; optional alignment-check; optional v1.2 memory markers).
|
|
28
|
+
* Stable machine IDs match docs/atp-ir-spec-v1.md §4.2 / §8.
|
|
29
|
+
*/
|
|
30
|
+
export declare function buildMinimalSimplePlanWorkItems(task: string, options?: MinimalProducerOptions): AgentWorkItem[];
|
|
31
|
+
/** Required simple-plan IDs only (no optional alignment-check or memory markers). */
|
|
32
|
+
export declare function buildRequiredSimplePlanWorkItems(task: string): AgentWorkItem[];
|
|
33
|
+
//# sourceMappingURL=atp-example-producer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"atp-example-producer.d.ts","sourceRoot":"","sources":["../../src/agents/atp-example-producer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EACL,+BAA+B,EAC/B,KAAK,aAAa,EACnB,MAAM,6BAA6B,CAAC;AAErC,OAAO,EAAE,+BAA+B,EAAE,CAAC;AAE3C,kEAAkE;AAClE,eAAO,MAAM,6BAA6B,EAAG,YAAqB,CAAC;AAwCnE,MAAM,MAAM,sBAAsB,GAAG;IACnC;;;OAGG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;CAC9B,CAAC;AAEF;;;GAGG;AACH,wBAAgB,4BAA4B,IAAI,aAAa,EAAE,CAqB9D;AAED;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,sBAAsB,GAC/B,aAAa,EAAE,CAoEjB;AAED,qFAAqF;AACrF,wBAAgB,gCAAgC,CAAC,IAAI,EAAE,MAAM,GAAG,aAAa,EAAE,CAK9E"}
|