From 660d2d32cfb7865a7ac52b8f90a4c3fe3ec78aab Mon Sep 17 00:00:00 2001 From: Safi Date: Sun, 7 Jun 2026 14:39:16 +0100 Subject: [PATCH] fix(codebuddy): install SKILL.md in codebuddy install subcommand + fix README hook description graphify codebuddy install was writing CODEBUDDY.md and settings.json but not copying the SKILL.md. Added _copy_skill_file("codebuddy") call to match the --platform codebuddy path. README hook description updated from "Glob and Grep" to "Bash search and file reads" to match actual hook matchers (Bash + Read|Glob). Co-Authored-By: Claude Sonnet 4.6 --- README.md | 2 +- graphify/__main__.py | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9e8b7879..b7ca3725 100644 --- a/README.md +++ b/README.md @@ -211,7 +211,7 @@ Run this once in your project after building a graph: This writes a small config file that tells your assistant to consult the knowledge graph for codebase questions — preferring scoped queries like `graphify query ""` over reading the full report or grepping raw files. On platforms that support payload-bearing hooks (Claude Code, Gemini CLI), a hook fires automatically before search-style tool calls (and, on Claude Code, before reading source files one by one via the Read/Glob tools) and nudges your assistant toward the graph path. On the others (Codex, OpenCode, Cursor, etc.), the persistent instruction files (`AGENTS.md`, `.cursor/rules/`, etc.) provide the same query-first guidance. `GRAPH_REPORT.md` is still available for broad architecture review. -**CodeBuddy** does the same two things as Claude Code: writes a `CODEBUDDY.md` section telling CodeBuddy to read `graphify-out/GRAPH_REPORT.md` before answering architecture questions, and installs a **PreToolUse hook** (`.codebuddy/settings.json`) that fires before every Glob and Grep call. +**CodeBuddy** does the same two things as Claude Code: writes a `CODEBUDDY.md` section telling CodeBuddy to read `graphify-out/GRAPH_REPORT.md` before answering architecture questions, and installs **PreToolUse hooks** (`.codebuddy/settings.json`) that fire before Bash search commands and file reads, nudging toward `graphify query` instead. **Codex** writes to `AGENTS.md` and also installs a **PreToolUse hook** in `.codex/hooks.json` that fires before every Bash tool call — same always-on mechanism as Claude Code. diff --git a/graphify/__main__.py b/graphify/__main__.py index 4861b836..759d913b 100644 --- a/graphify/__main__.py +++ b/graphify/__main__.py @@ -1910,7 +1910,8 @@ def claude_uninstall(project_dir: Path | None = None, *, project: bool = False) def codebuddy_install(project_dir: Path | None = None) -> None: - """Write the graphify section to the local CODEBUDDY.md.""" + """Install the graphify skill and CODEBUDDY.md section for CodeBuddy.""" + _copy_skill_file("codebuddy", project=bool(project_dir), project_dir=project_dir) target = (project_dir or Path(".")) / "CODEBUDDY.md" if target.exists():