Skip to content

t008.4: oh-my-opencode compatibility for aidevops-opencode plugin#1157

Merged
marcusquinn merged 2 commits intomainfrom
feature/t008.4
Feb 11, 2026
Merged

t008.4: oh-my-opencode compatibility for aidevops-opencode plugin#1157
marcusquinn merged 2 commits intomainfrom
feature/t008.4

Conversation

@marcusquinn
Copy link
Owner

@marcusquinn marcusquinn commented Feb 11, 2026

Summary

  • Detect oh-my-opencode (OMOC) presence at plugin startup via OpenCode config, OMOC config files, and npm
  • Deduplicate MCP registrations — skip MCPs already managed by OMOC (context7 is the only shared MCP)
  • Quality hooks are complementary (aidevops: ShellCheck, secrets, returns, MD031; OMOC: comment-checker, todo-enforcer) — no overlap
  • OMOC compatibility state injected into compaction context for session continuity
  • Stale OMOC tool patterns only disabled when OMOC is not active (when OMOC is active, it manages its own tools)
  • Architecture docs updated with Phase 0 design

Design

Detection strategy (ordered by reliability):

  1. OpenCode config (opencode.json) — looks for "oh-my-opencode" in the plugin array
  2. OMOC config files — .opencode/oh-my-opencode.json (project) or ~/.config/opencode/oh-my-opencode.json (user)
  3. npm installation — npm ls oh-my-opencode

Results are cached after first detection. When OMOC is detected, the plugin logs a summary and adapts its behaviour:

Behaviour Without OMOC With OMOC
context7 MCP Registered by aidevops Skipped (OMOC manages it)
Stale OMOC tool patterns Disabled globally Left alone (OMOC manages)
ShellCheck/secrets hooks Active Active (complementary)
Compaction context Standard Includes OMOC state

Dependencies

