@wpro-eng/opencode-config 1.4.0 → 1.5.0

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
@@ -67,10 +67,19 @@ Create `~/.config/opencode/wpromote.json` or `~/.config/opencode/wpromote.jsonc`
67
67
 
68
68
  ### Orchestration Runtime Configuration
69
69
 
70
+ All fields below show their **defaults**. You only need to include fields you want to override.
71
+
70
72
  ```json
71
73
  {
72
74
  "orchestration": {
73
75
  "providerMode": "copilot",
76
+ "features": {
77
+ "delegation": true,
78
+ "diagnostics": true,
79
+ "lookAt": true,
80
+ "continuousLoop": true,
81
+ "selfHealing": true
82
+ },
74
83
  "limits": {
75
84
  "maxConcurrent": 3,
76
85
  "maxRetries": 2,
@@ -88,7 +97,7 @@ Create `~/.config/opencode/wpromote.json` or `~/.config/opencode/wpromote.jsonc`
88
97
  "providerOrder": ["copilot", "native"]
89
98
  },
90
99
  "hooks": {
91
- "disabled": ["activity-feed"],
100
+ "disabled": [],
92
101
  "telemetry": true
93
102
  },
94
103
  "notifications": {
@@ -96,31 +105,25 @@ Create `~/.config/opencode/wpromote.json` or `~/.config/opencode/wpromote.jsonc`
96
105
  "maxItems": 100
97
106
  },
98
107
  "categories": {
99
- "routing": {
100
- "quick": "native"
101
- },
102
- "maxConcurrent": {
103
- "quick": 1
104
- }
108
+ "routing": {},
109
+ "maxConcurrent": {}
105
110
  },
106
111
  "recovery": {
107
112
  "autoResumeOnStart": true
108
113
  },
109
114
  "tmux": {
110
115
  "enabled": false,
111
- "layout": "main-vertical",
112
- "mainPaneSize": 60,
113
- "mainPaneMinWidth": 120,
114
- "agentPaneMinWidth": 40,
115
116
  "sessionPrefix": "wpo"
116
117
  }
117
118
  }
118
119
  }
119
120
  ```
120
121
 
121
- Tmux support is optional and only active when `orchestration.tmux.enabled` is `true` and OpenCode is running inside a tmux session. When enabled, task launches can attach a live pane, queue attachment when pane capacity is full, and auto-clean up panes when tasks complete, fail, stop, or parent sessions end.
122
+ Tmux support is optional and only active when `orchestration.tmux.enabled` is `true` and OpenCode is running inside a tmux session. When enabled, a dedicated tmux session (`{sessionPrefix}-{opencode-session-id}`) is created for each OpenCode session, and each subagent task gets its own window inside that session. Windows are automatically cleaned up when tasks complete, fail, stop, or parent sessions end. Use `tmux switch-client -t wpo-*` to peek at agent work.
123
+
124
+ Feature flags (`orchestration.features`) toggle individual orchestration capabilities. Set any to `false` to disable that feature while keeping the rest active.
122
125
 
123
- Category policies are optional. Use `orchestration.categories.routing` to override provider mode per task category (for example, `quick` -> `native`) and `orchestration.categories.maxConcurrent` to cap active tasks per category.
126
+ Category policies are optional. Use `orchestration.categories.routing` to override provider mode per task category (for example, `"quick": "native"`) and `orchestration.categories.maxConcurrent` to cap active tasks per category (for example, `"quick": 1`).
124
127
 
125
128
  Recovery policies are optional. `orchestration.recovery.autoResumeOnStart` controls whether queued/running/retrying task records from prior sessions are automatically restored into `queued` state on startup.
126
129
 
@@ -246,28 +249,86 @@ EOF
246
249
 
247
250
  ## What's Included
248
251
 
249
- ### Skills (`skill/`)
250
- Reusable skill files that agents can load. Each skill is a directory containing `SKILL.md` with YAML frontmatter.
251
-
252
252
  ### Agents (`agent/`)
253
- Pre-configured agent definitions with model, temperature, and system prompts.
253
+
254
+ Pre-configured agent definitions with model, temperature, and system prompts. There are two **primary** agents (you talk to them directly) and seven **subagents** (they run in the background, delegated by the primary agent).
255
+
256
+ #### Primary Agents
257
+
258
+ | Agent | Model | What it does |
259
+ |-------|-------|--------------|
260
+ | `gandalf` | Claude Opus 4 | The default orchestrator. Classifies your request, breaks it into tasks, delegates to the right subagents in parallel, and assembles the final result. Handles everything from quick fixes to multi-step projects. |
261
+ | `samwise` | Claude Opus 4 | A higher-rigor variant of Gandalf for long-running complex work. Runs a sustained execution loop with tighter milestone verification, aggressive parallelism, and continuous health monitoring. Use when a task needs hours of autonomous work without hand-holding. |
262
+
263
+ #### Subagents
264
+
265
+ | Agent | Model | When Gandalf calls it | What it does |
266
+ |-------|-------|-----------------------|--------------|
267
+ | `legolas` | Claude Sonnet 4.6 | "Where is X in the codebase?" | Searches the repo fast. Uses LSP, grep, glob, and git to find files, symbols, call paths, and code patterns. Returns structured results with absolute paths and a direct answer, not just a file list. Read-only by default. |
268
+ | `radagast` | GPT-5.2 | "How does library X work?" | Researches external docs, OSS repos, and the web. Classifies the question (conceptual, implementation, history, or comprehensive), fetches official sources, and returns evidence-backed recommendations with links. |
269
+ | `treebeard` | GPT-5.2 | "Is this plan solid?" | Reviews plans for ambiguity, risk, and executability before implementation starts. Surfaces hidden assumptions, produces concrete acceptance criteria, and gives a clear OKAY or REJECT verdict with at most 3 blocking issues. |
270
+ | `celebrimbor` | GPT-5.2 Codex | "Build this end-to-end." | The workhorse implementation agent. Operates like a senior staff engineer: explores context, plans edits, executes changes, runs tests, and iterates until done. Does not stop at partial progress or ask permission for normal engineering work. |
271
+ | `elrond` | GPT-5.2 | "What's the right architecture?" | Read-only strategic advisor. Analyzes codebases, evaluates tradeoffs, and returns a bottom-line recommendation with an action plan and effort estimate. Biases toward simplicity and existing patterns over speculative complexity. |
272
+ | `galadriel` | Gemini 3.1 Pro | "What's in this image/PDF?" | Multimodal analysis specialist. Handles PDFs, images, diagrams, and charts that other agents cannot process as plain text. Extracts targeted information and returns concise findings with confidence notes. |
273
+ | `aragorn` | GPT-5.2 Codex | "Write tests for this." | Strict TDD specialist following Red-Green-Refactor. Writes a failing test first, makes it pass with minimal code, then refactors under green. Produces a test plan, TDD log, execution results, and a quality scorecard. Never writes production code without a failing test. |
254
274
 
255
275
  ### Commands (`command/`)
276
+
256
277
  Slash commands available to all team members.
257
278
 
