Skip to content

Run codey-video from OpenCode #2

@mike-holcomb

Description

@mike-holcomb

User Requirement

The user wants to run the codey-video plugin (three video‑analysis skills) from the OpenCode platform instead of Claude Code. This requires exposing frame extraction, audio transcription, and multimodal answering via OpenCode’s plugin system.

Research Summary

  • API Differences: Claude Code uses SKILL.md prompts that fork a Haiku sub‑agent and rely on Bash & Read tools. OpenCode plugins are TypeScript/JavaScript modules exporting a plugin function and interacting with the SDK (client.models.chat, client.files.upload, $ shell helper).
  • Requirements: Access to the same preprocessing scripts (scripts/*.ts), Whisper models in resources/models, and a vision‑capable LLM (Claude 3.5 Sonnet, GPT‑4V, Gemini‑1.5‑Flash, etc.).
  • Acceptance Criteria:
    1. The three skills (query-video-segment, generate-video-outline, generate-transcript) are callable from OpenCode (opencode run …).
    2. Results are comparable to the Claude Code version (frame count, transcript accuracy, multimodal answer quality).
    3. All processing stays local (ffmpeg, Whisper); no external services required.
    4. Installation works via opencode plugin install or by copying the plugin into .opencode/plugins.
  • Testing Plan:
    • Unit Tests: Mock the SDK to verify correct chat message construction and file uploads.
    • Integration Tests: Run each skill on a small sample video (≤ 10 s) and assert:
      • At least one frame image is uploaded.
      • A non‑empty transcript JSON is produced.
      • The LLM response contains the user query text.
    • CI: GitHub Actions that install ffmpeg, execute opencode run for each skill, and compare output length to a baseline.

Additional Notes

  • Expose only the needed bash and read tools (or a custom wrapper) to retain the security model.
  • Model selection should be configurable via an environment variable (VISION_MODEL).
  • Optional OpenCode hooks (notifications, logging) can be added later.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions