@mstar-harness/dsh 3.6.3 → 3.7.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/README.md +4 -6
- package/README.zh.md +3 -3
- package/dist/client/panel/PanelView.d.ts +8 -11
- package/dist/client/panel/TabNav.d.ts +2 -2
- package/dist/client/panel/graph/event-log.d.ts +5 -9
- package/dist/client/panel/graph/project-graph.d.ts +53 -72
- package/dist/client/panel/graph/schema.d.ts +31 -37
- package/dist/client/panel/locale.d.ts +19 -19
- package/dist/client/panel/pages/AgentCanvasPage.d.ts +40 -58
- package/dist/client/panel/pages/EventLogPage.d.ts +6 -6
- package/dist/client/panel/pages/IterationInfoSection.d.ts +9 -11
- package/dist/client/panel/pages/IterationTaskPage.d.ts +3 -3
- package/dist/client/panel/plan-sort.d.ts +3 -6
- package/dist/client/panel/state-section.d.ts +1 -1
- package/dist/client/panel/zones/Legend.d.ts +2 -2
- package/dist/client/panel/zones/ProjectRollup.d.ts +1 -2
- package/dist/client/panel/zones/TaskBoard.d.ts +1 -2
- package/dist/gates/_shared.d.ts +7 -10
- package/dist/gates/adapter.d.ts +6 -9
- package/dist/gates/agent-flow.d.ts +49 -59
- package/dist/gates/agent-personas.d.ts +1 -2
- package/dist/gates/catalog.d.ts +2 -5
- package/dist/gates/dispatch.d.ts +9 -11
- package/dist/gates/fallbacks-advisory.d.ts +2 -3
- package/dist/gates/fallbacks-probe.d.ts +2 -2
- package/dist/gates/fallbacks-seeds.d.ts +1 -1
- package/dist/gates/fallbacks-structural.d.ts +1 -1
- package/dist/gates/goal-bridge.d.ts +6 -9
- package/dist/gates/role-persona.d.ts +2 -3
- package/dist/gates/skill-lint.d.ts +19 -2
- package/dist/gates/system-prompt.d.ts +7 -11
- package/dist/gates/tools.d.ts +1 -1
- package/dist/gates/workflow-ledger.d.ts +21 -28
- package/dist/gates/workflow-policy.d.ts +15 -19
- package/dist/gates/workflow-selection.d.ts +3 -3
- package/dist/index.js +215 -33
- package/dist/types.d.ts +4 -7
- package/harness-commands/iteration-drive.md +6 -6
- package/harness-commands/iteration-loop.md +7 -7
- package/harness-commands/iteration-start.md +8 -8
- package/harness-skills/mstar-coding-behavior/SKILL.md +3 -20
- package/harness-skills/mstar-dispatch-gates/SKILL.md +7 -13
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +9 -53
- package/harness-skills/mstar-host/references/zcode.md +1 -0
- package/harness-skills/mstar-iteration/SKILL.md +32 -318
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +1 -1
- package/harness-skills/mstar-iteration/references/phase-1-prepare.md +155 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +113 -3
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
- package/harness-skills/mstar-roles/SKILL.md +14 -12
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +5 -6
- package/harness-skills/mstar-roles/references/architect.md +1 -1
- package/harness-skills/mstar-roles/references/code-reviewer.md +11 -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 +4 -0
- package/harness-skills/mstar-roles/references/project-manager.md +6 -4
- 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 +1 -1
- package/harness-skills/mstar-roles/references/writing-specialist.md +1 -1
- package/harness-skills/mstar-sdd/references/file-handoffs.md +40 -7
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +9 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +9 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +7 -0
- package/package.json +1 -1
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
# Phase 2 control worktree +
|
|
1
|
+
# Phase 2: Autonomous Execute — per-plan loop + control worktree + lease
|
|
2
|
+
|
|
3
|
+
> Loaded by `mstar-iteration` SKILL.md on the **execute / resume** route, and by the Phase 2+ command layer. **Read `mstar-harness-core` first.** Entry = §2.0 五道闸全过;continuous execution / push 纪律(§2.6)的 SSOT 仍在 `mstar-iteration` SKILL.md。
|
|
2
4
|
|
|
3
5
|
Normative field names → field SSOT
|
|
4
6
|
`mstar-artifacts/references/status-and-residuals.md`; the **full lease
|
|
@@ -9,8 +11,8 @@ full protocol here.
|
|
|
9
11
|
|
|
10
12
|
## When it applies
|
|
11
13
|
|
|
12
|
-
**Phase 2+
|
|
13
|
-
|
|
14
|
+
**Phase 2**(SKILL.md execute/resume route + `iteration-drive` / `iteration-loop`
|
|
15
|
+
command layer;`iteration-start` ends before this). Defaults are **hard** unless the current turn
|
|
14
16
|
explicitly waives via Assignment `Worktree mode: waived` (or equivalent user
|
|
15
17
|
instruction). `Plan parallelism: serial` is **not** a waiver — it only forces
|
|
16
18
|
serial cross-plan **implement** scheduling while control worktree + leases remain
|
|
@@ -21,6 +23,62 @@ starts at **Phase 2 entry**.
|
|
|
21
23
|
|
|
22
24
|
**Phase scope**:本参考仅约束 **Phase 2**(含 serial integration merge 与「control 禁止产品编辑 / 每 plan feature worktree」)。**Phase 5** PR merge-ready 修复 **不**沿用该产品编辑隔离——直接在 control / `spec_integration_branch` 上改,**禁止**另开 Phase 5 fix worktree → **`phase-4-5-pr-delivery.md`** §5.0。
|
|
23
25
|
|
|
26
|
+
**本 Phase 定义 per-plan 派发循环的完整流程**:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QC→**QA gate**→Done→合并)、dispatch-first 约束。PM 读取本 Phase(含 §2.0–§2.5 与下方 lease 细则)即可执行迭代。
|
|
27
|
+
|
|
28
|
+
**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」。
|
|
29
|
+
|
|
30
|
+
## 2.0 前置条件(五道闸)
|
|
31
|
+
|
|
32
|
+
进入 Autonomous Execute 前必须满足:
|
|
33
|
+
|
|
34
|
+
1. workflow snapshot(`{WORKFLOW_DIR}/<id>/snapshot.json`)中至少一条 plan `status` ≠ `Done`;根 `status.json` `workflows[]` 含该 iteration entry
|
|
35
|
+
2. **Pre-implement gate = GO**:plan 已 locked、tasks ready(见 `mstar-phase-gates`)
|
|
36
|
+
3. 用户意图为 **continue Autonomous Execute**(推进迭代 Execute、继续 per-plan 循环等)
|
|
37
|
+
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` 补位。
|
|
38
|
+
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` 当作跨主机无锁并行的授权。细则 → 下方「Control worktree」「Execution lease」「Multi-plan parallelism」「Waiver」各节。
|
|
39
|
+
|
|
40
|
+
> **Engine-check(lease verify / verify-integration)唯一规范体:** `mstar-artifacts` `SKILL.md`(Engine check lease 行;standalone 保证同文)。
|
|
41
|
+
|
|
42
|
+
任一 false → **stop**。Phase 1 / Prepare 未完成 → 先完成 Phase 1 或 per-plan Prepare,再进入本 Phase。
|
|
43
|
+
|
|
44
|
+
## 2.1 Session todos(派发前设护栏)
|
|
45
|
+
|
|
46
|
+
每个 plan wave 启动前设定 host todos,防止范围漂移:
|
|
47
|
+
|
|
48
|
+
| Host | 工具 | 最小集合 |
|
|
49
|
+
|------|------|---------|
|
|
50
|
+
| **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/**QA gate**);分支 checkpoint;**仅剩 1 个非 Done plan 时追加 `phase-3-iteration-close`**(open 直至 §3.5);Phase 4 后 **`phase-5-pr-merge-ready`**(open 直至 §5.5) |
|
|
51
|
+
| **Codex** | `update_plan` / Goal UI | 同上 |
|
|
52
|
+
| **OpenCode** | host todo/plan UI(如有) | 同上 |
|
|
53
|
+
|
|
54
|
+
SSOT = `{WORKFLOW_DIR}/<id>/snapshot.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一步。
|
|
55
|
+
|
|
56
|
+
## 2.2 Read backlog
|
|
57
|
+
|
|
58
|
+
1. 读 `mstar-artifacts` + workflow snapshot(`{WORKFLOW_DIR}/<id>/snapshot.json`)与根 `status.json`
|
|
59
|
+
2. 列出 snapshot 中 `status` ∈ `{Todo, InProgress, InReview, Blocked}` 的 plan(优先级:`InProgress` → `InReview` → `Todo` → unblock `Blocked`)
|
|
60
|
+
3. 读 snapshot `branch.base` / `branch.target`,以及 plan `metadata.spec_integration_branch` / `merge_target` / `primary_spec` 链接
|
|
61
|
+
|
|
62
|
+
## 2.3 Branch anchors + integration branch + control worktree(Phase 2 入口)
|
|
63
|
+
|
|
64
|
+
**Branch anchors 解析顺序**(任一环节缺失则 STOP,**禁止**默认 `main`/`master`):
|
|
65
|
+
|
|
66
|
+
1. workflow snapshot → `branch.base`(`iteration_base_branch`)、`branch.target`(`target_branch`)、`branch.integration`(`spec_integration_branch`);plan 行 → `metadata.spec_integration_branch`
|
|
67
|
+
2. 若 (1) 缺字段 → 读当前迭代 compass frontmatter 同名键:优先 `{ITERATION_DIR}/<iteration-id>/delivery-compass.md`;若无则 legacy `{ITERATION_DIR}/<iteration-id>-delivery-compass.md`
|
|
68
|
+
3. 若 compass 有值而 snapshot 无 → **同轮 backfill** snapshot `branch`
|
|
69
|
+
4. 仍缺 → 向用户确认 base / PR target;**不得**因 `git symbolic-ref refs/remotes/origin/HEAD` 指向 `main` 就自动采用
|
|
70
|
+
5. 所有参与本轮迭代的 active plan **必须**解析到**同一** `spec_integration_branch`;不一致 → **STOP**
|
|
71
|
+
|
|
72
|
+
**Control worktree(§2.0 #5 未 waive 时 — HARD)**按下方「Control worktree (Phase 2 entry)」checklist 执行(含:若 integration 分支尚不存在,在 control worktree 内 `git checkout -b <spec_integration_branch> <iteration_base_branch>`——**必须**从记录的 base 创建)。
|
|
73
|
+
|
|
74
|
+
**Git 操作(无 control worktree 时 — 仅 `Worktree mode: waived`)**:
|
|
75
|
+
|
|
76
|
+
1. `git fetch`(按需)确认 `iteration_base_branch` 存在
|
|
77
|
+
2. **checkout 或创建** `spec_integration_branch`(同上)
|
|
78
|
+
3. `git branch --show-current` 确认在 `spec_integration_branch`
|
|
79
|
+
|
|
80
|
+
`spec_integration_branch` 是本迭代内所有 plan feature branch 的 merge target。QC **`Review range` / `Diff basis`** 的 merge-base 参照优先用 snapshot `branch.target`(或 PM 书面指定的 base ref),**禁止**无 Assignment 依据写死 `origin/main`。
|
|
81
|
+
|
|
24
82
|
## Control worktree (Phase 2 entry)
|
|
25
83
|
|
|
26
84
|
1. Resolve all active plans' `metadata.spec_integration_branch` to the **same**
|
|
@@ -81,6 +139,58 @@ mismatch → **STOP**.
|
|
|
81
139
|
|
|
82
140
|
> **Lease Engine-check:** canonical callout lives in `mstar-artifacts` `SKILL.md`(Engine-check lease 行)— this file carries the execution checklist only.
|
|
83
141
|
|
|
142
|
+
## 2.4 Per-plan loop(直到全部 Done)
|
|
143
|
+
|
|
144
|
+
**跨 plan 默认**(**无论** `Worktree mode: waived`):**不同 `plan_id` 可并行 implement** 须满足 §2.0 #5 跨 plan 并行安全闸——(a) coordination 路径 same-host 独占写锁可用且每次 status/协调变更持锁,或 (b) **`Plan parallelism: serial`**(waived 时默认),或 (c) 用户本轮 `Cross-host lease race: accepted` + audit `notes`;否则 Assignment 仍写并行 → **Blocked**。**merge 入 `spec_integration_branch` 仍串行**(snapshot 顶层 `integration_merge_lease`;waived 时无 merge lease 仍须串行 merge)。未 waive 时 **禁止**无 verified `execution_lease` 的跨 plan 可写派发。
|
|
145
|
+
|
|
146
|
+
对每个本轮要推进的 active `plan_id`(可交错/并行,非强制 plan A 全 Done 再 plan B):
|
|
147
|
+
|
|
148
|
+
1. **Claim / resume — execution lease**(§2.0 #5 未 waive):按下方「Execution lease」claim/resume 规则——同 `holder` → resume(校验 `worktree_path` / `working_branch` 与 Assignment 一致);异 `holder` → **Blocked**;`InProgress` 无 lease → **STOP** 升级(孤儿恢复 → **`mstar-artifacts`**);verify 通过前 **禁止**可写派发
|
|
149
|
+
2. **Plan start — feature worktree + branch**:创建/校验 dedicated feature worktree(默认 `<repoRoot>/.worktrees/<plan-id>-<slug>`);Assignment 须含绝对 `Worktree path` + `Working branch`(与 lease 一致)。plan 内多可写并行轨 → **`mstar-branch-worktree`** **`references/parallel-writable-pre-dispatch.md`**
|
|
150
|
+
3. **Implement → InReview**(产品编辑在 feature worktree;plans / snapshot / iterations / SDD 经 control 绝对路径):
|
|
151
|
+
- **默认 `Execution mode: sdd`**(多 task plan;hotfix 可 `inline`)。
|
|
152
|
+
- PM 载入 **`mstar-sdd`** 后,按 plan task 顺序 **串行** per-task 循环(**不是**一次派发 dev 做全部 tasks):
|
|
153
|
+
1. `mstar sdd workspace <plan-id>` → `{SDD_DIR}`
|
|
154
|
+
2. `mstar sdd task-brief <plan-file> N` → `{SDD_DIR}/task-N-brief.md`;记录 `BASE_SHA`
|
|
155
|
+
3. Dispatch **one** implementer subagent(`references/implementer-prompt.md`:brief 路径 + report 路径 + `Model tier`;**禁止**贴整份 plan)
|
|
156
|
+
4. Implementer `DONE` → `mstar sdd review-package BASE HEAD` → task diff 文件
|
|
157
|
+
5. Dispatch **one** task reviewer subagent(brief + report + diff + Global Constraints)
|
|
158
|
+
6. Fix loop 直至 review clean;append `{SDD_DIR}/progress.md`;更新 snapshot plan 行 / plan checkbox
|
|
159
|
+
7. Next task
|
|
160
|
+
- 每次 Completion Report 后更新 snapshot(`workflows/<id>/snapshot.json`)+ 主 plan
|
|
161
|
+
4. **QC → QA gate**(plan 保持 **`InReview`**;**保留** `execution_lease`):per-plan 审查链 → **`mstar-sdd`**(L1–L2)+ **`mstar-review-qc/references/review-responsibility-boundaries.md`**(L3 tri / inline 单席;raw reports in `{SDD_DIR}/review/`,durable summary in main plan/snapshot)+ **`QA gate`**(`mandatory` → `qa-engineer`;`pm-acceptance` → PM checklist)。**禁止**在 integration merge 成功前设 `Done` 或删除 `execution_lease`。
|
|
162
|
+
5. **Plan complete — serial merge back**(§2.0 #5 未 waive):自 **control worktree** claim/resume snapshot 顶层 `integration_merge_lease` → 将 plan feature branch 合并入 `spec_integration_branch`(仅 merge-lease holder;细则 → 下方「Integration merge lease」)→ 记录 merge commit 证据 → 释放 merge lease;**同轮**设 `Done` 并删除 `execution_lease`。merge 失败:保持 `InReview` + 保留 lease,不得标 `Done`。
|
|
163
|
+
6. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>/delivery-compass.md` 的 `## Plans` 表状态列
|
|
164
|
+
7. **Next plan / parallel wave** 从步骤 1 继续(可并行推进其他已 claim 的 plan;merge 仍排队串行)
|
|
165
|
+
|
|
166
|
+
全部 plan `Done` → **Phase transition gate**(见 `mstar-iteration` SKILL.md **Phase transition gates** 表):
|
|
167
|
+
|
|
168
|
+
1. **STOP** per-plan loop — 禁止 merge 后继续下一 plan、禁止开 PR、禁止会话结束语。
|
|
169
|
+
2. 打印 **`## Phase 3: iteration-close`**。
|
|
170
|
+
3. 按 **`references/phase-3-iteration-close.md`** §3.0 起独立执行至 §3.5。final plan 的 Assignment / closure 仅作输入,**不能**替代 Phase 3 gate。
|
|
171
|
+
|
|
172
|
+
## 2.5 Dispatch-first(implement 派发约束)
|
|
173
|
+
|
|
174
|
+
派发纪律 SSOT → **`mstar-dispatch-gates`** · **`mstar-sdd`** · **`mstar-host/references/parallel-dispatch.md`**。
|
|
175
|
+
|
|
176
|
+
**SDD implement(Phase 2 默认)** — PM **已载入 `mstar-sdd`** 后执行:
|
|
177
|
+
|
|
178
|
+
| 规则 | 说明 |
|
|
179
|
+
|------|------|
|
|
180
|
+
| 串行 | 同一 plan 内 **one implementer at a time**;每 task 后 **one fresh task reviewer** |
|
|
181
|
+
| Sticky(可选) | Assignment **`SDD implementer session: sticky`** + `implementer-session.json`;implementer **resume**,reviewer **fresh** — `mstar-sdd/references/sticky-implementer-session.md` |
|
|
182
|
+
| 文件交接 | brief / report / diff / `progress.md` 在 `{SDD_DIR}`;dispatch prompt **只给路径**,不贴 plan 全文或 task 历史 |
|
|
183
|
+
| Assignment 字段 | 每个 implement dispatch 须含 `Execution mode: sdd`、`SDD dir`、`Model tier`;§2.0 #5 未 waive 时还须含绝对 `Worktree path` + verified `execution_lease`;**禁止**省略 `Model tier` |
|
|
184
|
+
| 大包 inline | **禁止**把 T1–Tn 或整份 plan 写进 **一个** `fullstack-dev` leaf Assignment 冒充 SDD |
|
|
185
|
+
| 分支 diff | 全部 task 完成后 `mstar sdd review-package MERGE_BASE HEAD` → `{SDD_DIR}/review/` branch diff → plan QC tri(N=3) |
|
|
186
|
+
|
|
187
|
+
Iteration Phase 2 附加:
|
|
188
|
+
|
|
189
|
+
- PM **NEVER** 在 PM 线程实现产品代码(delegate dev;hotfix 例外见 **`mstar-phase-gates`**)
|
|
190
|
+
- `Subagent invokes issued: 0` 而 Assignment 已写出 → **`dispatch incomplete`**;下一条补发 invoke,禁止 PM 顶替
|
|
191
|
+
- QC 初轮:**SDD → N=3**;**inline → N=1**;plan QC tri 三席 **同条消息 N=3**(非 implement 轨数)
|
|
192
|
+
- **`Findings cleanup: zero-residual`(默认)**:QC 后可修 Warning/Suggestion → 继续 fix→targeted re-review,直至 clean `Approve` 或仅剩真 blocker-defer;**禁止**把可修项登记为 open residual 草草 `Approve with residuals`
|
|
193
|
+
|
|
84
194
|
## Feature worktree (per plan)
|
|
85
195
|
|
|
86
196
|
- Each concurrently active plan uses a **distinct** absolute feature-worktree
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Phase 5 helper skill discovery(babysit / greploop)
|
|
2
2
|
|
|
3
|
-
> Loaded
|
|
3
|
+
> Loaded from **`mstar-iteration/references/phase-4-5-pr-delivery.md`** §5(via the iteration command layer;route-map row "Phase 5 helper discovery")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
|
|
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-roles
|
|
3
|
-
description: Morning Star role prompt hub — `agents/*.md` shells plus full behavior in `references/*.md`. Role files are **identity-first** (mission / responsibilities / NEVER rules); topic `mstar-*` skills appear only as **PM-activated skill presets** (Assignment `Skill presets:` field), not default dependencies. Always load for any Morning Star role (`project-manager`, `product-manager`, `architect`, `code-reviewer`, `fullstack-dev`, `fullstack-dev-2`, `frontend-dev`, `qa-engineer`, `qc-specialist*`, `ops-engineer`, `writing-specialist`, `prompt-engineer`). Cross-role **Role → skill presets** summary in this SKILL.md; per-role preset menus in `references/*.md` are authoritative once PM activates them. Full topic skill index → **`mstar-harness-core`**.
|
|
3
|
+
description: Morning Star role prompt hub and the **single load-selection authority** for Morning Star roles — `agents/*.md` shells plus full behavior in `references/*.md`. Role files are **identity-first** (mission / responsibilities / NEVER rules); topic `mstar-*` skills appear only as **PM-activated skill presets** (Assignment `Skill presets:` field), not default dependencies — this hub's § Load Order owns the omission / `none` / named-preset / resume / unknown-preset decision. Always load for any Morning Star role (`project-manager`, `product-manager`, `architect`, `code-reviewer`, `fullstack-dev`, `fullstack-dev-2`, `frontend-dev`, `qa-engineer`, `qc-specialist*`, `ops-engineer`, `writing-specialist`, `prompt-engineer`). Cross-role **Role → skill presets** summary in this SKILL.md; per-role preset menus in `references/*.md` are authoritative once PM activates them. Full topic skill index → **`mstar-harness-core`**.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load Order
|
|
7
7
|
|
|
8
|
-
When a Morning Star role starts work in a session:
|
|
8
|
+
This hub is the **single load-selection authority** for Morning Star roles (Spec A2): `mstar-harness-core` stays the lifecycle/authorization semantic authority and the global entry whenever it is loaded, but this hub owns the selection decision — core does not maintain a second mandatory-role table. When a Morning Star role starts work in a session:
|
|
9
9
|
|
|
10
|
-
1. Read this `mstar-roles` skill; resolve role mapping and parameter tables below.
|
|
11
|
-
2. Read the corresponding `references/<role>.md` file — **identity-first**: mission, scope, and NEVER rules come before any skill list.
|
|
12
|
-
3.
|
|
13
|
-
4.
|
|
10
|
+
1. Read this `mstar-roles` skill; resolve role mapping and parameter tables below. This bootstrap is the **one exception** to topic→core: it does not require `mstar-harness-core` first.
|
|
11
|
+
2. Read the corresponding `references/<role>.md` file — **identity-first**: mission, scope, and NEVER rules come before any skill list. Non-PM roles also read the linked minimal leaf boundary (`references/_shared/leaf-executor-core.md` — role-owned, always loads with the reference).
|
|
12
|
+
3. Apply the Assignment **`Skill presets:`** decision — explicit `none` ⇒ no optional topic preset (identity + assignment + role-owned methods only); omitted on a substantive implementation / QC / QA round ⇒ the role's `standard` preset; explicit named preset ⇒ that role's supported members; omitted on a trivial route ⇒ identity only. **Role-owned** QC/QA methods and assigned evidence obligations load regardless of preset. `none` never grants delegation and never waives gates. **Unknown preset** or missing required identity ⇒ return Needs Context / Blocked — never infer `project-manager`.
|
|
13
|
+
4. Whenever `mstar-harness-core` is loaded by that decision (PM required reads, `standard` routes, direct topic invocation) it remains the global entry (state machine, gates, routing); if any conflict appears, `mstar-harness-core` remains the authoritative source for lifecycle, gates, routing, and invariants.
|
|
14
|
+
5. Resume: retain loaded identity/contract only when the source hashes are unchanged; read changed / phase-required material; never reinterpret `none` as permission.
|
|
15
|
+
6. Expand placeholders from role parameters before execution.
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
The table below summarizes each role's preset menu; when a role file's preset section differs, follow the role file for that session.
|
|
16
18
|
|
|
17
|
-
Exception: `project-manager` is the core orchestrator and keeps **required reading** (not a preset) — see `references/project-manager.md`.
|
|
19
|
+
Exception: `project-manager` is the core orchestrator and keeps **required reading** (not a preset, never preset-gated) — see `references/project-manager.md`.
|
|
18
20
|
|
|
19
21
|
## Role Reference Mapping
|
|
20
22
|
|
|
@@ -37,7 +39,7 @@ Exception: `project-manager` is the core orchestrator and keeps **required readi
|
|
|
37
39
|
|
|
38
40
|
### Role → skill presets (PM-activated)
|
|
39
41
|
|
|
40
|
-
PM-owned activation
|
|
42
|
+
PM-owned activation; the omission / `none` / named-preset / resume / unknown-preset rule is defined once in **§ Load Order** above — this table only summarizes each role's preset menu (role refs own their named member lists). Role-owned files (e.g. `references/qc-specialist/`, `references/qa-engineer/acceptance-gate.md`) are excluded from presets; they always load with the reference.
|
|
41
43
|
|
|
42
44
|
| Role | Preset menu |
|
|
43
45
|
| --- | --- |
|
|
@@ -79,7 +81,7 @@ Role `references/*.md` files include explicit **`NEVER`** sections (anti-recursi
|
|
|
79
81
|
|
|
80
82
|
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`.
|
|
81
83
|
|
|
82
|
-
> **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.
|
|
84
|
+
> **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 (topics declare core-first; this hub's bootstrap is the single exception and must declare the § Load Order decision matrix). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
83
85
|
|
|
84
86
|
## Maintenance Rules
|
|
85
87
|
|
|
@@ -91,11 +93,11 @@ PM consolidated (tri mode): `{SDD_DIR}/review/qc-consolidated.md` (same folder;
|
|
|
91
93
|
|
|
92
94
|
## Workflow
|
|
93
95
|
|
|
94
|
-
加载顺序:Read 本 skill(角色映射 +
|
|
96
|
+
加载顺序:Read 本 skill(角色映射 + 参数表;本 skill 即加载选择权威)→ 解析对应 `references/<role>.md`(身份优先:mission / NEVER / responsibilities 在前)+ 非 PM 角色读取其链接的 leaf 边界 → 按 § Load Order 的 `Skill presets:` 决策加载专题 skill(解释权只在 § Load Order;角色 ref 只列成员名单)。映射 / 参数表与磁盘 `references/*.md` 布局不符时先修再继续。
|
|
95
97
|
|
|
96
98
|
## Evidence
|
|
97
99
|
|
|
98
|
-
正确结果 = 角色映射与加载契约可机器校验:`mstar roles validate` 通过(映射
|
|
100
|
+
正确结果 = 角色映射与加载契约可机器校验:`mstar roles validate` 通过(映射 0 violations;加载顺序 0 violations —— 专题声明 core-first,`mstar-roles` hub bootstrap 走唯一例外并声明 identity-first / none / standard / role-owned methods / unknown-preset 决策矩阵,见上方 Engine check blockquote 的 import 形态),`references/*.md` 布局与上表一一对应,shared-family 角色共用同一 reference 文件(引擎校验可用时先跑;不可用时以本文件为准)。
|
|
99
101
|
|
|
100
102
|
## References
|
|
101
103
|
|
|
@@ -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, the shared anti-recursion NEVER section, and plan/documentation rules. **
|
|
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. **Load selection follows the `mstar-roles` hub § Load Order** (Assignment `Skill presets:` decision): under explicit `none` this boundary plus the role identity carry the load-bearing semantics — no optional topic skill (including `mstar-harness-core`) is required, and `none` never grants delegation or waives gates. Whenever `mstar-harness-core` IS loaded (standard routes, PM rounds, direct topic invocation) it remains the global lifecycle/authority entry. 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
|
|
|
@@ -56,10 +56,9 @@ All leaf executors share these anti-recursion red lines (role-specific sibling l
|
|
|
56
56
|
- **NEVER** invoke a same-role or sibling role to perform **this** assignment unless `Delegation: allowed (...)` explicitly lists them.
|
|
57
57
|
## Audit Mode (read-only review, shared)
|
|
58
58
|
|
|
59
|
-
When the assignment is a review/audit dispatch — `Task category: audit`, `Audit mode: on`, or an `amazing-pr-review` collect/domain seat —
|
|
59
|
+
When the assignment is a review/audit dispatch — `Task category: audit`, `Audit mode: on`, or an `amazing-pr-review` collect/domain seat — you are a **read-only audit seat**, not an implementer:
|
|
60
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
|
|
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. Seat split: **full-audit / Stage 3** seats produce `findings` + `verdict` (`ship it` / `needs fixes` / `blocked`) + `unverified` in the `amazing-pr-review` output shape; **collect/domain seats (pr variant)** produce evidence / findings only — no verdict, no `comments` field (next bullet).
|
|
63
|
-
- **Collect/domain seats (`pr` variant)**: **any seat may be write-blocked** (read-only sandbox / EPERM) — collect seats (Stage 1) return evidence in their result payload, domain seats (Stage 2) return findings in their result payload (contract → **`skills/mstar-audit/references/pr-review-seat-evidence.md`**); seats are **never required to write files** — writable seats may **best-effort** write their evidence file directly. The **main agent writes / consolidates all evidence files** — naming and path contract SSOT at **`skills/mstar-audit/references/pr-review.md`** § Local report archive (referenced, not redefined); seats produce no verdict and never post.
|
|
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 you normally have are **suspended for the assignment**; do not "fix things while reviewing".
|
|
64
62
|
- **Mode lock**: one assignment = one mode. Review-assigned work is completed as review only; implementation mode applies to implementation assignments only.
|
|
65
|
-
-
|
|
63
|
+
- Audit seats **never post, never merge, never approve** — posting belongs to the **main agent** at Stage 3 synthesis. Seat split/verdict shapes, collect/domain evidence payload contracts, `comments.posted` three-states, and the local report archive convention → the **`mstar-audit`** skill references (`references/pr-review.md`, `references/pr-review-seat-evidence.md`); load `mstar-audit` + `mstar-coding-behavior` evidence discipline when preset-gated loads are active.
|
|
64
|
+
- **Completion Report**: `Git:` states `read-only, no commits`.
|
|
@@ -93,7 +93,7 @@ Do not create your own branch strategy.
|
|
|
93
93
|
|
|
94
94
|
## Skill Preset (PM-Activated)
|
|
95
95
|
|
|
96
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
96
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
97
97
|
|
|
98
98
|
1. `mstar-harness-core` → `mstar-dispatch-gates` → `mstar-phase-gates` (Prepare: specify/clarify/plan) → `mstar-conventions` (`{PLAN_DIR}`, plan-writing path)
|
|
99
99
|
2. Typically: `mstar-artifacts` (specs, **`{ITERATION_DIR}/<id>/` package**); `mstar-coding-behavior`. Boundaries → **`mstar-iteration/references/iteration-artifact-boundaries.md`**
|
|
@@ -56,6 +56,16 @@ Layering anchor: `mstar-review-qc/references/review-responsibility-boundaries.md
|
|
|
56
56
|
|
|
57
57
|
Follow `mstar-audit` output format — audit index `README.md` (findings table, direction, execution order) + numbered self-contained plan files stamped with the audit base commit — per `references/codebase-audit.md` § Output format.
|
|
58
58
|
|
|
59
|
+
### Mode B identity boundary (role-owned, reachable under `none`)
|
|
60
|
+
|
|
61
|
+
When the audit runs with explicit `Skill presets: none`, the `mstar-audit` method is not loaded — this role-owned minimum applies from identity alone, so the audit stays honest and review-shaped without the preset:
|
|
62
|
+
|
|
63
|
+
- **Skill-file audit target**: check the frontmatter trigger contract — `description` must state when to use the skill and what outcome it enables; a workflow summary masquerading as a trigger description is a finding. The body must answer load order / execution path / hard constraints / evidence (or the locked runtime aliases for published `mstar-*` skills).
|
|
64
|
+
- **Enforcement honesty**: state the gate nature of every check — engine absent or advisory means every check is advisory-only; tool/CLI availability is never enforcement. Never present an unenforced check as blocking, and never claim engine-derived verdicts when the engine is absent.
|
|
65
|
+
- **Read-only + refuse**: no fixes, no PRs, no merges — refuse "implement it while you're in there" requests and report them as audit findings instead.
|
|
66
|
+
|
|
67
|
+
The full audit method (variant dispatch, scout fan-out, plan writing) loads with the `mstar-audit` preset on standard rounds; this boundary never replaces it, it only keeps the none closure review-capable.
|
|
68
|
+
|
|
59
69
|
## Mode C — PR Review (`pr` variant)
|
|
60
70
|
|
|
61
71
|
- Execute the `mstar-audit` `pr` variant: SKILL.md common core (Recon → Attack & vet) + **`references/pr-review.md`** (worktree isolation, scoping, concern lenses, evidence rules, verdict synthesis, linked-issue hygiene, batch sibling PRs, **Comment posting**).
|
|
@@ -99,7 +109,7 @@ If any item below matches, **stop** and return `Blocked` to `project-manager` in
|
|
|
99
109
|
|
|
100
110
|
## Skill Preset (PM-Activated)
|
|
101
111
|
|
|
102
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, mode definitions, and NEVER rules above stand alone
|
|
112
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, mode definitions, and NEVER rules above stand alone (the assigned **mode** selects the mode preset). The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
103
113
|
|
|
104
114
|
1. `mstar-harness-core` (mandatory entry) → `mstar-dispatch-gates` (leaf anti-recursion)
|
|
105
115
|
2. By mode:
|
|
@@ -54,7 +54,7 @@ If plan drift appears during implementation, request plan write-back before cont
|
|
|
54
54
|
|
|
55
55
|
## Skill Preset (PM-Activated)
|
|
56
56
|
|
|
57
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
57
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
58
58
|
|
|
59
59
|
1. `mstar-harness-core` → `mstar-coding-behavior` → `mstar-dispatch-gates`
|
|
60
60
|
2. Typically: `mstar-conventions` (paths + spec metadata)
|
|
@@ -73,7 +73,7 @@ If plan drift appears, request plan update before continuing.
|
|
|
73
73
|
|
|
74
74
|
## Skill Preset (PM-Activated)
|
|
75
75
|
|
|
76
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
76
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
77
77
|
|
|
78
78
|
1. `mstar-harness-core` → `mstar-coding-behavior` → `mstar-dispatch-gates` (leaf anti-recursion before any Task/subagent)
|
|
79
79
|
2. Typically: `mstar-conventions` (path symbols + `metadata.primary_spec` / `spec_refs`)
|
|
@@ -56,7 +56,7 @@ When assignment is marked `high-risk`:
|
|
|
56
56
|
|
|
57
57
|
## Skill Preset (PM-Activated)
|
|
58
58
|
|
|
59
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
59
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
60
60
|
|
|
61
61
|
1. `mstar-harness-core` → `mstar-coding-behavior` → `mstar-dispatch-gates` → `mstar-branch-worktree` (repo writes, production-touching branches)
|
|
62
62
|
2. Typically: `mstar-conventions` (paths)
|
|
@@ -86,7 +86,7 @@ If writing files to business repo, use only PM-assigned `Working branch` / `Bran
|
|
|
86
86
|
|
|
87
87
|
## Skill Preset (PM-Activated)
|
|
88
88
|
|
|
89
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
89
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
90
90
|
|
|
91
91
|
1. `mstar-harness-core` → `mstar-dispatch-gates` → `mstar-phase-gates` (Prepare / clarify) → `mstar-conventions` (`{PLAN_DIR}`, plan-writing path)
|
|
92
92
|
2. Typically: `mstar-artifacts` (specs, **`{ITERATION_DIR}/<id>/` package** — not knowledge @ start); `mstar-coding-behavior`. Boundaries → **`mstar-iteration/references/iteration-artifact-boundaries.md`**
|
|
@@ -77,6 +77,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
|
|
|
77
77
|
**Execution mode**: sdd | inline | N/A
|
|
78
78
|
**SDD implementer session**: fresh | sticky | N/A — **default `fresh`**; `sticky` reuses same implementer subagent across tasks (reviewers stay fresh). See `mstar-sdd/references/sticky-implementer-session.md`
|
|
79
79
|
**SDD dir**: absolute `<control_worktree_path>/{HARNESS_DIR}/sdd/<plan-id>/` when L1 lease gate active | `{HARNESS_DIR}/sdd/<plan-id>/` when waived / single checkout | N/A
|
|
80
|
+
**SDD context file**: absolute `<SDD dir>/context.json` when `Execution mode: sdd` | N/A — destination contract consumed by `mstar sdd exec --context` / `--context` producers (`mstar-sdd/references/file-handoffs.md`)
|
|
80
81
|
**Model tier**: fast | standard | capable | N/A
|
|
81
82
|
**Skill presets**: `standard` | <explicit skill list> | none — activates the `Execute as` role's preset from its `Skill Preset (PM-Activated)` section; default `standard` for implementation / QC / QA rounds unless the route is trivial
|
|
82
83
|
**QC mode**: full tri-review | single | N/A — **default `full tri-review` when `Execution mode: sdd`**; `single` only for `inline` / override
|
|
@@ -140,6 +141,9 @@ When the workflow snapshot top-level `control_worktree_path` is set and worktree
|
|
|
140
141
|
| **`Control harness root`** | Absolute `<control_worktree_path>/{HARNESS_DIR}` |
|
|
141
142
|
| **`Plan Path`** | Absolute under control harness (not relative from feature cwd) |
|
|
142
143
|
| **`SDD dir`** | Absolute under control harness; run `mstar sdd workspace <plan-id>` with `MSTAR_CONTROL_ROOT=<control_worktree_path>` when cwd is the feature tree |
|
|
144
|
+
| **`SDD context file`** | Absolute `<SDD dir>/context.json` — the bound destination contract (`controlHarnessRoot`/`featureCwd`/`workingBranch`/`planFile`/`sddDir`, all absolute) |
|
|
145
|
+
|
|
146
|
+
Every implementer/reviewer handoff cites these absolute destinations; native hosted subagents observe pwd/branch first and write only to the declared destinations (`mstar-sdd` prompt templates). CLI-launchable children start via `mstar sdd exec --context <context.json> -- <argv>`. State the boundary, never overclaim: the context/launcher binds starting cwd and validated destinations — it does NOT block a later deliberate `chdir`, absolute-path write, or host-native edit tool (`apply_patch`).
|
|
143
147
|
|
|
144
148
|
Do **not** waive worktree because default-gitignored `plans/` are missing under the feature checkout — see `mstar-branch-worktree` 「Harness path SSOT under default gitignore」.
|
|
145
149
|
## Completion Report Template
|
|
@@ -12,6 +12,8 @@ Before any non-trivial PM action, read in order:
|
|
|
12
12
|
|
|
13
13
|
**Not required:** `mstar-coding-behavior` (orchestration-only PM work).
|
|
14
14
|
|
|
15
|
+
**Required reading is not preset-gated.** PM is exempt from `Skill presets` (the `mstar-roles` hub § Load Order keeps PM required reading unconditional): the lifecycle / Done-ownership stop conditions (`mstar-harness-core` § 状态机 — only `project-manager` or `qa-engineer` set `Done`; QA gate required first) and the assigned evidence obligations stay reachable on every PM round — including plan close — under every preset decision.
|
|
16
|
+
|
|
15
17
|
Full cross-role matrix: `mstar-roles` SKILL.md.
|
|
16
18
|
|
|
17
19
|
This file is a compact PM orchestrator shell.
|
|
@@ -125,14 +127,14 @@ If any item below matches, fix the dispatch/plan state or mark `Blocked`—do **
|
|
|
125
127
|
- **NEVER** run tests/repro in the PM orchestration thread to substitute for `QA gate: mandatory` dispatch.
|
|
126
128
|
- **NEVER** let non-PM/non-QA roles mark plan `Done`.
|
|
127
129
|
- **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.
|
|
128
|
-
- **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).
|
|
129
|
-
- **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.
|
|
130
|
+
- **NEVER** perform specialist document edits in the PM thread when host invoke is required — that is `dispatch incomplete` (`mstar-dispatch-gates`, `mstar-iteration/references/phase-1-prepare.md` §1.6).
|
|
131
|
+
- **NEVER** mark the last plan `Done` and then create a PR or declare the iteration complete without **`## Phase 3: iteration-close`** and `mstar-iteration/references/phase-3-iteration-close.md` §3.1–§3.5 checklists.
|
|
130
132
|
- **NEVER** treat final plan closure prose as iteration-close — compound, roadmap `delivered`, and compass `status: completed` require Phase 3.
|
|
131
133
|
- **NEVER** steal or overwrite an active `execution_lease` or `integration_merge_lease` (no TTL, age, or inactivity authority); override only on explicit current-turn user instruction + audit snapshot plan `notes` / `notes.jsonl` (`mstar-engine-legacy` `references/lease-protocol.md` — “Lease prohibitions”; field semantics → `mstar-artifacts/references/status-and-residuals.md` — “Iteration execution leases”).
|
|
132
134
|
- **NEVER** writable-dispatch for a plan without a **verified** `execution_lease` for that plan (resume only when same `holder` passes verify-held-lease against Assignment `Worktree path` / `Working branch`).
|
|
133
135
|
- **NEVER** writable-dispatch when a plan is `InProgress` but has **no** `execution_lease` — complete orphan recovery first (`mstar-engine-legacy` `references/lease-protocol.md` — “Orphan recovery”; engine-present: `mstar lease verify --workflow <id>` + iteration checklist).
|
|
134
136
|
- **NEVER** run or dispatch **parallel** integration merges into `spec_integration_branch` — merge is **serial** via the snapshot top-level `integration_merge_lease` from the control worktree (`mstar-iteration` §2.6 · `mstar-branch-worktree` L1).
|
|
135
|
-
- **NEVER** cross-plan writable implement without distinct per-plan verified `execution_lease` + feature worktree; `Plan parallelism: serial` forces serial **scheduling** only — it does **not** waive control worktree or lease gates (`mstar-iteration` §2.0 #5).
|
|
137
|
+
- **NEVER** cross-plan writable implement without distinct per-plan verified `execution_lease` + feature worktree; `Plan parallelism: serial` forces serial **scheduling** only — it does **not** waive control worktree or lease gates (`mstar-iteration/references/phase-2-worktree-lease.md` §2.0 #5).
|
|
136
138
|
- **NEVER** dispatch **cross-plan parallel** writable implement when same-host exclusive write lock is **not** available on the coordination snapshot path (`workflows/<id>/snapshot.json`; cross-host / no shared flock) — default **`Plan parallelism: serial`** or **Blocked** if Assignment still claims parallel; exception only on current-turn user `Cross-host lease race: accepted` (or equivalent) + audit `plans[].notes` — **including when `Worktree mode: waived`** (`mstar-engine-legacy` `references/lease-protocol.md` — full protocol; `mstar-iteration` `references/phase-2-worktree-lease.md` — execution checklist).
|
|
137
139
|
- **NEVER** set `Worktree mode: waived` because default-gitignored `plans/` are missing under a feature worktree — keep feature worktrees; put absolute control **`Plan Path`** / **`SDD dir`** / **`Control harness root`** on Assignments (`mstar-branch-worktree` 「Harness path SSOT under default gitignore」). No flock → serial scheduling only, not worktree waiver.
|
|
138
140
|
|
|
@@ -150,7 +152,7 @@ If any item below matches, fix the dispatch/plan state or mark `Blocked`—do **
|
|
|
150
152
|
| **Cursor / OpenCode** host iteration `commands/` | Command Boot + **`project-manager.md`** — iteration lifecycle only; **not** required for ordinary per-plan PM |
|
|
151
153
|
| **OpenCode** (no command, not `/pm`) | `project-manager` + `mstar-host` → `opencode.md` |
|
|
152
154
|
|
|
153
|
-
**Dispatch-first**, iteration branch policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`), Autonomous Execute → **`mstar-iteration
|
|
155
|
+
**Dispatch-first**, iteration branch policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`), Autonomous Execute → **`mstar-iteration/references/phase-2-worktree-lease.md`**. Routing, gates, Task Board, QC, templates → this file + topic `mstar-*` skills.
|
|
154
156
|
|
|
155
157
|
---
|
|
156
158
|
|
|
@@ -48,7 +48,7 @@ When creating a new skill, making a major skill rewrite, changing frontmatter `d
|
|
|
48
48
|
|
|
49
49
|
## Skill Preset (PM-Activated)
|
|
50
50
|
|
|
51
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
51
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
52
52
|
|
|
53
53
|
1. `mstar-harness-core` → `mstar-dispatch-gates`
|
|
54
54
|
2. Harness-text editing trigger (activation implies): read **all** topic skills you touch — at minimum `mstar-phase-gates`, `mstar-conventions`, `mstar-artifacts`, `mstar-branch-worktree`, `mstar-review-qc`, `mstar-coding-behavior`, plus host adapters — so prompts stay aligned with SSOT and do not re-duplicate rules
|
|
@@ -51,7 +51,7 @@ When Assignment provides a report path, write report-only output under `{SDD_DIR
|
|
|
51
51
|
|
|
52
52
|
## Skill Preset (PM-Activated)
|
|
53
53
|
|
|
54
|
-
External topic skills below are **presets activated by PM**, not unconditional role dependencies — the L4 acceptance identity and NEVER rules above stand alone, and role-owned `references/qa-engineer/acceptance-gate.md` is always part of this role (never preset-gated
|
|
54
|
+
External topic skills below are **presets activated by PM**, not unconditional role dependencies — the L4 acceptance identity and NEVER rules above stand alone, and role-owned `references/qa-engineer/acceptance-gate.md` is always part of this role (never preset-gated; role-owned obligations hold under every preset including `none`). The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
55
55
|
|
|
56
56
|
1. `mstar-harness-core` → `mstar-coding-behavior` → `mstar-dispatch-gates` + `mstar-branch-worktree` (anti-recursion; checkout alignment with QC)
|
|
57
57
|
2. Host adapter: `mstar-host` (detect; Read `references/opencode.md`, `cursor.md`, or `codex.md`)
|
|
@@ -91,7 +91,7 @@ Verdict enumeration and rules (incl. `Unconfirmed` semantics) → **`references/
|
|
|
91
91
|
|
|
92
92
|
## Skill Preset (PM-Activated)
|
|
93
93
|
|
|
94
|
-
External topic skills below are **presets activated by PM**, not unconditional role dependencies — the reviewer identity and NEVER rules above stand alone.
|
|
94
|
+
External topic skills below are **presets activated by PM**, not unconditional role dependencies — the reviewer identity and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
95
95
|
|
|
96
96
|
Role-owned procedures — **always read with this file, never preset-gated**: `references/qc-specialist/reviewer-workflow.md`, `references/qc-specialist/reviewer-checklist.md`, `references/qc-specialist/report-template.md`; `references/qc-specialist/deep-review-lenses.md` on demand.
|
|
97
97
|
|
|
@@ -73,7 +73,7 @@ One explanation has one home; essential contract facts may repeat locally. Each
|
|
|
73
73
|
|
|
74
74
|
## Skill Preset (PM-Activated)
|
|
75
75
|
|
|
76
|
-
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone.
|
|
76
|
+
Topic skills below are **presets activated by PM**, not unconditional role dependencies — the identity, responsibilities, and NEVER rules above stand alone. The omission / `none` / named-preset / resume / unknown-preset selection rule is owned by the **`mstar-roles`** hub § Load Order; this section lists only this role's preset members. When active, load in order:
|
|
77
77
|
|
|
78
78
|
1. `mstar-harness-core` → `mstar-dispatch-gates` → `mstar-coding-behavior` (surgical edits)
|
|
79
79
|
2. Typically: `mstar-conventions` (where deliverables land under `{HARNESS_DIR}` / `docs/`); `mstar-artifacts` (when writing under knowledge or plan trees)
|
|
@@ -11,13 +11,28 @@ Run the SDD helpers through the engine CLI **`mstar sdd …`** (engine-backed; t
|
|
|
11
11
|
`export MSTAR_CONTROL_ROOT=<control_worktree_path>`
|
|
12
12
|
or `mstar sdd workspace <plan-id> <control_worktree_path>`
|
|
13
13
|
so `{SDD_DIR}` lands on the control harness (default-gitignored plans/status/sdd). Do not create a second SDD tree under the feature checkout.
|
|
14
|
-
2.
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
2. Write the execution context file `$SDD_DIR/context.json` — the absolute destination contract every handoff cites:
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"planId": "<plan-id>",
|
|
19
|
+
"controlHarnessRoot": "<absolute control harness root>",
|
|
20
|
+
"featureCwd": "<absolute feature worktree>",
|
|
21
|
+
"workingBranch": "<assigned branch>",
|
|
22
|
+
"planFile": "<absolute plan path under the control harness>",
|
|
23
|
+
"sddDir": "<absolute $SDD_DIR>"
|
|
24
|
+
}
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
All paths absolute; `planFile`/`sddDir` must resolve inside the control harness; `featureCwd` must be the assigned feature worktree on `workingBranch`. The declared control root is authoritative — never re-inferred from the feature cwd.
|
|
28
|
+
3. `mstar sdd task-brief <plan-file> <N> --context "$SDD_DIR/context.json"` — bound producer: validates the artifact destination **before** mkdir/write and prints the absolute brief path (`{SDD_DIR}/task-N-brief.md`).
|
|
29
|
+
4. Record `BASE_SHA` (`git rev-parse HEAD` before dispatch).
|
|
30
|
+
5. Dispatch implementer with:
|
|
17
31
|
- One line scene-setting (where task fits)
|
|
18
|
-
-
|
|
32
|
+
- Absolute brief path: read first — verbatim requirements
|
|
19
33
|
- Interfaces / decisions brief cannot know
|
|
20
|
-
-
|
|
34
|
+
- Absolute report path: `$SDD_DIR/task-N-report.md`
|
|
35
|
+
- Absolute control root, feature cwd, plan and context-file paths (destination contract — see prompt templates)
|
|
21
36
|
- `Model tier` → host-specific model (required)
|
|
22
37
|
- **`SDD implementer session`**: `fresh` (new subagent) or `sticky` (resume — see **`sticky-implementer-session.md`**)
|
|
23
38
|
|
|
@@ -33,11 +48,29 @@ Implementer writes full report to `task-N-report.md`. Return to PM only:
|
|
|
33
48
|
## After implementer DONE
|
|
34
49
|
|
|
35
50
|
1. `HEAD_SHA=$(git rev-parse HEAD)`
|
|
36
|
-
2. `mstar sdd review-package "$BASE_SHA" "$HEAD_SHA" "$SDD_DIR/
|
|
51
|
+
2. `mstar sdd review-package "$BASE_SHA" "$HEAD_SHA" --context "$SDD_DIR/context.json"` — bound: probes git in `featureCwd`, writes the diff into the control sddDir, prints absolute paths.
|
|
37
52
|
3. Dispatch task reviewer with: brief path, report path, diff path, Global Constraints (verbatim from plan).
|
|
38
53
|
|
|
39
54
|
**Never use `HEAD~1` as BASE** — multi-commit tasks truncate.
|
|
40
55
|
|
|
56
|
+
## Bound child launch (CLI-launchable children)
|
|
57
|
+
|
|
58
|
+
When the implementer is a CLI command rather than a hosted subagent, launch it through the bound argv entry — never raw from a primary/control checkout:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
mstar sdd exec --context "$SDD_DIR/context.json" -- <argv...>
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
- Resolves and re-validates the context (identity/branch/lease/nesting), then spawns the argv directly with cwd = `featureCwd`, `shell: false`, stdio and environment inherited unchanged. Exits: 1 = context/gate refusal (no child started), 2 = usage, 127 = spawn not found, child exit preserved, signal termination 128+n.
|
|
65
|
+
- This binds the child's **starting cwd only** — it is not a sandbox. A child that later `chdir`s, passes an overriding cwd flag, writes an absolute path elsewhere, or uses host-native edit tooling (`apply_patch`, native-session edits) is **not blocked**; no arbitrary-shell interception is claimed.
|
|
66
|
+
|
|
67
|
+
## Native hosted subagents — destination contract
|
|
68
|
+
|
|
69
|
+
Hosted subagents are not cwd-bound by the launcher, so their dispatch prompt must carry the absolute destination contract (templates: `implementer-prompt.md`, `implementer-continuation-prompt.md`, `task-reviewer-prompt.md`) and their first step is to observe, then write:
|
|
70
|
+
|
|
71
|
+
1. Observe `pwd` and the checked-out branch in the tool's workdir; both must equal `featureCwd`/`workingBranch`. On mismatch, stop and report — a declared-correct assignment does not make a wrong-checkout write safe.
|
|
72
|
+
2. Source edits go through the tool workdir at `featureCwd` (or absolute feature paths); briefs/reports/diffs go only to the absolute control paths from the handoff.
|
|
73
|
+
|
|
41
74
|
## Fix loop
|
|
42
75
|
|
|
43
76
|
Fix subagent appends to same `task-N-report.md` with test evidence:
|
|
@@ -67,7 +100,7 @@ After all tasks:
|
|
|
67
100
|
```bash
|
|
68
101
|
MERGE_BASE=$(git merge-base <target-branch> HEAD)
|
|
69
102
|
mkdir -p "$SDD_DIR/review"
|
|
70
|
-
mstar sdd review-package "$MERGE_BASE" HEAD "$SDD_DIR/review/branch-review-....diff"
|
|
103
|
+
mstar sdd review-package "$MERGE_BASE" HEAD --context "$SDD_DIR/context.json" "$SDD_DIR/review/branch-review-....diff"
|
|
71
104
|
```
|
|
72
105
|
|
|
73
106
|
Pass **branch** diff path and bundle report paths (`$SDD_DIR/review/qc1.md` …) to QC dispatch — not task-level diffs. Raw QC/QA files stay in the gitignored review bundle; PM records durable summary and open residuals in **local** plan / workflow snapshot + project register (`workflows/<id>/snapshot.json`, `projects/<id>/residuals.json` — session SSOT) and promotes cross-clone decisions into tracked knowledge/specs/`AGENTS.md` per `mstar-conventions` git policy.
|
|
@@ -22,6 +22,15 @@ Dispatch:
|
|
|
22
22
|
|
|
23
23
|
Read first — your spec (verbatim): [BRIEF_FILE]
|
|
24
24
|
|
|
25
|
+
## Destinations (absolute — re-validate on resume)
|
|
26
|
+
|
|
27
|
+
- Control harness root (briefs/reports/diffs live here): [CONTROL_ROOT]
|
|
28
|
+
- Feature worktree — cwd for all source edits, branch [WORKING_BRANCH]: [FEATURE_CWD]
|
|
29
|
+
- Plan: [PLAN_FILE] — Context file: [CONTEXT_FILE]
|
|
30
|
+
- Brief: [BRIEF_FILE] — Report: [REPORT_FILE]
|
|
31
|
+
- First step on resume: re-observe `pwd` and the checked-out branch — a sticky session may wake in a different cwd; on mismatch with [FEATURE_CWD]/[WORKING_BRANCH], stop and report BLOCKED — do not write.
|
|
32
|
+
- These destinations bind the handoff, not the host: a later deliberate `chdir`, absolute-path write outside [FEATURE_CWD], or host-native edit tool (apply_patch) is NOT blocked. CLI-launchable children are started via `mstar sdd exec --context [CONTEXT_FILE] -- <argv>` (starting cwd = feature worktree).
|
|
33
|
+
|
|
25
34
|
## Context not in the brief
|
|
26
35
|
|
|
27
36
|
[Interfaces from earlier tasks only if not already in your session]
|
|
@@ -22,6 +22,15 @@ Dispatch:
|
|
|
22
22
|
|
|
23
23
|
Read first — this is your spec (verbatim values): [BRIEF_FILE]
|
|
24
24
|
|
|
25
|
+
## Destinations (absolute — validate before first write)
|
|
26
|
+
|
|
27
|
+
- Control harness root (briefs/reports/diffs live here): [CONTROL_ROOT]
|
|
28
|
+
- Feature worktree — cwd for all source edits, branch [WORKING_BRANCH]: [FEATURE_CWD]
|
|
29
|
+
- Plan: [PLAN_FILE] — Context file: [CONTEXT_FILE]
|
|
30
|
+
- Brief: [BRIEF_FILE] — Report: [REPORT_FILE]
|
|
31
|
+
- First step: observe `pwd` and the checked-out branch; on mismatch with [FEATURE_CWD]/[WORKING_BRANCH], stop and report BLOCKED — do not write. A declared-correct assignment does not make a wrong-checkout write safe.
|
|
32
|
+
- These destinations bind the handoff, not the host: a later deliberate `chdir`, absolute-path write outside [FEATURE_CWD], or host-native edit tool (apply_patch) is NOT blocked. CLI-launchable children are started via `mstar sdd exec --context [CONTEXT_FILE] -- <argv>` (starting cwd = feature worktree).
|
|
33
|
+
|
|
25
34
|
## Context not in the brief
|
|
26
35
|
|
|
27
36
|
[Interfaces from earlier tasks, PM resolutions]
|
|
@@ -18,6 +18,13 @@ Dispatch:
|
|
|
18
18
|
|
|
19
19
|
Brief: [BRIEF_FILE]
|
|
20
20
|
|
|
21
|
+
## Destinations (absolute — read-only review)
|
|
22
|
+
|
|
23
|
+
- Control harness root: [CONTROL_ROOT] — implementer report [REPORT_FILE], diff [DIFF_FILE] are control artifacts.
|
|
24
|
+
- Feature worktree under review: [FEATURE_CWD] on branch [WORKING_BRANCH] — you do not write there or anywhere except [REPORT_FILE].
|
|
25
|
+
- The diff was produced by the bound `mstar sdd review-package --context [CONTEXT_FILE]` (git probed in the feature worktree, artifact written to the control sddDir).
|
|
26
|
+
- First step: confirm the paths above are absolute and present; if a path is missing or relative, report NEEDS_CONTEXT instead of guessing.
|
|
27
|
+
|
|
21
28
|
Global constraints (verbatim):
|
|
22
29
|
[GLOBAL_CONSTRAINTS]
|
|
23
30
|
|