Skip to content

Conversation

@jasonwang82
Copy link
Contributor

@jasonwang82 jasonwang82 commented Oct 20, 2025

  • feat: add CodeBuddy Code (CLI) support to configuration and documentation
  • Added CodeBuddy Code (CLI) to the AI tools configuration in config.ts.
  • Updated the slash command registry to include CodeBuddy Code’s configurator.
  • Documented CodeBuddy Code’s commands in the README.md for better visibility.

This enhances the integration of CodeBuddy Code within the existing toolset and aligns it with the latest product documentation.

  • test: add tests for CodeBuddy Code command file creation and updates
  • Implemented tests to verify the creation of CodeBuddy Code slash command files with appropriate templates.
  • Added checks to ensure existing CodeBuddy Code command files are refreshed correctly during updates.
  • Confirmed that missing command files are not created during the update process.

These changes enhance the test coverage for CodeBuddy Code integration and ensure proper functionality of command file management.

Summary by CodeRabbit

  • New Features

    • CodeBuddy is now available as a natively supported AI tool with dedicated slash commands.
    • Users can utilize CodeBuddy with AGENTS.md-compatible workflows.
  • Documentation

    • Updated initialization and setup instructions to include CodeBuddy as a natively supported tool.
    • Updated compatibility notes to reflect CodeBuddy support.

@jasonwang82 jasonwang82 requested a review from TabishB as a code owner October 20, 2025 15:31
@TabishB
Copy link
Contributor

TabishB commented Oct 21, 2025

@jasonwang82 I'm an idiot, I thought this was for integration with this codebuddy: https://www.codebuddy.com/ and I was really confused. There's like 3 different codebuddys out there.

Anyways the change is fine thanks for adding tests, can you fix the merge conflicts thanks, happy to approve after.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

Walkthrough

CodeBuddy is integrated as a new AI tool option by adding its configuration to the core config, creating dedicated configurator classes for both tool setup and slash commands, registering these in their respective registries, and updating documentation to reflect its availability.

Changes

Cohort / File(s) Summary
Documentation
README.md
Added CodeBuddy to the native slash-command tools section with its commands and workflow references; updated initialization instructions and flexible-tool recommendations to include CodeBuddy.
Core Configuration
src/core/config.ts
Inserted CodeBuddy option into the AI_TOOLS list with metadata (name, value, availability, successLabel).
Tool Configurators
src/core/configurators/codebuddy.ts, src/core/configurators/registry.ts
Created CodeBuddyConfigurator class implementing template fetching and file-marker-based updates; registered configurator in ToolRegistry.
Slash Command Configurators
src/core/configurators/slash/codebuddy.ts, src/core/configurators/slash/registry.ts
Created CodeBuddySlashCommandConfigurator with FILE_PATHS and FRONTMATTER mappings for proposal, apply, and archive commands; registered in SlashCommandRegistry.
Test Coverage
test/core/init.test.ts, test/core/update.test.ts
Added initialization tests verifying slash command file creation and reconfiguration detection; added update tests for file refresh and selective file creation patterns.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

The changes span multiple cohorts with consistent patterns (tool registration, configurator implementation, test mirroring), but each area requires distinct reasoning for correctness—particularly validating the configurator interface implementations, registry integrations, and test scenarios against existing tool patterns.

Poem

🐰 Hippity-hop, CodeBuddy's here,
In configs and registries, crystal clear,
Slash commands configured, templates aligned,
Tests ensure the patterns are fine,
Welcome aboard, friend so new! 🎉

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The PR title "feat: add CodeBuddy Code support to configuration and documentation" accurately reflects the primary objective of the changeset. The changes span adding CodeBuddy to the AI tools configuration (config.ts), registering its configurators in the registry files, creating new configurator classes to handle CodeBuddy initialization and slash commands, updating documentation in README.md, and adding comprehensive tests. The title is concise, specific, and avoids vague terminology or noise, making it clear to teammates that this PR introduces CodeBuddy Code as a newly supported tool across the configuration and documentation layers.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

@TabishB
Copy link
Contributor

TabishB commented Oct 21, 2025

@coderabbitai configuration

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 21, 2025

CodeRabbit configuration
language: en-US
tone_instructions: ''
early_access: false
enable_free_tier: true
reviews:
  profile: chill
  request_changes_workflow: false
  high_level_summary: true
  high_level_summary_placeholder: '@coderabbitai summary'
  high_level_summary_in_walkthrough: false
  auto_title_placeholder: '@coderabbitai'
  auto_title_instructions: ''
  review_status: true
  commit_status: true
  fail_commit_status: false
  collapse_walkthrough: false
  changed_files_summary: true
  sequence_diagrams: true
  estimate_code_review_effort: true
  assess_linked_issues: true
  related_issues: true
  related_prs: true
  suggested_labels: true
  labeling_instructions: []
  auto_apply_labels: false
  suggested_reviewers: true
  auto_assign_reviewers: false
  in_progress_fortune: true
  poem: true
  path_filters: []
  path_instructions: []
  abort_on_close: true
  disable_cache: false
  auto_review:
    enabled: true
    auto_incremental_review: true
    ignore_title_keywords: []
    labels: []
    drafts: false
    base_branches: []
    ignore_usernames: []
  finishing_touches:
    docstrings:
      enabled: true
    unit_tests:
      enabled: true
  pre_merge_checks:
    docstrings:
      mode: warning
      threshold: 80
    title:
      mode: warning
      requirements: ''
    description:
      mode: warning
    issue_assessment:
      mode: warning
    custom_checks: []
  tools:
    ast-grep:
      rule_dirs: []
      util_dirs: []
      essential_rules: true
      packages: []
    shellcheck:
      enabled: true
    ruff:
      enabled: true
    markdownlint:
      enabled: true
    github-checks:
      enabled: true
      timeout_ms: 90000
    languagetool:
      enabled: true
      enabled_rules: []
      disabled_rules: []
      enabled_categories: []
      disabled_categories: []
      enabled_only: false
      level: default
    biome:
      enabled: true
    hadolint:
      enabled: true
    swiftlint:
      enabled: true
    phpstan:
      enabled: true
      level: default
    phpmd:
      enabled: true
    phpcs:
      enabled: true
    golangci-lint:
      enabled: true
    yamllint:
      enabled: true
    gitleaks:
      enabled: true
    checkov:
      enabled: true
    detekt:
      enabled: true
    eslint:
      enabled: true
    flake8:
      enabled: true
    rubocop:
      enabled: true
    buf:
      enabled: true
    regal:
      enabled: true
    actionlint:
      enabled: true
    pmd:
      enabled: true
    clang:
      enabled: true
    cppcheck:
      enabled: true
    semgrep:
      enabled: true
    circleci:
      enabled: true
    clippy:
      enabled: true
    sqlfluff:
      enabled: true
    prismaLint:
      enabled: true
    pylint:
      enabled: true
    oxc:
      enabled: true
    shopifyThemeCheck:
      enabled: true
    luacheck:
      enabled: true
    brakeman:
      enabled: true
    dotenvLint:
      enabled: true
    htmlhint:
      enabled: true
    checkmake:
      enabled: true
    osvScanner:
      enabled: true
chat:
  art: true
  auto_reply: true
  integrations:
    jira:
      usage: auto
    linear:
      usage: auto
knowledge_base:
  opt_out: false
  web_search:
    enabled: true
  code_guidelines:
    enabled: true
    filePatterns: []
  learnings:
    scope: auto
  issues:
    scope: auto
  jira:
    usage: auto
    project_keys: []
  linear:
    usage: auto
    team_keys: []
  pull_requests:
    scope: auto
  mcp:
    usage: auto
    disabled_servers: []
code_generation:
  docstrings:
    language: en-US
    path_instructions: []
  unit_tests:
    path_instructions: []

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (4)
README.md (1)

94-95: Use “CodeBuddy Code (CLI)” and link docs to avoid brand confusion.

Rename the tool label and add links as hinted in PR to distinguish from codebuddy.com.

-| **CodeBuddy** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.codebuddy/commands/`) |
+| **CodeBuddy Code (CLI)** | `/openspec:proposal`, `/openspec:apply`, `/openspec:archive` (`.codebuddy/commands/`) — see docs |
+
+Docs: https://www.codebuddy.ai/cli · https://cnb.cool/codebuddy/codebuddy-code
- You'll be prompted to pick any natively supported AI tools (Claude Code, CodeBuddy, Cursor, OpenCode, etc.);
+ You'll be prompted to pick any natively supported AI tools (Claude Code, CodeBuddy Code, Cursor, OpenCode, etc.);
-**Note:** Tools with native slash commands (Claude Code, CodeBuddy, Cursor, Codex) can use the shortcuts shown.
+**Note:** Tools with native slash commands (Claude Code, CodeBuddy Code, Cursor, Codex) can use the shortcuts shown.
-4. **Stay flexible** – Different teammates can use Claude Code, CodeBuddy, Cursor, or any AGENTS.md-compatible tool while sharing the same specs.
+4. **Stay flexible** – Different teammates can use Claude Code, CodeBuddy Code, Cursor, or any AGENTS.md-compatible tool while sharing the same specs.

Also applies to: 145-146, 220-220, 333-333

src/core/config.ts (1)

23-23: Align displayed name with docs: “CodeBuddy Code (CLI)”.

Keeps branding consistent and reduces confusion.

-{ name: 'CodeBuddy', value: 'codebuddy', available: true, successLabel: 'CodeBuddy' },
+{ name: 'CodeBuddy Code (CLI)', value: 'codebuddy', available: true, successLabel: 'CodeBuddy Code' },
test/core/init.test.ts (1)

813-866: Add a test (or skip generation) for top-level CodeBuddy.md.

Init calls ToolRegistry.configure for 'codebuddy', which writes CodeBuddy.md. Either assert its creation or intentionally skip generating it for CodeBuddy if only slash commands are desired.

src/core/configurators/codebuddy.ts (1)

12-21: Don’t reuse the Claude template for CodeBuddy; provide a neutral or CodeBuddy-specific template.

If claudeTemplate contains Claude-specific copy, users will see mismatched instructions in CodeBuddy.md. Create a vendor-agnostic template (or a CodeBuddy-specific one) and use it here. Also consider aligning filename style to peers (e.g., CODEBUDDY.md) for consistency.

Example change:

-    const content = TemplateManager.getClaudeTemplate();
+    // TODO: use a vendor-agnostic or CodeBuddy-specific template
+    const content = TemplateManager.getCodeBuddyTemplate?.() ?? TemplateManager.getClaudeTemplate();

Optional naming tweak:

-  configFileName = 'CodeBuddy.md';
+  configFileName = 'CODEBUDDY.md';
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3ddf258 and 4b37ab8.

📒 Files selected for processing (8)
  • README.md (5 hunks)
  • src/core/config.ts (1 hunks)
  • src/core/configurators/codebuddy.ts (1 hunks)
  • src/core/configurators/registry.ts (2 hunks)
  • src/core/configurators/slash/codebuddy.ts (1 hunks)
  • src/core/configurators/slash/registry.ts (3 hunks)
  • test/core/init.test.ts (1 hunks)
  • test/core/update.test.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2025-10-21T03:05:07.846Z
Learnt from: CR
PR: Fission-AI/OpenSpec#0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.846Z
Learning: Use @/openspec/AGENTS.md to learn the project structure and guidelines

Applied to files:

  • README.md
📚 Learning: 2025-10-21T03:05:07.846Z
Learnt from: CR
PR: Fission-AI/OpenSpec#0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.846Z
Learning: Use @/openspec/AGENTS.md to learn spec format and conventions

Applied to files:

  • README.md
📚 Learning: 2025-10-21T03:05:07.846Z
Learnt from: CR
PR: Fission-AI/OpenSpec#0
File: AGENTS.md:0-0
Timestamp: 2025-10-21T03:05:07.846Z
Learning: Use @/openspec/AGENTS.md to learn how to create and apply change proposals

Applied to files:

  • README.md
🧬 Code graph analysis (6)
src/core/configurators/registry.ts (2)
src/core/configurators/codebuddy.ts (1)
  • CodeBuddyConfigurator (7-23)
src/core/configurators/base.ts (1)
  • ToolConfigurator (1-6)
src/core/config.ts (1)
src/core/init.ts (6)
  • promptForAITools (556-627)
  • tool (413-413)
  • configureAITools (696-719)
  • tool (583-589)
  • formatToolNames (852-867)
  • config (100-367)
test/core/init.test.ts (1)
src/utils/file-system.ts (1)
  • fileExists (76-86)
src/core/configurators/codebuddy.ts (5)
src/core/configurators/base.ts (1)
  • ToolConfigurator (1-6)
src/core/templates/index.ts (1)
  • TemplateManager (13-42)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
src/core/config.ts (1)
  • OPENSPEC_MARKERS (3-6)
src/core/configurators/claude.ts (1)
  • ClaudeConfigurator (7-23)
test/core/update.test.ts (1)
src/utils/file-system.ts (1)
  • FileSystemUtils (44-187)
src/core/configurators/slash/registry.ts (1)
src/core/configurators/slash/codebuddy.ts (1)
  • CodeBuddySlashCommandConfigurator (31-42)
🔇 Additional comments (4)
src/core/configurators/registry.ts (1)

4-4: LGTM: CodeBuddy configurator registered with matching toolId.

Also applies to: 13-13, 18-18

src/core/configurators/slash/registry.ts (1)

3-3: LGTM: CodeBuddy slash configurator plugged into registry.

Also applies to: 21-21, 35-35

test/core/update.test.ts (1)

666-742: Nice parity with other providers; coverage is adequate.

src/core/configurators/slash/codebuddy.ts (1)

4-8: Slash command configurator looks correct and consistent.

Also applies to: 10-29, 31-42

@jasonwang82
Copy link
Contributor Author

@jasonwang82 I'm an idiot, I thought this was for integration with this codebuddy: https://www.codebuddy.com/ and I was really confused. There's like 3 different codebuddys out there.

Anyways the change is fine thanks for adding tests, can you fix the merge conflicts thanks, happy to approve after.

Actually, codebuddy.com is NOT our official website. Official website is https://www.codebuddy.ai which is powered by Tencent. https://www.codebuddy.ai/cli is the terminal style product which is similar with claude code / codex, implemented by ourself. Enjoy have a try.

Now I've finished merged conflict. Thanks a lot.

Copy link
Contributor

@TabishB TabishB left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the addition @jasonwang82

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.

2 participants