279
+ | Command | Description |
280
+ |---------|-------------|
281
+ | `/continue` | Enable continuous deepwork loop for current session |
282
+ | `/stop` | Stop continuous loop and halt queued orchestration work |
283
+ | `/tasks` | List active and recent subagent orchestration tasks |
284
+ | `/task` | Show details for one subagent orchestration task |
285
+ | `/diagnostics` | Run orchestration diagnostics with live delegation probes |
286
+ | `/doctor` | Run deep orchestration doctor checks with actionable remediation |
287
+ | `/look-at` | Normalize multimodal request and execute look_at analysis |
288
+ | `/test-orchestration` | Run a parallel subagent delegation torture test audit |
289
+ | `/wpromote-status` | Show status for wpromote team config |
290
+ | `/wpromote-list` | List all team assets from wpromote config |
291
+ | `/wpromote-cleanup` | Remove stale cache files, broken symlinks, and unused plugins |
292
+ | `/example` | Example command demonstrating the expected format |
293
+
294
+ ### Skills (`skill/`)
295
+
296
+ Reusable skill files that agents can load. Each skill is a directory containing `SKILL.md` with YAML frontmatter.
297
+
298
+ | Skill | Description |
299
+ |-------|-------------|
300
+ | `orchestration-core` | Continuous loop orchestration, delegation visibility, and diagnostics workflow |
301
+ | `readme-editor` | Craft professional README.md files for GitHub open source projects |
302
+ | `example` | Example skill demonstrating the expected format |
303
+
258
304
  ### Plugins (`plugin/`)
305
+
259
306
  OpenCode hook plugins for team-wide automation.
260
307
 
308
+ | Plugin | Description |
309
+ |--------|-------------|
310
+ | `wpromote-orchestration` | Orchestration runtime: task tracking, tmux sessions, provider fallback, recovery |
311
+ | `wpromote-look-at` | Multimodal analysis wrapper for the look_at workflow |
312
+
261
313
  ### Instructions (`instruction/`)
262
- Markdown files automatically appended to agent context (like AGENTS.md).
314
+
315
+ Markdown files automatically appended to agent context (registered in `manifest.json`).
316
+
317
+ | Instruction | Description |
318
+ |-------------|-------------|
319
+ | `getting-started` | Quick start guide for Wpromote OpenCode |
320
+ | `team-conventions` | Code style, git workflow, and contribution conventions |
321
+ | `orchestration-runtime` | Orchestration controls, delegation discipline, tmux runtime |
263
322
 
264
323
  ### MCPs (`mcp/`)
324
+
265
325
  Model Context Protocol server configurations.
266
326
 
267
- Current team MCP configs include:
268
- - `chrome-devtools` (`https://www.npmjs.com/package/chrome-devtools-mcp` via `npx`)
269
- - `context7` (`https://mcp.context7.com/mcp`)
270
- - `exa` (`https://mcp.exa.ai/mcp`)
327
+ | MCP | Type | Endpoint |
328
+ |-----|------|----------|
329
+ | `chrome-devtools` | local | `npx chrome-devtools-mcp@latest` |
330
+ | `context7` | remote | `https://mcp.context7.com/mcp` |
331
+ | `exa` | remote | `https://mcp.exa.ai/mcp` |
271
332
 
272
333
  ## Development
273
334
 
@@ -1,38 +1,99 @@
1
1
  ---
2
- description: Run orchestration diagnostics with explicit delegation and task visibility checks
2
+ description: Run orchestration diagnostics with live delegation probes and task visibility checks
3
3
  ---
4
- Run full diagnostics for orchestration configuration and runtime health.
4
+ Run full diagnostics for orchestration configuration, runtime health, and live delegation verification.
5
5
 
6
6
  Instructions:
7
+
8
+ ## Phase 1: Tool & Config Health
9
+
7
10
  1. Check tool availability first:
8
11
  - If `wpromote_orchestration` is unavailable, report `FAIL: Tool Unavailable` and stop.
9
12
  - Include short remediation steps (install/sync/restart).
10
13
  2. Call `wpromote_orchestration` with `action="diagnostics"`.
11
- 3. Call `wpromote_orchestration` with `action="tasks"`.
12
- 4. Enumerate enabled assets:
14
+ 3. Call `wpromote_orchestration` with `action="tasks"` to capture pre-probe baseline.
15
+
16
+ ## Phase 2: Live Delegation Probe
17
+
18
+ 4. Spawn 4 subagent probes in parallel using the `task` tool. Each probe must be a trivial, fast, read-only task that proves the delegation pipeline works end-to-end. Do NOT run destructive or write operations.
19
+
20
+ **Probe A — legolas (codebase exploration)**:
21
+ - Task: "List the top-level directories and count of files in this repo. Return the directory listing."
22
+ - Expected: completes with a directory listing.
23
+
24
+ **Probe B — radagast (external research)**:
25
+ - Task: "What license does the tmux terminal multiplexer use? Search the web and return the license name (e.g. MIT, BSD, ISC, GPL)."
26
+ - Expected: completes with a license name (ISC).
27
+
28
+ **Probe C — treebeard (planning)**:
29
+ - Task: "Review this single-sentence plan and identify one risk: 'We will migrate all configs to YAML next sprint.' Return your risk assessment in 2-3 sentences."
30
+ - Expected: completes with a short risk assessment.
31
+
32
+ **Probe D — general (general-purpose)**:
33
+ - Task: "Read the file manifest.json in the repo root and return its contents."
34
+ - Expected: completes with JSON content.
35
+
36
+ 5. Wait for all 4 probes to complete (or timeout after 120 seconds each).
37
+
38
+ 6. For each probe, record:
39
+ - task_id
40
+ - subagent type
41
+ - status (completed / failed / timed out)
42
+ - round-trip wall time (note when dispatched vs when result returned)
43
+ - whether the result was non-empty and plausible
44
+
45
+ ## Phase 3: Post-Probe Verification
46
+
47
+ 7. Call `wpromote_orchestration` with `action="tasks"` again to verify:
48
+ - All 4 probe tasks appear in the task list.
49
+ - Task statuses are correctly tracked.
50
+ - If tmux is enabled, note whether windows were attached/detached during probes.
51
+
52
+ ## Phase 4: Asset Enumeration
53
+
54
+ 8. Enumerate enabled assets:
13
55
  - `tools`: list enabled tools, each with a short description.
14
56
  - `commands`: use `glob("command/*.md")`; report `/name` + frontmatter description.
15
57
  - `agents`: use `glob("agent/*.md")`; report name + frontmatter description.
16
58
  - `subagents`: report available Task subagent types + short purpose.
17
59
  - `skills`: report available skills + each skill description.
18
60
  - `instructions`: read `manifest.json`; include entries and currently loaded AGENTS/instructions visible in session context.
19
- 5. Present diagnostics PASS/FAIL first.
20
- 6. Add **Delegation & Task Health** with:
21
- - subagent delegation availability
22
- - total tracked tasks (active + recent)
23
- - active task count
24
- - recent completion/failure/cancel counts (if available)
25
- - whether task visibility looks healthy
26
- - tmux pane health (attached/queued/missing counts if tmux is enabled)
27
- 7. If tasks exist, list up to 5 recent tasks (id, status, short title).
28
- 8. Always include these sections in this exact order (even when empty):
29
- - PASS/FAIL Findings
30
- - Runtime Health
31
- - Delegation & Task Health
32
- - Enabled Tools
33
- - Enabled Commands
34
- - Enabled Agents
35
- - Enabled Subagents
36
- - Enabled Skills
37
- - Enabled Instructions
38
- 9. If any checks fail, include short remediation steps.
61
+
62
+ ## Phase 5: Report
63
+
64
+ 9. Present the report with these sections in this exact order (even when empty):
65
+
66
+ **PASS/FAIL Findings**
67
+ - All config/runtime checks from Phase 1.
68
+ - Each probe result as its own PASS/FAIL line.
69
+ - Overall verdict.
70
+
71
+ **Runtime Health**
72
+ - Provider mode, fallback chain, loop mode, max concurrent, hooks, recovery state.
73
+
74
+ **Live Delegation Probe Results**
75
+ - Table with columns: Probe, Subagent, Status, Round-Trip, Result Summary.
76
+ - Overall delegation verdict (all passed / partial / all failed).
77
+ - If any probe failed, include the error or timeout details.
78
+
79
+ **Delegation & Task Health**
80
+ - Subagent delegation availability (proven by probes, not just config).
81
+ - Total tracked tasks (active + recent), including the 4 probes.
82
+ - Active task count.
83
+ - Recent completion/failure/cancel counts.
84
+ - Whether task visibility looks healthy (do the 4 probes show up in `/tasks`?).
85
+ - Tmux window health (attached/missing counts, agent session status if tmux is enabled).
86
+
87
+ **Enabled Tools**
88
+
89
+ **Enabled Commands**
90
+
91
+ **Enabled Agents**
92
+
93
+ **Enabled Subagents**
94
+
95
+ **Enabled Skills**
96
+
97
+ **Enabled Instructions**
98
+
99
+ 10. If any checks or probes fail, include short remediation steps at the end of each relevant section.
package/dist/index.js CHANGED
@@ -8389,16 +8389,6 @@ var UserConfigSchema = exports_external.object({
8389
8389
  }).default({}),
8390
8390
  tmux: exports_external.object({
8391
8391
  enabled: exports_external.boolean().default(false),
8392
- layout: exports_external.enum([
8393
- "main-horizontal",
8394
- "main-vertical",
8395
- "tiled",
8396
- "even-horizontal",
8397
- "even-vertical"
8398
- ]).default("main-vertical"),
8399
- mainPaneSize: exports_external.number().int().min(20).max(80).default(60),
8400
- mainPaneMinWidth: exports_external.number().int().min(40).max(400).default(120),
8401
- agentPaneMinWidth: exports_external.number().int().min(20).max(200).default(40),
8402
8392
  sessionPrefix: exports_external.string().min(2).max(20).regex(/^[a-zA-Z0-9_-]+$/).default("wpo")
8403
8393
  }).default({})
8404
8394
  }).default({})
@@ -8449,10 +8439,6 @@ var DEFAULT_CONFIG = {
8449
8439
  },
8450
8440
  tmux: {
8451
8441
  enabled: false,
8452
- layout: "main-vertical",
8453
- mainPaneSize: 60,
8454
- mainPaneMinWidth: 120,
8455
- agentPaneMinWidth: 40,
8456
8442
  sessionPrefix: "wpo"
8457
8443
  }
8458
8444
  }
@@ -57,23 +57,21 @@ When using delegated execution:
57
57
 
58
58
  ## Tmux Runtime
59
59
 
60
- - Enable tmux pane management with `orchestration.tmux.enabled`.
61
- - Recommended defaults:
60
+ - Enable tmux session management with `orchestration.tmux.enabled`.
61
+ - When enabled, a dedicated tmux session (`{sessionPrefix}-{opencode-session-id}`) is created for each OpenCode session.
62
+ - Each subagent task gets its own window inside that session, keeping your working window clean.
63
+ - Use `tmux switch-client -t wpo-*` to peek at agent work.
62
64
 
63
65
  ```json
64
66
  {
65
67
  "orchestration": {
66
68
  "tmux": {
67
69
  "enabled": true,
68
- "layout": "main-vertical",
69
- "mainPaneSize": 60,
70
- "mainPaneMinWidth": 120,
71
- "agentPaneMinWidth": 40,
72
70
  "sessionPrefix": "wpo"
73
71
  }
74
72
  }
75
73
  }
76
74
  ```
77
75
 
78
- - `/tasks` reports tmux pane attachment state and deferred queue health.
79
- - `/diagnostics` checks tmux wiring, binary availability, queue health, and pane reconciliation.
76
+ - `/tasks` reports the agent session name and active window count.
77
+ - `/diagnostics` checks tmux wiring, binary availability, and window reconciliation.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wpro-eng/opencode-config",
3
- "version": "1.4.0",
3
+ "version": "1.5.0",
4
4
  "description": "Wpromote OpenCode plugin to sync team config assets on startup",
5
5
  "repository": {
6
6
  "type": "git",