--- description: Updates the Graphify knowledge graph to reflect recent code changes --- ## Update Graphify Knowledge Graph This workflow updates the Graphify knowledge graph to ensure AI assistants have the latest code structure and relationships for accurate code discovery and context. ### Prerequisites Graphify must be installed. Choose one method: **Global Install (Python 3.10+):** ```bash pip install graphifyy ``` **uvx (no Python version requirement):** ```bash brew install uv ``` ### Steps 1. **Check installation method** Determine which method you're using: - If `graphify` command works → global install - If you need `uvx --from graphifyy graphify` → uvx method 2. **Update the graph (incremental)** For small to medium code changes, run an incremental update: **Global install:** ```bash graphify update . ``` **uvx:** ```bash uvx --from graphifyy graphify update . ``` This only re-indexes changed files and is much faster than a full rebuild. 3. **Full rebuild (if needed)** Perform a full rebuild if: - Major refactoring occurred - Graph queries return stale information - After pulling large changes from remote - Graphify output seems corrupted **Global install:** ```bash rm -rf graphify-out/ graphify update . ``` **uvx:** ```bash rm -rf graphify-out/ uvx --from graphifyy graphify update . ``` 4. **Verify the update** Check that the graph was updated successfully: - The `graphify-out/` directory should have recent modification times - Run a test query: `graphify query "where is OrderDetails used"` (or uvx equivalent) - If the query returns relevant results, the update was successful ### When to Run This Workflow Run this workflow after: - Completing a feature implementation - Major refactoring across multiple files - Adding new components or services - Changing file structure or moving files - Pulling significant changes from the repository ### IDE Integration This repo supports two IDE configurations: Devin (`.devin/`) and Kiro (`.kiro/`). #### Kiro **If using global install:** ```bash graphify kiro install ``` **If using uvx:** ```bash uvx --from graphifyy graphify kiro install ``` This creates: - `.kiro/skills/graphify/SKILL.md` — the `/graphify` skill - `.kiro/steering/graphify.md` — always-on steering that makes Kiro query the graph first Kiro will now automatically use the knowledge graph for every interaction. #### Devin Devin reads the `.devin/context/` and `.devin/rules/` directories. The graphify context file at `.devin/context/graphify.md` provides usage patterns for Devin's AI assistant. No installation needed — Devin automatically reads the context file. #### Other Supported IDEs **If using global install:** ```bash graphify install --platform ``` **If using uvx:** ```bash uvx --from graphifyy graphify install --platform ``` Platform options: `claude`, `codex`, `opencode`, `aider`, `cursor`, `gemini`, `trae`, `hermes`, `kiro`, `pi`, `devin` ### Troubleshooting **Command not found:** - Global: `pip install graphifyy` - uvx: `brew install uv` **Python version too old (3.9):** - Use uvx method instead of global install **Graph still seems outdated:** - Delete `graphify-out/` and do a full rebuild ### Quick Reference | Scenario | Global Install | uvx | | ------------- | ------------------------------------------- | ---------------------------------------------------------------- | | Small changes | `graphify update .` | `uvx --from graphifyy graphify update .` | | Major changes | `rm -rf graphify-out/ && graphify update .` | `rm -rf graphify-out/ && uvx --from graphifyy graphify update .` | | Test query | `graphify query "question"` | `uvx --from graphifyy graphify query "question"` |