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
description: Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPH_REPORT.md.
4
+
---
5
+
6
+
Run the graphify knowledge-graph pipeline.
7
+
8
+
1. Read the full step-by-step instructions from `~/.codeium/windsurf/skills/graphify/SKILL.md`.
9
+
2. Execute those instructions on the path provided by the user (default: `.`).
10
+
3. If `~/.codeium/windsurf/skills/graphify/SKILL.md` is not found, tell the user to run `graphify install --platform windsurf` first, then retry.
This project has a graphify knowledge graph at graphify-out/.
4
+
5
+
Rules:
6
+
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
7
+
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
8
+
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current
9
+
## graphify
10
+
11
+
This project has a graphify knowledge graph at graphify-out/.
12
+
13
+
Rules:
14
+
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
15
+
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
16
+
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current
Codex users also need `multi_agent = true` under `[features]` in `~/.codex/config.toml` for parallel extraction. Factory Droid uses the `Task` tool for parallel subagent dispatch. OpenClawand Aider use sequential extraction (parallel agent support is still early on those platforms). Trae uses the Agent tool for parallel subagent dispatch and does **not** support PreToolUse hooks — AGENTS.md is the always-on mechanism.
76
+
Codex users also need `multi_agent = true` under `[features]` in `~/.codex/config.toml` for parallel extraction. Factory Droid uses the `Task` tool for parallel subagent dispatch. OpenClaw, Aider, and Windsurf use sequential extraction (Windsurf's parallel agents run in separate worktrees, not via programmatic spawning within a Cascade session). Trae uses the Agent tool for parallel subagent dispatch and does **not** support PreToolUse hooks — AGENTS.md is the always-on mechanism.
76
77
77
78
Then open your AI coding assistant and type:
78
79
@@ -99,6 +100,7 @@ After building a graph, run this once in your project:
99
100
| Trae CN |`graphify trae-cn install`|
100
101
| Cursor |`graphify cursor install`|
101
102
| Gemini CLI |`graphify gemini install`|
103
+
| Windsurf |`graphify windsurf install`|
102
104
103
105
**Claude Code** does two things: writes a `CLAUDE.md` section telling Claude to read `graphify-out/GRAPH_REPORT.md` before answering architecture questions, and installs a **PreToolUse hook** (`settings.json`) that fires before every Glob and Grep call. If a knowledge graph exists, Claude sees: _"graphify: Knowledge graph exists. Read GRAPH_REPORT.md for god nodes and community structure before searching raw files."_ — so Claude navigates via the graph instead of grepping through every file.
104
106
@@ -110,7 +112,9 @@ After building a graph, run this once in your project:
110
112
111
113
**Gemini CLI** copies the skill to `~/.gemini/skills/graphify/SKILL.md`, writes a `GEMINI.md` section, and installs a `BeforeTool` hook in `.gemini/settings.json` that fires before file-read tool calls — same always-on mechanism as Claude Code.
112
114
113
-
**Aider and OpenClaw, Factory Droid, Trae** write the same rules to `AGENTS.md` in your project root. These platforms don't support tool hooks, so AGENTS.md is the always-on mechanism.
115
+
**Aider, OpenClaw, Factory Droid, and Trae** write the same rules to `AGENTS.md` in your project root. These platforms don't support tool hooks, so AGENTS.md is the always-on mechanism.
116
+
117
+
**Windsurf** writes `.windsurf/workflows/graphify.md` (registers `/graphify` as a Cascade slash command) and appends a `## graphify` section to `.windsurfrules` for always-on context. Run `graphify install --platform windsurf` separately to copy the full skill logic to `~/.codeium/windsurf/skills/graphify/SKILL.md`.
114
118
115
119
**GitHub Copilot CLI** copies the skill to `~/.copilot/skills/graphify/SKILL.md`. Run `graphify copilot install` to set it up.
This project has a graphify knowledge graph at graphify-out/.
546
+
547
+
Rules:
548
+
- Before answering architecture or codebase questions, read graphify-out/GRAPH_REPORT.md for god nodes and community structure
549
+
- If graphify-out/wiki/index.md exists, navigate it instead of reading raw files
550
+
- After modifying code files in this session, run `python3 -c "from graphify.watch import _rebuild_code; from pathlib import Path; _rebuild_code(Path('.'))"` to keep the graph current
551
+
"""
552
+
553
+
_WINDSURF_RULES_MARKER="\n## graphify"
554
+
555
+
_WINDSURF_WORKFLOW="""\
556
+
---
557
+
title: graphify
558
+
description: Turn any folder of files into a navigable knowledge graph with community detection, an honest audit trail, and three outputs: interactive HTML, GraphRAG-ready JSON, and a plain-language GRAPH_REPORT.md.
559
+
---
560
+
561
+
Run the graphify knowledge-graph pipeline.
562
+
563
+
1. Read the full step-by-step instructions from `~/.codeium/windsurf/skills/graphify/SKILL.md`.
564
+
2. Execute those instructions on the path provided by the user (default: `.`).
565
+
3. If `~/.codeium/windsurf/skills/graphify/SKILL.md` is not found, tell the user to run `graphify install --platform windsurf` first, then retry.
566
+
"""
567
+
568
+
569
+
def_windsurf_install(project_dir: Path) ->None:
570
+
"""Write .windsurf/workflows/graphify.md and append to .windsurfrules."""
571
+
# 1. Workflow file — registers /graphify as a Cascade slash command
0 commit comments