Skip to content

Add CodeBuddy harness support#1975

Open
ups216 wants to merge 1 commit into
obra:devfrom
ups216:add-codebuddy-harness
Open

Add CodeBuddy harness support#1975
ups216 wants to merge 1 commit into
obra:devfrom
ups216:add-codebuddy-harness

Conversation

@ups216

@ups216 ups216 commented Jul 12, 2026

Copy link
Copy Markdown

Who is submitting this PR?

Field Value
Your model + version GLM-5v-Turbo (via CodeBuddy Code v2.117.0)
Harness + version CodeBuddy Code v2.117.0 (CLI, codebuddy --version)
All plugins installed find-skills, pptx, pdf, docx, xlsx, agent-browser, playwright-cli (all from codebuddy-plugins-official marketplace)
Human partner who reviewed this diff ups216 (reviewed and manually tested both --plugin-dir and marketplace add + plugin install flows)

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, sets CLAUDE_PLUGIN_ROOT when running plugin hooks, and implements the full Claude Code Hooks spec (including SessionStart with hookSpecificOutput.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:

  • SessionStart hook fires and injects the using-superpowers bootstrap
  • All 14 skills are auto-discovered from ./skills/
  • The brainstorming skill auto-triggers on the acceptance test prompt

What does this PR change?

  1. Adds 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)
  2. Adds CodeBuddy to SKILL.md Platform Adaptation section (one-line pointer)
  3. Adds CodeBuddy install section to README.md (marketplace add + plugin install + --plugin-dir dev mode)
  4. Adds a CodeBuddy test case to tests/hooks/test-session-start.sh verifying the nested JSON output shape when both CODEBUDDY_PLUGIN_ROOT and CLAUDE_PLUGIN_ROOT are set
  5. Adds docs/codebuddy/plan.md documenting the full investigation and verification process

No changes to hooks/session-start, hooks/hooks.json, or .claude-plugin/plugin.json — CodeBuddy sets CLAUDE_PLUGIN_ROOT (alongside CODEBUDDY_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?

  1. MCP-based integration (PR feat: Add CodeBuddy MCP integration #310, closed) — adding a custom MCP server. Rejected because Superpowers is zero-dependency by design and CodeBuddy already supports the Claude Code plugin format natively.
  2. Documentation-only PR (PR docs: add CodeBuddy CLI installation section to README #1500, open) — adding only README install instructions. This PR goes further by including the tool mapping reference, SKILL.md pointer, and test coverage, which are needed for the agent to know which tools to use on CodeBuddy.
  3. Creating a .codebuddy-plugin/plugin.json — considered but unnecessary since CodeBuddy recognizes .claude-plugin/plugin.json directly (confirmed empirically). Adding a second manifest would mean duplicate version tracking for no benefit.
  4. Adding a CODEBUDDY_PLUGIN_ROOT branch to hooks/session-start — considered but unnecessary since CodeBuddy sets CLAUDE_PLUGIN_ROOT and 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), the SKILL.md Platform Adaptation pointer, and a test case in test-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

Harness Harness version Model Model version/ID
CodeBuddy Code (CLI, interactive) v2.117.0 GLM-5v-Turbo glm-5v-turbo

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/superpowers in a tmux interactive session.

Smoke check — "What are your superpowers?":

> What are your superpowers?

● I have several superpowers (skills) that help me work more effectively:

  Process Skills (set the approach):
  - brainstorming - Explore user intent before creative work
  - systematic-debugging - Methodical bug diagnosis
  - test-driven-development - Write tests before code
  - writing-plans - Create implementation plans
  - executing-plans - Execute written plans
  - verification-before-completion - Verify before claiming done

  Collaboration Skills:
  - requesting-code-review / receiving-code-review - Code review workflows
  - dispatching-parallel-agents - Run independent tasks in parallel
  - subagent-driven-development - Use agents for implementation plans

  Workflow Skills:
  - using-git-worktrees - Isolated workspace for feature work
  - finishing-a-development-branch - Integrate completed work

  Meta Skills:
  - using-superpowers - This reference guide
  - writing-skills - Create/edit new skills

  Each skill has specific triggers and step-by-step instructions. I invoke them
  automatically when they apply to the task at hand — no need for you to
  remember when to use them.

Acceptance test — "Lets make a react todo list":

> Lets make a react todo list

● Using brainstorming to explore what you need before building.

● Skill(brainstorming)
  ⎿ Skill "brainstorming" loaded. Follow the instructions below to complete it:

● Let me check the current project state.
● Bash(ls -la /tmp/cb-tmux-test/)
  ⎿ total 32 (empty directory)
● The directory is empty — we're starting from scratch. Let me understand
  what you're looking for.

What's the primary purpose of this todo list? Is it a learning project, a
portfolio piece, or something you'll actually use day-to-day?

❯ 1. Basic CRUD only
  2. CRUD + 1-2 extras
  3. Feature-rich
  4. Type something

The brainstorming skill 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

  • Initial prompt: The human partner asked to analyze the hooks/session-start hook, then plan and implement CodeBuddy harness support following docs/porting-to-a-new-harness.md.
  • Eval sessions after the change: 3 sessions total — (1) --plugin-dir smoke check, (2) --plugin-dir acceptance test, (3) marketplace add + plugin install smoke check. All passed.
  • Before/after difference: Before this PR, CodeBuddy users had no install instructions, no tool mapping, and the agent had no harness-specific reference. After this PR, CodeBuddy is listed alongside other supported harnesses, the agent knows which CodeBuddy tools to use for each skill action, and the test suite covers the CodeBuddy env var contract.

Rigor

  • If this is a skills change: I used superpowers:writing-skills and completed adversarial pressure testing (paste results below)
  • This change was tested adversarially, not just on the happy path — tested with both --plugin-dir (dev mode) and marketplace add + plugin install (production install flow); verified hook output JSON shape, skill discovery (14 skills), and acceptance test in interactive tmux sessions
  • I did not modify carefully-tuned content (Red Flags table, rationalizations, "human partner" language) without extensive evals showing the change is an improvement — the only edit to SKILL.md is adding one line to the Platform Adaptation pointer list, which the porting guide explicitly permits

No skill behavior-shaping content was modified. The codebuddy-tools.md reference file follows the same format as codex-tools.md, pi-tools.md, and antigravity-tools.md.

Human review

  • A human has reviewed the COMPLETE proposed diff before submission

The human partner (ups216) reviewed the diff at each phase, manually tested both installation flows (--plugin-dir and marketplace add + plugin install), and confirmed the acceptance test passes before requesting PR submission.

- 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant