Skip to content

feat(install): add Freebuff platform support - #5381

Open
cobblecop wants to merge 15 commits into
Graphify-Labs:v8from
cobblecop:feat/freebuff-support
Open

cobblecop wants to merge 15 commits into
Graphify-Labs:v8from
cobblecop:feat/freebuff-support

Conversation

@cobblecop

Copy link
Copy Markdown

What does this PR do?

Adds Freebuff (freebuff.com, the Codebuff runtime) as a first-class Graphify platform. Freebuff reads Agent-Skills from ~/.agents/skills /
./.agents/skills and has no hook API, so instead of forking a body it installs the generic agents bundle and uses AGENTS.md as its always-on
channel.

Commits (the refactor is separate so the host-neutral wording, which regenerates every task-tool-disk host's SKILL.md, can be reviewed or dropped
independently):

  • 971fbef3 feat(install): add Freebuff platform support
  • 7109153d refactor(skillgen): make the disk dispatch host-neutral
  • 09e96444 docs(install): note how to wire Freebuff desktop

Type of change

  • Bug fix
  • New feature
  • Documentation
  • Tests or CI
  • Refactor
  • Security fix

Verification & Invariants

The invariant: two platform names may share one skill directory only when they install byte-identical packaged content — then a refresh cannot
swap variants, and the stale-skill refresh can rewrite it. Different bundles at one path must stay untouched (the stamp cannot say which is
installed).

Proof:

  • _copy_skill_file output is compared byte-for-byte between freebuff and agents
    (test_installed_skill_bytes_match_the_packaged_agents_bundle), and the destinations are asserted equal for global and project scope.

  • The refresh tests cover all three directions: same-bundle shared path → refreshed (0.0.1 → 0.9.114, also measured by hand); different bundles
    at one real path (symlink) → untouched, version warning preserved; vscode → still never refreshed.

  • Generated artifacts are reproducible from fragments (tools.skillgen run produces no diff), so nothing hand-edited is embedded.

  • Persisted state affected: ~/.agents/skills/graphify/ and a project's AGENTS.md. Both are existing Graphify-owned artifacts; the PR adds no
    new destination.

  • Read the CONTRIBUTING.md guide.

  • Reproduced the issue and identified the invariant. (graphify install --platform freebuff and graphify freebuff install did not exist;
    an --platform agents install was skipped forever once a second name resolved to the same directory.)

  • Made the smallest fix necessary. (Share the existing bundle rather than add a forked body; the dispatch wording had to become
    host-neutral to be usable on a host without Task or a writer agent.)

  • Added a regression test (if bug fix) or isolated boundary test. (tests/test_freebuff_platform.py, 13 cases; 2 auto-refresh cases.
    Verified they fail on pristine b582ad40: 13 failed.)

  • Kept the PR description synchronized with the final implementation.

  • Documented any limitations / unsupported cases explicitly (below).

How was this tested?

Environment: Linux, repo venv, throwaway HOMEs for install paths.

uv run python -m tools.skillgen --check            -> OK, 134 artifacts
uv run python -m tools.skillgen --audit-coverage   -> OK
uv run python -m tools.skillgen                    -> no diff (committed == generated)
uv run pytest tests/                               -> 11,776 passed, 122 skipped, 1 xfailed,
                                                      1 pre-existing flaky watch test
                                                      (reproduced on pristine upstream/v8)
uv run pytest <6 affected suites>                  -> 309 passed, 1 skipped
uv run ruff check .                                -> clean
uv run pyright                                     -> 772 errors, identical count on a pristine
                                                      worktree (pre-existing; not used as a gate)
HOME=$(mktemp -d) graphify install --platform freebuff   -> skill only, no AGENTS.md
HOME=$(mktemp -d) graphify freebuff install              -> skill + "## graphify" AGENTS.md
auto-refresh by hand: 0.0.1 stamp + agents+freebuff  -> "refreshed 0.0.1 -> 0.9.114"
auto-refresh control: claude+agents at one real path -> not refreshed (warning kept)

Live Freebuff checks: the CLI loads the installed skill and queries an existing graph; the desktop app (0.0.204) reads the AGENTS.md rules, runs
graphify and rebuilds a graph; on a fresh clone /graphify . built 864 nodes / 1,889 edges / 51 communities (49 code files AST + 4 docs via the
local gemini CLI backend).

Graphify-specific checklist

  • I updated generated skill artifacts (uv run python -m tools.skillgen --bless) when changing their source fragments.
  • I confirmed that AST/structural extraction remains deterministic. (No extraction code touched; the only ordering change is a sorted() pick
    of the refresh representative, so results do not depend on dict/platform order.)
  • I reviewed changes for security implications. (Local file writes only, no new network path, no shell interpolation, no shell=True; refresh
    rewrites only directories whose writers ship identical bytes, and symlink resolution is used for grouping, never to widen writes.)
  • I confirmed no API keys or local-only graph data are included.
  • (If applicable) I disclosed AI authorship in my commit messages (Co-Authored-By: Freebuff CLI (Codebuff runtime)).

Limitations / unsupported cases

  • No hook API: AGENTS.md is always-on only.
  • Freebuff desktop does not load local skill directories (measured): its / menu lists cloud skills only, and the cloud graphify skill
    cannot install (the app caps cloud skill instructions at 50,000 chars; skill-agents.md is 51,521). Desktop works through the AGENTS.md section plus
    a graphify CLI reachable from the session — typing /graphify works via that rule.
  • --project installs (both forms) are skill-only, parity with --platform agents.
  • ~/.agents/skills/graphify is shared with --platform agents: uninstalling either removes that directory.
  • Other hosts see one wording change: the Step B3 re-run hint now names the tool per host instead of assuming Task/general-purpose; Claude
    keeps its explicit subagent_type="general-purpose", and pi-subagents keeps its existing delegate wording.
  • Free-tier subagents cannot write chunk files, so the serial fallback is the documented path there.
  • docs/translations/README.*.md not updated (the repo handles translations separately).
  • Deferred to a follow-up: an always-on rule telling agents to offer graphify . --code-only when no graph exists (affects every AGENTS.md
    host).

@github-actions github-actions Bot added the needs:title PR title should follow the conventional-commit format label Nov 21, 2026
@github-actions

Copy link
Copy Markdown

Thanks @cobblecop! One small thing: our changelog and release notes are built from PR titles, so we use the conventional-commits format, for example:

fix(python): resolve a bare stdlib import correctly

Prefixes we use: feat, fix, docs, chore, refactor, test, perf, build, ci. Editing the PR title clears this automatically. This is just a nudge and does not block review.

@github-actions

Copy link
Copy Markdown

Thanks for the pull request, @cobblecop. A maintainer will review it soon.

Want to talk it through while it is in review? Come join us on our Discord server. For longer-form discussion there is also GitHub Discussions.

A couple of things that speed up review: make sure the test suite passes on Python 3.11 and 3.13, and that the change keeps extraction deterministic.

@graphify-labs graphify-labs Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Graphify review View in Graphify

Review before merging · Merge confidence 4/5

1 bug · 9 possible issues to check · High impact

The installer adds Freebuff and records which platforms and projects share installed skills and AGENTS.md sections.

P2  Uninstall can remove AGENTS.md rules still used by older installs · install.py:2422

9 possible issues we couldn't confirm
  • Hosts on the default writer hint are offered Task, an Agent tool, and spawn_agents together, though not every host has all three · tools/skillgen/gen.py:570
  • Amp, Antigravity and other different-bundle installs at a shared .agents/skills path leave no claim, so uninstalling agents can delete t · graphify/install.py:479
  • graphify uninstall --project hides the 'nothing to remove' message for agents and freebuff even when neither has anything installed · graphify/install.py:2649
  • +6 more in Graphify

They don't change the score.

What this review covered
  • We didn't review 31 files that aren't source code, such as docs, config, images, or generated or third-party code.
  • Some lookups asked for files or lines that do not exist; the review was told and carried on.
  • One review pass used all of its turns for reading code, so it reported from what it had already read.
  • 7 of 7 changed files inspected. This is scope, not a correctness guarantee.
Code graph · 2346 functions depend on this change
  • 8 functions became more coupled. Largest: main() (130 callers), _refresh_stale_skills() (26 callers), _copy_skill_file() (19 callers).
  • 621 of 621 test files are affected by this change.
  • Gate, test list and every flagged function: in the Graphify check.

Reviewed b27e288 · 11 earlier findings not re-checked · Full report in the Graphify check

@cobblecop cobblecop changed the title Feat/freebuff support feat(install): add Freebuff platform support Nov 21, 2026
@cobblecop

Copy link
Copy Markdown
Author

Pushed 8fe47a8, which addresses the three findings that were listed.

tests/test_freebuff_platform.py:52 — shared destination only compared paths

test_shared_destination_installs_identical_bytes now installs through both
names into separate clean HOMEs (user scope and --project) and compares the
whole installed tree byte for byte — SKILL.md, references/, and the version
stamp. A divergence in artifact, references or stamp fails the test, so the
path-only assertion can no longer hide it.

graphify/install.py:2207 — global uninstall removes the shared skill

Uninstall now says what it did instead of silently taking out a second
platform's install:

    skill removed    ->  ~/.agents/skills/graphify/SKILL.md
    shared path      ->  ~/.agents/skills/graphify is also the `agents` install target; removed for it as well

The note is limited to platforms that install identical bytes, so unrelated
platforms that happen to resolve to ./.agents/skills (amp, antigravity,
antigravity-windows) are not misreported.

graphify/install.py:2282 — --project uninstall of the same directory

Same note for the project scope, naming only agents. A bare
graphify uninstall passes report_shared=False, so a full teardown stays
quiet.

Verification

  • pytest tests/test_freebuff_platform.py → 16 passed (3 new: byte-equality
    for both scopes, global and project shared-path notes)
  • pytest across the 11 install / refresh / skillgen suites → 405 passed, 1 skipped
  • full suite → 11,781 passed, 122 skipped, 1 xfailed
  • python -m tools.skillgen --check → OK (134 artifacts); ruff check . → clean
  • install + uninstall for all 23 platform names in isolated HOMEs → 0 failures,
    so the new note cannot disturb another host's teardown

On the remaining findings

The other 8 issues aren't visible from my side. If they still reproduce after this push, could you paste the
file:line list here and I'll triage them in this PR?

Comment thread graphify/install.py Resolved
Comment thread graphify/install.py Resolved
cobblecop and others added 7 commits November 23, 2026 19:18
Freebuff (freebuff.com, the Codebuff runtime) discovers Agent-Skills from
~/.agents/skills and ./.agents/skills and has no hook API, so it installs the
generic `agents` bundle instead of a forked body. Identical bytes at the shared
destination are what keep the stale-skill refresh working: Graphify-Labs#2800 is the opposite
case, two DIFFERENT bundles at one path.

- `graphify install --platform freebuff` and `graphify freebuff install|uninstall`
  (skill plus AGENTS.md, the only always-on mechanism Freebuff has)
- `_refresh_stale_skills` refreshes a directory written by platforms that resolve
  to the same packaged bundle (sorted-first representative) and still skips one
  written by installers with different bundles
- the agents hooks reference names `graphify freebuff install` as the sibling
  command, the pattern trae uses for trae-cn
- README platform table, an Unreleased CHANGELOG entry, and tests
  (tests/test_freebuff_platform.py, auto-refresh same-bundle cases)

Verified: `graphify install --platform freebuff` and `graphify freebuff install`
in throwaway HOMEs, live Freebuff session loads the skill and queries an existing
graph, agents+freebuff refresh 0.0.1 -> 0.9.114, claude+agents at one real path
still skipped.

Co-Authored-By: Freebuff CLI (Codebuff runtime) <noreply@codebuff.com>
The shared `task-tool-disk` dispatch named Claude's `Task` tool as the way to
launch parallel extraction subagents, which hosts without that tool cannot
follow, and it had no path for hosts whose subagents cannot write files (the
Freebuff free tier spawns only read-only helpers). Name the CRC: the tool is
now `Task`, an `Agent` tool, or Freebuff's `spawn_agents`; the writer hint asks
for a subagent that can write to disk; and a serial in-context fallback keeps
the same chunk files when no such agent is spawnable.

Headings are unchanged, so `--audit-coverage` still holds, and the two pinned
assertions keep their intent: claw still must not pick up Codex/OpenClaw
mechanics, and pi still must not name `general-purpose`.

Regenerated with `python -m tools.skillgen --bless`. No behaviour change for
hosts that already had a writer subagent.

Co-Authored-By: Freebuff CLI (Codebuff runtime) <noreply@codebuff.com>
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. Measured on 0.0.204: a `--project` skill alone is invisible to sessions
(the model treated .agents/skills/graphify as unrelated tooling), while the
`## graphify` AGENTS.md section is read when the composer's AGENTS.md option is
on, and graphify commands work once the CLI is on PATH.

Document that route in the README paragraph and the Unreleased entry, next to
the existing "no hook API, so AGENTS.md is the always-on mechanism" sentence.

Co-Authored-By: Freebuff CLI (Codebuff runtime) <noreply@codebuff.com>
The Freebuff and Agent-Skills platforms install one directory, so removing
either deletes the other platform's skill. Say so instead of silently taking
out a second install, and compare the installed trees byte for byte in the
shared-destination test so a path-only assertion cannot hide divergence.
…laces

amp, antigravity, antigravity-windows, agents and freebuff all install
./.agents/skills/graphify but ship different bundles, so installing one
silently replaced another host's skill with only a generic "previous copy"
line. Compare the existing SKILL.md against each sharer's packaged skill and
say whose skill is being replaced; identical-byte pairs stay quiet.
Freebuff has no hook API, so the AGENTS.md section is its only always-on
mechanism. `graphify freebuff install --project` now writes the project skill
and that section (existing project instructions are preserved, the section is
replaced in place), and `--project` uninstall removes both.
`install --project --platform freebuff` stays skill-only, matching agents.
Freebuff and the generic Agent-Skills platform write one directory, so
uninstalling either removed the other's skill, references and stamp. Record the
claiming platform in .graphify_platforms (shared destinations only) and drop
just that claim on uninstall; the last claimant removes the directory. The
shared AGENTS.md section is kept while a claim remains. Installs made before the
claim file existed keep the old behavior.
@cobblecop
cobblecop force-pushed the feat/freebuff-support branch from e7273ad to da3ec3b Compare November 23, 2026 14:00
…buff uninstall

`uninstall --project --platform freebuff` only removed the skill, so the
Freebuff rules stayed in AGENTS.md until some other platform's cleanup path
happened to drop them. Route that branch through the section-aware helper (which
still keeps the section while another platform claims the shared directory) and
stop uninstall-all from reporting the second half of the shared pair as
"nothing to remove".
Comment thread graphify/install.py Resolved
…n agents claims the skill

Freebuff is the only platform that writes the project AGENTS.md section
(`agents --project` is skill-only), so a remaining skill claim means an install
that never added those rules. Removing the early return, keeping the skill
itself claim-gated.
…ll claim

A skill claim says who installed the shared directory, not who wrote the section:
`install --platform agents` is skill-only, so a remaining claim could keep rules
that platform never added. Record section writers in .graphify_agents_md next to
the shared skill and keep the section only while another name recorded writing
it, at both user and project scope.
…laim writer

`graphify uninstall` printed "skill kept ... remove it with graphify freebuff
uninstall" and then deleted the same directory later in its own loop; a full
teardown now ignores the claims it is about to drop. All claim files are written
through one os.replace helper, and the changelog entry covers the shared-claim
and project AGENTS.md behavior added after it was written.
Comment thread graphify/install.py Resolved
Comment thread graphify/install.py Resolved
The section claim file sits beside the user-scoped skill, but the AGENTS.md it
describes is per project; recording only the platform name meant an install in
one project kept the section alive in another. Claims now map platform names to
the resolved AGENTS.md paths they wrote, and uninstall releases only the path of
the project it runs in.
_release_section_claim recomputed the surviving claimants inline, which left
_section_claimers unused. Both now agree by construction.
Section claims were recorded only by `agents`/`freebuff`, in one shared
directory, so `graphify freebuff uninstall --project` deleted a section that
`codex`, `aider`, `amp`, `opencode`, `claw`, `droid`, `trae`, `hermes` or
`kilo` had written and still relied on.

Every platform that writes the section now records the AGENTS.md path next to
its own skill, uninstall releases its own claim first, and the section is
deleted only when no remaining claim names that file. Sidecar cleanup
(opencode/kilo plugins) no longer depends on the section being removed.
Comment thread graphify/install.py
Comment on lines +2419 to +2422
# Record who wrote the section before writing it: the claim tells an
# uninstall of another platform whether the rules are still wanted.
skill_dir = _section_claim_dir(platform, project=project, project_dir=project_dir)
if skill_dir.is_dir():

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2  Uninstall can remove AGENTS.md rules still used by older installs

After upgrading, uninstalling Freebuff can remove the shared AGENTS.md section even though another platform is still installed.

Treat existing platform skill directories as claims in _agents_install.

Evidence · checked against the code

Expected: The AGENTS.md section remains while Codex is still installed.
Actually: The legacy Codex skill has no recorded section claim, so Freebuff uninstall can remove the section.

  • Independent source review: Checked the claim scan and uninstall route: the scan consults recorded section claims across platform skill directories, but does not infer a claim from an existing legacy Codex skill. The supplied proposed test creates that legacy skill without a claim, then reaches Freebuff install and uninstall; its assertion exercises the claimed deletion behavior.
Prompt to fix with AI
In graphify/install.py, _agents_install (lines 2419-2422):
Problem: Uninstall can remove AGENTS.md rules still used by older installs
Expected: The AGENTS.md section remains while Codex is still installed.
Actually: The legacy Codex skill has no recorded section claim, so Freebuff uninstall can remove the section.
Fix it at the cause, and add a test that fails without the fix.

Graphify · Checked against the code · View in Graphify

… owns

Claims are only recorded by this release, so a skill directory installed by an
older graphify carries no marker and was invisible to the section cleanup:
`graphify freebuff uninstall --project` deleted a section that a legacy codex
(or aider/amp/opencode/...) install had written and still reads.

A project-scope skill directory of a section-writing platform with no claim file
of any kind now keeps the section and says which install has to go. The scan is
limited to the twelve platforms whose install writes AGENTS.md (claude, copilot
and friends install beside it without touching it) and only runs when the
section is actually present.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs:title PR title should follow the conventional-commit format

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant