Add guidance to SKILL.md on when building a graph is (and isn't) worth it
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
- 难度
- 1/5
- 预计耗时
- 1-3 小时
- 新手友好度
- 75/100
- Issue 类型
- 文档
- 描述清晰度
- 描述清楚
- 活跃度
- 活跃
- 技术栈
- python
调研方向
找到 graphify 技能的 SKILL.md,并阅读现有的构建步骤。在这些步骤前添加一个简短章节,结合 issue 中的案例和指导,说明何时使用直接搜索,何时构建或查询图。章节涵盖现有图、一次性查询,以及构建图能带来收益的情况后,即为完成。
由索引模型根据 Issue 内容生成。
描述
Ran the skill end-to-end today (sample corpus + a real ~200-file project) and it delivered genuinely good results — correct AST extraction, accurate cross-referencing between code and doc semantic layers, and the cohesion/god-node/surprising-connections analysis surfaced real findings (an architectural smell, a cross-doc duplicate derivation, etc.).
One gap: the skill has no guidance on when the full pipeline is worth its cost vs. when a plain code search would do. In practice:
- A single targeted lookup ("what calls
X", "where isYdefined") on an ordinary-sized codebase is answered just as well, instantly and for free, bygrep/ripgrep/Read. Building the graph first is pure overhead for that case — AST extraction is fast and free, but semantic extraction on docs dispatches subagents and can take minutes and tens of thousands of tokens, even for a modest doc set. - The graph earns its cost when: there will be many repeated questions (amortized build cost), the corpus is large/unfamiliar and the user needs orientation, the question needs cross-file/cross-type links text search can't see (doc ↔ code, cross-doc semantic duplicates), or the question is structural (cohesion, bridging nodes, import cycles) rather than textual.
Right now the skill (reasonably) defaults to building on /graphify <path>, which is fine when the user explicitly asks for that — but when an agent is deciding on its own whether to reach for graphify vs. a direct search for a one-off question, there's no steering in SKILL.md toward the cheaper option first.
Suggested addition: a short "is a graph worth it here" section before the build steps, something like:
Building costs real time and tokens: AST extraction on code is free and fast, but semantic extraction on docs/papers/images dispatches subagents (minutes, tens of thousands of tokens), and a full pipeline run is overhead you pay once per corpus state. Don't pay it reflexively.
If
graphify-out/graph.jsonalready exists for this corpus, always query it rather than re-deriving the answer by reading files or rebuilding — that cost is already sunk and querying is cheap.If no graph exists yet, check whether the request is a single, targeted lookup a plain code search would answer just as well — "where is X defined", "what calls Y", "find the function that does Z" on a codebase of ordinary size. For these, grep/ripgrep/Read is faster, free, and exact. Say so and just search directly; offer to build the full graph instead only if the user wants it.
Building (or updating) the graph earns its cost when:
- You expect many future questions against this corpus — the build cost amortizes.
- The corpus is large or unfamiliar and the user needs orientation (god nodes, communities).
- The question needs cross-file or cross-type connections text search can't see.
- The question is structural/architectural, not textual.
Happy to turn this into a PR against SKILL.md if that's useful.
Separately filed one small fix noticed during testing as a PR: #4830 (graphify query --help ran a literal query instead of showing usage). The other thing I initially flagged (hyperedge members/nodes field mismatch) turned out to already be intentionally handled in build.py (#1561) — not a bug, so no PR for that one.
- 主要语言
- Python
- 星标
- 124k
- 派生
- 11.9k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
Graphify-Labs/graphify 的其他 Issue
-
Relative JS imports with a query string (`./foo.js?v=123`) are not resolved可能已有人在做 @mirzasnowy 于 1 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4860 · 3 条评论 ·
维护者通常 1 天内回复
-
Cache the claude backend system prompt via Anthropic prompt caching可能已有人在做 @Jvxoq 于 2 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4835 · 4 条评论 ·
维护者通常 1 天内回复
-
extract --out <dir>: semantic cache never saved, docs missing from manifest (relative source_file resolved against --out)可能已有人在做 关联的 PR 仍在进行中或已合并。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4831 · 3 条评论 ·
维护者通常 1 天内回复
-
hooks: last-resort `python3` probe launches the Microsoft Store redirector on Windows (visible console flash, exit 9009)可能已有人在做 @Deepjyoti-Sarmah 于 12 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 76/100
Graphify-Labs/graphify#4563 · 2 条评论 ·
维护者通常 1 天内回复
-
GRAPHIFY_DISABLE_THINKING is ignored by the claude backend, so thinking eats max_tokens and extraction truncates可能已有人在做 @bercedev 于 12 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 69/100
Graphify-Labs/graphify#4546 · 1 条评论 ·
维护者通常 1 天内回复
查看 Graphify-Labs/graphify 的全部 Issue
相似的 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 74/100
BCDA-APS/polar-bits#93 ·
-
infer_audio_type only recognises one MPEG Layer III frame header, so most MP3 files are rejected可能已有人在做 @Steve-20-ai 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
[BUG] - ssh_config `Match tagged` statement always applies可能已有人在做 @AtharvRG 今天认领。 未关闭Bug
难度 2/5 1-3 小时 新手友好度 68/100
paramiko/paramiko#2715 · 1 条评论 ·
维护者通常 9 天内回复
-
auto-rejected intake mcp-intake needs-salvage priority:high type:feature
难度 2/5 1-3 小时 新手友好度 65/100
Ikalus1988/MisakaNet#4221 · 2 条评论 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 82/100
维护者通常 1 天内回复