@mstar-harness/opencode 0.7.9 → 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/harness-commands/iteration-drive.md +17 -7
  2. package/harness-commands/iteration-start.md +5 -6
  3. package/harness-commands/mstar-bootstrap.md +4 -5
  4. package/harness-skills/mstar-coding-behavior/SKILL.md +1 -0
  5. package/harness-skills/mstar-dispatch-gates/SKILL.md +20 -8
  6. package/harness-skills/mstar-harness-core/SKILL.md +7 -5
  7. package/harness-skills/mstar-host/SKILL.md +1 -1
  8. package/harness-skills/mstar-host/references/codex.md +2 -2
  9. package/harness-skills/mstar-host/references/cursor.md +35 -9
  10. package/harness-skills/mstar-host/references/opencode.md +3 -0
  11. package/harness-skills/mstar-host/references/parallel-dispatch.md +24 -6
  12. package/harness-skills/mstar-iteration/SKILL.md +40 -34
  13. package/harness-skills/mstar-phase-gates/SKILL.md +11 -46
  14. package/harness-skills/mstar-plan-artifacts/SKILL.md +1 -0
  15. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +16 -4
  16. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +3 -0
  17. package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
  18. package/harness-skills/mstar-plan-conventions/SKILL.md +6 -3
  19. package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +2 -1
  20. package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +1 -1
  21. package/harness-skills/mstar-review-qc/SKILL.md +5 -5
  22. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +41 -0
  23. package/harness-skills/mstar-roles/SKILL.md +5 -1
  24. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +20 -0
  25. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +33 -24
  26. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +2 -1
  27. package/harness-skills/mstar-roles/references/project-manager.md +20 -11
  28. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +5 -3
  29. package/harness-skills/mstar-sdd/SKILL.md +126 -0
  30. package/harness-skills/mstar-sdd/references/file-handoffs.md +76 -0
  31. package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
  32. package/harness-skills/mstar-sdd/references/implementer-prompt.md +55 -0
  33. package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
  34. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +51 -0
  35. package/harness-skills/mstar-sdd/scripts/review-package +43 -0
  36. package/harness-skills/mstar-sdd/scripts/sdd-workspace +26 -0
  37. package/harness-skills/mstar-sdd/scripts/task-brief +40 -0
  38. package/harness-skills/pm/SKILL.md +20 -44
  39. package/package.json +1 -1
@@ -30,6 +30,7 @@ Phase 2: Autonomous Execute → Phase 3: iteration-close → Phase 4: Create
30
30
  | 禁止(PM 线程) | 必须 |
31
31
  |-----------------|------|
32
32
  | Write/Edit/Shell 产品代码、写测试、跑 QC 审查(Phase 2) | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
33
+ | **多 task plan 用 inline 大包派发**(整份 plan / T1–Tn 贴进一个 dev Assignment) | **SDD**:`mstar-sdd` per-task 循环 — `task-brief` → implementer → `review-package` → task reviewer → `progress.md` |
33
34
  | 只写 Assignment 就进入下一 gate | 同轮 dispatch:`Subagent invokes issued: N`(N = Assignment 条数) |
34
35
  | 最后一个 plan `Done` 后直接开 PR / 汇报结束 | **Phase 3 → 4 → 5** 顺序执行 |
35
36
  | Phase 4 开 PR 后停止 | Phase 5 loop 至 merge-ready;**禁止**未过 §5.5 就结束会话 |
@@ -50,11 +51,12 @@ Phase 2: Autonomous Execute → Phase 3: iteration-close → Phase 4: Create
50
51
 
51
52
  1. `mstar-harness-core`
52
53
  2. `mstar-roles` → `references/project-manager.md`
