@mstar-harness/dsh 3.6.3 → 3.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +8 -8
  3. package/README.zh.md +7 -5
  4. package/dist/client/panel/PanelView.d.ts +8 -11
  5. package/dist/client/panel/TabNav.d.ts +2 -2
  6. package/dist/client/panel/graph/event-log.d.ts +5 -9
  7. package/dist/client/panel/graph/project-graph.d.ts +53 -72
  8. package/dist/client/panel/graph/schema.d.ts +31 -37
  9. package/dist/client/panel/locale.d.ts +19 -19
  10. package/dist/client/panel/pages/AgentCanvasPage.d.ts +40 -58
  11. package/dist/client/panel/pages/EventLogPage.d.ts +6 -6
  12. package/dist/client/panel/pages/IterationInfoSection.d.ts +9 -11
  13. package/dist/client/panel/pages/IterationTaskPage.d.ts +3 -3
  14. package/dist/client/panel/plan-sort.d.ts +3 -6
  15. package/dist/client/panel/state-section.d.ts +1 -1
  16. package/dist/client/panel/zones/Legend.d.ts +2 -2
  17. package/dist/client/panel/zones/ProjectRollup.d.ts +1 -2
  18. package/dist/client/panel/zones/TaskBoard.d.ts +1 -2
  19. package/dist/gates/_shared.d.ts +24 -16
  20. package/dist/gates/adapter.d.ts +6 -9
  21. package/dist/gates/agent-flow.d.ts +49 -59
  22. package/dist/gates/agent-personas.d.ts +1 -2
  23. package/dist/gates/catalog.d.ts +2 -5
  24. package/dist/gates/dispatch.d.ts +9 -11
  25. package/dist/gates/fallbacks-advisory.d.ts +55 -18
  26. package/dist/gates/fallbacks-probe.d.ts +2 -2
  27. package/dist/gates/fallbacks-seeds.d.ts +1 -1
  28. package/dist/gates/fallbacks-structural.d.ts +1 -1
  29. package/dist/gates/goal-bridge.d.ts +6 -9
  30. package/dist/gates/role-persona.d.ts +123 -7
  31. package/dist/gates/skill-lint.d.ts +19 -2
  32. package/dist/gates/system-prompt.d.ts +7 -11
  33. package/dist/gates/tools.d.ts +1 -1
  34. package/dist/gates/workflow-ledger.d.ts +21 -28
  35. package/dist/gates/workflow-policy.d.ts +15 -19
  36. package/dist/gates/workflow-selection.d.ts +3 -3
  37. package/dist/index.d.ts +1 -1
  38. package/dist/index.js +472 -183
  39. package/dist/types.d.ts +4 -7
  40. package/harness-commands/iteration-drive.md +6 -6
  41. package/harness-commands/iteration-loop.md +7 -7
  42. package/harness-commands/iteration-start.md +8 -8
  43. package/harness-skills/mstar-coding-behavior/SKILL.md +3 -20
  44. package/harness-skills/mstar-dispatch-gates/SKILL.md +7 -13
  45. package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
  46. package/harness-skills/mstar-harness-core/SKILL.md +16 -53
  47. package/harness-skills/mstar-host/references/zcode.md +7 -0
  48. package/harness-skills/mstar-iteration/SKILL.md +32 -318
  49. package/harness-skills/mstar-iteration/references/command-shared-invariants.md +1 -1
  50. package/harness-skills/mstar-iteration/references/phase-1-prepare.md +155 -0
  51. package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +113 -3
  52. package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
  53. package/harness-skills/mstar-roles/SKILL.md +14 -12
  54. package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +5 -6
  55. package/harness-skills/mstar-roles/references/architect.md +1 -1
  56. package/harness-skills/mstar-roles/references/code-reviewer.md +11 -1
  57. package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
  58. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
  59. package/harness-skills/mstar-roles/references/ops-engineer.md +1 -1
  60. package/harness-skills/mstar-roles/references/product-manager.md +1 -1
  61. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +4 -0
  62. package/harness-skills/mstar-roles/references/project-manager.md +6 -4
  63. package/harness-skills/mstar-roles/references/prompt-engineer.md +1 -1
  64. package/harness-skills/mstar-roles/references/qa-engineer.md +1 -1
  65. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -1
  66. package/harness-skills/mstar-roles/references/writing-specialist.md +1 -1
  67. package/harness-skills/mstar-sdd/references/file-handoffs.md +40 -7
  68. package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +9 -0
  69. package/harness-skills/mstar-sdd/references/implementer-prompt.md +9 -0
  70. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +7 -0
  71. package/package.json +1 -1
package/dist/types.d.ts CHANGED
@@ -108,8 +108,7 @@ export interface HarnessPlanView {
108
108
  readonly doneAt: string | null;
109
109
  /**
110
110
  * The `status.json` plan row `metadata.iteration_refs` (array of iteration
111
- * ids the plan is registered under). ALWAYS-present array (plan
112
- * `20260813-panel-quick-fixes` Task 2): a missing/non-array value projects
111
+ * ids the plan is registered under). ALWAYS-present array: a missing/non-array value projects
113
112
  * to `[]` — the empty default, never an omitted field (lossless JSON).
114
113
  */
115
114
  readonly iterationRefs: string[];
@@ -204,8 +203,7 @@ export interface MstarHarnessState {
204
203
  * projected loose (`string`) like `HarnessPlanView.status`. ALWAYS-present
205
204
  * nullable scalar (lossless JSON, never omitted): missing/empty → `null`;
206
205
  * `null` on selection error (no snapshot read). Added for the slim
207
- * `mstar:engine-status` digest (plan `20260820-dsh-engine-status-slim`).
208
- */
206
+ * `mstar:engine-status` digest. */
209
207
  readonly workflowType: string | null;
210
208
  /**
211
209
  * The selected workflow snapshot's top-level lifecycle `status`
@@ -269,8 +267,7 @@ export interface MstarHarnessState {
269
267
  }
270
268
  /**
271
269
  * One agent-flow ledger event in the catalog view. Optional fields (dispatch/
272
- * settle + the W-B2 `workflow-*` kinds — plan `20260815-dsh-workflow-ledger`
273
- * Task 2) are OMITTED (never `undefined`-valued properties — `Session.append`
270
+ * settle + the W-B2 `workflow-*` kinds — plan ) are OMITTED (never `undefined`-valued properties — `Session.append`
274
271
  * rejects non-lossless JSON) using the `iterationViolationView` omit pattern.
275
272
  */
276
273
  export interface AgentFlowEventView {
@@ -292,7 +289,7 @@ export interface AgentFlowEventView {
292
289
  /** Settle duration in ms (settle events only, when recorded). */
293
290
  readonly durationMs?: number | null;
294
291
  /**
295
- * Settle rows only (plan `20260811-panel-f4-timeliness` Task 1): true when
292
+ * Settle rows only : true when
296
293
  * the settle carries the PAIRED dispatch's identity (`role`/`planId`/
297
294
  * `taskId` — same fields + semantics as the dispatch event) — the client
298
295
  * pairs exactly on that identity. ABSENT on unpaired (legacy) settles →
@@ -7,7 +7,7 @@ input: "[no args]"
7
7
 
8
8
  # Drive Iteration
9
9
 
10
- Drive the active Morning Star iteration forward. **Boot loads skills; this command sequences Phase 2 → 3 → 4 → 5.** Phase gate SSOT → **`mstar-iteration`** §2–§5;本 command 仅补充 **可选第三方 helper skill 发现**(Phase 5),不反向写入 `mstar-*`。
10
+ Drive the active Morning Star iteration forward. **Boot loads skills; this command sequences Phase 2 → 3 → 4 → 5.** Phase route + gate SSOT → **`mstar-iteration`** Phase route map + **Phase transition gates** table(§2 detail → `references/phase-2-worktree-lease.md`;§3 → `references/phase-3-iteration-close.md`;§4–§5 → `references/phase-4-5-pr-delivery.md`);本 command 仅补充 **可选第三方 helper skill 发现**(Phase 5),不反向写入 `mstar-*`。
11
11
 
12
12
  ## Phase flow(禁止跳步)
13
13
 
@@ -21,25 +21,25 @@ Phase 2–5 共享内容(PM invariants、assignment preflight、session todos
21
21
 
22
22
  ## Boot
23
23
 
24
- 按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration` § Phase 2–5 + `command-shared-invariants.md` → `mstar-compound` → `mstar-dispatch-gates` + host reference → **`mstar-sdd`**(first implement dispatch 前)→ `mstar-review-qc`(first QC 前)→ `mstar-artifacts` / `mstar-conventions` / `mstar-branch-worktree` → **`mstar-iteration/references/phase-2-worktree-lease.md`**)。完整 load list → **`mstar-roles`**。
24
+ 按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration`(按当前 Phase 查 route map,只加载一行 detail)+ `command-shared-invariants.md` → `mstar-compound` → `mstar-dispatch-gates` + host reference → **`mstar-sdd`**(first implement dispatch 前)→ `mstar-review-qc`(first QC 前)→ `mstar-artifacts` / `mstar-conventions` / `mstar-branch-worktree` → **`mstar-iteration/references/phase-2-worktree-lease.md`**)。完整 load list → **`mstar-roles`**。
25
25
 
26
26
  ## Phase 2: Autonomous Execute
27
27
 
28
- Execute **`mstar-iteration` § Phase 2** exactly(§2.0 五道闸 → §2.1 session todos → §2.2 backlog → §2.3 integration branch + control worktree → §2.4 per-plan loop(lease-gated;SDD per-task;QC tri N=3 + QA;serial merge)→ §2.5 dispatch-first → §2.6 push 纪律)。全部 plan `Done` → **STOP** → 打印 `## Phase 3: iteration-close`。
28
+ Execute **`mstar-iteration/references/phase-2-worktree-lease.md`** §2.0–§2.5 exactly(§2.0 五道闸 → §2.1 session todos → §2.2 backlog → §2.3 integration branch + control worktree → §2.4 per-plan loop(lease-gated;SDD per-task;QC tri N=3 + QA;serial merge)→ §2.5 dispatch-first;§2.6 push 纪律 → main skill `## 2.6`)。全部 plan `Done` → **STOP** → 打印 `## Phase 3: iteration-close`。
29
29
 
30
30
  **Assignment preflight**:每次 implement/QC/QA 派发前按 **`mstar-iteration/references/command-shared-invariants.md`** 执行。
31
31
 
32
32
  ## Phase 3: iteration-close
33
33
 
34
- 当 **every** plan 为 `Done`:**STOP** per-plan loop → 打印 **`## Phase 3: iteration-close`** → execute **`mstar-iteration` § Phase 3**(→ **`references/phase-3-iteration-close.md`** §3.0→§3.5;§3.1 entry checklist HARD GATE;§3.2 compound + package promotion;§3.4 `status: completed` + `end_date`)→ §3.5 exit 全 `[x]` 后打印 **`## Phase 4: Create PR`**。
34
+ 当 **every** plan 为 `Done`:**STOP** per-plan loop → 打印 **`## Phase 3: iteration-close`** → execute **`mstar-iteration/references/phase-3-iteration-close.md`** §3.0→§3.5(§3.1 entry checklist HARD GATE;§3.2 compound + package promotion;§3.4 `status: completed` + `end_date`)→ §3.5 exit 全 `[x]` 后打印 **`## Phase 4: Create PR`**。
35
35
 
36
36
  ## Phase 4: Create PR
37
37
 
38
- Execute **`mstar-iteration` § Phase 4**(→ **`references/phase-4-5-pr-delivery.md`**):打印 `## Phase 4: Create PR` → resolve `metadata.target_branch`(缺失 → **STOP**,never default `main`/`master`)→ 创建 PR `spec_integration_branch` → `target_branch` → 记录 PR URL + number → 勾掉 `phase-4-create-pr` → **Immediately** 打印 **`## Phase 5: PR merge-ready`**(**禁止**在此停止或汇报 Done)。
38
+ Execute **`mstar-iteration/references/phase-4-5-pr-delivery.md`** §4:打印 `## Phase 4: Create PR` → resolve `metadata.target_branch`(缺失 → **STOP**,never default `main`/`master`)→ 创建 PR `spec_integration_branch` → `target_branch` → 记录 PR URL + number → 勾掉 `phase-4-create-pr` → **Immediately** 打印 **`## Phase 5: PR merge-ready`**(**禁止**在此停止或汇报 Done)。
39
39
 
40
40
  ## Phase 5: PR merge-ready(babysit loop)
41
41
 
42
- Execute **`mstar-iteration` § Phase 5**(→ **`references/phase-4-5-pr-delivery.md`** §5.0–§5.2;**§5.1a push cadence HARD**)。**§5.5 exit checklist 全 `[x]` = 本 command Done.**
42
+ Execute **`mstar-iteration/references/phase-4-5-pr-delivery.md`** §5.0–§5.2(**§5.1a push cadence HARD**)。**§5.5 exit checklist 全 `[x]` = 本 command Done.**
43
43
 
44
44
  本 command **叠加**可选 helper skill 发现(**non-`mstar-*`**;不写入 `mstar-*` load order)→ **`mstar-iteration/references/phase5-helper-discovery.md`**(babysit / `*-babysit` / greploop / fallback 路径清单;first readable `SKILL.md` wins)。Loop + review fix hygiene + exit checklist → §5.1–§5.2(同上 reference)。
45
45
 
@@ -16,7 +16,7 @@ Run a **full** Morning Star iteration with minimal human intervention. **Done =
16
16
  | `iteration-drive` | Phase 2→5 re-entry / resume on an already locked iteration |
17
17
  | **`iteration-loop`** | Phase 1→5 end-to-end; **autonomous** direction lock |
18
18
 
19
- Phase gate SSOT → **`mstar-iteration`** §1–§5. This command is a **consumer**; it does not redefine skill semantics.
19
+ Phase route + gate SSOT → **`mstar-iteration`** **Phase route map** + **Phase transition gates** table. This command is a **consumer**; it does not redefine skill semantics.
20
20
 
21
21
  ## Args(最多 2 个)
22
22
 
@@ -29,7 +29,7 @@ Phase gate SSOT → **`mstar-iteration`** §1–§5. This command is a **consume
29
29
  | `direction` | Iteration direction / feedback constraint (free text) | Code-first research → **auto-lock recommended** |
30
30
  | `scale` | `S` \| `M` \| `L` \| `XL` | **`M`** |
31
31
 
32
- **Scale budget**(写入 compass;约束 **业务** plan 数量)→ **`mstar-iteration`** §1.2 + `references/autonomous-direction-lock.md`:
32
+ **Scale budget**(写入 compass;约束 **业务** plan 数量)→ **`mstar-iteration/references/phase-1-prepare.md`** §1.2 + `references/autonomous-direction-lock.md`:
33
33
 
34
34
  - **S** → 1 business plan
35
35
  - **M** → 2–3 business plans
@@ -52,7 +52,7 @@ Execute **`mstar-iteration` §2.6**(Continuous execution SSOT)+ **`mstar-ite
52
52
 
53
53
  ## Boot
54
54
 
55
- 按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration` § Phase 1–5 + `command-shared-invariants.md` → `mstar-dispatch-gates` → `mstar-phase-gates` → `mstar-conventions` / `mstar-artifacts` → `mstar-host` → `mstar-compound`(Phase 3 前)→ **`mstar-sdd`**(first implement 前)→ `mstar-review-qc`(first QC 前)→ `mstar-branch-worktree` → **`mstar-iteration/references/phase-2-worktree-lease.md`**)。完整 load list → **`mstar-roles`**。
55
+ 按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration`(按当前 Phase 查 route map,只加载一行 detail)+ `command-shared-invariants.md` → `mstar-dispatch-gates` → `mstar-phase-gates` → `mstar-conventions` / `mstar-artifacts` → `mstar-host` → `mstar-compound`(Phase 3 前)→ **`mstar-sdd`**(first implement 前)→ `mstar-review-qc`(first QC 前)→ `mstar-branch-worktree` → **`mstar-iteration/references/phase-2-worktree-lease.md`**)。完整 load list → **`mstar-roles`**。
56
56
 
57
57
  **Session todos(loop 专属;Phase 2–5 共享 rows → `command-shared-invariants.md`)**:
58
58
 
@@ -62,7 +62,7 @@ Execute **`mstar-iteration` §2.6**(Continuous execution SSOT)+ **`mstar-ite
62
62
 
63
63
  ## Phase 1: Autonomous start
64
64
 
65
- Execute **`mstar-iteration` § Phase 1**(**autonomous** direction lock + scale budget + branch resolve SSOT → `references/autonomous-direction-lock.md`):
65
+ Execute **`mstar-iteration/references/phase-1-prepare.md`**(§1.1–§1.6;**autonomous** direction lock + scale budget + branch resolve SSOT → `references/autonomous-direction-lock.md`):
66
66
 
67
67
  ### 1–4. Research → Explore → Lock → Write
68
68
 
@@ -70,7 +70,7 @@ Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/
70
70
 
71
71
  ### 5. Review & Edit Chain(HARD GATE)
72
72
 
73
- Execute **`mstar-iteration` §1.6**:`product-manager` → `architect` → `writing-specialist` 顺序 invoke(**禁止** `{KNOWLEDGE_DIR}/` 新增;corpus hygiene)→ PM lock。**Assignment preflight** per **`command-shared-invariants.md`**。
73
+ Execute **`mstar-iteration/references/phase-1-prepare.md` §1.6**:`product-manager` → `architect` → `writing-specialist` 顺序 invoke(**禁止** `{KNOWLEDGE_DIR}/` 新增;corpus hygiene)→ PM lock。**Assignment preflight** per **`command-shared-invariants.md`**。
74
74
 
75
75
  **Pre-commit checklist**(print before §6;all `[x]`):
76
76
 
@@ -84,7 +84,7 @@ Execute **`mstar-iteration` §1.6**:`product-manager` → `architect` → `wri
84
84
 
85
85
  ### 6. Integration Branch
86
86
 
87
- Per **`mstar-iteration` §2.3**(create from `iteration_base_branch`;register branch fields;commit docs;push)。**STOP** if base/target missing。**Immediately** print `## Phase 2: Autonomous Execute` → continue(勾掉 `phase-1-autonomous-start`)。
87
+ Per **`mstar-iteration/references/phase-2-worktree-lease.md` §2.3**(create from `iteration_base_branch`;register branch fields;commit docs;push)。**STOP** if base/target missing。**Immediately** print `## Phase 2: Autonomous Execute` → continue(勾掉 `phase-1-autonomous-start`)。
88
88
 
89
89
  ---
90
90
 
@@ -92,7 +92,7 @@ Per **`mstar-iteration` §2.3**(create from `iteration_base_branch`;register
92
92
 
93
93
  Delegate to **`iteration-drive`**(Phase 2 → §2、Phase 3 → §3 + `references/phase-3-iteration-close.md`、Phase 4/5 → §4–§5 + `references/phase-4-5-pr-delivery.md`、Phase 5 helper discovery → `phase5-helper-discovery.md`)。**Assignment preflight** per **`command-shared-invariants.md`**。
94
94
 
95
- **Loop 特有**:Phase 5 push cadence(HARD)→ **`mstar-iteration` §5.1a**;exit checklist → §5.2(`references/phase-4-5-pr-delivery.md`)。
95
+ **Loop 特有**:Phase 5 push cadence(HARD)→ **`mstar-iteration/references/phase-4-5-pr-delivery.md`** §5.1a;exit checklist → §5.2(同 reference)。
96
96
 
97
97
  **Then** report: iteration id, locked direction + scale, plans completed, compound summary, PR link, merge-ready evidence。
98
98
 
@@ -30,7 +30,7 @@ Start a new Morning Star harness iteration. **Phase 1 is not complete until the
30
30
  |-----------------|------------------------|
31
31
  | 自己 Edit compass/plans/specs 冒充 product-manager / architect / writing-specialist 的审查编辑 | §5.1 → §5.2 → §5.3 **顺序**各 **1 次 invoke**;上一角色返回后再派发下一角色 |
32
32
  | 只写 `## Assignment` 或 checklist 就声称 review chain 完成 | **几条角色 ⇒ 几条 invoke**;零 invoke = `dispatch incomplete`(`mstar-dispatch-gates`) |
33
- | §5 完成前 commit / 创建 integration 分支 | 5.4 PM lock 在 subagent 返回且磁盘产物已修订之后(`mstar-iteration` §1.6) |
33
+ | §5 完成前 commit / 创建 integration 分支 | 5.4 PM lock 在 subagent 返回且磁盘产物已修订之后(`mstar-iteration/references/phase-1-prepare.md` §1.6) |
34
34
 
35
35
  派发细则 → **`mstar-dispatch-gates`**(specialist review-and-edit dispatch)+ **`mstar-host`**(宿主 invoke 能力)。**不得**在 PM 线程加载其他 role reference 代劳。
36
36
 
@@ -49,7 +49,7 @@ Start a new Morning Star harness iteration. **Phase 1 is not complete until the
49
49
 
50
50
  ## 0. Boot
51
51
 
52
- 按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration` § Phase 1 + `mstar-phase-gates` + `mstar-dispatch-gates` + `mstar-conventions/artifacts` + `mstar-host` → active host reference)。Cursor Plan mode 另读 **`cursor-plan-mode-bridge.md`**(`mstar-iteration` Phase 1 in Plan mode)。完整 load list → **`mstar-roles`**。
52
+ 按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration`(route map:start → **`references/phase-1-prepare.md`**)+ `mstar-phase-gates` + `mstar-dispatch-gates` + `mstar-conventions/artifacts` + `mstar-host` → active host reference)。Cursor Plan mode 另读 **`cursor-plan-mode-bridge.md`**(`mstar-iteration` Phase 1 in Plan mode)。完整 load list → **`mstar-roles`**。
53
53
 
54
54
  **若 Cursor Plan mode 活跃 → 进入 §P;否则继续 §1。**
55
55
 
@@ -76,17 +76,17 @@ Scope **2–4** candidates targeting **product completeness**(default to defer
76
76
 
77
77
  > **非 Plan 路径**。Cursor Plan mode 用 §P feedback loop + deferred grill(主路径不是 grill)。
78
78
 
79
- **Direction lock mode: `interactive`**(`mstar-iteration` §1.2 默认;本命令不使用 `autonomous`)。This command bundles a **non-`mstar-*`** skill at `skills/grill-me/SKILL.md` — **only this command step** references it.
79
+ **Direction lock mode: `interactive`**(`mstar-iteration/references/phase-1-prepare.md` §1.2 默认;本命令不使用 `autonomous`)。This command bundles a **non-`mstar-*`** skill at `skills/grill-me/SKILL.md` — **only this command step** references it.
80
80
 
81
- **Before this step:** Read `skills/grill-me/SKILL.md`. Run **grill-me** to stress-test candidate directions with the user: walk through trade-offs, converge on a **single iteration direction** with shared understanding, document locked direction + success criteria + non-goals。**If `direction` arg given** — seed grill-me with it (still interactive; the hint does **not** skip grill-me)。Confirm delivery branch policy(`iteration_base_branch` / `target_branch`)per **`mstar-iteration` §1.2** — **Do not default to `main`/`master` just because those names exist.**
81
+ **Before this step:** Read `skills/grill-me/SKILL.md`. Run **grill-me** to stress-test candidate directions with the user: walk through trade-offs, converge on a **single iteration direction** with shared understanding, document locked direction + success criteria + non-goals。**If `direction` arg given** — seed grill-me with it (still interactive; the hint does **not** skip grill-me)。Confirm delivery branch policy(`iteration_base_branch` / `target_branch`)per **`mstar-iteration/references/phase-1-prepare.md` §1.2** — **Do not default to `main`/`master` just because those names exist.**
82
82
 
83
83
  ## 4. Write Compass & Plans
84
84
 
85
- Produce harness artifacts per **`mstar-iteration` §1.3–§1.5**(template: `mstar-iteration/references/iteration-compass-template.md`):compass(frontmatter **must** include `iteration_base_branch`、`target_branch`、`status: active`)、plans、`status.json` 登记(§1.5)、`{ITERATION_DIR}/README.md` 索引(一行 = 一次迭代)、package dirs(`{ITERATION_DIR}/<iteration-id>/{guides,specs}/`)。
85
+ Produce harness artifacts per **`mstar-iteration/references/phase-1-prepare.md` §1.3–§1.5**(template: `mstar-iteration/references/iteration-compass-template.md`):compass(frontmatter **must** include `iteration_base_branch`、`target_branch`、`status: active`)、plans、`status.json` 登记(§1.5)、`{ITERATION_DIR}/README.md` 索引(一行 = 一次迭代)、package dirs(`{ITERATION_DIR}/<iteration-id>/{guides,specs}/`)。
86
86
 
87
87
  ## 5. Review & Edit Chain(HARD GATE — do not commit before this)
88
88
 
89
- Execute **`mstar-iteration` §1.6**(SSOT):顺序 `product-manager` → `architect` → `writing-specialist` → PM lock(**禁止**并行三 roles;OpenCode plain role id — `mstar-host/references/opencode.md`);**禁止** `{KNOWLEDGE_DIR}/` 新增;writing-specialist corpus hygiene(`iteration-artifact-boundaries.md` + `iteration-corpus-hygiene.md`)。Tool rule → **`mstar-dispatch-gates`** specialist review-and-edit(每 role 1 invoke,等磁盘修订返回)。Exception: user explicitly waives subagent dispatch ("PM-only review").
89
+ Execute **`mstar-iteration/references/phase-1-prepare.md` §1.6**(SSOT):顺序 `product-manager` → `architect` → `writing-specialist` → PM lock(**禁止**并行三 roles;OpenCode plain role id — `mstar-host/references/opencode.md`);**禁止** `{KNOWLEDGE_DIR}/` 新增;writing-specialist corpus hygiene(`iteration-artifact-boundaries.md` + `iteration-corpus-hygiene.md`)。Tool rule → **`mstar-dispatch-gates`** specialist review-and-edit(每 role 1 invoke,等磁盘修订返回)。Exception: user explicitly waives subagent dispatch ("PM-only review").
90
90
 
91
91
  **Assignment preflight**:每次 invoke 前按 **`mstar-iteration/references/command-shared-invariants.md`** 执行(warn-only + `enforcement: hard` fail-fast;bin 缺失静默跳过)。
92
92
 
@@ -109,13 +109,13 @@ PM must print this block before §6; all `[ ]` must be `[x]`:
109
109
 
110
110
  ## 6. Integration Branch
111
111
 
112
- Per **`mstar-iteration` §2.3**:create `spec_integration_branch` from `iteration_base_branch`(`git fetch` → `git checkout -b <spec_integration_branch> <iteration_base_branch>`);register `iteration_base_branch` / `spec_integration_branch` / `target_branch` in compass frontmatter **and** `status.json` metadata;commit docs;push。**STOP** if `iteration_base_branch` / `target_branch` missing — never default `main`/`master`.
112
+ Per **`mstar-iteration/references/phase-2-worktree-lease.md` §2.3**:create `spec_integration_branch` from `iteration_base_branch`(`git fetch` → `git checkout -b <spec_integration_branch> <iteration_base_branch>`);register `iteration_base_branch` / `spec_integration_branch` / `target_branch` in compass frontmatter **and** `status.json` metadata;commit docs;push。**STOP** if `iteration_base_branch` / `target_branch` missing — never default `main`/`master`.
113
113
 
114
114
  ---
115
115
 
116
116
  ## 7. Phase 2–5(auto-continue)
117
117
 
118
- **`pause` arg → command ends here**(Phase 1 locked + integration pushed;run `/iteration-drive` later)。**Default(no `pause`)→ auto-continue**:execute **`iteration-drive`**(Phase 2 → **`mstar-iteration` §2**;Phase 3 → §3 + `references/phase-3-iteration-close.md`;Phase 4/5 → §4–§5 + `references/phase-4-5-pr-delivery.md`;Phase 5 helper discovery → `phase5-helper-discovery.md`)。Shared invariants / preflight / STOP → **`mstar-iteration/references/command-shared-invariants.md`**。
118
+ **`pause` arg → command ends here**(Phase 1 locked + integration pushed;run `/iteration-drive` later)。**Default(no `pause`)→ auto-continue**:execute **`iteration-drive`**(Phase 2 → **`mstar-iteration/references/phase-2-worktree-lease.md`**;Phase 3 → `references/phase-3-iteration-close.md`;Phase 4/5 → `references/phase-4-5-pr-delivery.md`;Phase 5 helper discovery → `phase5-helper-discovery.md`)。Shared invariants / preflight / STOP → **`mstar-iteration/references/command-shared-invariants.md`**。
119
119
 
120
120
  **Done = Phase 5 §5.5 exit checklist 全 `[x]`**(同 `iteration-drive`)。**Then** report: iteration id, direction lock summary, plans completed, compound summary, PR link, merge-ready evidence(CI snapshot + review resolution + Greptile if applicable)。
121
121
 
@@ -1,11 +1,11 @@
1
1
  ---
2
2
  name: mstar-coding-behavior
3
- description: Morning Star 跨角色通用编码行为准则 —— 任何实现、调试、重构、审查任务动手前必读。约束 Think Before Coding(先读懂再改、显式假设、不静默猜测)、Simplicity First(YAGNI、The Ladder、`simplify:` 标记、最小耐久切片)、Surgical Changes(改动可追溯、Bug 修根因先 grep 所有调用点、不 piggyback)、Debugging(先复现、一步一测、修前写复现测试)、Review Feedback Handling(先核实再改、证据反驳)、Goal-Driven Execution(非平凡逻辑留可运行检查、Step→verify)、Communication。`@fullstack-dev*` / `@frontend-dev` / `@architect` / `@qa-engineer` / `@ops-engineer` / `@prompt-engineer` 必读;QC 核对手术范围时必读。不覆盖分支门禁、QC/QA 路由、Assignment 权限。
3
+ description: Morning Star 跨角色通用编码行为准则 —— 任何实现、调试、重构、审查任务动手前必读。约束 Think Before Coding(先读懂再改、显式假设、不静默猜测)、Simplicity First(YAGNI、The Ladder、`simplify:` 标记、最小耐久切片)、Surgical Changes(改动可追溯、Bug 修根因先 grep 所有调用点、不 piggyback)、Debugging(先复现、一步一测、修前写复现测试)、Review Feedback Handling(先核实再改、证据反驳)、Goal-Driven Execution(非平凡逻辑留可运行检查、Step→verify)。`@fullstack-dev*` / `@frontend-dev` / `@architect` / `@qa-engineer` / `@ops-engineer` / `@prompt-engineer` 必读;QC 核对手术范围时必读。不覆盖分支门禁、QC/QA 路由、Assignment 权限。
4
4
  ---
5
5
 
6
6
  ## Load order(必读顺序)
7
7
 
8
- **在同一会话或任务中首次 Read 本 skill 时:必须先 Read `mstar-harness-core` skill(SKILL.md)。** 本 skill 只约束 **编码与改动风格**(Think / Simplicity / Surgical / Debugging / Goal-Driven / Communication);**Done 所有权、状态机** 仍以 **`mstar-harness-core`** 为准;**分支 / worktree / QC-QA 检出字段** → **`mstar-branch-worktree`**;**调度防串扰** → **`mstar-dispatch-gates`**。冲突时 **以 `mstar-harness-core` 为准**。
8
+ **在同一会话或任务中首次 Read 本 skill 时:必须先 Read `mstar-harness-core` skill(SKILL.md)。** 本 skill 只约束 **编码与改动风格**(Think / Simplicity / Surgical / Debugging / Goal-Driven);**Done 所有权、状态机** 仍以 **`mstar-harness-core`** 为准;**分支 / worktree / QC-QA 检出字段** → **`mstar-branch-worktree`**;**调度防串扰** → **`mstar-dispatch-gates`**。冲突时 **以 `mstar-harness-core` 为准**。
9
9
 
10
10
  **摘要**:`mstar-harness-core` — 不变量与门禁;本 skill — 实现与审查时的工程习惯,不替代 harness。
11
11
 
@@ -21,14 +21,10 @@ Lightweight, host-agnostic coding-behavior principles that reduce common agent m
21
21
 
22
22
  Do not silently choose an interpretation when ambiguity exists. State assumptions explicitly when material; if multiple plausible interpretations exist, present options and ask. Surface tradeoffs affecting scope/risk/maintainability. If critical context is missing, pause and clarify instead of guessing.
23
23
 
24
- Quick check: can another reviewer see the assumptions made? If assumptions are wrong, will the user detect it before large edits happen?
25
-
26
24
  **Never lazy about understanding.** Shorten the solution, never the reading. Read the task and every file the change touches fully first; trace the actual flow end to end. A small diff in the wrong place is not efficiency — it is a second bug shipped with confidence.
27
25
 
28
26
  **Read before you write.** Before generating code in an existing project: inspect imports (which libraries the project actually uses — do not introduce a different library for the same purpose); look at nearby tests (they document expected behavior more precisely than comments); follow existing patterns (API routes, file structure, error handling — match it, do not silently introduce a different one). If no precedent exists, say so and ask. If not 100% sure a signature/parameter exists, check source/docs before using it — confidently calling a non-existent API may compile then fail at runtime.
29
27
 
30
- The failure mode: "correct" code that is alien to the codebase — works but looks like a different person wrote it, forcing a rewrite or permanent inconsistency.
31
-
32
28
  ## 2) Simplicity First
33
29
 
34
30
  **Upstream invariants**: the global engineering rules live in `mstar-harness-core`(核心研发守则)——no backward-compat layers, simplest implementation, layered growth, modularity, dependency discipline, long-term architecture; this section is their implementation-level playbook.
@@ -94,11 +90,6 @@ When something does not work, investigate; do not guess.
94
90
  - **Run existing tests before and after changes.** If they passed before and fail after, you broke something. If they were already failing, say so.
95
91
  - **If stuck, say so.** "I tried X and Y; neither worked. I'm seeing Z. I think it might be W but am not sure" is infinitely more useful than silently trying random things for 20 iterations.
96
92
 
97
- **Dataflow-directed diagnosis — how to locate, verify, and falsify** (for where to fix, see Surgical Changes · bug=root-cause; for the pre-fix repro test, see the bullets above):
98
- - **Map the data flow before judging.** Trace input → processing → storage → output, noting who writes and who reads at each step. A bug is a state deviation from expectation at some point in that flow (expected state vs observed state) — locate it from the data, not by static code reading.
99
- - **Four verifiable cross-checks.** Every hypothesis must be cross-checkable: re-run the repro / log comparison / input-output comparison / dual-path comparison. A hypothesis that cannot be verified on the spot is not a conclusion.
100
- - **Falsify the fix.** After the fix, re-run the original repro and compare output with expectation. If the problem did not disappear, the root cause was wrong — report "verification failed" explicitly; never pretend success.
101
-
102
93
  ## 5) Goal-Driven Execution
103
94
 
104
95
  Convert vague requests into verifiable outcomes and iterate until verified. Define concrete success criteria before major edits; use brief `Step -> verify` checkpoints for multi-step tasks; for split delivery, maintain a durable roadmap (current slice, later slices, dependencies, owner/trigger, completion condition); prefer evidence-backed completion (tests, command output, reproducible checks). If verification fails, loop on diagnosis and fix before declaring completion. Do not finish with "next plan / later / follow-up" only in prose — remaining work must be written to the plan/status artifact or the task reports `Partial` / `Blocked`.
@@ -131,14 +122,6 @@ Feedback priority:
131
122
 
132
123
  Do not perform agreement. State the technical action, the verification result, or the technical reason for disagreement.
133
124
 
134
- ## 7) Communication
135
-
136
- - **Say what you did and why** — not just a code dump ("moved validation into a separate function because it was duplicated in three places and this makes it testable independently").
137
- - **Flag concerns proactively** ("this works but makes a DB call per item — if the list grows large this will be slow; want me to batch it?").
138
- - **Be precise about uncertainty** ("I'm not sure if this library supports streaming responses" is useful; "I think this should work" is not — tell the reviewer exactly what to verify).
139
- - **Match explanation to context** — do not explain REST to someone who asked for a REST endpoint, or indexes to someone who asked for an index.
140
- - **Write specific commit messages** — "Fix null pointer in user lookup when email contains uppercase chars", not "Fix bug".
141
-
142
125
  ## Integration Notes
143
126
 
144
127
  - **SDD implementer reports** (`mstar-sdd`): completion evidence must include TDD triple — test file(s), command, output — in `task-N-report.md`; fix rounds add the same for new/changed tests.
@@ -155,7 +138,7 @@ Do not perform agreement. State the technical action, the verification result, o
155
138
 
156
139
  ## Workflow
157
140
 
158
- Apply the seven sections in reading order: **1) Think Before Coding**(读懂再改)→ **2) Simplicity First**(最小耐久切片)→ **3) Surgical Changes**(可追溯改动 / 根因修复)→ **4) Debugging**(先复现、一步一测)→ **5) Goal-Driven Execution**(Step → verify)→ **6) Review Feedback Handling**(先核实再改、证据反驳)→ **7) Communication**(说明做了什么与为什么)。
141
+ Apply the six sections in reading order: **1) Think Before Coding**(读懂再改)→ **2) Simplicity First**(最小耐久切片)→ **3) Surgical Changes**(可追溯改动 / 根因修复)→ **4) Debugging**(先复现、一步一测)→ **5) Goal-Driven Execution**(Step → verify)→ **6) Review Feedback Handling**(先核实再改、证据反驳)。
159
142
 
160
143
  ## Evidence
161
144
 
@@ -13,21 +13,15 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
13
13
  >
14
14
  > **先回到你 Assignment 最顶部的 `**IDENTITY**` 块重读一遍** —— 那里已经告诉你:你是谁、你不是谁、Task 工具不属于你。本节是那个身份断言的加固版。
15
15
 
16
- **身份断言(牢记,不动摇):**
17
- - **你就是** `Execute as` 写的那个角色。你**不是 PM**,不是调度者,不是 parallel-agent dispatch 的使用者。
18
- - Task/subagent 工具即使在你的工具列表里出现,它**不属于你**。把它当作你没见过的工具 —— 不是"不能用",是"你没有"。
19
- - 所有工作由你**本人**在当前会话内完成(Read / Write / Edit / Shell / Grep / Glob)。任何"这样做更高效"的想法都不构成 dispatch 的理由。
20
- - 遇到超出能力范围的需求 → 写 `## Blocked` 回报 PM,**不是**尝试 dispatch。Blocked 是你能发出的正确信号,dispatch 不是。
16
+ 你是 `Execute as` 写的那个角色,不是 PM / 调度者;所有工作由你**本人**在当前会话内完成(Read / Write / Edit / Shell / Grep / Glob);超出能力范围 → 写 `## Blocked` 回报 PM,**不是**尝试 dispatch。
21
17
 
22
18
  ## 承接方反递归红线(NEVER / DO NOT;leaf executor 必读)
23
19
 
24
- 下列行为易触发递归误派;`project-manager` 之外的角色一旦命中,须立即停止并改为本会话内可交付物,或 **`Blocked`** 回报 PM。**禁止**以「更高效」「Assignment 像 PM 编排」等理由绕开:
20
+ 下列行为易触发递归误派;`project-manager` 之外的角色一旦命中,须立即停止并改为本会话内可交付物,或 **`Blocked`** 回报 PM。**禁止**以「更高效」「Assignment 像 PM 编排」等理由绕开。
25
21
 
26
- - **NEVER** 在本会话内调用 Task / subagent,且其 `subagent_type` **等于**你当前的 **`Execute as`** 角色 id。
27
- - **NEVER** 把 Assignment 里出现的 **任何** plain `role-id` 提及、反引号 `` `<role-id>` ``、**Handoff**、**QA gate**、**Completion Report** 模板里的角色名、路由表下游角色当成「立刻 invoke」的指令;这些是**叙事 / 路由文档 / 后续 PM 编排意图**,不是命令。
28
- - **NEVER** 把「分解为多个计划 / 多 phase / 多 track」等**设计产物层面**的并行或拆分读成「应 invoke 与子会话数量对应的多个 subagent」。**纸面产物**由本会话写盘完成;并行**调度**由 PM 在后续轮次决定。
29
- - **NEVER** 因宿主**暴露**了 `Task` 或若干 `subagent_type` 名称就推断可以调用。**工具可用 ≠ 授权使用**;授权只来自 **`Delegation: allowed (...)`**。
30
- - **NEVER**(非 PM)主动执行 parallel-agent dispatch 来分派子代理;需要并行时回报 PM。
22
+ **共享红线**(doc-level 并行拆分 ≠ N 个 subagent;Handoff / 路由措辞 / 角色提及 ≠ invoke;工具可用 ≠ 授权;仅 PM 可分派;非 `Delegation: allowed` 不得调用同角色 / 兄弟角色)以 **`mstar-roles/references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」+「Non-Recursive Dispatch Rule (shared shape)」为唯一权威清单(standard preset 下已随角色 ref 在上下文中;explicit `none` 下该 leaf 边界仍可达)。本节保留 dispatch 专属条目:
23
+
24
+ - **NEVER** 在本会话内调用 Task / subagent,且其 `subagent_type` **等于**你当前的 **`Execute as`** 角色 id(同角色递归)。
31
25
  - **DO NOT** 在 Assignment 缺少 `Execute as` / `Delegation` / `Who runs this turn` 时自行「补齐」为 PM;缺字段时按 **leaf executor** 解释:亲自完成或 **`Blocked`**。
32
26
  - **DO NOT** 用「Assignment 太长 / 像编排稿」当作分派依据;先交付本会话任务再回报,分派由 PM 下一轮决定。
33
27
 
@@ -109,12 +103,12 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
109
103
  - **1 Assignment ⇒ 1 invoke**。
110
104
  - **Phase 1 Review & Edit chain**(`mstar-iteration` §1.6):主产出 **`{SPECS_DIR}/`** + **`{ITERATION_DIR}/<iteration-id>/`** package;**禁止** start 链向 `{KNOWLEDGE_DIR}/` 新增。close 时 **`mstar-compound`** 提升 package → knowledge。
111
105
  - 其他彼此独立、无先后依赖的文档编辑任务:可并行(同条消息发满 N),见 **`parallel-dispatch.md`**。
112
- - PM 线程代做全部专业编辑 = **反模式**(`mstar-iteration` §1.6、`mstar-harness-core` 反模式索引)。
106
+ - PM 线程代做全部专业编辑 = **反模式**(`mstar-iteration` §1.6、`mstar-roles/references/_shared/leaf-executor-core.md`「Shared anti-recursion NEVER」)。
113
107
  - PM merge / lock(如 compass `status: locked`)在链末 subagent 返回后于 PM 线程完成。**不得**在 review-and-edit 链完成前 commit integration 分支。
114
108
 
115
109
  ## 反模式(派发)
116
110
 
117
- 完整反模式索引见 **`mstar-harness-core`**;lease / worktree / Phase 相关反模式见 **`mstar-branch-worktree`** 与 **`mstar-iteration`**。本节仅列派发机制专属:
111
+ 共享反递归红线全清单见 **`mstar-roles/references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」;lease / worktree / Phase 相关反模式见 **`mstar-branch-worktree`** 与 **`mstar-iteration`**。本节仅列派发机制专属:
118
112
 
119
113
  - QC 三审拆在多条消息(tri 模式)或单席却未附 review-package 路径。
120
114
  - 仅 1 次 invoke 却声称「tri-review 已并行启动」(tri 模式 N=3)。
@@ -20,4 +20,4 @@ Before any Task/subagent call (if I somehow forget the preamble):
20
20
 
21
21
  If blocked, report: `## Blocked — recursive dispatch refused (<which NEVER or reason>)`
22
22
 
23
- Full NEVER/DO NOT list → **`mstar-dispatch-gates` SKILL.md**「承接方反递归红线」.
23
+ Full NEVER/DO NOT list → **`mstar-roles/references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」; dispatch-specific DO NOTs → **`mstar-dispatch-gates` SKILL.md**「承接方反递归红线」.
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-harness-core
3
- description: Morning Star (启明星) harness **强制全局入口** —— 信息源优先级、最小交付循环、状态机与 Done 权限、Task category 路由(含 quick 禁豁免)、@explore 边界、长任务纪律、核心研发守则、护栏不变量、反模式索引、Morning Star Skill 索引与宿主入口。**任何**非平凡任务开始前必须先 Read 本 skill;再按角色与任务 **按需** Read 其它 `mstar-*` 专题(勿默认通读全部)。`@project-manager` 开轮必读 + `mstar-dispatch-gates` / `mstar-phase-gates` / `mstar-conventions` 等;实现/审查/QA 必读本 skill + `mstar-coding-behavior` 及角色清单(见 `mstar-roles`)。Prepare/派发/Git/residual/QC 细则在专题 skill,不在此重复。
3
+ description: Morning Star (启明星) harness **生命周期 / 授权语义权威与全局入口** —— 信息源优先级、最小交付循环、状态机与 Done 权限、Task category 路由(含 quick 禁豁免)、@explore 边界、长任务纪律、核心研发守则、护栏不变量、Morning Star Skill 索引与宿主入口。加载**选择**权威在 **`mstar-roles`**(hub § Load Order 按 Assignment `Skill presets:` 决策;本 skill 不另设全局必读表):PM 与标准路线仍以本 skill 为全局入口;独立直接调用专题时本 skill 是首个依赖;explicit `none` 角色路线以身份 + 角色自有方法自洽(唯一 hub bootstrap 例外)。`@project-manager` 开轮必读 + `mstar-dispatch-gates` / `mstar-phase-gates` / `mstar-conventions` 等;实现/审查/QA 按其角色 preset 清单加载。Prepare/派发/Git/residual/QC 细则在专题 skill,不在此重复。版本漂移(version drift)/ CLI 与插件版本不一致 / 提示更新插件或 CLI → 按「版本对齐」节处理(doctor 检查 + 定向更新提示)。
4
4
  ---
5
5
 
6
6
  # Morning Star Harness Core(启明星核心)
@@ -9,16 +9,16 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
9
9
 
10
10
  ## 与其它 `mstar-*` skill 的加载契约
11
11
 
12
- - 凡 **`mstar-*`**(`name` ≠ `mstar-harness-core`)假定读者**已 Read 本 skill**。
13
- - **仅读专题、未读核心** → 未完成 harness 加载。
14
- - 各专题 SKILL.md 含 **Load order**;按 **`mstar-harness-core`** 专题 skill 索引 + 角色 load contract 按需加载,**禁止**为「保险」通读全部专题。
12
+ - 本 skill 是 harness 的**生命周期 / 授权语义权威**(状态机、Done 权限、门禁、路由以本 skill 为准);加载**选择**权威是 **`mstar-roles`**(hub bootstrap → 角色身份 → Assignment `Skill presets:` 决策,见其 § Load Order)。本 skill 不维护第二份全局必读角色表。
13
+ - **独立直接调用专题**(不经角色 hub bootstrap)时,`mstar-harness-core` 仍是首个依赖:各专题 SKILL.md 的 Load Order / First action 节须声明 core-first。**唯一例外**是 `mstar-roles` hub bootstrap —— explicit `none` 下角色以身份 + 角色自有方法自洽,不强制读任何专题(含本 skill);此时授权、反递归、证据诚实等 load-bearing 语义由角色引用与其 leaf 边界承接。
14
+ - 各专题 SKILL.md 含 **Load order**;按 **`mstar-roles`** 的加载选择 + 本 skill 专题索引按需加载,**禁止**为「保险」通读全部专题。
15
15
  - **加载条件(`mstar-engine-legacy`)**:`mstar-engine-legacy` 是**条件契约档案**(engine-absent fallback)。**engine 约束激活(或宿主含 engine 能力)时不加载**——engine-present 宿主以运行时 skills 的 engine-check 指针 + engine 校验为权威;仅 engine-absent 宿主(无 `mstar` CLI / engine import)为找回被 engine 校验接管的 contract 全文而读取(触发契约见其 description)。
16
16
 
17
17
  ## Standalone harness(`mstar-*` 自洽)
18
18
 
19
19
  - **`mstar-*` skill 体系**在本仓库内自洽运行:正文与 load order **不得**依赖仓库外的 skills、CLI、或 MCP 服务。
20
20
  - **Commands**(如 `/iteration-start`)可引用本仓库 bundled、**非 `mstar-*`** 的辅助资产(例如 `skills/grill-me/`);该引用**仅**存在于 command 层,**不**进入 `mstar-*` 专题索引或 load matrix。
21
- - 框架/SDK/API 问题:先 Read/Grep 项目内文档与源码;不将第三方文档工具写入 `mstar-*` 必读路径。
21
+ - 框架/SDK/API 问题:先 Read/Grep 项目内文档、规格与源码;仍不确定时再向用户澄清。不将第三方文档工具写入 `mstar-*` 必读路径。
22
22
 
23
23
  ## 信息源优先级
24
24
 
@@ -38,9 +38,11 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
38
38
 
39
39
  ## 加载约定(强制)
40
40
 
41
+ 加载选择 SSOT:**`mstar-roles`** hub § Load Order(Assignment `Skill presets:` 决策;PM required reading 不受 preset 门控)。下表是各角色的**典型追加指引**,不是第二套选择机制;冲突时以 hub 为准。
42
+
41
43
  | 角色 | 始终 | 按任务追加(典型) |
42
44
  |------|------|-------------------|
43
- | **全部** | 本 skill | — |
45
+ | **全部** | 加载选择 → **`mstar-roles`**(hub § Load Order;本 skill = 生命周期/授权权威,`mstar-roles` hub bootstrap 是 core-first 的唯一例外) | — |
44
46
  | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-conventions`、`mstar-roles`;implement 波次 `mstar-sdd`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/review bundle `mstar-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);新建/大改 skill 时 `mstar-skill-authoring`;迭代管理 `mstar-iteration`(Phase 1–5);战略性工作 `mstar-strategy`;`audit` 类请求 `mstar-audit`(执行归 `@code-reviewer`)。**不**读 `mstar-coding-behavior` |
45
47
  | **实现/审查/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-conventions`;**PM** 派 QC 前:`mstar-review-qc`;**`qc-specialist*`**:`mstar-roles` → `references/qc-specialist/`;`qa-engineer`:`references/qa-engineer/`;改 status/residual:`mstar-artifacts`;UI:`mstar-design-md`;知识库:`mstar-compound`(PM) |
46
48
  | **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
@@ -100,7 +102,7 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
100
102
  | `mstar-project-governance` | 项目治理层:`projects/<id>/roadmap.md` 编写约定 + `residuals.json` register 生命周期(open → verified close in place)、`_default` 回退、provenance;schema 与 engine `project.ts` 逐字一致 |
101
103
  | `mstar-design-md` | DESIGN.md 设计系统规范 —— 创建/审计/维护 design tokens,三级检查清单,light/dark 双主题 |
102
104
  | `mstar-review-qc` | PM:QC tri 编排、residual 留档、四层边界;leaf 执行 → `mstar-roles/references/qc-specialist/` |
103
- | `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Review Feedback / Goal-Driven / Communication |
105
+ | `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Review Feedback / Goal-Driven |
104
106
  | `mstar-compound` | 知识结晶 —— 已解决问题→结构化知识文档,双轨(Bug/Knowledge),「是否值得结晶」自检清单,重叠检测,可发现性检查,CONCEPTS.md 协同 |
105
107
  | `mstar-compound-refresh` | 知识维护 —— 审查/更新/合并/删除 `{KNOWLEDGE_DIR}` 文档;**项目知识 bootstrap**(无/残旧 STRATEGY.md、CONCEPTS.md、`{KNOWLEDGE_DIR}`)→ `references/project-knowledge-bootstrap.md` |
106
108
  | `mstar-strategy` | `STRATEGY.md` 全局战略方向 —— 产品愿景、技术方向、决策原则 |
@@ -121,6 +123,13 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
121
123
  | Kimi | `Agent`/`AgentSwarm`(仅 `coder`/`explore`/`plan`);角色绑定在 prompt(C5b);Plan 双写 → `references/kimi.md` · `kimi-plan-mode-bridge.md` |
122
124
  | 其它 | 同 `mstar-host` skill;按工具信号选 reference |
123
125
 
126
+ ## 版本对齐(CLI ↔ host 插件)
127
+
128
+ - 全局 CLI 与已安装的宿主插件**独立升级**;版本漂移是已知故障源(skills/commands 与 CLI 预期不再匹配)。
129
+ - 检查:`mstar-harness doctor --target <host>`(全部宿主已实现:opencode / cursor / codex / zcode / omp / dsh / kimi)。
130
+ - **CLI 较新** → 提示用户更新宿主插件;**插件较新** → 提示用户更新全局 CLI(`npm i -g @mstar-harness/cli@latest`)。
131
+ - 触发纪律:harness 行为异常/疑似过期、已知新版本发布后、或用户要求时运行——**不是**每个会话都跑。
132
+
124
133
  ## 核心研发守则
125
134
 
126
135
  全局工程不变量,适用于所有角色;实现级操作细节(The Ladder、surgical、debugging 等)→ **`mstar-coding-behavior`**。
@@ -143,54 +152,8 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
143
152
  - plan-writing artifacts land in `{PLAN_DIR}`, not external default plan directories.
144
153
  - PM Assignment 键名英文;任务正文可中文;产出/报告默认英文。
145
154
 
146
- ## 库文档 / API 问题
147
-
148
- 先 Read/Grep 项目内文档、规格与源码;仍不确定时再向用户澄清。**不**将第三方 MCP/CLI 文档工具写入 `mstar-*` load order。
149
-
150
155
  ## 升级触发
151
156
 
152
157
  验收仍模糊、评审冲突、重复失败、根因不可收敛 → 升级报告(状态、方案、推荐路径)。
153
158
 
154
- ## 反模式(索引)
155
-
156
- | 反模式 | 详见 |
157
- |--------|------|
158
- | SDD paste-only / 跳过 task review / 并行 implementer | `mstar-sdd` · `mstar-dispatch-gates` |
159
- | SDD plan 以单席 `qc.md` 收尾 / 跳过 plan tri | `mstar-dispatch-gates` · `mstar-review-qc` · `mstar-sdd` |
160
- | fix 后无脑重派三审 / 用 `-rev2` 代替原位复验 | `mstar-artifacts` · `mstar-review-qc` |
161
- | 递归误派 / 误读 Handoff | `mstar-dispatch-gates` |
162
- | `quick` 跳过 Prepare | 上表 + `mstar-phase-gates` |
163
- | 多 worktree 未归并就 QC | `mstar-branch-worktree` |
164
- | 因默认 gitignore 致 feature 缺 plans 而 `Worktree mode: waived`(应保留 feature worktree + control 绝对 Plan Path / SDD dir;无 flock 仅 → `Plan parallelism: serial`) | `mstar-branch-worktree` · `mstar-iteration` §2.0 #5 · `phase-2-worktree-lease` |
165
- | 并行 writable implement 无隔离(L2 同 plan 多轨:N invoke ≠ worktree;L1 跨 plan:无 verified `execution_lease` + feature worktree) | `mstar-branch-worktree` L1/L2 · `mstar-iteration` §2.6 · `references/parallel-writable-pre-dispatch.md` |
166
- | 跨 plan 可写派发无 verified `execution_lease` / steal 活跃 lease / 并行 merge 入 `spec_integration_branch` | `mstar-iteration` · `mstar-artifacts`(leases)· `mstar-branch-worktree` L1 |
167
- | `InProgress` 无 `execution_lease`(snapshot 行)未恢复即可写派发 | `mstar-artifacts` — orphan recovery |
168
- | 混淆跨 plan lease 门控并行与单 plan 内 SDD 并行 implementer | `mstar-dispatch-gates` · `mstar-sdd` |
169
- | residual 只写 plan 不写 SSOT | `mstar-artifacts` |
170
- | `zero-residual` 下把可修 findings 登记为 open R# / 草草 `Approve with residuals` | `mstar-artifacts` Findings cleanup modes · `mstar-review-qc` |
171
- | 角色文件塞流程长文 | 用专题 skill |
172
- | 无证据宣称完成 | `mstar-coding-behavior` / verification |
173
- | CreatePlan 不落盘 / 无 `{HARNESS_DIR}` mirror | `mstar-host` · `cursor-plan-mode-bridge` |
174
- | 临时方案 / 后续计划只写在对话里 | `mstar-phase-gates` · Durable Roadmap Gate |
175
- | Phase 1 review chain 未完成即 commit | `mstar-iteration` §1.6;PM 代做专业角色编辑;或三角色并行派发 |
176
- | OpenCode prompt 含多个 prefix-style role mention | `mstar-host/references/opencode.md` § Role-mention hygiene |
177
- | Phase 2 paste-only / PM 自实现 | `mstar-dispatch-gates` |
178
- | Phase 3 折叠进 final plan closure / 跳过 §3.1 gate | `mstar-iteration` §3.0–§3.5 |
179
- | Phase 4 开 PR 后跳过 merge-ready loop | `mstar-iteration` §5 |
180
- | Phase 5 在 CI / AI review 仍在跑时 push | `mstar-iteration` §5.1a |
181
- | iteration-close 无 frontmatter completed / 漏 compound Phase 6 | `mstar-iteration` §3.0.5、§3.4、§3.2 #5 |
182
- | iteration 默认 `main` 作 base 或 PR 目标 | `mstar-iteration` §1.2、§2.3;`mstar-conventions` Spec 分支模型 |
183
-
184
- ## 常见 harness 说法对照(帮助理解角色分工)
185
-
186
- | 常见说法 | 本仓库实体 |
187
- |----------|------------|
188
- | 总编排 | `@project-manager` |
189
- | 规划/访谈 | `@product-manager` / `@architect` + Prepare 阶段 |
190
- | category 路由 | **`Task category`** + 路由表 + 子代理选择 |
191
- | 持续推进 / 不半途而废 | Phase Gate + Todo/`tasks` + 验证门禁 |
192
- | 行级哈希锚定编辑 | 以 **读后再改 + 小步 Patch** 纪律落实(`mstar-phase-gates`) |
193
-
194
- 项目根 **`AGENTS.md` 写什么、分层 bootstrap** → **`mstar-conventions`** `references/harness-bootstrap-and-agents-layering.md`(勿在 core 重复长文)。
195
-
196
159
  **专题 skill**(规则在各自 `SKILL.md`):`mstar-phase-gates`、`mstar-branch-worktree`、`mstar-artifacts` 等 — 见上表索引。
@@ -13,6 +13,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2
13
13
  - Plugin commands: repo `commands/` → `/morning-star-harness:<name>` (e.g. `/morning-star-harness:iteration-start`).
14
14
  - Plugin agents: repo `agents/*.md` (role frontmatter `name` + **single-line quoted English `description`** — ZCode's flat frontmatter parser cannot read `|-` block scalars and silently drops nested `tools`/`permission` maps). ZCode registers them as callable `subagent_type`s in both bare (`fullstack-dev`) and plugin-qualified (`morning-star-harness:fullstack-dev`) forms (see C5).
15
15
  - **No `sessionStart.skill`** (ZCode has no Kimi-style session auto-load) — enter PM manually via **`/morning-star-harness:pm`** or the **`pm`** skill, then **Read next** → `mstar-harness-core` → `project-manager.md`.
16
+ - **Plugin hooks** (`hooks/hooks.json`, ZCode-only surface): **SessionStart** injects harness-workspace context ({HARNESS_DIR} + `status.json` summary) when a harness workspace is detected — a partial substitute for the missing session auto-load; **PreToolUse (Bash)** enforces the `mstar-branch-worktree` gates deterministically (no direct commit on the default protected branch → `MSTAR_ALLOW_DEFAULT_BRANCH_COMMIT=1` escape; no bare `git push --force` → use `--force-with-lease`; disable with `MSTAR_BRANCH_GUARD=off`); **PreToolUse (Write|Edit)** runs the engine-backed coordination-write gate (blocks writes to harness coordination documents under opt-in `.mstarc`/compass hard enforcement; disable with `MSTAR_WRITE_GATE=off`). Silent no-op outside git repos / harness workspaces. Skill text stays authoritative; these hooks only backstop it.
16
17
  - Install (user-scoped, recommended): `npx @mstar-harness/cli init --target zcode --scope global`, then in ZCode **Settings → Plugin Management → Discover** install **morning-star-harness** from the **mstar-local** marketplace. Direct-add also works without the CLI: the repo ships `.claude-plugin/marketplace.json` (root `marketplace.json` fallback), which ZCode discovers when refreshing a `github`-source marketplace.
17
18
  - Plugins are **user-scoped** (all projects); managed copy lives under `~/.zcode/cli/plugins/` after install.
18
19
  - Project `.agents/skills/` symlinks are **not** required when using the plugin — commands and skills come from the plugin mount.
@@ -155,3 +156,9 @@ Cannot emit required **N** → **`Blocked`**.
155
156
  - Session todos (`TodoWrite`) are not durable SSOT unless mirrored to `{HARNESS_DIR}`.
156
157
  - Morning Star roles **are** registered as ZCode subagent types from `agents/*.md` — but the shells are thin, so role binding is **still always** prompt + skill load (C5b); prefer bare role ids, the qualified form can fall back to the default prompt.
157
158
  - ZCode has no `sessionStart.skill`; new sessions do **not** auto-load PM — invoke `/morning-star-harness:pm` or `/skill:pm` manually.
159
+
160
+ ## Plugin/CLI version alignment
161
+
162
+ - Installed plugin versions live under `~/.zcode/cli/plugins/cache/<marketplace>/morning-star-harness/<version>/` (one version directory per install; highest semver wins).
163
+ - Update entry: **Settings → Plugin Management → update from the `mstar-local` marketplace**.
164
+ - Behavioral contract (when to check, which side to update) → **`mstar-harness-core`**「版本对齐(CLI ↔ host 插件)」.