@mstar-harness/opencode 3.1.2 → 3.2.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/CHANGELOG.md +27 -0
- package/dist/mstar.js +200 -113
- package/harness-commands/codebase-audit.md +3 -3
- package/harness-commands/iteration-drive.md +9 -90
- package/harness-commands/iteration-loop.md +22 -62
- package/harness-commands/iteration-start.md +20 -77
- package/harness-commands/pr-deep-review.md +37 -0
- package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/SKILL.md +3 -3
- package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/references/knowledge-and-designs.md +8 -8
- package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/references/plan-files-and-reports.md +6 -6
- package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/references/status-and-residuals.md +3 -3
- package/harness-skills/mstar-artifacts/templates/README.md +7 -0
- package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/templates/plan.main.md +1 -1
- package/harness-skills/mstar-audit/SKILL.md +36 -89
- package/harness-skills/mstar-audit/references/audit-playbook.md +1 -1
- package/harness-skills/mstar-audit/references/codebase-audit.md +85 -0
- package/harness-skills/mstar-audit/references/pr-review.md +139 -0
- package/harness-skills/mstar-branch-worktree/SKILL.md +5 -5
- package/harness-skills/mstar-compound/SKILL.md +4 -4
- package/harness-skills/mstar-compound/references/compound-workflow.md +1 -1
- package/harness-skills/mstar-compound-refresh/SKILL.md +4 -4
- package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +3 -3
- package/harness-skills/{mstar-plan-conventions → mstar-conventions}/SKILL.md +9 -9
- package/harness-skills/{mstar-plan-conventions → mstar-conventions}/references/artifact-storage-paths.md +13 -13
- package/harness-skills/{mstar-plan-conventions → mstar-conventions}/references/harness-bootstrap-and-agents-layering.md +5 -5
- package/harness-skills/mstar-design-md/SKILL.md +3 -3
- package/harness-skills/mstar-dispatch-gates/SKILL.md +3 -3
- package/harness-skills/mstar-engine-legacy/SKILL.md +1 -1
- package/harness-skills/mstar-engine-legacy/references/lease-protocol.md +1 -1
- package/harness-skills/mstar-engine-legacy/references/status-field-history.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +21 -20
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +5 -5
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +7 -7
- package/harness-skills/mstar-host/references/cursor.md +1 -1
- package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +1 -1
- package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +1 -1
- package/harness-skills/mstar-host/references/parallel-dispatch.md +1 -1
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +1 -1
- package/harness-skills/mstar-iteration/SKILL.md +21 -15
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +62 -0
- package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +1 -1
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +5 -5
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +1 -1
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +1 -1
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
- package/harness-skills/mstar-phase-gates/SKILL.md +5 -5
- package/harness-skills/mstar-project-governance/SKILL.md +9 -9
- package/harness-skills/mstar-review-qc/SKILL.md +4 -4
- package/harness-skills/mstar-roles/SKILL.md +7 -7
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +20 -2
- package/harness-skills/mstar-roles/references/architect.md +7 -10
- package/harness-skills/mstar-roles/references/code-reviewer.md +7 -10
- package/harness-skills/mstar-roles/references/frontend-dev.md +6 -5
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +6 -5
- package/harness-skills/mstar-roles/references/ops-engineer.md +3 -7
- package/harness-skills/mstar-roles/references/product-manager.md +8 -11
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +1 -1
- package/harness-skills/mstar-roles/references/project-manager/plan-management.md +3 -3
- package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +2 -2
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +3 -3
- package/harness-skills/mstar-roles/references/project-manager.md +5 -5
- package/harness-skills/mstar-roles/references/prompt-engineer.md +4 -7
- package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +2 -2
- package/harness-skills/mstar-roles/references/qa-engineer.md +4 -8
- package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +5 -8
- package/harness-skills/mstar-roles/references/writing-specialist.md +3 -6
- package/harness-skills/mstar-sdd/SKILL.md +2 -2
- package/harness-skills/mstar-sdd/references/file-handoffs.md +1 -1
- package/harness-skills/mstar-strategy/SKILL.md +8 -38
- package/package.json +1 -1
- package/harness-skills/mstar-plan-artifacts/templates/README.md +0 -7
- /package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/references/plan-quality-bar.md +0 -0
- /package/harness-skills/{mstar-plan-artifacts → mstar-artifacts}/templates/status.empty.json +0 -0
- /package/harness-skills/{mstar-plan-conventions → mstar-conventions}/references/effort-estimation.md +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-iteration
|
|
3
|
-
description: Morning Star
|
|
3
|
+
description: "Use when starting, driving, resuming, or closing a Morning Star iteration, or running an autonomous Phase 1–5 loop — including without a slash command (e.g. 'start an iteration', 'drive the iteration', 'run an autonomous loop'). Manages Phase 1 (default interactive direction lock; opt-in autonomous), Autonomous Execute, iteration-close (compound promotes knowledge), PR delivery, and the PR merge-ready loop. Branch SSOT: workflow snapshot (`workflows/<id>/snapshot.json`) + compass frontmatter."
|
|
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-
|
|
10
|
+
**Read `mstar-harness-core` first.** Path symbols → **`mstar-conventions`**. Per-plan gates → **`mstar-phase-gates`**. Knowledge crystallization → **`mstar-compound`**. **Phase 1 角色派发**(每次 invoke 前的 assignment preflight;`enforcement: hard` fail-fast)→ **`references/command-shared-invariants.md`**(本 skill 直接触发时不依赖 command 层)。**Phase 2 entry**(control worktree + lease)→ **`references/phase-2-worktree-lease.md`** + **`mstar-branch-worktree`**。**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
|
|
|
@@ -16,7 +16,7 @@ mstar 实践模式通常是:一次迭代锁定几个 spec 点(`specify + cla
|
|
|
16
16
|
本 skill 管理迭代 **Phase 1–5**(command 层可聚合编排,但 **不得**反向引用 command 名;第三方 helper 仅由 command 按需发现):
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
Phase 1:
|
|
19
|
+
Phase 1: start
|
|
20
20
|
↓
|
|
21
21
|
Phase 2: Autonomous Execute —— [per-plan lifecycle × N]
|
|
22
22
|
↓
|
|
@@ -43,7 +43,7 @@ Phase 5: PR merge-ready loop —— 至 mergeable + CI 全绿 + reviews resolved
|
|
|
43
43
|
| **→ Phase 4** | §3.5 exit checklist 全 `[x]`;frontmatter `status: completed` + `end_date` | 打印 `## Phase 4: PR delivery`;开 PR 到 snapshot `branch.target`(§4) | 跳过 §3.1 entry checklist 或 compound Phase 6 |
|
|
44
44
|
| **→ Phase 5** | Phase 4 PR 已创建 | 打印 `## Phase 5: PR merge-ready`;执行 §5 loop 至 §5.5 exit(含 §5.1a push cadence) | 开 PR 后停止;跳过 review resolve / CI loop;**CI/AI review 仍在跑时 push** |
|
|
45
45
|
| **→ 迭代交付完成** | §5.5 exit checklist 全 `[x]` | PR mergeable;required CI 全绿;reviews resolved | Phase 4 开 PR 即宣称完成 |
|
|
46
|
-
| **
|
|
46
|
+
| **start → integration branch** | §1.6 Review & Edit chain | 三角色按序 invoke;**specs** 为主产出;**禁止** start 链向 `{KNOWLEDGE_DIR}/` 新增;writing-specialist corpus hygiene + compass `status: locked` | PM 代做专业编辑;并行三角色;product/architect 写 knowledge;临时笔记进 specs |
|
|
47
47
|
|
|
48
48
|
> **Engine check (when available):** run `mstar iteration gate --workflow <id> --compass <delivery-compass.md>` (or `import { evaluatePhaseGate } from "@mstar-harness/engine"` in a host hook) to evaluate the transition gate above against the workflow snapshot. On `fail` (gate-blocking violations) -> do not proceed; fix and re-run. Note: during the Phase-3 window (`transition: phase-3-close`) the gate exits 1 until the §3.4 close items (`status: completed` + `end_date`) are written — that exit-1 is the expected "close work pending" signal (the exit checklist gates Phase 4, not the Phase-3 entry), so proceed with Phase 3 per the table below. Skill text below remains authoritative when the runtime is absent.
|
|
49
49
|
|
|
@@ -55,11 +55,11 @@ Phase 5: PR merge-ready loop —— 至 mergeable + CI 全绿 + reviews resolved
|
|
|
55
55
|
|
|
56
56
|
## 产物存储位置
|
|
57
57
|
|
|
58
|
-
**SSOT**: `mstar-
|
|
58
|
+
**SSOT**: `mstar-conventions/references/artifact-storage-paths.md`。迭代 package → `{ITERATION_DIR}/<iteration-id>/`(含 `delivery-compass.md`、`guides/`、`specs/`);根索引 → `{ITERATION_DIR}/README.md`。Legacy flat `{ITERATION_DIR}/<id>-delivery-compass.md` 仅兼容读。
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
-
## Phase 1:
|
|
62
|
+
## Phase 1: start(启动迭代)
|
|
63
63
|
|
|
64
64
|
PM 在新迭代启动时执行。
|
|
65
65
|
|
|
@@ -67,7 +67,10 @@ PM 在新迭代启动时执行。
|
|
|
67
67
|
|
|
68
68
|
1. 读 `{ITERATION_DIR}/README.md`(若存在),了解历史迭代
|
|
69
69
|
2. 读 `STRATEGY.md`(若存在),对齐战略方向(见 `mstar-strategy`)
|
|
70
|
-
3.
|
|
70
|
+
3. 读 `{KNOWLEDGE_DIR}/README.md`(若存在),将索引中的 **Active** 行视为 Research 候选(**不**要求阅读全部 knowledge 正文)
|
|
71
|
+
4. 如果有未完成的 roadmap 残余(上一迭代标记为 `next` 的 plan),纳入本次迭代范围候选
|
|
72
|
+
|
|
73
|
+
**非 command 触发**(如直接 skill 加载)时,Phase 1 方向锁定仍须 interactive(grill-me 在 command 层)。
|
|
71
74
|
|
|
72
75
|
### 1.2 定义迭代范围
|
|
73
76
|
|
|
@@ -184,7 +187,7 @@ compass frontmatter 的 `iteration_base_branch` / `target_branch` **必须与**
|
|
|
184
187
|
|
|
185
188
|
Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(HARD):
|
|
186
189
|
|
|
187
|
-
| 树 |
|
|
190
|
+
| 树 | Phase 1(start)主责 | 说明 |
|
|
188
191
|
|----|---------------------|------|
|
|
189
192
|
| **`{SPECS_DIR}/`** | product-manager、architect | **长期**规范性产出:锁定规格、ADR、契约;plan `primary_spec` / `spec_refs` 主要挂此处 |
|
|
190
193
|
| **`{ITERATION_DIR}/`** | product-manager、architect、PM | **`<iteration-id>/` package**(`delivery-compass.md` + 迭代级 specs & guides) |
|
|
@@ -196,6 +199,8 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
|
|
|
196
199
|
|
|
197
200
|
**Phase 1 在 PM lock 前不算完成**——compass/plans 初稿落盘 ≠ Done。
|
|
198
201
|
|
|
202
|
+
**Assignment preflight(每次角色 invoke 前,HARD)**:自然语言 / skill 直接触发(非 command 路径)时,本 skill 不依赖 command 层 preflight——**每个** Phase 1 角色派发前,PM 必须运行 assignment preflight(`references/command-shared-invariants.md` 的 warn-only / `enforcement: hard` fail-fast 片段;`enforcement: hard` 时校验失败即阻断派发)。Command 层(`/iteration-start`)走其自身 preflight;本行确保 skill 触发路径门禁不缺失。
|
|
203
|
+
|
|
199
204
|
派发机制 → **`mstar-dispatch-gates`**(specialist review-and-edit dispatch,**顺序链**)。PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直到:
|
|
200
205
|
|
|
201
206
|
1. **product-manager** → **architect** → **writing-specialist** 已按序 invoke 编辑 compass、plans、`{SPECS_DIR}/` 与 **`{ITERATION_DIR}/<iteration-id>/`** package(guides/specs,按需);**不得**在 start 链向 `{KNOWLEDGE_DIR}/` 新增
|
|
@@ -214,7 +219,7 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
|
|
|
214
219
|
|
|
215
220
|
**本 Phase 是本 skill 的核心**——定义 per-plan 派发循环的完整流程:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QC→**QA gate**→Done→合并)、dispatch-first 约束、push 纪律。PM 读取本 Phase 即可执行迭代。
|
|
216
221
|
|
|
217
|
-
**Findings cleanup(默认)**:Phase 2 每个 plan Assignment 默认 **`Findings cleanup: zero-residual`**(可修 findings 当轮 fix→re-review 清干净;仅真 blocker-defer + Durable Roadmap 可留 open R#)。compass 或 Assignment 可显式覆写为 `allow-residual`。SSOT → **`mstar-
|
|
222
|
+
**Findings cleanup(默认)**:Phase 2 每个 plan Assignment 默认 **`Findings cleanup: zero-residual`**(可修 findings 当轮 fix→re-review 清干净;仅真 blocker-defer + Durable Roadmap 可留 open R#)。compass 或 Assignment 可显式覆写为 `allow-residual`。SSOT → **`mstar-artifacts`**「Findings cleanup modes」。
|
|
218
223
|
|
|
219
224
|
### 2.0 前置条件(五道闸)
|
|
220
225
|
|
|
@@ -226,7 +231,7 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
|
|
|
226
231
|
4. **Branch metadata gate**:snapshot `branch.base`(`iteration_base_branch`)、`branch.target`(`target_branch`)已登记,且至少一条 active plan 有 `metadata.spec_integration_branch`(或可从 compass 同轮 backfill)。**缺失 → STOP**,不得用 `main`/`master` 补位。
|
|
227
232
|
5. **Control-worktree + lease defaults**(iteration 命令;可被 `Worktree mode: waived` 豁免):除非本轮 Assignment 显式 `Worktree mode: waived`(或等价用户指令),Phase 2 **必须**在入口建立 control worktree、经 control 路径读写默认 gitignored 的 harness 进程产物(根 `status.json`、`workflows/`、`projects/`、`{PLAN_DIR}`、`{ITERATION_DIR}`、`{SDD_DIR}` 等),并在可写派发前 claim workflow snapshot 的 `plans[].execution_lease` / 顶层 `integration_merge_lease`。可写 Assignment 须含绝对 feature **`Worktree path`** + 绝对 control 系 **`Plan Path`** / **`SDD dir`**(见 **`mstar-branch-worktree`**「Harness path SSOT under default gitignore」)。**禁止**因 feature worktree 在默认 gitignore 下看不到 plans 而推断 `Worktree mode: waived`。`Plan parallelism: serial` **不** waive 本闸——仅强制跨 plan **implement** 串行调度;control worktree + lease 仍须满足。**跨 plan 并行安全闸**(**不可**被 `Worktree mode: waived` 豁免):跨 plan **并行可写 implement** 须满足下列之一——(a) coordination 路径(control snapshot 或 waived 时主 checkout `{HARNESS_DIR}/status.json`)上 **same-host 独占写锁可用且每次 status/协调变更持锁**;(b) 默认 **`Plan parallelism: serial`**(**waived 时尤其优先默认串行**;**无 flock / 无共享锁时只触发本条,不豁免 worktree**);(c) 用户本轮显式 `Cross-host lease race: accepted`(或等价)+ `plans[].notes` 审计。**禁止**将 `Worktree mode: waived` 当作跨主机无锁并行的授权。细则 → **`references/phase-2-worktree-lease.md`**。
|
|
228
233
|
|
|
229
|
-
> **Engine
|
|
234
|
+
> **Engine-check(lease verify / verify-integration)唯一规范体:** `mstar-artifacts` `SKILL.md`(Engine check lease 行;standalone 保证同文)。
|
|
230
235
|
|
|
231
236
|
任一 false → **stop**。Phase 1 / Prepare 未完成 → 先完成 Phase 1 或 per-plan Prepare,再进入本 Phase。
|
|
232
237
|
|
|
@@ -244,7 +249,7 @@ SSOT = `{WORKFLOW_DIR}/<id>/snapshot.json` + `{PLAN_DIR}/`。todos 只追踪本
|
|
|
244
249
|
|
|
245
250
|
### 2.2 Read backlog
|
|
246
251
|
|
|
247
|
-
1. 读 `mstar-
|
|
252
|
+
1. 读 `mstar-artifacts` + workflow snapshot(`{WORKFLOW_DIR}/<id>/snapshot.json`)与根 `status.json`
|
|
248
253
|
2. 列出 snapshot 中 `status` ∈ `{Todo, InProgress, InReview, Blocked}` 的 plan(优先级:`InProgress` → `InReview` → `Todo` → unblock `Blocked`)
|
|
249
254
|
3. 读 snapshot `branch.base` / `branch.target`,以及 plan `metadata.spec_integration_branch` / `merge_target` / `primary_spec` 链接
|
|
250
255
|
|
|
@@ -291,7 +296,7 @@ SSOT = `{WORKFLOW_DIR}/<id>/snapshot.json` + `{PLAN_DIR}/`。todos 只追踪本
|
|
|
291
296
|
- 自 control 路径 **重读** workflow snapshot(`{WORKFLOW_DIR}/<id>/snapshot.json`)定位 plan 行
|
|
292
297
|
- 若已有 `execution_lease` 且 `holder` **等于本 session** → **resume**:校验 `worktree_path` / `working_branch` 与 Assignment 一致后继续(**不是** steal / Blocked)
|
|
293
298
|
- 若 `execution_lease` 存在且 `holder` **不同** → **Blocked**
|
|
294
|
-
- 若 `status: InProgress` 但 **无** `execution_lease` → **STOP** 升级(孤儿状态恢复 → **`mstar-
|
|
299
|
+
- 若 `status: InProgress` 但 **无** `execution_lease` → **STOP** 升级(孤儿状态恢复 → **`mstar-artifacts`**;本 skill 不自行补 lease)
|
|
295
300
|
- 否则按 **`references/phase-2-worktree-lease.md`** claim:`Todo`/`Blocked` → `InProgress` + 写入完整 `execution_lease`;verify 通过前 **禁止**可写派发
|
|
296
301
|
2. **Plan start — feature worktree + branch**:创建/校验 dedicated feature worktree;Assignment 须含绝对 `Worktree path` + `Working branch`(与 lease 一致)。plan 内多可写并行轨 → **`mstar-branch-worktree`** **`references/parallel-writable-pre-dispatch.md`**
|
|
297
302
|
3. **Implement → InReview**(`§ 2.5`;产品编辑在 feature worktree;plans / snapshot / iterations / SDD 经 control 绝对路径):
|
|
@@ -348,7 +353,8 @@ Iteration Phase 2 附加:
|
|
|
348
353
|
- 实际 Git ≠ `working_branch` → **同轮**更新 plan + snapshot + `execution_lease.working_branch`(如适用)
|
|
349
354
|
- **跨 plan implement**(**无论** `Worktree mode: waived`):并行可写 implement 须满足 §2.0 #5 跨 plan 并行安全闸——same-host 独占写锁 + 每次协调变更持锁,或默认 **`Plan parallelism: serial`**(waived 时尤其优先),或用户本轮 `Cross-host lease race: accepted` + audit `notes`;**禁止**将 waived 当作无锁跨主机并行授权;未 waive 时另须 verified `execution_lease` + feature worktree。**integration merge 串行**(`integration_merge_lease` 或 waived 下无 lease 仍须串行 merge)
|
|
350
355
|
- plan 内 SDD task **串行** — 见 §2.4、§2.5、`mstar-sdd` Continuous execution
|
|
351
|
-
- **zero-residual(默认)**:单 plan QC findings 尽量在当轮清干净;仅真 blocker 才 defer 到后续迭代(须 Durable Roadmap)— 见 **`mstar-
|
|
356
|
+
- **zero-residual(默认)**:单 plan QC findings 尽量在当轮清干净;仅真 blocker 才 defer 到后续迭代(须 Durable Roadmap)— 见 **`mstar-artifacts`** Findings cleanup modes
|
|
357
|
+
- iteration 命令共享的 PM invariants / preflight / todos / STOP → **`references/command-shared-invariants.md`**
|
|
352
358
|
|
|
353
359
|
## Phase 3: iteration-close(收口迭代)
|
|
354
360
|
|
|
@@ -390,12 +396,12 @@ Iteration Phase 2 附加:
|
|
|
390
396
|
- **不要在 Phase 5 CI 仍跑或 AI review 波次未结束时 push**(§5.1a)— 本地可提前修,push 等 idle
|
|
391
397
|
- **不要为 Phase 5 另开 feature/fix worktree**,也不要把 Phase 2 control 产品编辑禁令套到 Phase 5 — 直接在集成分支 checkout 上修
|
|
392
398
|
- **不要在缺 `iteration_base_branch` / `target_branch` 时默认 `main` / `master`**
|
|
393
|
-
- **不要在
|
|
399
|
+
- **不要在 Phase 1 §1.6 由 product/architect 向 `{KNOWLEDGE_DIR}/` 新增**(知识 → iteration-close **`mstar-compound`**)
|
|
394
400
|
- **不要在 per-plan Done 后立即 compound** — 等 iteration-close 统一做
|
|
395
401
|
|
|
396
402
|
## Workflow
|
|
397
403
|
|
|
398
|
-
Phase 1–5 总览见上文 **`## 设计思路`** 图:`
|
|
404
|
+
Phase 1–5 总览见上文 **`## 设计思路`** 图:`start`(范围 + compass + §1.6 Review & Edit 链)→ `Autonomous Execute`(§2.4 per-plan 循环:分支 → 实现 → QC → QA gate → Done → 串行 merge)→ `iteration-close`(§3.1–§3.5 + `mstar-compound`)→ `PR delivery`(Phase 4)→ `PR merge-ready loop`(Phase 5 至 §5.5 exit)。每波用 §2.1 session todos 设护栏防范围漂移。
|
|
399
405
|
|
|
400
406
|
## Evidence
|
|
401
407
|
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Iteration 命令共享 invariants + preflight
|
|
2
|
+
|
|
3
|
+
本文件是 `commands/iteration-*.md`(`iteration-start` / `iteration-drive` / `iteration-loop`)**重叠内容**的单一共享副本(SSOT)。**只收录出现在 ≥2 个命令中的行**;命令专属内容保留在命令正文,**不**复制进本文件:
|
|
4
|
+
|
|
5
|
+
- `iteration-start` Phase 1 review-chain 表(§5.1→§5.2→§5.3 顺序 invoke、三角色冒充禁止、`{KNOWLEDGE_DIR}/` 新增禁止)— start 专属
|
|
6
|
+
- `iteration-loop`「Do not Read `skills/grill-me/SKILL.md`」— loop 专属
|
|
7
|
+
- `iteration-loop` session todo `phase-1-autonomous-start`(Boot → compass `locked` + integration committed)— loop 专属
|
|
8
|
+
|
|
9
|
+
命令正文经一行指针引用本文件,不重复定义以下 invariants / preflight / todos / STOP。
|
|
10
|
+
|
|
11
|
+
## PM invariants(重叠行)
|
|
12
|
+
|
|
13
|
+
Phase 2–5 全程有效(drive + loop 共有的行):
|
|
14
|
+
|
|
15
|
+
| 禁止(PM 线程) | 必须 |
|
|
16
|
+
|-----------------|------|
|
|
17
|
+
| Write/Edit/Shell 产品代码、写测试、跑 QC(Phase 2) | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
|
|
18
|
+
| **多 task plan 用 inline 大包派发**(整份 plan / T1–Tn 贴进一个 dev Assignment) | **SDD**:`mstar-sdd` per-task 循环 — `mstar sdd task-brief` → implementer → `mstar sdd review-package` → task reviewer → `progress.md` |
|
|
19
|
+
| 只写 Assignment 就进入下一 gate | 同轮 dispatch:每条 Assignment ⇒ **1 次 invoke**(`Subagent invokes issued: N`,N = Assignment 条数) |
|
|
20
|
+
| 最后一个 plan `Done` 后直接开 PR / 汇报结束 | **Phase 3 → 4 → 5** 顺序执行 |
|
|
21
|
+
| Phase 5 自己改产品代码 | 需改产品代码时 **dispatch** `fullstack-dev` / `ops-engineer` |
|
|
22
|
+
|
|
23
|
+
派发细则 → **`mstar-dispatch-gates`** + **`mstar-host`**。Phase 3 细则 → **`mstar-iteration` §3** + **`mstar-compound`**。
|
|
24
|
+
|
|
25
|
+
## Assignment preflight(bash 块 — byte-identical 共享副本)
|
|
26
|
+
|
|
27
|
+
`mstar-harness` bin 未安装时静默跳过;在每次 implement/QC/QA 派发前(**SDD** 下为最新 `{SDD_DIR}/task-N-brief.md` 或临时写盘的 Assignment)校验。模式由迭代 compass frontmatter 的 `enforcement` 键决定(Slice 5):
|
|
28
|
+
|
|
29
|
+
- **默认(compass 无 `enforcement: hard`)— 可选 warn-only**:exit 1 仅提示,不阻断派发(Slice 3 行为不变):
|
|
30
|
+
|
|
31
|
+
```bash
|
|
32
|
+
command -v mstar-harness >/dev/null 2>&1 && mstar-harness dispatch validate "<latest-assignment-file>"
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
- **`enforcement: hard`(迭代 compass frontmatter 声明)— fail-fast**:校验失败即 `exit 1` 阻断派发(bin 缺失仍静默跳过):
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
if command -v mstar-harness >/dev/null 2>&1; then mstar-harness dispatch validate "<latest-assignment-file>" || exit 1; fi
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
> 路径必须加引号且替换为具体文件(如最新 `{SDD_DIR}/task-N-brief.md`,勿留尖括号)——agent 代入的路径不得进入 shell 无引号展开。
|
|
42
|
+
|
|
43
|
+
## Session todos(重叠行;drive + loop 共有)
|
|
44
|
+
|
|
45
|
+
| Todo id | 何时追加 | 何时可勾掉 |
|
|
46
|
+
|---------|----------|------------|
|
|
47
|
+
| plan-wave todos | 进入 Phase 2 | 各 plan `Done` |
|
|
48
|
+
| `phase-3-iteration-close` | 仅剩 1 个非 `Done` plan | Phase 3 §3.5 exit 全 `[x]` |
|
|
49
|
+
| `phase-4-create-pr` | Phase 3 完成后 | PR 已创建并记录 URL/number |
|
|
50
|
+
| `phase-5-pr-merge-ready` | Phase 4 完成后 | Phase 5 §5.5 exit 全 `[x]` |
|
|
51
|
+
|
|
52
|
+
## Continuous execution STOP list(重叠行;start / drive / loop 共有)
|
|
53
|
+
|
|
54
|
+
Execute **`mstar-iteration` §2.6**(Continuous execution SSOT:自 Phase 2 进入至 Phase 5 §5.5 exit 前 PM **连续编排**,进度汇报后下一条必须是 dispatch 或下一 phase 步骤,不向用户例行 yes/no check-in)。
|
|
55
|
+
|
|
56
|
+
**合法 STOP(仅此升级用户)**:
|
|
57
|
+
|
|
58
|
+
- 迭代 branch metadata 缺失(`iteration_base_branch` / `target_branch`)
|
|
59
|
+
- **`Blocked`**:真冲突、secrets、不可逆范围缺口、Phase 5 多轮仍无法 merge-ready
|
|
60
|
+
- 用户本轮显式打断
|
|
61
|
+
|
|
62
|
+
**Turn 收束纪律**:最后一条 assistant 内容必须是 **in-flight 动作**(invoke 已发出、或写明下一 dispatch 的 Assignment 字段),**不得**以对用户的确认问句收束 turn。
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# iteration-start 产物边界(specs · iterations · knowledge)
|
|
2
2
|
|
|
3
3
|
> **When**: Phase 1 — PM 初稿落盘、§1.6 Review & Edit chain;Phase 2 迭代执行期可继续写入 iteration package;Phase 3 iteration-close 经 **`mstar-compound`** 提升。
|
|
4
|
-
> **Conflict**: 与 `mstar-
|
|
4
|
+
> **Conflict**: 与 `mstar-artifacts/references/knowledge-and-designs.md` 一致;冲突以 **`mstar-harness-core`** 为准。
|
|
5
5
|
|
|
6
6
|
## 三棵树分工(HARD)
|
|
7
7
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Phase 2 control worktree + execution lease
|
|
2
2
|
|
|
3
3
|
Normative field names → field SSOT
|
|
4
|
-
`mstar-
|
|
4
|
+
`mstar-artifacts/references/status-and-residuals.md`; the **full lease
|
|
5
5
|
protocol prose** (single canonical copy) → `mstar-engine-legacy/references/lease-protocol.md`
|
|
6
6
|
(engine-absent fallback). This reference is the **iteration-command execution
|
|
7
7
|
checklist** — do not invent alternate lease field names; do not re-state the
|
|
@@ -9,8 +9,8 @@ full protocol here.
|
|
|
9
9
|
|
|
10
10
|
## When it applies
|
|
11
11
|
|
|
12
|
-
**
|
|
13
|
-
/ `iteration-loop` Phase 2+
|
|
12
|
+
**Phase 2+ command-layer only**(`iteration-start` ends before this; `iteration-drive`
|
|
13
|
+
/ `iteration-loop` are Phase 2+ command layer). Defaults are **hard** unless the current turn
|
|
14
14
|
explicitly waives via Assignment `Worktree mode: waived` (or equivalent user
|
|
15
15
|
instruction). `Plan parallelism: serial` is **not** a waiver — it only forces
|
|
16
16
|
serial cross-plan **implement** scheduling while control worktree + leases remain
|
|
@@ -79,7 +79,7 @@ Immediately before **any** writable implement dispatch, re-read the control
|
|
|
79
79
|
snapshot and re-verify `execution_lease` holder + paths match this session;
|
|
80
80
|
mismatch → **STOP**.
|
|
81
81
|
|
|
82
|
-
> **Engine
|
|
82
|
+
> **Lease Engine-check:** canonical callout lives in `mstar-artifacts` `SKILL.md`(Engine-check lease 行)— this file carries the execution checklist only.
|
|
83
83
|
|
|
84
84
|
## Feature worktree (per plan)
|
|
85
85
|
|
|
@@ -137,7 +137,7 @@ If a plan row is `InProgress` but has **no** `execution_lease` in the snapshot,
|
|
|
137
137
|
escalate — do not invent a lease or writable-dispatch. Unattended "Recover with
|
|
138
138
|
claim" is permitted **only** for the **same** stable `holder`; different holder
|
|
139
139
|
requires verified quiescence + handoff or current-turn user override + audit.
|
|
140
|
-
Recovery semantics → `mstar-
|
|
140
|
+
Recovery semantics → `mstar-artifacts` (not iteration skill).
|
|
141
141
|
|
|
142
142
|
## Multi-plan parallelism
|
|
143
143
|
|
|
@@ -31,7 +31,7 @@ PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支
|
|
|
31
31
|
**STOP**: 打印下方 checklist,且全部为 `[x]` 后,才可进入 §3.2 Compound。
|
|
32
32
|
|
|
33
33
|
- [ ] 所有 compass 中登记的 plan 在 workflow snapshot(`{WORKFLOW_DIR}/<id>/snapshot.json`)均为 `Done`
|
|
34
|
-
- [ ] 所有 plan 的 residual findings 已收口:优先 empty register 条目(`projects/<id>/residuals.json` → `entries[<plan-id>]`);若仍有 open R#,须均为 Phase 2 `zero-residual` 允许的 blocker-defer + roadmap,或已 closed(`lifecycle` / `closed_at` / `closure_note`,见 `mstar-
|
|
34
|
+
- [ ] 所有 plan 的 residual findings 已收口:优先 empty register 条目(`projects/<id>/residuals.json` → `entries[<plan-id>]`);若仍有 open R#,须均为 Phase 2 `zero-residual` 允许的 blocker-defer + roadmap,或已 closed(`lifecycle` / `closed_at` / `closure_note`,见 `mstar-artifacts` Findings cleanup modes)
|
|
35
35
|
- [ ] compass `## Plans` 表状态列已与 snapshot 同步
|
|
36
36
|
- [ ] 迭代 `## Acceptance Criteria` 已达成或显式豁免(compass 或对话记录原因)
|
|
37
37
|
- [ ] compass shape 已满足(frontmatter + `## Roadmap Position` + close 占位节)
|
|
@@ -70,7 +70,7 @@ History rewrite / force-with-lease / 改写后证据失效规则 SSOT → `mstar
|
|
|
70
70
|
| 2 | `greploop` | **Optional** — only when the **repo** uses Greptile / has `greploop` available; then run for Greptile **5/5** in addition to babysit/`*-babysit` (or fallback) gates |
|
|
71
71
|
| 3 | neither | Command fallback = babysit-equivalent CI + reviews gates |
|
|
72
72
|
|
|
73
|
-
When both babysit/`*-babysit` and greploop apply: **babysit/`*-babysit` first**(CI + reviews),then optional greploop for Greptile score. Discovery paths →
|
|
73
|
+
When both babysit/`*-babysit` and greploop apply: **babysit/`*-babysit` first**(CI + reviews),then optional greploop for Greptile score. Discovery paths → `mstar-iteration` §5 (iteration command layer).
|
|
74
74
|
|
|
75
75
|
### 5.2 Phase 5 exit checklist(迭代交付完成)
|
|
76
76
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Phase 5 helper skill discovery(babysit / greploop)
|
|
2
2
|
|
|
3
|
-
> Loaded by
|
|
3
|
+
> Loaded by `mstar-iteration` §5 (iteration command layer) before the first merge-ready loop pass. Search for optional **non-`mstar-*`** helper skills;first readable `SKILL.md` wins per name. Does **not** enter `mstar-*` load order.
|
|
4
4
|
|
|
5
5
|
## Search paths(示例,按宿主扩展)
|
|
6
6
|
|
|
@@ -5,7 +5,7 @@ description: "Morning Star Spec-Driven 双阶段门禁:Prepare(`specify →
|
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
7
7
|
|
|
8
|
-
**首次 Read 本 skill 前:必须先 Read `mstar-harness-core`(SKILL.md)。** `{PLAN_DIR}` / plan 文件落盘见 **`mstar-
|
|
8
|
+
**首次 Read 本 skill 前:必须先 Read `mstar-harness-core`(SKILL.md)。** `{PLAN_DIR}` / plan 文件落盘见 **`mstar-conventions`**。冲突时 **以 `mstar-harness-core` 为准**。
|
|
9
9
|
|
|
10
10
|
## Spec-Driven 双阶段门禁(非热修强制)
|
|
11
11
|
|
|
@@ -49,10 +49,10 @@ description: "Morning Star Spec-Driven 双阶段门禁:Prepare(`specify →
|
|
|
49
49
|
|
|
50
50
|
- **`plan locked`**
|
|
51
51
|
- 最小动作:在 plan 或 notes 记录当前锁定版本(日期或 hash)。
|
|
52
|
-
- **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review 三问(每 task 可独立验证?依赖顺序清晰?无隐含假设?)— 见 `mstar-
|
|
52
|
+
- **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review 三问(每 task 可独立验证?依赖顺序清晰?无隐含假设?)— 见 `mstar-artifacts/templates/plan.main.md` + **`mstar-artifacts/references/plan-quality-bar.md`**(自包含/验证门/STOP 条件/drift check/done criteria)。
|
|
53
53
|
- **`implement`**
|
|
54
54
|
- 最小产物:实现 diff、自检证据、回报与 handoff;行为准则 → **`mstar-coding-behavior`**;编辑纪律 → 上文「可验证编辑与上下文纪律」。
|
|
55
|
-
- **知识库 / 迭代 compass
|
|
55
|
+
- **知识库 / 迭代 compass**:**默认**开工前扫 `{KNOWLEDGE_DIR}/README.md` 索引(若存在)并阅读与当轮相关的 **Active** 行(**即使 metadata 无 knowledge 链接**);若 `plans[].metadata` 登记了 `primary_spec` / `spec_refs` / `iteration_compass` / `iteration_refs`,所链接文档**仍须**阅读;两类阅读均须在回报中说明已对齐 → **`mstar-conventions`** · **`mstar-artifacts/references/knowledge-and-designs.md`**。
|
|
56
56
|
|
|
57
57
|
## 角色职责
|
|
58
58
|
|
|
@@ -79,7 +79,7 @@ per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动
|
|
|
79
79
|
## Plan 目录与审查证据(启用 `{PLAN_DIR}` 时)
|
|
80
80
|
|
|
81
81
|
- 进入 `InReview` 后,QC/QA 原始过程报告默认落入 `{SDD_DIR}/review/`(**SDD 默认 tri** `qc1`…`qc-consolidated`;**inline** 单席 `qc.md`)。**fix 后默认 targeted re-review**。SDD per-task review 在 implement 波次内完成(`mstar-sdd` task reviewer)。PM 将 durable gate summary 回写主 plan / workflow snapshot,而不是把 raw reports 作为默认 git 产物。
|
|
82
|
-
- 非阻断项与后续技术债:PM 汇总后写入 project register `{PROJECT_DIR}/<id>/residuals.json` → `entries[<plan-id>]`(**open**,默认 `{HARNESS_DIR}/projects/<id>/`;canonical 见 **`mstar-
|
|
82
|
+
- 非阻断项与后续技术债:PM 汇总后写入 project register `{PROJECT_DIR}/<id>/residuals.json` → `entries[<plan-id>]`(**open**,默认 `{HARNESS_DIR}/projects/<id>/`;canonical 见 **`mstar-artifacts` SKILL.md**);关闭时在 register 内 **in place** 置 `lifecycle` / `closed_at` / `closure_note`,与 `mstar-review-qc` 一致。每条 **`severity`** 遵守 **`mstar-artifacts/references/status-and-residuals.md`**「Residual findings:severity(SSOT,机器字段)」。
|
|
83
83
|
|
|
84
84
|
## 快速判定(PM)
|
|
85
85
|
|
|
@@ -113,6 +113,6 @@ per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动
|
|
|
113
113
|
|
|
114
114
|
## References
|
|
115
115
|
|
|
116
|
-
- plan 文件落盘与路径符号 → **`mstar-
|
|
116
|
+
- plan 文件落盘与路径符号 → **`mstar-conventions`**
|
|
117
117
|
- 多 task 默认 `Execution mode: sdd` 的 implement 波次 → **`mstar-sdd`**
|
|
118
118
|
- QC / QA 审查链与 residual 登记 → **`mstar-review-qc`**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-project-governance
|
|
3
|
-
description: Morning Star 项目治理层约定 —— `projects/<id>/roadmap.md` 编写约定(frontmatter schema + body 约定)与 `projects/<id>/residuals.json` register 生命周期(open → verified close in place、severity 枚举、provenance 字段)、`_default` 项目回退规则。写/审 roadmap、登记或关闭 residual、判断项目归属(含无项目流程的 `_default` fallback)、或对齐 roadmap/register 与 engine 校验时 Read。schema 事实与 `packages/engine/src/project.ts` 逐字一致;字段语义 SSOT → `mstar-
|
|
3
|
+
description: Morning Star 项目治理层约定 —— `projects/<id>/roadmap.md` 编写约定(frontmatter schema + body 约定)与 `projects/<id>/residuals.json` register 生命周期(open → verified close in place、severity 枚举、provenance 字段)、`_default` 项目回退规则。写/审 roadmap、登记或关闭 residual、判断项目归属(含无项目流程的 `_default` fallback)、或对齐 roadmap/register 与 engine 校验时 Read。schema 事实与 `packages/engine/src/project.ts` 逐字一致;字段语义 SSOT → `mstar-artifacts`;路径符号 → `mstar-conventions`。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# mstar-project-governance(项目治理层:roadmap + register)
|
|
@@ -8,8 +8,8 @@ description: Morning Star 项目治理层约定 —— `projects/<id>/roadmap.md
|
|
|
8
8
|
## Load Order
|
|
9
9
|
|
|
10
10
|
- 先 Read **`mstar-harness-core`**(SKILL.md;冲突时以 core 为准)。
|
|
11
|
-
- 路径符号(`{PROJECT_DIR}` / `{WORKFLOW_DIR}` 解析与 `.mstarc` 声明)→ **`mstar-
|
|
12
|
-
- 字段语义 SSOT(severity 含义、findings cleanup modes、close 协议全文、engine-check 查询)→ **`mstar-
|
|
11
|
+
- 路径符号(`{PROJECT_DIR}` / `{WORKFLOW_DIR}` 解析与 `.mstarc` 声明)→ **`mstar-conventions`**。
|
|
12
|
+
- 字段语义 SSOT(severity 含义、findings cleanup modes、close 协议全文、engine-check 查询)→ **`mstar-artifacts`**(`references/status-and-residuals.md`)。本 skill 只承载**编写约定与生命周期规则**,不重复字段全文。
|
|
13
13
|
|
|
14
14
|
## Scope
|
|
15
15
|
|
|
@@ -63,9 +63,9 @@ residuals_ref: residuals.json # optional
|
|
|
63
63
|
|
|
64
64
|
## Register 生命周期(`projects/<id>/residuals.json`)
|
|
65
65
|
|
|
66
|
-
### 文档形状、必填字段与枚举(单址 → `mstar-
|
|
66
|
+
### 文档形状、必填字段与枚举(单址 → `mstar-artifacts`)
|
|
67
67
|
|
|
68
|
-
Register 文档形状(`entries[<plan-id>]` 数组 JSON)、**9 个必填字段**(`id`/`title`/`severity`/`source`/`scope`/`decision`/`owner`/`target`/`tracking`,engine `RESIDUAL_REQUIRED_FIELDS`)与 **severity / decision / lifecycle 枚举**的逐字 schema → **`mstar-
|
|
68
|
+
Register 文档形状(`entries[<plan-id>]` 数组 JSON)、**9 个必填字段**(`id`/`title`/`severity`/`source`/`scope`/`decision`/`owner`/`target`/`tracking`,engine `RESIDUAL_REQUIRED_FIELDS`)与 **severity / decision / lifecycle 枚举**的逐字 schema → **`mstar-artifacts`** `references/status-and-residuals.md`(「Basic structure · project register」+「Residual findings: severity」)。本 skill 只承载编写约定与生命周期规则,**不重复字段全文**。
|
|
69
69
|
|
|
70
70
|
- `entries[<plan-id>]` 值是**数组** —— v1 `residual_findings[plan-id]` 多 finding 语义逐字保留(一个 plan 可持 2+ open residual)。
|
|
71
71
|
- 每条 = v1 residual entry **逐字** + provenance 字段。
|
|
@@ -76,7 +76,7 @@ Register 文档形状(`entries[<plan-id>]` 数组 JSON)、**9 个必填字
|
|
|
76
76
|
- **close(唯一关闭路径)**:在 register **in place** 置 `lifecycle`(≠ `open`)+ `closed_at`(`YYYY-MM-DD`)+ `closure_note`;推荐 `closure_evidence`。v1 的 `archived/residuals/` 归档路径与 `status archive-residuals` 已移除(该命令现为报错桩,指向 register 状态变更)。
|
|
77
77
|
- **closed 完整性**:`lifecycle` ≠ `open` 时缺 `closed_at` / `closure_note` = violation。
|
|
78
78
|
- **谁更新**:PM 在 consolidated 决策后分配 R# 并登记;`QA gate: mandatory` 时 `qa-engineer` 验证后关闭;`pm-acceptance` 时 PM 验收清单完成后关闭。
|
|
79
|
-
- close 协议全文 → **`mstar-
|
|
79
|
+
- close 协议全文 → **`mstar-artifacts`** `references/status-and-residuals.md`(「Residual findings lifecycle」)。
|
|
80
80
|
|
|
81
81
|
### Provenance(register 专属字段)
|
|
82
82
|
|
|
@@ -91,7 +91,7 @@ Register 文档形状(`entries[<plan-id>]` 数组 JSON)、**9 个必填字
|
|
|
91
91
|
- Assignment **`Findings cleanup: zero-residual | allow-residual`** 是唯一 mode 来源(`metadata.findings_cleanup` mirror 已删);迭代 Phase 2 默认 `zero-residual`。
|
|
92
92
|
- `zero-residual`:可修 findings 当轮 fix → re-review 清干净;仅真 blocker 可 defer 且须 Durable Roadmap + `target`;`nit` 必须当场修或删;waived/risk-accepted 必须关闭,不得留 open。
|
|
93
93
|
- `allow-residual`:仅 unresolved **critical** 阻止 Approve。
|
|
94
|
-
- mode 全文与 enforcement → **`mstar-
|
|
94
|
+
- mode 全文与 enforcement → **`mstar-artifacts`** `references/status-and-residuals.md`(「Findings cleanup modes」+ 其 engine check)。
|
|
95
95
|
|
|
96
96
|
## Workflow
|
|
97
97
|
|
|
@@ -114,6 +114,6 @@ Register 文档形状(`entries[<plan-id>]` 数组 JSON)、**9 个必填字
|
|
|
114
114
|
|
|
115
115
|
## References
|
|
116
116
|
|
|
117
|
-
- **`mstar-
|
|
118
|
-
- **`mstar-
|
|
117
|
+
- **`mstar-artifacts`**(`references/status-and-residuals.md`)— 字段语义 SSOT:severity 含义与门禁关系、findings cleanup modes 全文、close 协议、engine-check 查询示例
|
|
118
|
+
- **`mstar-conventions`** — `{PROJECT_DIR}` / `{WORKFLOW_DIR}` 路径符号、`.mstarc` 声明、gitignore 策略
|
|
119
119
|
- **`mstar-review-qc`** — PM QC 编排与 residual 留档(PM 同轮必读)
|
|
@@ -21,7 +21,7 @@ description: "Morning Star QC orchestration — **SDD mandatory plan QC tri-revi
|
|
|
21
21
|
|
|
22
22
|
- **`Execution mode: sdd`**:全部 task + L2 task reviewers 完成后 → **强制 tri-review**(`QC mode: full tri-review`,**N=3**)。Assignment 须含 **branch review-package** 路径与 `{SDD_DIR}/review/qcN.md` report paths。PM 汇总 `{SDD_DIR}/review/qc-consolidated.md` 并回写主 plan durable summary。
|
|
23
23
|
- **`Execution mode: inline`**:单席 `qc-specialist` → `{SDD_DIR}/review/qc.md`(**N=1**),或按 hotfix 路由跳过。
|
|
24
|
-
- **After `Request Changes` (default)**:**Targeted re-review** — PM dispatches only seats that **raised** blocking findings; each updates **the same** `{SDD_DIR}/review/qcN.md` (`## Revalidation`, update verdict). **Do not** spawn `qcN-rev2.md` for targeted re-review. Naming → **`mstar-
|
|
24
|
+
- **After `Request Changes` (default)**:**Targeted re-review** — PM dispatches only seats that **raised** blocking findings; each updates **the same** `{SDD_DIR}/review/qcN.md` (`## Revalidation`, update verdict). **Do not** spawn `qcN-rev2.md` for targeted re-review. Naming → **`mstar-artifacts/references/plan-files-and-reports.md`** § QC 三审触发时机.
|
|
25
25
|
- **Full tri re-review (exception)**:Assignment **`QC re-review: full tri-review`** → new basenames (`qc1-rev2.md` …); PM marks **active wave** in consolidated decision.
|
|
26
26
|
|
|
27
27
|
> **Engine check (when available):** run `mstar review seats <assignment-file> [--mode sdd|inline|targeted] [--reviewers <role1,role2,...>]` (or `import { executionModeToN, assertTriIdentity } from "@mstar-harness/engine"` in a host hook) to map `Execution mode` to its QC seat count N above and assert tri identity. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
@@ -36,10 +36,10 @@ description: "Morning Star QC orchestration — **SDD mandatory plan QC tri-revi
|
|
|
36
36
|
|
|
37
37
|
## Residual Findings 留档门禁(PM)
|
|
38
38
|
|
|
39
|
-
- 先读 Assignment **`Findings cleanup`**(`plans[].metadata.findings_cleanup` mirror 已删——Assignment 是唯一 mode 来源)→ **`mstar-
|
|
39
|
+
- 先读 Assignment **`Findings cleanup`**(`plans[].metadata.findings_cleanup` mirror 已删——Assignment 是唯一 mode 来源)→ **`mstar-artifacts/references/status-and-residuals.md`**「Findings cleanup modes」。
|
|
40
40
|
- **`Findings cleanup: zero-residual`**(iteration Phase 2 默认):可修 **Warning / Suggestion / Critical** → **fix-now + targeted re-review**,**禁止**把可修项登记为 open R# 或用 `Approve with residuals` 收口;**`nit`** 当场修或丢弃(无 R#)。仅 **真 blocker-defer**(外部依赖 / 须下轮产品决策 / 用户本轮显式 defer + Durable Roadmap)可登记 open R#(`decision: defer`)。此时 `Approve with residuals` **仅**允许剩余项全是该类 defer。
|
|
41
41
|
- **`Findings cleanup: allow-residual`**(standalone / hotfix / inline 默认):阻断项修复后仍有 **Warning / Suggestion** 或技术债 → 必须留档;**`Approve with residuals`** 仅当无 open **Critical**;PM 汇总结论须含 residual 清单与跟踪位置。
|
|
42
|
-
- **`severity`** 仅允许 `mstar-
|
|
42
|
+
- **`severity`** 仅允许 `mstar-artifacts/references/status-and-residuals.md` 枚举。
|
|
43
43
|
- **Open SSOT**:`{PROJECT_DIR}/<id>/residuals.json`(默认 `{HARNESS_DIR}/projects/<id>/`;无项目流程 `_default`)→ `entries[<plan-id>]`;PM 在 consolidated 决策分配 **R1…** 并写入。关闭 → 在 register 内 **in place** 置 `lifecycle` / `closed_at` / `closure_note`(v1 `archived/residuals/` 与 `archive-residuals` 已移除)。
|
|
44
44
|
- 主 plan 仅作人类索引;不得作为唯一 SSOT。
|
|
45
45
|
- 未完成 residual 留档(`allow-residual`)或未清干净可修 findings(`zero-residual`)→ 不得进入 plan **Done**。
|
|
@@ -73,4 +73,4 @@ QC 编排主链:plan 全部 task + L2 完成后 → PM 按 `Execution mode`
|
|
|
73
73
|
|
|
74
74
|
- Leaf QC 执行(checklist / 报告模板 / 透镜)→ **`mstar-roles/references/qc-specialist/`**
|
|
75
75
|
- Per-task review(L2,implement 波次内)→ **`mstar-sdd`**
|
|
76
|
-
- Review bundle 命名与 QC 触发时机 → **`mstar-
|
|
76
|
+
- Review bundle 命名与 QC 触发时机 → **`mstar-artifacts/references/plan-files-and-reports.md`**
|
|
@@ -38,12 +38,12 @@ If any conflict appears, `mstar-harness-core` remains the authoritative source f
|
|
|
38
38
|
|
|
39
39
|
| Role | Typical adds |
|
|
40
40
|
| --- | --- |
|
|
41
|
-
| `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-
|
|
42
|
-
| `fullstack-dev*`, `frontend-dev` | `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (if repo writes); plan path symbols from `mstar-
|
|
43
|
-
| `qc-specialist*` | `mstar-branch-worktree`, `mstar-
|
|
44
|
-
| `qa-engineer` | `mstar-branch-worktree`, `mstar-
|
|
45
|
-
| `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-
|
|
46
|
-
| `code-reviewer` | `mstar-sdd` (per-task review mode); `mstar-audit` (audit mode: full workflow); `mstar-
|
|
41
|
+
| `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-conventions`, `mstar-roles` ref; + `references/project-manager/qa-trigger-matrix.md` for QA gate tiers; + `mstar-review-qc` before QC; + `mstar-branch-worktree` / `mstar-artifacts` as the round requires; + `mstar-skill-authoring` for skill work; + `mstar-iteration` for iteration lifecycle (start/drive/close); + `mstar-strategy` for strategic alignment; + `mstar-compound` / `mstar-compound-refresh` pre-loaded by `mstar-iteration` § iteration-close |
|
|
42
|
+
| `fullstack-dev*`, `frontend-dev` | `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (if repo writes); plan path symbols from `mstar-conventions` (minimal); `mstar-design-md` when implementing styled UI |
|
|
43
|
+
| `qc-specialist*` | `mstar-branch-worktree`, `mstar-artifacts` (review bundle paths); `references/qc-specialist/` (workflow, checklist, template, lenses); `mstar-design-md` when reviewing UI |
|
|
44
|
+
| `qa-engineer` | `mstar-branch-worktree`, `mstar-artifacts` (closing R#); `references/qa-engineer/acceptance-gate.md`; `mstar-design-md` when verifying visual output |
|
|
45
|
+
| `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent); `mstar-strategy` (STRATEGY.md creation/maintenance) |
|
|
46
|
+
| `code-reviewer` | `mstar-sdd` (per-task review mode); `mstar-audit` (audit mode: full workflow); `mstar-conventions` (paths); `mstar-artifacts` (plan-quality-bar for audit plans) |
|
|
47
47
|
| `ops-engineer` | `mstar-coding-behavior`, `mstar-branch-worktree` |
|
|
48
48
|
| `prompt-engineer` | All topic skills when editing harness text |
|
|
49
49
|
|
|
@@ -74,7 +74,7 @@ Role `references/*.md` files include explicit **`NEVER`** sections (anti-recursi
|
|
|
74
74
|
| `qc-specialist-2` | `2` | Security and correctness risk | `qc2` → `{SDD_DIR}/review/qc2.md` |
|
|
75
75
|
| `qc-specialist-3` | `3` | Performance and reliability risk | `qc3` → `{SDD_DIR}/review/qc3.md` |
|
|
76
76
|
|
|
77
|
-
PM consolidated (tri mode): `{SDD_DIR}/review/qc-consolidated.md` (same folder; no `<plan-id>` basename prefix) + durable main-plan summary. Naming SSOT: `mstar-
|
|
77
|
+
PM consolidated (tri mode): `{SDD_DIR}/review/qc-consolidated.md` (same folder; no `<plan-id>` basename prefix) + durable main-plan summary. Naming SSOT: `mstar-artifacts/references/plan-files-and-reports.md`.
|
|
78
78
|
|
|
79
79
|
> **Engine check (when available):** run `mstar roles validate` (or import `validateRoleMapping` / `lintLoadOrder` from `@mstar-harness/engine` in a host hook) to validate the mapping and parameter tables above against the on-disk `references/*.md` layout (shared families included) and lint the load-order declarations. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
80
80
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Leaf Executor Core (shared blocks)
|
|
2
2
|
|
|
3
|
-
> Shared by all leaf-executor role references in `mstar-roles/references/`. Each role file references this for the identical Completion Report template, repo-write Git discipline, and plan/documentation rules. **Read `mstar-harness-core` first.** Role-specific NEVER rules, mission, and responsibilities stay in each role file — this file holds only the uniform blocks.
|
|
3
|
+
> Shared by all leaf-executor role references in `mstar-roles/references/`. Each role file references this for the identical Completion Report template, repo-write Git discipline, the shared anti-recursion NEVER section, and plan/documentation rules. **Read `mstar-harness-core` first.** Role-specific NEVER rules, mission, and responsibilities stay in each role file — this file holds only the uniform blocks.
|
|
4
4
|
|
|
5
5
|
## Completion Report
|
|
6
6
|
|
|
@@ -32,7 +32,7 @@ Apply when the assignment writes tracked repo files:
|
|
|
32
32
|
|
|
33
33
|
## Plan & Documentation Rules
|
|
34
34
|
|
|
35
|
-
- Follow `{HARNESS_DIR}` / `{PLAN_DIR}` conventions from `mstar-
|
|
35
|
+
- Follow `{HARNESS_DIR}` / `{PLAN_DIR}` conventions from `mstar-conventions`.
|
|
36
36
|
- Update assigned task checkboxes and plan notes for your scope.
|
|
37
37
|
- Do not mark full plan `Done` (only `project-manager` or `qa-engineer` per `mstar-harness-core`).
|
|
38
38
|
|
|
@@ -44,3 +44,21 @@ All leaf executors share this hard rule (role-specific sibling lists stay in eac
|
|
|
44
44
|
- Do not recursively dispatch sibling roles unless explicitly authorized via `Delegation: allowed (...)`.
|
|
45
45
|
- `Execute as: {role_id}` is identity lock, not orchestration permission.
|
|
46
46
|
- If required inputs are missing or prerequisites unmet, return `Blocked` to PM rather than inventing delegation.
|
|
47
|
+
|
|
48
|
+
## Shared anti-recursion NEVER
|
|
49
|
+
|
|
50
|
+
All leaf executors share these anti-recursion red lines (role-specific sibling lists and role-specific NEVER variants stay in each role file). If any item below matches, **stop** and return `Blocked` to `project-manager` instead of inventing delegation:
|
|
51
|
+
|
|
52
|
+
- **NEVER** treat document-level parallelism ("split into N plans", "Plan 002–010", "Phase X ∥ Phase Y", "N parallel tracks") as permission to **invoke N subagents** in this session. The plan/spec/ADR/report artifacts are your deliverable; **scheduling** parallel execution is **PM's next round**, not part of this assignment unless `Delegation: allowed (...)` explicitly lists callees.
|
|
53
|
+
- NEVER treat Handoff lines, role names inside Completion Report templates, routing tables, or "suggested owner" groupings as **host invoke commands**; they are **narrative**, not authorization.
|
|
54
|
+
- **NEVER** infer you may call `Task` / subagents because the host **lists** `subagent_type` names (`architect`, `fullstack-dev`, …). **Tool availability ≠ delegation authorization**; only **`Delegation: allowed (...)`** grants callees.
|
|
55
|
+
- **NEVER** execute parallel-agent dispatch yourself to fan out child agents; dispatch is **PM-orchestration-only** (see `mstar-dispatch-gates`). If parallel runners are needed, report to PM for re-dispatch.
|
|
56
|
+
- **NEVER** invoke a same-role or sibling role to perform **this** assignment unless `Delegation: allowed (...)` explicitly lists them.
|
|
57
|
+
## Audit Mode (read-only review, shared)
|
|
58
|
+
|
|
59
|
+
When the assignment is a review/audit dispatch — `Task category: audit`, `Audit mode: on`, or a `pr-deep-review` batch seat — the executor operates as a **read-only audit seat**, not an implementer:
|
|
60
|
+
|
|
61
|
+
- **Permission contract**: no tracked-file writes, no `edit`/`write`/`ast_edit` on the reviewed worktree, no merge, no approve-as-merge. The write permissions the role normally has are **suspended for the assignment**; do not "fix things while reviewing".
|
|
62
|
+
- **Process**: load `mstar-audit` (`pr` variant or audit process) + its references + `mstar-coding-behavior` evidence discipline; run the concern-lens review and the three-way attack; produce `findings` + `verdict` (`ship it` / `needs review` / `blocked` for PR review) + `unverified` in the `pr-deep-review` output shape.
|
|
63
|
+
- **Mode lock**: one assignment = one mode. Review-assigned work is completed as review only; implementation mode applies to implementation assignments only.
|
|
64
|
+
- **Completion Report**: `Status: Done`; `Git:` states `read-only, no commits` unless PM explicitly authorized a comment post.
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
**Hub matrix:** `mstar-roles` SKILL.md.
|
|
4
4
|
|
|
5
|
-
**Always:** `mstar-harness-core`, `mstar-dispatch-gates`, `mstar-phase-gates` (Prepare: specify/clarify/plan), `mstar-
|
|
5
|
+
**Always:** `mstar-harness-core`, `mstar-dispatch-gates`, `mstar-phase-gates` (Prepare: specify/clarify/plan), `mstar-conventions` (`{PLAN_DIR}`, plan-writing path).
|
|
6
6
|
|
|
7
|
-
**Typically:** `mstar-
|
|
7
|
+
**Typically:** `mstar-artifacts` (specs, **`{ITERATION_DIR}/<id>/` package**); `mstar-coding-behavior`. Boundaries → **`mstar-iteration/references/iteration-artifact-boundaries.md`**.
|
|
8
8
|
|
|
9
|
-
**On demand:** `mstar-branch-worktree` (when committing architecture docs to the business repo).
|
|
9
|
+
**On demand:** `mstar-branch-worktree` (when committing architecture docs to the business repo); `mstar-design-md` (when the plan involves UI work / design tokens — read DESIGN.md for design specs).
|
|
10
10
|
|
|
11
11
|
**Host:** `mstar-host` (detect; `references/opencode.md` | `cursor.md` | `codex.md`).
|
|
12
12
|
|
|
@@ -17,7 +17,7 @@ You are the architecture role and technical-spec writer. You are dispatched by `
|
|
|
17
17
|
## Non-Recursive Dispatch Rule (Hard)
|
|
18
18
|
|
|
19
19
|
- Execute the assigned architecture/spec work in this session.
|
|
20
|
-
-
|
|
20
|
+
- Shared anti-recursion NEVER (incl. sibling-role spawn) → **`references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」.
|
|
21
21
|
- `Execute as: architect` means identity lock, not permission to orchestrate other roles.
|
|
22
22
|
- If the assignment is blocked by missing inputs, return `Blocked` to `project-manager`.
|
|
23
23
|
|
|
@@ -25,14 +25,11 @@ You are the architecture role and technical-spec writer. You are dispatched by `
|
|
|
25
25
|
|
|
26
26
|
If any item below matches, **stop** and return `Blocked` to `project-manager` instead of inventing delegation:
|
|
27
27
|
|
|
28
|
-
-
|
|
29
|
-
- **NEVER** treat `Handoff: project-manager / fullstack-dev / qa-engineer …`, role names inside Completion Report templates, routing tables, or “suggested owner” groupings as **host invoke commands**; they are **narrative**, not authorization.
|
|
30
|
-
- **NEVER** infer you may call `Task` / subagents because the host **lists** `subagent_type` names (`architect`, `fullstack-dev`, …). **Tool availability ≠ delegation authorization**; only **`Delegation: allowed (...)`** grants callees.
|
|
31
|
-
- **NEVER** execute parallel-agent dispatch yourself to fan out child agents; dispatch is **PM-orchestration-only** (see `mstar-dispatch-gates`). If parallel runners are needed, report to PM for re-dispatch.
|
|
28
|
+
- Shared anti-recursion NEVER bullets (doc-level parallelism ≠ N subagents; Handoff / routing prose ≠ invoke; tool exposure ≠ delegation; PM-only parallel dispatch; no same-role / sibling spawn without `Delegation: allowed (...)`): **`references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」.
|
|
32
29
|
- **NEVER** treat `Gate Decision: blocked` (material, high-impact ambiguities still open) as permission to hand off “ready for implement” architecture—finish clarify, update the package, or return `Blocked` to PM.
|
|
33
30
|
- **NEVER** use a temporary, mixed, or partial design as the selected approach unless the target architecture and staged roadmap are written in the assigned plan/spec. “Later” without a tracking location is `Blocked`, not a handoff.
|
|
34
31
|
- **NEVER** edit application implementation source, automated tests, CI workflows, Dockerfiles, or secrets-bearing runtime configuration unless the assignment explicitly limits you to doc-only placeholders **and** PM recorded the risk acceptance.
|
|
35
|
-
- **NEVER** persist planning artifacts under external default plan directories; only `{PLAN_DIR}` per `mstar-
|
|
32
|
+
- **NEVER** persist planning artifacts under external default plan directories; only `{PLAN_DIR}` per `mstar-conventions`.
|
|
36
33
|
|
|
37
34
|
These rules align with `mstar-harness-core` executor anti-recursion invariants.
|
|
38
35
|
|
|
@@ -40,7 +37,7 @@ These rules align with `mstar-harness-core` executor anti-recursion invariants.
|
|
|
40
37
|
|
|
41
38
|
Use `mstar-phase-gates` for trade-off exploration and technical plan checkpoints. Use `mstar-coding-behavior` only when editing tracked files or responding to review feedback. Same-repo multi-writer parallelism is governed by `mstar-branch-worktree`.
|
|
42
39
|
|
|
43
|
-
Plan artifacts must follow `{PLAN_DIR}` from `mstar-
|
|
40
|
+
Plan artifacts must follow `{PLAN_DIR}` from `mstar-conventions`, not external default paths.
|
|
44
41
|
|
|
45
42
|
## Responsibilities
|
|
46
43
|
|