@mstar-harness/opencode 1.0.3 → 1.0.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/CHANGELOG.md +10 -4
  2. package/harness-agents/qa-engineer.md +2 -2
  3. package/harness-skills/mstar-branch-worktree/SKILL.md +10 -8
  4. package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +56 -0
  5. package/harness-skills/mstar-design-md/SKILL.md +1 -1
  6. package/harness-skills/mstar-dispatch-gates/SKILL.md +12 -3
  7. package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
  8. package/harness-skills/mstar-harness-core/SKILL.md +4 -3
  9. package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +1 -1
  10. package/harness-skills/mstar-iteration/SKILL.md +5 -5
  11. package/harness-skills/mstar-phase-gates/SKILL.md +3 -4
  12. package/harness-skills/mstar-plan-artifacts/SKILL.md +2 -2
  13. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +1 -1
  14. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +2 -2
  15. package/harness-skills/mstar-review-qc/SKILL.md +26 -162
  16. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +3 -1
  17. package/harness-skills/mstar-roles/SKILL.md +3 -3
  18. package/harness-skills/mstar-roles/references/architect.md +1 -1
  19. package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
  20. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +3 -1
  21. package/harness-skills/mstar-roles/references/ops-engineer.md +3 -3
  22. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +9 -5
  23. package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +54 -0
  24. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +1 -1
  25. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +3 -2
  26. package/harness-skills/mstar-roles/references/project-manager.md +19 -12
  27. package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +60 -0
  28. package/harness-skills/mstar-roles/references/qa-engineer.md +21 -25
  29. package/harness-skills/{mstar-review-qc/references/deep-review-personas.md → mstar-roles/references/qc-specialist/deep-review-lenses.md} +2 -0
  30. package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +71 -0
  31. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +42 -0
  32. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +36 -0
  33. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +46 -58
  34. package/harness-skills/mstar-sdd/SKILL.md +1 -1
  35. package/package.json +1 -1
@@ -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
 
@@ -70,6 +70,8 @@ If plan drift appears, request plan update before continuing.
70
70
 
71
71
  - Use PM-defined `Working branch` / `Branch policy` only
72
72
  - Same-repo concurrent writers must use isolated worktrees
73
+ - When Assignment includes **`Worktree path`**: `cd` there **before** first repo write; do not use PM integration checkout or default repo root
74
+ - Completion Report must state **`Worktree path used`** (absolute) when assigned
73
75
 
74
76
  ## Responsibilities
75
77
 
@@ -99,7 +101,7 @@ If plan drift appears, request plan update before continuing.
99
101
 
100
102
  - Follow `{HARNESS_DIR}` / `{PLAN_DIR}` conventions from `mstar-plan-conventions`.
101
103
  - Update assigned task checkboxes and plan notes for your scope.
102
- - 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`).
103
105
 
104
106
  ### Git NEVER (repo writes)
105
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
 
@@ -9,6 +9,7 @@ The concise gate summary remains in `references/project-manager.md`.
9
9
  - Each independent Assignment requires one matching host invoke.
10
10
  - In tool hosts (OpenCode / Cursor Task / Codex with callable multi-agent tools), Markdown-only Assignment is not dispatch.
11
11
  - For parallel batch with `N >= 2`, dispatch turn must emit all `N` invokes in one message when host supports it.
12
+ - **Same-repo writable parallel tracks**: tool concurrency and worktree isolation are **separate gates**. Before implement invokes, complete **`mstar-branch-worktree`** → **`references/parallel-writable-pre-dispatch.md`**.
12
13
 
13
14
  ## Executor Anti-Recursion Rules
14
15
 
@@ -16,7 +17,7 @@ For assignees (non-PM):
16
17
 
17
18
  - `Execute as: <role-id>` means the current assignee executes personally.
18
19
  - Do not spawn same-role nested subagent.
19
- - 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.
20
21
  - Extra delegation is forbidden unless explicitly listed in `Delegation: allowed (...)`.
21
22
  - If additional assignee is required, return `Blocked` with rationale.
22
23
 
@@ -39,9 +40,9 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
39
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.
40
41
  - Add anti-patterns specific to the assignment context. Examples per role type:
41
42
  - **QC reviewers**: "start review before all QC reviewers are dispatched in parallel"; "treat other reviewers' names in routing text as invoke targets"
42
- - **Multi-track implementers** (`fullstack-dev` + `frontend-dev`): "auto-dispatch to the other track mentioned in Dev routing"
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`"
43
44
  - **`fullstack-dev-2`**: "treat `fullstack-dev` in routing narrative as a handoff or invoke target"
