opencode-codeops 1.7.1 → 1.8.1

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.
@@ -10,7 +10,7 @@ description: Analyze the current repository and create or refresh concise CodeOp
10
10
  ## Protocol
11
11
 
12
12
  1. Resolve the Git root, current/default branch, and nested `AGENTS.md` files.
13
- 2. Inspect manifests, build files, CI, test configuration, formatter/linter settings, source layout, package boundaries, and recent commit conventions.
13
+ 2. Inspect manifests, build files, CI, test configuration, formatter/linter settings, source layout, package boundaries, and recent commit conventions; note specialization signals (a specialized framework, DSL, codegen, protocol, or domain invariants a generic agent would miss).
14
14
  3. Derive commands only from executable configuration or documented scripts. Never invent a plausible command.
15
15
  4. Prepare a concise managed section between:
16
16
 
@@ -24,5 +24,6 @@ description: Analyze the current repository and create or refresh concise CodeOp
24
24
  7. On a non-integration branch, preview changes to repository-wide guidance and ask before writing unless repository policy explicitly permits branch-local updates.
25
25
  8. In compact mode, remove duplication and stale generated detail from the managed section only. Flag suspected hand-authored bloat; never silently rewrite it.
26
26
  9. Validate every recorded command or mark it explicitly unverified.
27
+ 10. When a specialization signal is strong and no specialist covers it, report the candidate with evidence and recommend the `setup-routing` creation flow ([../../_shared/specialist-agents.md](../../_shared/specialist-agents.md)); never write agent files here. Preserve the `<!-- CODEOPS-SPECIALISTS:START -->` / `<!-- CODEOPS-SPECIALISTS:END -->` block byte-for-byte when refreshing the managed section.
27
28
 
28
29
  Keep `AGENTS.md` small. Operational routing belongs in `codeops/codeops.json` or `opencode.json`, not prose.
@@ -217,7 +217,9 @@ links to them, never restates them.
217
217
  The flow: the protocol records a phase-start ref when the phase begins; after the phase's last
218
218
  task verifies, the correctness reviewer and any active auditors are dispatched **in parallel** on
219
219
  the phase diff, their findings are merged and presented in severity-grouped batches, and each
220
- ruling is recorded in the durable finding artifact.
220
+ ruling is recorded in the durable finding artifact. Specialist roles listed in the plan's
221
+ `## Specialist Agents` table dispatch per `_shared/quality-profile.md`; an unavailable specialist
222
+ falls back to a generic packet and the fallback is reported.
221
223
 
222
224
  > **🚨 Finding gate (load-bearing).** In normal mode, 🔴 CRITICAL and 🟠 MAJOR findings PAUSE
223
225
  > execution for the user's ruling in ALL commit modes. With active auto-design, select and record
@@ -165,9 +165,10 @@ whole-task diff. Activation rules, packets, supersession, and caps are defined i
165
165
  1. **Determine activation.** Strict defaults review every non-trivial phase. Adaptive mode may
166
166
  explicitly disable independent review; announce that choice. Trivial tasks are never reviewed.
167
167
  A docs-only diff → phase-reviewer only, and the auditor skip is logged — never silent.
168
- 2. **Dispatch in parallel:** the correctness reviewer plus every risk-selected auditor (security,
169
- financial integrity, concurrency, performance, semantics, or migration), each with the
170
- dispatch header on line 1 of its prompt and its packet
168
+ 2. **Dispatch in parallel:** the correctness reviewer, every risk-selected auditor (security,
169
+ financial integrity, concurrency, performance, semantics, or migration), and any specialist
170
+ reviewer listed in the plan's `## Specialist Agents` table, each with the dispatch header on
171
+ line 1 of its prompt and its packet (`_shared/quality-profile.md`)
171
172
  Create the review diff with:
172
173
 
173
174
  ```bash
@@ -177,7 +178,7 @@ whole-task diff. Activation rules, packets, supersession, and caps are defined i
177
178
 
178
179
  This includes committed, staged, unstaged, and newly created files while excluding changes that
179
180
  existed at phase start.
180
- 3. **Merge findings** (RV/SA/PE) and present them in severity-grouped batches (reuse the
181
+ 3. **Merge findings** (RV/SA/PE/SR) and present them in severity-grouped batches (reuse the
181
182
  preflight skill's batch pacing). In normal mode, 🔴 CRITICAL / 🟠 MAJOR findings PAUSE
182
183
  execution for the user's ruling in ALL commit modes. With active auto-design, an eligible
183
184
  technical fix may be selected and recorded, but risk may never be waived and a critical/major
@@ -61,6 +61,8 @@ with active scope exploration.
61
61
 
62
62
  Re-run [../../references/domains/selection.md](../../references/domains/selection.md) before component decomposition. Requirements-stage lens selection is evidence, not a permanent assumption. Apply every selected lens to specifications, acceptance criteria, failure narratives, and test strategy.
63
63
 
64
+ After lens selection and phase decomposition, run the specialist-gap check in [../../_shared/specialist-agents.md](../../_shared/specialist-agents.md). Record the outcome in `00-index.md` under `## Specialist Agents` — always, including `None` with its reason and evidence. Candidate creation is reserved authority: `--auto-design` may not approve it, and approved roles are created through `setup-routing`.
65
+
64
66
  A folder `plans/<feature-name>/` containing:
65
67
 
66
68
  ```
@@ -85,6 +85,16 @@ excerpt at dispatch time — excerpting for a handoff packet is not restatement)
85
85
  | ------------ | --------- |
86
86
  | [Decision 1] | [Outcome] |
87
87
 
88
+ ## Specialist Agents
89
+
90
+ | Role | Kind | Use | AR Ref |
91
+ | ---- | ---- | --- | ------ |
92
+ | [role] | [reviewer/executor] | [phase or use] | [AR ref] |
93
+
94
+ [Or: `**None**` — the capability-gap check found no gap a standing specialist would close.]
95
+
96
+ _Detection evidence: [repository facts with `file:line`, or the negative-check evidence]_
97
+
88
98
  ## Related Files
89
99
 
90
100
  [List of key files that will be created or modified]
@@ -45,6 +45,8 @@ than stored as a second mutable status.
45
45
 
46
46
  Before discovery, read [../../references/domains/selection.md](../../references/domains/selection.md), select every applicable system lens, and read those lens files completely. Record selected lenses and evidence in the requirements index. Re-evaluate selection when discovery reveals another domain; a financial web service, for example, requires financial, web, distributed/concurrent, and data/migration lenses.
47
47
 
48
+ After lens selection and scope confirmation, run the specialist-gap check in [../../_shared/specialist-agents.md](../../_shared/specialist-agents.md). Propose at most two candidates in one batch, each through the Complexity Escalation Gate; creation is reserved authority (`--auto-design` may never approve it). Record the check outcome — including "none" — in the final summary.
49
+
48
50
  You are NOT a passive interviewer. You are a **domain-aware consultant** that:
49
51
 
50
52
  1. **Absorbs** — takes whatever the user provides (brain dump, bullets, vague idea) as seed material
@@ -59,7 +59,7 @@ Model names are implementation choices, not policy names. Default to the current
59
59
 
60
60
  ## Structured policy
61
61
 
62
- Store CodeOps policy in `codeops/codeops.json`, not in `AGENTS.md`. `AGENTS.md` receives only a concise instruction that CodeOps routing is configured and that material ambiguity and verification gates may not be bypassed.
62
+ Store CodeOps policy in `codeops/codeops.json`, not in `AGENTS.md`. When project specialists exist, `AGENTS.md` additionally carries the managed `<!-- CODEOPS-SPECIALISTS:START -->` … `<!-- CODEOPS-SPECIALISTS:END -->` index rendered by `install_agents.py --sync-agents-md`; this skill is its only writer, and material ambiguity and verification gates may not be bypassed.
63
63
 
64
64
  Example policy fields are documented in [routing.md](routing.md).
65
65
 
@@ -80,6 +80,20 @@ The installer:
80
80
  - writes complete developer instructions; and
81
81
  - never modifies global OpenCode configuration.
82
82
 
83
+ ### Specialist creation and removal
84
+
85
+ Project specialists follow the shared protocol in [../../_shared/specialist-agents.md](../../_shared/specialist-agents.md); creation is reserved authority and requires the user's direct approval of the gate packet.
86
+
87
+ Creation, after approval:
88
+
89
+ 1. Draft the brief at `codeops/specialists/<role>.md` from the candidate packet and present it for a final review — the brief is the actual prompt.
90
+ 2. Write `routing.roles.<role>` policy first when a model/effort/sandbox/reasoning override is needed: routing wins over the brief, and a policy written later makes the generated agent immediately stale.
91
+ 3. Generate the agent: `python3 "${CODEOPS_PLUGIN_ROOT}/scripts/install_agents.py" --project . --custom <role>`.
92
+ 4. Sync the index: `... --sync-agents-md`.
93
+ 5. Verify last with `... --check`, then tell the user the agent is available as soon as its generated file exists (discovery timing follows the running OpenCode build).
94
+
95
+ Removal: confirm, run `--remove-custom <role> --yes` (it deletes the agent and brief and syncs the index), drop the routing entry, warn when an active plan references the role, and report that `exec-plan` will fall back to a dynamic packet.
96
+
83
97
  ## Runtime dispatch rule
84
98
 
85
99
  For every dispatch, send a bounded packet containing scope, authoritative excerpts, relevant decisions, target paths, verification command, forbidden actions, and required output schema. Do not assume a custom agent inherits the conversation's system model.
@@ -27,6 +27,14 @@ CodeOps routing lives under the optional `routing` and `quality` fields in `code
27
27
 
28
28
  Allowed effort values follow the active OpenCode release. Prefer `medium` for bounded reconnaissance, `high` for correctness/security review, and higher supported levels only for genuinely demanding semantic or architectural work.
29
29
 
30
+ An optional per-role `reasoning` field sets the provider reasoning-effort passthrough (`none`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`). Generated project specialists default to `max` through their brief or the embedded `reasoningEffort`; a routing value wins over the brief. A model that rejects the option is overridden here — there is no automatic provider-capability detection.
31
+
32
+ ```json
33
+ "roles": {
34
+ "pg-migration-reviewer": {"reasoning": "max"}
35
+ }
36
+ ```
37
+
30
38
  Model pins are optional per role. When omitted, OpenCode resolves the model from the explicit spawn, project defaults, and parent session. A missing pin must never block the workflow.
31
39
 
32
40
  Reviewer selection is driven by risk tags: