--- description: Manage per-project Graphify knowledge graphs — onboard, update, remove, and query codebase structure for the current repo --- **Scope:** project graph at `./graphify-out/graph.json` — codebase structure and module relationships for the current repo only. For cross-project evergreen knowledge, use `memory-vault`. ## Onboard Run from the project root: ```bash graphify extract . --backend ollama --model qwen2.5-coder:7b graphify cluster-only . ``` Then ensure `graphify-out/` is in `.gitignore`. Confirm `graphify-out/graph.json` exists before reporting done. Code-only repos use the free tree-sitter AST pass — no LLM cost. The `--backend ollama` flags are always specified so the single command handles mixed (code + docs) repos without requiring repo-type detection. ## Incremental update ```bash # Routine edits (no renames/deletions/moves) graphify update . # Structural changes (renames, deletions, directory moves) graphify update . --force ``` Suggest running `graphify update .` after sessions involving significant refactoring, and `--force` after any renames or directory reorganization. ## Remove Delete `graphify-out/` when the project is inactive or the graph is too stale. The graph is always rebuildable via the onboard sequence. Leave the `.gitignore` entry even after removal. ## Query ```bash graphify query "" --graph ./graphify-out/graph.json ``` For traversal mechanics (`graphify path`, `graphify explain`, `--budget`, `--dfs`), see `memory-vault` — query mechanics are not duplicated here. ## Graph path discovery `session_context.py` injects the absolute path to `graphify-out/graph.json` when it exists. If no graph path is present in session context and you are working in a project context, suggest running the onboard sequence before proceeding with knowledge queries. ## Constraints - **Never commit `graphify-out/`** — it is local, disposable, and rebuildable. - Model is `qwen2.5-coder:7b` — do not substitute. - The `.gitignore` entry for `graphify-out/` must survive even if the directory is deleted.