graphflow · diff
git:20261014.fd39fe4 to git:20261015.163e06f
1 added, 21 removed. Audit A to C.
- ---
- name: graphflow
- description: Token-First Surgical Code Engine (gf_read, gf_edit, gf_exec, gf_macro) across TS/JS, Python, Go, Rust, C/C++, and C#.
- ---
-
- # GraphFlow 3.1 — Token-First Surgical Engine
-
- Always prefer the 4 surgical `gf_*` MCP tools over raw full-file reads or verbose test runs:
-
- 1. **`gf_read`** (`targets`, `q`, `skeleton`, `dedup`):
- - Read exact symbols (`"src/file.ts#symbol"`) with automatic **Cross-File Type Closure** and 3-line **`[Blast Radius]`** caller micro-snippets.
- - Fold large files into AST skeletons (`"src/file.ts"`, `skeleton: true`) cutting token cost by 93%.
- - Pass `dedup: true` in long sessions to skip re-reading unchanged files (SHA-256 cache).
- 2. **`gf_edit`** (`file`, `symbol`, `newCode`, `edits`, `renameTo`):
- - Edit symbols or line ranges in-place, apply multi-file atomic batch `edits` bottom-up with zero line drift, or run zero-LLM cross-repo symbol rename (`renameTo`).
- - Enforces instant AST syntax rollback, caller-arity checks, and struct/interface field deletion guards.
- 3. **`gf_exec`** (`cmd`, `changedFiles`, `handle`, `run`):
- - Run `cmd: "affected-tests"` (2-hop reverse import router) or any command with output dehydration (passing runs = 1-line `PASS` receipt; failures inline exact 5-line source context; 3 consecutive failures trigger the loop circuit breaker).
- 4. **`gf_macro`** (`action: "list" | "run" | "save" | "mine" | "mine-git"`):
- - Mine git history co-change coupling (`action: "mine-git"`) or run auto-compiled `.graphflow/macros/*.mjs` scripts and isomorphic codemods with zero LLM turns.
-
+ ---\nname: graphflow\ndescription: Token-First Surgical Code Engine (gf_read, gf_edit, gf_exec, gf_macro) across TS/JS, Python, Go, Rust, C/C++, and C#. 外科手术级代码切片、跨文件类型闭合、爆炸半径守卫、测试日志脱水与习惯宏编译引擎。\n---\n\n# GraphFlow 3.1 — Token-First Surgical Engine (外科手术级省 Token 引擎)\n\nAlways prefer the 4 surgical `gf_*` MCP tools over raw full-file reads or verbose test runs (请优先使用以下 4 个 `gf_*` 工具代替整文件读取与全量测试):\n\n1. **`gf_read`** (`targets`, `q`, `skeleton`, `dedup`):\n - Read exact symbols (`"src/file.ts#symbol"`) with automatic **Cross-File Type Closure** and 3-line **`[Blast Radius]`** caller micro-snippets (精准读取目标函数/类,自动附带跨文件类型定义与 3 行调用点爆炸半径).\n - Supports bilingual keyword search (`q: "keyword / 中文关键词"`) across symbol names, JSDoc/docstrings, and comments.\n - Fold large files into AST skeletons (`"src/file.ts"`, `skeleton: true`) cutting token cost by 93%, and pass `dedup: true` to skip unchanged files.\n2. **`gf_edit`** (`file`, `symbol`, `newCode`, `edits`, `renameTo`):\n - Edit symbols or line ranges in-place, apply multi-file atomic batch `edits` bottom-up with zero line drift, or run zero-LLM cross-repo symbol rename (`renameTo`).\n - Enforces instant AST syntax rollback, caller-arity checks, and struct/interface field deletion guards (语法错误自动回滚、调用方参数个数校验、结构体字段删除引用守卫).\n3. **`gf_exec`** (`cmd`, `changedFiles`, `handle`, `run`):\n - Run `cmd: "affected-tests"` (2-hop reverse import router) or any command with output dehydration (测试通过仅回 1 行 `PASS`;报错内联 5 行源码上下文;连续 3 次失败触发死循环熔断急救包).\n4. **`gf_macro`** (`action: "list" | "run" | "save" | "mine" | "mine-git"`):\n - Mine git history co-change coupling (`action: "mine-git"`) or run auto-compiled `.graphflow/macros/*.mjs` scripts and isomorphic codemods with zero LLM turns.\n