Skip to content

Conversation

@TabishB
Copy link
Contributor

@TabishB TabishB commented Nov 25, 2025

Summary

  • Removes the agent: build field from OpenCode slash command templates
  • When agent is not specified, OpenCode uses the current/custom agent instead of requiring the build agent

Test plan

  • Unit tests updated and passing
  • Verified OpenCode slash command files no longer contain agent: field

Fixes #334

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Style
    • Updated formatting in OpenCode workflow templates for improved consistency.

✏️ Tip: You can customize this high-level summary in your review settings.

Remove the `agent: build` field from OpenCode slash command templates
to allow OpenCode to use the current/custom agent instead of requiring
the build agent to be available.

Fixes #334
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 25, 2025

Walkthrough

The changes remove hardcoded agent: build configuration from OpenCode workflow templates and update corresponding tests to verify that generated files no longer contain agent specifications, allowing custom agents to be specified during initialization instead.

Changes

Cohort / File(s) Summary
FRONTMATTER template formatting adjustments
src/core/configurators/slash/opencode.ts
Adjusted indentation in FRONTMATTER templates for the <UserRequest> block and $ARGUMENTS placeholder within the archive ChangeId block; no functional logic changes.
Test expectations updated
test/core/init.test.ts
Changed test assertions from verifying content contains "agent: build" to verifying content does not contain "agent:" for proposal, apply, and archive OpenCode workflow files.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

  • Attention areas:
    • Verify that the removal of hardcoded agent: configuration aligns with the design intent to support custom agent specification
    • Confirm test changes accurately reflect the new behavior across all three workflow file types (proposal, apply, archive)
    • Ensure no downstream dependencies expect the agent: build key to be present

Suggested reviewers

  • Israel-Laguan

Poem

🐰 No more agents locked in stone,
Custom workflows claim their own,
Templates flex, tests align,
Freedom to configure, by design!

Pre-merge checks and finishing touches

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: removing the hardcoded agent field from slash command templates.
Linked Issues check ✅ Passed The PR successfully removes hardcoded agent fields and updates tests accordingly, directly addressing the core requirement in issue #334.
Out of Scope Changes check ✅ Passed The changes are narrowly scoped: formatting adjustments in templates and test expectation updates align with the stated objective of removing hardcoded agent fields.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/opencode-agent-field

📜 Recent 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 3f5a66d and f1cb544.

📒 Files selected for processing (2)
  • src/core/configurators/slash/opencode.ts (0 hunks)
  • test/core/init.test.ts (1 hunks)
💤 Files with no reviewable changes (1)
  • src/core/configurators/slash/opencode.ts
🔇 Additional comments (1)
test/core/init.test.ts (1)

494-514: OpenCode templates: assertions correctly enforce removal of agent:

Switching to expect(...).not.toContain('agent:') for proposal, apply, and archive content cleanly guarantees that no agent: key is emitted in any OpenCode slash command file, which is exactly what you want for supporting current/custom agents instead of hardcoding build. Looks solid as written.

Tip

📝 Customizable high-level summaries are now available in beta!

You can now customize how CodeRabbit generates the high-level summary in your pull requests — including its content, structure, tone, and formatting.

  • Provide your own instructions using the high_level_summary_instructions setting.
  • Format the summary however you like (bullet lists, tables, multi-section layouts, contributor stats, etc.).
  • Use high_level_summary_in_walkthrough to move the summary from the description to the walkthrough section.

Example instruction:

"Divide the high-level summary into five sections:

  1. 📝 Description — Summarize the main change in 50–60 words, explaining what was done.
  2. 📓 References — List relevant issues, discussions, documentation, or related PRs.
  3. 📦 Dependencies & Requirements — Mention any new/updated dependencies, environment variable changes, or configuration updates.
  4. 📊 Contributor Summary — Include a Markdown table showing contributions:
    | Contributor | Lines Added | Lines Removed | Files Changed |
  5. ✔️ Additional Notes — Add any extra reviewer context.
    Keep each section concise (under 200 words) and use bullet or numbered lists for clarity."

Note: This feature is currently in beta for Pro-tier users, and pricing will be announced later.


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.

❤️ Share

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

@TabishB TabishB merged commit 17d1e5d into main Nov 25, 2025
7 checks passed
Balancor pushed a commit to Balancor/OpenSpec that referenced this pull request Nov 29, 2025
…ion-AI#335)

Remove the `agent: build` field from OpenCode slash command templates
to allow OpenCode to use the current/custom agent instead of requiring
the build agent to be available.

Fixes Fission-AI#334
fenghaitao pushed a commit to fenghaitao/OpenSpec that referenced this pull request Dec 10, 2025
…ion-AI#335)

Remove the `agent: build` field from OpenCode slash command templates
to allow OpenCode to use the current/custom agent instead of requiring
the build agent to be available.

Fixes Fission-AI#334
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.

Custom OpenCode agent support

2 participants