@mstar-harness/opencode 0.7.9 → 1.0.0

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 (34) hide show
  1. package/harness-commands/iteration-drive.md +1 -1
  2. package/harness-skills/mstar-coding-behavior/SKILL.md +1 -0
  3. package/harness-skills/mstar-dispatch-gates/SKILL.md +19 -8
  4. package/harness-skills/mstar-harness-core/SKILL.md +7 -5
  5. package/harness-skills/mstar-host/SKILL.md +1 -1
  6. package/harness-skills/mstar-host/references/codex.md +1 -1
  7. package/harness-skills/mstar-host/references/cursor.md +18 -8
  8. package/harness-skills/mstar-host/references/parallel-dispatch.md +24 -6
  9. package/harness-skills/mstar-iteration/SKILL.md +17 -33
  10. package/harness-skills/mstar-phase-gates/SKILL.md +11 -46
  11. package/harness-skills/mstar-plan-artifacts/SKILL.md +1 -0
  12. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +16 -4
  13. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +3 -0
  14. package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
  15. package/harness-skills/mstar-plan-conventions/SKILL.md +6 -3
  16. package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +2 -1
  17. package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +1 -1
  18. package/harness-skills/mstar-review-qc/SKILL.md +5 -5
  19. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +41 -0
  20. package/harness-skills/mstar-roles/SKILL.md +5 -1
  21. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +5 -0
  22. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +33 -24
  23. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +2 -1
  24. package/harness-skills/mstar-roles/references/project-manager.md +12 -9
  25. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +5 -3
  26. package/harness-skills/mstar-sdd/SKILL.md +118 -0
  27. package/harness-skills/mstar-sdd/references/file-handoffs.md +73 -0
  28. package/harness-skills/mstar-sdd/references/implementer-prompt.md +53 -0
  29. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +51 -0
  30. package/harness-skills/mstar-sdd/scripts/review-package +43 -0
  31. package/harness-skills/mstar-sdd/scripts/sdd-workspace +26 -0
  32. package/harness-skills/mstar-sdd/scripts/task-brief +40 -0
  33. package/harness-skills/pm/SKILL.md +5 -4
  34. package/package.json +1 -1
@@ -1,22 +1,22 @@
1
1
  ---
2
2
  name: mstar-review-qc
3
- description: Morning Star QC/QA review baseline — tri-review workflow, checklists, report template (YAML frontmatter + Findings + Verdict), reports at `reports/<plan-id>/qc1.md` (no plan-id prefix in basename), targeted re-review after fixes, full-tri `qcN-rev2.md` exception, residual gate. Use when `@qc-specialist*` review, `@qa-engineer` verifies, or `@project-manager` dispatches/consolidates 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.
4
4
  ---
5
5
 
6
6
  ## Load order(必读顺序)
7
7
 
8
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` 为准**。
9
9
 
10
- **摘要**:`mstar-harness-core` — QC-QA 检出与并行门禁;本 skill — 审查清单、报告模板、verdict 与 residual 留档契约。
10
+ **摘要**:`mstar-harness-core` — QC-QA 检出与派发门禁;本 skill — 审查清单、报告模板、verdict 与 residual 留档契约。职责分层 → **`references/review-responsibility-boundaries.md`**。
11
11
 
12
12
  # Morning Star QC Review Baseline(QC 审查基线)
13
13
 
14
- 本 skill 定义所有 QC 审查员的共享基线。三份 QC 角色提示词在流程、门禁与要点上应与本 skill 一致且彼此对齐:**共用正文以`mstar-roles` skill `qc-specialist-shared`为准**;`-2` / `-3` 仅保留 frontmatter、开场白中的 Reviewer 编号、`## 并行审查时本 reviewer 的侧重` 一节,以及 Completion Report 模板里的 **Agent** 名。
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` 为准。
15
15
 
16
16
  ## 分派时机(与 plan / batch 对齐)
17
17
 
18
- - **默认**:`@project-manager` **该 plan 的实现范围已由 dev team 全部交付**、准备进入预合并门禁时,分派完整 QC 三审。**同一 `plan_id` 下多 batch 滚动实现时,不默认每 batch 跑一轮全套三审**(避免 `reports/<plan-id>/` 多套报告与范围串线);中间阶段靠自检与 PM 协调,**显式增量三审**须在 Assignment 写明(见 `mstar-plan-conventions` `references/plan-files-and-reports.md`「QC 三审触发时机」)。
19
- - **同仓多 worktree 并行开发**:一轮 QC 三审仍只对应 **一套** `Review cwd` + `Working branch` + `Review range` / `Diff basis`(三票逐字相同)。若成果曾分布在 **未合并** 的多条分支或多个 `HEAD`,PM **须先**完成 Git 归并到 **单一**待审分支再派 QC;**不得**指望 reviewer 自行在多个开发 worktree 之间拼凑审查范围。**推荐** PM 在并行开发开始前已建立 **plan 集成分支** 作为各轨 merge 靶(见 `mstar-branch-worktree` 同节 **「推荐默认编排:先建 plan 集成分支,再挂各 worktree」**)。细则见 `mstar-branch-worktree` **「多 worktree 并行开发与 QC / QA 的门禁衔接」**。
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`。
19
+ - **`Execution mode: inline`**:单席 `qc-specialist` `qc.md`(**N=1**),或按 hotfix 路由跳过。
20
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
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.
22
22
 
@@ -0,0 +1,41 @@
1
+ # Review responsibility boundaries (1.0.0+)
2
+
3
+ ## Four layers (orthogonal — do not collapse)
4
+
5
+ | Layer | Who | When | Scope | Input |
6
+ |-------|-----|------|-------|--------|
7
+ | **L1** Implementer | dev subagent | Per task | Write code + TDD evidence | `task-N-brief.md` |
8
+ | **L2** Task reviewer | PM-dispatched subagent (SDD) | Per task, after implementer | Spec + quality for **one task** | brief, report, **task-level** diff |
9
+ | **L3** Plan QC tri (cross-review) | `qc-specialist` + `qc-specialist-2` + `qc-specialist-3` | After **all** tasks on branch | Integration, regression, contract drift — **independent lenses, same branch diff** | Branch `review-package` MERGE_BASE..HEAD |
10
+ | **L4** QA | `qa-engineer` | After QC gate | Acceptance, residual, Done | QC reports + plan + `status.json` |
11
+
12
+ **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
+
14
+ **Non-SDD (`Execution mode: inline`):** hotfix / single-stream — plan QC may be **single-seat** (`qc.md`) or skipped per PM routing.
15
+
16
+ Per-task spec/quality is **done** in L2 before L3. QC seats do not re-derive each task from scratch; they cross-review the **whole branch** for gaps L2 could not see.
17
+
18
+ ## Plan QC tri (SDD mandatory)
19
+
20
+ - Assignment: **`QC mode: full tri-review`** (implicit when `Execution mode: sdd`; PM may state explicitly).
21
+ - **N=3** same dispatch message: QC#1 architecture/maintainability → `qc1.md`; QC#2 security/correctness → `qc2.md`; QC#3 performance/reliability → `qc3.md`.
22
+ - PM **`qc-consolidated.md`** — cross-review synthesis; PM gate input.
23
+ - Dispatch must include **Review package path** (branch diff file).
24
+ - **NEVER** substitute a single `qc-specialist` for L3 when SDD was used, unless user override: `QC mode: single — override: <reason>`.
25
+
26
+ ## Plan QC single-seat (inline / exception only)
27
+
28
+ - Report: `{PLAN_DIR}/reports/<plan-id>/qc.md`
29
+ - `Execution mode: inline` hotfix paths; or explicit override on SDD plan.
30
+ - `N=1`; no `qc-consolidated.md` required.
31
+
32
+ ## Fix waves
33
+
34
+ | After | Fix dispatch |
35
+ |-------|----------------|
36
+ | Task review Critical/Important | Task fix subagent → task re-review (L2) |
37
+ | Plan QC Critical/Important | **One** fix subagent with **complete** finding list → **targeted** QC re-review (listed seats) |
38
+
39
+ ## Minor findings
40
+
41
+ Task reviewer Minor → `{SDD_DIR}/progress.md` § Minor. Plan QC Minor → `qcN.md` + optional residual via PM.
@@ -60,13 +60,17 @@ Role `references/*.md` files include explicit **`NEVER`** sections (anti-recursi
60
60
 
61
61
  ### QC reviewer (`qc-specialist*` family)
62
62
 
63
+ **Default (SDD):** plan QC tri-review — `qc-specialist` / `qc-specialist-2` / `qc-specialist-3` → `qc1`…`qc3` + `qc-consolidated.md` when **`Execution mode: sdd`**.
64
+
65
+ **Exception (`inline` / hotfix):** single-seat → `qc.md` (`QC mode: single`).
66
+
63
67
  | role_id | reviewer_index | focus | report_suffix |
64
68
  | --- | --- | --- | --- |
65
69
  | `qc-specialist` | `1` | Architecture coherence and maintainability risk | `qc1` → `{PLAN_DIR}/reports/<plan-id>/qc1.md` |
66
70
  | `qc-specialist-2` | `2` | Security and correctness risk | `qc2` → `…/qc2.md` |
67
71
  | `qc-specialist-3` | `3` | Performance and reliability risk | `qc3` → `…/qc3.md` |
68
72
 
69
- PM consolidated: `…/qc-consolidated.md` (same folder; no `<plan-id>` basename prefix). Naming SSOT: `mstar-plan-artifacts/references/plan-files-and-reports.md`.
73
+ PM consolidated (tri mode): `…/qc-consolidated.md` (same folder; no `<plan-id>` basename prefix). Naming SSOT: `mstar-plan-artifacts/references/plan-files-and-reports.md`.
70
74
 
71
75
  ## Maintenance Rules
72
76
 
@@ -72,6 +72,11 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
72
72
 
73
73
  **Execute as**: <role-id>
74
74
  **Delegation**: forbidden | allowed (...)
75
+ **Execution mode**: sdd | inline | N/A
76
+ **SDD dir**: `{HARNESS_DIR}/sdd/<plan-id>/` | N/A
77
+ **Model tier**: fast | standard | capable | N/A
78
+ **QC mode**: full tri-review | single | N/A — **default `full tri-review` when `Execution mode: sdd`**; `single` only for `inline` / override
79
+ **Review package path**: <branch-review diff file> | N/A
75
80
  **Who runs this turn (executor lock)**: only `Execute as` role for this message
76
81
  **Primary**: <route type>
77
82
  **Task category**: `visual` | `deep` | `quick` | `logic` | `ops` | `docs`
@@ -2,33 +2,42 @@
2
2
 
3
3
  Use this reference when PM is dispatching QC, consolidating review verdicts, or managing residual findings lifecycle.
4
4
 
5
- ## QC Tri-Review Minimal Flow
6
-
7
- 0. Pre-dispatch read gate: read `mstar-review-qc` for this round.
8
- 1. Dispatch three independent QC assignments.
9
- 2. Collect reports and verify alignment fields:
10
- - `plan_id`
11
- - `Review range / Diff basis` use `metadata.target_branch` or PM-specified base ref for merge-base; **do not** assume `origin/main` in formal iterations (`mstar-iteration` §2.3)
12
- - `Review cwd / Worktree path`
13
- - `Working branch`
14
- 3. Verify runtime identity/model mapping for three distinct QC roles.
15
- 4. De-duplicate findings and resolve conflicts by evidence strength.
16
- 5. Emit one consolidated gate decision.
17
- 6. After dev fixes blocking items:
18
- - **Default**: **Targeted QC re-review** — dispatch only QC seats that **raised** blocking findings (consolidated table, R# `source` e.g. `QC-#2` → `qc-specialist-2`, or originating `qcN.md` / `F-###`). Assignment: `QC re-review: targeted — reviewers: <role-ids>`. Same `plan_id` + `Review range` / `Diff basis` unless PM narrows to fix commits (must still be copy-pasteable for QA).
19
- - Each targeted QC **edits the same** `qc1.md` / `qc2.md` / `qc3.md` (per seat); PM **edits the same** `qc-consolidated.md`. **Do not** re-dispatch all three by default.
20
- - **Exception**: `QC re-review: full tri-review` three parallel QC again + new `qc1-rev2.md` files (see `mstar-plan-artifacts/references/plan-files-and-reports.md`).
21
- - Then **QA** when the gate requires sign-off (same checkout fields as initial review).
5
+ **Layer SSOT (L1–L4):** `mstar-review-qc/references/review-responsibility-boundaries.md`. Dispatch mechanics → **`mstar-dispatch-gates`**; QC checklists / verdict → **`mstar-review-qc`**.
6
+
7
+ ## SDD path: mandatory plan QC tri-review (L3)
8
+
9
+ **When:** `Execution mode: sdd` **all** multi-task implement flows (single plan **or** `mstar-iteration` Phase 2).
10
+
11
+ **Per-task (L2):** task reviewer only**not** `qc-specialist`. One reviewer subagent per task (spec + quality on task diff).
12
+
13
+ **After all tasks (L3):** see **`mstar-review-qc/references/review-responsibility-boundaries.md`** · **`mstar-dispatch-gates`** (N=3 same message, branch review-package, `qc1`…`qc3` + consolidated). PM checklist:
14
+
15
+ 0. Pre-dispatch: read `mstar-review-qc`.
16
+ 1. `review-package MERGE_BASE HEAD` branch diff under `{SDD_DIR}` or PM path.
17
+ 2. Dispatch **three** QC seats in **one** message (**N=3**); alignment fields text-identical across reports and Assignment.
18
+ 3. PM writes `qc-consolidated.md`; after fixes targeted re-review (default) or `QC re-review: full tri-review` for new wave files.
19
+
20
+ **NEVER** end an SDD plan with only a single final `qc-specialist` unless user override: `QC mode: single — override: <reason>`.
21
+
22
+ ## Inline / hotfix: single-seat QC (exception)
23
+
24
+ **When:** `Execution mode: inline` or explicit hotfix routing.
25
+
26
+ 1. Branch review-package path on dispatch.
27
+ 2. **One** `qc-specialist` → `qc.md` (**N=1**).
28
+ 3. Targeted re-review updates same `qc.md`.
22
29
 
23
30
  ## QC / Residual NEVER (PM)
24
31
 
25
- - **NEVER** consolidate tri-review into `Approve` when any QC report’s `plan_id`, `Review range / Diff basis`, `Review cwd / Worktree path`, or `Working branch` **differs** from the PM Assignment text (character-level mismatch).
26
- - **NEVER** register or rewrite residual `severity` values outside the machine enum in `mstar-plan-artifacts`.
27
- - **NEVER** drop residual tracking to chat-only when `Approve with residuals` appliescanonical open list lives under `{HARNESS_DIR}/status.json` `residual_findings[<plan-id>]`.
28
- - **NEVER** archive or delete open residual rows from `status.json` without the documented close + `{HARNESS_DIR}/archived/residuals/` workflow.
29
- - **NEVER** treat “two of three QC reports arrived” as sufficient for a **full parallel tri-review wave**—missing reviewer => `Blocked` or explicit PM decision, not silent `Approve`.
30
- - **NEVER** re-dispatch all three QC reviewers after a routine fix round when only one or two seats had blocking findings—use **targeted re-review** unless Assignment declares **`QC re-review: full tri-review`**.
31
- - **NEVER** create `qc1-rev2.md` (etc.) for **targeted** re-review; update the original `qcN.md` in place.
32
+ - **NEVER** dispatch plan QC without a **branch** review-package file path (MERGE_BASE..HEAD).
33
+ - **NEVER** use single-seat `qc.md` after **`Execution mode: sdd`** without documented user override.
34
+ - **NEVER** dispatch only QC#2 and QC#3 while skipping QC#1 on initial SDD tri wave full **N=3** cross-review required (all three seats).
35
+ - **NEVER** consolidate tri-review into `Approve` when any QC report's alignment fields differ from Assignment (character-level).
36
+ - **NEVER** register or rewrite residual `severity` outside `mstar-plan-artifacts` machine enum.
37
+ - **NEVER** drop residual tracking to chat-only when `Approve with residuals` applies.
38
+ - **NEVER** treat "two of three QC reports arrived" as sufficient missing seat → `Blocked`.
39
+ - **NEVER** re-dispatch all three after routine fix when only one or two had blockers — **targeted re-review** unless `QC re-review: full tri-review`.
40
+ - **NEVER** create `qc1-rev2.md` for **targeted** re-review; update original `qcN.md` in place.
32
41
 
33
42
  ## Consolidated Decision Template
34
43
 
@@ -80,7 +80,8 @@ Document override as `Dev owner tie-break: single id — <reason>`.
80
80
  - `frontend-dev` + `fullstack-dev` can run in parallel once interface contract is clear.
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
- - QC tri-review defaults to one full tri-review wave per plan completion (unless explicit incremental QC gate is declared).
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
85
 
85
86
  ## Routing / allocation NEVER (PM)
86
87
 
@@ -7,7 +7,8 @@ Before any non-trivial PM action, read in order:
7
7
  3. Host adapter: `mstar-host` (detect host; Read `references/opencode.md`, `cursor.md`, or `codex.md`)
8
8
  4. `mstar-plan-conventions` (path discovery, init, Spec branch summary)
9
9
  5. `mstar-review-qc` (same coordination round, **before** any QC dispatch)
10
- 6. **On demand:** `mstar-branch-worktree` (parallel implement, QC/QA checkout); `mstar-plan-artifacts` (`status.json`, R#); `mstar-plan-artifacts` (InReview waves, reports naming)
10
+ 6. **`mstar-sdd`** when implement uses **`Execution mode: sdd`**
11
+ 7. **On demand:** `mstar-branch-worktree` (parallel implement, QC/QA checkout); `mstar-plan-artifacts` (`status.json`, R#); `mstar-plan-artifacts` (InReview waves, reports naming)
11
12
 
12
13
  **Not required:** `mstar-coding-behavior` (orchestration-only PM work).
13
14
 
@@ -56,11 +57,11 @@ Pick one `Primary` route per Assignment; attach additional gates as needed.
56
57
 
57
58
  | Task type | Default route |
58
59
  | --- | --- |
59
- | Large feature | `explore -> product-manager -> architect -> dev -> QC tri-review -> qa-engineer -> ops-engineer` |
60
- | Medium feature | `explore -> (architect optional) -> dev -> QC tri-review -> qa-engineer` |
61
- | Small feature | `dev -> QC tri-review -> qa-engineer` |
62
- | Bug fix | `explore -> RCA brief -> dev -> QC tri-review -> qa-engineer` |
63
- | High-ambiguity bug | `explore -> RCA -> (architect optional) -> dev -> QC tri-review -> qa-engineer` |
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` |
64
65
  | Hotfix | `single dev -> QC single-review -> qa-engineer fast verify` |
65
66
  | Product docs only | `product-manager` (QC may be skipped with explicit reason) |
66
67
  | Tech spec only | `architect` (QC may be skipped with explicit reason) |
@@ -78,7 +79,9 @@ Detailed conflict priority and dev allocation:
78
79
 
79
80
  ## Non-Bypass Constraints
80
81
 
81
- - Code-development plans require QC tri-review by default (hotfix single-review exception only).
82
+ - 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
+ - **`Execution mode: inline`**: hotfix single-seat QC (`qc.md`) or explicit skip rules unchanged.
84
+ - Multi-task implement defaults to **`Execution mode: sdd`** + `mstar-sdd`; hotfix may use `inline`.
82
85
  - Runtime/behavior change requires QA by default.
83
86
  - Report-only QA may skip QC tri-review only when no implementation/test/config artifact is committed.
84
87
  - Product-docs-only and tech-spec-only can skip QC tri-review only with explicit `QC: skipped — <reason>`.
@@ -176,7 +179,7 @@ Anti-patterns:
176
179
  - Q6: Is `Task category` aligned with route?
177
180
  - Q7: Is `quick` being misused to bypass prepare?
178
181
  - Q8: Is intention gate explicit before implement?
179
- - Q9: If QC tri-review, are alignment fields text-identical across three reviewers?
182
+ - Q9: For QC (single or tri), are alignment fields text-identical across reviewers and Assignment? SDD / tri: `Execution mode: sdd` or explicit `QC mode: full tri-review`; inline: `QC mode: single` or skip reason.
180
183
  - Q10: Is `Delegation` consistent with dispatch and worktree usage?
181
184
  - Q11: For non-trivial plan, is PM Task Board published with coverage?
182
185
  - Q12: In invoke-based hosts, were matching invokes actually issued?
@@ -285,7 +288,7 @@ Minimum invariants:
285
288
  - `references/project-manager/routing-and-dev-allocation.md`
286
289
  - Dispatch mechanics + anti-recursion + templates:
287
290
  - `references/project-manager/dispatch-and-assignment.md`
288
- - QC tri-review + residual lifecycle:
291
+ - QC (SDD → mandatory tri; inline → single) + residual lifecycle:
289
292
  - `references/project-manager/qc-and-residuals.md`
290
293
  - Plan/status initialization + lifecycle:
291
294
  - `references/project-manager/plan-management.md`
@@ -24,9 +24,11 @@ Behavior is shared; reviewer identity is parameterized.
24
24
 
25
25
  ## Role Mission
26
26
 
27
- You are QC reviewer #{reviewer_index}, dispatched by `project-manager`.
27
+ You are QC reviewer #{reviewer_index} (or the sole reviewer when `QC mode: single`), dispatched by `project-manager`.
28
28
  Your output is a structured QC report plus completion report.
29
29
 
30
+ **Default (SDD):** plan QC tri on whole-branch review-package (`QC mode: full tri-review`). **Exception:** `Execution mode: inline` → single-seat `qc.md`.
31
+
30
32
  ## Non-Recursive Dispatch Rule (Hard)
31
33
 
32
34
  **You ARE `{role_id}`, a QC reviewer — not a PM, not a dispatcher.**
@@ -42,7 +44,7 @@ Your Assignment's IDENTITY block at the top already established this. Reinforcin
42
44
 
43
45
  If any item below matches, **stop** and return `Blocked` to `project-manager` instead of improvising:
44
46
 
45
- - **NEVER** invoke another QC seat (`qc-specialist` / `qc-specialist-2` / `qc-specialist-3`) or `{role_id}` again, nor `qa-engineer` / dev / `architect` / `project-manager`, to split **this** review unless `Delegation: allowed (...)` lists them. PM launches **initial** tri-review with **three** separate assignments/invokes; **targeted re-review** lists only the seats PM assigned.
47
+ - **NEVER** invoke another QC seat or `{role_id}` again, nor `qa-engineer` / dev / `architect` / `project-manager`, to split **this** review unless `Delegation: allowed (...)` lists them. PM launches initial tri (**N=3**) when **`Execution mode: sdd`** or Assignment says **`QC mode: full tri-review`**. Single-seat only for `inline` / explicit override. **Targeted re-review** lists only seats PM assigned.
46
48
  - **NEVER** ask the user for permission to submit a report, present “notify PM?” choosers, or stall after a completed review—when requirements are met, emit **Completion Report v2** in the **same** assistant turn (with a real **Git** line when commits are required).
47
49
  - **NEVER** modify business implementation/tests, `{HARNESS_DIR}/status.json` residual lifecycle fields, `{HARNESS_DIR}/archived/`, or any path outside the host write whitelist for QC (typically `{PLAN_DIR}/reports/**/*.md` only).
48
50
  - **NEVER** `git add .` or stage unrelated paths when committing QC reports—stage **only** the report files you changed.
@@ -89,7 +91,7 @@ Use severity and formatting standards from `mstar-review-qc`; machine `severity`
89
91
 
90
92
  ## Report path (required)
91
93
 
92
- Write under **`{PLAN_DIR}/reports/<plan-id>/`** using basename **`{report_suffix}.md`** (e.g. `qc1.md`, `qc2.md`, `qc3.md`). **Do not** prefix the filename with `<plan-id>` — the folder already scopes the plan. PM consolidated report: **`qc-consolidated.md`** in the same directory.
94
+ Write under **`{PLAN_DIR}/reports/<plan-id>/`** using basename **`{report_suffix}.md`** (**SDD default / tri**: `qc1.md`, `qc2.md`, `qc3.md`; **inline exception**: `qc.md`). **Do not** prefix the filename with `<plan-id>` — the folder already scopes the plan. PM consolidated report (`qc-consolidated.md`) applies to **tri mode**; single-seat may use `qc.md` alone as gate input.
93
95
 
94
96
  ## Targeted re-review (same report file)
95
97
 
@@ -0,0 +1,118 @@
1
+ ---
2
+ name: mstar-sdd
3
+ description: Morning Star subagent-driven development (SDD) — file handoff, per-task implementer + task reviewer (L2), progress ledger, branch review-package for plan QC tri (L3). **Must** Read when project-manager runs `Execution mode: sdd` (multi-task plan, single-plan, or iteration Phase 2), dispatches SDD implementer/reviewer subagents, or prepares review-package paths. Leaf implementer/reviewer subagents skip PM sections via SUBAGENT-STOP in dispatch prompts.
4
+ ---
5
+
6
+ ## Load order
7
+
8
+ **Before first Read:** `mstar-harness-core` → `mstar-dispatch-gates`. Path symbols → **`mstar-plan-conventions`** (`{SDD_DIR}`). Plan QC after SDD → **`mstar-review-qc`**. On conflict, **`mstar-harness-core` wins**.
9
+
10
+ <SUBAGENT-STOP>
11
+ If you were dispatched as an SDD implementer or task reviewer, skip PM orchestration sections. Follow your dispatch prompt only.
12
+ </SUBAGENT-STOP>
13
+
14
+ ## When to use
15
+
16
+ - Plan locked; tasks mostly independent; PM orchestrates in-session
17
+ - Assignment has **`Execution mode: sdd`**
18
+ - **Not** for hotfix inline work (`Execution mode: inline`) or leaf self-dispatch
19
+
20
+ ## Core principle
21
+
22
+ Fresh subagent per task + task review (spec + quality) + plan-level QC on whole branch = quality with isolated context.
23
+
24
+ **Narration:** at most one short line between tool calls — ledger and file paths carry the record.
25
+
26
+ **Continuous execution:** do not check in with the human between tasks. Stop only for BLOCKED, genuine ambiguity, or all tasks complete.
27
+
28
+ ## Pre-flight plan scan
29
+
30
+ Before Task 1, scan plan once for:
31
+
32
+ - tasks contradicting Global Constraints
33
+ - plan-mandated items that review rubric would flag as defects
34
+
35
+ Batch all findings for the human in one message. If clean, proceed silently.
36
+
37
+ ## Per-task loop (PM only)
38
+
39
+ 1. Record `BASE_SHA` (never use `HEAD~1` later)
40
+ 2. `sdd-workspace <plan-id>` → `SDD_DIR`
41
+ 3. `task-brief <plan> N` → brief file
42
+ 4. Dispatch implementer (brief + report paths, model tier) — templates: `references/implementer-prompt.md`
43
+ 5. On `DONE`: `review-package BASE HEAD` → diff file
44
+ 6. Dispatch task reviewer (brief, report, diff, Global Constraints) — `references/task-reviewer-prompt.md`
45
+ 7. Fix loop for Critical/Important; re-review until approved
46
+ 8. Append `progress.md`; update `status.json` `task_commits[]` if used
47
+ 9. Next task
48
+
49
+ **Never** dispatch multiple implementers in parallel (write conflicts).
50
+
51
+ Detail: **`references/file-handoffs.md`**.
52
+
53
+ ## Implementer statuses
54
+
55
+ | Status | PM action |
56
+ |--------|-----------|
57
+ | DONE | review-package → task reviewer |
58
+ | DONE_WITH_CONCERNS | read concerns; fix scope issues before review |
59
+ | NEEDS_CONTEXT | provide context; re-dispatch |
60
+ | BLOCKED | more context, higher tier, split task, or escalate human — **never** same-model blind retry |
61
+
62
+ ## Reviewer ⚠️ items
63
+
64
+ `⚠️ Cannot verify from diff` does not block other findings. PM must resolve each before task complete.
65
+
66
+ ## Model tier
67
+
68
+ | Tier | Use |
69
+ |------|-----|
70
+ | fast | Transcription (complete code in plan); 1–2 file mechanical |
71
+ | standard | Prose implementer; task reviewer (floor) |
72
+ | capable | Integration judgment; plan QC on large branch diff |
73
+
74
+ **Turn count beats token price:** use `standard` floor for reviewers and prose implementers. **Always name model on dispatch** — omitted model inherits session default (often most expensive).
75
+
76
+ Host mapping → **`mstar-host`** references (`model` / Task field).
77
+
78
+ ## After all tasks
79
+
80
+ 1. `review-package MERGE_BASE HEAD` → branch diff in `{SDD_DIR}`
81
+ 2. PM dispatches **plan QC tri-review (L3)** — **`QC mode: full tri-review`**, **N=3** — with branch review-package path → **`mstar-review-qc`** · **`mstar-dispatch-gates`**. Layer SSOT → **`mstar-review-qc/references/review-responsibility-boundaries.md`**. PM writes `qc-consolidated.md`. **Mandatory whenever `Execution mode: sdd`** (single-plan or iteration).
82
+ 3. Critical/Important QC findings → **one** fix dispatch (full list), then targeted re-review
83
+ 4. QA gate → **`mstar-review-qc`** / `mstar-harness-core` Done rules
84
+
85
+ ## Progress ledger
86
+
87
+ At start: `cat {SDD_DIR}/progress.md`. Tasks marked complete are DONE — do not re-dispatch after compaction.
88
+
89
+ Append on clean review: `Task N: complete (<base>..<head>, review clean)`.
90
+
91
+ Minor findings → `## Minor (for plan QC)` section in same file.
92
+
93
+ ## Red flags (NEVER)
94
+
95
+ - Parallel implementer dispatches
96
+ - Paste plan, diffs, or task history into dispatch prompts
97
+ - Dispatch reviewer without diff file
98
+ - `HEAD~1` as review BASE
99
+ - Pre-judge reviewer ("do not flag", "at most Minor")
100
+ - Skip task review or accept missing verdict
101
+ - Re-dispatch tasks listed complete in ledger
102
+ - PM thread implements instead of subagent dispatch
103
+
104
+ ## Scripts
105
+
106
+ From repo: `skills/mstar-sdd/scripts/` (bundled in OpenCode as `harness-skills/mstar-sdd/scripts/`).
107
+
108
+ | Script | Usage |
109
+ |--------|--------|
110
+ | `sdd-workspace` | `PLAN_ID` → creates `{SDD_DIR}`, prints path |
111
+ | `task-brief` | `PLAN_FILE TASK_N [OUTFILE]` |
112
+ | `review-package` | `BASE HEAD [OUTFILE]` |
113
+
114
+ ## References
115
+
116
+ - `references/file-handoffs.md` — paths and fix-loop evidence
117
+ - `references/implementer-prompt.md`
118
+ - `references/task-reviewer-prompt.md`
@@ -0,0 +1,73 @@
1
+ # File handoffs (Morning Star SDD)
2
+
3
+ PM and subagents move artifacts as **files**, not pasted text. Pasted content stays in PM context for every later turn.
4
+
5
+ ## Before implementer dispatch
6
+
7
+ 1. `export SDD_DIR=$(skills/mstar-sdd/scripts/sdd-workspace <plan-id>)`
8
+ 2. `skills/mstar-sdd/scripts/task-brief <plan-file> <N> "$SDD_DIR/task-N-brief.md"`
9
+ 3. Record `BASE_SHA` (`git rev-parse HEAD` before dispatch).
10
+ 4. Dispatch implementer with:
11
+ - One line scene-setting (where task fits)
12
+ - Brief path: read first — verbatim requirements
13
+ - Interfaces / decisions brief cannot know
14
+ - Report path: `$SDD_DIR/task-N-report.md`
15
+ - `Model tier` → host-specific model (required)
16
+
17
+ ## Implementer report file
18
+
19
+ Implementer writes full report to `task-N-report.md`. Return to PM only:
20
+
21
+ - Status: `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED`
22
+ - Commits (SHAs)
23
+ - One-line test summary
24
+ - Concerns (if any)
25
+
26
+ ## After implementer DONE
27
+
28
+ 1. `HEAD_SHA=$(git rev-parse HEAD)`
29
+ 2. `skills/mstar-sdd/scripts/review-package "$BASE_SHA" "$HEAD_SHA" "$SDD_DIR/review-....diff"`
30
+ 3. Dispatch task reviewer with: brief path, report path, diff path, Global Constraints (verbatim from plan).
31
+
32
+ **Never use `HEAD~1` as BASE** — multi-commit tasks truncate.
33
+
34
+ ## Fix loop
35
+
36
+ Fix subagent appends to same `task-N-report.md` with test evidence:
37
+
38
+ - Covering test file(s)
39
+ - Command run
40
+ - Output (pristine — warnings are findings)
41
+
42
+ Re-dispatch reviewer only when all three are present.
43
+
44
+ ## Progress ledger
45
+
46
+ On clean task review, append to `$SDD_DIR/progress.md`:
47
+
48
+ ```text
49
+ Task N: complete (<base>..<head>, review clean)
50
+ ```
51
+
52
+ Minor findings: append under `## Minor (for plan QC)` in same file.
53
+
54
+ ## Plan-level QC package
55
+
56
+ After all tasks:
57
+
58
+ ```bash
59
+ MERGE_BASE=$(git merge-base <target-branch> HEAD)
60
+ skills/mstar-sdd/scripts/review-package "$MERGE_BASE" HEAD "$SDD_DIR/branch-review-....diff"
61
+ ```
62
+
63
+ Pass **branch** diff path to QC dispatch — not task-level diffs.
64
+
65
+ ## PM context hygiene
66
+
67
+ Do not paste:
68
+
69
+ - Full plan text
70
+ - Prior task summaries ("state after Tasks 1-3")
71
+ - Full diff content
72
+
73
+ Fresh subagent gets: brief + interfaces + constraints + file paths only.
@@ -0,0 +1,53 @@
1
+ # Implementer subagent prompt template
2
+
3
+ Use when PM dispatches an SDD implementer (`mstar-sdd`).
4
+
5
+ ```
6
+ Task / subagent:
7
+ description: "SDD implement Task N: <name>"
8
+ model: [REQUIRED — per Model tier in Assignment and mstar-sdd SKILL]
9
+ prompt: |
10
+ <SUBAGENT-STOP> Skip PM orchestration skills. You are a leaf implementer.</SUBAGENT-STOP>
11
+
12
+ You are implementing Task N: <name>
13
+
14
+ ## Scene
15
+
16
+ [One line: where this task fits in the plan]
17
+
18
+ ## Requirements
19
+
20
+ Read first — this is your spec (verbatim values): [BRIEF_FILE]
21
+
22
+ ## Context not in the brief
23
+
24
+ [Interfaces from earlier tasks, PM resolutions]
25
+
26
+ ## Report file
27
+
28
+ Write your full report to: [REPORT_FILE]
29
+
30
+ ## Before you begin
31
+
32
+ Ask questions now about requirements, approach, or dependencies.
33
+
34
+ ## Your job
35
+
36
+ 1. Implement exactly what the brief specifies
37
+ 2. Run tests (TDD if brief requires)
38
+ 3. Commit on Working branch
39
+ 4. Self-review
40
+ 5. Write report file; return short summary only
41
+
42
+ ## When stuck
43
+
44
+ Report BLOCKED or NEEDS_CONTEXT — never guess.
45
+
46
+ ## Report format (in file)
47
+
48
+ - Status: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
49
+ - Implemented / attempted
50
+ - Tests: command, output, red/green evidence if TDD
51
+ - Files changed
52
+ - Self-review notes
53
+ ```
@@ -0,0 +1,51 @@
1
+ # Task reviewer subagent prompt template
2
+
3
+ One reviewer per task: spec compliance + code quality (`mstar-sdd`).
4
+
5
+ ```
6
+ Task / subagent:
7
+ description: "SDD review Task N (spec + quality)"
8
+ model: [REQUIRED — standard tier default; capable if diff is large/subtle]
9
+ prompt: |
10
+ <SUBAGENT-STOP> Skip PM orchestration. Read-only review.</SUBAGENT-STOP>
11
+
12
+ Review one task implementation: spec compliance first, then quality.
13
+ Task-scoped gate — plan-level QC comes later on the whole branch.
14
+
15
+ ## What was requested
16
+
17
+ Brief: [BRIEF_FILE]
18
+
19
+ Global constraints (verbatim):
20
+ [GLOBAL_CONSTRAINTS]
21
+
22
+ ## Implementer report
23
+
24
+ [REPORT_FILE] — treat claims as unverified until checked against diff.
25
+
26
+ ## Diff
27
+
28
+ Base: [BASE_SHA]
29
+ Head: [HEAD_SHA]
30
+ Diff file: [DIFF_FILE]
31
+
32
+ Read the diff file once. Do not re-run git. Do not mutate checkout.
33
+ Do not re-run full test suite — trust implementer evidence unless a
34
+ specific doubt needs one focused test.
35
+
36
+ ## Output
37
+
38
+ ### Spec Compliance
39
+ - ✅ Spec compliant | ❌ Issues found (file:line)
40
+ - ⚠️ Cannot verify from diff: [items for PM to check]
41
+
42
+ ### Strengths
43
+
44
+ ### Issues
45
+ #### Critical | Important | Minor
46
+
47
+ ### Assessment
48
+ **Task quality:** Approved | Needs fixes
49
+ ```
50
+
51
+ Re-review after fixes covers both verdicts. PM resolves all ⚠️ items before marking task complete.
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env bash
2
+ # Write commit list, stat summary, and diff to a file for reviewer Read.
3
+ # Usage: review-package BASE HEAD [OUTFILE]
4
+ # Never use HEAD~1 as BASE for multi-commit tasks.
5
+ set -euo pipefail
6
+
7
+ if [ $# -lt 2 ] || [ $# -gt 3 ]; then
8
+ echo "usage: review-package BASE HEAD [OUTFILE]" >&2
9
+ exit 2
10
+ fi
11
+
12
+ base=$1
13
+ head=$2
14
+
15
+ git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
16
+ git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
17
+
18
+ if [ $# -eq 3 ]; then
19
+ out=$3
20
+ else
21
+ if [ -z "${SDD_DIR:-}" ]; then
22
+ echo "review-package: set SDD_DIR or pass OUTFILE" >&2
23
+ exit 2
24
+ fi
25
+ mkdir -p "$SDD_DIR"
26
+ out="$SDD_DIR/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
27
+ fi
28
+
29
+ {
30
+ echo "# Review package: ${base}..${head}"
31
+ echo
32
+ echo "## Commits"
33
+ git log --oneline "${base}..${head}"
34
+ echo
35
+ echo "## Files changed"
36
+ git diff --stat "${base}..${head}"
37
+ echo
38
+ echo "## Diff"
39
+ git diff -U10 "${base}..${head}"
40
+ } > "$out"
41
+
42
+ commits=$(git rev-list --count "${base}..${head}" 2>/dev/null || echo 0)
43
+ echo "wrote ${out}: ${commits} commit(s), $(wc -c < "$out" | tr -d ' ') bytes"