@mstar-harness/opencode 0.7.8 → 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.
- package/harness-commands/iteration-drive.md +2 -2
- package/harness-commands/iteration-start.md +9 -9
- package/harness-skills/mstar-branch-worktree/SKILL.md +10 -10
- package/harness-skills/mstar-coding-behavior/SKILL.md +1 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +24 -13
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +9 -6
- package/harness-skills/mstar-host/SKILL.md +3 -3
- package/harness-skills/mstar-host/references/codex.md +1 -1
- package/harness-skills/mstar-host/references/cursor.md +18 -8
- package/harness-skills/mstar-host/references/opencode.md +35 -8
- package/harness-skills/mstar-host/references/parallel-dispatch.md +25 -7
- package/harness-skills/mstar-iteration/SKILL.md +19 -35
- package/harness-skills/mstar-phase-gates/SKILL.md +11 -46
- package/harness-skills/mstar-plan-artifacts/SKILL.md +1 -0
- package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +22 -10
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +3 -0
- package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
- package/harness-skills/mstar-plan-conventions/SKILL.md +6 -3
- package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +2 -1
- package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +1 -1
- package/harness-skills/mstar-review-qc/SKILL.md +5 -5
- package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +41 -0
- package/harness-skills/mstar-roles/SKILL.md +5 -1
- package/harness-skills/mstar-roles/references/architect.md +1 -1
- package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
- package/harness-skills/mstar-roles/references/ops-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/product-manager.md +1 -1
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +11 -6
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +33 -24
- package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +2 -1
- package/harness-skills/mstar-roles/references/project-manager.md +23 -20
- package/harness-skills/mstar-roles/references/prompt-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qa-engineer.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +6 -4
- package/harness-skills/mstar-roles/references/writing-specialist.md +1 -1
- package/harness-skills/mstar-sdd/SKILL.md +118 -0
- package/harness-skills/mstar-sdd/references/file-handoffs.md +73 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +53 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +51 -0
- package/harness-skills/mstar-sdd/scripts/review-package +43 -0
- package/harness-skills/mstar-sdd/scripts/sdd-workspace +26 -0
- package/harness-skills/mstar-sdd/scripts/task-brief +40 -0
- package/harness-skills/pm/SKILL.md +7 -6
- package/package.json +1 -1
|
@@ -33,7 +33,7 @@ Phase 2: Autonomous Execute → Phase 3: iteration-close → Phase 4: Create
|
|
|
33
33
|
| 只写 Assignment 就进入下一 gate | 同轮 dispatch:`Subagent invokes issued: N`(N = Assignment 条数) |
|
|
34
34
|
| 最后一个 plan `Done` 后直接开 PR / 汇报结束 | **Phase 3 → 4 → 5** 顺序执行 |
|
|
35
35
|
| Phase 4 开 PR 后停止 | Phase 5 loop 至 merge-ready;**禁止**未过 §5.5 就结束会话 |
|
|
36
|
-
| Phase 5 自己改产品代码 | 需改产品代码时 **dispatch**
|
|
36
|
+
| Phase 5 自己改产品代码 | 需改产品代码时 **dispatch** `fullstack-dev` / `ops-engineer` |
|
|
37
37
|
|
|
38
38
|
派发细则 → **`mstar-dispatch-gates`** + **`mstar-host`**。Phase 3 细则 → **`mstar-iteration` §3** + **`mstar-compound`**。
|
|
39
39
|
|
|
@@ -76,7 +76,7 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
|
|
|
76
76
|
- Create plan feature branch from integration
|
|
77
77
|
- Dispatch implement subagents (dispatch-first)
|
|
78
78
|
- Update `status.json` + main plan after each Completion Report v2
|
|
79
|
-
- QC tri-review
|
|
79
|
+
- QC **full tri-review** (`QC mode: full tri-review`, **N=3**, `mstar-review-qc`) + QA per plan
|
|
80
80
|
- Merge plan branch → integration branch
|
|
81
81
|
- Cross-plan progress sync → compass
|
|
82
82
|
- Next plan
|
|
@@ -14,7 +14,7 @@ Start a new Morning Star harness iteration. **Not Done until the Review & Edit c
|
|
|
14
14
|
|
|
15
15
|
| 禁止(PM 线程) | 必须(宿主有 Task 时) |
|
|
16
16
|
|-----------------|------------------------|
|
|
17
|
-
| 自己 Edit compass/plans/specs 冒充
|
|
17
|
+
| 自己 Edit compass/plans/specs 冒充 product-manager / architect / writing-specialist 的审查编辑 | §5.1 → §5.2 → §5.3 **顺序**各 **1 次 invoke**;上一角色返回后再派发下一角色 |
|
|
18
18
|
| 只写 `## Assignment` 或 checklist 就声称 review chain 完成 | **几条角色 ⇒ 几条 invoke**;零 invoke = `dispatch incomplete`(`mstar-dispatch-gates`) |
|
|
19
19
|
| §5 完成前 commit / 创建 integration 分支 | 5.4 PM lock 在 subagent 返回且磁盘产物已修订之后(`mstar-iteration` §1.6) |
|
|
20
20
|
|
|
@@ -93,16 +93,16 @@ Produce harness artifacts per **`mstar-iteration` § 1.3**(template: `mstar-it
|
|
|
93
93
|
|
|
94
94
|
**STOP**: Do not run §6 Integration Branch until **all** rows below are true.
|
|
95
95
|
|
|
96
|
-
**顺序(HARD)**:`product-manager` → `architect` → `writing-specialist` → PM lock。后一角色基于前一角色已落盘的修订继续编辑;**禁止**三角色并行 invoke。
|
|
96
|
+
**顺序(HARD)**:`product-manager` → `architect` → `writing-specialist` → PM lock。后一角色基于前一角色已落盘的修订继续编辑;**禁止**三角色并行 invoke。OpenCode:正文用 plain role id — **`mstar-host/references/opencode.md`** § Role-mention hygiene。
|
|
97
97
|
|
|
98
98
|
Each role below **reviews and directly edits** the documents. Do not just flag issues — apply the fixes yourself. PM only steps in for the final lock.
|
|
99
99
|
|
|
100
100
|
| # | Role | Required action | Gate |
|
|
101
101
|
|---|------|-----------------|------|
|
|
102
|
-
| 5.1 |
|
|
103
|
-
| 5.2 |
|
|
104
|
-
| 5.3 |
|
|
105
|
-
| 5.4 |
|
|
102
|
+
| 5.1 | **product-manager** | invoke: **edit** compass, plans, `{SPECS_DIR}/`; scope, UX, priorities | 完成后方可 5.2 |
|
|
103
|
+
| 5.2 | **architect** | invoke: **edit** compass, plans, specs(含 5.1 修订后版本); contracts, SQL, module boundaries | 5.1 返回后;完成后方可 5.3 |
|
|
104
|
+
| 5.3 | **writing-specialist** | invoke: **edit** all iteration docs(含 5.1–5.2 修订后版本); terminology, structure, clarity | 5.2 返回后 |
|
|
105
|
+
| 5.4 | **project-manager** | Merge subagent edits; resolve conflicts; **lock** compass (`status: locked`); confirm Prepare gates | 5.3 返回后 |
|
|
106
106
|
|
|
107
107
|
**Evidence of done** = edited compass / plans / specs on disk + compass `status: locked`. **No** separate iteration review reports under `reports/` — unlike per-plan QC, there is no downstream audit chain to preserve.
|
|
108
108
|
|
|
@@ -129,9 +129,9 @@ PM must print this block before §6; all `[ ]` must be `[x]`:
|
|
|
129
129
|
|
|
130
130
|
- [ ] grill-me decisions recorded in compass
|
|
131
131
|
- [ ] Draft compass + plans + `status.json` registered
|
|
132
|
-
- [ ]
|
|
133
|
-
- [ ]
|
|
134
|
-
- [ ]
|
|
132
|
+
- [ ] product-manager invoke completed — compass / plans / specs edited
|
|
133
|
+
- [ ] architect invoke completed — compass / specs edited
|
|
134
|
+
- [ ] writing-specialist invoke completed — iteration docs edited
|
|
135
135
|
- [ ] PM final lock: compass `status: locked`; Prepare gates pass (blocked plans documented)
|
|
136
136
|
- [ ] Branch policy locked: `iteration_base_branch`, `spec_integration_branch`, and `target_branch` recorded in compass / `status.json`
|
|
137
137
|
- [ ] **THEN**: git commit + push `iteration/<iteration-id>`
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-branch-worktree
|
|
3
|
-
description: Morning Star business-repo Git feature branches, same-repo concurrent `git worktree` isolation, plan/Spec integration branches, and QC/QA checkout alignment (`Review cwd`, `Working branch`, `plan_id`, `Review range` / `Diff basis` must match verbatim across three QC reviewers and QA). Read when PM writes `Working branch` / `Branch policy`, two or more writable streams touch one repo, dispatching QC tri-review or QA after merging to a single `HEAD`, dev/QA/ops before first `git commit`, or explaining worktree paths. Required for
|
|
3
|
+
description: Morning Star business-repo Git feature branches, same-repo concurrent `git worktree` isolation, plan/Spec integration branches, and QC/QA checkout alignment (`Review cwd`, `Working branch`, `plan_id`, `Review range` / `Diff basis` must match verbatim across three QC reviewers and QA). Read when PM writes `Working branch` / `Branch policy`, two or more writable streams touch one repo, dispatching QC tri-review or QA after merging to a single `HEAD`, dev/QA/ops before first `git commit`, or explaining worktree paths. Required for `project-manager` parallel implement or pre-QC orchestration; `fullstack-dev*` / `frontend-dev` / `qa-engineer` / `ops-engineer` on repo writes; `qc-specialist*` before review. Does not replace the state machine (`mstar-harness-core`).
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
@@ -33,23 +33,23 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
33
33
|
- 当需要**从已有功能分支继续拆新分支**时,Assignment 应写清**祖先分支** `<base>`,例如:`create feature/foo-part2 from feature/foo`。
|
|
34
34
|
- **`<base>` 可取**:`main` / `master`(或项目默认分支名)、任意已存在的 `feature/*` / `fix/*`、远程跟踪分支名、或 **`current`**(表示以执行者检出时的 `HEAD` 为祖先,用于「就在当前分支上再拉一枝」)。
|
|
35
35
|
- 若只写 **`Working branch`: `feature/foo`且无「create … from …」**:表示**沿用 / 切到**该已存在分支上开发,不要求新建。
|
|
36
|
-
- 若写新建但未写 `<base>`:实现侧应**停下问**
|
|
36
|
+
- 若写新建但未写 `<base>`:实现侧应**停下问** `project-manager`(或按项目 `AGENTS.md` 的默认 base);**禁止**擅自假设「一定是 `main`」。
|
|
37
37
|
|
|
38
38
|
### 角色职责
|
|
39
39
|
|
|
40
|
-
-
|
|
41
|
-
- **实现 / QA / 运维 / prompt / product-manager / architect(项目侧)**:在**首次**编辑仓库内文件或执行 `git commit` 前,核对当前分支与 Assignment,并在回报中明确"正在哪个分支上工作"。**禁止自行决定新开分支、禁止自行切回 `main`/`master` 重开分支。**若未授权 `Branch policy` 且当前在默认分支,则仅可按 PM 已写明的 `Working branch` 执行切换/开枝;若 Assignment 未写清或与现场分支不一致,先回报
|
|
40
|
+
- **`project-manager`(唯一分支决策入口)**:向 `product-manager`(向项目仓库提交产品文档时)、`architect`(向项目仓库提交技术/架构/契约类文档时)、`fullstack-dev` / `frontend-dev` / `fullstack-dev-2`、以及会向仓库提交工件的 `qa-engineer`、会改仓库内文件的 `ops-engineer`、对**项目仓库**落盘的 `prompt-engineer` 分派前,核对分支策略;在 Assignment 中写明 **`Working branch`**(沿用已有分支名,或 `create <new-branch> from <base>`,其中 `<base>` 遵守上一节)。若用户已指定分支/祖先,照抄进 Assignment。**只有 `project-manager` 可以决定是否新开分支、从哪个 `<base>` 开分支。**
|
|
41
|
+
- **实现 / QA / 运维 / prompt / product-manager / architect(项目侧)**:在**首次**编辑仓库内文件或执行 `git commit` 前,核对当前分支与 Assignment,并在回报中明确"正在哪个分支上工作"。**禁止自行决定新开分支、禁止自行切回 `main`/`master` 重开分支。**若未授权 `Branch policy` 且当前在默认分支,则仅可按 PM 已写明的 `Working branch` 执行切换/开枝;若 Assignment 未写清或与现场分支不一致,先回报 `project-manager`,不得擅自处理。
|
|
42
42
|
|
|
43
43
|
## 分支协作契约(Branch Collaboration Contract)
|
|
44
44
|
|
|
45
45
|
### 适用范围
|
|
46
46
|
|
|
47
47
|
- 当任务会在项目 Git 仓库产生可合并 diff 时适用。
|
|
48
|
-
- 适用于
|
|
48
|
+
- 适用于 `project-manager`、`product-manager`、`architect`、`fullstack-dev`、`frontend-dev`、`fullstack-dev-2`、`qa-engineer`、`ops-engineer`、`prompt-engineer`(项目侧写入)。
|
|
49
49
|
|
|
50
50
|
### 唯一分支决策者
|
|
51
51
|
|
|
52
|
-
- 只有
|
|
52
|
+
- 只有 `project-manager` 可以决定分支策略:
|
|
53
53
|
- 继续在现有分支开发,或
|
|
54
54
|
- 使用 `create <new-branch> from <base>` 新开分支,或
|
|
55
55
|
- 使用 `Branch policy: direct on <branch> — <reason>`。
|
|
@@ -103,7 +103,7 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
103
103
|
|
|
104
104
|
**首要场景是开发阶段**:多条可写流 **并发** 改 **同一仓库** 时,用 worktree 做 **写入侧目录隔离**。下列规则针对该类开发并发;**QC / QA 阶段的检出约定**见下一小节。
|
|
105
105
|
|
|
106
|
-
当
|
|
106
|
+
当 **`project-manager` 在同一调度轮次内并发启动多个** subagent(含宿主侧「并行 Task / 并行 subagent」),且 **≥2 个承接方**可能对 **同一 Git 仓库的同一工作区(同一 cwd 检出目录)**产生写文件或 `git commit` 级改动时:
|
|
107
107
|
|
|
108
108
|
- **必须**为每条并发写流使用 **独立检出目录**:优先使用宿主原生 worktree/checkout 隔离能力;没有原生能力时使用 `git worktree`,并按本 skill 的目录、分支和 QC/QA 对齐规则执行。
|
|
109
109
|
- **必须**与既有分支门禁一致:每个可写承接方的 Assignment 仍须含 PM 已批准的 **`Working branch`** / **`Branch policy`**;在某一 worktree 内 **不得**擅自 `checkout` 到未授权分支或私自新建分支。
|
|
@@ -137,11 +137,11 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
137
137
|
|
|
138
138
|
开发在 **feature 分支**上完成(往往在 **独立 worktree** 中实现)后,**QC 审查与 QA 验证针对的都是这份 feature**,而不是 `main` 或任意未对齐的默认 cwd。
|
|
139
139
|
|
|
140
|
-
-
|
|
140
|
+
- **`project-manager`** 分派 **QC** 时须在 Assignment 写明与待审实现一致的 **`Working branch`**,并写明 **`Review cwd` / `Worktree path`**:**优先**沿用开发 **Completion Report** 中回报的业务仓 **实现检出路径**(即「该 feature 的 worktree」)**当且仅当**该路径上的检出分支 **`HEAD` 已包含本轮待审的全部提交**(含曾发生在其他并行 worktree、现已归并到该分支的变更)。否则 **必须**改用 **集成完成后的** `Working branch` 与对应检出路径(或在该分支上 **另开** 审查专用 worktree)。若开发未用 worktree,则写明单一明确的业务仓根路径。若审查需与开发目录 **物理分离** 但仍审 **同一分支**,可指示在 **`Working branch`** 上 **另加** 一个 worktree 专供审查(只读使用业务仓)。**多流并行开发**时的前置归并、**推荐默认编排(plan 集成分支先行)** 与误派禁令见上一小节。
|
|
141
141
|
- **三票审同一功能(强制对齐)**:分派 **QC 三审**时,除上述字段外,**必须**在 **三份 Assignment 中逐字写入相同**的 **`plan_id`** 与 **`Review range` / `Diff basis`**:
|
|
142
142
|
- **`plan_id`**:与 `{PLAN_DIR}/reports/<plan-id>/` 及主 **Plan Path** 一致;无 `{PLAN_DIR}` 流程时写 **`plan_id: N/A`**,并另给一行 **`Feature / scope label`**(不可歧义,足以与并行其它 feature 区分)。
|
|
143
|
-
- **`Review range` / `Diff basis`**:明确本次审查所针对的 **diff/提交范围**(例如 `merge-base: <target_branch-or-base-ref>` + `tip: HEAD`;或 `rev-range: <full-40>..<full-40>`;或一句 `equivalent to: git diff <merge-base>...HEAD`,以团队可复现为准)。**三名 reviewer 的 Assignment
|
|
143
|
+
- **`Review range` / `Diff basis`**:明确本次审查所针对的 **diff/提交范围**(例如 `merge-base: <target_branch-or-base-ref>` + `tip: HEAD`;或 `rev-range: <full-40>..<full-40>`;或一句 `equivalent to: git diff <merge-base>...HEAD`,以团队可复现为准)。**三名 reviewer 的 Assignment 间该字段必须完全一致**;**`qa-engineer`** 验证同一 feature 时 **复用同一 `plan_id` 与同一 `Review range` / `Diff basis`**。**热修 / QC 单审**路径也须含 **同一组字段**,仅承接方份数为 1。
|
|
144
144
|
- **三审并行**时,三名 reviewer **共用同一组 `Review cwd` / `Worktree path` + `Working branch` + `plan_id` + `Review range` / `Diff basis`**(对业务仓只读分析);**一般不必**为每位 reviewer 各开一个 worktree,除非宿主或执行环境要求进程级隔离。
|
|
145
145
|
- QC 的 **报告落盘**仍仅限 `{PLAN_DIR}/reports/`;上述约定保证 `git diff`、`git log`、lint 与所读文件与 **待合并 feature** 一致。
|
|
146
|
-
-
|
|
146
|
+
- **`project-manager`** 分派 **`qa-engineer`** 做 **本 feature 的验证**(跑测试、复现、可观察取证、或向业务仓提交测试/配置)时,须在 Assignment 中写明 **同一套** **`Review cwd` / `Worktree path`**、**`Working branch`**、**`plan_id`** 与 **`Review range` / `Diff basis`**(与 QC 三审 **逐字相同**;若 QC 已写清,QA **照抄**)。**`qa-engineer`** 在执行业务仓命令前须核对当前目录与分支与 Assignment 一致;**Report-only**、且本轮 **不涉及** 业务仓内命令/路径依赖时,若 Assignment 未写 `Review cwd`,须在回报中说明验证所基于的检出或环境,缺失则 `Blocked` 并请 PM 补全。
|
|
147
147
|
- 若 **QA 与同仓其他可写角色并发**提交测试代码,仍须遵守上文「同仓并发写入」的 **worktree** 规则(可为 QA 单开一条写入 worktree,**同一 `Working branch`**,由 PM 在 Assignment 写明)。
|
|
@@ -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
|
|
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(必读顺序)
|
|
@@ -21,10 +21,10 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
21
21
|
|
|
22
22
|
## 承接方反递归红线(NEVER / DO NOT;leaf executor 必读)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
下列行为易触发递归误派;`project-manager` 之外的角色一旦命中,须立即停止并改为本会话内可交付物,或 **`Blocked`** 回报 PM。**禁止**以「更高效」「Assignment 像 PM 编排」等理由绕开:
|
|
25
25
|
|
|
26
26
|
- **NEVER** 在本会话内调用 Task / subagent,且其 `subagent_type` **等于**你当前的 **`Execute as`** 角色 id。
|
|
27
|
-
- **NEVER** 把 Assignment 里出现的 **任何**
|
|
27
|
+
- **NEVER** 把 Assignment 里出现的 **任何** plain `role-id` 提及、反引号 `` `<role-id>` ``、**Handoff**、**QA note**、**Completion Report** 模板里的角色名、路由表下游角色当成「立刻 invoke」的指令;这些是**叙事 / 路由文档 / 后续 PM 编排意图**,不是命令。
|
|
28
28
|
- **NEVER** 把「分解为多个计划 / 多 phase / 多 track」等**设计产物层面**的并行或拆分读成「应 invoke 与子会话数量对应的多个 subagent」。**纸面产物**由本会话写盘完成;并行**调度**由 PM 在后续轮次决定。
|
|
29
29
|
- **NEVER** 因宿主**暴露**了 `Task` 或若干 `subagent_type` 名称就推断可以调用。**工具可用 ≠ 授权使用**;授权只来自 **`Delegation: allowed (...)`**。
|
|
30
30
|
- **NEVER**(非 PM)主动执行 parallel-agent dispatch 来分派子代理;需要并行时回报 PM。
|
|
@@ -42,20 +42,21 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
42
42
|
|
|
43
43
|
## 调度防串扰(强制;leaf executor 已在上方读过反递归红线,此处为完整规则供 PM/对照用)
|
|
44
44
|
|
|
45
|
-
- 只有
|
|
45
|
+
- 只有 **`project-manager`** 可以决定增加/并行 subagent;承接方**默认不得二次分派**。
|
|
46
46
|
- **`Execute as: <role-id>`** = 承接方**亲自**完成本单,**不是**再起同名 subagent 或嵌套同 `subagent_type` 的 Task(禁止**递归误派**)。
|
|
47
47
|
- 额外代理仅以 **`Delegation: allowed (...)`** 为准;未显式写时视为 **`Delegation: forbidden`**。
|
|
48
|
-
- Assignment 正文中的
|
|
48
|
+
- Assignment 正文中的 role 引用:默认 **plain id**(`product-manager`);OpenCode 见 **`mstar-host/references/opencode.md`** § Role-mention hygiene。
|
|
49
49
|
- 承接方若判断必须增加 subagent,应先回报 **`Blocked`** 请 PM 重分派。
|
|
50
|
-
- Per-task informal review, when PM explicitly allows it, must not use
|
|
50
|
+
- Per-task informal review, when PM explicitly allows it, must not use `qc-specialist*`; use `generalPurpose` or PM-marked informal `qa-engineer`. Formal QC remains `mstar-review-qc`.
|
|
51
51
|
|
|
52
52
|
## 并发分派完整性门禁(PM 强制)
|
|
53
53
|
|
|
54
54
|
当 PM 声明「并发分派」时,须同时满足**文案并发**与**工具并发**:
|
|
55
55
|
|
|
56
56
|
- **工具并发**:同一调度轮次内,多个 subagent 调用须在**同一条 assistant 消息**里一次性发出(宿主允许时)。
|
|
57
|
-
- **QC
|
|
58
|
-
- **QC
|
|
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,20 @@ 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 task reviewer after each — **never** parallel implementers (write conflicts).
|
|
73
|
+
- File handoffs only — no pasted plan/diff/history in dispatch prompts.
|
|
74
|
+
- Record per-task BASE SHA; use `review-package` for diffs — **never `HEAD~1`**.
|
|
75
|
+
- After all tasks: branch `review-package` → **mandatory tri-review N=3** when `Execution mode: sdd`; **N=1** only for `inline` / explicit single override.
|
|
76
|
+
|
|
67
77
|
## 并行规则(摘要)
|
|
68
78
|
|
|
69
|
-
-
|
|
70
|
-
- **QC
|
|
71
|
-
-
|
|
79
|
+
- 独立模块可并行 **implement 轨道**(不同 dev Assignment);**SDD 单 plan 内 task** 仍串行。
|
|
80
|
+
- **Plan QC tri** after SDD task loop(`Execution mode: sdd`);**单席**仅 `inline` / hotfix。共用 `Review cwd` / `Working branch` / `plan_id` / `Review range`(**`mstar-branch-worktree`**)。
|
|
81
|
+
- **Tri 同消息规则**:plan QC tri(SDD 或 Assignment 显式 `QC mode: full tri-review`)时三席 **同一条消息**、**同一套** scope 字段。
|
|
72
82
|
|
|
73
83
|
## Specialist review-and-edit dispatch
|
|
74
84
|
|
|
@@ -83,8 +93,9 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
83
93
|
|
|
84
94
|
## 反模式(派发)
|
|
85
95
|
|
|
86
|
-
- QC
|
|
87
|
-
- 仅 1 次 invoke
|
|
96
|
+
- QC 三审拆在多条消息(tri 模式)或单席却未附 review-package 路径。
|
|
97
|
+
- 仅 1 次 invoke 却声称「tri-review 已并行启动」(tri 模式 N=3)。
|
|
98
|
+
- SDD 并行 implementer dispatch。
|
|
88
99
|
- 递归同角色 subagent;把 Handoff / 多轨编排措辞当 invoke。
|
|
89
100
|
- Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
|
|
90
101
|
- Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
|
|
@@ -14,7 +14,7 @@ Before any Task/subagent call (if I somehow forget the preamble):
|
|
|
14
14
|
2. Does the Assignment include **`Delegation: allowed (...)`**? If no → **no** Task/subagent.
|
|
15
15
|
3. Is my next step a Task/subagent invoke? If yes without (2) → **stop**; use Read/Write/Shell/Edit in-session or **`Blocked`**.
|
|
16
16
|
4. Is `subagent_type` equal to my `Execute as`? If yes → **forbidden** (recursive dispatch).
|
|
17
|
-
5. Am I treating
|
|
17
|
+
5. Am I treating plain `role-id` mentions, Handoff, QA note, Completion Report roles, or multi-plan/multi-track **design text** as invoke commands? If yes → **stop**; deliver in-session.
|
|
18
18
|
6. Am I invoking because the tool exists? **Available ≠ authorized.**
|
|
19
19
|
7. Need parallel work or PM-only dispatch? → **`Blocked`**; PM dispatches on the next round.
|
|
20
20
|
|
|
@@ -30,7 +30,7 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
|
|
|
30
30
|
|
|
31
31
|
## 最小交付循环
|
|
32
32
|
|
|
33
|
-
**per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement
|
|
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
|
|
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
|
|
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 归档 |
|
|
@@ -108,7 +109,7 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
|
|
|
108
109
|
|
|
109
110
|
| 宿主 | 要点 |
|
|
110
111
|
|------|------|
|
|
111
|
-
| OpenCode | `question
|
|
112
|
+
| OpenCode | `question`、**task tool**(**subagent** 参数)→ `references/opencode.md` |
|
|
112
113
|
| Cursor | Task 并行 QC;Plan 双写 → `references/cursor.md` · `cursor-plan-mode-bridge.md` |
|
|
113
114
|
| Codex | plugin skills、sandbox/apply_patch/tool discovery;无 invoke 工具时不声称 subagent dispatch → `references/codex.md` |
|
|
114
115
|
| 其它 | 同 `mstar-host` skill;按工具信号选 reference |
|
|
@@ -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
|
-
|
|
|
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` |
|
|
@@ -146,6 +148,7 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
|
|
|
146
148
|
| CreatePlan 不落盘 / 无 `{HARNESS_DIR}` mirror | `mstar-host` · `cursor-plan-mode-bridge` |
|
|
147
149
|
| 临时方案 / 后续计划只写在对话里 | `mstar-phase-gates` · Durable Roadmap Gate |
|
|
148
150
|
| Phase 1 review chain 未完成即 commit | `mstar-iteration` §1.6;PM 代做专业角色编辑;或三角色并行派发 |
|
|
151
|
+
| OpenCode prompt 含多个 prefix-style role mention | `mstar-host/references/opencode.md` § Role-mention hygiene |
|
|
149
152
|
| Phase 2 paste-only / PM 自实现 | `mstar-dispatch-gates` |
|
|
150
153
|
| Phase 3 折叠进 final plan closure / 跳过 §3.1 gate | `mstar-iteration` §3.0–§3.5 |
|
|
151
154
|
| Phase 4 开 PR 后跳过 merge-ready loop | `mstar-iteration` §5 |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-host
|
|
3
|
-
description: Morning Star host adapter (OpenCode, Cursor, Codex). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question
|
|
3
|
+
description: Morning Star host adapter (OpenCode, Cursor, Codex). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Morning Star Host Adapter
|
|
@@ -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
|
|
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
|
|
|
@@ -28,7 +28,7 @@ Use **capability signals** (not filesystem paths):
|
|
|
28
28
|
| Signal | Host | Next read |
|
|
29
29
|
|--------|------|-----------|
|
|
30
30
|
| **CreatePlan** / **SwitchMode** available | `cursor` | `references/cursor.md`; Plan mode also `references/cursor-plan-mode-bridge.md` |
|
|
31
|
-
| **`question`** tool or
|
|
31
|
+
| **`question`** tool or **`task`** tool (**subagent** invoke) | `opencode` | `references/opencode.md` |
|
|
32
32
|
| **Task** + `subagent_type`, no CreatePlan | `cursor` | `references/cursor.md` |
|
|
33
33
|
| **Codex app/CLI/plugin context**, `/plan`, `/goal`, Goal tools, `functions.*`, `codex_app.*`, `tool_search`, Browser plugin tools | `codex` | `references/codex.md`; Plan/Goal mode also `references/codex-plan-goal-mode-bridge.md` |
|
|
34
34
|
| Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, and **`codex.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
|
|
@@ -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
|
|
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
|
|
@@ -7,7 +7,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (Task tool uses same turn model
|
|
|
7
7
|
## Cursor-only context
|
|
8
8
|
|
|
9
9
|
- Role prompts: `mstar-roles`; **`/pm`** → `project-manager` via `pm` skill + `mstar-roles`.
|
|
10
|
-
- Routing-eval: `.cursor/skills/mstar-routing-eval/` —
|
|
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,11 @@ 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
|
|
41
|
+
## Task tool (QC: SDD → N=3)
|
|
42
42
|
|
|
43
|
-
-
|
|
44
|
-
-
|
|
45
|
-
-
|
|
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`**.
|
|
48
46
|
|
|
49
47
|
## Dispatch execution(canonical)
|
|
50
48
|
|
|
@@ -68,9 +66,21 @@ Implementation roles use `mstar-coding-behavior` for RCA, test-first checks, rev
|
|
|
68
66
|
|
|
69
67
|
## Gotchas
|
|
70
68
|
|
|
71
|
-
-
|
|
69
|
+
- Single-seat and tri-review need identical `plan_id` and review scope fields.
|
|
72
70
|
- Task parallelism does not relax branch/worktree isolation.
|
|
73
71
|
|
|
72
|
+
## Model tier (SDD + QC)
|
|
73
|
+
|
|
74
|
+
Map Assignment **`Model tier`** to Task `model` (host-specific slugs):
|
|
75
|
+
|
|
76
|
+
| Tier | Typical use |
|
|
77
|
+
|------|-------------|
|
|
78
|
+
| `fast` | Transcription tasks; 1–2 file mechanical edits |
|
|
79
|
+
| `standard` | SDD prose implementer; task reviewer floor; plan QC tri seats |
|
|
80
|
+
| `capable` | Large branch QC diff; integration judgment |
|
|
81
|
+
|
|
82
|
+
**Turn count beats token price** — reviewers and prose implementers use `standard` floor minimum. See `mstar-sdd` SKILL.
|
|
83
|
+
|
|
74
84
|
## Project rules
|
|
75
85
|
|
|
76
86
|
Project `AGENTS.md` / `CLAUDE.md` upward from cwd override global harness defaults when they conflict with Cursor-side rules; user instructions win.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenCode host reference
|
|
2
2
|
|
|
3
|
-
Load when **`mstar-host`** detection resolves **opencode** (`question` tool,
|
|
3
|
+
Load when **`mstar-host`** detection resolves **opencode** (`question` tool, **task tool** with **subagent** parameter, or OpenCode session).
|
|
4
4
|
|
|
5
5
|
Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
|
|
6
6
|
|
|
@@ -12,23 +12,50 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
|
|
|
12
12
|
|
|
13
13
|
## OpenCode-specific capabilities
|
|
14
14
|
|
|
15
|
-
- **Structured clarify**: prefer
|
|
16
|
-
- **Built-in subagents
|
|
17
|
-
- **Named
|
|
15
|
+
- **Structured clarify**: prefer **`question`** tool (title, prompt, options, optional custom text). Requires `permission.question` in config (user-maintained; do not edit global config without consent).
|
|
16
|
+
- **Built-in subagents** (via **task tool**): **explore** (read-only), **general**; subject to `mstar-harness-core` explore boundaries.
|
|
17
|
+
- **Named role subagents**: Morning Star roles configured under `opencode.json` `agent.<id>` — PM must **call the task tool** with **`subagent`** set to that agent id. Assignment Markdown alone does not open subagent sessions.
|
|
18
18
|
- **Per-role models**: configurable per subagent in `opencode.json`.
|
|
19
19
|
|
|
20
|
-
##
|
|
20
|
+
## PM dispatch (task tool + subagent)
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
Harness **dispatch** on OpenCode = **one or more `task` tool calls**, each with **`subagent: <agent-id>`** (read the tool schema every session).
|
|
23
|
+
|
|
24
|
+
| Harness | OpenCode |
|
|
25
|
+
|---------|----------|
|
|
26
|
+
| `Execute as: <role-id>` | **`subagent`** on **task tool** = same agent id |
|
|
27
|
+
| 1 Assignment ⇒ 1 invoke | **1 task tool** call with matching **subagent** + prompt from Assignment |
|
|
28
|
+
| Parallel batch **N** | **N task tool** calls in **one assistant message** when the host allows (`parallel-dispatch.md`) |
|
|
29
|
+
| No task tool call | **Not dispatched** — paste-only / `dispatch incomplete` |
|
|
30
|
+
|
|
31
|
+
PM workflow: finalize Assignment → **call task tool** with **subagent** + generated prompt → wait for subagent Completion Report → update plan / status.
|
|
32
|
+
|
|
33
|
+
## Role-mention hygiene (OpenCode)
|
|
34
|
+
|
|
35
|
+
OpenCode may **auto-append** system lines when prompt text stacks multiple agent-id **prefix mentions**. Typical boilerplate (host-generated — **not** harness Assignment):
|
|
36
|
+
|
|
37
|
+
```text
|
|
38
|
+
Use the above message and context to generate a prompt and call the task tool with subagent: <agent-id>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
(Same sentence repeated with different **subagent** values — mechanical template, not user prose.)
|
|
42
|
+
|
|
43
|
+
| Do | Don't |
|
|
44
|
+
|----|-------|
|
|
45
|
+
| Use **plain role ids** (`product-manager`) in skill / command / Assignment prose | Stack prefix-style role mentions that trigger multi-**subagent** boilerplate |
|
|
46
|
+
| Sequential chains: **one task tool / one subagent per dispatch turn** | Treat auto-appended **task tool + subagent** lines as authorized parallel batch |
|
|
47
|
+
| Real dispatch: PM **calls task tool** with explicit Assignment + **`Delegation`** rules | Confuse boilerplate with **`Delegation: allowed`** |
|
|
48
|
+
|
|
49
|
+
When documenting this in harness text, avoid embedding prefix-style role examples in the warning — that can re-trigger the host.
|
|
23
50
|
|
|
24
51
|
## Prepare phase — serial roles still require invoke
|
|
25
52
|
|
|
26
|
-
`mstar-roles` **project-manager** may route
|
|
53
|
+
`mstar-roles` **project-manager** may route `explore → product-manager → architect` **sequentially**. Each handoff still needs a real **task tool** call with the matching **subagent** and Assignment (**`N = 1`** per dispatch turn). Writing PRD / architecture only in the PM chat is **not** a substitute.
|
|
27
54
|
|
|
28
55
|
## Gotchas
|
|
29
56
|
|
|
30
57
|
- `question` availability is config-dependent; if unavailable, structured Markdown clarify.
|
|
31
|
-
-
|
|
58
|
+
- **explore** subagent (via task tool) is orientation only — not role-owned implementation or review deliverables.
|
|
32
59
|
- More MCPs do not replace phase gates or evidence rules.
|
|
33
60
|
|
|
34
61
|
## Session noise control
|
|
@@ -17,7 +17,7 @@ Printing `## Assignment` in the main thread **without** matching host invocation
|
|
|
17
17
|
|
|
18
18
|
1. Finalize all `N` Assignment payloads (after any prerequisite turn).
|
|
19
19
|
2. Count distinct `Execute as` sessions (`N`).
|
|
20
|
-
3. Issue **`N` host invocations first**
|
|
20
|
+
3. Issue **`N` host invocations first** — OpenCode: **N `task` tool** calls with **subagent**; Cursor: **N `Task`** with `subagent_type`; each with one Assignment body. For parallel work, **all `N` tool calls in one assistant message** when the host allows.
|
|
21
21
|
4. Optionally post a short **Status Update** after invocations (audit trail only — does not replace step 3).
|
|
22
22
|
|
|
23
23
|
## Hard rules
|
|
@@ -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
|
|
30
|
+
## QC default (initial wave)
|
|
31
31
|
|
|
32
|
-
-
|
|
33
|
-
-
|
|
34
|
-
|
|
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
|
|
48
|
-
5.
|
|
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)?
|