--- name: iflow-graphify description: >- Rebuild the graphify knowledge graph (graphify-out/) by shelling out to `issue-flow graphify` or `graphify` directly. disable-model-invocation: true issue-flow-version: 0.4.2a4 --- # issue-flow — graph rebuild (`/iflow-graphify`) Follow this skill to refresh the project's [graphify](https://iflow-graphify.net) knowledge graph — a stale `graphify-out/` after a large refactor, or the initial graph after installing `graphifyy`. Do **not** use this skill from `/iflow-build`, `/iflow-close`, or `/iflow`. `/iflow-graphify` is opt-in only. **Invoke:** type `iflow graphify` in chat, or `/iflow-graphify` from the slash menu (`iflow-graphify` also works). ### MODEL & EXECUTION DIRECTIVE **Profile: economy** — Prioritize speed and token economy over deep reasoning. In Cursor: use **Auto** or a fast model before invoking this step. Keep scope tight to what this step requires. ## Instructions 1. **Prefer `issue-flow graphify`** from the project root: ```bash issue-flow graphify ``` With no extra args this runs `graphify update ` — AST-only, **no LLM API key required**, produces the full `graphify-out/`. To pick a different graphify subcommand, pass it as the first arg: `issue-flow graphify extract` (adds the slower semantic LLM pass for richer relationships — needs an API key), `issue-flow graphify watch` (live), `issue-flow graphify cluster-only --no-viz`, etc. Use `-C ` to scan a project other than the current directory. Trailing flags pass through verbatim. Do not invent new wrapper flags. 2. **Fallback to `graphify` directly** when `issue-flow` is unavailable: ```bash graphify update . ``` `graphify` is subcommand-based — `graphify .` on its own is **not** valid (graphify reports `unknown command '.'`). Always pick a subcommand: `update` for the no-LLM AST build, `extract` for the full semantic pass, `watch` for a long-running watcher, etc. 3. **If graphify exits with "no LLM API key found"**, the user picked `extract` (or another semantic subcommand) without configuring a backend. Cursor's own LLM is not available to subprocesses, so graphify cannot reuse it. Suggest one of: - Set an API key for `GEMINI_API_KEY` / `GOOGLE_API_KEY`, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, or `MOONSHOT_API_KEY`. - Run `issue-flow graphify extract --backend ollama` to use a local LLM via [Ollama](https://ollama.com) (requires Ollama installed with a model pulled). - Drop the `extract` arg and use the default `issue-flow graphify` (AST-only, no LLM). 4. **Handle missing graphify gracefully.** If the run reports `graphify` is not on PATH, do **not** retry blindly. Tell the user to install it once: ```bash uv tool install graphifyy # recommended pipx install graphifyy pip install graphifyy ``` `graphifyy` (double-y) is the official PyPI package; the CLI is still `graphify`. After installing, suggest `issue-flow update` so `graphify cursor install` registers the graphify Cursor skill alongside this one. 5. **Verify and report.** - Confirm `graphify-out/graph.json`, `graphify-out/graph.html`, and `graphify-out/GRAPH_REPORT.md` exist after a successful run. - Surface non-zero exit codes verbatim; do not silently retry. - When the user asks "what changed?", skim `GRAPH_REPORT.md` (god nodes, surprising connections) for a short summary. ## Constraints - Never auto-dispatch `/iflow-graphify` from another slash command. The user opts in explicitly. - Never commit `graphify-out/cost.json` or `graphify-out/manifest.json`; they are local-only. - Long-running modes (`watch`) keep the process alive; ask the user before launching them in an agent context. - Forward extra arguments verbatim. Do **not** translate or rewrite graphify's flag set inside issue-flow.