Add CodeBuddy harness support#1975
Open
ups216 wants to merge 1 commit into
Open
Conversation
- Add codebuddy-tools.md tool mapping reference - Add CodeBuddy to SKILL.md Platform Adaptation section - Add CodeBuddy install instructions to README.md - Add CodeBuddy test case to test-session-start.sh - Add docs/codebuddy/plan.md with progress checklist
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.
Who is submitting this PR?
codebuddy --version)--plugin-dirandmarketplace add+plugin installflows)What problem are you trying to solve?
CodeBuddy (Tencent Cloud Code Assistant) is a Claude Code-compatible coding agent with a growing user base, particularly in China. It recognizes
.claude-plugin/plugin.json, setsCLAUDE_PLUGIN_ROOTwhen running plugin hooks, and implements the full Claude Code Hooks spec (includingSessionStartwithhookSpecificOutput.additionalContext). Despite this compatibility, Superpowers had no CodeBuddy entry in the README, no tool mapping, and no test coverage — meaning CodeBuddy users had to reverse-engineer the install process and the agent had no harness-specific tool reference.I verified end-to-end that the existing Claude Code plugin works unmodified on CodeBuddy:
SessionStarthook fires and injects theusing-superpowersbootstrap./skills/brainstormingskill auto-triggers on the acceptance test promptWhat does this PR change?
references/codebuddy-tools.md— tool mapping for CodeBuddy (read_file, write_to_file, replace_in_file, execute_command, search_content, search_file, web_fetch, web_search, task, use_skill, and fallbacks for todos)SKILL.mdPlatform Adaptation section (one-line pointer)README.md(marketplace add + plugin install +--plugin-dirdev mode)tests/hooks/test-session-start.shverifying the nested JSON output shape when bothCODEBUDDY_PLUGIN_ROOTandCLAUDE_PLUGIN_ROOTare setdocs/codebuddy/plan.mddocumenting the full investigation and verification processNo changes to
hooks/session-start,hooks/hooks.json, or.claude-plugin/plugin.json— CodeBuddy setsCLAUDE_PLUGIN_ROOT(alongsideCODEBUDDY_PLUGIN_ROOT), so the existing Claude Code branch in the session-start script fires correctly.Is this change appropriate for the core library?
Yes. This adds support for a new harness (CodeBuddy) following the same pattern as existing harness support (Cursor, Copilot CLI, Codex, etc.). CodeBuddy is a general-purpose coding agent — the tool mapping benefits any CodeBuddy user regardless of their project type. No third-party runtime dependencies are introduced. The change reuses the existing Claude Code plugin infrastructure without modification.
What alternatives did you consider?
.codebuddy-plugin/plugin.json— considered but unnecessary since CodeBuddy recognizes.claude-plugin/plugin.jsondirectly (confirmed empirically). Adding a second manifest would mean duplicate version tracking for no benefit.CODEBUDDY_PLUGIN_ROOTbranch tohooks/session-start— considered but unnecessary since CodeBuddy setsCLAUDE_PLUGIN_ROOTand the output format is identical to Claude Code. The existing branch already handles this correctly.Does this PR contain multiple unrelated changes?
No. All changes are part of a single coherent unit: adding CodeBuddy harness support. The README, SKILL.md, tool mapping, test, and docs are all components of the same feature.
Existing PRs
PR #1500 adds only README install instructions (+15/-1). This PR is a superset that also includes the tool mapping reference (
codebuddy-tools.md), theSKILL.mdPlatform Adaptation pointer, and a test case intest-session-start.sh. Without the tool mapping and SKILL.md pointer, the agent has no harness-specific tool reference and cannot properly resolve skill actions to CodeBuddy tool names.PR #310 proposed an MCP server integration with custom JavaScript code and dependencies. It was closed. This PR takes the opposite approach: zero new code, leveraging CodeBuddy's native Claude Code plugin compatibility.
Environment tested
New harness support
Clean-session transcript for "Let's make a react todo list"
Test environment: CodeBuddy Code v2.117.0, model GLM-5v-Turbo, plugin loaded via
codebuddy --plugin-dir /path/to/superpowersin a tmux interactive session.Smoke check — "What are your superpowers?":
Acceptance test — "Lets make a react todo list":
The
brainstormingskill auto-triggered before any code was written. The model loaded the skill, checked the project state, and began asking clarifying questions — exactly the expected behavior.Also verified via
codebuddy plugin marketplace add+codebuddy plugin install(full install flow, not just--plugin-dir): the plugin installs to~/.codebuddy/plugins/cache/, all 14 skills are discovered, and the SessionStart hook fires. Smoke check passed in that configuration as well.Evaluation
hooks/session-starthook, then plan and implement CodeBuddy harness support followingdocs/porting-to-a-new-harness.md.--plugin-dirsmoke check, (2)--plugin-diracceptance test, (3)marketplace add+plugin installsmoke check. All passed.Rigor
superpowers:writing-skillsand completed adversarial pressure testing (paste results below)--plugin-dir(dev mode) andmarketplace add+plugin install(production install flow); verified hook output JSON shape, skill discovery (14 skills), and acceptance test in interactive tmux sessionsSKILL.mdis adding one line to the Platform Adaptation pointer list, which the porting guide explicitly permitsNo skill behavior-shaping content was modified. The
codebuddy-tools.mdreference file follows the same format ascodex-tools.md,pi-tools.md, andantigravity-tools.md.Human review
The human partner (ups216) reviewed the diff at each phase, manually tested both installation flows (
--plugin-dirandmarketplace add+plugin install), and confirmed the acceptance test passes before requesting PR submission.