fix(opencode): install user-scope skill - #2679
Conversation
There was a problem hiding this comment.
Graphify reviewed this change.
Looks safe to merge — no coupling regressions and no blocking issues, checked against the code graph (not a self-assessment).
Formal verification. 1 change(s) tested, no difference found (not proven).
Graphify review — findings
This PR adds dedicated user-scope install/uninstall handling for the opencode platform in graphify/install.py. It introduces two new functions (_opencode_install and _opencode_uninstall) that copy/remove the skill file and manage the AGENTS.md section, and adds a separate opencode branch in dispatch_install_cli that routes install/uninstall subcommands (with --project support) to either project-scope or the new user-scope handlers, removing opencode from the shared multi-platform branch. The test file adds two new tests covering the user-scope opencode install and opencode uninstall subcommands.
No blocking issues surfaced. 1 lower-confidence candidate did not survive cross-model review.
Analysis details — impact, health, verification
Impact & health
Graphify review
Impact — 462 functions depend on the 277 functions this change touches.
Health — this change adds coupling hotspots:
- worse:
dispatch_install_cli()— 2 callers, 33 callees - worse:
_agents_install()— 7 callers, 6 callees - worse:
_copy_skill_file()— 10 callers, 4 callees - worse:
_agents_uninstall()— 8 callers, 4 callees
Verification — 462 functions in the blast radius were not formally verified this run (proofs are advisory here).
Gate & verification
graphify gate
PASS — objectively clean (no health regressions, tests not run — proofs not run this pass (advisory)). Grounded, not self-assessed.
Advisory (not blocking):
- verification_scope: 404 function(s) in the blast radius were not formally verified this run
Formal verification
No difference found (not proven): No behavior difference found in dispatch\_install\_cli (not a proof).
The verifier ran both versions of dispatch\_install\_cli on many inputs and saw identical behavior every time. Strong evidence the change is safe, but evidence, not a proof.
Guarantee: Empirical: differential testing (both versions run on many generated inputs). A divergence on an untested input remains possible, so this is 'no counterexample found', not 'proven equivalent'.
Note: An input the sampler did not try could still differ.
· 4 more finding(s) on lines outside this diff (see the check run).
Fixes #2670
What
Make the
graphify opencode installsubcommand install Graphify's OpenCode skill at the user-scope location:~/.config/opencode/skills/graphify/SKILL.md.Why
The command previously configured the project integration (
AGENTS.md, plugin, and OpenCode config) but did not copy the skill itself. That left the documented OpenCode user-scope installation incomplete.How
references/content is installed and cleaned up consistently.--projectbehavior.Testing
uv run pytest tests/test_install.py::test_opencode_subcommand_installs_user_scope_skill tests/test_install.py::test_opencode_subcommand_uninstalls_user_scope_skill -quv run ruff check graphify/install.py tests/test_install.pyuv run graphify update .The focused regression tests cover both user-scope installation and cleanup. The complete installer test file reports 89 passing tests; one untouched Windows-only Hermes assertion still expects POSIX path separators.