Skip to content

feat(hooks): add WorkBuddy integration - #4236

Open
yeahjack wants to merge 9 commits into
rtk-ai:developfrom
yeahjack:feat/workbuddy-hook
Open

yeahjack wants to merge 9 commits into
rtk-ai:developfrom
yeahjack:feat/workbuddy-hook

Conversation

@yeahjack

@yeahjack yeahjack commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add rtk hook workbuddy and global install, status and uninstall via rtk init -g --agent workbuddy.
  • Build on the shared helpers from refactor(hooks): consolidate hook config I/O #4151. Preserve user hooks and extra tool-input fields, and emit updatedInput without setting permissionDecision.
  • Keep installation global-only. WorkBuddy 5.6.0 reads project .codebuddy/settings.json, shared with CodeBuddy, so this avoids registering competing project hooks.

This follows #3552 and #4151, with prior WorkBuddy work in #2066. It is a standalone WorkBuddy change, not a replacement for CodeBuddy PR #1967. Rebased onto current develop (bf23cff4).

Test plan

  • Formatting, Clippy, full test suite and git diff --check.
  • Baseline Semgrep scan with no new findings.
  • Isolated CLI tests: BOM/empty/malformed settings, dry-run, idempotency, backup failure, scoped uninstall, input metadata and non-rewritable commands.
  • WorkBuddy desktop 5.6.0 E2E: the model requested git status, this adapter returned rtk git status, and the actual tool result contained RTK's compact output.

The desktop E2E used a temporary project hook and the app's existing full-access mode. Global installation is covered by isolated CLI tests; this does not claim global-discovery or default/ask/deny desktop E2E coverage. RTK leaves native approval to WorkBuddy and does not read Claude's permission rules.

Verification update (2026-10-09)

  • 5dc5dae: fail open on invalid UTF-8 or oversized hook input, with regression tests for global paths/overrides and permission isolation.
  • 192f244: merge develop at be8d546 and use its shared test/environment isolation helpers.
  • Local formatting, clippy and full tests passed with isolated writable HOME/XDG directories: 4,311 passed, 8 ignored, including all 11 WorkBuddy tests.
  • CI passed for 192f244, including Linux/macOS/Windows tests, benchmark and Semgrep: https://github.com/rtk-ai/rtk/actions/runs/37971313428

Global config discovery and WorkBuddy's native default/ask/deny desktop behavior remain unverified. The README now includes a reproducible checklist; the earlier project-hook/full-access E2E evidence is unchanged.

@rtk-wshm-sync-bot

Copy link
Copy Markdown

wshm · Automated triage by AI

📊 Automated PR Analysis

✨ Type feature
🟡 Risk medium

Summary

Adds a new WorkBuddy integration (rtk hook workbuddy, plus global install/status/uninstall via rtk init -g --agent workbuddy) that transparently rewrites shell commands for WorkBuddy desktop while preserving user hooks, extra tool-input fields, and leaving approval decisions to WorkBuddy. Installation is global-only since WorkBuddy 5.6.0 shares its project settings file with CodeBuddy.

Review Checklist

  • Tests present
  • Breaking change
  • Docs updated

Analyzed automatically by wshm · This is an automated analysis, not a human review.

@yeahjack

Copy link
Copy Markdown
Contributor Author

Rebased onto develop (45b0b4c3) and resolved the conflicts from the init module split.

WorkBuddy installation and removal now live in src/hooks/init/workbuddy.rs and reuse the shared JSON writer. The PR remains a single WorkBuddy commit.

Validation:

  • Formatting and clippy passed.
  • Full test suite: 4,039 passed, 8 ignored, including 7 WorkBuddy regression tests.
  • Baseline Semgrep: no new findings.

The scope is unchanged: global-only installation, preservation of user settings and input fields, no permissionDecision, and no Claude permission lookup.

Desktop validation remains limited to the previously tested project hook in full-access mode. Global config discovery and default/ask/deny behavior remain unverified.

@yeahjack

Copy link
Copy Markdown
Contributor Author

A gentle follow-up on this WorkBuddy integration. CI is passing on the current revision. When you have a chance, could you take a look? Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant