Add first-class OpenCode support alongside Claude Code#707
Conversation
Makes career-ops fully usable with OpenCode by adding: - OPENCODE.md -- OpenCode config wrapper (imports AGENTS.md, same pattern as CLAUDE.md and GEMINI.md) - .opencode/skills/career-ops/SKILL.md -- symlink to canonical skill at .agents/skills/ - batch-runner.sh -- --cli flag and opencode command case (opencode run instead of claude -p) - doctor.mjs -- mentions both claude and opencode in completion message - package.json -- CLI-agnostic description, added opencode keyword - update-system.mjs -- tracks OPENCODE.md and .opencode/skills/ as system-layer paths - test-all.mjs -- validates OPENCODE.md and .opencode/skills/ exist in data contract - DATA_CONTRACT.md -- documents OPENCODE.md and .opencode/skills/ in system layer - .gitignore -- opencode local config/memory patterns - .github/labeler.yml -- triggers agent-behavior label on .opencode/skills changes - .coderabbit.yaml -- review instructions for OPENCODE.md - AGENTS.md -- promotes OpenCode in headless mode table, OPENCODE.md in system layer list - README.md -- adds OpenCode badge and CLI-agnostic phrasing - docs/SETUP.md -- shows both claude and opencode as entry points - SKILL.md -- removes Claude Code specific comment from skill frontmatter
Adds checks for: - CLI wrapper files (CLAUDE.md, OPENCODE.md, GEMINI.md) all reference AGENTS.md - .opencode and .claude skill symlinks resolve to canonical .agents/skills/ - batch-runner.sh documents opencode support and --cli flag
Updates README, architecture docs, and customization guide to refer to any AI coding CLI instead of singling out Claude Code.
- Add interview-prep/* to .gitignore with .gitkeep exception - Remove interview-prep/story-bank.md from git tracking (user layer data) - Fix docs/CUSTOMIZATION.md OpenCode hooks reference Upstream sync: merge main from santifer/career-ops (5 new commits)
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis PR adds OpenCode as a first-class AI coding CLI option alongside Claude Code. Changes span skill file structure, batch runner dispatch logic, system layer tracking, test infrastructure, and documentation, enabling users and automation to work with either CLI. ChangesOpenCode Multi-CLI Support
Sequence DiagramsequenceDiagram
participant User
participant BatchRunner as batch-runner.sh
participant Prereq as PrereqCheck
participant Offers as OfferLoop
participant Dispatcher as CLI_Dispatch
participant Claude as "claude -p"
participant OpenCode as "opencode run"
User->>BatchRunner: run --cli opencode ...
BatchRunner->>Prereq: command -v "$CLI"
Prereq-->>BatchRunner: OK
BatchRunner->>Offers: iterate offers
Offers->>Dispatcher: build prompt
Dispatcher->>OpenCode: opencode run "<prompt>"
OpenCode-->>Dispatcher: result
Dispatcher-->>Offers: return
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related issues
Possibly related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/labeler.yml:
- Line 14: Add "OPENCODE.md" to the same core-architecture label mapping that
currently contains "CLAUDE.md" in .github/labeler.yml so changes to OPENCODE.md
trigger the core-architecture label; locate the block where "CLAUDE.md" is
listed (the mapping for the System Layer / core-architecture) and add
"OPENCODE.md" alongside "CLAUDE.md" to ensure consistent triage for system
instruction file updates.
In `@AGENTS.md`:
- Around line 272-273: Remove the duplicate OpenCode CLI table row by deleting
the redundant line that contains the "OpenCode" entry with the command `opencode
run "prompt"` so only a single row for OpenCode remains; locate the two
identical rows showing **OpenCode** and remove one to avoid repeating the same
`opencode run "prompt"` entry.
In `@batch/batch-runner.sh`:
- Around line 377-383: The OpenCode invocation only passes "$prompt" and drops
the rendered system prompt; update the opencode call to include the rendered
system prompt so OpenCode workers see the same batch-prompt.md content as Claude
workers. For example, ensure the CLI args built for opencode (the array used in
the opencode invocation and variable cli_args) include both the rendered system
prompt variable (e.g., "$SYSTEM_PROMPT" or the script variable that holds the
rendered batch-prompt.md) and "$prompt" (e.g., cli_args=(run "$SYSTEM_PROMPT"
"$prompt")), and apply the same fix to the other opencode/run block covering the
earlier 345-363 region.
- Around line 51-52: Update the help text for the "--model NAME" option in the
batch-runner script: change the description that currently says "only supported
by claude -p" to "both claude -p and opencode run" so the line reads "--model
NAME Model name passed to the CLI's --model flag (both claude -p and
opencode run)"; locate the help string that defines the "--model" usage and
replace the wording accordingly to reflect both supported CLIs.
In `@test-all.mjs`:
- Around line 331-349: The current tests call run('readlink', ['-f', join(ROOT,
...)]) to canonicalize symlinks (assigning canonicalReal and resolved) and check
targets in the symlinks loop; replace those shell calls with Node's
fs.realpathSync (e.g., use fs.realpathSync(join(ROOT, canonicalSkill)) and
fs.realpathSync(join(ROOT, link))) for cross-platform resolution, add a
require/import for fs (or realpathSync) at the top, and wrap each realpathSync
call in a try/catch to map errors to the same null-handling logic used currently
(set canonicalReal or target to null on error) so the existing pass/fail checks
remain valid.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: 6244c72d-6955-4f1d-86c4-6a61b06aa1d3
📒 Files selected for processing (19)
.agents/skills/career-ops/SKILL.md.coderabbit.yaml.github/labeler.yml.gitignore.opencode/skills/career-ops/SKILL.mdAGENTS.mdDATA_CONTRACT.mdOPENCODE.mdREADME.mdbatch/batch-runner.shdocs/ARCHITECTURE.mddocs/CUSTOMIZATION.mddocs/SETUP.mddoctor.mjsinterview-prep/.gitkeepinterview-prep/story-bank.mdpackage.jsontest-all.mjsupdate-system.mjs
💤 Files with no reviewable changes (1)
- interview-prep/story-bank.md
- Add OPENCODE.md to core-architecture labeler mapping - Remove duplicate OpenCode row in batch CLI table - Fix --model help text: works with opencode too, not just claude - Pass resolved system prompt to opencode run workers - Replace readlink -f with fs.realpathSync for cross-platform compat
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/labeler.yml (1)
1-7:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winAdd
AGENTS.mdto the core-architecture label mapping.According to learnings, the System Layer includes
AGENTS.md,CLAUDE.md, andOPENCODE.mdas auto-updatable system instruction files. Currently,AGENTS.mdis missing from the core-architecture label group, creating a triage inconsistency.📋 Proposed fix
"🔴 core-architecture": - changed-files: - any-glob-to-any-file: + - AGENTS.md - CLAUDE.md - OPENCODE.md - DATA_CONTRACT.md - modes/_shared.mdBased on learnings: System Layer includes
AGENTS.md,CLAUDE.md, andOPENCODE.mdas auto-updatable system instruction files.🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/labeler.yml around lines 1 - 7, Update the "🔴 core-architecture" label mapping to include AGENTS.md in the changed-files any-glob-to-any-file list so the auto-triage treats AGENTS.md the same as CLAUDE.md and OPENCODE.md; locate the mapping for the "🔴 core-architecture" label and add AGENTS.md to the list alongside CLAUDE.md and OPENCODE.md under the any-glob-to-any-file entry.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In @.github/labeler.yml:
- Around line 1-7: Update the "🔴 core-architecture" label mapping to include
AGENTS.md in the changed-files any-glob-to-any-file list so the auto-triage
treats AGENTS.md the same as CLAUDE.md and OPENCODE.md; locate the mapping for
the "🔴 core-architecture" label and add AGENTS.md to the list alongside
CLAUDE.md and OPENCODE.md under the any-glob-to-any-file entry.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: caf335fa-1e97-4c69-b979-bf7c2ce1c9b2
📒 Files selected for processing (4)
.github/labeler.ymlAGENTS.mdbatch/batch-runner.shtest-all.mjs
# Conflicts: # README.md # package.json # test-all.mjs
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@test-all.mjs`:
- Around line 449-462: Duplicate top-level declarations of agents and
requiredSections are causing a SyntaxError; remove or rename the second set in
the "13. AGENTS.md integrity" block so you don't redeclare the same consts.
Locate the duplicate const declarations named agents and requiredSections in
that block and either delete them and reuse the earlier variables, or rename
them (e.g., agents2/requiredSections2) if a distinct copy is actually needed;
ensure the for-loop uses the correct variable names after the change.
🪄 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: ASSERTIVE
Plan: Pro
Run ID: daafc0ec-48b2-4710-92e2-a85f75d327de
📒 Files selected for processing (7)
.agents/skills/career-ops/SKILL.md.gitignoreAGENTS.mdREADME.mdpackage.jsontest-all.mjsupdate-system.mjs
The AGENTS.md integrity test section was accidentally removed during merge conflict resolution. Restored from upstream and renumbered sections 10-14 to 11-15 to accommodate it.
|
OpenCode is squarely on the roadmap (#272), @mskadu, and you did the issue-first thing (#706) — thank you. Blockers: (1) rebase — 6 files conflict after v1.9.0 + test-all.mjs is currently red on the branch; (2) heads-up that #757 was a competing 'OpenCode full parity' PR (now closed for PII) — yours is the cleaner base, so let's make this the canonical OpenCode PR. Rebase to green and ping me. |
|
@santifer — rebased to green. Upstream main merged (35 commits, incl. v1.9.0 and rate-limit retry loop), test-all.mjs passes 175/175, and the batch runner now supports both OpenCode dispatch AND rate-limit retries. Ready for re-review. |
|
Hello again |
|
Thanks for the quick turnaround, @mskadu — rebase looks good and I've approved the test workflows to verify the 175/175. One thing the upstream merge resolution dropped: |
|
Fixed — |
# Conflicts: # README.md # batch/batch-runner.sh # package.json
|
Rebased again (60+ upstream commits incl. v1.10.0, 3 conflict files resolved). Tests: 240 passed, 0 failed. Ready for review. |
|
@mskadu — second rebase verified: clean merge against current main, 240 passed / 0 failed on my machine too, and the
What remains after those two = the pure OpenCode integration, and it goes straight in. Three rounds of fast turnarounds on a moving main — genuinely appreciated. 🙏 |
|
Hola! Both asks addressed: batch-runner.sh changes dropped (hope this helps - and since I had the time), story-bank.md split into #944, tests green at 243/0. Ready for re-review. |
# Conflicts: # doctor.mjs # test-all.mjs
Ready for re-review. |
Closes #706
Summary
Adds native OpenCode support: command files, skill, batch runner integration, test coverage, and documentation. OpenCode users can now run
/career-opscommands, use the skill system, and process batch jobs — the same experience as Claude Code and Gemini CLI.All existing
modes/*.mdevaluation logic, tracker flow, templates, and scripts are reused. No new evaluation, CV, or tracker logic.Changes
.opencode/commands/*.md.opencode/skills/career-ops/SKILL.mdOPENCODE.mdAGENTS.mdopencode runcommandbatch/batch-runner.shopencode runas a supported CLI backendtest-all.mjsREADME.md,docs/SETUP.md,docs/ARCHITECTURE.mddoctor.mjsDATA_CONTRACT.md.opencode/commands/,.opencode/agents/,.opencode/skills/career-opslisted.github/labeler.yml,.coderabbit.yamlpackage.jsonupdate-system.mjsdocs/CUSTOMIZATION.mdTesting
node test-all.mjs— 76 passed, 0 failednpm run doctor— all 9 checks passContext
This was verified against the official OpenCode documentation at https://opencode.ai/docs/ to ensure accuracy.
Summary by CodeRabbit
New Features
Documentation
Tests
Chores