You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit cae76b3
Browse filesBrowse the repository at this point in the historyBrowse files
feat(install): add writable graphify-extract subagent for vibe
Vibe's built-in explore subagent is read-only (enabled_tools omits
write_file), so Task-dispatched semantic extraction inheriting it
silently produced zero .graphify_chunk_NN.json files and aborted the
pipeline. Register a graphify-extract subagent alongside the skill that
enables write_file scoped to **/graphify-out/.graphify_chunk_*.json
only (no unbounded write grant), reuses the explore system prompt, and
is symmetrically installed/uninstalled by _install_vibe_extract_agent /
_uninstall_vibe_extract_agent.
Skill fragment updated so Task calls dispatch with
subagent_type="graphify-extract" on vibe. uninstall_all sweeps the
agent alongside the rest.
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -217,6 +217,7 @@ Full release notes with details on each version: [GitHub Releases](https://githu
217
217
- Fix: an unresolved local JS/TS import (to a file absent from the scan) now emits a stable, portable `ref` target id instead of leaking a per-checkout absolute-path slug (#2457, thanks @rohit-jsfreaky).
218
218
- Fix: `graphify benchmark` no longer crashes on a node whose label is `None` (#2674, thanks @Arthuro0103).
219
219
- Feat: `graphify vibe install` adds full-parity Mistral Vibe (mistralai/mistral-vibe) support — skill file with `user-invocable: true` frontmatter (exposes `/graphify` as a native slash command in vibe's autocomplete), `AGENTS.md` always-on section, and two `pre_tool` hooks in `.vibe/hooks.toml` (matchers `grep` and `read_file` — vibe's snake-cased tool names per `vibe/core/tools/base.py:get_name`) that nudge toward `graphify query` for search/read operations. Global scope honors `VIBE_HOME`, hook ownership is `name`-based (never touches user-authored hooks that happen to shell out to graphify), and `hooks.toml` merges preserve hand-authored comments via `tomlkit`. Verified end-to-end against vibe 2.24.0.
220
+
- Fix: `graphify vibe install` now also writes a writable `graphify-extract` subagent to `<scope>/agents/graphify-extract.toml` and the skill fragment dispatches Task calls with `subagent_type="graphify-extract"` (#2537 review, thanks @MusicalNinjaDad). Vibe's built-in `explore` subagent (`vibe/core/agents/models.py:EXPLORE`) is read-only — its `enabled_tools = ["grep", "read_file", "skill"]` cannot write chunk JSON — so semantic extraction inheriting it silently produced zero `.graphify_chunk_NN.json` files and the pipeline aborted. The new agent enables `write_file` scoped to `**/graphify-out/.graphify_chunk_*.json` only (no unbounded write grant), reuses the `explore` system prompt, and is registered/unregistered by `_install_vibe_extract_agent` / `_uninstall_vibe_extract_agent` symmetric to the hook flow. `uninstall_all` sweeps it alongside the rest.
print(f"AGENTS.md was empty after removal - deleted {target.resolve()}")
1816
1816
1817
1817
1818
+
_VIBE_EXTRACT_AGENT_NAME="graphify-extract"
1819
+
1820
+
# TOML body for the writable graphify-extract subagent. Vibe's AgentRegistry
1821
+
# scans `<scope>/agents/*.toml`; the file stem becomes the agent name
1822
+
# (`AgentProfile.from_toml` sets `name=path.stem`, see mistralai/mistral-vibe
1823
+
# vibe/core/agents/models.py), so this file MUST be named
1824
+
# `graphify-extract.toml`. Only the four whitelisted tools are enabled, and
1825
+
# `write_file` is scoped to graphify's own chunk output so nothing else in the
1826
+
# workspace is writable. The system prompt id `explore` keeps it lean — vibe's
1827
+
# read-only subagent uses the same prompt.
1828
+
_VIBE_EXTRACT_AGENT_TOML="""\
1829
+
# graphify-extract: writable subagent used by the graphify skill.
1830
+
# Managed by `graphify vibe install` -- do not hand-edit; changes are overwritten.
1831
+
# Named vs. the read-only `explore` builtin because Task-dispatched semantic
1832
+
# extraction has to write one chunk JSON per invocation, which `explore`
1833
+
# cannot do (its enabled_tools omit write_file).
1834
+
display_name = "Graphify Extract"
1835
+
description = "Writable subagent used by graphify's /graphify skill for semantic chunk extraction. Reads files, writes one graphify-out/.graphify_chunk_NN.json per Task, then exits."
Copy file name to clipboardExpand all lines: graphify/skill-vibe.md
+4-3Lines changed: 4 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -261,11 +261,12 @@ Load files from `graphify-out/.graphify_uncached.txt`. Split into chunks of 20-2
261
261
262
262
> Uses the `Task` tool for parallel subagent dispatch.
263
263
> Call `Task` once per chunk — ALL in the same response so they run in parallel.
264
+
> **On Mistral Vibe, dispatch each `Task` with `subagent_type="graphify-extract"`.** This writable subagent is installed by `graphify vibe install` alongside the skill. Do NOT use vibe's built-in `explore` subagent — it is read-only (`enabled_tools = ["grep", "read_file", "skill"]`) and cannot write the chunk JSON files this pipeline needs. If `graphify-extract` is missing (older install, or you overrode `VIBE_HOME` after install), re-run `graphify vibe install` first.
264
265
265
266
Pass the extraction prompt as the task description:
266
267
267
268
```
268
-
Task(description="Your task is to perform the following. Follow the instructions below exactly.\n\n<agent-instructions>\n[extraction prompt, with FILE_LIST, CHUNK_NUM, TOTAL_CHUNKS, DEEP_MODE substituted]\n</agent-instructions>\n\nExecute this now. Output ONLY the structured JSON response.")
269
+
Task(subagent_type="graphify-extract", description="Your task is to perform the following. Follow the instructions below exactly.\n\n<agent-instructions>\n[extraction prompt, with FILE_LIST, CHUNK_NUM, TOTAL_CHUNKS, DEEP_MODE substituted]\n</agent-instructions>\n\nExecute this now. Output ONLY the structured JSON response.")
269
270
```
270
271
271
272
Each subagent writes its result to its own `graphify-out/.graphify_chunk_NN.json`. Collect results as each `Task` completes and parse each as JSON.
@@ -285,10 +286,10 @@ See `references/extraction-spec.md` for the exact subagent prompt (JSON schema,
285
286
Wait for all subagents. For each result:
286
287
- Check that `graphify-out/.graphify_chunk_NN.json` exists on disk — this is the success signal
287
288
- If the file exists and contains valid JSON with `nodes` and `edges`, include it and save to cache
288
-
- If the file is missing, the subagent was likely dispatched as read-only (Explore type) — print a warning: "chunk N missing from disk — subagent may have been read-only. Re-run with general-purpose agent." Do not silently skip.
289
+
- If the file is missing, the subagent was likely dispatched as read-only (vibe's built-in `explore`, or Claude Code's Explore type) — print a warning: "chunk N missing from disk — subagent may have been read-only. On vibe, re-dispatch with`subagent_type=\"graphify-extract\"` (installed by `graphify vibe install`). On Claude Code, re-dispatch with the general-purpose agent." Do not silently skip.
289
290
- If a subagent failed or returned invalid JSON, print a warning and skip that chunk - do not abort
290
291
291
-
If more than half the chunks failed or are missing, stop and tell the user to re-runand ensure `subagent_type="general-purpose"` is used.
292
+
If more than half the chunks failed or are missing, stop and tell the user to re-run. On vibe, ensure `subagent_type="graphify-extract"` (installed by `graphify vibe install`) is passed to every `Task` call — the default `explore` subagent is read-only and will silently produce zero chunks. On Claude Code, ensure `subagent_type="general-purpose"` is used.
292
293
293
294
Merge all chunk files into `.graphify_semantic_new.json`. **After each Agent call completes, read the real token counts from the Agent tool result's `usage` field and write them back into the chunk JSON before merging** — the chunk JSON itself always has placeholder zeros. Then run:
0 commit comments