@mstar-harness/opencode 1.0.4 → 1.0.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.
Files changed (35) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/harness-agents/qa-engineer.md +2 -2
  3. package/harness-skills/mstar-branch-worktree/SKILL.md +1 -1
  4. package/harness-skills/mstar-design-md/SKILL.md +1 -1
  5. package/harness-skills/mstar-dispatch-gates/SKILL.md +1 -1
  6. package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
  7. package/harness-skills/mstar-harness-core/SKILL.md +3 -3
  8. package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +1 -1
  9. package/harness-skills/mstar-iteration/SKILL.md +3 -3
  10. package/harness-skills/mstar-phase-gates/SKILL.md +2 -3
  11. package/harness-skills/mstar-plan-artifacts/SKILL.md +2 -2
  12. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +1 -1
  13. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +2 -2
  14. package/harness-skills/mstar-review-qc/SKILL.md +26 -162
  15. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +3 -1
  16. package/harness-skills/mstar-roles/SKILL.md +3 -3
  17. package/harness-skills/mstar-roles/references/architect.md +1 -1
  18. package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
  19. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
  20. package/harness-skills/mstar-roles/references/ops-engineer.md +3 -3
  21. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +7 -4
  22. package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +54 -0
  23. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +1 -1
  24. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +3 -2
  25. package/harness-skills/mstar-roles/references/project-manager.md +18 -11
  26. package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +60 -0
  27. package/harness-skills/mstar-roles/references/qa-engineer.md +21 -25
  28. package/harness-skills/{mstar-review-qc/references/deep-review-personas.md → mstar-roles/references/qc-specialist/deep-review-lenses.md} +2 -0
  29. package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +71 -0
  30. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +42 -0
  31. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +36 -0
  32. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +46 -58
  33. package/harness-skills/mstar-sdd/SKILL.md +2 -2
  34. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +1 -0
  35. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,18 @@ 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.0.6
8
+
9
+ - Bundled skills: `mstar-sdd` pins L2 per-task reviewer to `generalPurpose`; forbids `qc-specialist*` at task scope.
10
+
11
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.0.6**.
12
+
13
+ ## 1.0.5
14
+
15
+ - Bundled skills: tiered QA gate (`qa-trigger-matrix.md`, `acceptance-gate.md`); QC/QA leaf refs under `mstar-roles/references/`; `mstar-review-qc` PM orchestration only; positive-only load lists; routing-eval v17.
16
+
17
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.0.5**.
18
+
7
19
  ## 1.0.4
8
20
 
9
21
  - Bundled skills: parallel writable pre-dispatch SSOT (`parallel-writable-pre-dispatch.md`); dispatch-gates dual-gate table (N invoke vs worktree); deduped skill pointers; routing-eval v16.
@@ -1,8 +1,8 @@
1
1
  ---
2
2
  name: qa-engineer
3
3
  description: |-
4
- 测试工程师 - 编写测试用例和自动化测试。
5
- QA Engineer - test planning, automated tests, coverage improvements, and regression protection.
4
+ 测试工程师 - L4 验收席(分级派发):DoD 映射、residual 验证、report-only 调查。
5
+ QA Engineer - tiered L4 acceptance (DoD mapping, residual verify, report-only); dispatched when PM sets QA gate mandatory.
6
6
  mode: subagent
7
7
  tools:
8
8
  write: true
@@ -143,7 +143,7 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
143
143
  - **`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。
144
144
  - **三审并行**时,三名 reviewer **共用同一组 `Review cwd` / `Worktree path` + `Working branch` + `plan_id` + `Review range` / `Diff basis`**(对业务仓只读分析);**一般不必**为每位 reviewer 各开一个 worktree,除非宿主或执行环境要求进程级隔离。
145
145
  - QC 的 **报告落盘**仍仅限 `{PLAN_DIR}/reports/`;上述约定保证 `git diff`、`git log`、lint 与所读文件与 **待合并 feature** 一致。
146
- - **`project-manager`** 分派 **`qa-engineer`** **本 feature 的验证**(跑测试、复现、可观察取证、或向业务仓提交测试/配置)时,须在 Assignment 中写明 **同一套** **`Review cwd` / `Worktree path`**、**`Working branch`**、**`plan_id`** 与 **`Review range` / `Diff basis`**(与 QC 三审 **逐字相同**;若 QC 已写清,QA **照抄**)。**`qa-engineer`** 在执行业务仓命令前须核对当前目录与分支与 Assignment 一致;**Report-only**、且本轮 **不涉及** 业务仓内命令/路径依赖时,若 Assignment 未写 `Review cwd`,须在回报中说明验证所基于的检出或环境,缺失则 `Blocked` 并请 PM 补全。
146
+ - **`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`。
147
147
  - 若 **QA 与同仓其他可写角色并发**提交测试代码,仍须遵守上文「同仓并发写入」的 **worktree** 规则(可为 QA 单开一条写入 worktree,**同一 `Working branch`**,由 PM 在 Assignment 写明)。
148
148
 
149
149
  派发前清单与常见反模式 → **`references/parallel-writable-pre-dispatch.md`**。
@@ -48,7 +48,7 @@ In Prepare phase, PM decides whether the project needs a DESIGN.md. If yes, disp
48
48
 
49
49
  - `@frontend-dev` / `@fullstack-dev` — read DESIGN.md before implementing styled components; map tokens to CSS/theme variables
50
50
  - `@qc-specialist` — verify UI implementation aligns with DESIGN.md tokens
51
- - `@qa-engineer` — verify visual output matches design spec
51
+ - `@qa-engineer` — verify visual output matches design spec when **`QA gate: mandatory`**
52
52
 
53
53
  ## Phase gate integration
54
54
 
@@ -24,7 +24,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
24
24
  下列行为易触发递归误派;`project-manager` 之外的角色一旦命中,须立即停止并改为本会话内可交付物,或 **`Blocked`** 回报 PM。**禁止**以「更高效」「Assignment 像 PM 编排」等理由绕开:
25
25
 
26
26
  - **NEVER** 在本会话内调用 Task / subagent,且其 `subagent_type` **等于**你当前的 **`Execute as`** 角色 id。
27
- - **NEVER** 把 Assignment 里出现的 **任何** plain `role-id` 提及、反引号 `` `<role-id>` ``、**Handoff**、**QA note**、**Completion Report** 模板里的角色名、路由表下游角色当成「立刻 invoke」的指令;这些是**叙事 / 路由文档 / 后续 PM 编排意图**,不是命令。
27
+ - **NEVER** 把 Assignment 里出现的 **任何** plain `role-id` 提及、反引号 `` `<role-id>` ``、**Handoff**、**QA gate**、**Completion Report** 模板里的角色名、路由表下游角色当成「立刻 invoke」的指令;这些是**叙事 / 路由文档 / 后续 PM 编排意图**,不是命令。
28
28
  - **NEVER** 把「分解为多个计划 / 多 phase / 多 track」等**设计产物层面**的并行或拆分读成「应 invoke 与子会话数量对应的多个 subagent」。**纸面产物**由本会话写盘完成;并行**调度**由 PM 在后续轮次决定。
29
29
  - **NEVER** 因宿主**暴露**了 `Task` 或若干 `subagent_type` 名称就推断可以调用。**工具可用 ≠ 授权使用**;授权只来自 **`Delegation: allowed (...)`**。
30
30
  - **NEVER**(非 PM)主动执行 parallel-agent dispatch 来分派子代理;需要并行时回报 PM。
@@ -14,7 +14,7 @@ Before any Task/subagent call (if I somehow forget the preamble):
14
14
  2. Does the Assignment include **`Delegation: allowed (...)`**? If no → **no** Task/subagent.
15
15
  3. Is my next step a Task/subagent invoke? If yes without (2) → **stop**; use Read/Write/Shell/Edit in-session or **`Blocked`**.
16
16
  4. Is `subagent_type` equal to my `Execute as`? If yes → **forbidden** (recursive dispatch).
17
- 5. Am I treating plain `role-id` mentions, Handoff, QA note, Completion Report roles, or multi-plan/multi-track **design text** as invoke commands? If yes → **stop**; deliver in-session.
17
+ 5. Am I treating plain `role-id` mentions, Handoff, QA gate, Completion Report roles, or multi-plan/multi-track **design text** as invoke commands? If yes → **stop**; deliver in-session.
18
18
  6. Am I invoking because the tool exists? **Available ≠ authorized.**
19
19
  7. Need parallel work or PM-only dispatch? → **`Blocked`**; PM dispatches on the next round.
20
20
 
@@ -30,7 +30,7 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
30
30
 
31
31
  ## 最小交付循环
32
32
 
33
- **per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement`(多 task 默认 SDD)→ plan QC tri + QA Done(`inline` 单席例外)。阶段细则 → **`mstar-phase-gates`**。
33
+ **per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement`(多 task 默认 SDD)→ plan QC tri + **QA gate**(`mandatory` 派 QA 或 `pm-acceptance`)→ Done(`inline` 单席例外)。阶段细则 → **`mstar-phase-gates`**;QA 分级 → **`mstar-roles/references/project-manager/qa-trigger-matrix.md`**。
34
34
 
35
35
  **迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close → PR delivery → PR merge-ready loop`。细则 → **`mstar-iteration`**。
