add Qoder code agent support#2017
Conversation
📝 WalkthroughWalkthroughAdds a new IDE platform code "Qoder" to the platform configuration file with installation metadata including target directory, template type, and skill format settings. Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes 🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
📝 Coding Plan
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment Tip CodeRabbit can use TruffleHog to scan for secrets in your code with verification capabilities.Add a TruffleHog config file (e.g. trufflehog-config.yml, trufflehog.yml) to your project to customize detectors and scanning behavior. The tool runs only when a config file is present. |
There was a problem hiding this comment.
Actionable comments posted: 4
🧹 Nitpick comments (1)
tools/cli/installers/lib/ide/platform-codes.yaml (1)
211-211: Single target path may miss global/user-level Qoder locations.Line 211 uses one repo-local destination only. If Qoder also supports user-level/global skill roots, this config will appear to “work” but not affect actual runtime behavior in common setups.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@tools/cli/installers/lib/ide/platform-codes.yaml` at line 211, The YAML entry sets a single repo-local target_dir (".qoder/skills") which misses user/global Qoder skill locations; update platform-codes.yaml to support multiple targets by allowing target_dir to be a list or adding additional keys for user/global paths (e.g., target_dirs or user_target_dir/global_target_dir) and include the common global/user locations alongside ".qoder/skills" so installers that use target_dir (or the install routine referencing target_dir) will install to all applicable roots.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@tools/cli/installers/lib/ide/platform-codes.yaml`:
- Around line 210-213: The new installer block (installer with target_dir
".qoder/skills", template_type "default", skill_format true) lacks a
legacy_targets list to declare prior install locations, which can leave stale
artifacts on reinstall; update this installer entry to include a legacy_targets
key that enumerates all previous target paths (e.g., old directories where
skills were placed) so the installer logic can detect and remove/migrate those
artifacts during install/uninstall, and ensure any installer handling code reads
legacy_targets when performing cleanup or migration.
- Around line 205-214: Add JSON schema validation to the YAML parsing pipeline
in platform-codes.js so malformed entries (typos in keys like template_type,
category, or wrong boolean types) fail fast before being cached; locate the YAML
parsing function(s) (e.g., parsePlatformCodes / parseYaml) and the cache
variable (platformCodesCache) and validate each parsed entry against a defined
schema (create a validatePlatformCodeSchema function or use ajv) and throw/log a
clear error on validation failure instead of caching the raw object.
- Around line 205-214: Add a unit test in test-installation-components.js that
verifies the newly added 'qoder' platform entry in platform-codes.yaml is
discoverable and has the expected installer fields: target_dir equals
".qoder/skills", template_type equals "default", and skill_format equals true;
follow the existing test pattern in test-installation-components.js (use the
same loader/lookup utilities used by other platform tests to fetch the platform
by code 'qoder' and assert existence and those three properties).
- Around line 211-213: The YAML block that installs skills into the target_dir
(.qoder/skills) lacks an overwrite guard, so reinstallation can clobber
user-edited skills; update the installer config for that entry to include an
explicit skip_existing (or equivalent flag used by the installer) set to true so
existing files in .qoder/skills are preserved, keeping template_type: default
and skill_format: true intact and ensuring the installer honors skip_existing
when copying templates.
---
Nitpick comments:
In `@tools/cli/installers/lib/ide/platform-codes.yaml`:
- Line 211: The YAML entry sets a single repo-local target_dir (".qoder/skills")
which misses user/global Qoder skill locations; update platform-codes.yaml to
support multiple targets by allowing target_dir to be a list or adding
additional keys for user/global paths (e.g., target_dirs or
user_target_dir/global_target_dir) and include the common global/user locations
alongside ".qoder/skills" so installers that use target_dir (or the install
routine referencing target_dir) will install to all applicable roots.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: afac919e-d0b3-4438-9ff4-d2cb97eff5f6
📒 Files selected for processing (1)
tools/cli/installers/lib/ide/platform-codes.yaml
| qoder: | ||
| name: "Qoder" | ||
| preferred: false | ||
| category: ide | ||
| description: "Qoder AI coding assistant" | ||
| installer: | ||
| target_dir: .qoder/skills | ||
| template_type: default | ||
| skill_format: true | ||
|
|
There was a problem hiding this comment.
🛠️ Refactor suggestion | 🟠 Major
Config is being accepted without schema checks; this entry can silently regress.
tools/cli/installers/lib/ide/platform-codes.js currently parses YAML directly and caches it. A typo in this new block (template_type, category, booleans) won’t fail fast. Add schema validation before caching.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tools/cli/installers/lib/ide/platform-codes.yaml` around lines 205 - 214, Add
JSON schema validation to the YAML parsing pipeline in platform-codes.js so
malformed entries (typos in keys like template_type, category, or wrong boolean
types) fail fast before being cached; locate the YAML parsing function(s) (e.g.,
parsePlatformCodes / parseYaml) and the cache variable (platformCodesCache) and
validate each parsed entry against a defined schema (create a
validatePlatformCodeSchema function or use ajv) and throw/log a clear error on
validation failure instead of caching the raw object.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Read-only reconnaissance for existing coverage around platform-codes and qoder.
rg -n -C2 '\bqoder\b|platform-codes\.yaml|loadPlatformCodes|installer' -g '!**/node_modules/**'Repository: bmad-code-org/BMAD-METHOD
Length of output: 50382
🏁 Script executed:
#!/bin/bash
# Focus search on qoder platform
rg -n 'qoder' test/ tools/cli/installers/lib/ide/platform-codes.yamlRepository: bmad-code-org/BMAD-METHOD
Length of output: 215
🏁 Script executed:
#!/bin/bash
# View the qoder entry in platform-codes.yaml
sed -n '205,214p' tools/cli/installers/lib/ide/platform-codes.yaml
# Also look at a similar platform test pattern (e.g., pi which is nearby)
grep -A 15 "test.*pi.*installer" test/test-installation-components.js | head -20Repository: bmad-code-org/BMAD-METHOD
Length of output: 281
🏁 Script executed:
#!/bin/bash
# View the pi test pattern (lines around 1564-1572 from earlier output)
sed -n '1564,1580p' test/test-installation-components.jsRepository: bmad-code-org/BMAD-METHOD
Length of output: 843
🏁 Script executed:
#!/bin/bash
# Verify qoder is NOT tested - check test function count and structure
grep -c "describe\|test\|it(" test/test-installation-components.js | head -1
# Check if there's a pattern like "qoder" anywhere in tests
grep -i "qoder" test/test-installation-components.js || echo "No qoder test found"
# Get count of platform config tests
rg "platformCodes[0-9]+\.platforms\." test/test-installation-components.js | wc -lRepository: bmad-code-org/BMAD-METHOD
Length of output: 94
🏁 Script executed:
#!/bin/bash
# Verify loadPlatformCodes can parse qoder correctly
# Check platform-codes.js to understand how it loads
sed -n '13,32p' tools/cli/installers/lib/ide/platform-codes.js
# Count total platforms in platform-codes.yaml
rg "^ [a-z-]+:" tools/cli/installers/lib/ide/platform-codes.yaml | wc -lRepository: bmad-code-org/BMAD-METHOD
Length of output: 696
🏁 Script executed:
#!/bin/bash
# Verify qoder can be loaded and parsed correctly by simulating what loadPlatformCodes does
node <<'EOF'
const yaml = require('yaml');
const fs = require('fs');
const path = require('path');
const configPath = path.join(process.cwd(), 'tools/cli/installers/lib/ide/platform-codes.yaml');
const content = fs.readFileSync(configPath, 'utf8');
const config = yaml.parse(content);
const qoder = config.platforms.qoder;
if (qoder) {
console.log('✓ qoder platform is discoverable');
console.log(' name:', qoder.name);
console.log(' preferred:', qoder.preferred);
console.log(' category:', qoder.category);
console.log(' installer.target_dir:', qoder.installer?.target_dir);
console.log(' installer.template_type:', qoder.installer?.template_type);
console.log(' installer.skill_format:', qoder.installer?.skill_format);
} else {
console.log('✗ qoder platform not found');
}
EOFRepository: bmad-code-org/BMAD-METHOD
Length of output: 903
🏁 Script executed:
#!/bin/bash
# Use Python to parse YAML and verify qoder configuration
python3 <<'EOF'
import yaml
import sys
with open('tools/cli/installers/lib/ide/platform-codes.yaml', 'r') as f:
config = yaml.safe_load(f)
qoder = config.get('platforms', {}).get('qoder')
if qoder:
print('✓ qoder platform is discoverable and parses correctly')
print(f' name: {qoder.get("name")}')
print(f' preferred: {qoder.get("preferred")}')
print(f' category: {qoder.get("category")}')
installer = qoder.get('installer', {})
print(f' installer.target_dir: {installer.get("target_dir")}')
print(f' installer.template_type: {installer.get("template_type")}')
print(f' installer.skill_format: {installer.get("skill_format")}')
else:
print('✗ qoder platform not found')
sys.exit(1)
EOFRepository: bmad-code-org/BMAD-METHOD
Length of output: 275
Add automated test for qoder platform configuration loading.
The qoder entry in platform-codes.yaml (lines 205-214) is fully configured and discoverable but lacks test coverage. Following the established pattern in test-installation-components.js, add a test function that asserts the platform is discoverable and resolves expected target_dir (.qoder/skills), template_type (default), and skill_format (true) values.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tools/cli/installers/lib/ide/platform-codes.yaml` around lines 205 - 214, Add
a unit test in test-installation-components.js that verifies the newly added
'qoder' platform entry in platform-codes.yaml is discoverable and has the
expected installer fields: target_dir equals ".qoder/skills", template_type
equals "default", and skill_format equals true; follow the existing test pattern
in test-installation-components.js (use the same loader/lookup utilities used by
other platform tests to fetch the platform by code 'qoder' and assert existence
and those three properties).
| installer: | ||
| target_dir: .qoder/skills | ||
| template_type: default | ||
| skill_format: true |
There was a problem hiding this comment.
Add legacy_targets now, not later.
Line 210 introduces a fresh installer block, but no migration cleanup paths are defined. Reinstalls can leave stale artifacts in prior locations and cause duplicate behavior.
Proposed patch
qoder:
name: "Qoder"
preferred: false
category: ide
description: "Qoder AI coding assistant"
installer:
+ legacy_targets:
+ - .qoder/commands
+ - .qoder/command
target_dir: .qoder/skills
template_type: default
skill_format: true🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tools/cli/installers/lib/ide/platform-codes.yaml` around lines 210 - 213, The
new installer block (installer with target_dir ".qoder/skills", template_type
"default", skill_format true) lacks a legacy_targets list to declare prior
install locations, which can leave stale artifacts on reinstall; update this
installer entry to include a legacy_targets key that enumerates all previous
target paths (e.g., old directories where skills were placed) so the installer
logic can detect and remove/migrate those artifacts during install/uninstall,
and ensure any installer handling code reads legacy_targets when performing
cleanup or migration.
| target_dir: .qoder/skills | ||
| template_type: default | ||
| skill_format: true |
There was a problem hiding this comment.
No overwrite guard for user-customized files.
With no explicit skip_existing, reinstall behavior may clobber manually edited Qoder skills in Line 211 target directory. New platform onboarding should default to safer behavior unless explicitly tested.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@tools/cli/installers/lib/ide/platform-codes.yaml` around lines 211 - 213, The
YAML block that installs skills into the target_dir (.qoder/skills) lacks an
overwrite guard, so reinstallation can clobber user-edited skills; update the
installer config for that entry to include an explicit skip_existing (or
equivalent flag used by the installer) set to true so existing files in
.qoder/skills are preserved, keeping template_type: default and skill_format:
true intact and ensuring the installer honors skip_existing when copying
templates.
|
Thanks! |
What
Add new code agent support for Qoder.
Why
Qoder IDE is a kind of new IDE but a good one, need to support it as well.
How
Just add the configuration in the tools/cli/installers/lib/ide/platform-codes.yaml
Testing
Install this manually, get passed.