@mstar-harness/opencode 1.5.6 → 1.6.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.
Files changed (22) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/harness-agents/qc-specialist-2.md +5 -51
  3. package/harness-agents/qc-specialist-3.md +5 -51
  4. package/harness-agents/qc-specialist.md +5 -51
  5. package/harness-skills/mstar-branch-worktree/SKILL.md +3 -2
  6. package/harness-skills/mstar-host/SKILL.md +3 -2
  7. package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +55 -0
  8. package/harness-skills/mstar-host/references/zcode.md +156 -0
  9. package/harness-skills/mstar-review-qc/SKILL.md +7 -1
  10. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +15 -4
  11. package/harness-skills/mstar-roles/SKILL.md +2 -0
  12. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +2 -2
  13. package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +3 -3
  14. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +2 -0
  15. package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +10 -8
  16. package/harness-skills/mstar-roles/references/qa-engineer.md +2 -2
  17. package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +1 -0
  18. package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +9 -8
  19. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +2 -0
  20. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +26 -5
  21. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +9 -1
  22. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,19 @@ All notable changes to the `@mstar-harness/opencode` package are documented in t
4
4
 
5
5
  The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface releases.
6
6
 
7
+ ## 1.6.1
8
+
9
+ - Bundled skills/agents: **QC = code reviewer** — L3 must not run test/build/lint on shared tri-review cwd; L1/L4 own runtime evidence; `qc-specialist*` bash allowlist git-only (+ lightweight analysis).
10
+ - Version alignment with harness **1.6.1**.
11
+
12
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.6.1**.
13
+
14
+ ## 1.6.0
15
+
16
+ - Version alignment with harness **1.6.0** (no OpenCode plugin change in this release; ZCode host surface is added at the harness/CLI layer, not bundled into the OpenCode package).
17
+
18
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.6.0**.
19
+
7
20
  ## 1.5.6
8
21
 
9
22
  - Version alignment with harness **1.5.6** (bundled skills: `Findings cleanup: zero-residual` mode).
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: qc-specialist-2
3
3
  description: |-
4
- 质量控制专家(Reviewer #2)- 代码审查和质量保证。
5
- Quality Control Specialist (Reviewer #2) - code review and quality assurance after significant changes.
4
+ 质量控制专家(Reviewer #2)- 代码审查(diff / 逻辑 / 安全正确性)。非测试执行席。
5
+ Quality Control Specialist (Reviewer #2) - code review (diff, logic, security/correctness). Not a test runner.
6
6
  mode: subagent
7
7
  tools:
8
8
  write: true
@@ -22,7 +22,7 @@ permission:
22
22
  ".worktrees/**/.agents/sdd/**/*.md": allow
23
23
  bash:
24
24
  "*": deny
25
- # Git inspection (read-only)
25
+ # Git inspection (read-only) — L3 is diff review; no test/build/lint CLIs (peer QC share worktree)
26
26
  "git diff*": allow
27
27
  "git log*": allow
28
28
  "git show*": allow
@@ -31,59 +31,13 @@ permission:
31
31
  "git stash list*": allow
32
32
  "git branch*": allow
33
33
  "git status*": allow
34
- # JavaScript / TypeScript
35
- "eslint*": allow
36
- "npx eslint*": allow
37
- "prettier --check*": allow
38
- "npx prettier --check*": allow
39
- "tsc*": allow
40
- "npx tsc*": allow
41
- "biome*": allow
42
- "npx @biomejs/biome*": allow
43
- "oxlint*": allow
44
- "npx oxlint*": allow
45
- "stylelint*": allow
46
- "npx stylelint*": allow
47
- # Python
48
- "ruff*": allow
49
- "pylint*": allow
50
- "flake8*": allow
51
- "mypy*": allow
52
- "pyright*": allow
53
- "bandit*": allow
54
- "python -m ruff*": allow
55
- "python -m pylint*": allow
56
- "python -m mypy*": allow
57
- "python3 -m ruff*": allow
58
- "python3 -m pylint*": allow
59
- "python3 -m mypy*": allow
60
- # Rust
61
- "cargo clippy*": allow
62
- "cargo fmt --check*": allow
63
- "cargo audit*": allow
64
- # Go
65
- "golangci-lint*": allow
66
- "go vet*": allow
67
- "staticcheck*": allow
68
- # Ruby
69
- "rubocop*": allow
70
- "bundle exec rubocop*": allow
71
- # Swift
72
- "swiftlint*": allow
73
- "swift-format lint*": allow
74
- # Shell / Config
75
- "shellcheck*": allow
76
- "hadolint*": allow
77
- "actionlint*": allow
78
- # Markdown / Docs
79
- "markdownlint*": allow
80
- # General analysis
34
+ "git rev-parse*": allow
35
+ # Lightweight read-only analysis
81
36
  "wc*": allow
82
37
  "rg*": allow
83
38
  "cloc*": allow
84
39
  "scc*": allow
85
40
  "tokei*": allow
86
- "git rev-parse*": allow
87
41
  task:
88
42
  "*": deny
89
43
  explore: allow
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: qc-specialist-3
3
3
  description: |-
4
- 质量控制专家(Reviewer #3)- 代码审查和质量保证。
5
- Quality Control Specialist (Reviewer #3) - code review and quality assurance after significant changes.
4
+ 质量控制专家(Reviewer #3)- 代码审查(diff / 逻辑 / 性能可靠性)。非测试执行席。
5
+ Quality Control Specialist (Reviewer #3) - code review (diff, logic, performance/reliability). Not a test runner.
6
6
  mode: subagent
7
7
  tools:
8
8
  write: true
@@ -22,7 +22,7 @@ permission:
22
22
  ".worktrees/**/.agents/sdd/**/*.md": allow
23
23
  bash:
24
24
  "*": deny
25
- # Git inspection (read-only)
25
+ # Git inspection (read-only) — L3 is diff review; no test/build/lint CLIs (peer QC share worktree)
26
26
  "git diff*": allow
27
27
  "git log*": allow
28
28
  "git show*": allow
@@ -31,59 +31,13 @@ permission:
31
31
  "git stash list*": allow
32
32
  "git branch*": allow
33
33
  "git status*": allow
34
- # JavaScript / TypeScript
35
- "eslint*": allow
36
- "npx eslint*": allow
37
- "prettier --check*": allow
38
- "npx prettier --check*": allow
39
- "tsc*": allow
40
- "npx tsc*": allow
41
- "biome*": allow
42
- "npx @biomejs/biome*": allow
43
- "oxlint*": allow
44
- "npx oxlint*": allow
45
- "stylelint*": allow
46
- "npx stylelint*": allow
47
- # Python
48
- "ruff*": allow
49
- "pylint*": allow
50
- "flake8*": allow
51
- "mypy*": allow
52
- "pyright*": allow
53
- "bandit*": allow
54
- "python -m ruff*": allow
55
- "python -m pylint*": allow
56
- "python -m mypy*": allow
57
- "python3 -m ruff*": allow
58
- "python3 -m pylint*": allow
59
- "python3 -m mypy*": allow
60
- # Rust
61
- "cargo clippy*": allow
62
- "cargo fmt --check*": allow
63
- "cargo audit*": allow
64
- # Go
65
- "golangci-lint*": allow
66
- "go vet*": allow
67
- "staticcheck*": allow
68
- # Ruby
69
- "rubocop*": allow
70
- "bundle exec rubocop*": allow
71
- # Swift
72
- "swiftlint*": allow
73
- "swift-format lint*": allow
74
- # Shell / Config
75
- "shellcheck*": allow
76
- "hadolint*": allow
77
- "actionlint*": allow
78
- # Markdown / Docs
79
- "markdownlint*": allow
80
- # General analysis
34
+ "git rev-parse*": allow
35
+ # Lightweight read-only analysis
81
36
  "wc*": allow
82
37
  "rg*": allow
83
38
  "cloc*": allow
84
39
  "scc*": allow
85
40
  "tokei*": allow
86
- "git rev-parse*": allow
87
41
  task:
88
42
  "*": deny
89
43
  explore: allow
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: qc-specialist
3
3
  description: |-
4
- 质量控制专家(Reviewer #1)- 代码审查和质量保证。
5
- Quality Control Specialist (Reviewer #1) - code review and quality assurance after significant changes.
4
+ 质量控制专家(Reviewer #1)- 代码审查(diff / 逻辑 / 架构可维护性)。非测试执行席。
5
+ Quality Control Specialist (Reviewer #1) - code review (diff, logic, maintainability). Not a test runner.
6
6
  mode: subagent
7
7
  tools:
8
8
  write: true
@@ -22,7 +22,7 @@ permission:
22
22
  ".worktrees/**/.agents/sdd/**/*.md": allow
23
23
  bash:
24
24
  "*": deny
25
- # Git inspection (read-only)
25
+ # Git inspection (read-only) — L3 is diff review; no test/build/lint CLIs (peer QC share worktree)
26
26
  "git diff*": allow
27
27
  "git log*": allow
28
28
  "git show*": allow
@@ -31,59 +31,13 @@ permission:
31
31
  "git stash list*": allow
32
32
  "git branch*": allow
33
33
  "git status*": allow
34
- # JavaScript / TypeScript
35
- "eslint*": allow
36
- "npx eslint*": allow
37
- "prettier --check*": allow
38
- "npx prettier --check*": allow
39
- "tsc*": allow
40
- "npx tsc*": allow
41
- "biome*": allow
42
- "npx @biomejs/biome*": allow
43
- "oxlint*": allow
44
- "npx oxlint*": allow
45
- "stylelint*": allow
46
- "npx stylelint*": allow
47
- # Python
48
- "ruff*": allow
49
- "pylint*": allow
50
- "flake8*": allow
51
- "mypy*": allow
52
- "pyright*": allow
53
- "bandit*": allow
54
- "python -m ruff*": allow
55
- "python -m pylint*": allow
56
- "python -m mypy*": allow
57
- "python3 -m ruff*": allow
58
- "python3 -m pylint*": allow
59
- "python3 -m mypy*": allow
60
- # Rust
61
- "cargo clippy*": allow
62
- "cargo fmt --check*": allow
63
- "cargo audit*": allow
64
- # Go
65
- "golangci-lint*": allow
66
- "go vet*": allow
67
- "staticcheck*": allow
68
- # Ruby
69
- "rubocop*": allow
70
- "bundle exec rubocop*": allow
71
- # Swift
72
- "swiftlint*": allow
73
- "swift-format lint*": allow
74
- # Shell / Config
75
- "shellcheck*": allow
76
- "hadolint*": allow
77
- "actionlint*": allow
78
- # Markdown / Docs
79
- "markdownlint*": allow
80
- # General analysis
34
+ "git rev-parse*": allow
35
+ # Lightweight read-only analysis
81
36
  "wc*": allow
82
37
  "rg*": allow
83
38
  "cloc*": allow
84
39
  "scc*": allow
85
40
  "tokei*": allow
86
- "git rev-parse*": allow
87
41
  task:
88
42
  "*": deny
89
43
  explore: allow
@@ -195,8 +195,9 @@ Default process artifacts (`plans/`, `iterations/`, `status.json`, `sdd/`, `note
195
195
  - **三票审同一功能(强制对齐)**:分派 **QC 三审**时,除上述字段外,**必须**在 **三份 Assignment 中逐字写入相同**的 **`plan_id`** 与 **`Review range` / `Diff basis`**:
196
196
  - **`plan_id`**:与 `{SDD_DIR}` 的 `<plan-id>` 段、主 **Plan Path**、`status.json.plans[].id` 一致;无 `{PLAN_DIR}` 流程时写 **`plan_id: N/A`**,并另给一行 **`Feature / scope label`**(不可歧义,足以与并行其它 feature 区分)。
197
197
  - **`Review range` / `Diff basis`**:明确本次审查所针对的 **diff/提交范围**(例如 `merge-base: <target_branch-or-base-ref>` + `tip: HEAD`;或 `rev-range: <full-40>..<full-40>`;或一句 `equivalent to: git diff <merge-base>...HEAD`,以团队可复现为准)。**三名 reviewer 的 Assignment 间该字段必须完全一致**;**`qa-engineer`** 验证同一 feature 时 **复用同一 `plan_id` 与同一 `Review range` / `Diff basis`**。**热修 / QC 单审**路径也须含 **同一组字段**,仅承接方份数为 1。
198
- - **三审并行**时,三名 reviewer **共用同一组 `Review cwd` / `Worktree path` + `Working branch` + `plan_id` + `Review range` / `Diff basis`**(对业务仓只读分析);**一般不必**为每位 reviewer 各开一个 worktree,除非宿主或执行环境要求进程级隔离。
199
- - QC **报告落盘**默认仅限 Assignment 指定的 `{SDD_DIR}/review/`;上述约定保证 `git diff`、`git log`、lint 与所读文件与 **待合并 feature** 一致。PM 另行提交主 plan gate summary / `status.json` residual changes as durable artifacts.
198
+ - **三审并行**时,三名 reviewer **共用同一组 `Review cwd` / `Worktree path` + `Working branch` + `plan_id` + `Review range` / `Diff basis`**(对业务仓 **只读 diff 审查**);**一般不必**为每位 reviewer 各开一个 worktree,除非宿主或执行环境要求进程级隔离。
199
+ - **并行 QC 禁止**在共享检出上跑 **test / build / install / lint / typecheck** 等会争用缓存或锁的命令(否则 peer QC 易 `Blocked`)。L3 默认手段:`git diff` / `git log` / `git show` / Read / Grep。运行时验证留给 **L1 证据** **`qa-engineer`(L4)** `mstar-review-qc/references/review-responsibility-boundaries.md`。
200
+ - QC 的 **报告落盘**默认仅限 Assignment 指定的 `{SDD_DIR}/review/`;上述约定保证 `git diff`、`git log` 与所读文件与 **待合并 feature** 一致。PM 另行提交主 plan gate summary / `status.json` residual changes as durable artifacts。
200
201
  - **`project-manager`** 分派 **`qa-engineer`** 时(仅 **`QA gate: mandatory`**),Assignment 须与 QC **逐字相同**的 **`Review cwd` / `Worktree path`**、**`Working branch`**、**`plan_id`**、**`Review range` / `Diff basis`**(QC 已写清则 QA 照抄)。**`qa-engineer`** 执行业务仓命令前须核对检出与分支;Report-only 且无路径依赖时,回报须说明验证环境,否则 `Blocked`。
201
202
  - 若 **QA 与同仓其他可写角色并发**提交测试代码,仍须遵守上文「同仓并发写入」的 **worktree** 规则(可为 QA 单开一条写入 worktree,**同一 `Working branch`**,由 PM 在 Assignment 写明)。
202
203
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-host
3
- description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
3
+ description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi, ZCode). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, ZCode Agent/AskUserQuestion/EnterPlanMode with built-in subagent types and role-in-prompt binding, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
4
4
  ---
5
5
 
6
6
  # Morning Star Host Adapter
@@ -32,7 +32,8 @@ Use **capability signals** (not filesystem paths):
32
32
  | **Task** + `subagent_type`, no CreatePlan | `cursor` | `references/cursor.md` |
33
33
  | **Codex app/CLI/plugin context**, `/plan`, `/goal`, Goal tools, `functions.*`, `codex_app.*`, `tool_search`, Browser plugin tools | `codex` | `references/codex.md`; Plan/Goal mode also `references/codex-plan-goal-mode-bridge.md` |
34
34
  | **`Agent`** / **`AgentSwarm`** / **`AskUserQuestion`** / **`EnterPlanMode`**, Kimi plugin (`.kimi-plugin/plugin.json`), `/morning-star-harness:*` commands | `kimi` | `references/kimi.md`; Plan mode also `references/kimi-plan-mode-bridge.md` |
35
- | Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, **`codex.md`**, and **`kimi.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
35
+ | **`Agent`** / **`AskUserQuestion`** / **`EnterPlanMode`** / **`TodoWrite`**, no `AgentSwarm`, ZCode plugin (`.zcode-plugin/plugin.json`), `/morning-star-harness:*` commands | `zcode` | `references/zcode.md`; Plan mode also `references/zcode-plan-mode-bridge.md` |
36
+ | Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, **`codex.md`**, **`kimi.md`**, and **`zcode.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
36
37
 
37
38
  ## Parallel dispatch (invoke-capable hosts)
38
39
 
@@ -0,0 +1,55 @@
1
+ # ZCode Plan Mode × Harness Dual-Write Bridge
2
+
3
+ > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** when Plan mode is active. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
4
+
5
+ ## Purpose
6
+
7
+ ZCode **Plan mode** (`EnterPlanMode` / `ExitPlanMode`) uses read-only exploration for design and a plan approval gate before implementation. Morning Star **SSOT** lives on disk under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`). This reference defines **dual-write**: mirror durable plan artifacts to the repo; never treat the ZCode session todo list alone as the handoff surface.
8
+
9
+ ## Priority (hard)
10
+
11
+ 1. User explicit instructions (this turn)
12
+ 2. Project `AGENTS.md` / `CLAUDE.md`
13
+ 3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
14
+ 4. ZCode `TodoWrite` UI (session UX mirror)
15
+
16
+ **NEVER** cite only a session todo list path in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
17
+
18
+ ## When this applies
19
+
20
+ - ZCode **Plan mode** is active (`EnterPlanMode` succeeded).
21
+ - Morning Star plugin is installed (`.zcode-plugin/plugin.json` skills loaded) or **`/morning-star-harness:pm`** / **`pm` skill** is in use.
22
+
23
+ ## Before entering Plan mode
24
+
25
+ 1. **Read** (minimum): `mstar-plan-conventions`, `mstar-plan-artifacts` (SKILL.md); Prepare gates from `mstar-phase-gates` if not hotfix.
26
+ 2. **Discover** `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions`.
27
+ 3. **Initialize** if absent: `{HARNESS_DIR}/`, `{PLAN_DIR}/`, `status.json` from `mstar-plan-artifacts/templates/status.empty.json`, `archived/residuals/`, Morning Star process-artifact gitignore set (see `mstar-plan-conventions` SKILL.md「Git 跟踪策略」).
28
+
29
+ ## Plan mode workflow (dual-write)
30
+
31
+ | Step | ZCode session | Harness SSOT |
32
+ |------|---------------|--------------|
33
+ | Enter | `EnterPlanMode` — explore read-only | Ensure `{HARNESS_DIR}` exists; register `plan_id` in `status.json` when known |
34
+ | Design | Draft plan content; surface via `ExitPlanMode` plan text | Mirror main plan to `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes |
35
+ | Clarify | `AskUserQuestion` for blocking ambiguity only | Record decisions in plan / spec when durable |
36
+ | Exit | `ExitPlanMode` — user approves plan to implement | SSOT plan locked; `status.json` row updated |
37
+ | Implement | Agent mode resumes | Per-task commits, Working branch, dispatch per `mstar-dispatch-gates` |
38
+
39
+ `TodoWrite` and ZCode UI todos are **session progress only** — sync meaningful state to SSOT plan checkboxes and `status.json` when coordination requires it.
40
+
41
+ ## ExitPlanMode gate
42
+
43
+ Do **not** treat ExitPlanMode approval as Morning Star **Done**. Implementation still follows phase gates, per-task commits, QC, and QA per the SSOT plan.
44
+
45
+ ## `mstar-iteration` Phase 1
46
+
47
+ When iteration Phase 1 runs in Plan mode:
48
+
49
+ - Use **one** plan session; iterate the **same** plan content and SSOT mirror in place (feedback-driven edits).
50
+ - Do **not** run Review & Edit, commit integration branch, or dispatch implementers until the user approves via `ExitPlanMode` (or explicit go-ahead after plan lock).
51
+ - After approval: reload `mstar-harness-core` + `zcode.md`; resume as `project-manager` orchestration.
52
+
53
+ ## Enforcement
54
+
55
+ Conflict with harness invariants → **`mstar-harness-core`** wins. Full Cursor CreatePlan bridge detail lives in `cursor-plan-mode-bridge.md` when hosts differ; ZCode uses this lighter Enter/Exit bridge only.
@@ -0,0 +1,156 @@
1
+ # ZCode host reference
2
+
3
+ Load when **`mstar-host`** detection resolves **zcode** (ZCode client session, `.zcode-plugin/plugin.json` plugin installed, `Agent` / `AskUserQuestion` / `EnterPlanMode` / `TodoWrite` tools, or `/morning-star-harness:*` plugin commands).
4
+
5
+ Plan mode: read **`zcode-plan-mode-bridge.md`** when `EnterPlanMode` / `ExitPlanMode` is active.
6
+
7
+ Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2** concurrent `Agent` invocations.
8
+
9
+ ## ZCode-only context
10
+
11
+ - Plugin manifest: **`.zcode-plugin/plugin.json`** (plugin root is the **repo root**; paths stay `./skills/`, `./commands/`, `./agents/`).
12
+ - Runtime skills: repo `skills/` mounted by the plugin (`"skills": "./skills/"`).
13
+ - Plugin commands: repo `commands/` → `/morning-star-harness:<name>` (e.g. `/morning-star-harness:iteration-start`).
14
+ - Plugin agents: repo `agents/*.md` (role frontmatter `name` + `description`); ZCode reads them as subagent definitions but **does not** expose custom named `subagent_type` values for Morning Star roles (see C5).
15
+ - **No `sessionStart.skill`** (ZCode has no Kimi-style session auto-load) — enter PM manually via **`/morning-star-harness:pm`** or the **`pm`** skill, then **Read next** → `mstar-harness-core` → `project-manager.md`.
16
+ - Install (user-scoped, recommended): `npx @mstar-harness/cli init --target zcode --scope global`, then in ZCode **Settings → Plugin Management → Discover** install **morning-star-harness** from the **mstar-local** marketplace (or add `github:btspoony/mstar-harness` as a marketplace directly).
17
+ - Plugins are **user-scoped** (all projects); managed copy lives under `~/.zcode/cli/plugins/` after install.
18
+ - Project `.agents/skills/` symlinks are **not** required when using the plugin — commands and skills come from the plugin mount.
19
+
20
+ ## Skill loading
21
+
22
+ 1. On entry: invoke **`pm`** (via `/morning-star-harness:pm` or `/skill:pm`) → **Read next** loads `mstar-harness-core`, then `mstar-roles` → `project-manager.md` when PM is active.
23
+ 2. Read `mstar-host` and this ZCode reference.
24
+ 3. If Plan mode is active, read `zcode-plan-mode-bridge.md`.
25
+ 4. Load `mstar-roles` and the active role reference.
26
+ 5. Load topic skills on demand per the role reference.
27
+
28
+ Use skill names in prompts and references. Avoid absolute local paths unless maintaining this repository or skills are not installed.
29
+
30
+ ## Tools map (default agent)
31
+
32
+ | ZCode tool | Harness use |
33
+ |------------|-------------|
34
+ | **Agent** | Primary dispatch — delegate one subagent task (`subagent_type`: built-in profiles such as `general-purpose` / `Explore`) |
35
+ | **AskUserQuestion** | Structured clarify (1–4 questions, 2–4 options each); prefer over free-form when choices are known |
36
+ | **EnterPlanMode** / **ExitPlanMode** | Plan mode entry/approval → **`zcode-plan-mode-bridge.md`** |
37
+ | **TodoWrite** | Session UX only; mirror to SSOT plan / `status.json` when durable |
38
+ | **Bash** | Commands, git, tests — evidence per `mstar-coding-behavior` |
39
+ | **Read** | File reads (text + images) |
40
+ | **Edit** / **Write** | Edits |
41
+ | **Glob** / **Grep** | Search (prefer over shell find/grep) |
42
+ | **WebSearch** / **WebFetch** | External docs / facts |
43
+ | **TaskOutput** / **TaskStop** | Long-running task management when present |
44
+
45
+ OpenCode-style `question`/`task`, Cursor **Task**, and Kimi **AgentSwarm** are **not** ZCode tools — do not assume them.
46
+
47
+ ## Role agents (C5 — hard constraint)
48
+
49
+ ZCode ships **built-in subagent types only** (e.g. `general-purpose`, `Explore`). Valid **`subagent_type`** values are the host's built-in profiles:
50
+
51
+ | `subagent_type` | ZCode profile | Harness mapping |
52
+ |-----------------|---------------|-----------------|
53
+ | `Explore` | Read-only exploration | Orientation, codebase survey, Prepare explore passes |
54
+ | `general-purpose` | General implementation / research | **All other Morning Star roles** (`product-manager`, `fullstack-dev`, `qc-specialist`, …) |
55
+
56
+ Morning Star role ids (`project-manager`, `fullstack-dev`, `qc-specialist`, …) are **not** valid `subagent_type` values. Although `agents/*.md` are read by ZCode, the host does not register them as callable named agent types the way Codex TOML or Cursor `subagent_type` role ids do.
57
+
58
+ ### Role binding in prompt (C5b — required)
59
+
60
+ Because ZCode cannot bind roles via agent config, every dispatch **must** carry the played Morning Star role in the **Assignment** and in the **`Agent` prompt**:
61
+
62
+ 1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
63
+ 2. **`Act as <role-id>`** (or equivalent) at the top of the Agent prompt.
64
+ 3. **Skill load list** — instruct the subagent to read `mstar-roles` → `references/<role-id>.md` (or shared reference + parameters) and topic skills per that reference.
65
+ 4. **`subagent_type`** — pick from the host's built-in profiles only (typically `general-purpose`; `Explore` for read-only orientation).
66
+
67
+ Paste-only Assignment without an **`Agent`** call is **not** dispatch.
68
+
69
+ ### Assignment / Agent-prompt template
70
+
71
+ ```markdown
72
+ ## Assignment
73
+
74
+ **Execute as**: fullstack-dev
75
+ **Delegation**: forbidden
76
+ **Working branch**: feat/example
77
+ **Plan Path**: .mstar/plans/20260717-example.md
78
+
79
+ **IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
80
+ Load: `mstar-harness-core` → `mstar-host` → `zcode.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
81
+
82
+ <task body>
83
+ ```
84
+
85
+ PM dispatch invocation (same turn):
86
+
87
+ ```text
88
+ Agent(
89
+ subagent_type: "general-purpose",
90
+ description: "<short task label>",
91
+ prompt: "<full Assignment body including Act as + skill load>"
92
+ )
93
+ ```
94
+
95
+ For **`Explore`** orientation:
96
+
97
+ ```text
98
+ Agent(subagent_type: "Explore", description: "...", prompt: "... Act as explore-only orientation; Execute as: n/a ...")
99
+ ```
100
+
101
+ ## PM dispatch (`Agent`)
102
+
103
+ Harness **dispatch** on ZCode = **one or more `Agent` tool calls** with correct **`subagent_type`** and role-bound prompts.
104
+
105
+ | Harness | ZCode |
106
+ |---------|-------|
107
+ | `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **Agent** prompt |
108
+ | `subagent_type` for invoke | built-in profiles only (typically `general-purpose`; `Explore` for read-only) |
109
+ | 1 Assignment ⇒ 1 invoke | **1 `Agent`** call with full Assignment prompt |
110
+ | Parallel batch **N** | **N `Agent`** calls in **one assistant message** |
111
+ | No `Agent` call | **Not dispatched** — paste-only / `dispatch incomplete` |
112
+
113
+ ### QC default
114
+
115
+ - **`Execution mode: sdd`**: **N=3** `Agent` calls (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each prompt **Act as** the respective QC role, all `subagent_type: "general-purpose"`.
116
+ - **`inline`**: **N=1** per `parallel-dispatch.md`.
117
+
118
+ Cannot emit required **N** → **`Blocked`**.
119
+
120
+ ### SDD implement (serial)
121
+
122
+ - **`Execution mode: sdd`**: one implementer **`Agent`** per task id; task reviewer = new **`Agent`** (no sticky resume unless host adds it later).
123
+ - **Never** multiple implementer Agents in one message for the same plan.
124
+
125
+ ## Clarify
126
+
127
+ - Prefer **`AskUserQuestion`** for 1–3 high-impact choices with known options.
128
+ - Fallback: one concise Markdown question after codebase exploration cannot answer it.
129
+ - `AskUserQuestion` for plan approval is wrong in Plan mode — use **`ExitPlanMode`** for plan sign-off.
130
+ - "Question asked" ≠ clarify done; blocking ambiguity → **`Blocked`** or escalation.
131
+
132
+ ## Commands and skills paths
133
+
134
+ | Surface | Path / invocation |
135
+ |---------|-------------------|
136
+ | Plugin skills | `/skill:<skill-name>` or auto-load from `skills/` via plugin |
137
+ | Plugin commands | `/morning-star-harness:iteration-start` etc. |
138
+ | Session entry | `/morning-star-harness:pm` or `/skill:pm` → `mstar-harness-core` via pm **Read next** |
139
+
140
+ ## Files, shell, and approvals
141
+
142
+ - Prefer **Glob** / **Grep** for search; **Write** / **Edit** for edits.
143
+ - Respect ZCode permission prompts for destructive operations.
144
+ - Do not edit `~/.zcode/` credentials, managed plugin copies, or user secrets without explicit consent.
145
+
146
+ ## Git and final evidence
147
+
148
+ - Git work follows `mstar-branch-worktree` and Assignment **Working branch** / **Branch policy**.
149
+ - Completion reports cite concrete commands, artifacts, and commit lines when required.
150
+
151
+ ## Gotchas
152
+
153
+ - Plugin install materializes source under `~/.zcode/cli/plugins/` — edit the harness checkout + reinstall to pick up harness changes.
154
+ - Session todos (`TodoWrite`) are not durable SSOT unless mirrored to `{HARNESS_DIR}`.
155
+ - No custom ZCode agent profiles for Morning Star roles — role binding is **always** prompt + skill load (C5b).
156
+ - ZCode has no `sessionStart.skill`; new sessions do **not** auto-load PM — invoke `/morning-star-harness:pm` or `/skill:pm` manually.
@@ -7,10 +7,16 @@ description: "Morning Star QC orchestration — **SDD mandatory plan QC tri-revi
7
7
 
8
8
  **首次 Read 本 skill 时:必须先 Read `mstar-harness-core`。** 同仓检出与派发 → **`mstar-branch-worktree`** · **`mstar-dispatch-gates`**。冲突时 **以 `mstar-harness-core` 为准**。
9
9
 
10
- **摘要**:职责分层 → **`references/review-responsibility-boundaries.md`**。Leaf QC 执行 → **`mstar-roles/references/qc-specialist/`**。L4 验收 → **`mstar-roles/references/qa-engineer/`**。
10
+ **摘要**:职责分层 → **`references/review-responsibility-boundaries.md`**(**L3 = code reviewer / diff+logic;不跑 test/build**;运行时验证归 L1/L4)。Leaf QC 执行 → **`mstar-roles/references/qc-specialist/`**。L4 验收 → **`mstar-roles/references/qa-engineer/`**。
11
11
 
12
12
  # Morning Star QC Orchestration(PM · 编排层)
13
13
 
14
+ ## L3 是什么(派发前对齐)
15
+
16
+ - Plan QC seats are **reviewers**: whole-branch **diff / logic / risk** lenses — same family as PR review, not a parallel QA test lane.
17
+ - **Do not** instruct QC in Assignment to “run the suite / build / lint to confirm” on shared tri cwd; that causes peer `Blocked` and collapses L3 into L4.
18
+ - Runtime proof stays with **implementer evidence** and **`QA gate`** (`qa-engineer` or PM acceptance).
19
+
14
20
  ## 分派时机(与 plan / batch 对齐)
15
21
 
16
22
  - **`Execution mode: sdd`**:全部 task + L2 task reviewers 完成后 → **强制 tri-review**(`QC mode: full tri-review`,**N=3**)。Assignment 须含 **branch review-package** 路径与 `{SDD_DIR}/review/qcN.md` report paths。PM 汇总 `{SDD_DIR}/review/qc-consolidated.md` 并回写主 plan durable summary。
@@ -4,13 +4,24 @@
4
4
 
5
5
  | Layer | Who | When | Scope | Input |
6
6
  |-------|-----|------|-------|--------|
7
- | **L1** Implementer | dev subagent | Per task | Write code + TDD evidence | `task-N-brief.md` |
8
- | **L2** Task reviewer | PM-dispatched subagent (SDD) | Per task, after implementer | Spec + quality for **one task** | brief, report, **task-level** diff |
9
- | **L3** Plan QC tri (cross-review) | `qc-specialist` + `qc-specialist-2` + `qc-specialist-3` | After **all** tasks on branch | Integration, regression, contract drift **independent lenses, same branch diff** | Branch `review-package` MERGE_BASE..HEAD |
10
- | **L4** QA | `qa-engineer` when **`QA gate: mandatory`**; else PM acceptance | After QC gate | DoD acceptance, residual verify, Done recommendation — **not** default full re-run | Review bundle + plan + `status.json` |
7
+ | **L1** Implementer | dev subagent | Per task | Write code + **run** TDD / verification evidence | `task-N-brief.md` |
8
+ | **L2** Task reviewer | PM-dispatched subagent (SDD) | Per task, after implementer | Spec + quality for **one task** (diff-first; no full suite) | brief, report, **task-level** diff |
9
+ | **L3** Plan QC tri (cross-review) | `qc-specialist` + `qc-specialist-2` + `qc-specialist-3` | After **all** tasks on branch | **Code-review seat** — diff, language/logic, security & contract lenses on **whole branch**; **not** the test-execution path | Branch `review-package` MERGE_BASE..HEAD |
10
+ | **L4** QA | `qa-engineer` when **`QA gate: mandatory`**; else PM acceptance | After QC gate | DoD acceptance, residual verify, targeted/full **command** verification, Done recommendation | Review bundle + plan + **L1 evidence** + `status.json` |
11
11
 
12
12
  PM sets **`QA gate`** per `mstar-roles/references/project-manager/qa-trigger-matrix.md`. L4 execution when dispatched → `mstar-roles/references/qa-engineer/acceptance-gate.md`.
13
13
 
14
+ ### L3 vs L4 vs L1 — who runs commands?
15
+
16
+ | Duty | Owner | QC (`qc-specialist*`) |
17
+ |------|-------|------------------------|
18
+ | Produce runnable test/build evidence | **L1** implementer | **Does not** own |
19
+ | Diff / logic / vulnerability / contract review | **L3** QC (and L2 task reviewer) | **Primary job** |
20
+ | Map DoD → evidence; re-run gaps; close residuals | **L4** QA (or PM acceptance) | **Does not** own |
21
+ | Full / targeted test suites, builds, installs | **L1** and/or **L4** | **NEVER** — leave to QA/dev |
22
+
23
+ **Why:** SDD plan QC is **N=3 parallel** on a **shared** `Review cwd`. Build/test/lint toolchains contend for caches and locks and falsely `Blocked` peer reviewers. QC is a **reviewer**, not a second QA lane.
24
+
14
25
  **SDD rule:** Layers L1–L2 run **per task** (serial). Layer L3 is **mandatory full tri-review** (`N=3`) whenever **`Execution mode: sdd`** — single-plan **and** iteration **and** multi-plan iteration. Layer L3 is **not** optional “final single review”.
15
26
 
16
27
  **Non-SDD (`Execution mode: inline`):** hotfix / single-stream — plan QC may be **single-seat** (`qc.md`) or skipped per PM routing.
@@ -60,6 +60,8 @@ Role `references/*.md` files include explicit **`NEVER`** sections (anti-recursi
60
60
 
61
61
  ### QC reviewer (`qc-specialist*` family)
62
62
 
63
+ **Job:** Independent **code review** on the plan branch diff (logic, security, contracts, maintainability, reliability). **Not** test execution — suites/builds belong to implementer (L1) and `qa-engineer` (L4). See `mstar-review-qc/references/review-responsibility-boundaries.md`.
64
+
63
65
  **Default (SDD):** plan QC tri-review — `qc-specialist` / `qc-specialist-2` / `qc-specialist-3` → `{SDD_DIR}/review/qc1.md`…`qc3.md` + `qc-consolidated.md` when **`Execution mode: sdd`**.
64
66
 
65
67
  **Exception (`inline` / hotfix):** single-seat → `{SDD_DIR}/review/qc.md` (`QC mode: single`).
@@ -39,10 +39,10 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
39
39
 
40
40
  - Always include the **IDENTITY preamble**: state who the assignee IS (e.g. "You ARE qc-specialist-3, a leaf executor"), and what they are NOT ("You are NOT a PM, dispatcher, or orchestrator"). Follow with the universal floor.
41
41
  - Add anti-patterns specific to the assignment context. Examples per role type:
42
- - **QC reviewers**: "start review before all QC reviewers are dispatched in parallel"; "treat other reviewers' names in routing text as invoke targets"
42
+ - **QC reviewers** (`qc-specialist*`): "start review before all QC reviewers are dispatched in parallel"; "treat other reviewers' names in routing text as invoke targets"; "run test/build/lint on shared Review cwd"; "fill missing runtime evidence by executing the suite"
43
43
  - **Multi-track implementers** (`fullstack-dev` + `frontend-dev` / `fullstack-dev-2`): "auto-dispatch to the other track mentioned in Dev routing"; "implement in repo root when Assignment names a different `Worktree path`"
44
44
  - **`fullstack-dev-2`**: "treat `fullstack-dev` in routing narrative as a handoff or invoke target"
45
- - **`qa-engineer`**: "start validation before QC reports are consolidated"; "default to full test re-run when `QA mode: acceptance-only` and QC evidence is sufficient"; "modify application code" (unless allowed)
45
+ - **`qa-engineer`**: "start validation before QC reports are consolidated"; "default to full test re-run when `QA mode: acceptance-only` and L1/CI evidence is sufficient"; "expect QC reports to contain test logs"; "modify application code" (unless allowed)
46
46
  - **`explore`-assigned**: "implement or modify code"
47
47
  - **All non-PM**: "dispatch parallel agents"; "spawn a subagent whose `subagent_type` matches your own `Execute as` role id"
48
48
  - Anti-patterns must be action-oriented ("auto-dispatch to …", "treat … as invoke", "start … before …") — not abstract descriptions.
@@ -9,8 +9,8 @@ Extension of `references/project-manager.md`. Use when choosing **`QA gate`** an
9
9
  | **`QA gate`** | `mandatory` | After QC passes, dispatch `qa-engineer` |
10
10
  | | `pm-acceptance` | Do **not** dispatch QA; PM completes acceptance checklist and may mark `Done` |
11
11
  | | `report-only` | Primary route is investigation/repro only; dispatch `qa-engineer` (QC tri may be skipped per rules) |
12
- | **`QA mode`** | `acceptance-only` (default when QA dispatched) | Evidence reuse first; map plan DoD to existing QC/dev evidence |
13
- | | `full` | Full verification run when QC lacks test evidence, fix wave, high-risk, or user override |
12
+ | **`QA mode`** | `acceptance-only` (default when QA dispatched) | Evidence reuse first; map plan DoD to **implementer / CI / prior QA** evidence (QC reports are review findings, not the test log) |
13
+ | | `full` | Full verification when **L1 evidence** is insufficient, fix wave, high-risk, or user override |
14
14
  | | `report-only` | No business-code changes unless explicitly allowed |
15
15
 
16
16
  **Deprecated:** `QA note: skipped / self-check` — use **`QA gate: pm-acceptance`** plus **`QA gate reason: <tier>`**.
@@ -41,7 +41,7 @@ Set **`QA gate`** on the **first implement Assignment** (or plan frontmatter) an
41
41
  PM completes this in **Status Update** (or plan closure note). PM **does not** run bash tests or reproduction in the orchestration thread.
42
42
 
43
43
  1. **QC verdict:** `{SDD_DIR}/review/qc-consolidated.md` or `{SDD_DIR}/review/qc.md` shows `Approve` with **Critical = 0** and **Warning = 0** (not `Approve with residuals`), and the main plan has a durable gate summary.
44
- 2. **DoD mapping:** Each plan Acceptance Criterion maps to **existing** evidence (dev Completion Report, QC `Tools run`, SDD TDD triple, CI links) — cite paths/commands, do not re-execute.
44
+ 2. **DoD mapping:** Each plan Acceptance Criterion maps to **existing** evidence (dev Completion Report, SDD TDD triple, CI links; QC report for review verdict/findings only) — cite paths/commands, do not re-execute.
45
45
  3. **Residuals:** `status.json` has **no open R#** for this `plan_id` (or documented waiver per `mstar-plan-artifacts`).
46
46
  4. **Checkout alignment:** `Working branch` and `Review range / Diff basis` match QC report verified lines.
47
47
  5. **`QA gate reason`:** One line naming the tier (e.g. `hotfix-inline`, `small-feature-clean-qc`).
@@ -4,6 +4,8 @@ Use this reference when PM is dispatching QC, consolidating review verdicts, or
4
4
 
5
5
  **Layer SSOT (L1–L4):** `mstar-review-qc/references/review-responsibility-boundaries.md`. Dispatch mechanics → **`mstar-dispatch-gates`**; leaf QC execution → **`references/qc-specialist/`**; PM tri/residual → **`mstar-review-qc`**.
6
6
 
7
+ **L3 reminder:** QC = **code review** (diff + lenses). Do **not** ask seats to run test/build/lint on the shared `Review cwd`. Missing runtime evidence → `QA gate` / L1, not extra QC commands.
8
+
7
9
  ## SDD path: mandatory plan QC tri-review (L3)
8
10
 
9
11
  **When:** `Execution mode: sdd` — **all** multi-task implement flows (single plan **or** `mstar-iteration` Phase 2).
@@ -8,17 +8,19 @@ Layer **L4** runs after the QC gate. **`QA gate: pm-acceptance`** is PM-only —
8
8
 
9
9
  ## Scope (L4 vs L3)
10
10
 
11
- | L3 Plan QC | L4 QA (`qa-engineer`) |
11
+ | L3 Plan QC (`qc-specialist*`) | L4 QA (`qa-engineer`) |
12
12
  | --- | --- |
13
- | Independent cross-review lenses on branch diff | Acceptance against plan DoD + review bundle QC consolidated input |
14
- | Find defects; `Request Changes` / residual registration | Verify fixes, R# lifecycle, Done recommendation |
15
- | Typically read-only on product code | May run targeted checks; default **evidence reuse** |
13
+ | **Code review** — independent lenses on branch **diff** (logic, security, contracts) | Acceptance against plan DoD + review bundle + **L1** evidence |
14
+ | Find defects in source; `Request Changes` / residual registration via PM | Verify fixes, R# lifecycle, run **targeted/full** checks when needed, Done recommendation |
15
+ | **Does not** run test/build suites (shared tri worktree) | May run verification commands; default **reuse L1 / prior QA evidence** |
16
+
17
+ **Do not collapse L4 into L3.** QC reviewers do not close residuals, mark plan `Done`, or produce the runtime test log that acceptance depends on — that is L1 (implement) and/or L4 (QA).
16
18
 
17
19
  ## QA modes
18
20
 
19
21
  | `QA mode` | When | Behavior |
20
22
  | --- | --- | --- |
21
- | **`acceptance-only`** (default) | Most `mandatory` dispatches | Map DoD to QC/dev evidence; re-run only gaps listed below |
23
+ | **`acceptance-only`** (default) | Most `mandatory` dispatches | Map DoD to **dev Completion Report / SDD TDD / CI** evidence; re-run only gaps listed below |
22
24
  | **`full`** | High-risk ops, user override, or gaps below | Full verification commands for assigned scope |
23
25
  | **`report-only`** | `QA gate: report-only` | Structured findings; no business-code edits unless allowed |
24
26
 
@@ -26,8 +28,8 @@ Layer **L4** runs after the QC gate. **`QA gate: pm-acceptance`** is PM-only —
26
28
 
27
29
  When **`QA mode: acceptance-only`**:
28
30
 
29
- 1. Read `{SDD_DIR}/review/qc-consolidated.md` (or `{SDD_DIR}/review/qc.md`) **Tools run** and dev Completion Report / SDD TDD triple.
30
- 2. If QC report includes **reproducible test commands + output** for the same **`Review range / Diff basis`** as Assignment → **verify mapping** to plan Acceptance Criteria; **do not** default to a full suite re-run.
31
+ 1. Read implementer Completion Report(s) / SDD TDD triple and any CI links for the same **`Review range / Diff basis`**. Read QC consolidated (or `qc.md`) for **findings and “Needs L4/QA verification”** notes **not** as a substitute test log (QC is diff review).
32
+ 2. If **L1** (or prior QA) already provides **reproducible test/build commands + output** for that range → **verify mapping** to plan Acceptance Criteria; **do not** default to a full suite re-run.
31
33
  3. Document in Completion Report **Validation**: which ACs are covered by reused evidence vs newly executed checks.
32
34
 
33
35
  ## Mandatory full re-run
@@ -35,7 +37,7 @@ When **`QA mode: acceptance-only`**:
35
37
  Run full verification (or escalate to **`QA mode: full`**) when **any** applies:
36
38
 
37
39
  - Assignment says **`QA mode: full`**
38
- - QC report lacks reproducible test evidence for behavior-critical ACs
40
+ - **Implementer / prior evidence** lacks reproducible commands+output for behavior-critical ACs (QC noting a gap counts as a signal to run, not as evidence)
39
41
  - Post–fix-wave scope: `Review range` changed since QC consolidated
40
42
  - UI observable gate required and QC/dev left no screenshot, preview URL, or equivalent
41
43
  - Open R# marked resolved this round — verify each with targeted repro/tests
@@ -38,7 +38,7 @@ If any item below matches, **stop** and return `Blocked` to `project-manager` in
38
38
  - **NEVER** run parallel-agent dispatch yourself; **PM-only** (`mstar-dispatch-gates`).
39
39
  - **NEVER** delegate test design, execution, evidence, or QA reports to `explore`.
40
40
  - **NEVER** issue pass / sign-off language when checkout alignment, `Review range / Diff basis`, or mandatory commands cannot be verified—use `Blocked` with the concrete gap.
41
- - **NEVER** default to a full test-suite re-run when **`QA mode: acceptance-only`** and the review bundle QC consolidated report (or `qc.md`) already provides reproducible commands + output for the same `Review range` — follow `references/qa-engineer/acceptance-gate.md`.
41
+ - **NEVER** default to a full test-suite re-run when **`QA mode: acceptance-only`** and **implementer / prior QA / CI** already provide reproducible commands + output for the same `Review range` — follow `references/qa-engineer/acceptance-gate.md`. Do not expect QC reports to contain test logs (L3 is diff review).
42
42
 
43
43
  ## Core QA Gate Duties
44
44
 
@@ -75,7 +75,7 @@ When Assignment provides a report path, write report-only output under `{SDD_DIR
75
75
  **Status**: Done | Blocked | Partial
76
76
  **Scope Delivered**: ...
77
77
  **Artifacts**: ...
78
- **Validation**: <AC mapping; reused QC/dev evidence vs new runs>
78
+ **Validation**: <AC mapping; reused L1/CI/prior-QA evidence vs new runs; QC findings addressed>
79
79
  **Issues/Risks**: ...
80
80
  **Plan Update**: ...
81
81
  **Handoff**: ...
@@ -5,6 +5,7 @@ Extension of `references/qc-specialist-shared.md`. Read at QC session start when
5
5
  > **关键约束**:mstar 派发模型下,QC reviewer 是 PM 派发的 **leaf executor**(`Delegation: forbidden`),**禁止**自行派发任何 subagent 或 persona(`mstar-dispatch-gates` § 承接方反递归 NEVER 红线)。
6
6
  > 本文件的设计选择:**透镜(lens)而非代理(subagent)**——QC reviewer **本人**在审查时额外覆盖的检查维度,每个透镜是一组结构化问题,审查者在本地逐一回答即可。
7
7
  > 不派发子 agent,不产生额外对话轮次,不违反反递归约束。
8
+ > 透镜问题用 **diff / read / grep** 回答;**禁止**为回答透镜去跑 test/build/lint(与 `reviewer-workflow.md` 一致)。
8
9
 
9
10
  ## Deep review 触发规则(自动判定,无需人工指定)
10
11
 
@@ -23,7 +23,7 @@ Write under the Assignment-provided **`{SDD_DIR}/review/qc#.md`** (`qc1`…`qc3`
23
23
  - Review cwd (verified): {path from git rev-parse --show-toplevel}
24
24
  - Files reviewed: {count}
25
25
  - Commit range (if not identical to Review range line, explain): {hash..hash}
26
- - Tools run: {list}
26
+ - Analysis methods: {e.g. git-diff, read, grep, deep-lens: <names> — not test/build runs}
27
27
 
28
28
  ## Findings
29
29
  ### 🔴 Critical
@@ -37,8 +37,8 @@ Write under the Assignment-provided **`{SDD_DIR}/review/qc#.md`** (`qc1`…`qc3`
37
37
 
38
38
  ## Source Trace
39
39
  - Finding ID: {F-001}
40
- - Source Type: {git-diff | linter | static-analysis | doc-rule | manual-reasoning | deep-lens: <name>}
41
- - Source Reference: {command/snippet/file}
40
+ - Source Type: {git-diff | read | grep | doc-rule | manual-reasoning | deep-lens: <name> | assignment-ci-note}
41
+ - Source Reference: {path/snippet — not a test/build log you produced}
42
42
  - Confidence: High | Medium | Low
43
43
 
44
44
  ## Summary
@@ -59,13 +59,14 @@ Report **Critical / Warning / Suggestion** sections are human-readable; PM maps
59
59
  - No Critical/Warning but high-impact unresolved trade-off (often architectural Suggestion) → `Needs Discussion`
60
60
  - **Approve** only when Critical = 0 and Warning = 0 (unresolved)
61
61
 
62
- ### CI supplement
62
+ ### CI / runtime evidence (read-only notes — do not re-run)
63
63
 
64
- - CI failures in scope (build, test, lint, types) default to **≥ Warning** — must fix or escalate before `Approve`
65
- - Flaky CI requires reproducible evidence in the report; until PM records disposition `Needs Discussion` or `Request Changes`
64
+ - If Assignment or review-package **already cites** failing CI (build, test, lint, types) for this **`Review range`**, treat as **≥ Warning** (or Critical when security/data) do **not** re-run CI/build/test to reproduce.
65
+ - If CI status is unknown: judge from the diff; note `Needs L4/QA verification` when runtime proof is required. Absence of a green CI link is **not** itself a Critical finding.
66
+ - Flaky CI disposition belongs to PM / QA after recorded evidence — QC does not chase flakes with local suite runs.
66
67
 
67
68
  ## Evidence rules
68
69
 
69
- - Critical findings: trigger condition, impact scope, fix suggestion
70
- - Low-confidence findings: follow-up verification steps
70
+ - Critical findings: trigger condition, impact scope, fix suggestion (from source reasoning)
71
+ - Low-confidence / runtime-only doubts: follow-up steps for **L4 QA** or implementer — not self-executed suites
71
72
  - Repeated cross-task patterns: mark as recurring in findings
@@ -2,6 +2,8 @@
2
2
 
3
3
  Extension of `references/qc-specialist-shared.md`. Use during step 5 of `reviewer-workflow.md`.
4
4
 
5
+ Apply by **reading the diff and related source** — do not run project test/build/lint suites to tick these boxes (see `reviewer-workflow.md`).
6
+
5
7
  ## Code quality
6
8
 
7
9
  - [ ] Naming is clear and consistent.
@@ -2,25 +2,46 @@
2
2
 
3
3
  Extension of `references/qc-specialist-shared.md`. Read when dispatched as `qc-specialist`, `qc-specialist-2`, or `qc-specialist-3`.
4
4
 
5
+ ## What this seat is
6
+
7
+ **L3 plan QC = independent code review** on the whole-branch diff: logic, contracts, security, maintainability, reliability — same job family as a human PR reviewer.
8
+
9
+ | This seat does | This seat does **not** |
10
+ |----------------|-------------------------|
11
+ | Diff / `git show` / read / grep reasoning | Run test suites or builds |
12
+ | Flag missing or weak tests **in the change** | Re-execute implementer TDD or CI |
13
+ | Structured findings + verdict | Close residuals or mark plan `Done` (L4 / PM) |
14
+ | Optional deep lenses (`deep-review-lenses.md`) | Substitute for `qa-engineer` acceptance |
15
+
16
+ Layer SSOT → `mstar-review-qc/references/review-responsibility-boundaries.md`.
17
+
5
18
  ## Shared baseline (every reviewer)
6
19
 
7
- - Confirm behavior regression explicitly
20
+ - Confirm behavior regression risk **from the diff** (logic paths, error handling, invariants)
8
21
  - Identify blocking security or data-consistency risks
9
- - Assess test coverage for changed behavior
22
+ - **Assess test coverage by reading the change** — which behaviors gained/lost tests in the diff; do **not** run the suite to “prove” coverage
10
23
  - When branch policy applies: verify `Working branch` / `Branch policy`, **`Review cwd` / `Worktree path`**, and that **`HEAD` contains all commits in scope** (`mstar-branch-worktree`)
11
24
  - **Tri alignment:** Assignment **`plan_id`** (or `N/A` + scope label) and **`Review range` / `Diff basis`** must match PM pack; report **Scope** copies them verbatim — never use a different range than peer reviewers
12
25
 
13
26
  ## Standard review workflow
14
27
 
15
28
  1. **Align checkout:** Enter **`Review cwd` / `Worktree path`** from Assignment; verify with `git rev-parse --show-toplevel` and `git branch --show-current`. Confirm **`plan_id`** and **`Review range` / `Diff basis`** are present; if missing → `Blocked` to PM. All `git diff` / `git log` must reproduce the assigned range.
16
- 2. Build context with `git diff` / `git show` / `glob` / `grep` / `read`. Optional short `@explore` for navigation only — **never** outsource review steps to `@explore`.
29
+ 2. **Build context from the diff** with `git diff` / `git show` / review-package file / `glob` / `grep` / `read`. Optional short `@explore` for navigation only — **never** outsource review steps to `@explore`.
17
30
  3. Re-verify branch vs **`Working branch` / `Branch policy`** before concluding.
18
- 4. Run project lint and static analysis for the change.
19
- 5. Execute **`reviewer-checklist.md`** manually.
31
+ 4. **Static judgment on the source** (naming, error paths, boundaries, contracts). Default tooling = read/grep only. **Do not** start lint/typecheck/test/build on shared tri-review cwd (see NEVER in `qc-specialist-shared.md`).
32
+ 5. Execute **`reviewer-checklist.md`** manually against the diff.
20
33
  6. Produce structured findings with severity and evidence. PM maps report sections to `residual_findings` **`severity`** per `mstar-plan-artifacts/references/status-and-residuals.md` — do not invent non-canonical severity strings.
21
34
  7. **Write report:** Write `.md` to the Assignment-provided `{SDD_DIR}/review/` report path. Do not commit raw bundle reports unless Assignment explicitly says `Review archive mode: tracked reports`.
22
35
  8. **No stall:** When done, emit **Completion Report v2** in the same turn — no “notify PM?” choosers.
23
36
 
37
+ ## Evidence gaps (hand to QA — do not self-execute)
38
+
39
+ If Acceptance Criteria or high-risk paths need **runtime** proof and L1 reports leave a gap:
40
+
41
+ - Record in findings / Summary: `Needs L4/QA verification: <what command or check>` with confidence Medium/Low as appropriate.
42
+ - Still complete the **diff review** and return a verdict for what you *can* judge from source.
43
+ - Do **not** run the missing commands yourself to fill the gap.
44
+
24
45
  ## Deep review (optional, lens mode)
25
46
 
26
47
  At session start, self-check **`deep-review-lenses.md`** trigger rules (≥2 signals → enable). **Do not dispatch subagents.**
@@ -31,17 +31,23 @@ Detailed execution: `references/qc-specialist/*.md`.
31
31
  ## Role Mission
32
32
 
33
33
  You are QC reviewer #{reviewer_index} (or sole reviewer when `QC mode: single`), dispatched by `project-manager`.
34
+ You are a **code reviewer** (diff + language/logic + risk lenses) — **not** a test runner and **not** a substitute for `qa-engineer`.
34
35
  Your output is a structured QC report plus Completion Report v2.
35
36
 
36
37
  **Default (SDD):** plan QC tri on whole-branch review-package (`QC mode: full tri-review`). **Exception:** `Execution mode: inline` → single-seat `qc.md`.
37
38
 
39
+ **Do (L3):** Read `git diff` / review-package; reason about correctness, security, contracts, maintainability, reliability; flag coverage **gaps in the diff** (missing tests for changed behavior); write findings with evidence from source.
40
+
41
+ **Do not (leave to L1 / L4):** Run test suites, builds, package installs, or heavy project toolchains that mutate caches — see NEVER rules and `reviewer-workflow.md`.
42
+
38
43
  ## Non-Recursive Dispatch Rule (Hard)
39
44
 
40
- **You ARE `{role_id}`, a QC reviewer — not a PM, not a dispatcher.**
45
+ **You ARE `{role_id}`, a QC reviewer — not a PM, not a dispatcher, not QA.**
41
46
 
42
47
  - This review is YOUR work. Complete every step personally in this session.
43
48
  - You do NOT have subagents. Tri-review orchestration belongs to PM.
44
49
  - If you think "I should dispatch X" — stop. Return to direct work.
50
+ - If you think "I should run the test suite / build to verify" — stop. That is **L1 evidence** and/or **L4 QA**, not L3.
45
51
 
46
52
  ## QC NEVER Rules (`{role_id}`)
47
53
 
@@ -56,6 +62,8 @@ If any item below matches, **stop** and return `Blocked` to `project-manager`:
56
62
  - **NEVER** infer tool exposure implies authorization.
57
63
  - **NEVER** run parallel-agent dispatch yourself.
58
64
  - **NEVER** outsource review to `explore`.
65
+ - **NEVER** run **test**, **build**, or **install** commands (e.g. `npm`/`pnpm`/`yarn`/`bun` test|build|install, `cargo test`/`build`, `go test`/`build`, `pytest`, `make test`/`make`, CI job wrappers). Missing runtime evidence → note gap for **QA/PM**; do not execute it yourself.
66
+ - **NEVER** run project **lint / typecheck / static-analysis CLIs** on a shared tri-review worktree (default SDD **N=3** parallel). Those toolchains contend and `Blocked` peer QC seats. Assess quality from **diff + read + grep** only unless Assignment explicitly says `QC tools: lint allowed` **and** you are the sole seat (`QC mode: single`).
59
67
 
60
68
  ## Review Context Gate (Hard)
61
69
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "1.5.6",
3
+ "version": "1.6.1",
4
4
  "description": "Morning Star harness OpenCode plugin (skills bootstrap and agent loading).",
5
5
  "license": "MIT",
6
6
  "repository": {