opencode-resolve 0.1.6 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  >
11
11
  > It is **not** a standalone application, not a model provider, not a separate CLI you run daily, and not a replacement for your `opencode.json` configuration. It is an OpenCode plugin and nothing more.
12
12
 
13
- It exposes a **fixed-role verified resolve loop** — **resolver** (context-efficient planner/judge) and **coder** (focused implementer) — running with auto-approved permissions so a task drives to completion without prompting at every step. The resolver inspects only relevant files, plans the smallest patch, dispatches coder with exact instructions, verifies, and iterates through verified checkpoints. Each checkpoint is retried up to 3 times on failure, then the resolver moves forward. Internal specialist subagents (**explorer**, **reviewer**, **deep-reviewer**) are injected by default as OpenCode-native subagents — available when the resolver judges them justified — but they are not part of the core path and are never user-facing primary roles. It defines roles, not model providers: agents inherit your OpenCode default model unless you pin them.
13
+ It exposes a **fixed-role verified resolve loop** — **resolver** (context-efficient planner/judge) and **coder** (focused implementer) — with low-friction permissions for edits, verification, and safe shell commands. The resolver inspects only relevant files, plans the smallest patch, dispatches coder with exact instructions, verifies, and iterates through verified checkpoints. Repeated failures trigger debugger/architect recovery guidance and, after repeated consecutive failures, the resolver should stop and report the blocker instead of pretending the task is complete. Internal specialist subagents (**explorer**, **reviewer**, **deep-reviewer**) are injected by default as OpenCode-native subagents — available when the resolver judges them justified — but they are not part of the core path and are never user-facing primary roles. It defines roles, not model providers: agents inherit your OpenCode default model unless you pin them.
14
14
 
15
15
  ```
16
16
  # Paste this into any AI coding assistant for fully guided setup
@@ -42,6 +42,7 @@ If OpenCode is not installed or not running, opencode-resolve does nothing.
42
42
  - [Quick Start](#quick-start)
43
43
  - [Drop-in setup (give to an LLM)](#drop-in-setup-give-to-an-llm)
44
44
  - [Default Behavior](#default-behavior)
45
+ - [Project Context Sources](#project-context-sources)
45
46
  - [Configuration](#configuration)
46
47
  - [Configuration Reference](#configuration-reference)
47
48
  - [Auto Approval](#auto-approval)
@@ -63,9 +64,10 @@ If OpenCode is not installed or not running, opencode-resolve does nothing.
63
64
  ## Features
64
65
 
65
66
  - **Fixed-role verified resolve loop** — `resolver` (context-efficient planner/judge) + `coder` (focused implementer)
66
- - **Context-efficient by default** — minimal file reads, smallest patch, targeted verification, checkpointed execution with max 3 retries per failing checkpoint
67
+ - **Context-efficient by default** — minimal file reads, smallest patch, targeted verification, checkpointed execution, and explicit blocker reporting when repeated fixes fail
68
+ - **Committed team context discovery** — detects `HARNESS.md`, `AGENTS.md`, `.opencode/context`, `.claude/context`, `context/`, and Agentic-style `thoughts/`, then lists task-relevant pattern documents without stuffing the whole repo into the prompt
67
69
  - **OpenCode-native internal specialist subagents** — `reviewer` (verification-gap audit), `explorer` (codebase scout), `deep-reviewer` (risky/security review) — injected as subagents by default but not part of the core path; resolver dispatches them only when justified
68
- - **Auto-approved permissions** — coder and resolver work without per-action prompts
70
+ - **Low-friction permissions** — edit/webfetch are allowed for write agents; bash is classifier-routed so safe commands are allowed, dangerous commands denied, and unknown commands still ask
69
71
  - **Context7 MCP** — auto-registers [Context7](https://context7.com) documentation lookup when `context7: true`
70
72
  - **Model pinning** — pin different models per role when you have measured a benefit; by default all roles inherit your OpenCode default model
71
73
  - **Soft parallel cap** — `maxParallelSubagents` controls how many coders the resolver fans out
@@ -138,7 +140,7 @@ Example minimal provider setup:
138
140
  }
139
141
  ```
140
142
 
141
- > No additional API keys or MCP servers are required. Context7 is auto-registered by the plugin.
143
+ > No additional API keys are required for the plugin itself. Context7 is auto-registered by the plugin. For GLM/ZAI users, postinstall may add a local ZAI MCP server bootstrap, but it does **not** copy API keys into `opencode.json`; export `Z_AI_API_KEY` in your shell if that MCP server requires it.
142
144
 
143
145
  ---
144
146
 
@@ -154,7 +156,7 @@ The `postinstall` script automatically:
154
156
 
155
157
  1. Adds `opencode-resolve` to `~/.config/opencode/opencode.json` `plugin` array (if not already present).
156
158
  2. Creates `~/.config/opencode/resolve.json` adapted to your current model provider when the file does not exist:
157
- - **GLM/ZAI model detected** → mixed GLM + GPT alias preset (`coder` GLM, `resolver` GPT).
159
+ - **GLM/ZAI model detected** → GLM-only alias preset (no GPT dependency) and a non-secret local ZAI MCP bootstrap.
158
160
  - **OpenAI/GPT model detected** → single-provider GPT preset using your current model for all roles.
159
161
  - **Other or no model** → model-neutral `models: {}` (all roles inherit OpenCode default).
160
162
 
@@ -190,7 +192,7 @@ If `postinstall` didn't register the plugin, add it to `~/.config/opencode/openc
190
192
  opencode
191
193
  ```
192
194
 
193
- You should now see `resolver` and `coder` agents available.
195
+ You should now see `resolver` available as the user-facing resolve agent. `coder` is enabled as a subagent for resolver to dispatch, so it may not appear in the primary picker.
194
196
 
195
197
  ---
196
198
 
@@ -307,7 +309,7 @@ The default flow does **not** write `maxParallelSubagents` to `resolve.json`. Th
307
309
 
308
310
  Only ask about `maxParallelSubagents` if the user explicitly mentions wanting to cap fan-out. Common case: GLM coding-plan users who want to **guarantee** they never burst beyond 1 or 2 coder calls. Suggested wording:
309
311
 
310
- > _(optional, ask only if relevant)_ _Your `coder` model is GLM — the coding-plan throttles under bursts. Pin `maxParallelSubagents: 2` to be safe?_
312
+ > _(optional, ask only if relevant)_ _Your `coder` model is GLM — the coding-plan throttles under bursts. Pin `maxParallelSubagents: 1` for strict serial coder dispatch?_
311
313
 
312
314
  Otherwise, omit the field entirely.
313
315
 
@@ -333,7 +335,7 @@ Otherwise, omit the field entirely.
333
335
  "planner": "gold"
334
336
  },
335
337
  "agents": {
336
- "coder": { "enabled": true, "mode": "all" },
338
+ "coder": { "enabled": true, "mode": "subagent" },
337
339
  "resolver": { "enabled": true },
338
340
  "explorer": { "enabled": true, "mode": "subagent" },
339
341
  "reviewer": { "enabled": true, "mode": "subagent" },
@@ -402,16 +404,16 @@ The output **must** include `resolver` and `coder` (and `reviewer` if enabled).
402
404
  | Agents appear but fail when invoked with "model not found" | A pinned model ID in `models` doesn't exist | Re-open `resolve.json`, replace the offending ID with one the user actually has, restart. |
403
405
  | The user said split but only one tier shows up | `models` block missing `fast` or `strong` | Re-run Step 3 from 3d. |
404
406
 
405
- Internal specialist subagents (`explorer`, `reviewer`, `deep-reviewer`) are subagent-only and won't appear in the primary picker — only `resolver` (and `coder` since it has `mode: "all"`) show up there.
407
+ Internal specialist subagents (`coder`, `explorer`, `reviewer`, `deep-reviewer`, `planner`) are subagent-only and won't appear in the primary picker — `resolver` is the default user-facing resolve agent.
406
408
 
407
409
  ### Why this template
408
410
 
409
411
  | Setting | Why |
410
412
  |---|---|
411
- | `enabled: ["coder", "resolver", "explorer", "reviewer", "deep-reviewer"]` | Fixed core path (resolver→coder) plus OpenCode-native internal specialist subagents injected by default |
412
- | `autoApprove: true` | Coder and resolver work without per-action prompts |
413
- | `maxParallelSubagents: 2` | Up to two coders may run in parallel for independent work |
414
- | `agents.coder.mode = "all"` | Coder appears in the agent picker, not just as a subagent |
413
+ | `enabled: ["coder", "resolver", "explorer", "reviewer", "deep-reviewer", "planner"]` | Fixed core path (resolver→coder) plus OpenCode-native internal specialist subagents injected by default |
414
+ | `autoApprove: true` | Compatibility/readability flag; actual low-friction behavior comes from base permissions plus the `permission.ask` bash classifier |
415
+ | no `maxParallelSubagents` by default | Keeps the resolver on soft fan-out guidance; GLM profile is token-efficient but does not impose a hard concurrency cap unless you set one |
416
+ | `agents.coder.mode = "subagent"` | Coder stays on the fixed resolver→coder path instead of becoming a user-facing primary role |
415
417
  | `agents.{explorer,reviewer,deep-reviewer}.mode = "subagent"` | Internal specialists are subagent-only — never user-facing primary roles |
416
418
  | `context7: true` | Plugin auto-registers Context7 MCP — no manual MCP config needed |
417
419
  | `models` aliases | Empty by default — all roles inherit the OpenCode default model. Pin role-specific models only when you have measured a benefit |
@@ -424,7 +426,7 @@ Internal specialist subagents (`explorer`, `reviewer`, `deep-reviewer`) are suba
424
426
  3. **For trivial work** — Resolver applies the small edit directly. No subagent needed.
425
427
  4. **Implement** — Dispatches `coder` with exact file paths and focused instructions.
426
428
  5. **Verify** — Runs the cheapest meaningful check first (targeted test, type check, or lint).
427
- 6. **Retry** — If issues remain, dispatches `coder` again with a focused fix. Max 3 attempts per failing checkpoint. When verified, proceed to the next checkpoint.
429
+ 6. **Recover** — If issues remain, dispatches `debugger` or `coder` again with a focused fix. After repeated consecutive failures, stop and report the blocker instead of claiming completion.
428
430
  7. **Report** — Returns a concise evidence summary: what changed, verification results, and any remaining blockers.
429
431
  8. **Internal specialists** — When justified: dispatch `explorer` (scope genuinely unknown), `reviewer` (verification gap on non-trivial changes), or `deep-reviewer` (risky/security/high-impact only). These are available by default as subagents but are not the core path.
430
432
 
@@ -434,16 +436,52 @@ Internal specialist subagents (`explorer`, `reviewer`, `deep-reviewer`) are suba
434
436
 
435
437
  | Item | Default |
436
438
  |---|---|
437
- | Enabled agents | `coder`, `resolver`, `explorer`, `reviewer`, `deep-reviewer` |
439
+ | Enabled agents | `coder`, `resolver`, `explorer`, `reviewer`, `deep-reviewer`, `planner` |
438
440
  | Core path | `resolver` → `coder` (fixed-role verified loop) |
439
441
  | Internal subagents | `explorer`, `reviewer`, `deep-reviewer` (subagent-only, dispatched when justified) |
440
442
  | Primary agent for new tasks | `resolver` (`mode: "all"`) |
441
443
  | Agent model | Inherits top-level OpenCode `model` |
442
444
  | Native `plan` / `build` | Preserved untouched |
445
+ | Project context sources | `HARNESS.md`, `AGENTS.md`, `CLAUDE.md`, `CONVENTIONS.md`, `.opencode/context`, `.claude/context`, `context/`, `thoughts/` |
443
446
  | Context7 MCP preset | Added automatically when `context7: true` |
444
447
  | Optional commands | Disabled |
445
- | `autoApprove` | `true` (no per-action prompts on coder/resolver) |
446
- | Max retries per checkpoint | 3 (via resolver prompt) |
448
+ | `autoApprove` | `true` (compatibility/readability flag; bash routing is handled by the permission hook) |
449
+ | Repeated-failure behavior | Diagnose, retry with a different fix, pivot to architect after heavy failure, then report blockers instead of claiming completion |
450
+
451
+ ---
452
+
453
+ ## Project Context Sources
454
+
455
+ opencode-resolve can discover committed project knowledge without loading the whole repository into the prompt. The resolver sees the available sources and should read only the documents relevant to the current task.
456
+
457
+ Detected top-level knowledge files:
458
+
459
+ | Source | Purpose |
460
+ |---|---|
461
+ | `HARNESS.md` | Build, verification, infrastructure, deployment, and project traps |
462
+ | `AGENTS.md` | Agent behavior, delegation rules, review expectations, local workflow |
463
+ | `CLAUDE.md` | Existing AI coding guidance used by other tools |
464
+ | `CONVENTIONS.md` | Code style, naming, architecture, and repository conventions |
465
+
466
+ Detected context directories:
467
+
468
+ | Source | Behavior |
469
+ |---|---|
470
+ | `.opencode/context/` | OpenCode/OAC-style team pattern docs |
471
+ | `.claude/context/` | Claude-style shared context docs |
472
+ | `context/` | Generic project context docs |
473
+ | `thoughts/` | Agentic-style persistent knowledge: architecture, tickets, research, plans, reviews |
474
+
475
+ For context directories, the plugin lists `.md`, `.mdx`, `.txt`, `.json`, `.jsonc`, `.yaml`, and `.yml` files up to a bounded depth and count. `thoughts/archive/` is intentionally skipped because archived notes are often stale or misleading.
476
+
477
+ Local runtime state is intentionally ignored by git:
478
+
479
+ ```text
480
+ .opencode/resolve-state.json
481
+ .opencode/*.local.json
482
+ ```
483
+
484
+ Committed context such as `.opencode/context/` and `thoughts/` is not ignored.
447
485
 
448
486
  ---
449
487
 
@@ -470,7 +508,7 @@ Minimal config (matches defaults):
470
508
 
471
509
  ```json
472
510
  {
473
- "enabled": ["coder", "resolver", "explorer", "reviewer", "deep-reviewer"],
511
+ "enabled": ["coder", "resolver", "explorer", "reviewer", "deep-reviewer", "planner"],
474
512
  "autoApprove": true,
475
513
  "context7": true,
476
514
  "commands": false
@@ -485,7 +523,7 @@ Inline form inside `opencode.json`:
485
523
  [
486
524
  "opencode-resolve",
487
525
  {
488
- "enabled": ["coder", "resolver", "explorer", "reviewer", "deep-reviewer"],
526
+ "enabled": ["coder", "resolver", "explorer", "reviewer", "deep-reviewer", "planner"],
489
527
  "autoApprove": true,
490
528
  "context7": true,
491
529
  "commands": false
@@ -505,12 +543,15 @@ Every accepted top-level option:
505
543
 
506
544
  | Key | Type | Default | Purpose |
507
545
  |---|---|---|---|
508
- | `enabled` | `string[]` | `["coder", "resolver", "explorer", "reviewer", "deep-reviewer"]` | Which resolve agents to inject. Core path: resolver→coder. Internal specialists (explorer, reviewer, deep-reviewer) are subagent-only. Per-agent `agents.<name>.enabled` overrides this. |
546
+ | `profile` | `"mix" \| "gpt" \| "glm"` | `"mix"` | Top-level operating profile. `mix` is the explicit default; `gpt` and `glm` apply provider-specific prompts, enabled-agent defaults, and chat parameters. |
547
+ | `tier` | `"bronze" \| "silver" \| "gold"` | _none_ | Optional enabled-agent preset. `bronze` is minimal, `silver` is standard, `gold` enables the full specialist set. |
548
+ | `enabled` | `string[]` | `["coder", "resolver", "explorer", "reviewer", "deep-reviewer", "planner"]` | Which resolve agents to inject. Core path: resolver→coder. Internal specialists (coder, explorer, reviewer, deep-reviewer, planner) are subagent-only. Per-agent `agents.<name>.enabled` overrides this. |
509
549
  | `preserveNative` | `boolean` | `true` | Native `plan`/`build` are always preserved. Accepted for readability. |
510
550
  | `context7` | `boolean` | `true` | When true, registers the Context7 MCP server unless already configured. |
511
551
  | `commands` | `boolean` | `false` | When true, adds `resolve`, `resolve-code`, `resolve-review` commands. |
512
- | `autoApprove` | `boolean` | `true` | Flips default `"ask"` permissions to `"allow"` on enabled agents. Never touches `"deny"` or user-set keys. |
513
- | `maxParallelSubagents` | `positive integer` | `2` | Cap on simultaneous subagents the resolver dispatches per role. |
552
+ | `autoApprove` | `boolean` | `true` | Compatibility/readability flag. Current behavior is controlled by built-in base permissions and the `permission.ask` bash classifier; the flag does not rewrite permissions. |
553
+ | `autoUpdate` | `boolean` | `true` | Best-effort npm version check and OpenCode plugin cache refresh notice. Set false to disable. |
554
+ | `maxParallelSubagents` | `positive integer` | _unset_ | Optional prompt-level cap on simultaneous coders. When unset, the resolver uses soft fan-out guidance and backs off on rate-limit errors. GLM profile does not impose a hard cap unless you set one. |
514
555
  | `models` | `object` | `{}` | Alias map. Keys are agent names or `fast`/`strong`/`mini`/`codex`/`quick`/`deep`/`glm`/`gpt`. Values are model ids or other aliases. Empty by default — all roles inherit the OpenCode default model. |
515
556
  | `agents` | `object` | `{}` | Per-agent overrides (see below). |
516
557
  | `config` | `string` | _none_ | Custom path to a config file (relative to the project or absolute). |
@@ -549,19 +590,20 @@ A fully-annotated reference config ships with the package as [`opencode-resolve.
549
590
 
550
591
  ## Auto Approval
551
592
 
552
- `autoApprove` (default `true`) flips every `"ask"` permission on the **enabled** agents to `"allow"`, so coder and resolver work continuously without per-action prompts. It never touches `"deny"` and never overrides a permission key the user explicitly set.
593
+ `autoApprove` (default `true`) is now a compatibility/readability flag. It is accepted in config so older `resolve.json` files continue to load, but the current harness does **not** rewrite permissions from `"ask"` to `"allow"`.
553
594
 
554
- | Permission state | autoApprove: true | autoApprove: false |
555
- |---|---|---|
556
- | Default `"ask"` | becomes `"allow"` | stays `"ask"` |
557
- | Default `"deny"` | stays `"deny"` | stays `"deny"` |
558
- | User explicit `"ask"` | stays `"ask"` | stays `"ask"` |
559
- | User explicit `"allow"` | stays `"allow"` | stays `"allow"` |
560
- | User explicit `"deny"` | stays `"deny"` | stays `"deny"` |
595
+ Low-friction autonomous behavior comes from two explicit defaults:
561
596
 
562
- Agents with `"deny"` defaults (e.g. reviewer's `edit` and `bash`) keep those denials even with `autoApprove: true`. Reviewer is enabled by default as an internal subagent — its deny permissions ensure it stays read-only.
597
+ | Permission | Current default behavior |
598
+ |---|---|
599
+ | Write-agent `edit` / `webfetch` | `allow` |
600
+ | Write-agent `bash` | `ask`, routed through the plugin's `permission.ask` classifier |
601
+ | Safe bash commands | Auto-allowed by classifier |
602
+ | Dangerous bash commands | Auto-denied by classifier |
603
+ | Unknown bash commands | Left as `ask` for OpenCode/user handling |
604
+ | Read-only agent `edit` / `bash` | `deny`; write-capable plugin tools also block read-only agents |
563
605
 
564
- Turn it off when you want the conservative ask-every-time behavior:
606
+ You may leave the flag in config for intent clarity:
565
607
 
566
608
  ```json
567
609
  {
@@ -569,18 +611,18 @@ Turn it off when you want the conservative ask-every-time behavior:
569
611
  }
570
612
  ```
571
613
 
572
- > **Trust note:** `autoApprove: true` assumes you trust the workspace and the model you have configured. Use a sandbox or VM for untrusted code, and keep `autoApprove: false` if you want to inspect every action.
614
+ > **Trust note:** low-friction write-agent permissions assume you trust the workspace and configured model. Use a sandbox or VM for untrusted code. Bash remains classifier-routed rather than blindly allowed.
573
615
 
574
616
  ---
575
617
 
576
618
  ## Parallel Subagent Limit
577
619
 
578
- `maxParallelSubagents` (default `2`) caps how many subagents the **resolver** may dispatch concurrently **per role** for context efficiency. The default of `2` lets up to two coders run in parallel for genuinely independent work.
620
+ `maxParallelSubagents` is optional. When omitted, the **resolver** uses soft fan-out guidance: dispatch coders for genuinely independent work and back off on rate-limit errors. Set it only when you want the resolver prompt to carry an explicit per-role concurrency cap. GLM profile is token-efficient but uncapped by default.
579
621
 
580
622
  | Value | Behavior |
581
623
  |---|---|
582
624
  | `1` | Strictly one coder at a time. |
583
- | `2` (default) | Up to two coders concurrently. Useful when fanning out genuinely independent work. |
625
+ | `2` | Up to two coders concurrently. Useful when fanning out genuinely independent work. |
584
626
  | `N > 2` | Up to N coders concurrently. Use sparingly to avoid context waste. |
585
627
 
586
628
  Override per project or per user:
@@ -601,7 +643,7 @@ The limit is templated into the prompt at config-load time, so restart OpenCode
601
643
 
602
644
  When you upgrade to a newer version of `opencode-resolve`, the `postinstall` script runs an **additive migration** on your existing `~/.config/opencode/resolve.json`:
603
645
 
604
- - Adds new top-level keys (e.g. `autoApprove`, `maxParallelSubagents`) with their defaults if they are absent.
646
+ - Adds new top-level keys (currently `autoApprove`) with their defaults if they are absent.
605
647
  - **Never** modifies keys you have already set.
606
648
  - **Never** rewrites your `enabled` list, `models` map, or `agents` overrides.
607
649
  - If `enabled` is set and does not include `"resolver"`, prints a one-line tip suggesting you add it. Your file is left untouched.
@@ -612,9 +654,10 @@ When `resolve.json` does **not** exist, postinstall inspects your OpenCode model
612
654
 
613
655
  | Detected provider | Preset |
614
656
  |---|---|
615
- | GLM / ZAI | Mixed GLM + GPT: coder/explorer → GLM, resolver/reviewer/deep-reviewer GPT |
657
+ | GLM/ZAI + OpenAI/GPT | Mixed: `profile: "mix"`, GLM for scout/coder aliases, GPT for resolver/reviewer/planner aliases |
658
+ | GLM / ZAI | GLM-only: all resolve agents use GLM aliases, avoiding GPT dependency |
616
659
  | OpenAI / GPT | Single-provider: all roles use your current OpenAI model |
617
- | Other or none | Model-neutral: `models: {}` (all roles inherit OpenCode default) |
660
+ | Other or none | `profile: "mix"` with model-neutral `models: {}` (all roles inherit OpenCode default) |
618
661
 
619
662
  To change presets at any time, edit `models` in `resolve.json` directly or delete the file and reinstall.
620
663
 
@@ -718,17 +761,18 @@ Aliases only resolve when defined in `models`. Agent names (`coder`, `resolver`,
718
761
 
719
762
  | Agent | Default | Mode | Edit | Bash | WebFetch | Purpose |
720
763
  |---|:---:|---|---|---|---|---|
721
- | `resolver` | Yes (core) | `all` | ask → allow | ask allow | ask → allow | Context-efficient orchestrator. Decomposes work into verified checkpoints, dispatches coder, verifies each, carries forward. Max 3 retries per failing checkpoint. |
722
- | `coder` | Yes (core) | `subagent` | ask → allow | ask allow | ask → allow | Focused implementer. Smallest correct patch. Reads only needed files. |
723
- | `explorer` | Yes (subagent) | `subagent` | **deny** | ask → allow | ask → allow | Internal fast codebase scout. Resolver dispatches when scope is genuinely unknown; prefers local read/grep/glob for narrow scope. |
724
- | `reviewer` | Yes (subagent) | `subagent` | **deny** | **deny** | ask → allow | Internal verification-gap auditor. Resolver dispatches for post-change verification gaps on non-trivial changes. |
725
- | `deep-reviewer` | Yes (subagent) | `subagent` | **deny** | **deny** | ask → allow | Internal thorough review for risky/security/architecture changes. Resolver dispatches ONLY for high-impact work. |
726
- | `architect` | No | `subagent` | deny | ask allow | ask allow | Design and task decomposition. |
727
- | `gpt-coder` | No | `subagent` | ask allow | ask → allow | ask allow | Stronger-reasoning implementation fallback. |
728
- | `debugger` | No | `subagent` | ask → allow | ask allow | ask → allow | Reproduction and root-cause analysis. |
729
- | `researcher` | No | `subagent` | deny | ask allow | ask → allow | Codebase and documentation research. |
730
-
731
- `ask → allow` means the default is `"ask"` and `autoApprove` (default on) flips it to `"allow"`. Set `autoApprove: false` to keep them as `"ask"`.
764
+ | `resolver` | Yes (core) | `all` | allow | ask (classifier-routed) | allow | Context-efficient orchestrator. Decomposes work into verified checkpoints, dispatches coder, verifies each, and reports blockers when repeated recovery fails. |
765
+ | `coder` | Yes (core) | `subagent` | allow | ask (classifier-routed) | allow | Focused implementer. Smallest correct patch. Reads only needed files. |
766
+ | `explorer` | Yes (subagent) | `subagent` | **deny** | **deny** | allow | Internal fast codebase scout. Resolver dispatches when scope is genuinely unknown; prefers local read/grep/glob for narrow scope. |
767
+ | `reviewer` | Yes (subagent) | `subagent` | **deny** | **deny** | allow | Internal verification-gap auditor. Resolver dispatches for post-change verification gaps on non-trivial changes. |
768
+ | `deep-reviewer` | Yes (subagent) | `subagent` | **deny** | **deny** | allow | Internal thorough review for risky/security/architecture changes. Resolver dispatches ONLY for high-impact work. |
769
+ | `planner` | Yes (subagent) | `subagent` | **deny** | **deny** | allow | Explicit-plan specialist. Resolver dispatches only when the user asks for a plan/decomposition/strategy. |
770
+ | `architect` | No | `subagent` | **deny** | **deny** | allow | Design and task decomposition. |
771
+ | `gpt-coder` | No | `subagent` | allow | ask (classifier-routed) | allow | Stronger-reasoning implementation fallback. |
772
+ | `debugger` | No | `subagent` | allow | ask (classifier-routed) | allow | Reproduction and root-cause analysis. |
773
+ | `researcher` | No | `subagent` | **deny** | **deny** | allow | Codebase and documentation research. |
774
+
775
+ `bash: ask` is intentional for write agents: the plugin's `permission.ask` hook auto-allows known safe commands, auto-denies dangerous commands, and leaves unknown commands for OpenCode/user handling.
732
776
 
733
777
  Supported modes:
734
778
 
@@ -746,14 +790,15 @@ Supported model alias keys: `fast`, `strong`, `mini`, `codex`, `quick`, `deep`,
746
790
 
747
791
  ### Resolver orchestration rules
748
792
 
749
- The resolver uses a context-efficient approach with checkpointed execution (max 3 retries per failing checkpoint):
793
+ The resolver uses a context-efficient approach with checkpointed execution and repeated-failure recovery:
750
794
 
751
795
  - **Classify** the work as quick, normal, deep, or risky before planning.
752
796
  - **Inspect only relevant files** using local tools — avoid broad exploration.
753
797
  - For trivial work, apply edits directly — no subagent needed.
754
798
  - Dispatch **coder** with focused file/behavior instructions.
755
799
  - Run the **cheapest meaningful verification** first.
756
- - Retry from verification logs if issues remain. Max 3 attempts per failing checkpoint; then move forward or report the blocker.
800
+ - Retry from verification logs if issues remain; on verification failure, diagnose root cause before re-dispatching a coder with a different fix.
801
+ - After repeated consecutive failures, stop and report the blocker instead of claiming completion; after heavy failure counts, pivot to `architect` for a different strategy.
757
802
  - Use **explorer** only when scope is genuinely unknown and local read/grep/glob are insufficient (internal subagent, not core path).
758
803
  - Use **reviewer** only when a verification gap exists on non-trivial changes (internal subagent, not core path).
759
804
  - Use **deep-reviewer** only for risky, security-sensitive, architectural, or high-impact changes (internal subagent, not core path).
@@ -785,7 +830,7 @@ When `context7: true` (the default), the plugin automatically registers the [Con
785
830
  }
786
831
  ```
787
832
 
788
- This gives all resolve agents access to up-to-date library and framework documentation through the `resolve-library-id` and `query-docs` tools — no manual MCP configuration needed.
833
+ This gives resolve agents access to Context7's documentation tools through OpenCode's MCP integration — no manual MCP configuration needed.
789
834
 
790
835
  To disable Context7 registration (e.g. you already have it configured, or you don't want it):
791
836
 
@@ -905,7 +950,7 @@ The release workflow runs `npm ci`, `npm run typecheck`, `npm test`, and `npm pu
905
950
  - Resolver dispatches `reviewer` only for verification gaps on non-trivial changes.
906
951
  - Resolver dispatches `deep-reviewer` only for risky, security-sensitive, architectural, or high-impact changes.
907
952
  - Reviewer and deep-reviewer are read-only — fixes always go through `coder` or `resolver`.
908
- - Max 3 retries per failing checkpoint to avoid wasted context. Large tasks are decomposed into verified checkpoints.
953
+ - Repeated verification failures trigger diagnosis, a different fix strategy, and blocker reporting instead of silent loop continuation. Large tasks are decomposed into verified checkpoints.
909
954
  - The resolver honors `maxParallelSubagents` for context efficiency.
910
955
  - Search and inspect before editing. Make the smallest correct change. Verify when practical.
911
956
  - Read only needed files. Avoid broad exploration. Targeted verification, not full suites.
@@ -0,0 +1,26 @@
1
+ import { ResolveAgentName, ResolveAgentConfig, ModelAlias, TierName } from "./types.js";
2
+ export declare const DEFAULT_MODELS: Partial<Record<ModelAlias, string>>;
3
+ export declare const DEFAULT_ENABLED: ResolveAgentName[];
4
+ export declare const VALID_AGENT_NAMES: readonly ["coder", "reviewer", "resolver", "glm", "architect", "gpt-coder", "debugger", "researcher", "explorer", "deep-reviewer", "planner"];
5
+ export declare const VALID_AGENT_NAME_SET: Set<string>;
6
+ export declare const DEFAULT_AGENT_CONFIG: Record<ResolveAgentName, Required<Pick<ResolveAgentConfig, "mode" | "description" | "prompt" | "color">> & ResolveAgentConfig>;
7
+ export declare const GLM_CODER_PROMPT: string;
8
+ export declare const GPT_CODER_PROMPT: string;
9
+ export declare function buildGLMResolverPrompt(maxParallelSubagents: number | undefined): string;
10
+ export declare function buildGPTResolverPrompt(): string;
11
+ export declare function buildResolverPrompt(maxParallelSubagents: number | undefined): string;
12
+ export declare const VALID_MODEL_ALIASES: readonly ["coder", "reviewer", "resolver", "glm", "architect", "gpt-coder", "debugger", "researcher", "explorer", "deep-reviewer", "planner", "glm", "gpt", "quick", "deep", "fast", "strong", "mini", "codex", "bronze", "silver", "gold"];
13
+ export declare const VALID_MODEL_ALIAS_SET: Set<string>;
14
+ export declare const VALID_PROFILES: Set<string>;
15
+ export declare const VALID_TIERS: Set<string>;
16
+ export declare const GLM_ENABLED: ResolveAgentName[];
17
+ export declare const GPT_ENABLED: ResolveAgentName[];
18
+ export declare const TIER_ENABLED: Record<TierName, ResolveAgentName[]>;
19
+ export declare const GLM_AGENT_OVERRIDES: Partial<Record<ResolveAgentName, {
20
+ maxSteps?: number;
21
+ description?: string;
22
+ }>>;
23
+ export declare const GPT_AGENT_OVERRIDES: Partial<Record<ResolveAgentName, {
24
+ maxSteps?: number;
25
+ description?: string;
26
+ }>>;