opencode-codeops 2.0.4 → 2.1.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/CHANGELOG.md CHANGED
@@ -2,8 +2,56 @@
2
2
 
3
3
  All notable changes to CodeOps are recorded here.
4
4
 
5
+ ## 2.1.0 — 2026-10-09
6
+
7
+ ### Documentation
8
+
9
+ - readme: list the analyze-agents skill and the on-demand detection flow
10
+ - exec-plan: record ruling batches in the per-plan findings ledger
11
+ - skills: complete T-07 with the coverage-line smoke and render clarifications
12
+ - skills: surface specialist checks and split proposals from the creation gate
13
+ - plans: resolve the analyze-agents preflight findings and pass the plan
14
+ - plans: add the analyze-agents feature plan set (gate passed)
15
+ - changelog: add the 2.0.4 upgrade notes and record the release
16
+
17
+ ### Chores
18
+
19
+ - plan: record the 3.1.1 live smoke
20
+ - plan: record 2.1.3 full verification
21
+ - plan: record 1.1.3 full verification
22
+ - plan: use plain-bullet deliverables so progress counts only tasks
23
+ - plan: record T-07.3 full verification
24
+ - plan: complete T-06 - v2.0.4 verified and issue #2 closed
25
+
26
+ ### Fixes
27
+
28
+ - skills: harden the ledger assertions per the phase-2 review
29
+ - skills: anchor the phase-1 review assertions and clarify the fallback wording
30
+ - tests: drop the borrowed ST id from the T-07 content suite
31
+ - skills: resolve the T-07 review findings
32
+
33
+ ### Tests
34
+
35
+ - skills: extend the analyze-agents content tests with the ledger wiring (red phase)
36
+ - skills: add analyze-agents content spec tests (red phase)
37
+ - skills: add specialist awareness content tests (red phase)
38
+
39
+ ### Features
40
+
41
+ - skills: add the analyze-agents check skill and protocol wiring
42
+
5
43
  ## 2.0.4 — 2026-10-09
6
44
 
45
+ ### Upgrade Notes
46
+
47
+ - Existing installs upgrade in place: run `npx opencode-codeops update` (package-scope installs) or
48
+ re-run `install_agents.py --roles` / `--custom` (project-generated agents); `--check` reports
49
+ `STALE` until the files are regenerated.
50
+ - Generated agent files now open with `---`, so OpenCode parses `mode`, `hidden`, `permissions`,
51
+ descriptions, and model pins. Catalog roles are hidden subagents instead of selectable primary
52
+ agents. `temperature`/`reasoningEffort` values remain preserved but are not yet sent by the
53
+ OpenCode V2 runner.
54
+
7
55
  ### Chores
8
56
 
9
57
  - plan: sync the T-06 progress header (6/8 tasks)
package/README.md CHANGED
@@ -16,6 +16,7 @@ Turn an idea or existing system into ambiguity-free requirements, grounded speci
16
16
  | `exec-plan` | Execute a plan — implement → verify → commit loop with quality reviews |
17
17
  | `roadmap` | Live feature-set roadmap — make, update, review, archive |
18
18
  | `analyze-project` | Analyze repo and create/refresh CodeOps-aware `AGENTS.md` guidance |
19
+ | `analyze-agents` | Run the project-level specialist check on demand — proposals or a recorded None, with check state |
19
20
  | `setup-codeops` | Set up or migrate CodeOps in a git repo |
20
21
  | `setup-routing` | Configure per-role subagent model and policy routing |
21
22
  | `upgrade-plan` | Upgrade legacy CodeOps artifacts to current schema |
@@ -191,8 +192,10 @@ capability gap the twelve catalog roles and dynamic packets cannot close. Specia
191
192
  only with your explicit approval — the `--auto-design` mode cannot approve them.
192
193
 
193
194
  - **Detect** — `make-requirements`, `make-plan`, and `analyze-project` run an evidence-based check
194
- and record the outcome (including a negative one). At most two candidates are proposed per
195
- requirements set or plan.
195
+ and record the outcome (including a negative one); the `analyze-agents` skill runs the same
196
+ check on demand and maintains `codeops/specialist-check.json` for the coverage line. At most two
197
+ candidates per scope surface as lightweight, evidence-backed proposals; the creation gate
198
+ applies when you choose to proceed.
196
199
  - **Create** — after you approve the candidate packet, `setup-routing` writes a brief at