Builds on t008.1 (core plugin, PR #1138), t008.2 (MCP registry, PR #1149), t008.3 (quality hooks, PR #1150).

Testing

  • node --check syntax validation passes
  • No .sh files modified (ShellCheck gate N/A)
  • Manual review of detection logic against oh-my-opencode v3.5.2 config format

Ref #1097

Detect OMOC presence via OpenCode config, OMOC config files, and npm.
Skip MCP registration for MCPs managed by OMOC (context7, websearch, grep_app).
Quality hooks are complementary — aidevops handles ShellCheck/secrets/returns,
OMOC handles comment-checker/todo-enforcer. No overlap.
OMOC state injected into compaction context for session continuity.
Stale OMOC tool patterns only disabled when OMOC is not active.
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 11, 2026

Warning

Rate limit exceeded

@marcusquinn has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 3 minutes and 59 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feature/t008.4

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.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 8 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 11 20:16:25 UTC 2026: Code review monitoring started
Wed Feb 11 20:16:25 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 8

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 8
  • VULNERABILITIES: 0

Generated on: Wed Feb 11 20:16:28 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@marcusquinn marcusquinn marked this pull request as ready for review February 11, 2026 20:17
@gemini-code-assist
Copy link

Summary of Changes

Hello @marcusquinn, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request significantly enhances the aidevops-opencode plugin by introducing robust compatibility with oh-my-opencode (OMOC). The primary goal is to enable both plugins to coexist harmoniously, preventing conflicts and ensuring optimal performance. This is achieved through intelligent detection of OMOC's presence and configuration, allowing aidevops to adapt its behavior by deduplicating MCP registrations, ensuring quality hooks are complementary, and providing clear visibility into the combined plugin environment within the compaction context.

Highlights

  • oh-my-opencode (OMOC) Detection: The plugin now detects the presence and capabilities of oh-my-opencode (OMOC) at startup using a multi-strategy approach: checking OpenCode config, OMOC config files, and npm installations. This detection is cached for efficiency.
  • MCP Deduplication: To prevent conflicts and redundant registrations, the plugin now skips registering Micro-Context Providers (MCPs) like 'context7' if they are already managed by an active OMOC installation. Other OMOC-specific MCPs like 'websearch' and 'grep_app' are also acknowledged as OMOC-managed.
  • Complementary Quality Hooks: The aidevops quality hooks (e.g., ShellCheck, secrets detection) are designed to be complementary to OMOC's hooks (e.g., comment-checker, todo-enforcer), ensuring no overlapping functionality and allowing both sets of hooks to operate effectively side-by-side.
  • Compaction Context Integration: The detected OMOC compatibility state, including its version, active MCPs, and hooks, is now injected into the compaction context. This ensures session continuity and provides visibility into the OMOC environment during operations.
  • Conditional Disabling of Stale OMOC Tool Patterns: The plugin now intelligently disables stale oh-my-opencode tool patterns (e.g., 'grep_app_', 'websearch_') only when OMOC is not detected. If OMOC is active, it is assumed to manage its own tool permissions, avoiding unnecessary interference.
Changelog
  • .agents/plugins/opencode-aidevops/index.mjs
    • Added a cached variable _omocState to store oh-my-opencode detection results.
    • Implemented detectOhMyOpenCode function to identify OMOC presence via OpenCode config, OMOC config files, and npm installation, caching the result.
    • Defined OMOC_MANAGED_MCPS and OMOC_HOOK_NAMES constants to list known OMOC-managed components.
    • Introduced isMcpManagedByOmoc and isHookManagedByOmoc utility functions to check if specific MCPs or hooks are handled by OMOC.
    • Modified registerMcpServers to conditionally skip registration of MCPs that are detected as managed by OMOC.
    • Updated the logic for disabling OMO_DISABLED_PATTERNS to only apply when oh-my-opencode is not detected.
    • Added getOmocState function to generate a summary of OMOC compatibility for the compaction context.
    • Integrated getOmocState into the compactingHook to include OMOC information in session summaries.
    • Updated the plugin's main description to highlight the new oh-my-opencode detection and deduplication feature.
    • Ensured detectOhMyOpenCode is called early in the AidevopsPlugin initialization to set up compatibility.
  • .agents/tools/build-mcp/aidevops-plugin.md
    • Updated the 'Status' in the Quick Reference to include the current PR (t008.4 PR t008.4: oh-my-opencode compatibility for aidevops-opencode plugin #1157).
    • Added a new 'OMOC Compatibility' entry to the Quick Reference, stating detection and complementarity.
    • Inserted a new section '0. oh-my-opencode Detection (t008.4)' detailing the detection strategy and a compatibility table.
    • Revised the 'Key Decisions' table to reflect the new approach of complementing oh-my-opencode rather than skipping it.
Activity
  • The pull request is currently a Work In Progress, with incremental commits being pushed by the author.
  • This PR builds upon previous work from t008.1 (core plugin), t008.2 (MCP registry), and t008.3 (quality hooks).
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@github-actions
Copy link

🔍 Code Quality Report

�[0;35m[MONITOR]�[0m Code Review Monitoring Report

�[0;34m[INFO]�[0m Latest Quality Status:
SonarCloud: 0 bugs, 0 vulnerabilities, 8 code smells

�[0;34m[INFO]�[0m Recent monitoring activity:
Wed Feb 11 20:17:31 UTC 2026: Code review monitoring started
Wed Feb 11 20:17:31 UTC 2026: SonarCloud - Bugs: 0, Vulnerabilities: 0, Code Smells: 8

📈 Current Quality Metrics

  • BUGS: 0
  • CODE SMELLS: 8
  • VULNERABILITIES: 0

Generated on: Wed Feb 11 20:17:34 UTC 2026


Generated by AI DevOps Framework Code Review Monitoring

@sonarqubecloud
Copy link

@marcusquinn marcusquinn merged commit 5f19fe6 into main Feb 11, 2026
9 of 11 checks passed
@marcusquinn marcusquinn deleted the feature/t008.4 branch February 11, 2026 20:21
Copy link

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces compatibility with oh-my-opencode (OMOC) by detecting its presence and adjusting the plugin's behavior to avoid conflicts. The detection logic is multi-faceted, checking configuration files and npm status, which is a robust approach. The changes are well-documented in both the code and the architecture markdown file. I've identified a couple of areas for improvement in the detection logic to make it more resilient and to better align with the repository's style guide regarding error handling in shell commands. Overall, this is a solid contribution that improves interoperability within the OpenCode ecosystem.


// 3. If not yet detected, check npm for OMOC installation
if (!_omocState.detected) {
const npmCheck = run("npm ls oh-my-opencode --json 2>/dev/null", 5000);

Choose a reason for hiding this comment

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

medium

The use of 2>/dev/null here and on line 227 appears to violate the repository style guide (line 50), which states that blanket suppression should be avoided. The npm ls command is expected to fail with a non-zero exit code if the package is not found. It would be better to allow the run utility to handle this expected failure gracefully, perhaps with an option to ignore non-zero exit codes, rather than suppressing stderr at the command level.

References
  1. The style guide prohibits blanket error suppression with 2>/dev/null, allowing it only when redirecting to log files. (link)

Comment on lines +220 to +222
if (npmCheck && npmCheck.includes("oh-my-opencode")) {
_omocState.detected = true;
}

Choose a reason for hiding this comment

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

medium

Checking for the package by using npmCheck.includes("oh-my-opencode") on the JSON output of npm ls is not robust. It could lead to false positives if another package has "oh-my-opencode" in its name or description. Since you're using the --json flag, it would be more reliable to parse the JSON output and check for the existence of oh-my-opencode as a dependency.

Suggested change
if (npmCheck && npmCheck.includes("oh-my-opencode")) {
_omocState.detected = true;
}
if (npmCheck) {
try {
const npmInfo = JSON.parse(npmCheck);
if (npmInfo.dependencies?.['oh-my-opencode']) {
_omocState.detected = true;
}
} catch {
// Fallback for non-JSON output
if (npmCheck.includes("oh-my-opencode")) {
_omocState.detected = true;
}
}
}

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.

1 participant