Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

yet another opencode plugin

An opencode plugin that merges the best of two worlds:

  • Terse, direct responses — single low intensity: trim filler and hedging, keep full sentences, preserve technical terms verbatim. Auto-clarity drops the terseness on security warnings, irreversible actions, and ambiguity.
  • Lazy dev — YAGNI ladder before writing code, reuse over reinvention, bug fix = root cause not symptom, strict calibration at trust boundaries, one runnable check per non-trivial change.

Plus two read-only primary agents:

  • Review — always runs the full protocol: functional (YAGNI, overengineering, dead code, root cause) and four non-functional layers (performance, security, maintainability, architecture), using pattern skills and conditional deep-dive subagents.
  • Dream — a planner that settles the architectural decisions of a new build before code is written, asking only what matters and handing a plan to Build.

Install

Get the CLI, then register the plugin in an opencode config.

1. Install the CLI

Globally (the command lands in your PATH), or on demand with bunx/npx/pnpm dlx (no PATH pollution):

npm install -g <package-or-tarball>   # or: bun install -g ...
# or on demand — any of these are equivalent
bunx --bun yet-another-opencode-plugin install --global
npx yet-another-opencode-plugin install --global
pnpm dlx yet-another-opencode-plugin install --global

--bun is a bunx-only flag; it is optional and not supported by npx/pnpm dlx.

2. Register the plugin in an opencode config

yet-another-opencode-plugin install adds the entry: --global targets ~/.config/opencode/opencode.json, the default targets ./opencode.json.

Until the package is published to npm, register the local build instead:

# after `bun run build`, use the local plugin file
bunx --bun yet-another-opencode-plugin install --global --entry-file

--entry-file writes the local dist/plugin.mjs path instead of the package name.

The Review and Dream agents, the Review's deep-dive subagents, and the skill paths are registered at runtime by the plugin — no manual editing. Both opencode.json and opencode.jsonc are supported; JSONC files are edited in place, preserving comments and formatting.

Usage

  • Review agent — cycle with Tab to the review agent, then ask it to review (e.g. "review the changes"). It is read-only, like Plan: it always runs the full protocol and reports; it never edits.
  • Dream agent — cycle with Tab to the dream agent to settle the architectural decisions of a new build before code is written. It is read-only: it asks the decisions that matter and hands a plan to Build.
  • Ruleset — the yaop communication + engineering rules are embedded by default in the review and dream agent prompts. The main Build/Plan agents are untouched.

Configuration

opencode validates opencode.json strictly, so plugin settings live in ~/.config/opencode/yaop.json:

{
  "yaop": {
    "review": {
      "model": "anthropic/claude-haiku-4-20250514",
      "deepDiveThreshold": "high",
      "parallelSkills": true
    },
    "dream": {
      "model": "anthropic/claude-haiku-4-20250514"
    }
  }
}
Key Default Meaning
review.model (inherit global) Override the model for the Review agent. Omit to use your global model; change at any time via /models.
review.deepDiveThreshold "high" Severity at or above which the Review spawns the matching deep-dive subagent. critical | high | medium | never.
review.parallelSkills true Analyze the four NFR layers in parallel (true) or one at a time (false).
review.deepDiveSubagents all true Per-layer toggle: { "security", "performance", "architecture" } booleans.
dream.model (inherit global) Override the model for the Dream planner. Omit to use your global model.

CLI equivalents: --review.model=MODEL, --review.deepDiveThreshold=T, --review.parallelSkills=true|false, --dream.model=MODEL.

How it works

  • plugin.mjs — server plugin. Registers the review primary agent, the dream primary agent, three hidden read-only deep-dive subagents (security-deep, performance-deep, architecture-deep), and the yaop-review/yaop-plan skill paths. Both primary agents carry the yaop ruleset embedded in their prompt.
  • Review agent — peer of Build/Plan, read-only: edit = deny, bash = ask (git read subcommands allowed), permission.task restricted to its own *-deep subagents. Protocol: determine target (git diff/status by default) → read full context → functional lenses → 4 NFR layers via the yaop-review skill → deep-dive subagent per layer at or above the threshold → one severity-ranked report.
  • Dream agent — peer of Build/Plan, read-only: edit = deny, bash = ask (git read subcommands allowed), permission.task denied. Protocol: classify the project (kind + concern tags) → prune the yaop-plan catalog → drive the question tool over the remaining decisions → confirm the idea → agree the Build execution mode → one concise hand-off plan. Writes no files.
  • yaop-review skill — pattern checklists for the four layers and a uniform finding output contract.
  • yaop-plan skill — the Dream's decision catalog and signal table, pruned by the project's kind + concern tags.

Development

bun install
bunx tsc --noEmit     # typecheck
bun test              # tests
bun run build         # bundle plugin + cli, copy markdown assets to dist/

License

MIT

About

Yet another opencode plugin for lean, direct AI workflows.

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages