You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use OpenCode's tool.execute.before event instead of AGENTS.md #71
Claude Code does two things: writes a CLAUDE.md section telling Claude to read graphify-out/GRAPH_REPORT.md before answering architecture questions, and installs a PreToolUse hook (settings.json) that fires before every Glob and Grep call. ...
Codex, OpenCode, OpenClaw, Factory Droid write the same rules to AGENTS.md in your project root. These platforms don't support PreToolUse hooks, so AGENTS.md is the always-on mechanism.
I'm pretty sure this can be done via OpenCode's plugins system.
Confirmed — OpenCode's tool.execute.before plugin event is the right hook for this. The implementation requires a JavaScript plugin file (.opencode/plugins/graphify.js) and registration in opencode.json. We're tracking this for the next platform integration release. The AGENTS.md approach continues to work in the meantime.
Implemented in the latest commit. Running graphify opencode install now does three things: writes the AGENTS.md section as before, writes .opencode/plugins/graphify.js with a tool.execute.before handler, and registers the plugin in opencode.json. The hook checks for graphify-out/graph.json before each bash call and prepends the graph reminder to the command output so OpenCode sees it in the tool result. Uninstall removes both the plugin file and the opencode.json entry. Thanks for flagging this.
Activity
safishamsi commentedon Apr 8, 2026
Confirmed — OpenCode's
tool.execute.beforeplugin event is the right hook for this. The implementation requires a JavaScript plugin file (.opencode/plugins/graphify.js) and registration inopencode.json. We're tracking this for the next platform integration release. The AGENTS.md approach continues to work in the meantime.Add OpenCode tool.execute.before plugin via graphify opencode install (…
safishamsi commentedon Apr 9, 2026
Implemented in the latest commit. Running graphify opencode install now does three things: writes the AGENTS.md section as before, writes .opencode/plugins/graphify.js with a tool.execute.before handler, and registers the plugin in opencode.json. The hook checks for graphify-out/graph.json before each bash call and prepends the graph reminder to the command output so OpenCode sees it in the tool result. Uninstall removes both the plugin file and the opencode.json entry. Thanks for flagging this.
Add OpenCode tool.execute.before plugin via graphify opencode install (…
Add OpenCode tool.execute.before plugin via graphify opencode install (…