@mstar-harness/opencode 0.7.5 → 0.7.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness-commands/iteration-drive.md +38 -4
- package/harness-commands/iteration-start.md +33 -11
- package/harness-skills/mstar-dispatch-gates/SKILL.md +12 -6
- package/harness-skills/mstar-harness-core/SKILL.md +4 -3
- package/harness-skills/mstar-host/SKILL.md +1 -1
- package/harness-skills/mstar-host/references/codex.md +2 -2
- package/harness-skills/mstar-host/references/cursor.md +8 -7
- package/harness-skills/mstar-host/references/parallel-dispatch.md +1 -1
- package/harness-skills/mstar-iteration/SKILL.md +35 -15
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +17 -17
- package/harness-skills/mstar-roles/references/project-manager.md +3 -0
- package/harness-skills/pm/SKILL.md +2 -30
- package/package.json +1 -1
|
@@ -6,7 +6,34 @@ agent: project-manager
|
|
|
6
6
|
|
|
7
7
|
# Drive Iteration
|
|
8
8
|
|
|
9
|
-
Drive the active Morning Star iteration forward.
|
|
9
|
+
Drive the active Morning Star iteration forward. **Boot loads skills; this command sequences Phase 2 → Phase 3 → PR.** Domain SSOT → **`mstar-iteration`**.
|
|
10
|
+
|
|
11
|
+
## Phase state machine(禁止跳步)
|
|
12
|
+
|
|
13
|
+
```
|
|
14
|
+
Phase 2: Autonomous Execute → Phase 3: iteration-close → Completion: PR
|
|
15
|
+
(per-plan dispatch loop) (独立 gate,非 final plan) (close 之后)
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
| 当前状态 | 允许 | 禁止 |
|
|
19
|
+
|----------|------|------|
|
|
20
|
+
| 存在非 `Done` plan | Phase 2:dispatch implement / QC / QA | 进入 Phase 3 或开 PR |
|
|
21
|
+
| **全部** plan `Done` | **立刻** `## Phase 3: iteration-close`(§3.0→§3.5) | 宣称 iteration 完成、写 PR、结束会话 |
|
|
22
|
+
| Phase 3 exit checklist 全 `[x]` + compass `status: completed` | `git commit` → push → PR | 跳过 compound / roadmap / frontmatter |
|
|
23
|
+
|
|
24
|
+
**常见误判**:final plan 的 closure notes、compound 草稿、roadmap 口头更新 **≠** iteration-close。必须打印 §3.1 entry + §3.5 exit checklist。
|
|
25
|
+
|
|
26
|
+
## PM invariants(Phase 2 全程有效)
|
|
27
|
+
|
|
28
|
+
| 禁止(PM 线程) | 必须 |
|
|
29
|
+
|-----------------|------|
|
|
30
|
+
| Write/Edit/Shell 产品代码、写测试、跑 QC 审查 | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
|
|
31
|
+
| 只写 Assignment 就进入下一 gate | 同轮 dispatch:`Subagent invokes issued: N`(N = Assignment 条数) |
|
|
32
|
+
| 最后一个 plan `Done` 后直接 PR / 汇报结束 | **先** Phase 3(`mstar-iteration` §3),**再** PR(见 Completion) |
|
|
33
|
+
|
|
34
|
+
派发细则 → **`mstar-dispatch-gates`** + **`mstar-host`**。Phase 3 细则 → **`mstar-iteration` §3** + **`mstar-compound`**。
|
|
35
|
+
|
|
36
|
+
**Session todos**:进入 Phase 2 时设 plan-wave todos;当仅剩 1 个非 `Done` plan 时 **追加** `phase-3-iteration-close`(`mstar-iteration` §2.1);§3.5 完成前不得勾掉。
|
|
10
37
|
|
|
11
38
|
## Boot
|
|
12
39
|
|
|
@@ -42,13 +69,18 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
|
|
|
42
69
|
- Merge plan branch → integration branch
|
|
43
70
|
- Cross-plan progress sync → compass
|
|
44
71
|
- Next plan
|
|
45
|
-
6. Repeat until **all** plans `Done` →
|
|
72
|
+
6. Repeat until **all** plans `Done` → **STOP**(见 Phase state machine)→ 打印 `## Phase 3: iteration-close` → 执行 **`mstar-iteration` §3**;**不得**开 PR
|
|
46
73
|
|
|
47
|
-
|
|
74
|
+
派发回合纪律 → **`mstar-dispatch-gates`** + **`mstar-iteration` §2.5**。
|
|
48
75
|
|
|
49
76
|
## Phase 3: iteration-close
|
|
50
77
|
|
|
51
|
-
当 **every** plan 为 `Done`
|
|
78
|
+
当 **every** plan 为 `Done` 时:
|
|
79
|
+
|
|
80
|
+
1. **STOP** per-plan loop — 不得合并 plan 分支、写 PR、或输出「迭代完成」摘要。
|
|
81
|
+
2. 打印标题 **`## Phase 3: iteration-close`**(用户可见的 phase 边界)。
|
|
82
|
+
3. 按 **`mstar-iteration` § Phase 3** 逐步执行 §3.0→§3.5。final plan 的 closure 只能提供输入,不能替代 close gate。
|
|
83
|
+
4. §3.5 exit checklist 全 `[x]` 且 compass frontmatter `status: completed` 后,才进入下方 **Completion: Create PR**。
|
|
52
84
|
|
|
53
85
|
| Step | Section | 要点 |
|
|
54
86
|
|------|---------|------|
|
|
@@ -69,6 +101,8 @@ git push origin <spec_integration_branch>
|
|
|
69
101
|
|
|
70
102
|
## Completion: Create PR
|
|
71
103
|
|
|
104
|
+
**Precondition(HARD)**: Phase 3 complete — §3.5 exit checklist 全 `[x]`;compass YAML `status: completed` + `end_date`;compound Phase 6 索引已登记(或已记录无可结晶原因)。**不满足 → 禁止开 PR。**
|
|
105
|
+
|
|
72
106
|
All iteration-close changes committed to integration branch:
|
|
73
107
|
|
|
74
108
|
- Resolve PR target: `status.json` → `metadata.target_branch`(fallback:compass frontmatter `target_branch`)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: iteration-start
|
|
3
|
-
description: Start a new harness iteration — research backlog, lock direction with grill-me, produce compass/plans, run mandatory Review & Edit chain via Task dispatch (product-manager → architect → writing-specialist each review-and-edit, then PM final lock), then create the integration branch from an explicit base. Not Done until review chain completes, compass is locked, and base/target branches are recorded.
|
|
3
|
+
description: Start a new harness iteration — research backlog, lock direction with grill-me, produce compass/plans, run mandatory Review & Edit chain via sequential Task dispatch (product-manager → architect → writing-specialist, each review-and-edit, then PM final lock), then create the integration branch from an explicit base. Not Done until review chain completes, compass is locked, and base/target branches are recorded.
|
|
4
4
|
agent: project-manager
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -8,6 +8,20 @@ agent: project-manager
|
|
|
8
8
|
|
|
9
9
|
Start a new Morning Star harness iteration. **Not Done until the Review & Edit chain runs via dispatched roles and PM lock — not when compass files are first written.**
|
|
10
10
|
|
|
11
|
+
## PM invariants(本命令全程有效 — 读完再动手)
|
|
12
|
+
|
|
13
|
+
你是 **`project-manager` 编排者**,不是三专业角色的合并替身。
|
|
14
|
+
|
|
15
|
+
| 禁止(PM 线程) | 必须(宿主有 Task 时) |
|
|
16
|
+
|-----------------|------------------------|
|
|
17
|
+
| 自己 Edit compass/plans/specs 冒充 @product-manager / @architect / @writing-specialist 的审查编辑 | §5.1 → §5.2 → §5.3 **顺序**各 **1 次 invoke**;上一角色返回后再派发下一角色 |
|
|
18
|
+
| 只写 `## Assignment` 或 checklist 就声称 review chain 完成 | **几条角色 ⇒ 几条 invoke**;零 invoke = `dispatch incomplete`(`mstar-dispatch-gates`) |
|
|
19
|
+
| §5 完成前 commit / 创建 integration 分支 | 5.4 PM lock 在 subagent 返回且磁盘产物已修订之后(`mstar-iteration` §1.6) |
|
|
20
|
+
|
|
21
|
+
派发细则 → **`mstar-dispatch-gates`**(specialist review-and-edit dispatch)+ **`mstar-host`**(宿主 invoke 能力)。**不得**在 PM 线程加载其他 role reference 代劳。
|
|
22
|
+
|
|
23
|
+
**完成定义**:compass `status: locked` + 三角色 invoke 已返回 + pre-commit checklist 全 `[x]` — 不是初稿落盘。
|
|
24
|
+
|
|
11
25
|
Detailed workflow → **`mstar-iteration` § Phase 1: iteration-start**(含 §1.6 Review & Edit chain);per-plan Prepare gates → **`mstar-phase-gates`**(specify → clarify → plan)。
|
|
12
26
|
|
|
13
27
|
## 0. Boot
|
|
@@ -16,9 +30,10 @@ Detailed workflow → **`mstar-iteration` § Phase 1: iteration-start**(含 §
|
|
|
16
30
|
2. `mstar-roles` → `references/project-manager.md`
|
|
17
31
|
3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**
|
|
18
32
|
4. `mstar-iteration` → **§ Phase 1: iteration-start**(迭代范围、compass 模板、§1.6 Review & Edit chain、状态初始化)
|
|
19
|
-
5. `mstar-dispatch-gates`
|
|
33
|
+
5. `mstar-dispatch-gates`
|
|
20
34
|
6. `mstar-phase-gates` → Prepare(specify → clarify → plan)
|
|
21
35
|
7. `mstar-plan-conventions`, `mstar-plan-artifacts`
|
|
36
|
+
8. `mstar-host` → active host reference(invoke 能力)
|
|
22
37
|
|
|
23
38
|
## 1. Research
|
|
24
39
|
|
|
@@ -74,20 +89,27 @@ Produce harness artifacts per **`mstar-iteration` § 1.3**(template: `mstar-it
|
|
|
74
89
|
|
|
75
90
|
**STOP**: Do not run §6 Integration Branch until **all** rows below are true.
|
|
76
91
|
|
|
92
|
+
**顺序(HARD)**:`product-manager` → `architect` → `writing-specialist` → PM lock。后一角色基于前一角色已落盘的修订继续编辑;**禁止**三角色并行 invoke。
|
|
93
|
+
|
|
77
94
|
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.
|
|
78
95
|
|
|
79
|
-
| # | Role | Required action |
|
|
80
|
-
|
|
81
|
-
| 5.1 | **@product-manager** |
|
|
82
|
-
| 5.2 | **@architect** |
|
|
83
|
-
| 5.3 | **@writing-specialist** |
|
|
84
|
-
| 5.4 | **@project-manager** | Merge subagent edits; resolve conflicts; **lock** compass (`status: locked`); confirm Prepare gates |
|
|
96
|
+
| # | Role | Required action | Gate |
|
|
97
|
+
|---|------|-----------------|------|
|
|
98
|
+
| 5.1 | **@product-manager** | invoke: **edit** compass, plans, `{SPECS_DIR}/`; scope, UX, priorities | 完成后方可 5.2 |
|
|
99
|
+
| 5.2 | **@architect** | invoke: **edit** compass, plans, specs(含 5.1 修订后版本); contracts, SQL, module boundaries | 5.1 返回后;完成后方可 5.3 |
|
|
100
|
+
| 5.3 | **@writing-specialist** | invoke: **edit** all iteration docs(含 5.1–5.2 修订后版本); terminology, structure, clarity | 5.2 返回后 |
|
|
101
|
+
| 5.4 | **@project-manager** | Merge subagent edits; resolve conflicts; **lock** compass (`status: locked`); confirm Prepare gates | 5.3 返回后 |
|
|
85
102
|
|
|
86
103
|
**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.
|
|
87
104
|
|
|
88
|
-
**Tool rule (
|
|
89
|
-
|
|
90
|
-
|
|
105
|
+
**Tool rule (hosts with invoke)** — per **`mstar-dispatch-gates`** · specialist review-and-edit dispatch(**顺序链**,非 parallel batch):
|
|
106
|
+
|
|
107
|
+
1. 为当前角色写好 Assignment(含须直接编辑的文件路径;5.2/5.3 注明基于上一角色已落盘修订)。
|
|
108
|
+
2. **派发 1 次 invoke** → 等待 Completion Report / 磁盘修订完成。
|
|
109
|
+
3. 按序重复下一角色:**5.1 → 5.2 → 5.3**(每步一条派发消息、一次 invoke)。
|
|
110
|
+
4. 本条链 **禁止** PM 线程代做专业编辑;**禁止** 同条消息并行三角色;**禁止** 未等 5.1 返回就发 5.2/5.3。
|
|
111
|
+
5. 5.3 返回后,PM 线程再做 5.4 merge + lock。
|
|
112
|
+
|
|
91
113
|
- Exception: user explicitly waives subagent dispatch ("PM-only review").
|
|
92
114
|
|
|
93
115
|
**Prepare gate (per plan in compass)**:
|
|
@@ -70,20 +70,26 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
70
70
|
- **QC 三审**在 feature 开发完成后执行;三名 reviewer 共用同一组 `Review cwd` / `Working branch` / `plan_id` / `Review range` / `Diff basis`(**`mstar-branch-worktree`**)。
|
|
71
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`**)。
|
|
72
72
|
|
|
73
|
-
##
|
|
73
|
+
## Specialist review-and-edit dispatch
|
|
74
74
|
|
|
75
|
-
|
|
75
|
+
当 PM 派发**文档编辑类**专业角色(如 product-manager、architect、writing-specialist)直接修订 harness 产物时:
|
|
76
76
|
|
|
77
|
-
- PM
|
|
78
|
-
-
|
|
79
|
-
-
|
|
77
|
+
- PM 写初稿;各角色通过宿主 invoke **直接编辑**目标文件(**不**另写仅评论式 `reports/` 替代修订)。
|
|
78
|
+
- **1 Assignment ⇒ 1 invoke**。
|
|
79
|
+
- **Phase 1 Review & Edit chain**(`mstar-iteration` §1.6):**顺序** `product-manager` → `architect` → `writing-specialist`;上一角色落盘修订完成后再派发下一角色。**禁止**本链并行 batch(与 QC 三审不同)。
|
|
80
|
+
- 其他彼此独立、无先后依赖的文档编辑任务:可并行(同条消息发满 N),见 **`parallel-dispatch.md`**。
|
|
81
|
+
- PM 线程代做全部专业编辑 = **反模式**(`mstar-iteration` §1.6、`mstar-harness-core` 反模式索引)。
|
|
82
|
+
- PM merge / lock(如 compass `status: locked`)在链末 subagent 返回后于 PM 线程完成。**不得**在 review-and-edit 链完成前 commit integration 分支。
|
|
80
83
|
|
|
81
84
|
## 反模式(派发)
|
|
82
85
|
|
|
83
86
|
- QC 三审拆在多条消息或等 #1 返回再发 #2/#3。
|
|
84
87
|
- 仅 1 次 invoke 却声称「并行三审已启动」。
|
|
85
88
|
- 递归同角色 subagent;把 Handoff / 多轨编排措辞当 invoke。
|
|
86
|
-
-
|
|
89
|
+
- Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
|
|
90
|
+
- Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
|
|
91
|
+
- 全部 plan `Done` 后跳过 Phase 3 直接 PR;final plan closure 替代 `mstar-iteration` §3.1–§3.5。
|
|
92
|
+
- Assignment 已写、invoke 为零(paste-only)却进入下一 gate。
|
|
87
93
|
|
|
88
94
|
## References
|
|
89
95
|
|
|
@@ -33,7 +33,7 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
|
|
|
33
33
|
| 角色 | 始终 | 按任务追加(典型) |
|
|
34
34
|
|------|------|-------------------|
|
|
35
35
|
| **全部** | 本 skill | — |
|
|
36
|
-
| **`@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`(
|
|
36
|
+
| **`@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–3 含 compound);战略性工作 `mstar-strategy`。**不**读 `mstar-coding-behavior` |
|
|
37
37
|
| **实现/审查/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 触发) |
|
|
38
38
|
| **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
|
|
39
39
|
|
|
@@ -139,8 +139,9 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
|
|
|
139
139
|
| 无证据宣称完成 | `mstar-coding-behavior` / verification |
|
|
140
140
|
| CreatePlan 不落盘 / 无 `{HARNESS_DIR}` mirror | `mstar-host` · `cursor-plan-mode-bridge` |
|
|
141
141
|
| 临时方案 / 后续计划只写在对话里 | `mstar-phase-gates` · Durable Roadmap Gate |
|
|
142
|
-
|
|
|
143
|
-
| Phase
|
|
142
|
+
| Phase 1 review chain 未完成即 commit | `mstar-iteration` §1.6;PM 代做专业角色编辑;或三角色并行派发 |
|
|
143
|
+
| Phase 2 paste-only / PM 自实现 | `mstar-dispatch-gates` |
|
|
144
|
+
| Phase 3 折叠进 final plan closure / 跳过 §3.1 gate | `mstar-iteration` §3.0–§3.5 |
|
|
144
145
|
| iteration-close 无 frontmatter completed / 漏 compound Phase 6 | `mstar-iteration` §3.0.5、§3.4、§3.2 #5 |
|
|
145
146
|
| iteration 默认 `main` 作 base 或 PR 目标 | `mstar-iteration` §1.2、§2.3;`mstar-plan-conventions` Spec 分支模型 |
|
|
146
147
|
|
|
@@ -35,7 +35,7 @@ Use **capability signals** (not filesystem paths):
|
|
|
35
35
|
|
|
36
36
|
## Parallel dispatch (invoke-capable hosts)
|
|
37
37
|
|
|
38
|
-
When PM dispatches **N >= 2** concurrent assignees (QC tri-review, dual-track implement, etc.) and the host exposes actual invoke / Task / subagent tools, read **`references/parallel-dispatch.md`** in the dispatch round (shared with `mstar-dispatch-gates`). Without a callable invoke tool
|
|
38
|
+
When PM dispatches **N >= 2** concurrent assignees (QC tri-review, dual-track implement, etc.) and the host exposes actual invoke / Task / subagent tools, read **`references/parallel-dispatch.md`** in the dispatch round (shared with `mstar-dispatch-gates`). Without a callable invoke tool when dispatch is required → **`Blocked`**; Assignment Markdown alone is not dispatch.
|
|
39
39
|
|
|
40
40
|
## Library docs (Context7)
|
|
41
41
|
|
|
@@ -37,8 +37,8 @@ Use skill names in prompts and references. Avoid absolute local paths unless the
|
|
|
37
37
|
|
|
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
|
-
- If no invoke tool is present,
|
|
41
|
-
- QC tri-review
|
|
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.
|
|
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
|
|
@@ -46,15 +46,16 @@ Enforcement: `rules/mstar-cursor-plan-mode.mdc` when plugin active.
|
|
|
46
46
|
- Parallel QC ≠ different review cwd per reviewer; one integrated HEAD for scope.
|
|
47
47
|
- Status Update may note QC ran via parallel Task subagents.
|
|
48
48
|
|
|
49
|
-
##
|
|
49
|
+
## Dispatch execution(canonical)
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
Cursor PM dispatch = **`Task`** with `subagent_type` matching the Assignment `Execute as` role.
|
|
52
52
|
|
|
53
|
-
**
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
53
|
+
- **1 Assignment ⇒ 1 Task**; parallel batches ⇒ **N Tasks in one message** (`parallel-dispatch.md`, `mstar-dispatch-gates`).
|
|
54
|
+
- Assignment Markdown **does not** start work. PM thread **must not** implement, review, or edit specialist deliverables by loading another role reference in the same session (`Acting as role: …` is **not** dispatch).
|
|
55
|
+
- No callable `Task` / subagent for required work → **`Blocked`** — report to user; do not substitute in-thread execution.
|
|
56
|
+
- **Only exception:** user explicitly overrides harness dispatch for this turn (document the override).
|
|
57
|
+
- Concurrent writers / QC cwd alignment → **`mstar-branch-worktree`** (not a separate “mode”).
|
|
58
|
+
- Implement subagents: recipient is already `Execute as`; **no** recursive Task with same `subagent_type`. Assignment wins (`Delegation: forbidden` unless stated).
|
|
58
59
|
|
|
59
60
|
## Clarify
|
|
60
61
|
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Shared PM dispatch contract for **any** host that uses subagent / Task / named-role invoke (OpenCode, Cursor Task, Codex only when a callable multi-agent / Task tool is actually available). Process SSOT also in `mstar-dispatch-gates`.
|
|
4
4
|
|
|
5
|
-
If the active host has no callable invoke tool, this reference does not create delegation capability
|
|
5
|
+
If the active host has no callable invoke tool, this reference does not create delegation capability — mark dispatch **`Blocked`** and report to the user. Do not substitute PM-thread or single-session role execution unless the user explicitly overrides harness dispatch for this turn.
|
|
6
6
|
|
|
7
7
|
## Paste-only failure
|
|
8
8
|
|
|
@@ -22,10 +22,20 @@ iteration-start → [per-plan lifecycle × N] → iteration-close → PR → mer
|
|
|
22
22
|
│ Review & Edit chain → PM lock │ 标记迭代完成
|
|
23
23
|
│ 创建 integration 分支 │ commit 到 integration 分支
|
|
24
24
|
│ │
|
|
25
|
-
└────────
|
|
25
|
+
└──────── Phase 2(Autonomous Execute)────────┘
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
**关键定位**:iteration-close 是
|
|
28
|
+
**关键定位**:Phase 3 iteration-close 是 **Autonomous Execute 之后的独立 Phase**,在 integration 分支上执行,**完成后再创建 PR**。所有 compound 产物(knowledge docs、compass 更新、CONCEPTS.md)作为迭代交付的一部分随 PR 合入已记录的 `target_branch`。一次迭代 = 一个 PR。
|
|
29
|
+
|
|
30
|
+
## Phase transition gates(HARD — 防跳步)
|
|
31
|
+
|
|
32
|
+
| 边界 | 触发 | 必须 | 禁止 |
|
|
33
|
+
|------|------|------|------|
|
|
34
|
+
| **→ Phase 3** | `status.json` 中 compass 登记的全部 plan 均为 `Done` | 打印 `## Phase 3: iteration-close`;执行 §3.0→§3.5;host todo `phase-3-iteration-close` 保持 open 直至 §3.5 | 开 PR;宣称 iteration 完成;仅依赖 final plan closure |
|
|
35
|
+
| **→ PR** | §3.5 exit checklist 全 `[x]`;frontmatter `status: completed` + `end_date` | commit integration 分支 → PR 到 `metadata.target_branch` | 跳过 §3.1 entry checklist 或 compound Phase 6 |
|
|
36
|
+
| **iteration-start → integration branch** | §1.6 Review & Edit chain | 三角色 **按序** invoke 完成 + compass `status: locked` | PM 线程代做三角色编辑;并行三角色;review 前 commit |
|
|
37
|
+
|
|
38
|
+
**误判信号**:对话里出现 compound 摘要、roadmap 更新、或「所有 plan 已完成」但 **未** 打印 §3.1 / §3.5 checklist → 视为 **Phase 3 未执行**,回到 §3.0。
|
|
29
39
|
|
|
30
40
|
**per-plan 状态 SSOT**:`{HARNESS_DIR}/status.json`(per-plan Todo/InProgress/InReview/Done)。
|
|
31
41
|
**迭代状态 SSOT**:`{ITERATION_DIR}/<id>-delivery-compass.md` frontmatter `status` + `{ITERATION_DIR}/README.md` 索引。
|
|
@@ -123,7 +133,7 @@ plans: []
|
|
|
123
133
|
|
|
124
134
|
### 1.5 登记到 status.json(formal iteration 必填)
|
|
125
135
|
|
|
126
|
-
iteration
|
|
136
|
+
iteration 正式全流程**必须**写入 `{HARNESS_DIR}/status.json`:
|
|
127
137
|
|
|
128
138
|
- root `metadata.iteration_base_branch` — 创建 `spec_integration_branch` 的祖先 ref(**不是**隐式 `main`)
|
|
129
139
|
- root `metadata.target_branch` — iteration-close 后 PR 的目标分支
|
|
@@ -133,18 +143,18 @@ compass frontmatter 的 `iteration_base_branch` / `target_branch` **必须与**
|
|
|
133
143
|
|
|
134
144
|
### 1.6 Review & Edit chain(integration 分支前强制)
|
|
135
145
|
|
|
136
|
-
**
|
|
137
|
-
|
|
138
|
-
与 host 命令 `iteration-start` §5 对齐:产物 SSOT 在本节;派发机制 SSOT 在命令 + **`mstar-dispatch-gates`**。
|
|
146
|
+
**Phase 1 在 PM lock 前不算完成**——compass/plans 初稿落盘 ≠ Done。
|
|
139
147
|
|
|
140
|
-
PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直到:
|
|
148
|
+
派发机制 → **`mstar-dispatch-gates`**(specialist review-and-edit dispatch,**顺序链**)。PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直到:
|
|
141
149
|
|
|
142
|
-
1. **@product-manager
|
|
150
|
+
1. **@product-manager** → **@architect** → **@writing-specialist** 已按序通过宿主 invoke **直接编辑**(非仅评论)compass、plans 及受影响 specs;每一环基于上一环落盘修订
|
|
143
151
|
2. PM 将 compass `status` 设为 `locked`,并确认各 plan 的 Prepare gate(specify / clarify / plan)
|
|
144
152
|
|
|
153
|
+
**顺序理由**:产品范围与优先级 → 架构与契约 → 术语与行文;并行会导致后手重复劳动或覆盖前手未定稿内容。
|
|
154
|
+
|
|
145
155
|
**完成证据** = 磁盘上的 compass / plans / specs 修订 + compass `status: locked`。**不**要求 `reports/<iteration-id>/` 审查报告——迭代审查的 SSOT 是被编辑的文档本身,无 per-plan QC 式审计链。
|
|
146
156
|
|
|
147
|
-
**反模式**:PM
|
|
157
|
+
**反模式**:PM 线程代替三角色完成全部编辑而不 invoke;或将本链三角色并行派发 —— 见 **`mstar-harness-core`** 反模式索引。
|
|
148
158
|
|
|
149
159
|
---
|
|
150
160
|
|
|
@@ -158,10 +168,10 @@ PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直
|
|
|
158
168
|
|
|
159
169
|
1. `{HARNESS_DIR}/status.json` 中至少一条 plan `status` ≠ `Done`
|
|
160
170
|
2. **Pre-implement gate = GO**:plan 已 locked、tasks ready(见 `mstar-phase-gates`)
|
|
161
|
-
3. 用户意图为 **continue Execute
|
|
171
|
+
3. 用户意图为 **continue Autonomous Execute**(推进迭代 Execute、继续 per-plan 循环等)
|
|
162
172
|
4. **Branch metadata gate**:root `metadata.iteration_base_branch`、`metadata.target_branch` 已登记,且至少一条 active plan 有 `metadata.spec_integration_branch`(或可从 compass 同轮 backfill)。**缺失 → STOP**,不得用 `main`/`master` 补位。
|
|
163
173
|
|
|
164
|
-
任一 false → **stop**。Prepare 未完成 →
|
|
174
|
+
任一 false → **stop**。Phase 1 / Prepare 未完成 → 先完成 Phase 1 或 per-plan Prepare,再进入本 Phase。
|
|
165
175
|
|
|
166
176
|
### 2.1 Session todos(派发前设护栏)
|
|
167
177
|
|
|
@@ -169,7 +179,7 @@ PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直
|
|
|
169
179
|
|
|
170
180
|
| Host | 工具 | 最小集合 |
|
|
171
181
|
|------|------|---------|
|
|
172
|
-
| **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/QA);分支 checkpoint |
|
|
182
|
+
| **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/QA);分支 checkpoint;**仅剩 1 个非 Done plan 时追加 `phase-3-iteration-close`**(Done 后保持 open 直至 §3.5) |
|
|
173
183
|
| **Codex** | `update_plan` / Goal UI | 同上 |
|
|
174
184
|
| **OpenCode** | host todo/plan UI(如有) | 同上 |
|
|
175
185
|
|
|
@@ -211,10 +221,20 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
211
221
|
5. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 的 `## Plans` 表状态列
|
|
212
222
|
6. **Next plan** 从步骤 1 继续
|
|
213
223
|
|
|
214
|
-
全部 plan `Done` → **
|
|
224
|
+
全部 plan `Done` → **Phase transition gate**(见上文 **Phase transition gates**):
|
|
225
|
+
|
|
226
|
+
1. **STOP** per-plan loop — 禁止 merge 后继续下一 plan、禁止开 PR、禁止会话结束语。
|
|
227
|
+
2. 打印 **`## Phase 3: iteration-close`**。
|
|
228
|
+
3. 按 §3.0 起独立执行至 §3.5。final plan 的 Assignment / closure 仅作输入,**不能**替代 Phase 3 gate。
|
|
215
229
|
|
|
216
230
|
### 2.5 Dispatch-first(implement 派发约束)
|
|
217
231
|
|
|
232
|
+
**派发回合纪律**(Cursor Task / 具名 invoke 宿主):
|
|
233
|
+
|
|
234
|
+
1. 准备 Assignment 的消息可只含 read/bash — **不计入**派发。
|
|
235
|
+
2. **下一条派发消息**的第一动作 = 发出全部 `Task`(QC 初轮 **N=3** 同条消息;双轨 implement **N=2**)。
|
|
236
|
+
3. `Subagent invokes issued: 0` 而 Assignment 已写出 → **`dispatch incomplete`**;下一条必须补发 invoke,**禁止** PM 线程亲自实现顶替。
|
|
237
|
+
|
|
218
238
|
| Do | Don't |
|
|
219
239
|
|----|------|
|
|
220
240
|
| **Loop:** `## Assignment` → invoke → Completion Report v2 → 更新 status → next | PM 亲自 Write/Edit/Shell 产品代码 |
|
|
@@ -235,7 +255,7 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
235
255
|
|
|
236
256
|
## Phase 3: iteration-close(收口迭代)
|
|
237
257
|
|
|
238
|
-
PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支上运行**,产出物 commit 到 integration 分支,随迭代 PR 合入 root `metadata.target_branch
|
|
258
|
+
PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支上运行**,产出物 commit 到 integration 分支,随迭代 PR 合入 root `metadata.target_branch`。入口:Phase 2 全部 plan `Done` 后按 **Phase transition gates** 进入。
|
|
239
259
|
|
|
240
260
|
**Close Done 定义**:§3.1→§3.5 全部完成;compass frontmatter 写入 `status: completed` + `end_date`;每篇新增 knowledge doc 已登记 `{KNOWLEDGE_DIR}/README.md`。只在 final plan 中写了 compound / roadmap / PR 说明,不算 iteration-close 完成。
|
|
241
261
|
|
|
@@ -358,7 +378,7 @@ PR 目标使用 root `metadata.target_branch`;缺失时停止并补齐,不
|
|
|
358
378
|
## NOT to do
|
|
359
379
|
|
|
360
380
|
- 不要在 per-plan Done 后立即单独 compound——等 iteration-close 统一做
|
|
361
|
-
- 不要在
|
|
381
|
+
- 不要在 Autonomous Execute(Phase 2)中修改 per-plan gate 判定
|
|
362
382
|
- 不要用 compass 替代 `status.json` 作为 plan 状态 SSOT
|
|
363
383
|
- 不要在没有完成 per-plan 前置检查的情况下进入 iteration-close
|
|
364
384
|
- 不要在缺少 `iteration_base_branch` / `target_branch` 时默认使用 `main` / `master`
|
|
@@ -92,25 +92,25 @@ Status values: `Todo` | `InProgress` | `InReview` | `Done` | `Blocked`
|
|
|
92
92
|
|
|
93
93
|
| Field | Required | When to fill |
|
|
94
94
|
|-------|----------|-------------|
|
|
95
|
-
| `iteration_id` | Yes |
|
|
96
|
-
| `start_date` | Yes |
|
|
97
|
-
| `end_date` | No |
|
|
98
|
-
| `status` | Yes |
|
|
99
|
-
| `iteration_base_branch` | Yes |
|
|
100
|
-
| `target_branch` | Yes |
|
|
101
|
-
| `plans` (frontmatter) | Recommended |
|
|
102
|
-
| `## Plans` table | Yes |
|
|
103
|
-
| `## Milestones` | Recommended |
|
|
104
|
-
| `## Acceptance Criteria` | Yes |
|
|
105
|
-
| `## Non-Goals` | Yes |
|
|
106
|
-
| `## Roadmap Position` | **Yes** |
|
|
107
|
-
| `## Risk Register` | Optional |
|
|
108
|
-
| `## Compound Round Summary` | Yes |
|
|
109
|
-
| `## Iteration Retrospective` | Recommended |
|
|
95
|
+
| `iteration_id` | Yes | Phase 1 |
|
|
96
|
+
| `start_date` | Yes | Phase 1 |
|
|
97
|
+
| `end_date` | No | Phase 3 §3.4 only |
|
|
98
|
+
| `status` | Yes | Phase 1 → `active` / `locked`(§1.6 PM lock);Phase 3 §3.4 → **`completed`**(YAML frontmatter,非 prose completion status) |
|
|
99
|
+
| `iteration_base_branch` | Yes | Phase 1; integration branch must be created from this ref |
|
|
100
|
+
| `target_branch` | Yes | Phase 1; final PR target after Phase 3 |
|
|
101
|
+
| `plans` (frontmatter) | Recommended | Phase 1 (initial), Phase 2 (add new) |
|
|
102
|
+
| `## Plans` table | Yes | Phase 2 (sync status), Phase 3 (final) |
|
|
103
|
+
| `## Milestones` | Recommended | Phase 1, Phase 2 (update) |
|
|
104
|
+
| `## Acceptance Criteria` | Yes | Phase 1 |
|
|
105
|
+
| `## Non-Goals` | Yes | Phase 1 |
|
|
106
|
+
| `## Roadmap Position` | **Yes** | Phase 1(必填节,非散落于 general context prose);Phase 3 §3.3(current iteration → `delivered`) |
|
|
107
|
+
| `## Risk Register` | Optional | Phase 1, Phase 2 (update) |
|
|
108
|
+
| `## Compound Round Summary` | Yes | Phase 3 §3.4 |
|
|
109
|
+
| `## Iteration Retrospective` | Recommended | Phase 3 §3.4 |
|
|
110
110
|
|
|
111
111
|
## Legacy compass drift
|
|
112
112
|
|
|
113
113
|
若仓库中已有 compass **无** YAML frontmatter、**无** `## Roadmap Position`,或只有 prose completion status:
|
|
114
114
|
|
|
115
|
-
- **新迭代**:
|
|
116
|
-
- **收口时**:`mstar-iteration` §3.0.5 在
|
|
115
|
+
- **新迭代**:Phase 1 必须按本模板重写,不延续 prose-only 惯例。
|
|
116
|
+
- **收口时**:`mstar-iteration` §3.0.5 在 Phase 3 入口规范化,再执行 §3.3–§3.4。
|
|
@@ -116,6 +116,9 @@ If any item below matches, fix the dispatch/plan state or mark `Blocked`—do **
|
|
|
116
116
|
- **NEVER** label `QA: skipped` for report-only QA—still dispatch `@qa-engineer` with report-only mode; QC skip rules are separate and explicit.
|
|
117
117
|
- **NEVER** let non-PM/non-QA roles mark plan `Done`.
|
|
118
118
|
- **NEVER** accept “temporary workaround”, “follow-up later”, “next plan”, or “split into batches” as narrative-only scope management. If work is deferred or staged, write the roadmap/tracking location before implement GO or Done.
|
|
119
|
+
- **NEVER** perform specialist document edits in the PM thread when host invoke is required — that is `dispatch incomplete` (`mstar-dispatch-gates`, `mstar-iteration` §1.6).
|
|
120
|
+
- **NEVER** mark the last plan `Done` and then create a PR or declare the iteration complete without **`## Phase 3: iteration-close`** and `mstar-iteration` §3.1–§3.5 checklists.
|
|
121
|
+
- **NEVER** treat final plan closure prose as iteration-close — compound, roadmap `delivered`, and compass `status: completed` require Phase 3.
|
|
119
122
|
|
|
120
123
|
---
|
|
121
124
|
|
|
@@ -40,37 +40,9 @@ Prepare/Execute gates, routing, Assignment templates, Task Board, QC tri-review,
|
|
|
40
40
|
|
|
41
41
|
**Exceptions:** user explicitly asks PM thread to implement; hotfix per `mstar-phase-gates`.
|
|
42
42
|
|
|
43
|
-
##
|
|
43
|
+
## Iteration
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
- **Do not** commit to `iteration/<iteration-id>` until Review & Edit chain completes(§1.6)。
|
|
48
|
-
- Dispatch **@product-manager**, **@architect**, **@writing-specialist** via host Task — **one invoke per role minimum**(parallel when independent)。
|
|
49
|
-
- PM final lock is PM-whitelist work(compass `status: locked`, merge conflicts, Prepare gate confirmation)。
|
|
50
|
-
- **Not** PM-whitelist: performing all three specialist document edits without subagent Task.
|
|
51
|
-
|
|
52
|
-
Before §6 Integration Branch, print **`iteration-start` pre-commit checklist**(command §5); all items must be `[x]`。
|
|
53
|
-
|
|
54
|
-
## iteration-close(drive / 全部 plan Done 后)
|
|
55
|
-
|
|
56
|
-
**`mstar-iteration` § Phase 3** 为独立 Phase;final plan closure 只能作为输入。
|
|
57
|
-
|
|
58
|
-
- 全部 plan `Done` 后 **STOP** loop,打印 Phase 3 入场,从 §3.0 执行至 §3.5。
|
|
59
|
-
- §3.1 close entry checklist 与 §3.5 close exit checklist 必须在对话中打印;全部为 `[x]` 方可 commit / PR。
|
|
60
|
-
- 每篇新增 compound doc 必须完成 `mstar-compound` Phase 6(`{KNOWLEDGE_DIR}/README.md`)。
|
|
61
|
-
- compass 完成形式:frontmatter `status: completed` + `end_date` + `## Roadmap Position` current iteration `delivered`——prose completion status 不算。
|
|
62
|
-
|
|
63
|
-
## iteration branch policy(start + drive)
|
|
64
|
-
|
|
65
|
-
| 字段 | 含义 | 禁止 |
|
|
66
|
-
|------|------|------|
|
|
67
|
-
| `iteration_base_branch` | 创建 `spec_integration_branch` 的祖先 ref | 未记录时假定 `main` |
|
|
68
|
-
| `spec_integration_branch` | plan feature 分支 merge 靶 | 从当前 checkout 随意开枝 |
|
|
69
|
-
| `target_branch` | iteration-close 后 PR 目标 | 未记录时 PR 到 `main` |
|
|
70
|
-
|
|
71
|
-
- **iteration-start**:grill-me / §6 与用户锁定;写入 compass frontmatter + `status.json` `metadata`。
|
|
72
|
-
- **iteration-drive**:§2.0 #4 + §2.3 执行前校验;创建 integration 分支必须用记录的 base。
|
|
73
|
-
- QC `Review range` merge-base:用 `target_branch` 或 PM 书面 ref(`mstar-iteration` §2.3),禁止无依据写死 `origin/main`。
|
|
45
|
+
Formal iteration(Phase 1 → Phase 2 → Phase 3)→ **`mstar-iteration`** only. Do not duplicate phase gates, branch policy, or close checklists here.
|
|
74
46
|
|
|
75
47
|
## Cursor Plan mode
|
|
76
48
|
|