44
- - **`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)
45
46
  - **`explore`-assigned**: "implement or modify code"
46
47
  - **All non-PM**: "dispatch parallel agents"; "spawn a subagent whose `subagent_type` matches your own `Execute as` role id"
47
48
  - Anti-patterns must be action-oriented ("auto-dispatch to …", "treat … as invoke", "start … before …") — not abstract descriptions.
@@ -64,7 +65,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
64
65
 
65
66
  **You MUST NOT:**
66
67
  - dispatch or invoke any subagent unless `Delegation: allowed (...)` appears below
67
- - 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
68
69
  - invoke a subagent whose `subagent_type` matches your own `Execute as` role id (recursive dispatch)
69
70
  - <situation-specific anti-pattern #1>
70
71
  - <situation-specific anti-pattern #2>
@@ -93,7 +94,9 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
93
94
  **plan_id**: <plan-id or N/A + scope label>
94
95
  **Review range / Diff basis**: <reproducible basis; merge-base = `metadata.target_branch` or PM-specified ref — not assumed `origin/main`>
95
96
  **Worktree path**: <implementer path if used>
96
- **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`
97
100
  **Why this agent**: <role-fit>
98
101
  **PM Task Board coverage**: <task ids>
99
102
  **Roadmap / deferred scope**: <required when staged, partial, or temporary; otherwise N/A>
@@ -157,6 +160,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
157
160
  **Blockers**: ...
158
161
  **Decisions needed**: ...
159
162
  **Evidence Snapshot**: ...
163
+ **PM Acceptance**: <required block when QA gate: pm-acceptance before Done — see qa-trigger-matrix.md>
160
164
  **Effort note (agent-oriented)**: ...
161
165
  ```
162
166
 
@@ -0,0 +1,54 @@
1
+ # QA Trigger Matrix (PM Reference)
2
+
3
+ Extension of `references/project-manager.md`. Use when choosing **`QA gate`** and **`QA mode`** on Assignments and before plan `Done`. NEVER rules → same file § PM-Specific NEVER Rules (QA gate bullets).
4
+
5
+ ## Assignment fields (SSOT)
6
+
7
+ | Field | Values | Meaning |
8
+ | --- | --- | --- |
9
+ | **`QA gate`** | `mandatory` | After QC passes, dispatch `qa-engineer` |
10
+ | | `pm-acceptance` | Do **not** dispatch QA; PM completes acceptance checklist and may mark `Done` |
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 |
14
+ | | `report-only` | No business-code changes unless explicitly allowed |
15
+
16
+ **Deprecated:** `QA note: skipped / self-check` — use **`QA gate: pm-acceptance`** plus **`QA gate reason: <tier>`**.
17
+
18
+ Set **`QA gate`** on the **first implement Assignment** (or plan frontmatter) and keep it consistent through QC closure unless scope/risk changes force an upgrade to `mandatory`.
19
+
20
+ ## Trigger matrix (default)
21
+
22
+ | Scenario | Default `QA gate` | Default `QA mode` (if QA dispatched) |
23
+ | --- | --- | --- |
24
+ | Hotfix / `Execution mode: inline` | `pm-acceptance` | N/A |
25
+ | Small feature: non-UI, no open R#, QC clean `Approve` (not `Approve with residuals`) | `pm-acceptance` | N/A |
26
+ | Bug fix (RCA + regression scope; default route) | `mandatory` | `acceptance-only` |
27
+ | Medium / Large feature | `mandatory` | `acceptance-only` |
28
+ | `Approve with residuals` or any open R# in `status.json` | `mandatory` | `acceptance-only` (includes R# verify) |
29
+ | UI-visible change (`Task category: visual` or observable evidence gate) | `mandatory` | `acceptance-only` (UI observable evidence required; escalate to `full` if missing) |
30
+ | High-risk ops | `mandatory` | `full` |
31
+ | QA report-only primary route | `report-only` | `report-only` |
32
+ | Product-docs-only / tech-spec-only (no runtime diff) | N/A | — |
33
+ | User explicit full QA request | `mandatory` | `full` |
34
+
35
+ **Upgrade rule:** If conditions change mid-round (e.g. QC becomes `Approve with residuals`, UI scope added, open R# registered), change `QA gate` from `pm-acceptance` to `mandatory` before `Done`.
36
+
37
+ ## PM acceptance checklist (required before `Done` when `QA gate: pm-acceptance`)
38
+
39
+ PM completes this in **Status Update** (or plan closure note). PM **does not** run bash tests or reproduction in the orchestration thread.
40
+
41
+ 1. **QC verdict:** `qc-consolidated.md` or `qc.md` shows `Approve` with **Critical = 0** and **Warning = 0** (not `Approve with residuals`).
42
+ 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.
43
+ 3. **Residuals:** `status.json` has **no open R#** for this `plan_id` (or documented waiver per `mstar-plan-artifacts`).
44
+ 4. **Checkout alignment:** `Working branch` and `Review range / Diff basis` match QC report verified lines.
45
+ 5. **`QA gate reason`:** One line naming the tier (e.g. `hotfix-inline`, `small-feature-clean-qc`).
46
+
47
+ ```markdown
48
+ ## PM Acceptance (qa gate: pm-acceptance)
49
+ - QA gate reason: <tier>
50
+ - QC report: <path> — Approve, Critical/Warning 0
51
+ - DoD mapping: <AC-id> → <evidence ref> …
52
+ - Residuals: none open | waived R# …
53
+ - Checkout: Working branch <name>; Review range <basis> (per QC Scope)
54
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  Use this reference when PM is dispatching QC, consolidating review verdicts, or managing residual findings lifecycle.
4
4
 
5
- **Layer SSOT (L1–L4):** `mstar-review-qc/references/review-responsibility-boundaries.md`. Dispatch mechanics → **`mstar-dispatch-gates`**; QC checklists / verdict → **`mstar-review-qc`**.
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
7
  ## SDD path: mandatory plan QC tri-review (L3)
8
8
 
@@ -81,7 +81,7 @@ Document override as `Dev owner tie-break: single id — <reason>`.
81
81
  - `fullstack-dev` + `fullstack-dev-2` can run in parallel when module boundaries are explicit.
82
82
  - Same-repo multi-writer concurrency requires branch + worktree isolation.
83
83
  - **SDD implement** (`Execution mode: sdd`, default multi-task): per-task **task reviewer** (L2) + plan **QC tri-review** (L3, N=3).
84
- - **Inline / hotfix**: single-seat QC or skip per routing table.
84
+ - **Inline / hotfix**: single-seat QC; default **`QA gate: pm-acceptance`** after QC — tier table in `references/project-manager/qa-trigger-matrix.md`.
85
85
 
86
86
  ## Routing / allocation NEVER (PM)
87
87
 
@@ -95,4 +95,5 @@ Document override as `Dev owner tie-break: single id — <reason>`.
95
95
  - `Task category` matches route
96
96
  - `Dev routing` matches task board ownership
97
97
  - Parallel intent and branch/worktree policy align
98
- - If UI-visible changes: QA observable evidence gate present
98
+ - **`QA gate`** and **`QA gate reason`** set per `qa-trigger-matrix.md`
99
+ - If UI-visible changes: `QA gate: mandatory` and observable evidence gate planned
@@ -57,19 +57,21 @@ Pick one `Primary` route per Assignment; attach additional gates as needed.
57
57
 
