feat: add CodeBuddy Code support#1967
Open
studyzy wants to merge 1 commit into
Open
Conversation
Implements rtk-ai#1966 - Add CODEBUDDY_DIR (.codebuddy) and CODEBUDDY_HOOK_COMMAND constants - Add `rtk hook codebuddy` command that reuses Claude Code's PreToolUse JSON protocol (tool_input.command + PreToolUse event) - Add `rtk init -g --agent codebuddy` to install the hook into ~/.codebuddy/settings.json and write ~/.codebuddy/CODEBUDDY.md - Add `rtk init -g --agent codebuddy --uninstall` to remove artifacts - Add AgentTarget::Codebuddy enum variant - Extract patch_settings_json_at() helper for patching settings.json in an arbitrary agent config directory (used by CodeBuddy; avoids hardcoding the Claude config dir) - Add hooks/codebuddy/rtk-awareness.md and hooks/codebuddy/README.md
This was referenced May 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1966
Summary
Adds first-class support for CodeBuddy Code, a Claude-powered AI coding assistant whose config lives in
.codebuddy/.CodeBuddy Code uses the same
PreToolUsehook JSON protocol as Claude Code, so the hook implementation delegates directly to the existingprocess_claude_payloadlogic.Changes
New commands
rtk hook codebuddy— PreToolUse hook processor (reads JSON from stdin, rewritestool_input.command)rtk init -g --agent codebuddy— installs hook into~/.codebuddy/settings.jsonand writes~/.codebuddy/CODEBUDDY.mdrtk init -g --agent codebuddy --uninstall— removes all RTK artifactsFiles changed
src/hooks/constants.rsCODEBUDDY_DIR(.codebuddy) andCODEBUDDY_HOOK_COMMANDconstantssrc/hooks/hook_cmd.rsrun_codebuddy()— delegates toprocess_claude_payloadsrc/hooks/init.rsrun_codebuddy_mode(),uninstall_codebuddy(), andpatch_settings_json_at()helpersrc/main.rsAgentTarget::Codebuddy,HookCommands::Codebuddy, dispatch logichooks/codebuddy/rtk-awareness.md~/.codebuddy/CODEBUDDY.mdhooks/codebuddy/README.mdDesign notes
PreToolUse+tool_input.commandJSON format as Claude Code, sorun_codebuddy()simply callsprocess_claude_payload().patch_settings_json_at(): Extracted a new helper that patchessettings.jsonin an arbitrary directory (instead of hardcoding the Claude config dir). This makes it easy to add future agents with similar config layouts.~/.codebuddy/).Testing