Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
15 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

Full release notes with details on each version: [GitHub Releases](https://github.com/Graphify-Labs/graphify/releases)

## Unreleased

- Feature: **install** Freebuff (freebuff.com, the Codebuff runtime) is now a first-class platform: `graphify install --platform freebuff` copies the skill globally to `~/.agents/skills/graphify/` (or `./.agents/skills/graphify/` with `--project`), and `graphify freebuff install` also writes the `## graphify` section to `AGENTS.md`. Freebuff has no hook API, so the AGENTS.md rules are its only always-on mechanism; the Freebuff desktop app does not load local skill directories (and its cloud `graphify` skill is too large to install), so desktop users rely on that AGENTS.md section. It consumes the same rendered Agent-Skills bundle as `--platform agents` rather than a forked body, so the two names write byte-identical files; the stale-skill refresh now refreshes a directory written by platforms that resolve to the same bundle (identical bytes), while a directory written by installers with different bundles is still left for the version warning. `graphify freebuff install --project` writes the project skill and the project `AGENTS.md` section (an existing `AGENTS.md` is preserved; the section is appended or replaced in place). Because one directory serves both names, it records its claimants in `.graphify_platforms`, so uninstalling one of them keeps the skill, references and section while the other still claims them; the last claimant removes the directory. `AGENTS.md` section writers are recorded separately in `.graphify_agents_md`, keyed by the AGENTS.md path and written by every platform that wires the section (`codex`, `aider`, `amp`, `opencode`, `claw`, `droid`, `trae`, `hermes`, `kilo` as well as `agents`/`freebuff`), so uninstalling one of them leaves a section another installed platform still relies on; a skill directory with no claim files (an install predating this tracking) also keeps the section, since it is the only evidence that project was wired, because the claim lives beside a user-scoped skill while the file it describes is per project (`install --project --platform agents` is also skill-only and never adds those rules); uninstalling in one project therefore removes that project's section and leaves every other project's section alone. The parallel-extraction instructions are now host-neutral about the subagent tool (`Task`, `Agent`, or Freebuff's `spawn_agents`) and gain a sequential fallback for hosts with no spawnable file-writing agent.

## 0.9.118 (2026-11-23)

A batch of extractor, resolution, serve, export, clustering and reporting fixes across fourteen community pull requests. The Objective-C, C and C# changes alter node/edge output, so the AST cache schema bumps (51 to 53) and the first build after upgrading re-extracts the affected languages; the other fixes need no rebuild.
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -272,14 +272,15 @@ for example `graphify claude install --project` or `graphify codex install --pro
| Kimi Code | `graphify install --platform kimi` |
| Amp | `graphify amp install` |
| Agent Skills (cross-framework) | `graphify install --platform agents` (alias `--platform skills`) |
| Freebuff | `graphify install --platform freebuff` (or `graphify freebuff install` to also wire `AGENTS.md`) |
| Kiro IDE/CLI | `graphify kiro install` |
| Pi coding agent | `graphify install --platform pi`, plus `graphify pi guard install` for the native guard |
| Cursor | `graphify cursor install` |
| Devin CLI | `graphify devin install` |
| Google Antigravity | `graphify antigravity install` |
| Google Antigravity (Windows) | `graphify antigravity install` (auto-detected on Windows) |

Codex users also need `multi_agent = true` under `[features]` in `~/.codex/config.toml` for parallel extraction. CodeBuddy uses the same Agent tool and PreToolUse hook mechanism as Claude Code. Factory Droid uses the `Task` tool for parallel subagent dispatch. OpenClaw and 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, so AGENTS.md is the always-on mechanism.
Codex users also need `multi_agent = true` under `[features]` in `~/.codex/config.toml` for parallel extraction. CodeBuddy uses the same Agent tool and PreToolUse hook mechanism as Claude Code. Factory Droid uses the `Task` tool for parallel subagent dispatch. Freebuff dispatches parallel extraction through its `spawn_agents` tool and has no hook API, so AGENTS.md is its always-on mechanism. The Freebuff **desktop** app does not load local skill directories (its `/` menu lists cloud skills only, and the cloud `graphify` skill it offers is too large to install), so for the desktop run `graphify freebuff install` in the repo root, keep `graphify` on your `PATH`, and enable the AGENTS.md option in the composer settings. Typing `/graphify` then still works through that AGENTS.md rule, even though the `/` menu does not autocomplete it. OpenClaw and 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, so AGENTS.md is the always-on mechanism.

`--platform agents` (alias `--platform skills`) targets the generic cross-framework [Agent-Skills](https://github.com/anthropics/skills) locations: the spec's user-global `~/.agents/skills/` (read by `npx skills` and spec-compliant frameworks) for a global install, and `./.agents/skills/` for a project (`--project`) install. The bare `graphify install` stays single-platform (Claude Code) by design: use the named `agents` platform when you want the skill discoverable by any framework that reads `.agents/skills`.

Expand Down
45 changes: 38 additions & 7 deletions graphify/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@
_cursor_uninstall,
_devin_rules_install,
_devin_rules_uninstall,
_freebuff_install,
_freebuff_uninstall,
_gemini_hook,
_install_claude_hook,
_install_codebuddy_hook,
Expand Down Expand Up @@ -280,9 +282,15 @@ def _refresh_stale_skills() -> None:
warning still fires for them:

* a stamp NEWER than the package - installing would downgrade it (#1568);
* a directory written by more than one installer (gemini + agents on
Windows, copilot + ``graphify vscode install``) - the stamp does not
record which variant is there, and guessing would swap it.
* a directory written by installers that ship DIFFERENT bytes (copilot +
``graphify vscode install``) - the stamp does not record which variant is
there, and guessing would swap it.

A directory written by several installers that all resolve to the same
packaged bundle (``agents`` + ``freebuff``, which share the Agent-Skills
skill and references) is NOT ambiguous, because refreshing writes identical
bytes whichever name does it; that one is refreshed, using the sorted-first
platform name as a stable representative.

Directories are grouped by their resolved path, so two platforms sharing
one directory through a symlink count as shared too.
Expand Down Expand Up @@ -320,9 +328,12 @@ def _refresh_stale_skills() -> None:
real = skill_dst
writers.setdefault(real, []).append((name, skill_dst))
for entries in writers.values():
if len(entries) != 1 or entries[0][0] == "vscode":
continue
name, skill_dst = entries[0]
if any(name == "vscode" for name, _dst in entries):
continue # vscode's skill is its own installer's, never _copy_skill_file's
if len({_skill_bundle(name) for name, _dst in entries}) != 1:
continue # different packaged bytes at one path: leave it to the warning
# Sorted-first name keeps the pick stable however the candidate list moves.
name, skill_dst = sorted(entries, key=lambda entry: entry[0])[0]
if _stale_stamp(skill_dst) is None:
continue
# Without waiting: when another process holds the directory (a refresh,
Expand Down Expand Up @@ -357,13 +368,29 @@ def _skill_platforms() -> list[str]:
return list(dict.fromkeys([*_PLATFORM_CONFIG, "gemini"]))


def _skill_bundle(name: str) -> tuple[str, str | None]:
"""The packaged bytes a platform installs: its skill file + references bundle.

Equal keys mean ``_copy_skill_file`` writes identical content, so several
platforms sharing one directory under the same key are safe to refresh with
any one of them. ``vscode`` installs through its own installer and is never
refreshed here, so it gets a key that can only match itself.
"""
if name == "vscode":
return (name, None)
if name == "gemini":
return ("skill.md", "claude")
cfg = _PLATFORM_CONFIG[name]
return (cfg["skill_file"], cfg.get("skill_refs"))


def _refresh_one_skill(name: str, skill_dst: Path, installed: str) -> None:
"""Re-copy one platform's skill and report it in one line on stderr."""
backup = skill_dst.with_suffix(skill_dst.suffix + ".bak")
captured = io.StringIO()
try:
with contextlib.redirect_stdout(captured):
_copy_skill_file(name)
_copy_skill_file(name, record_platform=False)
except (Exception, SystemExit) as exc:
# _copy_skill_file exits on a broken package (after printing why);
# a refresh must never take the user's actual command down with it.
Expand Down Expand Up @@ -1057,6 +1084,10 @@ def _run_cli() -> None:
print(" aider uninstall remove graphify section from AGENTS.md")
print(" amp install copy graphify skill + write AGENTS.md section (Amp)")
print(" amp uninstall remove graphify skill + AGENTS.md section (Amp)")
print(
" freebuff install copy graphify skill to ~/.agents/skills + write AGENTS.md section (Freebuff)"
)
print(" freebuff uninstall remove graphify skill + AGENTS.md section (Freebuff)")
print(
" copilot install copy graphify skill to ~/.copilot/skills (GitHub Copilot CLI)"
)
Expand Down
Loading
Loading