58
58
  | Task type | Default route |
59
59
  | --- | --- |
60
- | Large feature | `explore -> product-manager -> architect -> dev (SDD) -> QC tri-review -> qa-engineer -> ops-engineer` |
61
- | Medium feature | `explore -> (architect optional) -> dev (SDD) -> QC tri-review -> qa-engineer` |
62
- | Small feature | `dev (SDD) -> QC tri-review -> qa-engineer` |
63
- | Bug fix | `explore -> RCA brief -> dev (SDD) -> QC tri-review -> qa-engineer` |
64
- | High-ambiguity bug | `explore -> RCA -> (architect optional) -> dev (SDD) -> QC tri-review -> qa-engineer` |
65
- | Hotfix | `single dev -> QC single-review -> qa-engineer fast verify` |
60
+ | Large feature | `explore -> product-manager -> architect -> dev (SDD) -> QC tri-review -> qa-engineer (mandatory) -> ops-engineer` |
61
+ | Medium feature | `explore -> (architect optional) -> dev (SDD) -> QC tri-review -> qa-engineer (mandatory)` |
62
+ | Small feature | `dev (SDD) -> QC tri-review -> pm-acceptance` (non-UI, no open R#, clean QC Approve) **or** `qa-engineer (mandatory)` when UI/residual/risk applies |
63
+ | Bug fix | `explore -> RCA brief -> dev (SDD) -> QC tri-review -> qa-engineer (mandatory)` |
64
+ | High-ambiguity bug | `explore -> RCA -> (architect optional) -> dev (SDD) -> QC tri-review -> qa-engineer (mandatory)` |
65
+ | Hotfix | `single dev -> QC single-review -> pm-acceptance` |
66
66
  | Product docs only | `product-manager` (QC may be skipped with explicit reason) |
67
67
  | Tech spec only | `architect` (QC may be skipped with explicit reason) |
68
68
  | Prompt/rules/skills | `prompt-engineer` |
69
69
  | Market/user research | `product-manager` |
70
- | QA report-only | `qa-engineer` (`QA mode: report-only`) |
70
+ | QA report-only | `qa-engineer` (`QA gate: report-only`, `QA mode: report-only`) |
71
71
  | High-risk ops | `ops-engineer` (+QC/QA by risk) |
72
72
 
73
+ **QA gate matrix (tier defaults):** `references/project-manager/qa-trigger-matrix.md`.
74
+
73
75
  Detailed conflict priority and dev allocation:
74
76
  `references/project-manager/routing-and-dev-allocation.md`.
75
77
 
@@ -82,7 +84,7 @@ Detailed conflict priority and dev allocation:
82
84
  - Code-development plans with **`Execution mode: sdd`** (default for multi-task): **mandatory plan QC tri-review** (`qc1`…`qc3` + consolidated) after all task reviewers complete.
83
85
  - **`Execution mode: inline`**: hotfix single-seat QC (`qc.md`) or explicit skip rules unchanged.
84
86
  - Multi-task implement defaults to **`Execution mode: sdd`** + `mstar-sdd`; hotfix may use `inline`.
85
- - Runtime/behavior change requires QA by default.
87
+ - Runtime/behavior change requires a recorded **`QA gate`** decision by default (`mandatory` or `pm-acceptance` per `qa-trigger-matrix.md`).
86
88
  - Report-only QA may skip QC tri-review only when no implementation/test/config artifact is committed.
87
89
  - Product-docs-only and tech-spec-only can skip QC tri-review only with explicit `QC: skipped — <reason>`.
88
90
  - Plan `Done` sign-off authority: `project-manager` or `qa-engineer` only.
@@ -114,9 +116,12 @@ If any item below matches, fix the dispatch/plan state or mark `Blocked`—do **
114
116
  - **NEVER** register residuals only inside the plan narrative while skipping root `{HARNESS_DIR}/status.json` `residual_findings[<plan_id>]` when plan conventions require the SSOT field.
115
117
  - **NEVER** write non-canonical residual `severity` strings—use only the machine enum from `mstar-plan-artifacts`.
116
118
  - **NEVER** use `Task category: quick` to skip mandatory Prepare (`specify → clarify → plan`) for substantive work (`mstar-harness-core` hard rule).
117
- - **NEVER** omit native dispatch/worktree fields when the batch truly requires parallel dev (`Dispatch mode: parallel independent tracks`) or same-repo multi-writer concurrency (`Worktree isolation: required`) per `mstar-dispatch-gates` and `mstar-branch-worktree`.
119
+ - **NEVER** dispatch same-repo **≥2 concurrent writable implement** tracks without **`references/parallel-writable-pre-dispatch.md`**(per-track worktree + absolute **`Worktree path`**;**N invokes isolation** also `mstar-dispatch-gates` dual-gate table).
118
120
  - **NEVER** point QC at a single dev worktree/`Review cwd` that cannot contain **all** claimed changes from parallel tracks until Git integration lands on one `Working branch` `HEAD` (`mstar-branch-worktree` QC/QA alignment).
119
- - **NEVER** label `QA: skipped` for report-only QA—still dispatch `qa-engineer` with report-only mode; QC skip rules are separate and explicit.
121
+ - **NEVER** skip `qa-engineer` on `QA gate: report-only` primary routes—still dispatch with `QA mode: report-only`; QC skip rules are separate and explicit.
122
+ - **NEVER** use `QA gate: pm-acceptance` when open R# exist, UI observable gate is unmet, or QC verdict is not clean `Approve`.
123
+ - **NEVER** mark plan `Done` on runtime/behavior change without `QA gate: mandatory` fulfilled or completed PM acceptance checklist (`qa-trigger-matrix.md`).
124
+ - **NEVER** run tests/repro in the PM orchestration thread to substitute for `QA gate: mandatory` dispatch.
120
125
  - **NEVER** let non-PM/non-QA roles mark plan `Done`.
121
126
  - **NEVER** accept “temporary workaround”, “follow-up later”, “next plan”, or “split into batches” as narrative-only scope management. If work is deferred or staged, write the roadmap/tracking location before implement GO or Done.
122
127
  - **NEVER** perform specialist document edits in the PM thread when host invoke is required — that is `dispatch incomplete` (`mstar-dispatch-gates`, `mstar-iteration` §1.6).
@@ -166,7 +171,7 @@ Use short go/no-go checks before moving phases:
166
171
  | Lock `plan` / register `tasks` | If architecture/contracts are in scope, delegated architect output exists or justified exception is recorded; intention gate is explicit. |
167
172
  | First `implement` | Pre-implement gate check passes; owner matches route/task board; invoke exists in invoke-based hosts. |
168
173
  | QC dispatch | Tri-review invoke and alignment fields pass hard checks. |
169
- | QA dispatch | QA scope aligns with QC scope (or explicit justified difference). |
174
+ | QA dispatch / PM acceptance | `QA gate` set per `qa-trigger-matrix.md`; if `mandatory`, QA scope aligns with QC scope; if `pm-acceptance`, checklist complete before `Done`. |
170
175
 
171
176
  Anti-patterns:
172
177
 
@@ -284,7 +289,7 @@ Minimum invariants:
284
289
  - User conversation follows user language.
285
290
  - PM Assignment body can be Chinese by default.
286
291
  - Technical artifacts/reports/code/config/commit messages default to English unless user asks otherwise.
287
- - Keep **all role references** as plain role id (no `@`) in Assignment body — including `Execute as`, routing narrative, `QA note`, and anti-pattern examples. Host invoke uses task tool `subagent` matching `Execute as` per `mstar-host` (OpenCode: `opencode.md` § Role-mention hygiene).
292
+ - Keep **all role references** as plain role id (no `@`) in Assignment body — including `Execute as`, routing narrative, `QA gate`, and anti-pattern examples. Host invoke uses task tool `subagent` matching `Execute as` per `mstar-host` (OpenCode: `opencode.md` § Role-mention hygiene).
288
293
 
289
294
  ---
290
295
 
@@ -298,6 +303,8 @@ Minimum invariants:
298
303
  - `references/project-manager/qc-and-residuals.md`
299
304
  - Plan/status initialization + lifecycle:
300
305
  - `references/project-manager/plan-management.md`
306
+ - QA gate tier matrix + PM acceptance checklist:
307
+ - `references/project-manager/qa-trigger-matrix.md`
301
308
 
302
309
  Sub-references above include additional **NEVER** rules for PM plan/status sync, routing fairness, and QC/residual consolidation.
303
310
 
@@ -0,0 +1,60 @@
1
+ # QA Acceptance Gate (L4)
2
+
3
+ Extension of `references/qa-engineer.md`. Read when PM dispatches you with **`QA gate: mandatory`** or **`QA gate: report-only`**.
4
+
5
+ Layer **L4** runs after the QC gate. **`QA gate: pm-acceptance`** is PM-only — see **`references/project-manager/qa-trigger-matrix.md`**.
6
+
7
+ **Do not collapse L4 into L3.** QC reviewers do not close residuals or mark plan `Done`.
8
+
9
+ ## Scope (L4 vs L3)
10
+
11
+ | L3 Plan QC | L4 QA (`qa-engineer`) |
12
+ | --- | --- |
13
+ | Independent cross-review lenses on branch diff | Acceptance against plan DoD + 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** |
16
+
17
+ ## QA modes
18
+
19
+ | `QA mode` | When | Behavior |
20
+ | --- | --- | --- |
21
+ | **`acceptance-only`** (default) | Most `mandatory` dispatches | Map DoD to QC/dev evidence; re-run only gaps listed below |
22
+ | **`full`** | High-risk ops, user override, or gaps below | Full verification commands for assigned scope |
23
+ | **`report-only`** | `QA gate: report-only` | Structured findings; no business-code edits unless allowed |
24
+
25
+ ## Evidence reuse first (`acceptance-only`)
26
+
27
+ When **`QA mode: acceptance-only`**:
28
+
29
+ 1. Read `qc-consolidated.md` (or `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
+ 3. Document in Completion Report **Validation**: which ACs are covered by reused evidence vs newly executed checks.
32
+
33
+ ## Mandatory full re-run
34
+
35
+ Run full verification (or escalate to **`QA mode: full`**) when **any** applies:
36
+
37
+ - Assignment says **`QA mode: full`**
38
+ - QC report lacks reproducible test evidence for behavior-critical ACs
39
+ - Post–fix-wave scope: `Review range` changed since QC consolidated
40
+ - UI observable gate required and QC/dev left no screenshot, preview URL, or equivalent
41
+ - Open R# marked resolved this round — verify each with targeted repro/tests
42
+
43
+ ## Unchanged hard duties
44
+
45
+ Before sign-off or Done recommendation:
46
+
47
+ - Validate phase-gate prerequisites and Assignment metadata alignment (`Review cwd`, `Working branch`, `plan_id`, `Review range`)
48
+ - Verify open R# status; close/archive per `mstar-plan-artifacts` when fixes confirmed
49
+ - Update plan task checkboxes for QA scope
50
+ - Return `Blocked` when checkout alignment or evidence gaps cannot be resolved
51
+
52
+ ## Report-only
53
+
54
+ Use template in `references/qa-engineer.md`. May skip QC tri only when no implementation/test/config artifacts were committed.
55
+
56
+ ## Related
57
+
58
+ - PM trigger matrix: `references/project-manager/qa-trigger-matrix.md`
59
+ - Checkout alignment: `mstar-branch-worktree` SKILL.md
60
+ - Residual lifecycle: `mstar-plan-artifacts/references/status-and-residuals.md`