Skip to content

feat(install): add CodeBuddy Code CLI platform support#584

Closed
chuckiefan wants to merge 7 commits into
tirth8205:mainfrom
chuckiefan:feature_support-codebuddy
Closed

feat(install): add CodeBuddy Code CLI platform support#584
chuckiefan wants to merge 7 commits into
tirth8205:mainfrom
chuckiefan:feature_support-codebuddy

Conversation

@chuckiefan

Copy link
Copy Markdown
Contributor

Summary

Adds codebuddy as a new platform to code-review-graph install --platform <name>, supporting the CodeBuddy Code CLI (Tencent's Claude Code–style terminal tool). The IDE product form is intentionally out of scope — it has no file-system config entry point.

Running code-review-graph install --platform codebuddy now produces:

  • <repo>/.mcp.json — MCP server entry (shared with claude; format is identical)
  • <repo>/CODEBUDDY.md — startup instructions (reuses _CLAUDE_MD_SECTION)
  • <repo>/.codebuddy/skills/<slug>/SKILL.md — 4 skills (explore / review / debug / refactor)
  • <repo>/.codebuddy/settings.jsonPostToolUse + SessionStart hooks (same schema as Claude)

Implementation notes

  • Data-driven extension. codebuddy added to PLATFORMS and _PLATFORM_INSTRUCTION_FILES; no special-case branching in install loop.
  • Refactor: _merge_hooks_into_settings extraction. Pulled backup + dedup-merge + write logic out of install_hooks (Claude) so install_codebuddy_hooks can reuse it. External API install_hooks(repo_root, platform="claude") -> None unchanged; 53 hooks regression tests pass.
  • Dedup in install_platform_configs. Since claude and codebuddy share <repo>/.mcp.json, --platform all previously wrote the file twice. Now the first platform wins the physical write; all sharing platforms are credited in configured.
  • Out of scope. User-level ~/.codebuddy/settings.json (enabledMcpjsonServers) is not auto-written — it affects every project.

Design & plan

  • Spec: docs/superpowers/specs/2026-06-25-codebuddy-platform-support-design.md
  • Plan: docs/superpowers/plans/2026-06-25-codebuddy-platform-support.md

Test plan

  • uv run pytest tests/ — 1293 passed, 1 skipped, 2 xpassed (no regressions)
  • uv run ruff check code_review_graph/ — clean
  • uv run mypy code_review_graph/ — clean (60 source files)
  • Manual smoke test: install --platform codebuddy produces all 4 expected artifacts
  • Manual dedup test: install --platform all writes .mcp.json exactly once while crediting both Claude Code and CodeBuddy Code
  • Per-task TDD reviews all approved (6 commits, base 0c9a5ff..head 09270d4)

@itxaiohanglover

Copy link
Copy Markdown

Clean addition! CodeBuddy support follows the existing platform install pattern. The skills and hooks installation matches the structure used for other platforms.

@tirth8205

Copy link
Copy Markdown
Owner

Thanks — the CodeBuddy integration points match the current official CLI contracts, so we want to carry this feature. This branch now overlaps substantial installer and skills changes on main, and its workflows never executed.

We are porting it onto the current installer while retaining JSONC-aware merge safeguards and runtime-resolved Bash hooks, narrowing deduplication for the shared Claude/CodeBuddy .mcp.json contract, and adding current-main tests and user documentation. Attribution will be preserved; no further action is required from you.

@chuckiefan

Copy link
Copy Markdown
Contributor Author

Thanks for carrying this forward! I understand the installer and skills layout has shifted since I opened this, so reworking it onto current main makes sense. Happy to review the ported version or answer any questions if that helps. Glad CodeBuddy support is landing.

tirth8205 added a commit that referenced this pull request Jul 17, 2026
Port the viable CodeBuddy integration from PR #584 onto the current JSONC-safe installer, with narrow shared-config deduplication, runtime-resolved hooks, current tests, and user documentation.

Co-Authored-By: Chuckiefan <chuckiefan@163.com>
@tirth8205

Copy link
Copy Markdown
Owner

Completed through replacement PR #633, merged as 976d0bf with Chuckiefan attribution. The current-main port uses CodeBuddy's official project .mcp.json/mcpServers contract, CODEBUDDY.md, uppercase per-skill SKILL.md files, and .codebuddy/settings.json hooks. It preserves JSONC/user settings, deduplicates only the exact Claude/CodeBuddy shared contract, and resolves hook repositories at runtime instead of embedding an install-machine path. The rebased 1,496-test suite and all 11 GitHub checks, including Windows-native, passed. I am closing this stale source only because the credited replacement is merged; no further contributor action is needed.

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.

3 participants