@mstar-harness/opencode 1.8.5 → 1.8.6

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
@@ -6,6 +6,15 @@ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface re
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [1.8.6] - 2026-08-06
10
+
11
+ ### Bundled harness skills (`harness-skills/` at publish)
12
+
13
+ - Sync dispatch field-completeness gate: `mstar-dispatch-gates` self-check + anti-pattern, `mstar-host/references/parallel-dispatch.md` hard rule + self-check, `mstar-host/references/omp.md` Review-&-Edit example + N=1 gotcha.
14
+ - Version alignment with harness **1.8.6** (no OpenCode package API change).
15
+
16
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.8.6**.
17
+
9
18
  ## [1.8.5] - 2026-08-06
10
19
 
11
20
  ### Bundled harness skills (`harness-skills/` at publish)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-dispatch-gates
3
- description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、SDD implement 串行派发、**SDD 路径 plan QC 强制 tri-review(N=3)**、inline 单席 QC 例外、Assignment 文案≠派发、未齐不发。`project-manager` 派发时必读;leaf 动手前必读反递归。worktree 见 `mstar-branch-worktree`;SDD 见 `mstar-sdd`;宿主见 `mstar-host`。
3
+ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、SDD implement 串行派发、**SDD 路径 plan QC 强制 tri-review(N=3)**、inline 单席 QC 例外、Assignment 文案≠派发、未齐不发、**invoke 角色字段必填(漏写=静默 generic 回退=派发未完成)**。`project-manager` 派发时必读;leaf 动手前必读反递归。worktree 见 `mstar-branch-worktree`;SDD 见 `mstar-sdd`;宿主见 `mstar-host`。
4
4
  ---
5
5
 
6
6
  ## Load order(必读顺序)
@@ -58,6 +58,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
58
58
  - **QC 单席(例外)**:`Execution mode: inline`(hotfix 等),或 Assignment 显式 `QC mode: single` / `QC mode: single — override: <reason>` → `qc-specialist` ×1,`N=1`,写 `{SDD_DIR}/review/qc.md`。
59
59
  - **QC targeted re-review**:Assignment 含 **`QC re-review: targeted — reviewers: …`** 时,**N** = 所列席位数(1–3),同条消息发满 **N**。
60
60
  - **先自检再发送**:发送前核对「Assignment 条数 = 本条消息中的实际 **派发** 调用条数」。
61
+ - **先自检字段再发送(与 count 同级门禁)**:核对**每条** invoke 都携带与 **`Execute as`** 匹配的角色绑定字段——omp **`agent`** / Cursor **`subagent_type`** / OpenCode **`subagent`** / Kimi·ZCode **`subagent_type`**。**漏写或取默认通用值**(omp 漏 `agent` ⇒ 自动回退 generic `task`,无报错)= **派发未完成**,与 paste-only(零 invoke)**同等级**:当场补齐重发,不得进入下一 gate。**N=1 顺序链(Review & Edit)不豁免**——count 门在 N=1 恒过,**字段门是唯一保护**。
61
62
  - **前置步骤与派发回合分离(防串行 rollout)**:为派发准备的 **`bash` / `read` / `glob` / `grep`**(如 `merge-base`、`Review range`、`git rev-parse`)**不计入** `N` 次派发;可在上一条仅含准备的消息完成。准备完成后,**下一条派发消息**须**一次性**含 **`N` 次** Task / subagent invoke。**禁止**先发 `1` 次、等返回再补发其余 `N-1` 次。
62
63
  - **未齐不发(emit zero until batch-ready)**:需并发 `N≥2` 而当前只能发 `1` 条时,本条应发 **`0` 条派发 invoke`**(可继续 read/bash 补齐),**禁止**「先发一个顶一下」;`N` 份 payload 就绪后**单次消息发满 `N`**。见 **`mstar-host`** → `references/parallel-dispatch.md`(具备 invoke / Task / subagent 工具的宿主共用)。
63
64
 
@@ -114,6 +115,7 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
114
115
  - Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
115
116
  - Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
116
117
  - Assignment 已写、invoke 为零(paste-only)却进入下一 gate。
118
+ - Task/subagent item 漏写角色绑定字段(omp 漏 `agent` / Cursor 漏 `subagent_type` / OpenCode 漏 `subagent`)⇒ **静默回退 generic worker**,却因 count=N 通过而误判「派发完成」;属 paste-only 同级的 **dispatch-incomplete**。N=1 顺序 Review-&-Edit 链最易在此漏字段。
117
119
 
118
120
  ## References
119
121
 
@@ -77,6 +77,8 @@ task(
77
77
 
78
78
  Single-task shorthand may exist depending on host version — always match the live schema. Parallel **N** Morning Star assignees ⇒ **one** `task` call with **N** `tasks[]` entries **or** **N** `task` calls in one assistant message when the host requires that shape. Count emitted dispatches = **N**.
79
79
 
80
+ **Construct the envelope first (production cue — prevents the omission at the source, not just at the gate).** When building a `tasks[]` entry, write **`agent`** + **`name`** as the first fields, *before* the long `task` body. The Assignment body is hundreds of lines of structured text and dominates working memory; `agent`/`name` are one-line envelope fields with no intrinsic saliency and no auto-check — writing the body first and the envelope last is how `agent` gets silently dropped (omp then defaults to generic `task`). The pre-send field gate (see **C5** below) catches it, but **envelope-first is the cheaper failure mode**: it makes the high-stakes-but-low-saliency field structural, so it cannot be forgotten by attention drift while authoring the body.
81
+
80
82
  ## Role agents (C5 — hard constraint)
81
83
 
82
84
  **Live `task` tool schema is SSOT every session.** Exact `agent` names vary by omp version and which `agents/*.md` were discovered after plugin install/link. Read the tool's Available Agents list before dispatch — do not invent names; do not hard-code stale tables over the live list.
@@ -145,7 +147,7 @@ task(
145
147
  )
146
148
  ```
147
149
 
148
- Review & Edit / Prepare specialist chain (sequential, **N=1** each turn):
150
+ Review & Edit / Prepare specialist chain (sequential, **N=1** each turn — re-set **`agent`** on **every** dispatch; at N=1 the count gate is trivial, so the **field** gate is the only protection):
149
151
 
150
152
  ```text
151
153
  task(
@@ -156,7 +158,18 @@ task(
156
158
  task: "<Assignment: Execute as product-manager; Act as + skill load>"
157
159
  }]
158
160
  )
159
- # wait for return, then architect, then writing-specialist each with agent: "<role-id>"
161
+ # pass 2 architect (re-set agent on EVERY dispatch; a bare tasks:[{task:"…"}] with no agent silently falls back to generic task — C5 anti-pattern)
162
+ task(
163
+ context: "Review & Edit — architecture",
164
+ tasks: [{ name: "ReviewEditArchitect", agent: "architect",
165
+ task: "<Assignment: Execute as architect; Act as + skill load>" }]
166
+ )
167
+ # pass 3 — writing-specialist
168
+ task(
169
+ context: "Review & Edit — writing",
170
+ tasks: [{ name: "ReviewEditWriting", agent: "writing-specialist",
171
+ task: "<Assignment: Execute as writing-specialist; Act as + skill load>" }]
172
+ )
160
173
  ```
161
174
 
162
175
  For explore-only orientation (no Morning Star role deliverable):
@@ -230,3 +243,4 @@ Cannot emit required **N** → **`Blocked`**.
230
243
  - omp has no `sessionStart.skill`; new sessions do **not** auto-load PM — invoke `/skill:pm` manually.
231
244
  - Do not confuse omp **`task.agent`** with OpenCode **`subagent`** or Cursor **`subagent_type`**.
232
245
  - Do not treat Kimi/ZCode “built-ins only → always `coder`/`task`” habits as omp defaults when Morning Star role agents are listed.
246
+ - **Sequential N=1 Review-&-Edit turns are where `agent` gets dropped**: the “all N in one message” pressure is absent and the count gate passes trivially — re-verify **`agent: "<Execute as>"`** on every single dispatch; `tasks:[{task:"…"}]` with no `agent` is a silent generic fallback, not a valid role invoke.
@@ -15,7 +15,7 @@ Printing `## Assignment` in the main thread **without** matching host invocation
15
15
 
16
16
  ## Mandatory order (dispatch turn)
17
17
 
18
- 1. Finalize all `N` Assignment payloads (after any prerequisite turn).
18
+ 1. Finalize all `N` Assignment payloads (after any prerequisite turn). **Build each invoke entry envelope-first**: set the role-binding field (omp `agent` / Cursor `subagent_type` / OpenCode `subagent` / Kimi·ZCode `subagent_type`) + `name` *before* writing the long Assignment body — the body is high-volume and will crowd out the one-line envelope field from working memory.
19
19
  2. Count distinct `Execute as` sessions (`N`).
20
20
  3. Issue **`N` host invocations first** — OpenCode: **N `task` tool** calls with **subagent**; Cursor: **N `Task`** with `subagent_type` (JSON field shape → `cursor.md` § Task invoke schema); Kimi: **N `Agent`** calls (each prompt carries **Act as** + skill load; `subagent_type` ∈ {`coder`,`explore`,`plan`} only — see `kimi.md` C5/C5b); omp: **one `task` call with N `tasks[]`** (or N `task` calls) with `agent` = live-schema role id matching `Execute as` when listed (else generic built-in) + **Act as** / skill load (see `omp.md` C5/C5b); each with one Assignment body. For parallel work, **all `N` tool calls in one assistant message** when the host allows.
21
21
  4. Optionally post a short **Status Update** after invocations (audit trail only — does not replace step 3).
@@ -26,6 +26,7 @@ Printing `## Assignment` in the main thread **without** matching host invocation
26
26
  - Do not end the dispatch turn until **`N` invocations emitted**, or mark `Blocked` / `dispatch incomplete`.
27
27
  - Dual-track implement: **`N = 2` ⇒ two invocations in one message** when parallel is required.
28
28
  - Status Update on dispatch turns: **`Subagent invokes issued: N`** (must match Assignment count). If Assignments were written but `N = 0` → **`dispatch failed — paste-only`**; fix next message.
29
+ - **Per-item field completeness (same severity as paste-only)**: every invocation must carry the role-binding field set to **`Execute as`** — omp **`agent`** / Cursor **`subagent_type`** / OpenCode **`subagent`** / Kimi·ZCode **`subagent_type`**. A missing field (e.g. omp omitting `agent` ⇒ silent generic `task` fallback) = **dispatch incomplete** even though count = N passes. Sequential **N=1** Review-&-Edit turns are not exempt — re-set the field on **every** dispatch.
29
30
 
30
31
  ## QC default (initial wave)
31
32
 
@@ -62,5 +63,6 @@ Formal iteration Phase 2 uses the same SDD + tri rule — not a separate carve-o
62
63
  1. Required assignments this turn? (`N`)
63
64
  2. Prerequisite-only message? → **zero** batch dispatches unless `N = 1`.
64
65
  3. Dispatch message contains **exactly `N`** invocation calls?
65
- 4. QC initial: **`Execution mode: sdd`** **N=3**? **`inline`** **N=1**? Targeted re-review **N** = Assignment reviewer count?
66
- 5. SDD implement → **serial** (never batch implementers); sticky = **resume** same implementer, not parallel
66
+ 4. **Each** invocation carries its role-binding field set to **`Execute as`** (omp `agent` / Cursor `subagent_type` / OpenCode `subagent` / Kimi·ZCode `subagent_type`)? A bare `task`/prompt item with no role field = **incomplete**, even at **N=1**.
67
+ 5. QC initial: **`Execution mode: sdd`** → **N=3**? **`inline`** **N=1**? Targeted re-review **N** = Assignment reviewer count?
68
+ 6. SDD implement → **serial** (never batch implementers); sticky = **resume** same implementer, not parallel
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "1.8.5",
3
+ "version": "1.8.6",
4
4
  "description": "Morning Star harness OpenCode plugin (skills bootstrap and agent loading).",
5
5
  "license": "MIT",
6
6
  "repository": {