Skip to content

Create opencode-tools.md: platform reference for OpenCode - #1871

Closed
MADEVAL wants to merge 8 commits into
obra:devfrom
CyberSecureAgency:fix/opencode-tools-reference
Closed

MADEVAL wants to merge 8 commits into
obra:devfrom
CyberSecureAgency:fix/opencode-tools-reference

Conversation

@MADEVAL

@MADEVAL MADEVAL commented Jun 30, 2026

Copy link
Copy Markdown

Who is submitting this PR?

Field Value
Your model + version deepseek/deepseek-v4-pro
Harness + version OpenCode 1.0.35
All plugins installed superpowers (this repo)
Human partner who reviewed this diff MADEVAL

What problem are you trying to solve?

All 6 other supported platforms (claude-code, codex, copilot, gemini, pi, antigravity) have a *-tools.md reference file in skills/using-superpowers/references/. OpenCode was the only one without. Skills rely on these files to know which tools to use on each platform. Without opencode-tools.md, there is no documented mapping for instructions file conventions, personal skills directory, model selection strategy, permissions, or compaction behavior on OpenCode.

What does this PR change?

Creates skills/using-superpowers/references/opencode-tools.md with the full platform reference: tool mapping table, instructions file conventions, personal skills directory, model selection for subagents (including the limitation that task does not accept a model parameter), environment detection, compaction notes, and recommended permissions.

Is this change appropriate for the core library?

Yes. This completes the platform reference set that PR #1486 established.

What alternatives did you consider?

None. The file follows the same structure as the existing 6 platform references.

Does this PR contain multiple unrelated changes?

No. Single new file.

Existing PRs

Environment tested

Harness Harness version Model Model version/ID
OpenCode 1.0.35 DeepSeek deepseek/deepseek-v4-pro

New harness support

This PR documents the existing OpenCode plugin integration, not a new harness. The plugin already exists in .opencode/plugins/superpowers.js. This file is the missing reference document.

Evaluation

Rigor

  • A human has reviewed the COMPLETE proposed diff before submission

obra and others added 8 commits June 22, 2026 11:51
Prompt: Jesse asked for a new worktree off the local superpowers dev branch to add the Codex manifest after diagnosing why github.com/obra/superpowers did not show installable Codex plugins.

Root cause: Codex marketplace sources expect a .agents/plugins/marketplace.json at the marketplace root. The superpowers repo only had the Claude marketplace file and the Codex plugin manifest, so Codex could configure the marketplace name but found no installable plugin entries.

Changes: add a repo-local Codex marketplace manifest for superpowers-dev that points at this same repository root via the same-root source pattern Codex already accepts; add a focused marketplace manifest test; remove the unsupported hooks field from .codex-plugin/plugin.json so the plugin validator accepts the manifest.

Validation: bash tests/codex/test-marketplace-manifest.sh; uv run --with PyYAML python /Users/jesse/.codex/skills/.system/plugin-creator/scripts/validate_plugin.py /Users/jesse/git/superpowers/superpowers/.worktrees/codex-marketplace-manifest; throwaway HOME codex plugin marketplace add/list/add; bash tests/codex-plugin-sync/test-sync-to-codex-plugin.sh; bash tests/kimi/test-plugin-manifest.sh; bash tests/shell-lint/test-lint-shell.sh; scripts/lint-shell.sh tests/codex/test-marketplace-manifest.sh.
Prompt: Jesse questioned whether the PR should remove the hooks config from the Codex plugin manifest.

Runtime investigation showed Codex accepts a committed plugin manifest with hooks and installs the plugin successfully. Removing the field changes behavior: Codex falls back to the default hooks/hooks.json, which uses the non-Codex session-start hook and CLAUDE_PLUGIN_ROOT path, instead of hooks/hooks-codex.json and the session-start-codex script.

Changes: restore .codex-plugin/plugin.json hooks to ./hooks/hooks-codex.json and update the Codex marketplace manifest test to require that Codex-specific hook pointer instead of rejecting hooks.

Validation: bash tests/codex/test-marketplace-manifest.sh; scripts/lint-shell.sh tests/codex/test-marketplace-manifest.sh; bash tests/codex-plugin-sync/test-sync-to-codex-plugin.sh; bash tests/kimi/test-plugin-manifest.sh; bash tests/shell-lint/test-lint-shell.sh.
…clear|compact)

Bug: the SessionStart hook matcher in hooks-codex.json included "resume",
causing the superpowers bootstrap to re-fire on every Codex session resume.

Fix: align with Claude's hooks/hooks.json matcher "startup|clear|compact":
- drop "resume" (the bug: resume should not trigger re-bootstrap)
- add "compact" (so bootstrap re-injects after context compaction, like Claude)

Before: "matcher": "startup|resume|clear"
After:  "matcher": "startup|clear|compact"
Codex reliably triggers skills on its own, and the SessionStart hook
made the UX worse rather than better. Drop the Codex hook config and
its registration in the plugin manifest.
Google EOLed the Gemini CLI on 2026-06-18; the extension can no longer
be installed or updated. Remove Gemini from the install docs, the
subagent-capable platform lists, and the eval-harness description, and
delete its tool-mapping reference.
The verbose action-to-tool tables and skill-loading explainers in the
per-harness reference files restated guidance modern agents already
follow. Trim each file to the harness-specific notes that still carry
weight (subagent dispatch, task tracking, instructions-file paths), and
delete claude-code-tools.md and copilot-tools.md, which had nothing left
that wasn't generic.
The bootstrap is injected into every session, so its token cost is paid
constantly. Condense it without dropping behavior-shaping content:

- Replace the graphviz skill-flow diagram with the prose it encoded (the
  1% rule, the plan-mode to brainstorm gate, announce + checklist to todos).
- Fold the standalone Instruction-Priority section into User Instructions.
- Drop the per-platform 'How to Access Skills' walkthrough.
- Trim the Platform Adaptation pointer to the harnesses that still have a
  reference file (Codex, Pi, Antigravity).

Keeps the full Red Flags rationalization table, skill priority framed as
process-before-implementation, and user-instruction precedence.
All 6 other supported platforms have a *-tools.md mapping file in
skills/using-superpowers/references/. OpenCode was the only one missing.

This file is required so skills know which OpenCode tools to use for
each action (read, write, edit, bash, grep, glob, task, todowrite, etc.)
and where to find conventions like instructions files and skills dirs.

References #1486 which established the per-harness *-tools.md pattern.
@CyberSecureAgency CyberSecureAgency closed this by deleting the head repository Jul 15, 2026
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.

3 participants