53
- 3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**(PM role identity + dispatch-first rules
54
- 4. `mstar-iteration` **§ Phase 2–5**(§3 close gate;§4 PR delivery;§5 merge-ready loop)
55
- 5. `mstar-compound` Phase 3 §3.2 前加载(含 Phase 6 索引登记)
56
- 6. `mstar-dispatch-gates` + host reference
57
- 7. `mstar-plan-artifacts`, `mstar-plan-conventions`, `mstar-branch-worktree`
54
+ 3. `mstar-iteration` → **§ Phase 2–5**(§3 close gate;§4 PR delivery;§5 merge-ready loop
55
+ 4. `mstar-compound` Phase 3 §3.2 前加载(含 Phase 6 索引登记)
56
+ 5. `mstar-dispatch-gates` + host reference
57
+ 6. **`mstar-sdd`** — **before first implement dispatch** in Phase 2(per-task loop SSOT;多 task plan 默认 `Execution mode: sdd`)
58
+ 7. `mstar-review-qc` — before first QC dispatch in Phase 2
59
+ 8. `mstar-plan-artifacts`, `mstar-plan-conventions`, `mstar-branch-worktree`
58
60
 
59
61
  ## Phase 2: Autonomous Execute
60
62
 
@@ -74,9 +76,17 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
74
76
  4. **Integration branch** (§ 2.3) — `git checkout -b <spec_integration_branch> <iteration_base_branch>` when creating(**not** implicit `main`)
75
77
  5. **Per-plan loop** (§ 2.4) — for each non-`Done` plan:
76
78
  - Create plan feature branch from integration
77
- - Dispatch implement subagents (dispatch-first)
79
+ - **SDD implement**(默认 `Execution mode: sdd`;`mstar-sdd` 已载入)— per task **串行**:
80
+ 1. `sdd-workspace <plan-id>` → `{SDD_DIR}`
81
+ 2. `task-brief <plan> N` → `{SDD_DIR}/task-N-brief.md`
82
+ 3. Dispatch **one** implementer subagent(brief + report 路径;`references/implementer-prompt.md` 或 sticky 时 `implementer-continuation-prompt.md`)
83
+ 4. `review-package BASE HEAD` → task diff
84
+ 5. Dispatch **one** task reviewer subagent
85
+ 6. Append `{SDD_DIR}/progress.md`;更新 `status.json` `task_commits[]`(如使用)
86
+ 7. Next task — **never** parallel implementers;同 plan 同 dev 可用 **`SDD implementer session: sticky`**(`mstar-sdd/references/sticky-implementer-session.md`)
87
+ - **禁止**:把整份 plan 或 T1–Tn 全文贴进 implement dispatch;文件交接 SSOT → `mstar-sdd/references/file-handoffs.md`
78
88
  - Update `status.json` + main plan after each Completion Report v2
79
- - QC tri-review + QA per `mstar-review-qc`
89
+ - QC **full tri-review** (`QC mode: full tri-review`, **N=3**, `mstar-review-qc`) + branch `review-package` + QA per plan
80
90
  - Merge plan branch → integration branch
81
91
  - Cross-plan progress sync → compass
82
92
  - Next plan
@@ -28,12 +28,11 @@ Detailed workflow → **`mstar-iteration` § Phase 1: iteration-start**(含 §
28
28
 
29
29
  1. `mstar-harness-core`
30
30
  2. `mstar-roles` → `references/project-manager.md`
31
- 3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**
32
- 4. `mstar-iteration` → **§ Phase 1: iteration-start**(迭代范围、compass 模板、§1.6 Review & Edit chain、状态初始化)
33
- 5. `mstar-dispatch-gates`
34
- 6. `mstar-phase-gates` → Prepare(specify → clarify → plan
35
- 7. `mstar-plan-conventions`, `mstar-plan-artifacts`
36
- 8. `mstar-host` → active host reference(invoke 能力)
31
+ 3. `mstar-iteration` → **§ Phase 1: iteration-start**(迭代范围、compass 模板、§1.6 Review & Edit chain、状态初始化)
32
+ 4. `mstar-dispatch-gates`
33
+ 5. `mstar-phase-gates` → Prepare(specify → clarify → plan)
34
+ 6. `mstar-plan-conventions`, `mstar-plan-artifacts`
35
+ 7. `mstar-host` → active host reference(invoke 能力)
37
36
 
38
37
  ## 1. Research
39
38
 
@@ -14,11 +14,10 @@ Distill a coherent knowledge baseline from the current project — useful when t
14
14
 
15
15
  1. `mstar-harness-core`
16
16
  2. `mstar-roles` → `references/project-manager.md`
17
- 3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**
18
- 4. `mstar-plan-conventions`(路径符号)
19
- 5. `mstar-strategy` → **§ STRATEGY.md structure** + **§ Creating STRATEGY.md**
20
- 6. `mstar-compound` → **references/concepts-vocabulary.md**(CONCEPTS.md 规则)
21
- 7. `mstar-compound-refresh` → **§ Core rules**(知识维护基线)
17
+ 3. `mstar-plan-conventions`(路径符号)
18
+ 4. `mstar-strategy` → **§ STRATEGY.md structure** + **§ Creating STRATEGY.md**
19
+ 5. `mstar-compound` → **references/concepts-vocabulary.md**(CONCEPTS.md 规则)
20
+ 6. `mstar-compound-refresh` → **§ Core rules**(知识维护基线)
22
21
 
23
22
  ## Phase 1: Survey — understand what exists
24
23
 
@@ -202,6 +202,7 @@ Core idea: how you communicate about code matters as much as the code itself.
202
202
 
203
203
  ## Integration Notes
204
204
 
205
+ - **SDD implementer reports** (`mstar-sdd`): completion evidence must include TDD triple — test file(s), command, output — in `task-N-report.md`; fix rounds add the same for new/changed tests.
205
206
  - This skill must not be used to bypass:
206
207
  - branch constraints,
207
208
  - QC/QA gate definitions,
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-dispatch-gates
3
- description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、同条消息 N invoke、QC 三审禁止串行 rollout、Assignment 文案≠派发(invoke 条数须对齐)、未齐不发(emit zero until batch-ready)。**必须**在 `project-manager` 每轮派发、QC 三审并发、双轨 implement、或 leaf 角色疑惑能否 Task 时 Read;所有非 PM 承接方动手前必读反递归与自检。同仓 worktree QC 检出对齐见 `mstar-branch-worktree`。宿主细则见 `mstar-host`(`references/parallel-dispatch.md` 与各宿主 reference)。
3
+ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、SDD implement 串行派发、**SDD 路径 plan QC 强制 tri-review(N=3)**、inline 单席 QC 例外、Assignment 文案≠派发、未齐不发。`project-manager` 派发时必读;leaf 动手前必读反递归。worktree `mstar-branch-worktree`;SDD `mstar-sdd`;宿主见 `mstar-host`。
4
4
  ---
5
5
 
6
6
  ## Load order(必读顺序)
@@ -54,8 +54,9 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
54
54
  当 PM 声明「并发分派」时,须同时满足**文案并发**与**工具并发**:
55
55
 
56
56
  - **工具并发**:同一调度轮次内,多个 subagent 调用须在**同一条 assistant 消息**里一次性发出(宿主允许时)。
57
- - **QC 三审硬门禁(initial wave)**:`qc-specialist` / `qc-specialist-2` / `qc-specialist-3` 须**同一条消息**全部发起(**N=3**);只发其中一个 = **`dispatch incomplete`**,不得写「三审已并行启动」。
58
- - **QC targeted re-review**:Assignment **`QC re-review: targetedreviewers: …`** 时,**N** = 所列席位数(1–3),仍须**同一条消息**发满 **N**;不得默认补满三人。
57
+ - **QC tri-review(SDD 强制)**:`Execution mode: sdd` 且全部 task 完成后 → `qc-specialist` / `qc-specialist-2` / `qc-specialist-3` 同条消息 **N=3**(`qc1`…`qc3` + `qc-consolidated.md`)。Assignment 须含 branch **review-package** 路径。适用于**单 plan 与 iteration**。
58
+ - **QC 单席(例外)**:`Execution mode: inline`(hotfix 等),或 Assignment 显式 `QC mode: single` / `QC mode: single override: <reason>` `qc-specialist` ×1,`N=1`,`qc.md`。
59
+ - **QC targeted re-review**:Assignment 含 **`QC re-review: targeted — reviewers: …`** 时,**N** = 所列席位数(1–3),同条消息发满 **N**。
59
60
  - **先自检再发送**:发送前核对「Assignment 条数 = 本条消息中的实际 **派发** 调用条数」。
60
61
  - **前置步骤与派发回合分离(防串行 rollout)**:为派发准备的 **`bash` / `read` / `glob` / `grep`**(如 `merge-base`、`Review range`、`git rev-parse`)**不计入** `N` 次派发;可在上一条仅含准备的消息完成。准备完成后,**下一条派发消息**须**一次性**含 **`N` 次** Task / subagent invoke。**禁止**先发 `1` 次、等返回再补发其余 `N-1` 次。
61
62
  - **未齐不发(emit zero until batch-ready)**:需并发 `N≥2` 而当前只能发 `1` 条时,本条应发 **`0` 条派发 invoke`**(可继续 read/bash 补齐),**禁止**「先发一个顶一下」;`N` 份 payload 就绪后**单次消息发满 `N`**。见 **`mstar-host`** → `references/parallel-dispatch.md`(具备 invoke / Task / subagent 工具的宿主共用)。
@@ -64,11 +65,21 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
64
65
 
65
66
  在支持具名角色 / Task 的宿主上,`## Assignment` **正文不会**拉起子会话。PM 须在**同一条 assistant 消息**(或宿主等价机制)发出与 Assignment **条数一致**的 invoke / Task;仅打印 Markdown = **分派未完成**。**几条 Assignment ⇒ 几次 tool 调用**(默认同消息并行)。
66
67
 
68
+ ## SDD implement 波次(PM only)
69
+
70
+ When **`Execution mode: sdd`** (`mstar-sdd`):
71
+
72
+ - **串行**:one implementer at a time; one **fresh** task reviewer after each — **never** parallel implementers (write conflicts).
73
+ - **`SDD implementer session: sticky`**:same implementer subagent may **resume** across tasks when host supports it; **reviewers never resume** — see **`mstar-sdd/references/sticky-implementer-session.md`**.
74
+ - File handoffs only — no pasted plan/diff/history in dispatch prompts.
75
+ - Record per-task BASE SHA; use `review-package` for diffs — **never `HEAD~1`**.
76
+ - After all tasks: branch `review-package` → **mandatory tri-review N=3** when `Execution mode: sdd`; **N=1** only for `inline` / explicit single override.
77
+
67
78
  ## 并行规则(摘要)
68
79
 
69
- - 独立模块可并行;避免写操作归属重叠;跨领域变更先锁接口契约再并行编码。
70
- - **QC 三审**在 feature 开发完成后执行;三名 reviewer 共用同一组 `Review cwd` / `Working branch` / `plan_id` / `Review range` / `Diff basis`(**`mstar-branch-worktree`**)。
71
- - **同一 plan 多 batch**:默认整 plan 交付完成跑一轮完整三审;**fix 后默认 targeted re-review**(N = 被指派的 QC 席位数,同条消息发满 N);**仅** Assignment 写明 **`QC re-review: full tri-review`** 时复跑三审且用新文件名(**`mstar-plan-artifacts/references/plan-files-and-reports.md`**、**`mstar-review-qc`**)。
80
+ - 独立模块可并行 **implement 轨道**(不同 dev Assignment);**SDD 单 plan 内 task** 仍串行。
81
+ - **Plan QC tri** after SDD task loop(`Execution mode: sdd`);**单席**仅 `inline` / hotfix。共用 `Review cwd` / `Working branch` / `plan_id` / `Review range`(**`mstar-branch-worktree`**)。
82
+ - **Tri 同消息规则**:plan QC tri(SDD Assignment 显式 `QC mode: full tri-review`)时三席 **同一条消息**、**同一套** scope 字段。
72
83
 
73
84
  ## Specialist review-and-edit dispatch
74
85
 
@@ -83,8 +94,9 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
83
94
 
84
95
  ## 反模式(派发)
85
96
 
86
- - QC 三审拆在多条消息或等 #1 返回再发 #2/#3。
87
- - 仅 1 次 invoke 却声称「并行三审已启动」。
97
+ - QC 三审拆在多条消息(tri 模式)或单席却未附 review-package 路径。
98
+ - 仅 1 次 invoke 却声称「tri-review 已并行启动」(tri 模式 N=3)。
99
+ - SDD 并行 implementer dispatch。
88
100
  - 递归同角色 subagent;把 Handoff / 多轨编排措辞当 invoke。
89
101
  - Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
90
102
  - Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
@@ -30,7 +30,7 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
30
30
 
31
31
  ## 最小交付循环
32
32
 
33
- **per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement` QC 三审 + QA → Done。阶段细则 → **`mstar-phase-gates`**。
33
+ **per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement`(多 task 默认 SDD)→ plan QC tri + QA → Done(`inline` 单席例外)。阶段细则 → **`mstar-phase-gates`**。
34
34
 
35
35
  **迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close → PR delivery → PR merge-ready loop`。细则 → **`mstar-iteration`**。
36
36
 
@@ -39,11 +39,11 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
39
39
  | 角色 | 始终 | 按任务追加(典型) |
40
40
  |------|------|-------------------|
41
41
  | **全部** | 本 skill | — |
42
- | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-roles`;派 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` |
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
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 触发) |
44
44
  | **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
45
45
 
46
- Routing eval(Cursor 维护)→ `.cursor/skills/mstar-routing-eval/`,**非**运行时必读。
46
+ Routing eval(Cursor 插件内回归用,**非**运行时必读)→ `.cursor/skills/mstar-routing-eval/`。
47
47
 
48
48
  ## 状态机
49
49
 
@@ -88,7 +88,8 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
88
88
  | `mstar-harness-core` | 本文件:入口、状态机、Task category、explore、索引、护栏 |
89
89
  | `mstar-phase-gates` | per-plan 双阶段门禁:Prepare/Execute、意图门禁、hotfix、可验证编辑 |
90
90
  | `mstar-iteration` | 迭代管理:Phase 1–5(start / Autonomous Execute / iteration-close / PR delivery / PR merge-ready loop) |
91
- | `mstar-dispatch-gates` | 派发、Delegation、反递归、并行 invoke、QC 同消息三审 |
91
+ | `mstar-dispatch-gates` | 派发、Delegation、反递归、SDD 串行、SDD 路径 plan QC 强制 tri |
92
+ | `mstar-sdd` | Subagent-driven development:file handoff、per-task review、ledger |
92
93
  | `mstar-branch-worktree` | 功能分支、worktree、QC/QA 检出对齐 |
93
94
  | `mstar-plan-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec 分支模型摘要、产物路径 SSOT |
94
95
  | `mstar-plan-artifacts` | 主 plan、reports、`status.json`、residual、knowledge、Done 归档 |
@@ -135,7 +136,8 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
135
136
 
136
137
  | 反模式 | 详见 |
137
138
  |--------|------|
138
- | QC 串行 rollout / dispatch incomplete | `mstar-dispatch-gates` |
139
+ | SDD paste-only / 跳过 task review / 并行 implementer | `mstar-sdd` · `mstar-dispatch-gates` |
140
+ | SDD plan 以单席 `qc.md` 收尾 / 跳过 plan tri | `mstar-dispatch-gates` · `mstar-review-qc` · `mstar-sdd` |
139
141
  | fix 后无脑重派三审 / 用 `-rev2` 代替原位复验 | `mstar-plan-artifacts` · `mstar-review-qc` |
140
142
  | 递归误派 / 误读 Handoff | `mstar-dispatch-gates` |
141
143
  | `quick` 跳过 Prepare | 上表 + `mstar-phase-gates` |
@@ -19,7 +19,7 @@ Read **`mstar-harness-core`** before this skill (even when the host injects proj
19
19
  4. Load role via `mstar-roles`
20
20
  5. Execute with evidence-first completion checks
21
21
 
22
- Load topic skills **on demand** per `mstar-roles` (do not read every `mstar-*` skill by default). Cursor maint routing-eval: `.cursor/skills/mstar-routing-eval/` only.
22
+ Load topic skills **on demand** per `mstar-roles` (do not read every `mstar-*` skill by default). Cursor routing-eval (`.cursor/skills/mstar-routing-eval/`) is regression tooling only — not part of runtime load order.
23
23
 
24
24
  ## Detect active host
25
25
 
@@ -11,7 +11,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** only when Codex exposes an
11
11
  - Plugin source: `.codex-plugin/plugin.json`.
12
12
  - Runtime skills: repo `skills/` mounted by the Codex plugin (`"skills": "./skills/"`).
13
13
  - Custom agent source: repo `codex/agents/*.toml`; CLI/manual install links these into `~/.codex/agents/` or project `.codex/agents/`.
14
- - `/pm`: shared force entry via the `pm` skill; after that, role behavior comes from `mstar-roles`.
14
+ - **`/pm`** or **`pm` skill**: force PM entry `mstar-roles` `project-manager.md` (Codex primary; Cursor/OpenCode for general per-plan work). **`commands/`** when running iteration Phase 1–5.
15
15
  - Role files under root `agents/` are for hosts that load OpenCode/Cursor-style agent shells; Codex uses `codex/agents/*.toml` and still loads `mstar-roles` references directly.
16
16
  - Tool and plugin availability can be lazy-loaded or session-dependent. Use the tools actually present in the current session; do not infer capability from documentation alone.
17
17
 
@@ -38,7 +38,7 @@ Use skill names in prompts and references. Avoid absolute local paths unless the
38
38
  - **No invoke tool / no linked custom agent = no dispatch**: printing `## Assignment` does not start another Codex worker.
39
39
  - If Codex exposes custom-agent / multi-agent tools and matching Morning Star agents are linked, PM may dispatch through those tools and must follow `parallel-dispatch.md`.
40
40
  - If no invoke tool is present when dispatch is required, return **`Blocked`** — report missing invoke capability to the user. Do not substitute single-session role execution in the PM thread unless the user explicitly overrides harness dispatch for this turn.
41
- - QC tri-review requires three callable reviewer sessions in one dispatch turn. Cannot emit **N=3** → **`Blocked`** for PM rerouting; do not claim tri-review complete or substitute serial/manual review in the PM thread.
41
+ - QC: **`Execution mode: sdd`** **N=3** tri-review; **`inline`** **N=1**. Cannot emit required **N** **`Blocked`**.
42
42
  - Leaf executors still follow `mstar-dispatch-gates`: no recursive Task/subagent calls unless Assignment says `Delegation: allowed (...)`.
43
43
 
44
44
  ## Files, shell, and approvals
@@ -6,8 +6,8 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (Task tool uses same turn model
6
6
 
7
7
  ## Cursor-only context
8
8
 
9
- - Role prompts: `mstar-roles`; **`/pm`** → `project-manager` via `pm` skill + `mstar-roles`.
10
- - Routing-eval: `.cursor/skills/mstar-routing-eval/` — maint only.
9
+ - Role prompts: `mstar-roles`; **`/pm`** or **`pm` skill** general PM orchestration (per-plan dispatch, gates, QC) without an iteration command. **`commands/`** (`iteration-start`, `iteration-drive`, `mstar-bootstrap`) only when running formal iteration Phase 1–5.
10
+ - Routing-eval: `.cursor/skills/mstar-routing-eval/` — regression tooling only; not runtime load order.
11
11
 
12
12
  ## Plan mode × harness dual-write
13
13
 
@@ -38,13 +38,27 @@ Enforcement: `rules/mstar-cursor-plan-mode.mdc` when plugin active.
38
38
  3. `mstar-harness-core` and `mstar-*` skills
39
39
  4. `mstar-host` + this reference
40
40
 
41
- ## Task tool (QC tri-review)
41
+ ## Task tool (QC: SDD → N=3)
42
42
 
43
- - Apply **`parallel-dispatch.md`**: prerequisite message may prep only; dispatch message emits **all `N`** Tasks (**3** for tri-review) in **one** message when parallel is required.
44
- - `subagent_type`: bare role ids — `qc-specialist`, `qc-specialist-2`, `qc-specialist-3` (same for implement roles: `fullstack-dev`, `frontend-dev`, etc.).
45
- - Identical across three Tasks: **`plan_id`**, **`Review cwd`**, **`Review range` / Diff basis** (`mstar-branch-worktree`, `mstar-dispatch-gates`, `mstar-review-qc`).
46
- - Parallel QC ≠ different review cwd per reviewer; one integrated HEAD for scope.
47
- - Status Update may note QC ran via parallel Task subagents.
43
+ - **`Execution mode: sdd`**: **N=3** Tasks (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) + branch review-package path.
44
+ - **`inline`**: **N=1** per `parallel-dispatch.md`.
45
+ - SDD implement/reviewer: **serial** see **`mstar-sdd`**.
46
+
47
+ ## SDD sticky implementer (Cursor Task resume)
48
+
49
+ When Assignment has **`SDD implementer session: sticky`** (`mstar-sdd/references/sticky-implementer-session.md`):
50
+
51
+ | Turn | Task tool |
52
+ |------|-----------|
53
+ | **First task** (or after `fresh` reset) | `subagent_type: <Execute as>` + `implementer-prompt.md` body; capture returned **agent id** → `{SDD_DIR}/implementer-session.json` → `host_agent_id` |
54
+ | **Task 2+** | `resume: <host_agent_id>` + `implementer-continuation-prompt.md` body (new brief path + report path only) |
55
+
56
+ **Rules:**
57
+
58
+ - **1 implement dispatch ⇒ 1 Task** per task id (resume counts as the implement dispatch for that task).
59
+ - **Task reviewer**: always **new** Task — **no** `resume` for reviewers.
60
+ - After each task reviewer passes, PM updates `progress.md` and `implementer-session.json` `last_task`.
61
+ - If `resume` fails or agent id missing → reset to **`fresh`** for that task; log reason in Status Update.
48
62
 
49
63
  ## Dispatch execution(canonical)
50
64
 
@@ -68,9 +82,21 @@ Implementation roles use `mstar-coding-behavior` for RCA, test-first checks, rev
68
82
 
69
83
  ## Gotchas
70
84
 
71
- - Tri-review needs identical `plan_id` and review scope fields.
85
+ - Single-seat and tri-review need identical `plan_id` and review scope fields.
72
86
  - Task parallelism does not relax branch/worktree isolation.
73
87
 
88
+ ## Model tier (SDD + QC)
89
+
90
+ Map Assignment **`Model tier`** to Task `model` (host-specific slugs):
91
+
92
+ | Tier | Typical use |
93
+ |------|-------------|
94
+ | `fast` | Transcription tasks; 1–2 file mechanical edits |
95
+ | `standard` | SDD prose implementer; task reviewer floor; plan QC tri seats |
96
+ | `capable` | Large branch QC diff; integration judgment |
97
+
98
+ **Turn count beats token price** — reviewers and prose implementers use `standard` floor minimum. See `mstar-sdd` SKILL.
99
+
74
100
  ## Project rules
75
101
 
76
102
  Project `AGENTS.md` / `CLAUDE.md` upward from cwd override global harness defaults when they conflict with Cursor-side rules; user instructions win.
@@ -6,6 +6,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
6
6
 
7
7
  ## Role loading
8
8
 
9
+ - **PM entry**: **`/pm`** or **`pm` skill** → `project-manager` for general orchestration; **`commands/`** (`iteration-start`, `iteration-drive`, `mstar-bootstrap`) for formal iteration only.
9
10
  - **Role shell**: `agents/<id>.md` referenced by `opencode.json` `agent.<id>` (frontmatter + role binding only).
10
11
  - **Role body**: `mstar-roles` `references/<id>.md` (or shared references + parameters).
11
12
  - Implementation evidence and RCA behavior: `mstar-coding-behavior`.
@@ -30,6 +31,8 @@ Harness **dispatch** on OpenCode = **one or more `task` tool calls**, each with
30
31
 
31
32
  PM workflow: finalize Assignment → **call task tool** with **subagent** + generated prompt → wait for subagent Completion Report → update plan / status.
32
33
 
34
+ **SDD sticky implementer:** if the task tool exposes **resume** / agent id, follow **`mstar-sdd/references/sticky-implementer-session.md`** and the active host reference. If resume is **not** available, use **micro-batch** (2–3 tasks, one invoke) or **`SDD implementer session: fresh`** per task — do not assume sticky without host support.
35
+
33
36
  ## Role-mention hygiene (OpenCode)
34
37
 
35
38
  OpenCode may **auto-append** system lines when prompt text stacks multiple agent-id **prefix mentions**. Typical boilerplate (host-generated — **not** harness Assignment):
@@ -27,11 +27,29 @@ Printing `## Assignment` in the main thread **without** matching host invocation
27
27
  - Dual-track implement: **`N = 2` ⇒ two invocations in one message** when parallel is required.
28
28
  - Status Update on dispatch turns: **`Subagent invokes issued: N`** (must match Assignment count). If Assignments were written but `N = 0` → **`dispatch failed — paste-only`**; fix next message.
29
29
 
30
- ## QC tri-review (initial wave)
30
+ ## QC default (initial wave)
31
31
 
32
- - Launch `qc-specialist`, `qc-specialist-2`, `qc-specialist-3` in **one** dispatch turn (**N=3** invocations, one message).
33
- - Do not claim parallel QC unless all three were issued in that turn.
34
- - Post-dispatch: verify three distinct agent IDs and intended model mapping; on mismatch → invalid dispatch, re-dispatch before consolidation.
32
+ - **`Execution mode: sdd`**: **N=3** tri-review + branch review-package path `qc1`…`qc3` + consolidated.
33
+ - **`inline` / override**: **N=1** `qc.md`.
34
+
35
+ ## QC iteration / SDD (same rule)
36
+
37
+ Formal iteration Phase 2 uses the same SDD + tri rule — not a separate carve-out.
38
+
39
+ ## QC full tri-review(非 SDD 但显式 tri)
40
+
41
+ 当 plan 为 **`Execution mode: inline`** 或单轨,但 Assignment 仍写 **`QC mode: full tri-review`** 时:
42
+
43
+ - Launch `qc-specialist`, `qc-specialist-2`, `qc-specialist-3` in **one** dispatch turn (**N=3**).
44
+ - Post-dispatch: verify three distinct agent IDs; on mismatch → invalid dispatch.
45
+
46
+ (**SDD 默认**已在上一节;本节仅覆盖显式 tri 的非 SDD 场景。)
47
+
48
+ ## SDD implement (serial — not parallel)
49
+
50
+ - **`Execution mode: sdd`**: implementer and task reviewer dispatches are **one at a time** per task.
51
+ - **Never** multiple implementer Tasks in one message for the same plan.
52
+ - See **`mstar-sdd`**.
35
53
 
36
54
  ## QC targeted re-review (after fixes)
37
55
 
@@ -44,5 +62,5 @@ Printing `## Assignment` in the main thread **without** matching host invocation
44
62
  1. Required assignments this turn? (`N`)
45
63
  2. Prerequisite-only message? → **zero** batch dispatches unless `N = 1`.
46
64
  3. Dispatch message contains **exactly `N`** invocation calls?
47
- 4. QC initial tri-review → **exactly 3** in one dispatch message? Targeted re-review → **N** = Assignment reviewer count?
48
- 5. Previous message was prerequisite-only this message must include **all `N`** (not “QC1 first”).
65
+ 4. QC initial: **`Execution mode: sdd`** → **N=3**? **`inline`** **N=1**? Targeted re-review → **N** = Assignment reviewer count?
66
+ 5. SDD implement **serial** (never batch implementers); sticky = **resume** same implementer, not parallel
@@ -1,13 +1,13 @@
1
1
  ---
2
2
  name: mstar-iteration
3
- description: Morning Star 迭代管理 —— iteration-start、Autonomous Executeiteration-close、PR 交付(Phase 4)、PR merge-ready loop(Phase 5)。显式分支策略;compass `{ITERATION_DIR}/`;分支 SSOT:`status.json` metadata + compass frontmatter
3
+ description: Morning Star 迭代管理 —— iteration-start、Autonomous Execute(per-plan SDD + plan QC tri)、iteration-close、PR 交付(Phase 4)、PR merge-ready loop(Phase 5)。显式分支策略;compass `{ITERATION_DIR}/`;分支 SSOT:`status.json` metadata + compass frontmatter。**必须**在 iteration-start / iteration-drive / 多 plan 编排、integration 分支、iteration-close 或 PR merge-ready 时 Read;`@project-manager` 迭代编排必读。
4
4
  ---
5
5
 
6
6
  # mstar-iteration(迭代管理)
7
7
 
8
8
  ## Load order
9
9
 
10
- **Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. Per-plan gates → **`mstar-phase-gates`**. Knowledge crystallization → **`mstar-compound`**. On conflict, **`mstar-harness-core` wins**.
10
+ **Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. Per-plan gates → **`mstar-phase-gates`**. Knowledge crystallization → **`mstar-compound`**. **Phase 2 implement 波次**(进入 per-plan implement 前)→ **`mstar-sdd`** + **`mstar-dispatch-gates`**。Phase 2 QC 前 → **`mstar-review-qc`**。On conflict, **`mstar-harness-core` wins**.
11
11
 
12
12
  ## 设计思路
13
13
 
@@ -227,8 +227,18 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
227
227
  对每个 active `plan_id`:
228
228
 
229
229
  1. **Plan start — feature branch**:Assignment 用 `Working branch: create <plan-feature-branch> from <spec_integration_branch>`。一个 plan 一条专用实现分支;内部并行 → topic branches + worktrees(`mstar-branch-worktree`)
230
- 2. **Implement → InReview**:dispatch-only 循环(`§ 2.5`);每次 Completion Report v2 后更新 `status.json` + 主 plan
231
- 3. **QC QA Done**:三审 + QA(`mstar-review-qc`);gate 全部通过后 PM 标记 `Done`
230
+ 2. **Implement → InReview**(`§ 2.5`):
231
+ - **默认 `Execution mode: sdd`**(多 task plan;hotfix `inline`)。
232
+ - PM 载入 **`mstar-sdd`** 后,按 plan task 顺序 **串行** per-task 循环(**不是**一次派发 dev 做全部 tasks):
233
+ 1. `sdd-workspace <plan-id>` → `{SDD_DIR}`
234
+ 2. `task-brief <plan-file> N` → `{SDD_DIR}/task-N-brief.md`;记录 `BASE_SHA`
235
+ 3. Dispatch **one** implementer subagent(`references/implementer-prompt.md`:brief 路径 + report 路径 + `Model tier`;**禁止**贴整份 plan)
236
+ 4. Implementer `DONE` → `review-package BASE HEAD` → task diff 文件
237
+ 5. Dispatch **one** task reviewer subagent(brief + report + diff + Global Constraints)
238
+ 6. Fix loop 直至 review clean;append `{SDD_DIR}/progress.md`;更新 `status.json` / plan checkbox
239
+ 7. Next task
240
+ - 每次 Completion Report v2 后更新 `status.json` + 主 plan
241
+ 3. **QC → QA → Done**:per-plan 审查链 → **`mstar-sdd`**(L1–L2)+ **`mstar-review-qc/references/review-responsibility-boundaries.md`**(L3 tri / inline 单席)+ QA。
232
242
  4. **Plan complete — merge back**:合并 plan feature branch → `spec_integration_branch`;在下一 plan 或 QC 前解决冲突
233
243
  5. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 的 `## Plans` 表状态列
234
244
  6. **Next plan** 从步骤 1 继续
@@ -241,21 +251,24 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
241
251
 
242
252
  ### 2.5 Dispatch-first(implement 派发约束)
243
253
 
244
- **派发回合纪律**(Cursor Task / 具名 invoke 宿主):
254
+ 派发纪律 SSOT **`mstar-dispatch-gates`** · **`mstar-sdd`** · **`mstar-host/references/parallel-dispatch.md`**。
245
255
 
246
- 1. 准备 Assignment 的消息可只含 read/bash **不计入**派发。
247
- 2. **下一条派发消息**的第一动作 = 发出全部 `Task`(QC 初轮 **N=3** 同条消息;双轨 implement **N=2**)。
248
- 3. `Subagent invokes issued: 0` 而 Assignment 已写出 → **`dispatch incomplete`**;下一条必须补发 invoke,**禁止** PM 线程亲自实现顶替。
256
+ **SDD implement(Phase 2 默认)**PM **已载入 `mstar-sdd`** 后执行:
249
257
 
250
- | Do | Don't |
251
- |----|------|
252
- | **Loop:** `## Assignment` invoke Completion Report v2 更新 status next | PM 亲自 Write/Edit/Shell 产品代码 |
253
- | 1 Assignment 1 invoke | Assignment 只写 markdown invoke |
254
- | merge/branch/handoff 写入 Assignment | 因"上下文已有"而跳过 subagent |
258
+ | 规则 | 说明 |
259
+ |------|------|
260
+ | 串行 | 同一 plan **one implementer at a time**;每 task **one fresh task reviewer** |
261
+ | Sticky(可选) | Assignment **`SDD implementer session: sticky`** + `implementer-session.json`;implementer **resume**,reviewer **fresh** `mstar-sdd/references/sticky-implementer-session.md` |
262
+ | 文件交接 | brief / report / diff / `progress.md` `{SDD_DIR}`;dispatch prompt **只给路径**,不贴 plan 全文或 task 历史 |
263
+ | Assignment 字段 | 每个 implement dispatch 须含 `Execution mode: sdd`、`SDD dir`、`Model tier`;**禁止**省略 `Model tier` |
264
+ | 大包 inline | **禁止**把 T1–Tn 或整份 plan 写进 **一个** `fullstack-dev` leaf Assignment 冒充 SDD |
265
+ | 分支 diff | 全部 task 完成后 `review-package MERGE_BASE HEAD` → branch diff → plan QC tri(N=3) |
266
+
267
+ Iteration Phase 2 附加:
255
268
 
256
- - **NEVER** implement while staying PM — 实现一律 delegate dev 角色
257
- - Delegate scope:`mstar-roles` → PM Execution Boundary
258
- - 例外:用户显式要求 PM thread 实现;hotfix(`mstar-phase-gates`)
269
+ - PM **NEVER** PM 线程实现产品代码(delegate dev;hotfix 例外见 **`mstar-phase-gates`**)
270
+ - `Subagent invokes issued: 0` 而 Assignment 已写出 **`dispatch incomplete`**;下一条补发 invoke,禁止 PM 顶替
271
+ - QC 初轮:**SDD N=3**;**inline → N=1**;双轨 implement → **N=2**(同条消息发满 N)
259
272
 
260
273
  ### 2.6 Push 纪律
261
274
 
@@ -304,26 +317,16 @@ PM **必须**在对话中打印本 checklist;不得默认同过。
304
317
 
305
318
  ### 3.2 知识结晶(Compound)—— 迭代级核心收口
306
319
 
307
- **Compound 在此执行,不在 per-plan Done 后独立执行。**
308
-
309
- PM 触发 `mstar-compound`(可批量):
310
-
311
- 1. **收集素材**:回顾本迭代所有 plan 的实现、debug、review 过程,识别以下类型的可结晶知识:
312
- - 非平凡 bug 修复及其诊断过程
313
- - 新引入的架构模式或约定
314
- - 工具链决策及其理由
315
- - 跨 plan 重复出现的模式
316
- - 有价值的排错经验
317
-
318
- 2. **逐条判定**:对每条候选知识,回答 `mstar-compound` 的 Q1-Q8 自检;跳过项要在 compass `## Compound Round Summary` 记录原因。
319
-
320
- 3. **写入或更新**:值得结晶的条目按 `mstar-compound` Phase 1-7 写入 `{KNOWLEDGE_DIR}/<category>/<slug>.md`,或在高重叠时更新已有文档。
320
+ **Compound 在此执行,不在 per-plan Done 后独立执行。** 工作流 SSOT → **`mstar-compound`**(Q1–Q8 自检、Phase 1–7、Phase 6 索引登记强制)。
321
321
 
322
- 4. **CONCEPTS.md 协同**:若迭代中引入了新的领域词汇,更新 `<repo-root>/CONCEPTS.md`(`mstar-compound` Phase 5)
322
+ PM 批量触发后须:
323
323
 
324
- 5. **索引登记(强制)**:每新增一篇 knowledge doc,必须完成 `mstar-compound` Phase 6,在 `{KNOWLEDGE_DIR}/README.md` 登记一行。Lightweight compound 不豁免 Phase 6。
324
+ 1. 收集本迭代 plan 实现 / debug / review 素材,筛候选知识
325
+ 2. 逐条过 `mstar-compound` 自检;跳过项记入 compass `## Compound Round Summary`
326
+ 3. 写入或更新 `{KNOWLEDGE_DIR}/<category>/<slug>.md`;新领域词更新 `CONCEPTS.md`
327
+ 4. **每篇**新 doc 完成 Phase 6(`{KNOWLEDGE_DIR}/README.md` 登记)
325
328
 
326
- 若本轮没有值得结晶的知识,仍须在 `## Compound Round Summary` 写明 `无可结晶知识` 及原因。
329
+ 若无结晶,仍在 `## Compound Round Summary` 写明 `无可结晶知识` 及原因。
327
330
 
328
331
  ### 3.3 更新 roadmap
329
332
 
@@ -430,7 +433,8 @@ PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权
430
433
  | `mstar-phase-gates` | per-plan gate 判定 |
431
434
  | `mstar-plan-conventions` | 路径符号(`{ITERATION_DIR}`、`{HARNESS_DIR}`) |
432
435
  | `mstar-plan-artifacts` | `status.json` SSOT、`{ITERATION_DIR}` 索引维护 |
433
- | `mstar-review-qc` | QC 三审 — per-plan loop 引用 |
436
+ | `mstar-sdd` | SDD implement 波次 — per-plan loop |
437
+ | `mstar-review-qc` | SDD 强制 plan QC tri — per-plan loop |
434
438
  | `mstar-branch-worktree` | 分支/merge/worktree 隔离 |
435
439
  | `mstar-compound` | iteration-close 中触发知识结晶 |
436
440
  | `mstar-compound-refresh` | iteration-close 后可触发知识维护 |
@@ -440,6 +444,7 @@ PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权
440
444
 
441
445
  - 不要在 per-plan Done 后立即单独 compound——等 iteration-close 统一做
442
446
  - 不要在 Autonomous Execute(Phase 2)中修改 per-plan gate 判定
447
+ - **不要在 Phase 2 用 inline 大包 Assignment 替代 SDD per-task 循环**(除非 plan 显式 `Execution mode: inline` / hotfix)
443
448
  - 不要用 compass 替代 `status.json` 作为 plan 状态 SSOT
444
449
  - 不要在没有完成 per-plan 前置检查的情况下进入 iteration-close
445
450
  - 不要在缺少 `iteration_base_branch` / `target_branch` 时默认使用 `main` / `master`
@@ -449,3 +454,4 @@ PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权
449
454
  - 不要跳过 compound——如果本迭代确实没有可结晶的知识,在 compass `## Compound Round Summary` 写 `无可结晶知识(原因:<简述>)`
450
455
  - 不要将 **Phase 4 开 PR** 等同于 **迭代交付完成** — 必须完成 **Phase 5** §5.5 merge-ready loop
451
456
  - 不要在 Phase 5 跳过 review comment + resolve 纪律(§5.1 step 5)
457
+ - **不要在 SDD plan 上以单席 `qc.md` 收尾**(除非用户书面 `QC mode: single — override`)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-phase-gates
3
- description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare(`specify → clarify → plan`)、Execute(`plan(locked) → tasks → implement`)、意图门禁、长期目标优先、分批 roadmap 强制落盘、clarify 核心纪律(共享理解 / 先探索 / 每问推荐答案)、hotfix 压缩路径、可验证编辑、Phase Gate 最小证据。**必须**在 PM 判定 gate、首次 implement 派单前、产品/架构参与 Prepare、或解释为何不能跳过 plan/clarify 时 Read;`@project-manager` 每轮编排非 hotfix 任务必读;`@product-manager` / `@architect` 写规格与锁 plan 时必读 Prepare 节;实现角色 Read Execute 与 hotfix 例外即可。Task category 与 `quick` 禁豁免规则仍在 `mstar-harness-core`。实现行为见 `mstar-coding-behavior`。迭代级活动(iteration-start / iteration-close / compound)见 `mstar-iteration`。
3
+ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare(`specify → clarify → plan`)、Execute(`plan(locked) → tasks → implement`;多 task 默认 **`Execution mode: sdd`**)、意图门禁、长期目标优先、分批 roadmap 强制落盘、clarify 核心纪律、hotfix 压缩路径、可验证编辑、Phase Gate 最小证据。**必须**在 PM 判定 gate、首次 implement 派单前、产品/架构参与 Prepare、或解释为何不能跳过 plan/clarify 时 Read;`@project-manager` 每轮编排非 hotfix 任务必读;`@product-manager` / `@architect` 写规格与锁 plan 时必读 Prepare 节;实现角色 Read Execute 与 hotfix 例外即可。Task category 与 `quick` 禁豁免规则仍在 `mstar-harness-core`。实现行为见 `mstar-coding-behavior`;SDD `mstar-sdd`;迭代级活动见 `mstar-iteration`。
4
4
  ---
5
5
 
6
6
  ## Load order(必读顺序)
@@ -29,7 +29,7 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
29
29
  - **`plan(locked)`** — 冻结基线;实现中出现新约束时**先回写 plan 再继续**。
30
30
  - **`tasks`** — 含依赖顺序、并行标记、完成判据;每任务可追踪到 plan、roadmap 批次与验收标准。
31
31
  - **并行标签**:若 PM 将 ≥2 条实现轨 **同时** 分派,须在 Assignment 写明 `Dispatch mode: parallel independent tracks`;同仓 ≥2 可写并发时写明 `Worktree isolation: required`(见 **`mstar-dispatch-gates`** 与 **`mstar-branch-worktree`**)。
32
- - **`implement`** — 按 tasks 顺序执行并提交自检证据;完成进入 `InReview`;遵循 **`mstar-coding-behavior`**。
32
+ - **`implement`** — 按 tasks 顺序执行;多 task plan **默认** `Execution mode: sdd`(`mstar-sdd`);hotfix 可 `inline`。完成进入 `InReview`;遵循 **`mstar-coding-behavior`**。
33
33
 
34
34
  ### 可验证编辑与上下文纪律
35
35
 
@@ -39,55 +39,20 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
39
39
 
40
40
  ### Hotfix 例外
41
41
 
42
- - 压缩为 `specify(min) plan(min) → implement`;必须在回报或 plan notes 补记事后 **`clarify/RCA`**。
42
+ 压缩路径与事后补记见下文 **§ Hotfix 例外**(Playbook 末尾)。
43
43
 
44
44
  ## Phase Gate Playbook
45
45
 
46
- 本手册将 `specify -> clarify -> plan -> tasks -> implement` 变成可执行动作,供 `@project-manager`、开发与 QA 在日常交付中快速对齐。
46
+ 执行动作与最小产物见上文 **§ Spec-Driven 双阶段门禁**。本节仅 **Playbook 补充**(不重复 Prepare/Execute 长文)。
47
47
 
48
- ## 适用范围
48
+ ### Execute 补充(Playbook 专有)
49
49
 
50
- - 非热修(non-hotfix)任务默认强制执行全链路门禁。
51
- - 热修可走压缩路径,但必须补事后 `clarify/RCA` 记录。
52
-
53
- ## 两阶段门禁(per-plan Playbook)
54
-
55
- ### A. Prepare
56
-
57
- 顺序:`specify -> clarify -> plan`
58
-
59
- - `specify`
60
- - 目标:定义问题、范围、验收。
61
- - 最小产物:问题陈述、目标用户价值、非目标、DoD 草案。
62
- - `clarify`
63
- - 目标:收敛会影响方案或验收的歧义。
64
- - 最小产物:歧义清单 + 结论;若未收敛则 `blocked`。
65
- - **意图**:区分字面请求与真实目标;手段/目标混淆须在此收敛(见本 skill `SKILL.md` Intent gate)。
66
- - **结构化澄清**:与用户核对歧义或决策时,`@project-manager`(及直接与用户对话的角色)在**宿主支持**时优先用 `question` 类能力拉齐输入;否则用等价结构化正文。宿主差异细则见当前宿主的 `mstar-host` skill。
67
- - **`clarify` 核心纪律**(见 **`mstar-phase-gates` SKILL.md** Prepare · `clarify`):逐方面核对至共享理解;沿设计决策树逐枝、一次一决;能探索代码库则先探索;每问附推荐答案;阶段末汇总已决与仍 open 假设。
68
- - `plan`
69
- - 目标:给出可执行技术方案与风险控制。
70
- - 最小产物:目标状态、方案、模块边界/接口契约、风险与回滚、验证计划。
71
- - **准入**:能书面写出真实目标、成功判据、非目标后再锁 plan(同 `SKILL.md`)。
72
- - **分批准入**:若计划不是一次性交付完整范围,须写 `Roadmap / Batch Plan`:本批做什么、后续批次做什么、依赖顺序、暂缓项、owner/触发条件、最终 Done 定义;缺失则 `blocked`。
73
-
74
- ### B. Execute
75
-
76
- 顺序:`plan locked -> tasks -> implement`
77
-
78
- - `plan locked`
79
- - 目标:冻结本轮基线,防止边做边漂移。
50
+ - **`plan locked`**
80
51
  - 最小动作:在 plan 或 notes 记录当前锁定版本(日期或 hash)。
81
- - `tasks`
82
- - 目标:把 plan 拆成可执行任务与依赖顺序。
83
- - 最小产物:任务列表、并行标记、完成判据、映射到验收标准与 roadmap 批次。
84
- - **PM**:若并行标记对应「多轨同时 implement」,在对外 **Status Update** 与实现 Assignment 写入 **`Dispatch mode: parallel independent tracks`**;同仓多可写并发时叠 **`Worktree isolation: required`**(见 `mstar-dispatch-gates` `mstar-branch-worktree`)。
85
- - `implement`
86
- - 目标:按任务执行并提交证据,进入审查。
87
- - 最小产物:实现 diff、自检证据、回报与 handoff。
88
- - **行为准则**:执行中遵循 `mstar-coding-behavior`(不静默假设、优先简单方案、只做与任务直接相关的手术式改动、按 `Step -> verify` 推进)。
89
- - **编辑纪律**:改文件前以磁盘为准重读;Patch 失败则重读、缩小步长,禁止盲试(见 **`mstar-phase-gates` SKILL.md**「可验证编辑与上下文纪律」)。
90
- - **知识库 / 迭代 compass**:若项目在 `plans[].metadata` 中登记了 `primary_spec` / `spec_refs` / `iteration_compass` / `iteration_refs`,**开工前**须阅读并在回报中说明已对齐;规则见 **`mstar-plan-conventions`** 与 **`mstar-plan-artifacts/references/knowledge-and-designs.md`**。
52
+ - **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review 三问(每 task 可独立验证?依赖顺序清晰?无隐含假设?)— 见 `mstar-plan-artifacts/templates/plan.main.md`。
53
+ - **`implement`**
54
+ - 最小产物:实现 diff、自检证据、回报与 handoff;行为准则 → **`mstar-coding-behavior`**;编辑纪律 → 上文「可验证编辑与上下文纪律」。
55
+ - **知识库 / 迭代 compass**:若 `plans[].metadata` 登记了 `primary_spec` / `spec_refs` / `iteration_compass` / `iteration_refs`,**开工前**须阅读并在回报中说明已对齐 **`mstar-plan-conventions`** · **`mstar-plan-artifacts/references/knowledge-and-designs.md`**。
91
56
 
92
57
  ## 角色职责
93
58
 
@@ -112,7 +77,7 @@ per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动
112
77
 
113
78
  ## Plan 目录与审查报告(启用 `{PLAN_DIR}` 时)
114
79
 
115
- - 进入 `InReview` 后,QC 书面产出落入 `{PLAN_DIR}/reports/<plan-id>/`(如 `qc1.md` `qc-consolidated.md`);**fix 后默认 targeted re-review**(原位更新同文件,不默认 `-rev2`),见 **`mstar-plan-artifacts/references/plan-files-and-reports.md`**。**多 batch**:完整三审**默认在整 plan dev 完成后一次**(非每 batch)。
80
+ - 进入 `InReview` 后,QC 产出落入 `{PLAN_DIR}/reports/<plan-id>/`(**SDD 默认 tri** `qc1`…`qc-consolidated`;**inline** 单席 `qc.md`)。**fix 后默认 targeted re-review**。SDD per-task review implement 波次内完成(`mstar-sdd` task reviewer)。
116
81
  - 非阻断项与后续技术债:PM 汇总后写入 `{HARNESS_DIR}/status.json` 根级 `residual_findings[<plan-id>]`(**open**,与 `plans` 平级;canonical 见 **`mstar-plan-artifacts` SKILL.md**);关闭后迁入 `{HARNESS_DIR}/archived/residuals/<plan-id>.json`,与 `mstar-review-qc` 一致。每条 **`severity`** 遵守 **`mstar-plan-artifacts/references/status-and-residuals.md`**「Residual findings:severity(SSOT,机器字段)」。
117
82
 
118
83
  ## 快速判定(PM)
@@ -12,6 +12,7 @@ description: Morning Star plan harness artifacts — `{PLAN_DIR}` main plans and
12
12
  | Topic | See |
13
13
  |-------|-----|
14
14
  | Main plan, reports naming, QC waves, residual and plan index order | `references/plan-files-and-reports.md` |
15
+ | Plan template (Global Constraints, Interfaces) | `templates/plan.main.md` |
15
16
  | knowledge / iterations / specs boundaries and indexes | `references/knowledge-and-designs.md` |
16
17
  | Done row compaction Profile A/B | `references/done-compaction.md` |
17
18
  | `status.json`, residual severity, lifecycle, `jq` | `references/status-and-residuals.md` |