@mstar-harness/opencode 1.8.0 → 1.8.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 (43) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/harness-commands/codebase-audit.md +5 -68
  3. package/harness-commands/iteration-drive.md +17 -159
  4. package/harness-commands/iteration-loop.md +16 -194
  5. package/harness-commands/iteration-start.md +17 -185
  6. package/harness-skills/mstar-branch-worktree/SKILL.md +38 -27
  7. package/harness-skills/mstar-coding-behavior/SKILL.md +40 -114
  8. package/harness-skills/mstar-compound/SKILL.md +25 -197
  9. package/harness-skills/mstar-compound/references/compound-workflow.md +155 -0
  10. package/harness-skills/mstar-dispatch-gates/SKILL.md +3 -8
  11. package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +44 -0
  12. package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
  13. package/harness-skills/mstar-host/references/codex-plan-goal-mode-bridge.md +6 -11
  14. package/harness-skills/mstar-host/references/codex.md +1 -1
  15. package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +9 -78
  16. package/harness-skills/mstar-host/references/cursor.md +3 -3
  17. package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +5 -24
  18. package/harness-skills/mstar-host/references/kimi.md +5 -32
  19. package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +3 -13
  20. package/harness-skills/mstar-host/references/omp.md +5 -32
  21. package/harness-skills/mstar-host/references/opencode.md +1 -3
  22. package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +5 -24
  23. package/harness-skills/mstar-host/references/zcode.md +5 -32
  24. package/harness-skills/mstar-iteration/SKILL.md +21 -211
  25. package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +95 -0
  26. package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +81 -0
  27. package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
  28. package/harness-skills/mstar-phase-gates/SKILL.md +1 -1
  29. package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +46 -0
  30. package/harness-skills/mstar-roles/references/architect.md +3 -23
  31. package/harness-skills/mstar-roles/references/frontend-dev.md +4 -24
  32. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +4 -24
  33. package/harness-skills/mstar-roles/references/ops-engineer.md +3 -23
  34. package/harness-skills/mstar-roles/references/product-manager.md +3 -23
  35. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +5 -5
  36. package/harness-skills/mstar-roles/references/project-manager.md +4 -13
  37. package/harness-skills/mstar-roles/references/prompt-engineer.md +4 -23
  38. package/harness-skills/mstar-roles/references/qa-engineer.md +3 -22
  39. package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +16 -75
  40. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +1 -1
  41. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +4 -17
  42. package/harness-skills/mstar-roles/references/writing-specialist.md +4 -24
  43. package/package.json +1 -1