36
36
 
@@ -40,7 +40,7 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
40
40
  |------|------|-------------------|
41
41
  | **全部** | 本 skill | — |
42
42
  | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-roles`;implement 波次 `mstar-sdd`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);新建/大改 skill 时 `mstar-skill-authoring`;迭代管理 `mstar-iteration`(Phase 1–5);战略性工作 `mstar-strategy`。**不**读 `mstar-coding-behavior` |
43
- | **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts`;UI 任务:`mstar-design-md`(读取 DESIGN.md tokens);写入知识库 `{KNOWLEDGE_DIR}`:`mstar-compound`(PM 触发) |
43
+ | **实现/审查/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`;**PM** 派 QC 前:`mstar-review-qc`;**`qc-specialist*`**:`mstar-roles` → `references/qc-specialist/`;`qa-engineer`:`references/qa-engineer/`;改 status/residual:`mstar-plan-artifacts`;UI:`mstar-design-md`;知识库:`mstar-compound`(PM |
44
44
  | **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
45
45
 
46
46
  Routing eval(Cursor 插件内回归用,**非**运行时必读)→ `.cursor/skills/mstar-routing-eval/`。
@@ -94,7 +94,7 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
94
94
  | `mstar-plan-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec 分支模型摘要、产物路径 SSOT |
95
95
  | `mstar-plan-artifacts` | 主 plan、reports、`status.json`、residual、knowledge、Done 归档 |
96
96
  | `mstar-design-md` | DESIGN.md 设计系统规范 —— 创建/审计/维护 design tokens,三级检查清单,light/dark 双主题 |
97
- | `mstar-review-qc` | QC 工作流、模板、verdict、residual 留档、deep review 透镜 |
97
+ | `mstar-review-qc` | PM:QC tri 编排、residual 留档、四层边界;leaf 执行 `mstar-roles/references/qc-specialist/` |
98
98
  | `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Review Feedback / Goal-Driven / Communication |
99
99
  | `mstar-compound` | 知识结晶 —— 已解决问题→结构化知识文档,双轨(Bug/Knowledge),「是否值得结晶」自检清单,重叠检测,可发现性检查,CONCEPTS.md 协同 |
100
100
  | `mstar-compound-refresh` | 知识维护 —— 审查/更新/合并/删除 `{KNOWLEDGE_DIR}` 文档 |
@@ -141,7 +141,7 @@ Embed this checklist **inside each implement todo description** in CreatePlan (a
141
141
 
142
142
  - Mark implement todos done without a commit when tracked files changed.
143
143
  - Batch all work into one closing commit unless PM documented an exception.
144
- - Mark plan-level `Done` in `status.json` without PM/QA authority.
144
+ - Mark plan-level `Done` in `status.json` without PM/QA authority and without recorded **`QA gate`** (`mandatory` fulfilled or `pm-acceptance` checklist per `qa-trigger-matrix.md`).
145
145
 
146
146
  Dev-role NEVER rules also apply when executing as implementer: `mstar-roles/references/fullstack-dev-shared.md` (Git NEVER).
147
147
 
@@ -185,7 +185,7 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
185
185
 
186
186
  ## Phase 2: Autonomous Execute(per-plan 派发驱动)
187
187
 
188
- **本 Phase 是本 skill 的核心**——定义 per-plan 派发循环的完整流程:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QCQADone→合并)、dispatch-first 约束、push 纪律。PM 读取本 Phase 即可执行迭代。
188
+ **本 Phase 是本 skill 的核心**——定义 per-plan 派发循环的完整流程:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QC→**QA gate**→Done→合并)、dispatch-first 约束、push 纪律。PM 读取本 Phase 即可执行迭代。
189
189
 
190
190
  ### 2.0 前置条件(四道闸)
191
191
 
@@ -204,7 +204,7 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
204
204
 
205
205
  | Host | 工具 | 最小集合 |
206
206
  |------|------|---------|
207
- | **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/QA);分支 checkpoint;**仅剩 1 个非 Done plan 时追加 `phase-3-iteration-close`**(open 直至 §3.5);Phase 4 后 **`phase-5-pr-merge-ready`**(open 直至 §5.5) |
207
+ | **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/**QA gate**);分支 checkpoint;**仅剩 1 个非 Done plan 时追加 `phase-3-iteration-close`**(open 直至 §3.5);Phase 4 后 **`phase-5-pr-merge-ready`**(open 直至 §5.5) |
208
208
  | **Codex** | `update_plan` / Goal UI | 同上 |
209
209
  | **OpenCode** | host todo/plan UI(如有) | 同上 |
210
210
 
@@ -251,7 +251,7 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
251
251
  6. Fix loop 直至 review clean;append `{SDD_DIR}/progress.md`;更新 `status.json` / plan checkbox
252
252
  7. Next task
253
253
  - 每次 Completion Report v2 后更新 `status.json` + 主 plan
254
- 3. **QC → QA → Done**:per-plan 审查链 → **`mstar-sdd`**(L1–L2)+ **`mstar-review-qc/references/review-responsibility-boundaries.md`**(L3 tri / inline 单席)+ QA
254
+ 3. **QC → QA gate → Done**:per-plan 审查链 → **`mstar-sdd`**(L1–L2)+ **`mstar-review-qc/references/review-responsibility-boundaries.md`**(L3 tri / inline 单席)+ **`QA gate`**(`mandatory` → `qa-engineer`;`pm-acceptance` → PM checklist)。
255
255
  4. **Plan complete — merge back**:合并 plan feature branch → `spec_integration_branch`;在下一 plan 或 QC 前解决冲突
256
256
  5. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 的 `## Plans` 表状态列
257
257
  6. **Next plan** 从步骤 1 继续
@@ -62,15 +62,14 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
62
62
  - 开发角色(`@frontend-dev` / `@fullstack-dev` / `@fullstack-dev-2`)
63
63
  - 仅在 Execute gate 放行后开始实现。
64
64
  - 发现新约束时先回报并请求回写 plan。
65
- - `@qa-engineer`
66
- - 在 `InReview` 阶段验证实现与验收映射是否一致。
65
+ - `@qa-engineer` — when **`QA gate: mandatory`**, L4 per `mstar-roles/references/qa-engineer/acceptance-gate.md`; `pm-acceptance` is PM-only (`qa-trigger-matrix.md`).
67
66
 
68
67
  ## 迭代级活动
69
68
 
70
69
  per-plan 门禁通过后,PM 在**迭代层面**管理以下活动(不计入 per-plan gate):
71
70
 
72
71
  - **迭代启动**(`mstar-iteration` § Phase 1):锁定迭代范围、**显式 branch policy**(`iteration_base_branch` / `target_branch`)、产出 compass。
73
- - **迭代驱动**(`mstar-iteration` § Phase 2 Autonomous Execute):per-plan 派发循环(分支→实现→QCQADone→合并),跨 plan 进度追踪,更新 compass 中各 plan 状态。
72
+ - **迭代驱动**(`mstar-iteration` § Phase 2 Autonomous Execute):per-plan 派发循环(分支→实现→QC→**QA gate**→Done→合并),跨 plan 进度追踪,更新 compass 中各 plan 状态。
74
73
  - **迭代收口**(`mstar-iteration` § Phase 3 iteration-close):迭代内所有 plan Done 后,执行一轮知识结晶(`mstar-compound`)沉淀迭代经验,更新 roadmap,标记迭代完成。
75
74
 
76
75
  per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动,不影响 per-plan 状态判定。
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-plan-artifacts
3
- description: Morning Star plan harness artifacts — `{PLAN_DIR}` main plans and `reports/`, `{KNOWLEDGE_DIR}` / `{ITERATION_DIR}` indexes, Done compaction, plus `{HARNESS_DIR}/status.json` and root `residual_findings` (severity SSOT, open/archived lifecycle, `notes.json`). Read when writing plans or QC reports, maintaining knowledge/iteration indexes, reading or writing `status.json` / R#, Done compaction, or mapping QC severity to JSON. Required for `@project-manager` on status, residuals, and InReview/QC waves; `@qc-specialist*` before `reports/**/*.md`; `@qa-engineer` before closing R#. Verdict rules in `mstar-review-qc`; paths in `mstar-plan-conventions`.
3
+ description: Morning Star plan harness artifacts — `{PLAN_DIR}` main plans and `reports/`, `{KNOWLEDGE_DIR}` / `{ITERATION_DIR}` indexes, Done compaction, plus `{HARNESS_DIR}/status.json` and root `residual_findings` (severity SSOT, open/archived lifecycle, `notes.json`). Read when writing plans or QC reports, maintaining knowledge/iteration indexes, reading or writing `status.json` / R#, Done compaction, or mapping QC severity to JSON. Required for `@project-manager` on status, residuals, and InReview/QC waves; `@qc-specialist*` before `reports/**/*.md`; `@qa-engineer` before closing R# when `QA gate: mandatory`. Verdict rules: leaf `mstar-roles/references/qc-specialist/report-template.md`; PM → `mstar-review-qc`. Paths in `mstar-plan-conventions`.
4
4
  ---
5
5
 
6
6
  ## Load order
@@ -19,7 +19,7 @@ description: Morning Star plan harness artifacts — `{PLAN_DIR}` main plans and
19
19
  | Empty-repo `status.json` / `notes.json` / Profile B `plans-done.json` templates | `templates/status.empty.json`, `templates/notes.empty.json`, `templates/plans-done.empty.json` (`templates/README.md`) |
20
20
  | Tech-debt rollup (read-only) | `scripts/tech-debt-rollup.sh` |
21
21
 
22
- **Out of scope:** branch and QC/QA checkout alignment → **`mstar-branch-worktree`**; QC checklist and verdict → **`mstar-review-qc`**; `{HARNESS_DIR}` discovery and init → **`mstar-plan-conventions`**.
22
+ **Out of scope:** branch and QC/QA checkout alignment → **`mstar-branch-worktree`**; leaf QC checklist and verdict → **`mstar-roles/references/qc-specialist/`**; PM QC orchestration → **`mstar-review-qc`**; `{HARNESS_DIR}` discovery and init → **`mstar-plan-conventions`**.
23
23
 
24
24
  ## `status.json` and open residual (summary)
25
25
 
@@ -57,7 +57,7 @@ Plan template with Global Constraints / Interfaces → **`templates/plan.main.md
57
57
 
58
58
  - **流程**:实现完成 → 该 **`plan_id`** 进入 **`InReview`** → **QC 三审(仅针对该 plan 的 `Review range`)** → PM consolidated → **QA** → **`Done`**。**禁止**在多个 `plan_id` 已 `InReview` 的情况下,只推进新实现、不派 QC,或把多个 plan 的变更**伪装成**一套三审字段(单一 `plan_id` / 单一 diff 范围覆盖多 plan)。
59
59
  - **并行 vs 串行**:不同 `plan_id` **相互独立**时,可 **并行**派发多组三审(每组各自的 Assignment 与 `reports/<plan-id>/`);若 PM 选择串行,须在 Status Update 写明顺序——**每组仍须完整三审 + QA**,不是「一个大 QC」混审。
60
- - **读 skill**:书写或派发 QC 相关 Assignment 前,PM **必须** Read **`mstar-review-qc`** skill(`mstar-plan-conventions` 不重复 QC 清单与 verdict 规则)。见 `mstar-plan-conventions` SKILL.md **QC pre-dispatch gate** 与 **InReview 与 QC+QA** 小节。
60
+ - **读 skill**:书写或派发 QC 相关 Assignment 前,PM **必须** Read **`mstar-review-qc`**(编排与 residual);leaf `qc-specialist*` → **`mstar-roles/references/qc-specialist/`**。见 `mstar-plan-conventions` SKILL.md **QC pre-dispatch gate**。
61
61
 
62
62
  **QC 落盘与宿主权限**:`qc-specialist` / `qc-specialist-2` / `qc-specialist-3` 在支持路径白名单的宿主上(如 OpenCode 的 **`permission.edit`**),**仅可** Write/Edit **`{PLAN_DIR}/reports/`** 下 **`.md`**(全局 agent 提示词中已配置 `.mstar/plans/reports/**`、`.agents/plans/reports/**`、`.plans/reports/**`、`plans/reports/**` 相对路径)。报告文件**必须**以 YAML **frontmatter** 开头(键见各 QC agent 提示词)。**若** 项目的 `{PLAN_DIR}` 不落在上述根下,须在**项目级**宿主配置(如 OpenCode)中为 QC 角色追加对应的 `edit` allow 规则。
63
63
 
@@ -6,7 +6,7 @@
6
6
  Canonical vs legacy residual definitions → **`mstar-plan-artifacts` SKILL.md** (“`status.json` and open residual (summary)”); this file covers **fields, severity, lifecycle, archive, and `jq` examples**.
7
7
  **Closed** residuals should not accumulate here long-term; authoritative archive → **`{HARNESS_DIR}/archived/residuals/<plan-id>.json`** (see “Residual findings lifecycle”).
8
8
 
9
- **Why this matters:** The open list and `archived/residuals/` are the **cross-session handoff surface** for risk and decisions. Non-blocking conclusions that stay only in chat or a single QC report **without SSOT** cannot be inherited reliably; `Done` drifts from visible known debt. **`@project-manager`** should register trackable open items soon after review closure; **`@qa-engineer`** and PM should close and archive after verification or explicit waiver flexible timing, but **not** “said in chat is enough.”
9
+ **Why this matters:** The open list and `archived/residuals/` are the **cross-session handoff surface** for risk and decisions. Non-blocking conclusions that stay only in chat or a single QC report **without SSOT** cannot be inherited reliably; `Done` drifts from visible known debt. **`@project-manager`** should register trackable open items soon after review closure; close/archive after verification per **`QA gate`** (`qa-engineer` when `mandatory`, else PM acceptance checklist).
10
10
 
11
11
  ## Basic structure
12
12
 
@@ -209,7 +209,7 @@ Plan row (per active iteration plan):
209
209
  | Action | Owner | When |
210
210
  | ------ | ----- | ---- |
211
211
  | Implement fix | `@fullstack-dev` / assignee | Completion Report cites R# + evidence |
212
- | Verify | `@qa-engineer` | Regression / acceptance |
212
+ | Verify | `@qa-engineer` when **`QA gate: mandatory`**; else PM per acceptance checklist | Regression / acceptance; open R# close requires verify before archive |
213
213
  | Write `status.json` | **`@project-manager`** or **`@qa-engineer`** | After verification; waivers after PM + user/architect alignment |
214
214
 
215
215
  Do not claim “R3 fixed” in chat/plan only without SSOT update.
@@ -1,186 +1,50 @@
1
1
  ---
2
2
  name: mstar-review-qc
3
- description: Morning Star QC/QA review baseline — **SDD plans: mandatory plan QC tri-review** (`qc1`…`qc3` + consolidated); inline/hotfix single-seat (`qc.md`); checklists, report template, targeted re-review, residual gate. Per-task review is **`mstar-sdd`** task reviewers (L2). Use when `qc-specialist*` review, `qa-engineer` verifies, or `project-manager` dispatches/consolidates QC.
3
+ description: Morning Star QC orchestration — **SDD mandatory plan QC tri-review** (`qc1`…`qc3` + consolidated); inline/hotfix single-seat (`qc.md`); PM dispatch timing, tri identity gate, residual registration contract, layer boundaries. Leaf QC execution → **`mstar-roles/references/qc-specialist/`**. Per-task review is **`mstar-sdd`** (L2). Primary reader: **`project-manager`** when dispatching or consolidating QC.
4
4
  ---
5
5
 
6
6
  ## Load order(必读顺序)
7
7
 
8
- **在同一会话或任务中首次 Read 本 skill 时:必须先 Read `mstar-harness-core` skill(SKILL.md),并按需 Read **`mstar-branch-worktree`**(`Review cwd` / `Working branch` / `Review range`)。** 本 skill 只定义 QC/QA **工作流与报告形态**;派发与三审同消息规则见 **`mstar-dispatch-gates`**;**同仓 worktree 与单一待审 `HEAD`** 以 **`mstar-branch-worktree`** 为准。冲突时 **以 `mstar-harness-core` 为准**。
8
+ **首次 Read 本 skill 时:必须先 Read `mstar-harness-core`。** 同仓检出与派发 **`mstar-branch-worktree`** · **`mstar-dispatch-gates`**。冲突时 **以 `mstar-harness-core` 为准**。
9
9
 
10
- **摘要**:`mstar-harness-core` QC-QA 检出与派发门禁;本 skill 审查清单、报告模板、verdict 与 residual 留档契约。职责分层 → **`references/review-responsibility-boundaries.md`**。
10
+ **摘要**:职责分层 → **`references/review-responsibility-boundaries.md`**。Leaf QC 执行 **`mstar-roles/references/qc-specialist/`**。L4 验收 → **`mstar-roles/references/qa-engineer/`**。
11
11
 
12
- # Morning Star QC Review BaselineQC 审查基线)
13
-
14
- 本 skill 定义所有 QC 审查员的共享基线。**`Execution mode: sdd` 时:plan 级强制 tri-review**(QC#1/#2/#3 交叉审整分支 → `qc1`…`qc3` + `qc-consolidated.md`)。**`inline` / hotfix** 可用单席 `qc.md`。三审共用正文以 **`mstar-roles`** `qc-specialist-shared` 为准。
12
+ # Morning Star QC OrchestrationPM · 编排层)
15
13
 
16
14
  ## 分派时机(与 plan / batch 对齐)
17
15
 
18
- - **`Execution mode: sdd`**(单 plan 与 iteration 均适用):全部 task + L2 task reviewers 完成后 → **强制 tri-review**(`QC mode: full tri-review`,**N=3**)。Assignment 须含 **branch review-package** 路径。PM 汇总 `qc-consolidated.md`。
16
+ - **`Execution mode: sdd`**:全部 task + L2 task reviewers 完成后 → **强制 tri-review**(`QC mode: full tri-review`,**N=3**)。Assignment 须含 **branch review-package** 路径。PM 汇总 `qc-consolidated.md`。
19
17
  - **`Execution mode: inline`**:单席 `qc-specialist` → `qc.md`(**N=1**),或按 hotfix 路由跳过。
20
- - **After `Request Changes` (default)**:**Targeted re-review** — PM dispatches only QC seats that **raised** blocking findings for this fix round; each updates **the same** `{PLAN_DIR}/reports/<plan-id>/qcN.md` (e.g. `qc1.md` — no `<plan-id>` prefix in basename) (add `## Revalidation`, update verdict). **Do not** spawn `qcN-rev2.md` files on this path. Artifact naming and PM consolidated updates → **`mstar-plan-artifacts/references/plan-files-and-reports.md`** § QC 三审触发时机.
21
- - **Full tri re-review (exception)**:Assignment must say **`QC re-review: full tri-review`**; then new basenames (`qc1-rev2.md` … `qc-consolidated-rev2.md`); PM marks **active wave** in consolidated decision.
18
+ - **After `Request Changes` (default)**:**Targeted re-review** — PM dispatches only seats that **raised** blocking findings; each updates **the same** `{PLAN_DIR}/reports/<plan-id>/qcN.md` (`## Revalidation`, update verdict). **Do not** spawn `qcN-rev2.md` on this path. Naming → **`mstar-plan-artifacts/references/plan-files-and-reports.md`** § QC 三审触发时机.
19
+ - **Full tri re-review (exception)**:Assignment **`QC re-review: full tri-review`** new basenames (`qc1-rev2.md` …); PM marks **active wave** in consolidated decision.
22
20
 
23
21
  ## 三审身份与模型独立性门禁(PM 强制)
24
22
 
25
- 在 PM 发出 **initial** QC 三审后、进入汇总前,必须先完成以下校验(**targeted re-review** 仅校验 Assignment 列出的席位):
26
-
27
- - **Initial wave**:三个会话角色 ID 须分别为 `qc-specialist`、`qc-specialist-2`、`qc-specialist-3`;运行模型与 `opencode.json` 对应配置一致。
28
- - **Targeted re-review**:仅校验 Assignment 列出的席位;缺席或角色/模型映射错误 → `dispatch invalid`,重派。
29
- - 若宿主故障导致并行 QC 退化为同模型且无法即时修复,Status Update 标记 `degraded tri-review` 并请用户确认(默认不放行)。
30
-
31
- ## 共享基线(所有审查员)
32
-
33
- 每位 QC 审查员必须检查:
34
-
35
- - 行为回归是否已被显式确认
36
- - 阻塞级安全或数据一致性风险是否已被识别
37
- - 变更行为的测试覆盖是否充分
38
- - 若启用功能分支策略:变更分支与 Assignment 的 **`Working branch` / `Branch policy`** 是否一致;且审查在 Assignment 写明的 **`Review cwd` / `Worktree path`**(feature 检出上下文)上执行,而非未核对的默认 cwd;若曾同仓多流并行开发,还须核对 **`HEAD` 是否已含本 scope 全部待审提交**(见 `mstar-branch-worktree` **「多 worktree 并行开发与 QC / QA 的门禁衔接」**)
39
- - **三审对齐**:Assignment 已写明 **`plan_id`**(或 `N/A` + **Feature / scope label**)与 **`Review range` / `Diff basis`**;报告 **Scope** 须 **逐字回写** PM 下发的这两字段,**禁止**与同伴 reviewer 使用不同范围或不同 plan 锚点
40
-
41
- ## 标准审查工作流
42
-
43
- 1. **对齐待审检出(feature 上下文)**:在动手审查前,按 Assignment 进入 **`Review cwd` / `Worktree path`**(若已写明);执行 `git rev-parse --show-toplevel`、`git branch --show-current`(或等价)确认 **当前目录即待审 feature 的检出**,且分支与 **`Working branch`** 一致。核对 Assignment 中的 **`plan_id`**(或 `N/A` + **Feature / scope label**)与 **`Review range` / `Diff basis`** 已填写;缺任一项应向 `@project-manager` 申请补全,**禁止**自行假设审查范围。后续 **`git diff` / `git log`** 必须 **按 `Review range` / `Diff basis` 可复现地覆盖待审变更**(若与本地 `HEAD` 不一致,先回报 `Blocked`)。若 Assignment 未写 `Review cwd` / `Worktree path` 但开发回报了实现用 worktree,应先向 `@project-manager` 申请补全 Assignment,**禁止**在未核对路径与分支的情况下假设在审 `main` 或其它提交。细则见 `mstar-branch-worktree`「QC 三审、QA 验证与 feature 检出上下文」。**`@qa-engineer`** 对同一 feature 做验证时须使用 Assignment 中 **同一 `Review cwd` / `Worktree path`** 及 **同一 `plan_id` + `Review range` / `Diff basis`**(见该节 QA 条款)。
44
- 2. 用 `git diff` / `git show` 与内置 `glob` / `grep` / `read` 构建变更上下文;仅在跨模块或陌生路径需要快速导航时**可选**短调用 `@explore`。**禁止**把审查步骤、结论或清单执行外包给 `@explore`(见 `mstar-harness-core` SKILL.md「内置 `@explore` 能力边界」)。
45
- 3. 检查 `git diff` 及相关历史;若 Assignment 启用功能分支策略,再次核对当前分支与 **`Working branch` / `Branch policy`** 一致(无授权则不应在默认分支上堆功能改动)。
46
- 4. 运行对应语言的 lint 和静态分析。
47
- 5. 按本 skill 审查清单进行人工审查。
48
- 6. 产出带严重等级和证据的结构化发现。PM 将条目写入 **`{HARNESS_DIR}/status.json`** 根级 **`residual_findings[<plan-id>][]`**(canonical 见 `mstar-plan-artifacts` **SKILL.md** 开篇)时,其 **`severity`** **仅允许** `mstar-plan-artifacts` `references/status-and-residuals.md` 中 **「Residual findings:severity(SSOT,机器字段)」** 的枚举与映射表(报告小节 **Critical / Warning / Suggestion** → JSON 档位);**不要**把报告标题字符串直接当作 `severity`。
49
- 7. **报告入库(Git)**:将 QC 报告 **`.md`** 写入 `{PLAN_DIR}/reports/<plan-id>/` 后,在业务仓根执行 **`git add`**(**仅**本次报告路径)与 **`git commit`**,并在 Completion Report 给出 **真实** `git log -1 --oneline`。**禁止**仅完成 Write/Edit 而不提交(权限与例外见各 `agents/qc-specialist*.md`)。
50
- 8. **禁止收尾套话**:报告与 commit 成功后,**不得**向终端用户追问「是否要交付报告」「下一步是否通知 PM」等;须在同一轮内输出完整 **Completion Report v2** 结束(见各 `agents/qc-specialist*.md` **「回合结束方式」**)。
51
-
52
- ### Deep Review 模式(自动触发,透镜制)
53
-
54
- QC reviewer 在开工时按 `references/deep-review-personas.md` § 触发规则自行判定是否启用 deep review(≥2 条信号即触发)。**不派发子代理**,不依赖 PM 显式标注 mode。
55
-
56
- - **触发信号**:变更规模、敏感模块、新领域、数据结构变更、plan 高风险声明、多模块耦合 —— 达 2 条即触发。
57
- - **审查方式**:单人加载**透镜(lens)**——结构化检查表,逐项覆盖(如 Security Lens、Auth Lens、Data Migration Lens),不派发 persona subagent(反递归红线)。
58
- - **透镜选择**:默认透镜 + 按触发信号追加。详见 `references/deep-review-personas.md`。
59
- - **报告中体现**:`## Scope` 写 `Deep review: triggered (<signals>)` + `Lenses applied: <list>`;发现归入主报告 Findings,`Source Type` 标注为 `deep-lens: <lens-name>`。
60
-
61
- ## 共享审查清单
62
-
63
- ### 代码质量
64
-
65
- - [ ] 命名清晰且一致。
66
- - [ ] 职责没有过度混合。
67
- - [ ] 错误处理显式且可执行。
68
- - [ ] 注释说明意图,而非实现细节的琐碎描述。
69
-
70
- ### 安全与正确性
71
-
72
- - [ ] 输入已验证,边界检查显式。
73
- - [ ] 无明显的注入/路径遍历/权限问题。
74
- - [ ] 敏感数据处理方式恰当。
75
- - [ ] 不变量和状态转换逻辑连贯。
76
- - [ ] LLM/Agent 边界:不可信输入未直接驱动特权操作;提示注入面已识别。
77
-
78
- ### 性能与可靠性
79
-
80
- - [ ] 热路径避免了可避免的开销。
81
- - [ ] 资源生命周期处理正确。
82
- - [ ] 无界操作的风险已被处理。
83
- - [ ] 退化和失败行为可观测。
84
-
85
- ### 可维护性
86
-
87
- - [ ] 契约和接口仍然易于理解。
88
- - [ ] 引入依赖有充分理由。
89
- - [ ] 破坏性变更附带迁移指引。
90
- - [ ] 优先复用而非重复逻辑。
91
-
92
- ## 标准输出模板
93
-
94
- 落盘到 **`{PLAN_DIR}/reports/<plan-id>/qc#.md`**(`qc1.md` … `qc3.md`;目录已含 `plan_id`,文件名勿再加前缀)时:文件**最上方**须为 YAML frontmatter(`report_kind`、`reviewer`、`reviewer_index`、`plan_id`、`verdict`、`generated_at` 等,见 `agents/qc-specialist*.md`),**紧接着**再写下列 Markdown 正文(可将 **Reviewer Metadata** 与 frontmatter 对齐,避免矛盾)。**Findings 下三节标题**(Critical / Warning / Suggestion)为**人类可读分类**;PM 将条目写入根级 **`residual_findings`**(见 `mstar-plan-artifacts` **SKILL.md** 开篇)时的 **`severity` 机器字段**以 `mstar-plan-artifacts/references/status-and-residuals.md` **「Residual findings:severity(SSOT,机器字段)」** 为准。
95
-
96
- ```markdown
97
- # Code Review Report
98
-
99
- ## Reviewer Metadata
100
- - Reviewer: @qc-specialist | @qc-specialist-2 | @qc-specialist-3
101
- - Runtime Agent ID: {qc-specialist | qc-specialist-2 | qc-specialist-3}
102
- - Runtime Model: {provider/model-id}
103
- - Review Perspective: {role-specific primary focus}
104
- - Report Timestamp: {ISO-8601}
105
-
106
- ## Scope
107
- - plan_id: {same as Assignment — or `N/A` + Feature / scope label from Assignment}
108
- - Review range / Diff basis: {exact copy from Assignment}
109
- - Working branch (verified): {name}
110
- - Review cwd (verified): {path from git rev-parse --show-toplevel}
111
- - Files reviewed: {count}
112
- - Commit range (if not identical to Review range line, explain): {hash..hash}
113
- - Tools run: {list}
114
-
115
- ## Findings
116
- ### 🔴 Critical
117
- - {issue} -> {fix}
118
-
119
- ### 🟡 Warning
120
- - {issue} -> {fix}
121
-
122
- ### 🟢 Suggestion
123
- - {improvement}
124
-
125
- ## Source Trace
126
- - Finding ID: {F-001}
127
- - Source Type: {git-diff | linter | static-analysis | doc-rule | manual-reasoning}
128
- - Source Reference: {command/snippet/file}
129
- - Confidence: High | Medium | Low
130
-
131
- ## Summary
132
- | Severity | Count |
133
- |----------|-------|
134
- | 🔴 Critical | {n} |
135
- | 🟡 Warning | {n} |
136
- | 🟢 Suggestion | {n} |
137
-
138
- **Verdict**: Approve | Request Changes | Needs Discussion
139
- ```
140
-
141
- ## 高危变更与破坏性操作(运维 / 数据 / 生产)
142
-
143
- 适用于:`@ops-engineer` 主导的迁移、生产配置变更、数据删除或批量变更、证书轮转、共享环境上的破坏性脚本等。`@project-manager` 应在 Assignment 中标注 **high-risk** 并写清允许的目录与环境。
144
-
145
- **最小检查(未满足则应 `Needs Discussion` 或 `Request Changes`)**
146
-
147
- - [ ] 影响范围与维护窗口(或对用户的影响)已写明。
148
- - [ ] 回滚步骤可执行且已评审。
149
- - [ ] 备份、快照或等价恢复手段已确认(如适用)。
150
- - [ ] 变更与验证步骤可审计(命令、流水线或 runbook 引用,而非一次性黑箱)。
151
- - [ ] 涉及应用代码时仍走默认开发门禁(QC/QA),不因"只是运维"而跳过。
152
-
153
- ## 门禁规则
23
+ 在 PM 发出 **initial** QC 三审后、进入汇总前:
154
24
 
155
- - 存在未解决的 `Critical` `Warning` `Request Changes`
156
- - `Critical` / `Warning`,但有高影响且未定案的取舍(通常来自 Suggestion 的架构级分歧)→ `Needs Discussion`
157
- - 仅在 `Critical = 0` `Warning = 0`(未解决项)时,方可 `Approve`
25
+ - **Initial wave**:三个角色 ID 须为 `qc-specialist`、`qc-specialist-2`、`qc-specialist-3`;模型与宿主配置一致。
26
+ - **Targeted re-review**:仅校验 Assignment 列出的席位;映射错误 `dispatch invalid`,重派。
27
+ - 并行 QC 退化为同模型且无法修复 Status Update 标记 `degraded tri-review`;默认不放行。
158
28
 
159
- ### CI 门禁补充(强制)
29
+ ## Residual Findings 留档门禁(PM)
160
30
 
161
- - 任何与本次变更范围相关的 CI 失败(编译、测试、lint、类型检查、构建、发布前校验)默认按 **>= Warning** 处理,进入本轮必须修复项。
162
- - CI 失败未修复前,不得给出 `Approve`;应按上方门禁判定为 `Request Changes`。
163
- - 若判断为 CI 环境波动而非代码问题,报告必须给出可复核证据(失败日志、复跑结果、隔离结论)并由 PM 明确记录处置决定;在未形成一致结论前,维持 `Needs Discussion` 或 `Request Changes`,不得直接放行。
31
+ - 阻断项修复后仍有 **Warning / Suggestion** 或技术债 → 必须留档;**`severity`** 仅允许 `mstar-plan-artifacts/references/status-and-residuals.md` 枚举。
32
+ - **Open SSOT**:`{HARNESS_DIR}/status.json` 根级 **`residual_findings[<plan-id>]`**;PM 在 consolidated 决策分配 **R1…** 并写入。关闭 → **`{HARNESS_DIR}/archived/residuals/<plan-id>.json`**。
33
+ - plan 仅作人类索引;不得作为唯一 SSOT。
34
+ - **`Approve with residuals`**:仅当无 open **Critical**;PM 汇总结论须含 residual 清单与跟踪位置。
35
+ - 未完成 residual 留档 → 不得进入 plan **Done**。
164
36
 
165
- ## Residual Findings 留档门禁
37
+ ### Residual 关闭与验证
166
38
 
167
- - 当阻断项(`Critical`)修复后仍有未关闭 **Warning / Suggestion** 类问题或技术债,不得仅在对话中口头说明,必须留档;登记 **`severity`** 时遵守 `mstar-plan-artifacts` `references/status-and-residuals.md` **「Residual findings:severity(SSOT,机器字段)」**。
168
- - **启用 plan 管理且存在 `plan-id` 时**:**待跟踪(open)** residual 的 **SSOT** 为 **`{HARNESS_DIR}/status.json`** 根级 **`residual_findings[<plan-id>]`**(与 `plans` 平级;canonical `mstar-plan-artifacts` **SKILL.md** 开篇);PM 在 consolidated 决策中分配 **稳定 `id`(R1…)** 后须**写入该数组**(`source` 指回 `qc1.md` 等)。**已关闭**条目归档至 **`{HARNESS_DIR}/archived/residuals/<plan-id>.json`**(字段与严重等级见 `mstar-plan-conventions`),与 **`{PLAN_DIR}/reports/<plan-id>/`** 交叉引用。
169
- - **主 plan**:仅作**人类可读索引**(可选)——复述 `id` 与摘要并指向 **`{HARNESS_DIR}/status.json`**;**不得**作为与 SSOT 脱钩的唯一登记处(见 `mstar-plan-conventions` `references/plan-files-and-reports.md`「Residual findings:权威在哪」)。
170
- - 可选:`@project-manager` 维护 **`metadata.tech_debt_summary`** 作为跨 plan 聚合视图(与 `residual_findings` 互补,见 `mstar-plan-conventions`)。
171
- - 若无 `{PLAN_DIR}`:写入项目认可的进度载体或根级 `notes`(结构化条目),仍须含 `id` 与跟踪字段。
172
- - 每条 residual finding 至少包含:`id`、`title`、`severity`、`source`、`scope`、`decision`(defer/accept/risk-accepted)、`owner`、`target milestone/date`、`tracking link`。
173
- - `Approve with residuals` 仅在无未关闭 `Critical` 时允许,且 PM 汇总结论中必须包含 residual 清单与跟踪位置。
174
- - 未完成 residual 留档,不应进入最终 `Done` 收口。
39
+ - R# 修复后:审查/QA 结论指向可复核证据;**`project-manager`** **`qa-engineer`**(`QA gate: mandatory`)补全关闭字段后归档并从 open 列表移除。
40
+ - **`waived` / `superseded` / `duplicate`** 须在 `closure_note` 写清依据。
175
41
 
176
- ### Residual 关闭与验证(与 `mstar-plan-conventions` 对齐)
42
+ ## PM consolidated 门禁(摘要)
177
43
 
178
- - 后续轮次中若某 R# 已修复:审查/QA 结论应**指向**可复核证据(diff、测试、复现步骤);**`@project-manager`** **`@qa-engineer`** 补全关闭字段后,将条目 **追加**至 **`{HARNESS_DIR}/archived/residuals/<plan-id>.json`**,并从 **open 列表**(根级 **`residual_findings[<plan-id>]`**;若仅存 legacy 侧则从该处)中**移除**(主列表仅保留 **open**)。
179
- - **`waived` / `superseded` / `duplicate`** 须在 `closure_note`(及必要时 `superseded_by`)中写清依据;豁免类应与产品/风险口径一致,不得由执行方单方面静默关闭。
180
- - **不得**从主列表删除仍为 **open** 的项;**不推荐**把已关闭项长期留在 **`{HARNESS_DIR}/status.json`**(应用文件归档减负,见 `mstar-plan-conventions`)。
44
+ Leaf reviewers apply verdict per **`mstar-roles/references/qc-specialist/report-template.md`**. PM **`qc-consolidated.md`** synthesizes tri (or single-seat `qc.md`) into one gate decision for implement fix waves and QA gate.
181
45
 
182
- ## 证据规则
46
+ ## 证据规则(PM · consolidated 输入)
183
47
 
184
- - Critical 发现必须包含触发条件、影响范围和修复建议。
185
- - 低置信度发现必须包含后续验证步骤。
186
- - 跨任务反复出现的发现应标记为重复模式。
48
+ - Critical 发现须含触发条件、影响范围、修复建议。
49
+ - 低置信度发现须含后续验证步骤。
50
+ - 跨任务重复模式应标记。
@@ -7,7 +7,9 @@
7
7
  | **L1** Implementer | dev subagent | Per task | Write code + TDD evidence | `task-N-brief.md` |
8
8
  | **L2** Task reviewer | PM-dispatched subagent (SDD) | Per task, after implementer | Spec + quality for **one task** | brief, report, **task-level** diff |
9
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` | After QC gate | Acceptance, residual, Done | QC reports + plan + `status.json` |
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 | QC reports + plan + `status.json` |
11
+
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`.
11
13
 
12
14
  **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”.
13
15
 
@@ -37,10 +37,10 @@ If any conflict appears, `mstar-harness-core` remains the authoritative source f
37
37
 
38
38
  | Role | Typical adds |
39
39
  | --- | --- |
40
- | `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-roles` ref; + `mstar-review-qc` before QC; + `mstar-branch-worktree` / `mstar-plan-artifacts` as the round requires; + `mstar-skill-authoring` for skill work; + `mstar-iteration` for iteration lifecycle (start/drive/close); + `mstar-strategy` for strategic alignment; + `mstar-compound` / `mstar-compound-refresh` pre-loaded by `mstar-iteration` § iteration-close |
40
+ | `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-roles` ref; + `references/project-manager/qa-trigger-matrix.md` for QA gate tiers; + `mstar-review-qc` before QC; + `mstar-branch-worktree` / `mstar-plan-artifacts` as the round requires; + `mstar-skill-authoring` for skill work; + `mstar-iteration` for iteration lifecycle (start/drive/close); + `mstar-strategy` for strategic alignment; + `mstar-compound` / `mstar-compound-refresh` pre-loaded by `mstar-iteration` § iteration-close |
41
41
  | `fullstack-dev*`, `frontend-dev` | `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (if repo writes); plan path symbols from `mstar-plan-conventions` (minimal); `mstar-design-md` when implementing styled UI |
42
- | `qc-specialist*` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (report paths); `mstar-design-md` when reviewing UI |
43
- | `qa-engineer` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (closing R#); `mstar-design-md` when verifying visual output |
42
+ | `qc-specialist*` | `mstar-branch-worktree`, `mstar-plan-artifacts` (report paths); `references/qc-specialist/` (workflow, checklist, template, lenses); `mstar-design-md` when reviewing UI |
43
+ | `qa-engineer` | `mstar-branch-worktree`, `mstar-plan-artifacts` (closing R#); `references/qa-engineer/acceptance-gate.md`; `mstar-design-md` when verifying visual output |
44
44
  | `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent); `mstar-strategy` (STRATEGY.md creation/maintenance) |
45
45
  | `ops-engineer` | `mstar-coding-behavior`, `mstar-branch-worktree` |
46
46
  | `prompt-engineer` | All topic skills when editing harness text |
@@ -126,7 +126,7 @@ Do not create your own branch strategy.
126
126
 
127
127
  - Follow `{HARNESS_DIR}` / `{PLAN_DIR}` conventions from `mstar-plan-conventions`.
128
128
  - Update architecture-related plan sections and task checkboxes only for your assigned scope.
129
- - Do not mark overall plan `Done`; that authority belongs to PM/QA gate ownership.
129
+ - Do not mark overall plan `Done`; that authority belongs to `project-manager` or `qa-engineer` only (`mstar-harness-core`).
130
130
 
131
131
  ### Git NEVER (when you touched tracked repo files)
132
132
 
@@ -82,7 +82,7 @@ If plan drift appears during implementation, request plan write-back before cont
82
82
 
83
83
  - Follow `{HARNESS_DIR}` / `{PLAN_DIR}` conventions from `mstar-plan-conventions`.
84
84
  - Update assigned task checkboxes and related plan sections.
85
- - Do not mark full plan `Done` (PM/QA gate authority).
85
+ - Do not mark full plan `Done` (only `project-manager` or `qa-engineer` per `mstar-harness-core`).
86
86
 
87
87
  ### Git NEVER (repo writes)
88
88
 
@@ -101,7 +101,7 @@ If plan drift appears, request plan update before continuing.
101
101
 
102
102
  - Follow `{HARNESS_DIR}` / `{PLAN_DIR}` conventions from `mstar-plan-conventions`.
103
103
  - Update assigned task checkboxes and plan notes for your scope.
104
- - Do not mark full plan `Done` (PM/QA authority).
104
+ - Do not mark full plan `Done` (only `project-manager` or `qa-engineer` per `mstar-harness-core`).
105
105
 
106
106
  ### Git NEVER (repo writes)
107
107
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  **Hub matrix:** `mstar-roles` SKILL.md.
4
4
 
5
- **Always:** `mstar-harness-core`, `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-review-qc` (high-risk ops checklist), `mstar-branch-worktree` (repo writes, production-touching branches).
5
+ **Always:** `mstar-harness-core`, `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (repo writes, production-touching branches).
6
6
 
7
7
  **Typically:** `mstar-plan-conventions` (paths).
8
8
 
@@ -43,14 +43,14 @@ If any item below matches, **stop** and return `Blocked` to `project-manager` in
43
43
 
44
44
  When assignment is marked `high-risk`:
45
45
 
46
- - Validate preconditions against `mstar-review-qc` high-risk checklist
46
+ - Validate preconditions against `mstar-roles/references/qc-specialist/reviewer-checklist.md` § High-risk ops
47
47
  - Provide explicit deploy + rollback + verification steps
48
48
  - Do not execute ambiguous destructive steps
49
49
 
50
50
  ### High-risk NEVER
51
51
 
52
52
  - **NEVER** run production-impacting or destructive changes while rollback targets, blast radius, or authorization are still ambiguous—return `Blocked` with the exact missing control instead of “best effort” execution.
53
- - **NEVER** substitute informal chat confirmation for the evidence and rollback steps required by `mstar-review-qc` when the assignment is marked high-risk.
53
+ - **NEVER** substitute informal chat confirmation for the evidence and rollback steps in `references/qc-specialist/reviewer-checklist.md` when the assignment is marked high-risk.
54
54
 
55
55
  ## Branch & Worktree Gate
56
56
 
@@ -17,7 +17,7 @@ For assignees (non-PM):
17
17
 
18
18
  - `Execute as: <role-id>` means the current assignee executes personally.
19
19
  - Do not spawn same-role nested subagent.
20
- - Do not infer dispatch from route narrative (`A -> B -> C`), handoff, QA notes, or role names in prose.
20
+ - Do not infer dispatch from route narrative (`A -> B -> C`), handoff, `QA gate` fields, or role names in prose.
21
21
  - Extra delegation is forbidden unless explicitly listed in `Delegation: allowed (...)`.
22
22
  - If additional assignee is required, return `Blocked` with rationale.
23
23
 
@@ -42,7 +42,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
42
42
  - **QC reviewers**: "start review before all QC reviewers are dispatched in parallel"; "treat other reviewers' names in routing text as invoke targets"
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"; "modify application code"
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)
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.
@@ -65,7 +65,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
65
65
 
66
66
  **You MUST NOT:**
67
67
  - dispatch or invoke any subagent unless `Delegation: allowed (...)` appears below
68
- - treat plain `role-id` mentions, `Handoff`, `QA note`, routing tables, or multi-track prose as invoke commands
68
+ - treat plain `role-id` mentions, `Handoff`, `QA gate`, routing tables, or multi-track prose as invoke commands
69
69
  - invoke a subagent whose `subagent_type` matches your own `Execute as` role id (recursive dispatch)
70
70
  - <situation-specific anti-pattern #1>
71
71
  - <situation-specific anti-pattern #2>
@@ -94,7 +94,9 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
94
94
  **plan_id**: <plan-id or N/A + scope label>
95
95
  **Review range / Diff basis**: <reproducible basis; merge-base = `metadata.target_branch` or PM-specified ref — not assumed `origin/main`>
96
96
  **Worktree path**: <implementer path if used>
97
- **QA note**: <PM-scheduled / skipped / self-check>
97
+ **QA gate**: mandatory | pm-acceptance | report-only — see `references/project-manager/qa-trigger-matrix.md`
98
+ **QA gate reason**: <tier label, e.g. hotfix-inline | small-feature-clean-qc | mandatory-medium-feature>
99
+ **QA mode**: acceptance-only | full | report-only | N/A — required when `QA gate: mandatory` or `report-only`
98
100
  **Why this agent**: <role-fit>
99
101
  **PM Task Board coverage**: <task ids>
100
102
  **Roadmap / deferred scope**: <required when staged, partial, or temporary; otherwise N/A>
@@ -158,6 +160,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
158
160
  **Blockers**: ...
159
161
  **Decisions needed**: ...
160
162
  **Evidence Snapshot**: ...
163
+ **PM Acceptance**: <required block when QA gate: pm-acceptance before Done — see qa-trigger-matrix.md>
161
164
  **Effort note (agent-oriented)**: ...
162
165
  ```
163
166