@mstar-harness/opencode 1.7.1 → 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.
- package/CHANGELOG.md +16 -0
- package/harness-commands/codebase-audit.md +34 -0
- package/harness-commands/iteration-drive.md +17 -159
- package/harness-commands/iteration-loop.md +16 -194
- package/harness-commands/iteration-start.md +17 -183
- package/harness-skills/mstar-audit/SKILL.md +181 -0
- package/harness-skills/mstar-audit/references/audit-playbook.md +130 -0
- package/harness-skills/mstar-audit/references/finding-format.md +65 -0
- package/harness-skills/mstar-branch-worktree/SKILL.md +38 -27
- package/harness-skills/mstar-coding-behavior/SKILL.md +40 -114
- package/harness-skills/mstar-compound/SKILL.md +25 -197
- package/harness-skills/mstar-compound/references/compound-workflow.md +155 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +3 -8
- package/harness-skills/mstar-harness-core/SKILL.md +3 -1
- package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +44 -0
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
- package/harness-skills/mstar-host/references/codex-plan-goal-mode-bridge.md +6 -11
- package/harness-skills/mstar-host/references/codex.md +1 -1
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +9 -78
- package/harness-skills/mstar-host/references/cursor.md +3 -3
- package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +5 -24
- package/harness-skills/mstar-host/references/kimi.md +5 -32
- package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +3 -13
- package/harness-skills/mstar-host/references/omp.md +5 -32
- package/harness-skills/mstar-host/references/opencode.md +1 -3
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +5 -24
- package/harness-skills/mstar-host/references/zcode.md +5 -32
- package/harness-skills/mstar-iteration/SKILL.md +21 -211
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +95 -0
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +81 -0
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +2 -2
- package/harness-skills/mstar-plan-artifacts/references/plan-quality-bar.md +99 -0
- package/harness-skills/mstar-roles/SKILL.md +1 -1
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +46 -0
- package/harness-skills/mstar-roles/references/architect.md +3 -23
- package/harness-skills/mstar-roles/references/frontend-dev.md +4 -24
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +4 -24
- package/harness-skills/mstar-roles/references/ops-engineer.md +3 -23
- package/harness-skills/mstar-roles/references/product-manager.md +3 -23
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +5 -5
- package/harness-skills/mstar-roles/references/project-manager.md +4 -13
- package/harness-skills/mstar-roles/references/prompt-engineer.md +4 -23
- package/harness-skills/mstar-roles/references/qa-engineer.md +3 -22
- package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +16 -75
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +4 -17
- package/harness-skills/mstar-roles/references/writing-specialist.md +4 -24
- package/harness-skills/mstar-sdd/SKILL.md +1 -0
- package/harness-skills/pm/SKILL.md +2 -0
- package/package.json +1 -1
|
@@ -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
|
|
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
|
|
17
|
-
|
|
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
|
-
|
|
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`** →
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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**
|
|
70
|
-
- Assignment Markdown **does not** start work
|
|
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-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
|
@@ -59,32 +59,7 @@ Morning Star role ids (`project-manager`, `fullstack-dev`, `qc-specialist`, …)
|
|
|
59
59
|
|
|
60
60
|
### Role binding in prompt (C5b — required)
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
|
|
65
|
-
2. **`Act as <role-id>`** (or equivalent) at the top of the Agent prompt.
|
|
66
|
-
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.
|
|
67
|
-
4. **`subagent_type`** — pick from the mapping table above only.
|
|
68
|
-
|
|
69
|
-
Paste-only Assignment without an **`Agent`** call is **not** dispatch.
|
|
70
|
-
|
|
71
|
-
### Assignment / Agent-prompt template
|
|
72
|
-
|
|
73
|
-
```markdown
|
|
74
|
-
## Assignment
|
|
75
|
-
|
|
76
|
-
**Execute as**: fullstack-dev
|
|
77
|
-
**Delegation**: forbidden
|
|
78
|
-
**Working branch**: feat/example
|
|
79
|
-
**Plan Path**: .mstar/plans/20260717-example.md
|
|
80
|
-
|
|
81
|
-
**IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
|
|
82
|
-
Load: `mstar-harness-core` → `mstar-host` → `kimi.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
|
|
83
|
-
|
|
84
|
-
<task body>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
PM dispatch invocation (same turn):
|
|
62
|
+
Role-binding contract + Assignment template → **`_shared/host-role-binding-core.md`** (C5/C5b). Kimi-specific invoke shapes, same turn:
|
|
88
63
|
|
|
89
64
|
```text
|
|
90
65
|
Agent(
|
|
@@ -107,26 +82,24 @@ Agent(subagent_type: "plan", prompt: "... Act as architect for plan design; load
|
|
|
107
82
|
|
|
108
83
|
## PM dispatch (`Agent` / `AgentSwarm`)
|
|
109
84
|
|
|
110
|
-
Harness **dispatch** on Kimi = **one or more `Agent` tool calls** with correct **`subagent_type`** and role-bound prompts.
|
|
85
|
+
Harness **dispatch** on Kimi = **one or more `Agent` tool calls** with correct **`subagent_type`** and role-bound prompts (C5b → **`_shared/host-role-binding-core.md`**). N-parallel / 1-Assignment-1-invoke / paste-only mechanics → **`parallel-dispatch.md`**.
|
|
111
86
|
|
|
112
87
|
| Harness | Kimi |
|
|
113
88
|
|---------|------|
|
|
114
|
-
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **Agent** prompt |
|
|
89
|
+
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **Agent** prompt (C5b) |
|
|
115
90
|
| `subagent_type` for invoke | `coder` \| `explore` \| `plan` only (see mapping) |
|
|
116
|
-
| 1 Assignment ⇒ 1 invoke | **1 `Agent`** call with full Assignment prompt |
|
|
117
91
|
| Parallel batch **N** | **N `Agent`** calls in **one assistant message** when roles may differ; **`AgentSwarm`** only when same role/profile |
|
|
118
|
-
| No `Agent` call | **Not dispatched** — paste-only / `dispatch incomplete` |
|
|
119
92
|
|
|
120
93
|
### QC default
|
|
121
94
|
|
|
122
|
-
- **`Execution mode: sdd`**: **N=3** `Agent` calls (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each prompt **Act as** the respective QC role, all `subagent_type: "coder"
|
|
95
|
+
- **`Execution mode: sdd`**: **N=3** `Agent` calls (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each prompt **Act as** the respective QC role, all `subagent_type: "coder"` (N rules → `parallel-dispatch.md`).
|
|
123
96
|
- **`inline`**: **N=1** per `parallel-dispatch.md`.
|
|
124
97
|
|
|
125
98
|
Cannot emit required **N** → **`Blocked`**.
|
|
126
99
|
|
|
127
100
|
### SDD implement (serial)
|
|
128
101
|
|
|
129
|
-
- **`Execution mode: sdd`**: one implementer **`Agent`** per task id; task reviewer = new **`Agent`** (no sticky resume unless host adds it later).
|
|
102
|
+
- **`Execution mode: sdd`**: one implementer **`Agent`** per task id; task reviewer = new **`Agent`** (no sticky resume unless host adds it later). Serial rule → **`parallel-dispatch.md`** § SDD implement.
|
|
130
103
|
- **Never** multiple implementer Agents in one message for the same plan.
|
|
131
104
|
|
|
132
105
|
## Clarify
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# omp Plan mode bridge
|
|
2
2
|
|
|
3
|
-
Load with **`omp.md`** when omp Plan mode is active (`/plan`, plan-yolo / plan-model flows, or read-only-with-resolve plan UX).
|
|
3
|
+
Load with **`omp.md`** when omp Plan mode is active (`/plan`, plan-yolo / plan-model flows, or read-only-with-resolve plan UX). Shared contract → **`references/_shared/plan-mode-bridge-core.md`** (dual-write SSOT rule + priority, bootstrap init, Build resume contract, bootstrap todos, implement done-gate, Phase 1 gate, shared anti-patterns). This bridge covers omp plan-UX specifics only.
|
|
4
4
|
|
|
5
5
|
## Dual-write contract
|
|
6
6
|
|
|
@@ -12,23 +12,13 @@ omp session plans, composer todos, and plan-mode UI text are **session UX only**
|
|
|
12
12
|
| Plan registry | `{HARNESS_DIR}/status.json` |
|
|
13
13
|
| Iteration compass | `{ITERATION_DIR}/…` when in formal iteration |
|
|
14
14
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
1. Read `mstar-plan-conventions` + `mstar-plan-artifacts`.
|
|
18
|
-
2. Ensure `{HARNESS_DIR}` / `{PLAN_DIR}` exist and process-artifact gitignore entries are present.
|
|
19
|
-
3. Mirror the active omp plan content into the SSOT main plan path.
|
|
20
|
-
4. Register `plan_id` in `status.json.plans[]` when required by Prepare gates.
|
|
15
|
+
Bootstrap before treating a plan as ready for Execute (read `mstar-plan-conventions` + `mstar-plan-artifacts`; ensure `{HARNESS_DIR}` / `{PLAN_DIR}` exist with process-artifact gitignore entries; mirror the active omp plan into the SSOT main plan path; register `plan_id` in `status.json.plans[]` when required by Prepare gates) → core.
|
|
21
16
|
|
|
22
17
|
**Never** use only the omp session plan / UI todo list as **Plan Path**.
|
|
23
18
|
|
|
24
19
|
## `mstar-iteration` Phase 1 in Plan mode
|
|
25
20
|
|
|
26
|
-
When formal iteration Phase 1 runs under omp Plan UX:
|
|
27
|
-
|
|
28
|
-
1. Keep a **single** SSOT draft plan path (no silent second plan file).
|
|
29
|
-
2. Converge by **feedback-driven in-place edits** on that SSOT plan (and mirror into omp plan UI if helpful).
|
|
30
|
-
3. **Do not** run Review & Edit chain, commit, or create integration branch until the user leaves Plan mode / approves implementation (Build-equivalent).
|
|
31
|
-
4. Recommended branch policy still applies — no silent work on `main`/`master` (`mstar-iteration` §1.2).
|
|
21
|
+
When formal iteration Phase 1 runs under omp Plan UX, the shared gate → core: single SSOT draft plan path (no silent second plan file); feedback-driven in-place edits; **do not** run Review & Edit chain, commit, or create integration branch until the user leaves Plan mode / approves implementation (Build-equivalent). Recommended branch policy still applies — no silent work on `main`/`master` (`mstar-iteration` §1.2).
|
|
32
22
|
|
|
33
23
|
## Clarify vs plan approval
|
|
34
24
|
|
|
@@ -81,32 +81,7 @@ Morning Star role ids (`project-manager`, `fullstack-dev`, `qc-specialist`, …)
|
|
|
81
81
|
|
|
82
82
|
### Role binding in prompt (C5b — required)
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
|
|
87
|
-
2. **`Act as <role-id>`** (or equivalent) at the top of the task body.
|
|
88
|
-
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.
|
|
89
|
-
4. **`agent`** — pick from the live built-in list only (default **`task`**; explore → `scout`/`explore`).
|
|
90
|
-
|
|
91
|
-
Paste-only Assignment without a **`task`** call is **not** dispatch.
|
|
92
|
-
|
|
93
|
-
### Assignment / task-body template
|
|
94
|
-
|
|
95
|
-
```markdown
|
|
96
|
-
## Assignment
|
|
97
|
-
|
|
98
|
-
**Execute as**: fullstack-dev
|
|
99
|
-
**Delegation**: forbidden
|
|
100
|
-
**Working branch**: feat/example
|
|
101
|
-
**Plan Path**: .mstar/plans/20260717-example.md
|
|
102
|
-
|
|
103
|
-
**IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
|
|
104
|
-
Load: `mstar-harness-core` → `mstar-host` → `omp.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
|
|
105
|
-
|
|
106
|
-
<task body>
|
|
107
|
-
```
|
|
108
|
-
|
|
109
|
-
PM dispatch invocation (same turn):
|
|
84
|
+
Role-binding contract + Assignment template → **`_shared/host-role-binding-core.md`** (C5/C5b). omp-specific invoke shapes, same turn:
|
|
110
85
|
|
|
111
86
|
```text
|
|
112
87
|
task(
|
|
@@ -133,26 +108,24 @@ task(
|
|
|
133
108
|
|
|
134
109
|
## PM dispatch (`task`)
|
|
135
110
|
|
|
136
|
-
Harness **dispatch** on omp = **one or more `task` tool calls** with correct **`agent`** values and role-bound assignment text.
|
|
111
|
+
Harness **dispatch** on omp = **one or more `task` tool calls** with correct **`agent`** values and role-bound assignment text (C5b → **`_shared/host-role-binding-core.md`**). N-parallel / 1-Assignment-1-invoke / paste-only mechanics → **`parallel-dispatch.md`**.
|
|
137
112
|
|
|
138
113
|
| Harness | omp |
|
|
139
114
|
|---------|-----|
|
|
140
|
-
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **task** body |
|
|
115
|
+
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **task** body (C5b) |
|
|
141
116
|
| `agent` for invoke | built-ins only (default `task`; explore → `scout`/`explore`) |
|
|
142
|
-
| 1 Assignment ⇒ 1 invoke | **1** `tasks[]` entry (or 1 `task` call) with full Assignment body |
|
|
143
117
|
| Parallel batch **N** | **N** `tasks[]` entries in **one** `task` call, or **N** `task` calls in **one** assistant message |
|
|
144
|
-
| No `task` call | **Not dispatched** — paste-only / `dispatch incomplete` |
|
|
145
118
|
|
|
146
119
|
### QC default
|
|
147
120
|
|
|
148
|
-
- **`Execution mode: sdd`**: **N=3** task entries (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each body **Act as** the respective QC role; prefer `agent: "task"` (or `reviewer` only when it does not drop Morning Star QC skill load).
|
|
121
|
+
- **`Execution mode: sdd`**: **N=3** task entries (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each body **Act as** the respective QC role; prefer `agent: "task"` (or `reviewer` only when it does not drop Morning Star QC skill load). N rules → `parallel-dispatch.md`.
|
|
149
122
|
- **`inline`**: **N=1** per `parallel-dispatch.md`.
|
|
150
123
|
|
|
151
124
|
Cannot emit required **N** → **`Blocked`**.
|
|
152
125
|
|
|
153
126
|
### SDD implement (serial)
|
|
154
127
|
|
|
155
|
-
- **`Execution mode: sdd`**: one implementer `task` entry per task id; task reviewer = new entry (no sticky resume unless host resume/id is available and recorded).
|
|
128
|
+
- **`Execution mode: sdd`**: one implementer `task` entry per task id; task reviewer = new entry (no sticky resume unless host resume/id is available and recorded). Serial rule → **`parallel-dispatch.md`** § SDD implement.
|
|
156
129
|
- **Never** multiple implementer entries in one message for the same plan.
|
|
157
130
|
|
|
158
131
|
## Clarify
|
|
@@ -20,14 +20,12 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
|
|
|
20
20
|
|
|
21
21
|
## PM dispatch (task tool + subagent)
|
|
22
22
|
|
|
23
|
-
Harness **dispatch** on OpenCode = **one or more `task` tool calls**, each with **`subagent: <agent-id>`** (read the tool schema every session).
|
|
23
|
+
Harness **dispatch** on OpenCode = **one or more `task` tool calls**, each with **`subagent: <agent-id>`** (read the tool schema every session). N-parallel / 1-Assignment-1-invoke / paste-only mechanics → **`parallel-dispatch.md`**.
|
|
24
24
|
|
|
25
25
|
| Harness | OpenCode |
|
|
26
26
|
|---------|----------|
|
|
27
27
|
| `Execute as: <role-id>` | **`subagent`** on **task tool** = same agent id |
|
|
28
|
-
| 1 Assignment ⇒ 1 invoke | **1 task tool** call with matching **subagent** + prompt from Assignment |
|
|
29
28
|
| Parallel batch **N** | **N task tool** calls in **one assistant message** when the host allows (`parallel-dispatch.md`) |
|
|
30
|
-
| No task tool call | **Not dispatched** — paste-only / `dispatch incomplete` |
|
|
31
29
|
|
|
32
30
|
PM workflow: finalize Assignment → **call task tool** with **subagent** + generated prompt → wait for subagent Completion Report → update plan / status.
|
|
33
31
|
|
|
@@ -1,31 +1,16 @@
|
|
|
1
1
|
# ZCode Plan Mode × Harness Dual-Write Bridge
|
|
2
2
|
|
|
3
|
-
> **Load order**: Read **`mstar-harness-core`** first, then **`mstar-
|
|
3
|
+
> **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/zcode.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
|
-
|
|
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 ZCode plan-UX specifics only.
|
|
6
6
|
|
|
7
|
-
ZCode **Plan mode** (`EnterPlanMode` / `ExitPlanMode`) uses read-only exploration for design and a plan approval gate before implementation
|
|
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. ZCode `TodoWrite` UI (session UX mirror)
|
|
15
|
-
|
|
16
|
-
**NEVER** cite only a session todo list path in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
|
|
7
|
+
ZCode **Plan mode** (`EnterPlanMode` / `ExitPlanMode`) uses read-only exploration for design and a plan approval gate before implementation; the session todo list is a **session UX mirror** — **NEVER** cite only a session todo list 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
|
- ZCode **Plan mode** is active (`EnterPlanMode` succeeded).
|
|
21
12
|
- Morning Star plugin is installed (`.zcode-plugin/plugin.json` skills loaded) or **`/morning-star-harness: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 | ZCode session | Harness SSOT |
|
|
@@ -40,15 +25,11 @@ ZCode **Plan mode** (`EnterPlanMode` / `ExitPlanMode`) uses read-only exploratio
|
|
|
40
25
|
|
|
41
26
|
## ExitPlanMode gate
|
|
42
27
|
|
|
43
|
-
|
|
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** plan content 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` + `zcode.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` + **`zcode.md`**; resume as `project-manager` orchestration.
|
|
52
33
|
|
|
53
34
|
## Enforcement
|
|
54
35
|
|
|
@@ -57,32 +57,7 @@ Morning Star role ids (`project-manager`, `fullstack-dev`, `qc-specialist`, …)
|
|
|
57
57
|
|
|
58
58
|
### Role binding in prompt (C5b — required)
|
|
59
59
|
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
|
|
63
|
-
2. **`Act as <role-id>`** (or equivalent) at the top of the Agent prompt.
|
|
64
|
-
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.
|
|
65
|
-
4. **`subagent_type`** — pick from the host's built-in profiles only (typically `general-purpose`; `Explore` for read-only orientation).
|
|
66
|
-
|
|
67
|
-
Paste-only Assignment without an **`Agent`** call is **not** dispatch.
|
|
68
|
-
|
|
69
|
-
### Assignment / Agent-prompt template
|
|
70
|
-
|
|
71
|
-
```markdown
|
|
72
|
-
## Assignment
|
|
73
|
-
|
|
74
|
-
**Execute as**: fullstack-dev
|
|
75
|
-
**Delegation**: forbidden
|
|
76
|
-
**Working branch**: feat/example
|
|
77
|
-
**Plan Path**: .mstar/plans/20260717-example.md
|
|
78
|
-
|
|
79
|
-
**IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
|
|
80
|
-
Load: `mstar-harness-core` → `mstar-host` → `zcode.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
|
|
81
|
-
|
|
82
|
-
<task body>
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
PM dispatch invocation (same turn):
|
|
60
|
+
Role-binding contract + Assignment template → **`_shared/host-role-binding-core.md`** (C5/C5b). ZCode-specific invoke shapes, same turn:
|
|
86
61
|
|
|
87
62
|
```text
|
|
88
63
|
Agent(
|
|
@@ -100,26 +75,24 @@ Agent(subagent_type: "Explore", description: "...", prompt: "... Act as explore-
|
|
|
100
75
|
|
|
101
76
|
## PM dispatch (`Agent`)
|
|
102
77
|
|
|
103
|
-
Harness **dispatch** on ZCode = **one or more `Agent` tool calls** with correct **`subagent_type`** and role-bound prompts.
|
|
78
|
+
Harness **dispatch** on ZCode = **one or more `Agent` tool calls** with correct **`subagent_type`** and role-bound prompts (C5b → **`_shared/host-role-binding-core.md`**). N-parallel / 1-Assignment-1-invoke / paste-only mechanics → **`parallel-dispatch.md`**.
|
|
104
79
|
|
|
105
80
|
| Harness | ZCode |
|
|
106
81
|
|---------|-------|
|
|
107
|
-
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **Agent** prompt |
|
|
82
|
+
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **Agent** prompt (C5b) |
|
|
108
83
|
| `subagent_type` for invoke | built-in profiles only (typically `general-purpose`; `Explore` for read-only) |
|
|
109
|
-
| 1 Assignment ⇒ 1 invoke | **1 `Agent`** call with full Assignment prompt |
|
|
110
84
|
| Parallel batch **N** | **N `Agent`** calls in **one assistant message** |
|
|
111
|
-
| No `Agent` call | **Not dispatched** — paste-only / `dispatch incomplete` |
|
|
112
85
|
|
|
113
86
|
### QC default
|
|
114
87
|
|
|
115
|
-
- **`Execution mode: sdd`**: **N=3** `Agent` calls (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each prompt **Act as** the respective QC role, all `subagent_type: "general-purpose"
|
|
88
|
+
- **`Execution mode: sdd`**: **N=3** `Agent` calls (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each prompt **Act as** the respective QC role, all `subagent_type: "general-purpose"` (N rules → `parallel-dispatch.md`).
|
|
116
89
|
- **`inline`**: **N=1** per `parallel-dispatch.md`.
|
|
117
90
|
|
|
118
91
|
Cannot emit required **N** → **`Blocked`**.
|
|
119
92
|
|
|
120
93
|
### SDD implement (serial)
|
|
121
94
|
|
|
122
|
-
- **`Execution mode: sdd`**: one implementer **`Agent`** per task id; task reviewer = new **`Agent`** (no sticky resume unless host adds it later).
|
|
95
|
+
- **`Execution mode: sdd`**: one implementer **`Agent`** per task id; task reviewer = new **`Agent`** (no sticky resume unless host adds it later). Serial rule → **`parallel-dispatch.md`** § SDD implement.
|
|
123
96
|
- **Never** multiple implementer Agents in one message for the same plan.
|
|
124
97
|
|
|
125
98
|
## Clarify
|