Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5418e4c
feat(auto-advisor): rebuild Auto Advisor on OpenCode 2.2.0
capyBearista Oct 28, 2026
e349a30
fix(auto-advisor): stop consults when the run ends and keep real prom…
capyBearista Oct 28, 2026
baa3fd4
fix(auto-advisor): keep the Advisor transcript within budget and hard…
capyBearista Oct 28, 2026
ebd7d74
revert(auto-advisor): drop the guard for decision answers without pro…
capyBearista Oct 28, 2026
9f1169a
test(auto-advisor): remove a stray brace left by the previous revert
capyBearista Oct 28, 2026
b601da1
fix(auto-advisor): check and use config and telemetry files through o…
capyBearista Oct 28, 2026
cabe2c9
fix(auto-advisor): rotate telemetry through the open handle
capyBearista Oct 28, 2026
492ed5d
fix(auto-advisor): emit review events in order
capyBearista Oct 28, 2026
e1f78e3
feat(auto-advisor): accept #variant in model refs
capyBearista Oct 28, 2026
8483e78
feat(auto-advisor): compact host catalogs in the advisor's context
capyBearista Oct 29, 2026
5e46935
feat(auto-advisor): cap the advisor transcript at advisor.maxTokens
capyBearista Oct 29, 2026
9b56c9c
fix(auto-advisor): fail the advisor tool on an invalid config
capyBearista Oct 29, 2026
cfa1167
fix(auto-advisor): keep the newest message when trimming the advisor …
capyBearista Oct 29, 2026
77988ad
fix(auto-advisor): stop false done reviews and limit automatic consults
capyBearista Oct 30, 2026
5f1ff4b
feat(auto-advisor): move reviews to a sidebar widget and review panel
capyBearista Oct 30, 2026
366e5ad
fix(auto-advisor): show the decision model the user's recent requests
capyBearista Oct 31, 2026
77fcbb3
fix(auto-advisor): keep the sidebar widget to one line
capyBearista Oct 31, 2026
654891e
fix(auto-advisor): allow two consults per turn and report the cooldow…
capyBearista Oct 31, 2026
a823030
feat(auto-advisor): fall back through a chain of advisor models
capyBearista Oct 31, 2026
37765d1
feat(auto-advisor): log decision context and add a session timeline
capyBearista Oct 31, 2026
6799ba3
fix(auto-advisor): keep the turn when a compaction drops its prompt
capyBearista Oct 31, 2026
4a40d7d
fix(auto-advisor): fall back when a provider rejects a request mid-st…
capyBearista Oct 31, 2026
a905350
fix(auto-advisor): keep telemetry owner-only and correct the fallback…
capyBearista Oct 31, 2026
57c372a
fix(auto-advisor): name the provider's message when a chain moves on
capyBearista Oct 31, 2026
2f84dd4
fix(auto-advisor): label subagent results in the advisor transcript
capyBearista Oct 31, 2026
c47e4e0
fix(auto-advisor): keep the run-end listener alive after a failed event
capyBearista Oct 31, 2026
eeff360
docs(auto-advisor): note prompts a compaction absorbs
capyBearista Oct 31, 2026
363881e
revert(auto-advisor): drop the run-end listener retry
capyBearista Oct 31, 2026
8ea5d24
feat(auto-advisor): bring the advisor prompt and tool guidance closer…
capyBearista Oct 31, 2026
9ec077e
fix(auto-advisor): keep the advisor guidance true to what the plugin …
capyBearista Oct 31, 2026
e3765a1
fix(auto-advisor): cap each request sent to the decision model at 60k…
capyBearista Oct 31, 2026
94273b9
fix(auto-advisor): count exit notices only on shell results
capyBearista Oct 31, 2026
adbe443
fix(auto-advisor): match OpenCode 2.2.5's Code Mode catalog and requi…
capyBearista Oct 31, 2026
b81ed4a
fix(auto-advisor): count a shell notice only as its own result part
capyBearista Oct 31, 2026
851b757
fix(auto-advisor): default the decision request cap to 20k and docume…
capyBearista Oct 31, 2026
de8199f
fix(auto-advisor): read timeline pages from a file, not a pipe
capyBearista Nov 1, 2026
162dabe
docs(auto-advisor): correct the per-turn limit and the reviewer claim
capyBearista Nov 1, 2026
d28c88f
build(auto-advisor): typecheck the scripts
capyBearista Nov 1, 2026
78bdd50
feat(auto-advisor): add a live sandbox script
capyBearista Nov 1, 2026
e5cdc26
docs(auto-advisor): record the piped-output cut and point checks at t…
capyBearista Nov 1, 2026
5ba8758
fix(auto-advisor): run the sandbox in the foreground and keep its dat…
capyBearista Nov 1, 2026
2131cda
docs: drop the re-signing notes from AGENTS.md
capyBearista Nov 1, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Subdirectories contain specialized files that extend these rules.

### Plugin Development (MUST)

Scope: V1 packages. The five V2 ports use the Promise API instead; see the V2 boundary below.
Scope: V1 packages. The V2 packages use the Promise API instead; see the V2 boundary below.

- **MUST** keep server and TUI entrypoints split. If a plugin exposes both, publish separate `./server` and `./tui` exports instead of exporting both from one module.
- **MUST** verify the real runtime path when testing local plugins. Check both the package build output and the harness config that OpenCode actually loads.
Expand All @@ -30,7 +30,7 @@ Scope: V1 packages. The five V2 ports use the Promise API instead; see the V2 bo

### V2 Boundary (MUST)

Five packages have V2 ports; one remains V1-only. [`docs/v1-plugins.md`](docs/v1-plugins.md) is the compatibility authority for V1 install, pinning, and the V2 boundary — link it instead of duplicating version tables.
Five packages have V2 ports, one is V2-only, and one remains V1-only. [`docs/v1-plugins.md`](docs/v1-plugins.md) is the compatibility authority for V1 install, pinning, and the V2 boundary — link it instead of duplicating version tables.

| Package | V2 status |
| --- | --- |
Expand All @@ -39,10 +39,11 @@ Five packages have V2 ports; one remains V1-only. [`docs/v1-plugins.md`](docs/v1
| `opencode-adversarial-review` | Ported: server plugin, plural `plugins` in `opencode.json`; `2.x` on `latest` |
| `opencode-agent-prompt-inheritance` | V1 only; V2 port TBD |
| `opencode-output-styles` | Ported: combined server + TUI plugin, one plural `plugins` entry in `opencode.json` (TUI half loads automatically; requires OpenCode 2.2.0+); `2.x` on `latest`, V1 users pin `@1` |
| `opencode-auto-advisor` | V2-only: combined server + TUI plugin, one plural `plugins` entry in `opencode.json` (requires OpenCode 2.2.5+); `2.x` on `latest`, no V1 line |
| `opencode-ram-monitor` | Ported: TUI plugin (TUI-only since `2.1.0`, requires OpenCode 2.1+), plural `plugins` in `cli.json`; `2.x` on `latest` |

- **MUST** use the V2 Promise API in ports: `Plugin.define({ id, setup })` from `@opencode/plugin` 2.x. Do not carry V1 `server`/`config` hook signatures into a port.
- **MUST** keep V2 entrypoints at the package root: `server.js` for server plugins (loader, adversarial-review, output-styles, which also ships `tui.js`), `tui.js` for TUI plugins (timeline, ram-monitor). Filesystem-local config points at the package directory, not the entry file.
- **MUST** keep V2 entrypoints at the package root: `server.js` for server plugins (loader, adversarial-review, output-styles and auto-advisor, which also ship `tui.js`), `tui.js` for TUI plugins (timeline, ram-monitor). Filesystem-local config points at the package directory, not the entry file.
- **MUST** use the plural `"plugins"` key and split host config: server plugins in `opencode.json`, TUI plugins in `cli.json`. V1 keeps the singular `"plugin"` key in `opencode.json` / `tui.json`.
- **MUST NOT** write `@v2` as a specifier — npm parses it as a semver range. Use `@latest` (or an exact `@2.0.0` pin for a fixed setup).
- **MUST** keep V1 and V2 lines apart. The loader and timeline V1 releases are frozen but available by exact pin. Both lines may share the default config directory, so use separate profiles (`OPENCODE_CONFIG_DIR`) for side-by-side testing.
Expand Down Expand Up @@ -96,6 +97,7 @@ CI runs typecheck, lint, and test only — `bun run build` is a local-only gate;
### Packages
- **`packages/opencode-adversarial-review/`** → Adversarial code review plugin with a clean-context review subagent and `/adversarial-review` command (see `packages/opencode-adversarial-review/AGENTS.md`)
- **`packages/opencode-agent-prompt-inheritance/`** → Preserves provider system prompts when custom agents inject their own instructions (see `packages/opencode-agent-prompt-inheritance/AGENTS.md`)
- **`packages/opencode-auto-advisor/`** → Claude Code-style Advisor with Decision-model-triggered automatic reviews (see `packages/opencode-auto-advisor/AGENTS.md`)
- **`packages/opencode-agents-loader/`** → OpenCode plugin that extends command and agent discovery to ~/.agents/ and .agents/ directories (see packages/opencode-agents-loader/AGENTS.md)
- **`packages/opencode-double-tap-timeline/`** → OpenCode plugin (see packages/opencode-double-tap-timeline/AGENTS.md)
- **`packages/opencode-output-styles/`** → OpenCode plugin (see packages/opencode-output-styles/AGENTS.md)
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
| [⏱️ Double-Tap Timeline](./packages/opencode-double-tap-timeline/) | Open the session timeline with two Escape presses. |
| [🛠️ Agents Loader](./packages/opencode-agents-loader/) | Reuse agents and commands across AI coding tools. |
| [🗣️ Output Styles](./packages/opencode-output-styles/) | Customize how your agents approach conversations. |
| [🧭 Auto Advisor](./packages/opencode-auto-advisor/) | Get a second model's review at the moments that matter. |
| [💬 Agent Prompt Inheritance](./packages/opencode-agent-prompt-inheritance/) | **V1 only:** Preserve base model instructions when customizing agents. |

## Meet the Plugins
Expand Down Expand Up @@ -156,6 +157,16 @@ Switch between persistent response styles without repeating the same instruction

Includes Claude Code's built-in `Proactive`, `Concise`, `Explanatory`, and `Learning` styles, plus custom project-local and global styles. Use `/output-style`, the picker, or the clickable sidebar line to switch; each session keeps its own style, with a global setting for the rest.

### 🧭 Auto Advisor [[opencode-auto-advisor]](./packages/opencode-auto-advisor/)

<p>
<img src=".github/assets/opencode-v2.svg" alt="OpenCode V2 compatible" height="20" />
</p>

**A Claude Code-style Advisor for your agent.**

Your agent can call a zero-argument `advisor()` tool to have a second model, ideally a stronger one, review its work. By default, a fast Decision model also watches each step and brings in the Advisor on its own, at most twice per turn and once per 10 steps, when the agent is about to commit to an approach, is stuck, or is finishing, and a mistake would be costly. Reviews never edit the system prompt, so the prompt cache stays intact.

## Quick Start (OpenCode V2)

<p>
Expand All @@ -176,12 +187,13 @@ Add your selected server plugins to `opencode.json` or `opencode.jsonc`:
"plugins": [
"@capybearista/opencode-adversarial-review@latest",
"@capybearista/opencode-agents-loader@latest",
"@capybearista/opencode-output-styles@latest"
"@capybearista/opencode-output-styles@latest",
"@capybearista/opencode-auto-advisor@latest"
]
}
```

A plugin with both a server and a TUI half, such as Output Styles, needs only this one entry; its TUI half loads automatically, so it does not belong in `cli.json`.
A plugin with both a server and a TUI half, such as Output Styles or Auto Advisor, needs only this one entry; its TUI half loads automatically, so it does not belong in `cli.json`.

### 2. TUI plugins

Expand Down Expand Up @@ -213,6 +225,7 @@ The repository supports both OpenCode V2 and V1, but plugin availability and con
| [Double-Tap Timeline](./packages/opencode-double-tap-timeline/) | `@latest` · `cli.json` | 2.0.0 | `@1.0.1` · `tui.json(c)` |
| [RAM Monitor](./packages/opencode-ram-monitor/) | `@latest` · `cli.json` | 2.1.0 | `@1.1.0` · `opencode.json(c)` and `tui.json(c)` |
| [Output Styles](./packages/opencode-output-styles/) | `@latest` · `opencode.json(c)` | 2.2.0 | `@1` · `opencode.json(c)` |
| [Auto Advisor](./packages/opencode-auto-advisor/) | `@latest` · `opencode.json(c)` | 2.2.5 | Not available |
| [Agent Prompt Inheritance](./packages/opencode-agent-prompt-inheritance/) | Not yet ported | — | `@latest` · `opencode.json(c)` |

**Using OpenCode V1?** See the [V1 Plugin Guide](./docs/v1-plugins.md) for installation, version pinning, and upgrade instructions.
Expand Down
32 changes: 31 additions & 1 deletion bun.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ The root [README](../README.md) and package READMEs describe current installatio
| [opencode-plugin-ipc-and-os-patterns.md](./opencode-plugin-ipc-and-os-patterns.md) | Plugin-author reference | IPC and cross-platform patterns learned from building these plugins, with V1 and V2 startup examples. |
| [output-styles/claude-output-styles.md](./output-styles/claude-output-styles.md) | Upstream reference | Snapshot of Claude Code output-style docs. Background for the output-styles plugin, not a statement of this repo's behavior. |
| [output-styles/v2-port-findings.md](./output-styles/v2-port-findings.md) | Package note | What we verified about Claude Code output styles and OpenCode V2 while porting output-styles. |
| [auto-advisor/findings.md](./auto-advisor/findings.md) | Package note | OpenCode 2.2.x behavior the auto-advisor design rests on (2.2.0, rechecked on 2.2.5, the minimum): host Decision calls and errors, when entries land, tail delivery per protocol, retries, plus a re-verify recipe. |
| [ram-monitor/post-mortem-v1.0.0.md](./ram-monitor/post-mortem-v1.0.0.md) | Historical package note | What broke and what fixed it during ram-monitor 1.0.0 stabilization (V1; the config and session-discovery approach it describes was replaced in 2.1.0). |
| [adversarial-review/codex-comparison.md](./adversarial-review/codex-comparison.md) | Package note | Prompt-structure comparison between the official Codex plugin and this repo's review plugin. |

Expand Down
Loading
Loading