@@ -0,0 +1,155 @@
1
+ # mstar-compound — 工作流详情
2
+
3
+ > Loaded by `mstar-compound` SKILL.md at the self-check and Phase 1–7 steps. **Read `mstar-harness-core` first.** Path symbols → `mstar-plan-conventions`.
4
+
5
+ ## 是否值得结晶 —— 完整自检(Q1–Q8)
6
+
7
+ 在调用本 skill 前,PM(或触发方)**必须**逐条回答以下问题。得分仅辅助决策,不替代判断。每条回答 Yes / No / Not sure。
8
+
9
+ | # | 问题 | 说明 |
10
+ |---|------|------|
11
+ | Q1 | 这个问题的诊断过程耗时是否 ≥ 15 分钟(或 ≥ 3 次尝试)? | 若只是 1-2 次尝试就找到答案,可能太琐碎 |
12
+ | Q2 | 解决方案是否涉及**非显而易见**的知识(隐含假设、框架行为、workaround)? | 显而易见的知识无需文档化(如"少了个分号") |
13
+ | Q3 | 同一个开发者在未来遇到类似问题时,是否可能**再次花费相似的时间**来诊断? | 核心问题:知识能否复用? |
14
+ | Q4 | 问题的**根因**是否是项目特定的(不是通用语言/框架问题)? | 通用问题可搜索到,项目特定问题必须自己记录 |
15
+ | Q5 | `{KNOWLEDGE_DIR}` 中是否**已有**与此高度重叠的文档? | 若有 → 更新已有文档,不新建(见 Phase 2 重叠检测) |
16
+ | Q6 | 此解决方案是否可能**引导未来架构决策**或成为约定? | Knowledge track 的典型触发条件 |
17
+ | Q7 | 此解决方案中的"**什么没起作用**"部分是否有价值? | 失败的尝试往往是最有教学价值的部分 |
18
+ | Q8 | 问题是否涉及** ≥ 2 个模块/组件**的交互? | 跨模块问题最难排查,最值得记录 |
19
+
20
+ ### 决策矩阵
21
+
22
+ | 得分 | 行动 |
23
+ |------|------|
24
+ | **Yes ≥ 4**(含 Q5=No) | **强烈建议结晶**。执行完整 Phase 1-7。 |
25
+ | **Yes = 3** | **建议结晶**。使用 Lightweight 模式(Phase 1 单遍)。 |
26
+ | **Yes ≤ 2** | **跳过**。在 conversation/Completion Report 中注明"跳过结晶(<简述原因>)"。 |
27
+ | **Q5 = Yes(高重叠)** | 无论其它得分如何,**不要新建**。执行 Phase 2 重叠检测,更新已有文档即可。 |
28
+ | **任一 Not sure** | 倾向于回答者的默认判断。若 Q1-Q4 有 ≥ 2 个 Yes,仍建议结晶。 |
29
+
30
+ ### 示例判定
31
+
32
+ ```
33
+ Q1: Yes — debug 了 40 分钟
34
+ Q2: Yes — ActiveRecord 的 counter_cache 在 after_destroy 回调中的时序问题
35
+ Q3: Yes — 下次遇到类似时序问题仍会踩坑
36
+ Q4: Yes — 是项目特有 model 结构导致的
37
+ Q5: No — grep 了 knowledge/ 无匹配
38
+ Q6: No — 纯 bug 修复
39
+ Q7: Yes — 第一次尝试了手动更新 counter 导致数据不一致
40
+ Q8: No — 只涉及一个 model
41
+ → Yes = 5 → 强烈建议结晶(Bug track)
42
+ ```
43
+
44
+ ## Phase 1: Gather context
45
+
46
+ Read the conversation history **and**, when `iteration_id` is known, scan **`{ITERATION_DIR}/<iteration-id>/`** package per **Iteration package promotion** (SKILL.md).
47
+
48
+ Understand:
49
+ - What problem was solved (the concrete issue)
50
+ - What was tried and didn't work
51
+ - What the working solution was
52
+ - Why the solution works (root cause)
53
+ - Which files/modules were involved
54
+ - The plan_id if applicable (link to `status.json`)
55
+
56
+ If `{KNOWLEDGE_DIR}/README.md` exists, scan its index for related existing documents.
57
+
58
+ Classify the problem into a track (bug vs knowledge) and category using `references/category-mapping.md`.
59
+
60
+ ## Phase 2: Overlap detection
61
+
62
+ Before creating a new doc, check if an existing doc covers the same ground:
63
+
64
+ 1. Extract keywords from the problem (module names, error messages, technical terms)
65
+ 2. Search `{KNOWLEDGE_DIR}/**/*.md` using frontmatter fields (`module:`, `tags:`, `problem_type:`)
66
+ 3. Score overlap across dimensions: problem statement, root cause, solution approach, referenced files, prevention
67
+
68
+ | Overlap | Action |
69
+ |---------|--------|
70
+ | **High** (4-5 dimensions match) | **Update** the existing doc with fresher context instead of creating a new one. Add `last_updated` field. |
71
+ | **Moderate** (2-3 dimensions match) | Create new doc; flag for consolidation review (potential `mstar-compound-refresh` trigger) |
72
+ | **Low/None** | Create new doc normally |
73
+
74
+ ## Phase 3: Write the document
75
+
76
+ ### 3.1 Determine path
77
+
78
+ Category → directory under `{KNOWLEDGE_DIR}/`. Examples:
79
+ - Bug track: `build-errors/`, `runtime-errors/`, `performance-issues/`, `database-issues/`, `security-issues/`, `integration-issues/`
80
+ - Knowledge track: `architecture-patterns/`, `design-patterns/`, `conventions/`, `workflow-patterns/`, `tooling-decisions/`, `best-practices/`
81
+
82
+ Filename: `<sanitized-slug>.md` (lowercase, hyphen-separated, no date prefix).
83
+
84
+ ### 3.2 Frontmatter
85
+
86
+ Required fields for both tracks (SSOT: `references/schema.yaml`):
87
+
88
+ ```yaml
89
+ ---
90
+ module: <area>
91
+ date: YYYY-MM-DD
92
+ problem_type: <enum value>
93
+ category: <directory name>
94
+ severity: critical|high|medium|low
95
+ plan_id: <optional, link to status.json>
96
+ tags: [<keywords>]
97
+ ---
98
+ ```
99
+
100
+ Bug-track adds: `symptoms`, `root_cause`, `resolution_type`.
101
+ Knowledge-track adds: `applies_when` (optional).
102
+
103
+ ### 3.3 Body
104
+
105
+ Follow the section structure from `assets/resolution-template.md` for the determined track.
106
+
107
+ ### 3.4 Validate
108
+
109
+ After writing, validate the YAML frontmatter:
110
+ - `---` delimiters are correct
111
+ - All required fields present
112
+ - Enum values match allowed values
113
+ - `date` is YYYY-MM-DD format
114
+ - Array fields use `[item1, item2]` syntax
115
+
116
+ ## Phase 4: Discoverability check
117
+
118
+ Check whether the project's `AGENTS.md` or `CLAUDE.md` would lead a future agent to discover `{KNOWLEDGE_DIR}`.
119
+
120
+ If `{KNOWLEDGE_DIR}` is not mentioned in the root instruction file, propose the smallest addition that surfaces the knowledge store. Example:
121
+
122
+ ```markdown
123
+ - `{HARNESS_DIR}/knowledge/` — captured solutions and reusable patterns
124
+ ```
125
+
126
+ Ask for user consent before applying (PM can approve). If the user declines, the doc is still written — only the discoverability edit is skipped.
127
+
128
+ ## Phase 5: CONCEPTS.md synergy
129
+
130
+ If the captured learning introduces or clarifies a domain term whose meaning is project-specific and not obvious to a newcomer, propose adding it to `CONCEPTS.md` at the repo root.
131
+
132
+ Read `references/concepts-vocabulary.md` for inclusion rules. Only propose when the term meets the qualifying bar:
133
+ - Its meaning in this project is precise enough that a new engineer would need it defined
134
+ - It is not general programming vocabulary
135
+
136
+ If `CONCEPTS.md` doesn't exist yet, ask whether to seed it. A seed populates the core domain nouns of the area the learning touches; a full repo-wide bootstrap is the job of `mstar-compound-refresh`.
137
+
138
+ ## Phase 6: Update indexes
139
+
140
+ 1. Add a row to `{KNOWLEDGE_DIR}/README.md` index table (create if missing):
141
+ - Document (link), Source Plan (`plan_id`), Description, Status (`Active`)
142
+
143
+ 2. If `plan_id` was provided, optionally update `status.json` metadata to reference this doc under `knowledge_refs`.
144
+
145
+ **iteration-close gate**: `mstar-iteration` §3.2 #5 — **each** new doc in the compound round must complete this phase; do not skip for lightweight captures.
146
+
147
+ ## Phase 7: Refresh trigger
148
+
149
+ After capturing, check if the new learning suggests an older doc may now be stale (contradicted, superseded, or in a refactored domain). If so, recommend:
150
+
151
+ ```
152
+ Consider: /pm compound-refresh <scope hint>
153
+ ```
154
+
155
+ Do not automatically run refresh — only flag when there's a concrete reason.
@@ -105,19 +105,14 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
105
105
 
106
106
  ## 反模式(派发)
107
107
 
108
+ 完整反模式索引见 **`mstar-harness-core`**;lease / worktree / Phase 相关反模式见 **`mstar-branch-worktree`** 与 **`mstar-iteration`**。本节仅列派发机制专属:
109
+
108
110
  - QC 三审拆在多条消息(tri 模式)或单席却未附 review-package 路径。
109
111
  - 仅 1 次 invoke 却声称「tri-review 已并行启动」(tri 模式 N=3)。
110
- - SDD 并行 implementer dispatch(**同一 plan 内**多 task)— **不同于**跨 plan lease 门控并行(后者见上节 L1)。
111
- - 跨 plan 可写派发无 verified `execution_lease`;steal / 覆盖活跃 `execution_lease` 或 `integration_merge_lease`;并行 integration merge。
112
- - 跨 plan **并行**可写派发在 **无** same-host 独占写锁(跨主机 / 无共享 flock)且 **无** 用户本轮 `Cross-host lease race: accepted` + audit `notes` — **无论** `Worktree mode: waived`。
113
- - 将 **`Worktree mode: waived`** 当作跨 plan 无锁并行授权(须 serial 或 race-accepted + audit)。
114
- - 因 feature worktree 在默认 gitignore 下看不到 `plans/` 而设 **`Worktree mode: waived`**(应保留 feature worktree + control 绝对 `Plan Path` / `SDD dir`)。
115
- - `InProgress` 无 `execution_lease` 未走 orphan recovery 即 writable-dispatch。
116
- - 同仓多轨 writable implement:**N invoke ≠ worktree 隔离**(L2)→ **`mstar-branch-worktree`** **`references/parallel-writable-pre-dispatch.md`**。
112
+ - SDD 并行 implementer dispatch(**同一 plan 内**多 task)— **不同于**跨 plan lease 门控并行(后者见上节 L1 / **`mstar-branch-worktree`**)。
117
113
  - 递归同角色 subagent;把 Handoff / 多轨编排措辞当 invoke。
118
114
  - Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
119
115
  - Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
120
- - 全部 plan `Done` 后跳过 Phase 3 直接 PR;final plan closure 替代 `mstar-iteration` §3.1–§3.5。
121
116
  - Assignment 已写、invoke 为零(paste-only)却进入下一 gate。
122
117
 
123
118
  ## References
@@ -0,0 +1,44 @@
1
+ # Host role-binding core (C5/C5b)
2
+
3
+ Shared role-binding contract for hosts that **cannot bind Morning Star roles via agent config** (Kimi, ZCode, omp). Cursor / OpenCode / Codex bind roles through agent config or `subagent_type` role ids and do **not** use this file. Read from the active host reference when dispatching.
4
+
5
+ ## C5 — built-in invoke types only
6
+
7
+ - The host ships **built-in subagent types only**; the active host reference's C5 mapping table is the authoritative type list.
8
+ - Morning Star role ids (`project-manager`, `fullstack-dev`, `qc-specialist`, …) are **not** valid invoke types on these hosts — never invent agent names.
9
+
10
+ ## C5b — role binding in prompt (required)
11
+
12
+ Because the host cannot bind roles via agent config, every dispatch **must** carry the played Morning Star role in the **Assignment** and in the **invoke prompt**:
13
+
14
+ 1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
15
+ 2. **`Act as <role-id>`** (or equivalent) at the top of the invoke prompt.
16
+ 3. **Skill load list** — instruct the subagent to read `mstar-roles` → `references/<role-id>.md` (or shared reference + parameters) and topic skills per that reference.
17
+ 4. **`subagent_type` / `agent`** — pick from the host's built-in types only (C5 table in the host reference).
18
+
19
+ Paste-only Assignment **without** an invoke call is **not** dispatch.
20
+
21
+ ## Invocation rules
22
+
23
+ - **1 Assignment ⇒ 1 invoke**: one invoke call carrying the full Assignment body per assignee.
24
+ - **Parallel batch N**: **N** invocations in **one** assistant message (mechanics → **`parallel-dispatch.md`**).
25
+ - **No invoke call** → **Not dispatched** — paste-only / `dispatch incomplete`.
26
+ - **Anti-recursion NEVER**: leaf executors are already `Execute as` — **no** recursive invoke of the same role; Assignment wins (`Delegation: forbidden` unless stated). **Never** multiple implementer invokes in one message for the same plan (SDD serial → **`parallel-dispatch.md`** § SDD implement).
27
+
28
+ ## Assignment / prompt template
29
+
30
+ ```markdown
31
+ ## Assignment
32
+
33
+ **Execute as**: fullstack-dev
34
+ **Delegation**: forbidden
35
+ **Working branch**: feat/example
36
+ **Plan Path**: .mstar/plans/20260717-example.md
37
+
38
+ **IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
39
+ Load: `mstar-harness-core` → `mstar-host` → `<host>.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
40
+
41
+ <task body>
42
+ ```
43
+
44
+ The active host reference shows the matching invoke shape (same turn).
@@ -0,0 +1,91 @@
1
+ # Plan-Mode Bridge Core (shared)
2
+
3
+ > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and the host reference + this bridge. When plan management is required, also read **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** before creating or claiming any durable plan state. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
4
+
5
+ Each per-host bridge (`cursor-plan-mode-bridge.md`, `codex-plan-goal-mode-bridge.md`, `kimi-plan-mode-bridge.md`, `zcode-plan-mode-bridge.md`, `omp-plan-mode-bridge.md`) loads this core and adds its host-specific plan UX (plan tooling, approval gate, todo UI, command surfaces).
6
+
7
+ ## Dual-write SSOT rule
8
+
9
+ The host **Plan mode** (session plan file, todos, UI) is a **session UX mirror**. Morning Star **SSOT** lives on disk under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`): the main plan in `{PLAN_DIR}/<plan-id>-<name>.md`, the plan registry in `{HARNESS_DIR}/status.json`, the iteration compass under `{ITERATION_DIR}/…` when in a formal iteration. Mirror every durable plan artifact to the repo; never treat the host plan file/URI/UI alone as the handoff surface.
10
+
11
+ ### Priority (hard)
12
+
13
+ 1. User explicit instructions (this turn)
14
+ 2. Project `AGENTS.md` / `CLAUDE.md`
15
+ 3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
16
+ 4. Host session plan / todos / UI (session UX mirror) — the host bridge names its surfaces
17
+
18
+ **NEVER** cite only a host plan path / session todo list / chat summary in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
19
+
20
+ ## Before the first plan (bootstrap init)
21
+
22
+ 1. **Read** (minimum): `mstar-plan-conventions`, `mstar-plan-artifacts` (SKILL.md); Prepare gates from `mstar-phase-gates` if not hotfix.
23
+ 2. **Discover** `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions` (prefer `.mstar/` + `.mstar/plans/`; reuse legacy `.agents/` only when already present and `.mstar/` is absent).
24
+ 3. **Initialize** if absent: `{HARNESS_DIR}/`, `{PLAN_DIR}/`, `status.json` from `mstar-plan-artifacts/templates/status.empty.json`, `archived/residuals/`, Morning Star process-artifact gitignore set (canonical snippet → `mstar-plan-conventions` SKILL.md「Git 跟踪策略」). Full PM checklist: `mstar-roles/references/project-manager/plan-management.md`.
25
+
26
+ ## Build resume contract
27
+
28
+ Host **Build** / plan approval resumes the current plan in Agent mode. Do **not** assume it replays `/pm` or re-enters a role skill automatically.
29
+
30
+ First action after Build, before product-code edits:
31
+
32
+ 1. Reload the harness entry: `mstar-harness-core` → `mstar-host` host reference → this bridge.
33
+ 2. If the plan is a Morning Star plan, resume as `project-manager` for coordination and dispatch only.
34
+ 3. Read the SSOT plan and `status.json`; use them as the source of truth over the host plan URI/UI.
35
+ 4. For each implement/code todo, require a PM Assignment with `Execute as`, `Delegation`, `Working branch` or `Branch policy`, and SSOT `Plan Path`.
36
+ 5. If the Assignment or SSOT state is missing, report **Blocked** and repair the harness state before implementation.
37
+
38
+ Allowed in the parent Build session: plan/status maintenance, routing decisions, Assignment writing, and host task dispatch.
39
+
40
+ Not allowed in the parent Build session by default: product implementation, test implementation, QC execution, QA execution, deployment, or ops changes. Those follow the normal PM dispatch rules unless the user explicitly overrides the harness.
41
+
42
+ ## CreatePlan: fixed bootstrap todos (prefix)
43
+
44
+ **Emit these three todos first**, in order, **before** any implement / code todos. Do **not** mark implement todos in progress until all three are **done**.
45
+
46
+ | Todo ID (use in title) | Goal | On-disk outcome |
47
+ |------------------------|------|-----------------|
48
+ | **`harness-init`** | Bootstrap harness tree | `{HARNESS_DIR}/`, `{PLAN_DIR}/`, process-artifact gitignore set, `archived/residuals/`, `status.json` initialized |
49
+ | **`spec-register`** | Register plan in SSOT | New `plans[]` row in `status.json` (`id`, `status`, `file`, `metadata`); spec stub in `{SPECS_DIR}` or plan frontmatter |
50
+ | **`mirror-plan`** | SSOT main plan file | `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes aligned to the host plan body |
51
+
52
+ After the host plan is created, keep the host plan body and mirror file **in sync** when scope changes (update both in the same coordination round).
53
+
54
+ ## Implement todo completion gate (every code todo)
55
+
56
+ **Before marking the todo done:**
57
+
58
+ 1. **Commit**: `git add` + `git commit` on the authorized **Working branch** for this **task id** (one commit per task unless PM explicitly allowed batched commits in Assignment).
59
+ 2. **Plan checkbox**: Set `- [x]` on the matching line in `{PLAN_DIR}/<plan-id>-<name>.md`.
60
+ 3. **status.json** (when PM round requires): bump `plans[].status` (e.g. `InProgress`) or append coordination notes per `mstar-plan-artifacts`.
61
+ 4. **Evidence**: Record real `git log -1 --oneline` in Completion Report **Git** (or the plan-mode status note if executing as PM in Plan mode).
62
+
63
+ **NEVER**
64
+
65
+ - Mark implement todos done without a commit when tracked files changed.
66
+ - Batch all work into one closing commit unless PM documented an exception.
67
+ - Mark plan-level `Done` in `status.json` without PM/QA authority and without recorded **`QA gate`** (`mandatory` fulfilled or `pm-acceptance` checklist per `qa-trigger-matrix.md`).
68
+
69
+ Dev-role NEVER rules also apply when executing as implementer: `mstar-roles/references/fullstack-dev-shared.md` (Git NEVER).
70
+
71
+ ## `mstar-iteration` Phase 1 in Plan mode (shared gate)
72
+
73
+ - **Single plan session**: use **one** plan file (host or SSOT draft); iterate the **same** file in place with feedback-driven edits. If a duplicate plan file was created by mistake: merge into the original, delete the duplicate.
74
+ - **Do not** run Review & Edit, commit, or create the integration branch until the user approves implementation (host approval gate: **Build** / **`ExitPlanMode`** / plan resolve). Plan mode ≠ executing todos — approval is the Phase 1 executable gate (Review chain, lock, branch).
75
+ - Prepare phase (`specify → clarify → plan`) still applies; the mirrored plan is the harness **`plan`** artifact, not a substitute for clarify.
76
+ - Branch policy in the plan session: write **recommended** `iteration_base_branch` / `target_branch` (+ short rationale) into the plan — do **not** silently default to `main`/`master`.
77
+ - Host plan approval is **not** Morning Star **Done**. Implementation still follows phase gates, per-task commits, QC, and QA per the SSOT plan.
78
+
79
+ ## Anti-patterns (shared)
80
+
81
+ | Anti-pattern | Fix |
82
+ |--------------|-----|
83
+ | Host plan only, no `{HARNESS_DIR}` files | Run bootstrap todos; write mirror plan + status.json |
84
+ | Todo done, no commit | Commit per task; paste `git log -1` evidence |
85
+ | Drift between host plan and SSOT plan | Update both in same round |
86
+ | Host plan URI as Plan Path | Use `{PLAN_DIR}/...` path |
87
+ | Skip `spec-register` | Add `plans[]` row before implement |
88
+ | Build starts coding in the parent session | Resume PM context; dispatch implement work or block on missing Assignment |
89
+ | Host plan approval treated as Done authority | Check harness plan/status/QC/QA gates first |
90
+ | Resume starts coding from host chat summary | Reload harness context and SSOT plan/status first |
91
+ | Phase 1 Plan mode: Review / commit / branch before Build | Keep Pre-Build document-only; execute those todos after approval |
@@ -1,6 +1,8 @@
1
1
  # Codex Plan / Goal Mode x Harness Bridge
2
2
 
3
- > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/codex.md`**. When plan management is required, also read **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** before creating or claiming any durable plan state. On conflict, **`mstar-harness-core`** wins.
3
+ > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/codex.md`**, then **`references/_shared/plan-mode-bridge-core.md`** (shared contract) + this bridge. When plan management is required, also read **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** before creating or claiming any durable plan state. On conflict, **`mstar-harness-core`** wins.
4
+
5
+ **Shared contract** (dual-write SSOT rule + priority, bootstrap init, Build resume contract, bootstrap todos, implement done-gate, Phase 1 gate, shared anti-patterns) → **`references/_shared/plan-mode-bridge-core.md`**. This bridge covers Codex **Plan Mode** (`/plan`) and **Goal Mode** (`/goal`) specifics only.
4
6
 
5
7
  ## Purpose
6
8
 
@@ -13,9 +15,8 @@ Morning Star durable state still lives under **`{HARNESS_DIR}`** (default `.msta
13
15
 
14
16
  ## Priority (hard)
15
17
 
16
- 1. User explicit instructions (this turn)
17
- 2. Project `AGENTS.md` / `CLAUDE.md`
18
- 3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
18
+ 1–3 core (user explicit `AGENTS.md`/`CLAUDE.md` → **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** harness SSOT).
19
+
19
20
  4. Codex Goal Mode objective / progress controls
20
21
  5. Codex Plan Mode output, `update_plan`, UI todos, chat summaries
21
22
 
@@ -31,13 +32,7 @@ Morning Star durable state still lives under **`{HARNESS_DIR}`** (default `.msta
31
32
 
32
33
  Use Plan Mode to clarify, inspect, compare approaches, and draft the harness plan. Do **not** treat Plan Mode output as a durable artifact.
33
34
 
34
- Before implementation or PM dispatch:
35
-
36
- 1. Discover `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions`.
37
- 2. Ensure `{HARNESS_DIR}/status.json` exists or initialize it via `mstar-plan-artifacts` templates.
38
- 3. Register a `plans[]` row in `status.json` when a Morning Star plan is needed.
39
- 4. Write `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes, branch policy, verification, and roadmap / deferred scope when applicable.
40
- 5. Use the SSOT plan path in Assignment and Completion Report evidence.
35
+ Bootstrap before implementation or PM dispatch (discover `{HARNESS_DIR}` / `{PLAN_DIR}`, ensure `status.json`, register a `plans[]` row, write `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes + roadmap; use the SSOT plan path in Assignment and Completion Report evidence) → core.
41
36
 
42
37
  Allowed in Plan Mode: exploration, clarify questions, spec/plan drafting, `.mstar/` initialization, SSOT plan/status edits, PM routing decisions.
43
38
 
@@ -38,7 +38,7 @@ Use skill names in prompts and references. Avoid absolute local paths unless the
38
38
  - **No invoke tool / no linked custom agent = no dispatch**: printing `## Assignment` does not start another Codex worker.
39
39
  - If Codex exposes custom-agent / multi-agent tools and matching Morning Star agents are linked, PM may dispatch through those tools and must follow `parallel-dispatch.md`.
40
40
  - If no invoke tool is present when dispatch is required, return **`Blocked`** — report missing invoke capability to the user. Do not substitute single-session role execution in the PM thread unless the user explicitly overrides harness dispatch for this turn.
41
- - QC: **`Execution mode: sdd`** → **N=3** tri-review; **`inline`** → **N=1**. Cannot emit required **N** → **`Blocked`**.
41
+ - QC: N rules → **`parallel-dispatch.md`** (**`Execution mode: sdd`** → N=3; **`inline`** → N=1) when a callable invoke tool exists. Cannot emit required **N** → **`Blocked`**.
42
42
  - Leaf executors still follow `mstar-dispatch-gates`: no recursive Task/subagent calls unless Assignment says `Delegation: allowed (...)`.
43
43
 
44
44
  ## Files, shell, and approvals
@@ -1,19 +1,8 @@
1
1
  # Cursor Plan Mode × Harness Dual-Write Bridge
2
2
 
3
- > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** before the first **CreatePlan** in Plan mode. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
3
+ > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/cursor.md`**, then **`references/_shared/plan-mode-bridge-core.md`** (shared contract) + this bridge. When plan management is required, also read **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** before the first **CreatePlan** in Plan mode. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
4
4
 
5
- ## Purpose
6
-
7
- Cursor **Plan mode** uses **CreatePlan** and built-in plan todos for session UX. Morning Star **SSOT** lives on disk under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`). This reference defines **dual-write**: mirror every durable plan artifact to the repo; never treat the Cursor plan URI alone as the handoff surface.
8
-
9
- ## Priority (hard)
10
-
11
- 1. User explicit instructions (this turn)
12
- 2. Project `AGENTS.md` / `CLAUDE.md`
13
- 3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
14
- 4. Cursor CreatePlan body and plan todos (session UX mirror)
15
-
16
- **NEVER** cite only a Cursor plan file path in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
5
+ **Shared contract** (dual-write SSOT rule + priority, bootstrap init, Build resume contract, bootstrap todos, implement done-gate, Phase 1 gate, shared anti-patterns) → **`references/_shared/plan-mode-bridge-core.md`**. This bridge covers Cursor **CreatePlan** / **SwitchMode** / Plan-mode specifics only.
17
6
 
18
7
  ## When this applies
19
8
 
@@ -24,31 +13,11 @@ Cursor **Plan mode** uses **CreatePlan** and built-in plan todos for session UX.
24
13
 
25
14
  1. **Read** (minimum): `mstar-plan-conventions`, `mstar-plan-artifacts` (SKILL.md); Prepare gates from `mstar-phase-gates` if not hotfix.
26
15
  2. **Discover** `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions` (prefer `.mstar/` + `.mstar/plans/`; reuse legacy `.agents/` only when already present and `.mstar/` is absent).
27
- 3. **Initialize** if absent (see checklist below).
28
-
29
- ### Harness initialization checklist
30
-
31
- When plan management is required and directories are missing:
16
+ 3. **Initialize** if absent checklist in core; full PM checklist (incl. process-artifact gitignore set): `mstar-roles/references/project-manager/plan-management.md` (canonical gitignore snippet → `mstar-plan-conventions` SKILL.md「Git 跟踪策略」).
32
17
 
33
- 1. Create `{HARNESS_DIR}` and `{PLAN_DIR}`.
34
- 2. Ensure Morning Star **process-artifact** gitignore set is present (canonical snippet → `mstar-plan-conventions` SKILL.md「Git 跟踪策略」): `{HARNESS_DIR}/archived/`, `iterations/`, `plans/`, `sdd/`, `notes.json`, `status.json` (legacy `.agents/` equivalents when applicable). Per-plan review bundles are created under `{SDD_DIR}/review/` when needed.
35
- 3. Create `{HARNESS_DIR}/archived/residuals/`.
36
- 4. Initialize `{HARNESS_DIR}/status.json` from `mstar-plan-artifacts/templates/status.empty.json` if missing.
37
- 5. Optional: `{HARNESS_DIR}/notes.json` from `templates/notes.empty.json`, `{HARNESS_DIR}/knowledge/README.md`.
18
+ ## CreatePlan specifics
38
19
 
39
- Reuse legacy `.plans/` or `plans/` only when already present; do not duplicate structures.
40
-
41
- Full PM checklist: `mstar-roles/references/project-manager/plan-management.md`.
42
-
43
- ## CreatePlan: fixed bootstrap todos (prefix)
44
-
45
- **Emit these three todos first**, in order, **before** any implement / code todos. Do **not** mark implement todos in progress until all three are **done**.
46
-
47
- | Todo ID (use in title) | Goal | On-disk outcome |
48
- |------------------------|------|-----------------|
49
- | **`harness-init`** | Bootstrap harness tree | `{HARNESS_DIR}/`, `{PLAN_DIR}/`, process-artifact gitignore set, `archived/residuals/`, `status.json` initialized |
50
- | **`spec-register`** | Register plan in SSOT | New `plans[]` row in `status.json` (`id`, `status`, `file`, `metadata`); spec stub in `{SPECS_DIR}` or plan frontmatter |
51
- | **`mirror-plan`** | SSOT main plan file | `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes aligned to CreatePlan body |
20
+ Bootstrap todos `harness-init` / `spec-register` / `mirror-plan` (emit first, in order, before any implement todos) → core.
52
21
 
53
22
  ### `spec-register` minimum fields
54
23
 
@@ -77,7 +46,7 @@ Set `updated_at` on `status.json` to today (`YYYY-MM-DD`). Commit **tracked resu
77
46
 
78
47
  After **CreatePlan**, keep CreatePlan body and mirror file **in sync** when scope changes (update both in the same coordination round).
79
48
 
80
- ## CreatePlan body template (copyable)
49
+ ### CreatePlan body template (copyable)
81
50
 
82
51
  Use this structure in CreatePlan `plan` markdown; mirror the same sections into `{PLAN_DIR}/<plan-id>-<name>.md`.
83
52
 
@@ -128,22 +97,7 @@ Use this structure in CreatePlan `plan` markdown; mirror the same sections into
128
97
 
129
98
  ## Implement todo completion gate (every code todo)
130
99
 
131
- Embed this checklist **inside each implement todo description** in CreatePlan (and mirror the same text on the matching checkbox line in the SSOT plan file).
132
-
133
- **Before marking the todo done:**
134
-
135
- 1. **Commit**: `git add` + `git commit` on the authorized **Working branch** for this **task id** (one commit per task unless PM explicitly allowed batched commits in Assignment).
136
- 2. **Plan checkbox**: Set `- [x]` on the matching line in `{PLAN_DIR}/<plan-id>-<name>.md`.
137
- 3. **status.json** (when PM round requires): bump `plans[].status` (e.g. `InProgress`) or append coordination notes per `mstar-plan-artifacts`.
138
- 4. **Evidence**: Record real `git log -1 --oneline` in Completion Report v2 **Git** (or Plan-mode status note if executing as PM in Plan mode).
139
-
140
- **NEVER**
141
-
142
- - Mark implement todos done without a commit when tracked files changed.
143
- - Batch all work into one closing commit unless PM documented an exception.
144
- - Mark plan-level `Done` in `status.json` without PM/QA authority and without recorded **`QA gate`** (`mandatory` fulfilled or `pm-acceptance` checklist per `qa-trigger-matrix.md`).
145
-
146
- Dev-role NEVER rules also apply when executing as implementer: `mstar-roles/references/fullstack-dev-shared.md` (Git NEVER).
100
+ Commit SSOT checkbox `status.json` sync `git log -1 --oneline` evidence; NEVER list core. Dev-role NEVER rules also apply when executing as implementer: `mstar-roles/references/fullstack-dev-shared.md` (Git NEVER).
147
101
 
148
102
  ## SwitchMode → Agent (pre-flight)
149
103
 
@@ -160,19 +114,7 @@ If any item fails → **Blocked**; finish harness sync before implement.
160
114
 
161
115
  ## Build resume contract
162
116
 
163
- Cursor **Build** resumes the current plan in Agent mode. Do not assume it replays `/pm` or re-enters a role skill automatically.
164
-
165
- First action after Build, before product-code edits:
166
-
167
- 1. Reload the harness entry: `mstar-harness-core` → `mstar-host` Cursor reference → this bridge.
168
- 2. If the plan is a Morning Star plan, resume as `project-manager` for coordination and dispatch only.
169
- 3. Read the SSOT plan and `status.json`; use them as the source of truth over the Cursor plan URI.
170
- 4. For each implement/code todo, require a PM Assignment with `Execute as`, `Delegation`, `Working branch` or `Branch policy`, and SSOT `Plan Path`.
171
- 5. If the Assignment or SSOT state is missing, report **Blocked** and repair the harness state before implementation.
172
-
173
- Allowed in the parent Build session: plan/status maintenance, routing decisions, Assignment writing, and host Task dispatch.
174
-
175
- Not allowed in the parent Build session by default: product implementation, test implementation, QC execution, QA execution, deployment, or ops changes. Those follow the normal PM dispatch rules unless the user explicitly overrides the harness.
117
+ → core. Cursor delta: **Build** resumes the current plan in Agent mode; do not assume it replays `/pm` or re-enters a role skill automatically.
176
118
 
177
119
  ## PM in Plan mode (`/pm`)
178
120
 
@@ -197,28 +139,17 @@ When starting a **new iteration** under Cursor Plan mode (host command may orche
197
139
 
198
140
  **Single CreatePlan URI (HARD)**: one CreatePlan per Phase 1 Plan session. Updates use file edit tools on that path. If a duplicate plan file was created by mistake: merge into the original, delete the duplicate, keep View Plan on the original.
199
141
 
200
- **Plan mode ≠ executing todos.** Build = Phase 1 executable gate (Review chain, lock, branch).
201
-
202
- **Branch policy in Plan session**: write **recommended** `iteration_base_branch` / `target_branch` (+ short rationale) into the plan — do **not** silently default to `main`/`master`. User may correct via feedback; ask only after feedback-close if still TBD/conflicting.
203
-
204
142
  **Bootstrap relationship**: ordinary per-plan work still uses `harness-init` / `spec-register` / `mirror-plan`. Phase 1 CreatePlan uses Phase 1 todos (`harness-init` → `finalize-compass-plans` → review-edit seats → `pm-lock` → `integration-branch`). Business `plans[]` rows should exist as drafts before Build when direction has converged.
205
143
 
206
144
  **Helpers**: third-party interview helpers are **not** named here; host **command** layer may use them only after feedback-close when gaps remain.
207
145
 
208
- ## Anti-patterns
146
+ ## Anti-patterns (Cursor-specific)
209
147
 
210
148
  | Anti-pattern | Fix |
211
149
  |--------------|-----|
212
- | CreatePlan only, no `{HARNESS_DIR}` files | Run bootstrap todos; Write mirror plan + status.json |
213
- | Todo done, no commit | Commit per task; paste `git log -1` evidence |
214
- | Drift between CreatePlan and SSOT plan | Update both in same round |
215
- | Cursor plan URI as Plan Path | Use `{PLAN_DIR}/...` path |
216
- | Skip `spec-register` | Add `plans[]` row before implement |
217
- | Build starts coding in the parent session | Resume PM context; dispatch implement work or block on missing Assignment |
218
150
  | Follow-up only in chat / no roadmap section | Add `Roadmap / deferred scope` to CreatePlan and SSOT plan before implement |
219
151
  | Phase 1 Plan mode: second CreatePlan / stale open plan | Edit the original plan file only; merge+delete duplicates |
220
152
  | Phase 1 Plan mode: interview loop before feedback-close | Feedback-driven autonomous plan updates; deferred interview only after close signal if gaps remain |
221
- | Phase 1 Plan mode: Review / commit / branch before Build | Keep Pre-Build document-only; execute those todos after Build |
222
153
 
223
154
  ## Related skills
224
155
 
@@ -42,7 +42,7 @@ Enforcement: `rules/mstar-cursor-plan-mode.mdc` when plugin active.
42
42
 
43
43
  ## Task tool (QC: SDD → N=3)
44
44
 
45
- - **`Execution mode: sdd`**: **N=3** Tasks (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) + branch review-package path.
45
+ - **`Execution mode: sdd`**: **N=3** Tasks (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) + branch review-package path (N rules → `parallel-dispatch.md`).
46
46
  - **`inline`**: **N=1** per `parallel-dispatch.md`.
47
47
  - SDD implement/reviewer: **serial** — see **`mstar-sdd`**.
48
48
 
@@ -66,8 +66,8 @@ When Assignment has **`SDD implementer session: sticky`** (`mstar-sdd/references
66
66
 
67
67
  Cursor PM dispatch = **`Task`** with `subagent_type` matching the Assignment `Execute as` role. Flat JSON field shape → **Task invoke schema (Cursor)** below.
68
68
 
69
- - **1 Assignment ⇒ 1 Task**; parallel batches ⇒ **N Tasks in one message** (`parallel-dispatch.md`, `mstar-dispatch-gates`).
70
- - Assignment Markdown **does not** start work. PM thread **must not** implement, review, or edit specialist deliverables by loading another role reference in the same session (`Acting as role: …` is **not** dispatch).
69
+ - **1 Assignment ⇒ 1 Task**; parallel batches ⇒ **N Tasks in one message** → **`parallel-dispatch.md`** (`mstar-dispatch-gates`).
70
+ - Paste-only: Assignment Markdown **does not** start work; PM thread **must not** implement, review, or edit specialist deliverables by loading another role reference in the same session (`Acting as role: …` is **not** dispatch) → **`parallel-dispatch.md`** § Paste-only failure.
71
71
  - No callable `Task` / subagent for required work → **`Blocked`** — report to user; do not substitute in-thread execution.
72
72
  - **Only exception:** user explicitly overrides harness dispatch for this turn (document the override).
73
73
  - Concurrent writers / QC cwd alignment → **`mstar-branch-worktree`** (not a separate “mode”).
@@ -1,31 +1,16 @@
1
1
  # Kimi Plan Mode × Harness Dual-Write Bridge
2
2
 
3
- > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** when Plan mode is active. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
3
+ > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/kimi.md`**, then **`references/_shared/plan-mode-bridge-core.md`** (shared contract) + this bridge. When Plan mode is active, also read **`mstar-plan-conventions`** and **`mstar-plan-artifacts`**. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
4
4
 
5
- ## Purpose
5
+ **Shared contract** (dual-write SSOT rule + priority, bootstrap init, Build resume contract, bootstrap todos, implement done-gate, Phase 1 gate, shared anti-patterns) → **`references/_shared/plan-mode-bridge-core.md`**. This bridge covers Kimi plan-UX specifics only.
6
6
 
7
- Kimi **Plan mode** (`EnterPlanMode` / `ExitPlanMode`, `/plan`, or `Shift-Tab`) uses a session plan file and read-only exploration for design. Morning Star **SSOT** lives on disk under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`). This reference defines **dual-write**: mirror durable plan artifacts to the repo; never treat the Kimi session plan file alone as the handoff surface.
8
-
9
- ## Priority (hard)
10
-
11
- 1. User explicit instructions (this turn)
12
- 2. Project `AGENTS.md` / `CLAUDE.md`
13
- 3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
14
- 4. Kimi plan file and `TodoList` UI (session UX mirror)
15
-
16
- **NEVER** cite only a Kimi plan file path in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
7
+ Kimi **Plan mode** (`EnterPlanMode` / `ExitPlanMode`, `/plan`, or `Shift-Tab`) uses a session plan file and read-only exploration for design; the session plan file is a **session UX mirror** **NEVER** cite only a Kimi plan file path in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
17
8
 
18
9
  ## When this applies
19
10
 
20
11
  - Kimi **Plan mode** is active (`EnterPlanMode` succeeded, `/plan on`, or `kimi --plan`).
21
12
  - Morning Star plugin is installed (`.kimi-plugin/plugin.json` skills loaded) or **`/skill:pm`** / **`pm` skill** is in use.
22
13
 
23
- ## Before entering Plan mode
24
-
25
- 1. **Read** (minimum): `mstar-plan-conventions`, `mstar-plan-artifacts` (SKILL.md); Prepare gates from `mstar-phase-gates` if not hotfix.
26
- 2. **Discover** `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions`.
27
- 3. **Initialize** if absent: `{HARNESS_DIR}/`, `{PLAN_DIR}/`, `status.json` from `mstar-plan-artifacts/templates/status.empty.json`, `archived/residuals/`, Morning Star process-artifact gitignore set (see `mstar-plan-conventions` SKILL.md「Git 跟踪策略」).
28
-
29
14
  ## Plan mode workflow (dual-write)
30
15
 
31
16
  | Step | Kimi session | Harness SSOT |
@@ -40,15 +25,11 @@ Kimi **Plan mode** (`EnterPlanMode` / `ExitPlanMode`, `/plan`, or `Shift-Tab`) u
40
25
 
41
26
  ## ExitPlanMode gate
42
27
 
43
- Do **not** treat ExitPlanMode approval as Morning Star **Done**. Implementation still follows phase gates, per-task commits, QC, and QA per the SSOT plan.
28
+ Host plan approval (`ExitPlanMode`) is **not** Morning Star **Done** (gate → core). Implementation still follows phase gates, per-task commits, QC, and QA per the SSOT plan.
44
29
 
45
30
  ## `mstar-iteration` Phase 1
46
31
 
47
- When iteration Phase 1 runs in Plan mode:
48
-
49
- - Use **one** plan session; iterate the **same** Kimi plan file and SSOT mirror in place (feedback-driven edits).
50
- - Do **not** run Review & Edit, commit integration branch, or dispatch implementers until the user approves via `ExitPlanMode` (or explicit go-ahead after plan lock).
51
- - After approval: reload `mstar-harness-core` + `kimi.md`; resume as `project-manager` orchestration.
32
+ When iteration Phase 1 runs in Plan mode, the shared gate (single plan session, feedback-driven in-place edits, no Review & Edit / commit / integration branch until approval) → core. After approval: reload `mstar-harness-core` + **`kimi.md`**; resume as `project-manager` orchestration.
52
33
 
53
34
  ## Enforcement
54
35