@mstar-harness/opencode 3.2.3 → 3.2.5

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,27 @@ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface re
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.2.5] - 2026-08-24
10
+
11
+ ### Bundled harness skills (`harness-skills/` at publish)
12
+
13
+ - **PR deep-review lists every finding by default**: the `[full]` flag is removed from `/pr-deep-review` — complete findings (all merge classes, nits included) are now always listed in the chat output and GitHub Review; nothing is truncated. README command signature updated.
14
+
15
+ - Version alignment with harness **3.2.5** (no OpenCode package API change).
16
+
17
+ See root [CHANGELOG.md](../../CHANGELOG.md) **3.2.5**.
18
+
19
+ ## [3.2.4] - 2026-08-24
20
+
21
+ ### Bundled harness skills (`harness-skills/` at publish)
22
+
23
+ - **PR deep-review local report archive**: each `pr`-variant review now saves a durable markdown report under `{PROJECT_DIR}/<project-id>/reports/pr-review/` (`_default` when project-less) — YAML frontmatter metadata (PR, head SHA, verdict, score, tally, review URL) plus the posted GitHub Review body verbatim; bare branch/diff reviews archive the chat display instead. Written via the primary checkout (never inside the review worktree), saved before worktree cleanup regardless of POST outcome; new `- report:` field in the Completion Report output shape.
24
+ - **Docs describe current state only**: removed truly retired-path prose from runtime skills — `{PLAN_DIR}/reports/` (legacy report location; no code or migration path references it) and the retired `{HARNESS_DIR}/notes.json` (no code creates or reads it; runtime notes live in `workflows/<id>/notes.jsonl`). Compat behaviors verified against shipped code and kept: `designs/` read-only `{SPECS_DIR}` fallback (`resolveSpecsDir`), legacy flat delivery-compass read/migrate directives, `.agents/` discovery chain, and all v1→v2 migration guards.
25
+
26
+ - Version alignment with harness **3.2.4** (no OpenCode package API change).
27
+
28
+ See root [CHANGELOG.md](../../CHANGELOG.md) **3.2.4**.
29
+
9
30
  ## [3.2.3] - 2026-08-24
10
31
 
11
32
  ### Bundled harness skills (`harness-skills/` at publish)
@@ -2,7 +2,7 @@
2
2
  name: pr-deep-review
3
3
  description: Use when asked to deeply review a pull request, branch, or diff before merge — deciding whether a change is safe to ship with evidence-backed findings, rather than a shallow "looks good" pass. Produces a `ship it` / `needs fixes` / `blocked` verdict. Also for a batch of sibling PRs. Do not use for self-checking a change you just authored.
4
4
  agent: project-manager
5
- input: "[pr|branch|scope] [full]"
5
+ input: "[pr|branch|scope]"
6
6
  ---
7
7
 
8
8
  # Deep PR Review
@@ -36,4 +36,4 @@ Execute **`mstar-audit`** § `pr` variant end to end(SKILL.md common core:re
36
36
 
37
37
  Review findings that need fixing can be turned into self-contained plans for the normal Prepare → Execute flow (reusing `mstar-audit` SKILL.md **`## Plan output (all variants)`** — same contract as the `pr` variant).
38
38
 
39
- Output verdict + findings to the user, with the posted GitHub Review URL. Posting procedure (when a PR number exists) → **`references/pr-review.md`** § Comment posting. Never auto-approve or merge.
39
+ Output verdict + findings to the user, with the posted GitHub Review URL. Posting procedure (when a PR number exists) → **`references/pr-review.md`** § Comment posting; each reviewer also saves the durable local report → **`references/pr-review.md`** § Local report archive. Never auto-approve or merge.
@@ -28,7 +28,7 @@
28
28
  - **不放什么**:已锁定的仓库级规范(→ **`{SPECS_DIR}/`**);已提升的跨迭代实施 SSOT(→ **`{KNOWLEDGE_DIR}/`**,经 compound);单 plan QC/QA 原始报告(→ `{SDD_DIR}/review/`)。
29
29
  - **索引**:`**{ITERATION_DIR}/README.md**` **一行 = 一次迭代**(指向 `<iteration-id>/`);`<iteration-id>/README.md` 登记 package 内文档(Documents 单表)。
30
30
  - **维护**:`@product-manager` / `@architect` 起草 package;`**@project-manager**` 维护索引与 metadata;**iteration-close** 时 **`mstar-compound`** 盘点 package 并**提升**至 `{KNOWLEDGE_DIR}/`。
31
- - **Compass 路径**:canonical `{ITERATION_DIR}/<iteration-id>/delivery-compass.md`;legacy flat `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 仅兼容读。
31
+ - **Compass 路径**:canonical `{ITERATION_DIR}/<iteration-id>/delivery-compass.md`(迭代状态 SSOT);legacy flat `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 仅兼容读。
32
32
 
33
33
  ## `{SPECS_DIR}`(可选·长期规格)
34
34
 
@@ -21,7 +21,6 @@ QC/QA 原始过程报告默认是 **ephemeral review bundle**,置于 `{SDD_DIR
21
21
  | QC 汇总结论(tri 模式) | `qc-consolidated.md` |
22
22
  | QA 验收报告(`QA gate: mandatory`) | `qa.md`(或 Assignment 指定的同目录 basename) |
23
23
 
24
- `{PLAN_DIR}/reports/` is **legacy / explicit audit mode only**. Use it only when the user or project policy explicitly requires tracked raw reports; the default harness path is `{SDD_DIR}/review/`.
25
24
 
26
25
  ## SDD 运行时(不入 reports)
27
26
 
@@ -87,7 +87,7 @@ Then open cited code yourself and dispose by-design / mis-attributed / duplicate
87
87
  ## Verdict synthesis
88
88
 
89
89
  - Order findings by impact-if-shipped; no padding, no invented requirements, no style grading.
90
- - List **every** `must-fix` and `should-fix` finding — the default top 1–3 cut (unless `full`) applies to nits only, and truncated nits are summarized in the display line (§ Output shape / Display contract).
90
+ - List **every** accepted finding — `must-fix`, `should-fix`, and nits alike; nothing is truncated.
91
91
  - The verdict is **derived from the tally, not chosen**: classify every accepted finding (§ Merge class) → apply leftover `unmet` AC increments if any (§ Linked-issue hygiene) → apply **Verdict-from-tally** (§ Tally and derived score) → emit that one token. The reviewer does not pick a verdict by vibe.
92
92
  - Exactly one verdict:
93
93
  - `ship it` — evidence-backed, safe to ship.
@@ -205,7 +205,7 @@ Posting the GitHub Review is a **mandatory deliverable** of the `pr` variant —
205
205
 
206
206
  - **Before anything else:** synthesize the verdict first, then post **before** worktree cleanup (see § Worktree isolation — cleanup happens after the comment is posted).
207
207
  - **No PR number** (bare branch / arbitrary diff): set `comments: n/a-no-pr` and skip the API. Chat output still required; this is not a Blocked review.
208
- - **Auth / API failure:** deliver the chat verdict anyway; Completion Report status `Partial`/`Blocked` with the `gh` error. Do not claim `Done` — comments are mandatory when a PR exists.
208
+ - **Auth / API failure:** deliver the chat verdict anyway; Completion Report status `Partial`/`Blocked` with the `gh` error. Do not claim `Done` — comments are mandatory when a PR exists. **The local report is still saved** (§ Local report archive — posting failure does not skip archival).
209
209
 
210
210
  ### Procedure
211
211
 
@@ -225,7 +225,7 @@ Posting the GitHub Review is a **mandatory deliverable** of the `pr` variant —
225
225
  ```
226
226
  (payload on stdin).
227
227
  4. **Line fallback:** if GitHub rejects some inline comments (e.g. 422 — line not in the diff), retry the review **without** those entries and fold them into the summary body. Do not loop more than once.
228
- 5. Record `html_url` / review id for `comments:`. Only now clean up the worktree (or after the n/a-no-PR skip).
228
+ 5. Save the local report (§ Local report archive) — **mandatory in all three branches**: POST succeeded (record `html_url` / review id for `comments:` first), POST failed, or `n/a-no-pr` (archive the chat display content). Only then clean up the worktree; bare branch/diff reviews have no worktree, but the save still happens.
229
229
  6. **Batch:** each reviewer posts on **their own PRs** only. No second PM summary comment unless the Assignment says so.
230
230
 
231
231
  ### Report template (GitHub Review `body`)
@@ -250,7 +250,7 @@ The posted review body is a three-section report. Section order fixed; omit a su
250
250
 
251
251
  ### Findings
252
252
 
253
- <Ranked findings (§ List cut). Each finding keeps its normal format — title, evidence (`file:line`), impact, **Merge class**, **Confidence**, fix sketch — with its class emoji prefixing the title.>
253
+ <Ranked findings. Each finding keeps its normal format — title, evidence (`file:line`), impact, **Merge class**, **Confidence**, fix sketch — with its class emoji prefixing the title.>
254
254
 
255
255
  ### Linked-issue AC
256
256
 
@@ -289,6 +289,35 @@ Fold follow-up plans into the review body **only if** this review wrote them. Pu
289
289
 
290
290
  Never dump full plan files.
291
291
 
292
+ ### Local report archive
293
+
294
+ The posted PR comment is the deliverable; the local report is the durable reference copy — the PR thread may be buried, locked, or deleted, and bare-branch/diff reviews have no thread at all. The review seat saves **one markdown file per reviewed PR** (or branch/diff) as part of the mandatory deliverable, before worktree cleanup:
295
+
296
+ - **Path**: `{PROJECT_DIR}/<project-id>/reports/pr-review/` — `<project-id>` from the Assignment / project context, `_default` when the review runs outside any project flow (same id convention as `projects/<id>/residuals.json`). Gitignored local SSOT, same posture as residuals; a finding that must survive across clones gets promoted to tracked `{KNOWLEDGE_DIR}` / `{SPECS_DIR}`, not by tracking this directory.
297
+ - **Write via the primary checkout, never the worktree**: harness discovery must not start from the review worktree — its root has no gitignored `.mstar/`, and anything written there is destroyed by `git worktree remove` (§ Worktree isolation). Record the primary repository's absolute path **before** creating the worktree and write the report under it. Never create a `.mstar/` inside the review worktree to "host" the report.
298
+ - **Filename**: `<YYYY-MM-DD>-pr<N>.md`; bare branch → `<YYYY-MM-DD>-<branch-slug>.md`; arbitrary diff → `<YYYY-MM-DD>-diff-<short-head-sha>.md`, or `<YYYY-MM-DD>-diff.md` when no head SHA was provided with the changeset (never invent one). Same target twice in one day → append `-r2`, `-r3`, … (never overwrite a prior report).
299
+ - **Frontmatter** (machine-readable metadata):
300
+ ```yaml
301
+ ---
302
+ type: pr-review
303
+ pr: <n> # omit for bare branch / diff
304
+ url: <pr url> # omit for bare branch / diff
305
+ head: <head sha>
306
+ base: <base ref>
307
+ verdict: ship it | needs fixes | blocked
308
+ score_pct: <n>
309
+ tally: { must-fix: <n>, should-fix: <n>, nit: <n>, unverified: <n> }
310
+ review_url: <posted review html_url> # n/a-no-pr when skipped; failed: <gh error summary> when POST failed
311
+ generated_at: <YYYY-MM-DD>
312
+ ---
313
+ ```
314
+
315
+ `head:` / `base:` are omitted when genuinely unknown (arbitrary diff without stated provenance) — never fabricate identifiers.
316
+
317
+ **Posting failure does not skip archival.** The report is saved regardless of the POST outcome: on failure it archives the chat display content plus the `gh` error summary, so a failed POST still leaves the durable copy.
318
+ - **Body**: the exact text posted as the GitHub Review body — verbatim, not a paraphrase. When `comments: n/a-no-pr` or posting failed, the body is the chat display content instead (§ Display contract two lines + ranked findings + leftover AC), so the local copy is still complete.
319
+ - Fix plans referenced by the Plan-to-fix section keep living in `{PLAN_DIR}/audit-<date>/` when written — the report links them, never duplicates them.
320
+
292
321
  ## Output shape
293
322
 
294
323
  - `- findings:` — list of evidence-backed findings (`none` when none). Each accepted finding includes **Merge class** (§ Merge class).
@@ -309,6 +338,8 @@ Never dump full plan files.
309
338
  - `inline: <N> posted / <M> attempted (<K> summary-only fallback)`
310
339
  - `plans_folded: yes` | `no`
311
340
 
341
+ - `- report:` — local archive path (§ Local report archive), e.g. `{PROJECT_DIR}/<project-id>/reports/pr-review/2026-08-24-pr134.md` (`_default` when project-less); `n/a` only when the harness dir is undiscoverable.
342
+
312
343
  ### Display contract (chat output)
313
344
 
314
345
  First two lines of the **chat** display — verbatim:
@@ -322,6 +353,3 @@ Then ranked findings / leftover AC summary. Do not put `score_pct%` on the `- ve
322
353
 
323
354
  The GitHub Review `body` no longer uses the two-line header — it follows § Report template, whose Verdict section carries the same facts structured (verdict token + Confidence + four-class emoji tally table).
324
355
 
325
- ### List cut
326
-
327
- The default "top 1–3 unless `full`" applies to **nits only**: every `must-fix` and `should-fix` finding is listed. If nits are omitted from the narrative list, add one line `nits: <n> omitted from list (counted in tally)` — `tally.nit` stays complete.
@@ -84,7 +84,8 @@ enforcement=hard
84
84
 
85
85
  **创建默认**:全部缺失或皆空 → 创建并使用 `{HARNESS_DIR}/specs/`(统一落在 `.mstar/` 下)。**禁止**在 greenfield init 时优先创建裸仓库根 `specs/`。
86
86
 
87
- **Legacy(仅兼容读)**:若以上皆无内容,但 `{HARNESS_DIR}/designs/` 或仓库根 `designs/` **非空**,可作 `{SPECS_DIR}` 使用;init 时**不**新建 `designs/`。
87
+ **Legacy 兼容读**:若以上皆无内容,但 `{HARNESS_DIR}/designs/` 或仓库根 `designs/` **非空**,可作 `{SPECS_DIR}` 使用;init 时**不**新建 `designs/`。
88
+
88
89
 
89
90
  > **Engine check (when available):** import `resolveSpecsDir` from `@mstar-harness/engine` in a host hook — or run `mstar path resolve` (prints the resolved specs dir) — to confirm the candidate order (empty-dir-as-absent included). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
90
91
 
@@ -107,7 +108,7 @@ enforcement=hard
107
108
  PM 在需要持久化追踪时:
108
109
 
109
110
  1. 建 `.mstar/`、`plans/`、`status.json`(**v2 空模板**见 **`mstar-artifacts/templates/status.empty.json`**:`version: 2` + `workflows: []`)
110
- 2. 可选 `notes.json`(legacy)、`knowledge/`、`iterations/`、`{HARNESS_DIR}/specs/`、`sdd/`(空目录占位;运行时 per-plan 子目录由 **`mstar-sdd`** → `mstar sdd workspace <plan-id>` 创建;`workflows/` / `projects/` 由 engine writers 按需创建,**不**预建)
111
+ 2. 可选 `knowledge/`、`iterations/`、`{HARNESS_DIR}/specs/`、`sdd/`(空目录占位;运行时 per-plan 子目录由 **`mstar-sdd`** → `mstar sdd workspace <plan-id>` 创建;`workflows/` / `projects/` 由 engine writers 按需创建,**不**预建)
111
112
  3. 项目根 `.gitignore` 追加 Morning Star **进程产物**忽略集(见下文「Git 跟踪策略」)— CLI `init` 可自动添加
112
113
  4. Git:**进程本地、结果共享** — 默认跟踪 `{HARNESS_DIR}/AGENTS.md`、`{KNOWLEDGE_DIR}/**`、`{SPECS_DIR}/**`;`plans/`、`iterations/`、`status.json` 等为**本地会话 SSOT**,默认 gitignored。跨 clone 持久 handoff = knowledge + specs + `{HARNESS_DIR}/AGENTS.md`(及根 `CONCEPTS.md` / `STRATEGY.md` 若使用);须跨 clone 的 residual 须提升(compound)或写入 tracked results — **勿**默认 `git add` `status.json` / `plans/`。
113
114
 
@@ -129,7 +130,6 @@ PM 在需要持久化追踪时:
129
130
  - `iterations/`
130
131
  - `plans/`
131
132
  - `sdd/`
132
- - `notes.json`(legacy;运行时 notes 走 `workflows/<id>/notes.jsonl`)
133
133
  - `status.json`
134
134
  - `workflows/`(v3 每 lifecycle 运行态:`<id>/snapshot.json` + `<id>/notes.jsonl`)
135
135
  - `projects/`(v3 项目层:`<id>/roadmap.md` + `<id>/residuals.json`)
@@ -47,7 +47,6 @@
47
47
  | `docs/` | 人类文档(安装、贡献指南等),知识产物不放此处 |
48
48
  | `{ITERATION_DIR}/` | 迭代 package(compass + guides/specs);知识文档不放此处 |
49
49
  | `{SPECS_DIR}/` | 仅限冻结规格/ADR,运行时知识不放此处 |
50
- | `{PLAN_DIR}/reports/` | Legacy / explicit audit mode only;默认 QC/QA 原始过程报告进 `{SDD_DIR}/review/`,知识文档不放此处 |
51
50
 
52
51
  ## `<category>` 取值
53
52
 
@@ -14,7 +14,7 @@
14
14
 
15
15
  1. 创建 `{HARNESS_DIR}`(推荐 `.mstar/`)与 `{PLAN_DIR}`(推荐 `.mstar/plans/`)。
16
16
  2. 初始化 `status.json`:从 **`mstar-artifacts/templates/status.empty.json`** 复制(**v2 形状**:`version: 2` + `workflows: []`);residual canonical 见 **`mstar-artifacts` SKILL.md**;字段与生命周期见 **`mstar-artifacts/references/status-and-residuals.md`**。`workflows/` 与 `projects/` 子目录由 engine writers 按需创建(**不**在 bootstrap 预建)。
17
- 3. 初始化可选 `notes.json`(legacy);`sdd/` 空目录占位(per-plan 子目录由 **`mstar-sdd`** → `mstar sdd workspace <plan-id>` 创建)。
17
+ 3. `sdd/` 空目录占位(per-plan 子目录由 **`mstar-sdd`** → `mstar sdd workspace <plan-id>` 创建)。
18
18
  4. 项目根 `.gitignore` 追加 Morning Star **进程产物**忽略集(canonical snippet → `mstar-conventions` SKILL.md「Git 跟踪策略」;legacy `.agents/` 有等价表)。
19
19
  5. 可选:创建 `{ITERATION_DIR}`(`iterations/` + `README.md`)与 `{KNOWLEDGE_DIR}`(`knowledge/` + `README.md`);`{HARNESS_DIR}/specs/`(解析后的 `{SPECS_DIR}` 默认落点);内容边界见 `mstar-conventions` SKILL.md 与 `references/knowledge-and-designs.md`。
20
20
  6. 创建 `{HARNESS_DIR}/AGENTS.md`(harness 子树规则;**tracked**):符号表可复述 `{HARNESS_DIR}`、`{PLAN_DIR}`、`{ITERATION_DIR}`、`{KNOWLEDGE_DIR}`、`{SPECS_DIR}` 与 `docs/` 分工;新项目推荐 `.mstar/AGENTS.md`,已有项目可继续使用 `.agents/AGENTS.md`。
@@ -28,7 +28,7 @@
28
28
  | 类别 | 默认 tracked | 默认 gitignored |
29
29
  |------|--------------|-----------------|
30
30
  | 结果(跨 clone handoff) | `{HARNESS_DIR}/AGENTS.md`、`{KNOWLEDGE_DIR}/**`、`{SPECS_DIR}/**` | — |
31
- | 进程(本地会话 SSOT) | — | `plans/`、`iterations/`、`status.json`、`workflows/`、`projects/`、`notes.json`、`sdd/`、`archived/` |
31
+ | 进程(本地会话 SSOT) | — | `plans/`、`iterations/`、`status.json`、`workflows/`、`projects/`、`sdd/`、`archived/` |
32
32
 
33
33
  跨 clone 须持久的 residual 或决策:经 **`mstar-compound`** 提升入 `{KNOWLEDGE_DIR}/`、写入 `{SPECS_DIR}/`,或记入 tracked `{HARNESS_DIR}/AGENTS.md` — **勿**默认 `git add` `status.json` / `plans/`。
34
34
 
@@ -19,8 +19,8 @@ Legacy fallbacks:
19
19
 
20
20
  1. Create `{HARNESS_DIR}` and `{PLAN_DIR}` when absent.
21
21
  2. Initialize `{HARNESS_DIR}/status.json` from template if available.
22
- 3. Ensure Morning Star **process-artifact** gitignore set is present (canonical snippet → `mstar-conventions` SKILL.md「Git 跟踪策略」): `{HARNESS_DIR}/archived/`, `iterations/`, `plans/`, `sdd/`, `notes.json`, `status.json`, `workflows/`, `projects/` (legacy `.agents/` equivalents when applicable). Per-plan `{SDD_DIR}/review/` is created by the SDD/review flow when needed.
23
- 4. Optional: `{HARNESS_DIR}/notes.json` (legacy), `{HARNESS_DIR}/knowledge/README.md`. `workflows/` / `projects/` subdirs are created on demand by engine writers — no pre-creation.
22
+ 3. Ensure Morning Star **process-artifact** gitignore set is present (canonical snippet → `mstar-conventions` SKILL.md「Git 跟踪策略」): `{HARNESS_DIR}/archived/`, `iterations/`, `plans/`, `sdd/`, `status.json`, `workflows/`, `projects/` (legacy `.agents/` equivalents when applicable). Per-plan `{SDD_DIR}/review/` is created by the SDD/review flow when needed.
23
+ 4. Optional: `{HARNESS_DIR}/knowledge/README.md`. `workflows/` / `projects/` subdirs are created on demand by engine writers — no pre-creation.
24
24
 
25
25
  If legacy plan directories already exist, reuse them; avoid dual-structure duplication.
26
26
 
@@ -29,7 +29,7 @@ If legacy plan directories already exist, reuse them; avoid dual-structure dupli
29
29
  **Principle:** process stays local; results are shared with the team. Full rules → `mstar-conventions` SKILL.md「Git 跟踪策略」.
30
30
 
31
31
  - **Default tracked** under `{HARNESS_DIR}`: `AGENTS.md`, `{KNOWLEDGE_DIR}/**`, `{SPECS_DIR}/**` (resolved specs path; default `{HARNESS_DIR}/specs/`).
32
- - **Default gitignored** (local session SSOT / coordination): `archived/`, `iterations/`, `plans/`, `sdd/`, `notes.json`, `status.json`, `workflows/`, `projects/`.
32
+ - **Default gitignored** (local session SSOT / coordination): `archived/`, `iterations/`, `plans/`, `sdd/`, `status.json`, `workflows/`, `projects/`.
33
33
  - `status.json` (v2 root), workflow snapshots, project registers and main plan files remain **local session SSOT** — PM must keep them current on disk, but **do not** default `git add` / `git commit` for cross-clone handoff. Promote durable residuals and decisions into tracked `knowledge/` / `specs/` / `AGENTS.md` (compound) when they must survive clone.
34
34
  - If a project explicitly opts into tracking process artifacts, record that policy in `{HARNESS_DIR}/AGENTS.md` and ensure team alignment.
35
35
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "3.2.3",
3
+ "version": "3.2.5",
4
4
  "description": "Morning Star harness OpenCode plugin — skills bootstrap + engine-backed runtime hooks (status lint, dispatch validation, Enforcement: hard gates).",
5
5
  "license": "MIT",
6
6
  "repository": {