197
200
  `codeops/specialists/<role>.md`, writes routing policy first, generates a visible agent with
198
201
  `install_agents.py --custom <role>`, and updates a managed index block in `AGENTS.md` with
@@ -64,6 +64,52 @@ escalation)` entry.
64
64
  - Rejection and deferral are valid outcomes. A rejected candidate may not reappear in the same
65
65
  scope without new evidence.
66
66
 
67
+ ## Proposals and the creation gate
68
+
69
+ A **lightweight proposal** is a short, evidence-backed suggestion — role slug, kind, one-line
70
+ capability, evidence (`file:line`), the smallest alternative and why it is insufficient — surfaced
71
+ in the normal findings/plan flow. Proposals need no gate: they are suggestions, not machinery.
72
+
73
+ The Complexity Escalation Gate, the independent challenger verdict, and the reserved-authority
74
+ decision apply only when the user chooses to proceed to creation. Approved roles are then created
75
+ through `setup-routing` as described below; the lightweight proposal format is what `analyze-agents`
76
+ and every detection step emit for at most two candidates per scope.
77
+
78
+ ## Check state
79
+
80
+ Running the check records one small project file:
81
+
82
+ ```json
83
+ {
84
+ "checkedAt": "<ISO-8601 timestamp>",
85
+ "plans": ["<plan folder>", "<plan folder>"]
86
+ }
87
+ ```
88
+
89
+ - Path: `codeops/specialist-check.json` (project-level in both layouts).
90
+ - Written at the end of every check run — including `None` outcomes — by the execution surface
91
+ (`analyze-agents`); the `plans` list is layout-aware.
92
+ - Absent, unreadable, or malformed state means **never checked** for consumers; the
93
+ `analyze-project` coverage line then recommends a run. Fail loud, never silent.
94
+
95
+ ## Findings ledger
96
+
97
+ `exec-plan` records each ruling batch in the plan's findings ledger — one compact row per batch,
98
+ identifiers and area tokens only:
99
+
100
+ - Location: `plans/<plan>/05-findings.md` (flat) or
101
+ `codeops/features/<f>/plans/<plan>/05-findings.md` (nested), per
102
+ [`layout-convention.md`](layout-convention.md).
103
+ - Format:
104
+
105
+ | Finding | Phase | Severity | Area | Ruling |
106
+ | ------- | ----- | -------- | ---- | ------ |
107
+ | RV-001 | 2 | MAJOR | scripts/install_agents.py | fixed |
108
+
109
+ - Writer: `exec-plan`'s ruling step appends the batch's rows after each ruling batch; runtime
110
+ complexity decisions stay in the ambiguity register.
111
+ - The `analyze-agents` check reads these rows for finding-area recurrence.
112
+
67
113
  ## Routing layers
68
114
 
69
115
  | Layer | Owner | Content | Consumer |
@@ -76,15 +122,21 @@ escalation)` entry.
76
122
 
77
123
  ## Detection integration
78
124
 
125
+ The `analyze-agents` skill is the execution surface for the criteria in every flow below; each
126
+ step keeps an instruction referencing these criteria so the flow still works when the skill is
127
+ unavailable.
128
+
79
129
  ### make-requirements
80
130
 
81
131
  1. After domain-lens selection and scope confirmation, run the detection criteria.
82
- 2. For each candidate, open an ambiguity-register entry (`Technical (complexity escalation)`) with
83
- the candidate packet, run the challenger, and obtain the user's decision.
132
+ 2. Surface at most two candidates in one batch as lightweight proposals (§Proposals and the
133
+ creation gate). When the user chooses to proceed to creation, open an ambiguity-register entry
134
+ (`Technical (complexity escalation)`) with the candidate packet, run the challenger, and obtain
135
+ the user's decision.
84
136
  3. Approved candidates are created through `setup-routing` or noted for creation before the first
85
137
  implementing plan; rejected candidates are recorded and dropped.
86
- 4. Record the check in the final summary. No new requirements-template section is created; the
87
- brief and the register are the durable records.
138
+ 4. Record the check in the final summary as a `Specialist check:` line. No new requirements-template
139
+ section is created; the brief and the register are the durable records.
88
140
 
89
141
  ### make-plan
90
142
 
@@ -111,16 +163,18 @@ escalation)` entry.
111
163
  standing specialist would close.
112
164
  ```
113
165
 
114
- 3. Candidate approval, challenger, and persistence follow the shared gate exactly. Approved roles
115
- are created through `setup-routing` before execution begins; the plan remains valid without them
116
- via dynamic-packet fallback.
166
+ 3. Candidates surface as lightweight proposals (§Proposals and the creation gate); when the user
167
+ chooses to proceed to creation, the Complexity Escalation Gate, the challenger, and persistence
168
+ apply exactly as defined there. Approved roles are created through `setup-routing` before
169
+ execution begins; the plan remains valid without them via dynamic-packet fallback.
117
170
 
118
171
  ### analyze-project
119
172
 
120
173
  1. While inspecting manifests and conventions, note specialization signals (specialized
121
174
  framework/DSL, domain invariants, conventions a generic agent would miss).
122
- 2. When a signal is strong and no specialist exists, report the candidate with evidence and
123
- recommend running `setup-routing`; never write agent files or candidate artifacts, and keep
175
+ 2. When a signal is strong and no specialist exists, surface the candidate as a lightweight
176
+ proposal (§Proposals and the creation gate) with evidence, and recommend running `setup-routing`
177
+ when the user chooses to proceed; never write agent files or candidate artifacts, and keep
124
178
  `AGENTS.md` compact.
125
179
  3. Preserve the `<!-- CODEOPS-SPECIALISTS:START -->` / `<!-- CODEOPS-SPECIALISTS:END -->` block
126
180
  byte-for-byte when refreshing managed guidance.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-codeops",
3
- "version": "2.0.4",
3
+ "version": "2.1.0",
4
4
  "description": "Specification-first engineering for complex systems — CodeOps plugin for OpenCode",
5
5
  "type": "module",
6
6
  "engines": {
@@ -0,0 +1,78 @@
1
+ ---
2
+ name: analyze-agents
3
+ description: Run the project-level specialist check on demand. Reads the repository's requirements, plans, findings ledgers, and manifests directly (no script), applies the specialist-agent detection criteria, presents at most two evidence-backed lightweight proposals or a None with evidence, and records the check state consumed by the analyze-project coverage line.
4
+ ---
5
+
6
+ # analyze-agents
7
+
8
+ Run this check to re-evaluate whether a project would benefit from a project-specific specialist
9
+ subagent — on request, or because `analyze-project` reported the coverage as due. This skill is the
10
+ execution surface for the detection criteria in
11
+ [`../../_shared/specialist-agents.md`](../../_shared/specialist-agents.md); it reads the
12
+ repository's own artifacts and never invokes a script.
13
+
14
+ ## Evidence
15
+
16
+ Read these sources for the current project. All paths are layout-aware per
17
+ [`../../_shared/layout-convention.md`](../../_shared/layout-convention.md): flat `plans/` or nested
18
+ `codeops/features/<f>/plans/`.
19
+
20
+ - requirements and plan documents — domain/lens tags and scope history;
21
+ - per-plan findings ledgers (`05-findings.md`) — finding-area recurrence;
22
+ - manifests (`package.json`, `pyproject.toml`, `go.mod`, and similar) — specialized framework,
23
+ DSL, codegen, or protocol signals;
24
+ - existing `codeops/specialists/` briefs and `codeops/codeops.json` routing roles —
25
+ deduplicate against installed specialists;
26
+ - `codeops/specialist-check.json` — the prior check state.
27
+
28
+ ## Detection flow
29
+
30
+ 1. Collect the evidence sources above.
31
+ 2. Apply the detection criteria and disqualifiers from the protocol document: a candidate needs
32
+ evidenced strong signal(s) and no disqualifier.
33
+ 3. Recurrence anchor: one area appearing in at least two plans or three findings ranks as a strong
34
+ signal; thresholds anchor judgment, not hard gates.
35
+ 4. Present at most two candidates in one batch as **lightweight proposals** — role slug, kind, a
36
+ one-line capability, evidence with `file:line`, and the smallest alternative with why it is
37
+ insufficient — or record `None` with evidence.
38
+ 5. Write the check state (below) on every run, including a `None` outcome.
39
+ 6. Hand-off: on user interest, hand off to the `setup-routing` flow for creation. Never create or
40
+ modify agent files, briefs, routing policy, or `AGENTS.md`.
41
+
42
+ ## Check state
43
+
44
+ Write `codeops/specialist-check.json` (project-level in both layouts; create the `codeops/`
45
+ directory lazily when it does not exist):
46
+
47
+ ```json
48
+ {
49
+ "checkedAt": "<ISO-8601 timestamp>",
50
+ "plans": ["<plan folder>", "<plan folder>"]
51
+ }
52
+ ```
53
+
54
+ The `plans` list contains the plan folders present at check time (layout-aware). Consumers treat
55
+ absent, unreadable, or malformed state as **never checked** and recommend a run — fail loud, never
56
+ silent.
57
+
58
+ ## Output
59
+
60
+ A short human summary: the candidate proposals in the lightweight format above, or `None` with
61
+ evidence, plus the state write result. The state file is the machine-readable artifact; there is no
62
+ separate JSON output mode.
63
+
64
+ ## Degradation
65
+
66
+ - Missing findings ledger: the output states that the ledger was missing and the check ran on
67
+ reduced evidence (documents and manifests only).
68
+ - Malformed ledger rows: skip the row with a note; never guess its fields.
69
+ - Empty repository (no plans or requirements): record `None` with evidence and still write the
70
+ check state.
71
+
72
+ ---
73
+
74
+ > **Workspace hygiene (non-negotiable):** put every temporary artifact this run creates in
75
+ > `$CODEOPS_TMPDIR` (fallback: the OS temp directory), never in the repository, and delete them
76
+ > all before reporting completion. Never delete user files, versioned artifacts, worktrees, or
77
+ > another session's temporary files. Full rules:
78
+ > [_shared/workspace-hygiene.md](../../_shared/workspace-hygiene.md).
@@ -24,7 +24,7 @@ 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
+ 10. Specialist coverage: read `codeops/specialist-check.json` when present and include a `Specialist coverage:` line in the managed section — `up to date (<YYYY-MM-DD>)` (from `checkedAt`) when the recorded plan set matches the current one; `check due — run analyze-agents` otherwise; when the state is absent or corrupt, render `check due — run analyze-agents (never checked)`. The `analyze-agents` skill runs the check (criteria: [../../_shared/specialist-agents.md](../../_shared/specialist-agents.md)); when a specialization signal is strong and no specialist covers it, report the candidate with evidence and recommend the `setup-routing` creation flow; never write agent files here. Preserve the `<!-- CODEOPS-SPECIALISTS:START -->` / `<!-- CODEOPS-SPECIALISTS:END -->` block byte-for-byte when refreshing the managed section.
28
28
 
29
29
  Keep `AGENTS.md` small. Operational routing belongs in `codeops/codeops.json` or `opencode.json`, not prose.
30
30
 
@@ -229,9 +229,9 @@ links to them, never restates them.
229
229
  The flow: the protocol records a phase-start ref when the phase begins; after the phase's last
230
230
  task verifies, the correctness reviewer and any active auditors are dispatched **in parallel** on
231
231
  the phase diff, their findings are merged and presented in severity-grouped batches, and each
232
- ruling is recorded in the durable finding artifact. Specialist roles listed in the plan's
233
- `## Specialist Agents` table dispatch per `_shared/quality-profile.md`; an unavailable specialist
234
- falls back to a generic packet and the fallback is reported.
232
+ ruling is recorded in the plan's findings ledger (`05-findings.md`). Specialist roles listed in
233
+ the plan's `## Specialist Agents` table dispatch per `_shared/quality-profile.md`; an unavailable
234
+ specialist falls back to a generic packet and the fallback is reported.
235
235
 
236
236
  > **🚨 Finding gate (load-bearing).** In normal mode, 🔴 CRITICAL and 🟠 MAJOR findings PAUSE
237
237
  > execution for the user's ruling in ALL commit modes. With active auto-design, select and record
@@ -199,9 +199,17 @@ whole-task diff. Activation rules, packets, supersession, and caps are defined i
199
199
  `[!]`, preserve the diff without marking it verified, and switch to the full standalone-plan
200
200
  path. The new `00-ambiguity-register.md` owns the packet and decision. Resume only after that
201
201
  plan's gates pass.
202
- 4. **Record decisions durably** in the finding artifact after each ruling batch. When the user
203
- approves larger machinery, also append a `Technical (complexity escalation)` runtime AR with
204
- every approval-evidence field required by the shared gate; the RV finding references that AR.
202
+ 4. **Record decisions durably** in the plan's findings ledger after each ruling batch. The ledger
203
+ is `plans/<plan>/05-findings.md` (flat) or
204
+ `codeops/features/<f>/plans/<plan>/05-findings.md` (nested), created lazily on first use, with a
205
+ one-line title and one compact row per batch:
206
+ `| Finding | Phase | Severity | Area | Ruling |` — finding ids use the review prefixes
207
+ `RV-`/`SA-`/`PE-`/`SR-` (for example `RV-001`), followed by the phase number,
208
+ `CRITICAL`/`MAJOR`/`MINOR`, a path or domain token, and
209
+ `fixed`/`accepted`/`deferred`/`dismissed`; identifiers and area tokens only, never prose. Task
210
+ mini-plans keep their ledger in their own plan folder. When the user approves larger machinery,
211
+ also append a `Technical (complexity escalation)` runtime AR with every approval-evidence field
212
+ required by the shared gate; the RV finding references that AR.
205
213
  5. **Accepted fixes:** implement → verify → follow-up commit per the commit mode. If any 🔴/🟠
206
214
  fix was applied, dispatch ONE re-review scoped to the fix diff — never a third pass. A fix
207
215
  the re-review still rejects is reported. Normal mode returns the ruling to the user; active
@@ -71,7 +71,7 @@ with active scope exploration.
71
71
 
72
72
  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.
73
73
 
74
- 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`.
74
+ After lens selection and phase decomposition, run the specialist-gap check in [../../_shared/specialist-agents.md](../../_shared/specialist-agents.md). The `analyze-agents` skill executes the same detection flow on demand; the manual criteria in the linked protocol document remain the fallback when the skill is unavailable. Record the outcome in `00-index.md` under `## Specialist Agents` — always, including `None` with its reason and evidence. In the final plan summary, include a `Specialist check:` line — `None — <evidence>` or the candidate names. Candidate creation is reserved authority: `--auto-design` may not approve it, and approved roles are created through `setup-routing`.
75
75
 
76
76
  A folder `plans/<feature-name>/` containing:
77
77
 
@@ -274,6 +274,8 @@ Report what was created:
274
274
 
275
275
  **Summary:** Total Phases: X · Total Sessions: X · Estimated Time: X–X hours
276
276
 
277
+ **Specialist check:** [None — evidence / candidate names]
278
+
277
279
  **To begin implementation:** use the exec-plan skill on `[feature-name]`.
278
280
  ```
279
281
 
@@ -7,6 +7,7 @@ Run this before finalizing the plan documents. The **Specification-First Testing
7
7
  - [ ] All affected components identified
8
8
  - [ ] All scope decisions documented
9
9
  - [ ] All dependencies mapped
10
+ - [ ] The `## Specialist Agents` outcome is recorded in `00-index.md` (candidate or `None` with evidence)
10
11
  - [ ] Every planned item traces to the confirmed scope baseline or a user-kept `SE-*` entry
11
12
  - [ ] Strict scope contains no optional suggestions; exploration proposals remain non-executable
12
13
  until the user chooses `Keep`
@@ -55,7 +55,7 @@ than stored as a second mutable status.
55
55
 
56
56
  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.
57
57
 
58
- 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.
58
+ After lens selection and scope confirmation, run the specialist-gap check in [../../_shared/specialist-agents.md](../../_shared/specialist-agents.md). The `analyze-agents` skill executes the same detection flow on demand; the manual criteria in the linked protocol document remain the fallback when the skill is unavailable. Surface at most two candidates in one batch as lightweight proposals (that document's §Proposals and the creation gate); the Complexity Escalation Gate and the reserved-authority approval apply only when the user chooses to proceed to creation (`--auto-design` may never approve it). Record the outcome in the final summary as a `Specialist check:` line — including `Specialist check: None — <evidence>`.
59
59
 
60
60
  You are NOT a passive interviewer. You are a **domain-aware consultant** that:
61
61