Skip to content

feat(hooks): add WorkBuddy integration - #2066

Closed
Kayphoon wants to merge 2 commits into
rtk-ai:masterfrom
Kayphoon:codex/workbuddy-integration
Closed

Kayphoon wants to merge 2 commits into
rtk-ai:masterfrom
Kayphoon:codex/workbuddy-integration

Conversation

@Kayphoon

Copy link
Copy Markdown
Contributor

Summary

  • Adds first-class WorkBuddy hook support through rtk init --workbuddy and rtk hook workbuddy.
  • Uses the existing Claude-compatible hook path while writing WorkBuddy-specific settings.

Why

WorkBuddy can call a Claude-compatible PreToolUse hook and uses execute_command in IDE mode, but RTK did not have a dedicated setup or hook command for it.

Changes

  • Adds WorkBuddy CLI parsing and hook dispatch.
  • Adds a WorkBuddy hook adapter that preserves tool input fields and returns both updatedInput and modifiedInput.
  • Writes .workbuddy/settings.json or ~/.workbuddy/settings.json with matcher Bash|execute_command.
  • Adds focused tests for parsing, settings patching, and hook rewrite behavior.

Review Guide

This is intended to stack after #2065 because both integrations share the Claude-compatible hook response helper. GitHub cannot base an upstream PR on a fork-only branch, so this PR temporarily targets master and includes the earlier CodeBuddy commit until #2065 lands. Start with src/main.rs for the new CLI and hook entry points, then review src/hooks/init.rs for the WorkBuddy settings writer.

Verification

  • rtk cargo test workbuddy
  • rtk cargo test codebuddy
  • rtk cargo fmt --all --check
  • rtk cargo clippy --all-targets (exited successfully; existing warnings remain in unrelated dotnet/go/js filter files)
  • rtk cargo test --all (1753 passed, 6 ignored)

Risk

Risk level: Low

Potential impact: Incorrect WorkBuddy settings could make the integration fail to rewrite commands, but the change is opt-in through rtk init --workbuddy.

Rollback plan: Revert this PR to remove the WorkBuddy CLI path, hook adapter, and settings writer.

@rtk-release-bot rtk-release-bot Bot added the wrong-base PR targets master instead of develop label May 24, 2026
@rtk-release-bot

Copy link
Copy Markdown
Contributor

Automatic message from CI checks : It seems like this branch is targeting the wrong branch, any contribution should target develop branch.

See CONTRIBUTING.md for details.

@Kayphoon

Copy link
Copy Markdown
Contributor Author

Closing because this was opened against master before checking the existing CodeBuddy issue/PR context. I will rebuild the WorkBuddy change on top of develop and avoid duplicating #1967.

@Kayphoon Kayphoon closed this May 24, 2026
@yeahjack yeahjack mentioned this pull request Sep 25, 2026
4 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

wrong-base PR targets master instead of develop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant