New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

opencode-ultra

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

opencode-ultra

Lightweight OpenCode 1.2.x plugin — ultrawork mode, multi-agent orchestration, rules injection

latest
Source
npmnpm
Version
0.9.9
Version published
Maintainers
1
Created
Source

opencode-ultra

Disclaimer: This project is not built by or affiliated with the OpenCode team. It is a community-built plugin forked from oh-my-opencode.

A lightweight OpenCode 1.2.x plugin that provides multi-agent orchestration, keyword-driven mode switching, rules injection, session continuity, AST search, and self-improvement (evolve) in a single plugin.

Install

# In your OpenCode plugin directory
bun add opencode-ultra

Register in opencode.jsonc:

{
  "plugins": ["opencode-ultra"]
}

Features

Tools (12)

ToolDescription
spawn_agentParallel agent execution (ConcurrencyPool + spawn limit + timeout + sanitizer)
ralph_loopAutonomous loop execution (completion detection via <promise>DONE</promise>, per-iteration timeout)
cancel_ralphCancel a running Ralph Loop
batch_readParallel multi-file reading (max 20)
ledger_saveSave Continuity Ledger (.opencode/ledgers/)
ledger_loadLoad Continuity Ledger (by name or latest)
ast_searchAST-aware code search (uses ast-grep/sg binary, auto-skips if not installed)
evolve_applyTrust score evaluation + auto-apply plugin recommendations to OpenCode config (dry-run/backup)
evolve_scanValidate, merge, score improvement proposals from JSONL + generate numbered report
evolve_scoreScore and rank proposals (Priority x Effort weighted)
evolve_exeAutonomous execution pipeline (git branch -> implement -> test -> build -> review -> merge/rollback)
evolve_publishVersion bump + test + build + npm publish (with deploy instructions)

Hooks (9)

HookHook PointDescription
keyword-detectorchat.messageDetects ultrawork/search/analyze/think/evolve keywords
rules-injectorsystem.transformInjects .opencode/rules.md into system prompt
context-injectorsystem.transformAuto-injects ARCHITECTURE.md / CODE_STYLE.md
fragment-injectorsystem.transformPer-agent custom prompt fragment injection
prompt-renderersystem.transformModel-specific system prompt format optimization (markdown/xml/json)
comment-checkertool.execute.afterDetects AI slop comments after Write/Edit
token-truncationtool.execute.afterCompresses tool output >30000 chars to first 40% + last 40%
todo-enforcerevent (session.idle)Detects unfinished TODOs and forces continuation
session-compactionexperimental.session.compactingGenerates structured summary during session compaction

Safety

FeatureDescription
Prompt Injection SanitizerDetects and neutralizes injection patterns in agent output (17 patterns, 6 categories)
Spawn LimitMax concurrent sessions (default: 15)
Agent TimeoutPer-agent timeout (default: 180s)
Trust Scorenpm package trust score (0-100) — quality gate for evolve recommendations
Concurrency PoolSemaphore-based global/provider/model three-tier concurrency control

Evolve (Self-Improvement)

Triggered by evolve / self-improve keywords. A 5-phase self-improvement cycle:

PhaseDescription
1. RESEARCHScan npm/GitHub for plugin ecosystem
2. COMPAREFeature matrix diff against opencode-ultra
3. PROPOSEStructured implementation proposals (target files/functions, issues, changes, effects) + JSONL output
4. SCOREScore all proposals via evolve_score (Priority x Effort weighted)
5. SAVEPersist results via ledger_save

Proposals are output to .opencode/evolve-proposals.jsonl:

{"title":"Feature","priority":"P0","effort":"Medium","inspiration":"reference-plugin","current_state":"Current state","why":"Benefit","how":"target-file:function — change description"}

Score calculation: priority_weight x effort_weight

PriorityWeightEffortWeight
P010Low3
P15Medium2
P21High1

P0+Low=30 (highest priority) / P2+High=1 (lowest)

Evolve Execution (Autonomous)

Fully automate proposal implementation with evolve_exe. Each proposal is isolated in a git branch with automatic rollback on failure.

evolve_exe({ proposals: "1,3" })              — Execute proposals #1 and #3
evolve_exe({ proposals: "all" })               — Execute all accepted proposals
evolve_exe({ proposals: "1", dryRun: true })   — Show execution plan only
evolve_exe({ proposals: "1,2", publish: true }) — Auto-publish after execution
PhaseDescription
1. GIT BRANCHCreate evolve/{slug} branch
2. IMPLEMENTimplementAgent (default: hephaestus) autonomously implements
3. TESTRun bun test (failure -> rollback)
4. BUILDRun bun run build (failure -> rollback)
5. REVIEWreviewAgent (default: momus) code review (BLOCK is logged)
6. MERGE--no-ff merge to original branch, delete feature branch

Post-implementation publish:

evolve_publish({ bump: "patch" })                      — test -> build -> version bump -> npm publish
evolve_publish({ bump: "minor", deploy: "my-server" }) — publish + SSH deploy instructions

Agent Configuration

Sisyphus (orchestrator) handles reading, analysis, and planning, then delegates implementation to sub-agents.

AgentRoleTier
sisyphusOrchestrator — read + analyze + plan + delegateHigh
momusCode review and quality checkHigh
oracleDesign, debugging, architecture decisionsMid
hephaestusAutonomous implementation workerMid
metisTask decomposition and parallel execution planningMid
multimodal-lookerImage and screenshot analysisMid
exploreFast codebase reconnaissanceFast
librarianDocumentation and best practices researchFast
scoutPlugin ecosystem researchFast
atlasTask management and progress trackingLow

All agent models are configured via opencode-ultra.json. Only providers/models defined in your opencode.jsonc provider section can be specified.

Default Models

AgentDefault Model
sisyphusanthropic/claude-opus-4-5
oracleopenai/gpt-5.2
hephaestusopenai/gpt-5.2
momusanthropic/claude-sonnet-4-5
metisanthropic/claude-sonnet-4-5
exploreanthropic/claude-haiku-4-5
librariananthropic/claude-sonnet-4-5
multimodal-lookeranthropic/claude-sonnet-4-5
atlasanthropic/claude-sonnet-4-5

You can override these with any model from your configured providers (OpenAI, Anthropic, Google, OpenRouter, etc.).

Keyword Detection

KeywordModeEffect
ultrawork / ulwultraworkvariant "max", full agent utilization
search / find / 探して etc.searchComprehensive search
analyze / 調査 / debug etc.analyzeContext collection
think hard / じっくり / 熟考 etc.thinkExtended thinking enabled
evolve / self-improve / 自己改善 etc.evolveSelf-improvement cycle

Supports Japanese and Chinese keywords.

Configuration

Two-level merge via opencode-ultra.json (or .jsonc):

  • User config: ~/.config/opencode/opencode-ultra.json[c]
  • Project config: <project>/.opencode/opencode-ultra.json[c]

Project config overrides user config.

Profiles

Define multiple configurations and switch between them via activeProfile or the OPENCODE_ULTRA_PROFILE environment variable:

{
  "activeProfile": "cloud",
  "profiles": {
    "cloud": {
      "agents": {
        "sisyphus": { "model": "anthropic/claude-opus-4" },
        "hephaestus": { "model": "openai/gpt-4o" },
        "explore": { "model": "anthropic/claude-haiku-4" }
      },
      "background_task": { "defaultConcurrency": 4 }
    },
    "local": {
      "agents": {
        "sisyphus": { "model": "ollama/llama3:70b" },
        "hephaestus": { "model": "ollama/qwen3:32b" },
        "explore": { "model": "ollama/mistral:7b" }
      },
      "background_task": { "defaultConcurrency": 2 }
    }
  }
}

Switch profiles at runtime:

# Via environment variable (takes priority over activeProfile)
OPENCODE_ULTRA_PROFILE=local opencode exec --agent sisyphus "implement feature X"

# Or set activeProfile in config for the default

Profile settings are deep-merged on top of base config values defined outside profiles. You can override just the fields you need per profile — everything else inherits from the base config.

Configuration Schema

{
  // Agent model settings (specify models defined in opencode.jsonc provider section)
  "agents": {
    "sisyphus": { "model": "anthropic/claude-opus-4-5" },
    "oracle":   { "model": "openai/gpt-5.2" },
    "hephaestus": { "model": "openai/gpt-5.2" },
    "explore":  { "model": "anthropic/claude-haiku-4-5" },
    "momus":    { "model": "anthropic/claude-sonnet-4-5" }
  },

  // Categories (bulk model switching via spawn_agent category parameter)
  // Note: category takes priority over individual agent models
  "categories": {
    "quick": { "model": "anthropic/claude-haiku-4-5" },
    "deep":  { "model": "anthropic/claude-opus-4-5" }
  },

  // Fragment Injection (per-agent prompt fragments)
  "fragments": {
    "hephaestus": [".opencode/fragments/strict.md"]
  },

  // Per-model Prompt Renderer
  "prompt_renderer": {
    "default": "markdown",
    "model_overrides": {
      "provider/model": "xml"
    }
  },

  // Disable features
  "disabled_agents": [],
  "disabled_hooks": [],   // keyword-detector, rules-injector, context-injector,
                          // fragment-injector, prompt-renderer, comment-checker,
                          // token-truncation, todo-enforcer, session-compaction
  "disabled_tools": [],   // spawn_agent, ralph_loop, cancel_ralph, batch_read,
                          // ledger_save, ledger_load, ast_search, evolve_apply,
                          // evolve_scan, evolve_score, evolve_exe, evolve_publish
  "disabled_mcps": [],    // context7

  // Built-in Agent Demotion (default: true)
  "demote_builtin": true,

  // Concurrency control
  "background_task": {
    "defaultConcurrency": 3,
    "providerConcurrency": { "openai": 8 },
    "modelConcurrency": { "openai/gpt-5.2": 2 }
  },

  // Safety
  "safety": {
    "maxTotalSpawned": 15,
    "agentTimeoutMs": 180000
  },

  // Evolve Execution
  "evolve_exe": {
    "maxIterations": 10,
    "iterationTimeoutMs": 300000,
    "totalTimeoutMs": 900000,
    "skipReview": false,
    "skipTests": false,
    "implementAgent": "hephaestus",
    "reviewAgent": "momus"
  },

  // Token Truncation
  "token_truncation": { "maxChars": 30000 },

  // Comment Checker
  "comment_checker": { "maxRatio": 0.3, "slopThreshold": 3 },

  // Todo Enforcer
  "todo_enforcer": { "maxEnforcements": 5 },

  // MCP API Keys
  "mcp_api_keys": { "context7": "ctx7sk-..." }
}

Continuity Ledger

Markdown documents for session-to-session context continuity. Saved to .opencode/ledgers/.

// Save
ledger_save({ name: "auth-refactor", content: "## Context\n..." })

// Load (by name)
ledger_load({ name: "auth-refactor" })

// Load (latest)
ledger_load({})

Build & Test

bun install
bun run build
bun test

Attribution

This project is a fork of oh-my-opencode by code-yeongyu, built on top of OpenCode by the OpenCode team.

We respect and follow the upstream licenses:

License

Sustainable Use License v1.0 — Free for personal and non-commercial use. See LICENSE.md for full terms.

Keywords

opencode

FAQs

Package last updated on 19 Mar 2026

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts