Repository navigation
Conversation
|
Thanks @cobblecop! One small thing: our changelog and release notes are built from PR titles, so we use the conventional-commits format, for example: Prefixes we use: |
|
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. |
There was a problem hiding this comment.
Graphify review 
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.
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, anAgenttool, andspawn_agentstogether, though not every host has all three ·tools/skillgen/gen.py:570 - Amp, Antigravity and other different-bundle installs at a shared
.agents/skillspath leave no claim, so uninstallingagentscan delete t ·graphify/install.py:479 graphify uninstall --projecthides 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
|
Pushed 8fe47a8, which addresses the three findings that were listed. tests/test_freebuff_platform.py:52 — shared destination only compared pathstest_shared_destination_installs_identical_bytes now installs through both graphify/install.py:2207 — global uninstall removes the shared skillUninstall now says what it did instead of silently taking out a second The note is limited to platforms that install identical bytes, so unrelated graphify/install.py:2282 — --project uninstall of the same directorySame note for the project scope, naming only agents. A bare Verification
On the remaining findingsThe other 8 issues aren't visible from my side. If they still reproduce after this push, could you paste the |
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.
e7273ad to
da3ec3b
Compare
…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".
…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.
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.
| # 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(): |
There was a problem hiding this comment.
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.
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/skillsand has no hook API, so instead of forking a body it installs the genericagentsbundle and usesAGENTS.mdas its always-onchannel.
graphify install --platform freebuff(skill only) andgraphify freebuff install|uninstall(skill +## graphifyAGENTS.md section), globaland
--project._refresh_stale_skillsnow groups writers by resolved path and packaged bundle: a directory written by two names that install identicalbytes (
agents+freebuff) is refreshed again; a directory written by different bundles is still skipped. This avoids the On Windows, gemini and agents share one global skill path (~/.agents/skills/graphify), so installing or uninstalling either one clobbers the other #2800 failure mode (twodifferent bundles at one path overwrite each other) without regressing Package upgrade leaves installed skill stale — version-mismatch warning never reaches the agent that consumes the skill #1805.
task-tool-diskdispatch is host-neutral about the parallel subagent tool (Task, anAgenttool, Freebuff'sspawn_agents) whilekeeping Claude's concrete writer type (
subagent_type="general-purpose"), and gains a serial fallback for hosts with no spawnable file-writing agent— Freebuff has no
Taskand its free tier spawns no writer agent.Commits (the refactor is separate so the host-neutral wording, which regenerates every
task-tool-diskhost's SKILL.md, can be reviewed or droppedindependently):
971fbef3feat(install): add Freebuff platform support7109153drefactor(skillgen): make the disk dispatch host-neutral09e96444docs(install): note how to wire Freebuff desktopType of change
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_fileoutput is compared byte-for-byte betweenfreebuffandagents(
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 bundlesat one real path (symlink) → untouched, version warning preserved;
vscode→ still never refreshed.Generated artifacts are reproducible from fragments (
tools.skillgenrun produces no diff), so nothing hand-edited is embedded.Persisted state affected:
~/.agents/skills/graphify/and a project'sAGENTS.md. Both are existing Graphify-owned artifacts; the PR adds nonew destination.
Read the CONTRIBUTING.md guide.
Reproduced the issue and identified the invariant. (
graphify install --platform freebuffandgraphify freebuff installdid not exist;an
--platform agentsinstall 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
Taskor 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.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 thelocal
geminiCLI backend).Graphify-specific checklist
uv run python -m tools.skillgen --bless) when changing their source fragments.sorted()pickof the refresh representative, so results do not depend on dict/platform order.)
shell=True; refreshrewrites only directories whose writers ship identical bytes, and symlink resolution is used for grouping, never to widen writes.)
Co-Authored-By: Freebuff CLI (Codebuff runtime)).Limitations / unsupported cases
AGENTS.mdis always-on only./menu lists cloud skills only, and the cloudgraphifyskillcannot install (the app caps cloud skill instructions at 50,000 chars;
skill-agents.mdis 51,521). Desktop works through the AGENTS.md section plusa
graphifyCLI reachable from the session — typing/graphifyworks via that rule.--projectinstalls (both forms) are skill-only, parity with--platform agents.~/.agents/skills/graphifyis shared with--platform agents: uninstalling either removes that directory.Task/general-purpose; Claudekeeps its explicit
subagent_type="general-purpose", andpi-subagentskeeps its existingdelegatewording.docs/translations/README.*.mdnot updated (the repo handles translations separately).graphify . --code-onlywhen no graph exists (affects every AGENTS.mdhost).