Skip to content

Conversation

@gesparza3
Copy link
Contributor

@gesparza3 gesparza3 commented Oct 24, 2025

Summary

Add support for OpenCode CLI as a slash command generator target. Updates configuration to recognize OpenCode's
command directory structure and generates appropriate markdown command files for the platform.

Summary by CodeRabbit

  • New Features

    • Added support for OpenCode CLI as a newly supported AI assistant (total assistants now 7).
  • Documentation

    • Updated docs to include OpenCode CLI configuration, generated-commands directory, and directory-structure listings.
    • Mentioned a new cleanup option in the overview.
  • Tests

    • Updated tests to validate the new OpenCode CLI agent and related detection directories.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 24, 2025

Walkthrough

Added OpenCode CLI as a supported agent: config entry for opencode, documentation updates to list its command directory and generated files, and test updates to validate the new agent and detection directory. (≈27 words)

Changes

Cohort / File(s) Summary
Documentation
docs/slash-command-generator.md
Updated supported agents count to 7; added OpenCode CLI (key opencode, display name "OpenCode CLI", format Markdown, extension .md, command dir .config/opencode/command); updated Directory Structure and Generated files sections; mentioned cleanup option.
Configuration
slash_commands/config.py
Added _SUPPORTED_AGENT_DATA entry for opencode with display_name "OpenCode CLI", command_dir ".config/opencode/command", command_format MARKDOWN, command_file_extension ".md", and detection scope including ".opencode"; propagates to SUPPORTED_AGENTS, list_agent_keys, and get_agent_config.
Tests
tests/test_config.py
Added opencode entry to EXPECTED_AGENTS; updated assertions to expect one more Markdown agent (now 6 Markdown agents) and to include ".opencode" in detection directory coverage for the new agent.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • jguice

Poem

🐰 A new helper hopped into the glen,
OpenCode CLI joins the den,
Docs, config, and tests in tune,
Markdown commands beneath the moon,
Hop along — the meadow's zen!

Pre-merge checks and finishing touches

❌ Failed checks (2 warnings)
Check name Status Explanation Resolution
Description Check ⚠️ Warning The pull request description provided is largely incomplete compared to the required template. The author has included only a brief summary (approximately 2 sentences) but is missing the structured sections defined in the template: the "Why?" section (motivation and references), the "What Changed?" section with detailed key updates, the "Additional Notes" section for follow-ups, and all the verification checklist items (spec links, test execution, linter execution, and documentation updates). While the summary does provide some meaningful information about the OpenCode CLI support, it falls significantly short of the expected template structure and completeness. The author should complete the pull request description by adding the required sections: fill in the "Why?" section with motivation and any relevant task/issue references, expand the "What Changed?" section with specific details about configuration updates and file changes, add the "Additional Notes" section if needed, and complete all verification checklist items to confirm that tests were run, linters were executed, and documentation was updated as appropriate.
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (1 passed)
Check name Status Explanation
Title Check ✅ Passed The title "feat: add support for opencode slash command generator" is clear, specific, and directly summarizes the main change in the pull request. It accurately reflects that the PR adds OpenCode CLI as a new supported slash command generator, which is confirmed by the changes across the documentation, configuration, and test files. The title uses standard conventional commit format, is concise and readable, and gives teammates sufficient context to understand the primary modification when scanning commit history.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 79f04c8 and f6aeefd.

📒 Files selected for processing (1)
  • tests/test_config.py (3 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • tests/test_config.py

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

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: 1

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0c56308 and 08dde3d.

📒 Files selected for processing (3)
  • docs/slash-command-generator.md (3 hunks)
  • slash_commands/config.py (1 hunks)
  • tests/test_config.py (3 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
tests/test_config.py (1)
slash_commands/config.py (1)
  • CommandFormat (10-14)
🔇 Additional comments (6)
tests/test_config.py (3)

42-48: LGTM! OpenCode agent test data is well-structured.

The new test data for the OpenCode agent follows the established pattern and is consistent with other agent configurations. The singular "command" directory name (vs. plural "commands") is intentionally supported by the test assertion at line 118.


138-138: Correct update for Markdown agent count.

The count accurately reflects the addition of OpenCode CLI as the sixth Markdown-format agent.


159-160: Appropriate detection directory validation for nested path.

The test correctly validates the OpenCode agent's detection directory, following the same pattern used for other agents with nested paths under .config/.

docs/slash-command-generator.md (3)

9-9: Correct agent count update.

The documentation accurately reflects seven supported agents with the addition of OpenCode CLI.


288-288: Directory structure documentation is accurate.

The OpenCode CLI directory path correctly matches the configuration and is clearly labeled.


196-196: OpenCode CLI documentation entry verified and approved.

The table entry is properly formatted and the reference URLs are valid and publicly accessible.

@iaminawe iaminawe self-requested a review October 24, 2025 19:10
Copy link
Contributor

@iaminawe iaminawe left a comment

Choose a reason for hiding this comment

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

Thanks @gesparza3 - I verified this works locally and was able to see and use the /generate-spec command in opencode after running the slash command generator

@iaminawe iaminawe merged commit cc556e7 into liatrio-labs:main Oct 24, 2025
6 checks passed
@gesparza3 gesparza3 deleted the feat/add-opencode branch October 24, 2025 19:50
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