@mstar-harness/opencode 1.8.2 → 1.8.3
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 +13 -0
- package/harness-skills/mstar-host/SKILL.md +1 -1
- package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +14 -7
- package/harness-skills/mstar-host/references/omp.md +77 -24
- package/harness-skills/mstar-host/references/parallel-dispatch.md +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,19 @@ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface re
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.8.3] - 2026-08-05
|
|
10
|
+
|
|
11
|
+
- **Bundled skills**: omp host C5 corrected — prefer live-schema Morning Star role `task.agent` values from discovered `agents/*.md`; keep C5b skill load; update shared host-role-binding + parallel-dispatch docs.
|
|
12
|
+
- Version alignment with harness **1.8.3** (no OpenCode package API change).
|
|
13
|
+
|
|
14
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.8.3**.
|
|
15
|
+
|
|
16
|
+
## [1.8.2] - 2026-08-05
|
|
17
|
+
|
|
18
|
+
- Version alignment with harness **1.8.2** (README/host-detection docs; no OpenCode package API change).
|
|
19
|
+
|
|
20
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.8.2**.
|
|
21
|
+
|
|
9
22
|
## [1.8.1] - 2026-08-05
|
|
10
23
|
|
|
11
24
|
- **Bundled skills/commands lossless optimization** (SkillsBench principles): compact `SKILL.md` bodies + progressive disclosure — extracted Phase 3/4/5 and compound workflow to `references/`; compressed `mstar-coding-behavior` and QC review lenses; deduped anti-pattern lists, leaf-role Completion Report/Git NEVER (new `_shared/leaf-executor-core.md`), host role-binding (new `_shared/host-role-binding-core.md`) and plan-mode bridges (new `_shared/plan-mode-bridge-core.md`); slimmed 4 commands to thin boot+route+delegate orchestrators (943 → 388 lines); tightened frontmatter descriptions; `Completion Report v2` → `Completion Report`. No rule, gate, or field name altered or dropped.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-host
|
|
3
|
-
description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi, ZCode, omp). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, ZCode Agent/AskUserQuestion/EnterPlanMode with built-in subagent types and role-in-prompt binding, omp task/ask/hub
|
|
3
|
+
description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi, ZCode, omp). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, ZCode Agent/AskUserQuestion/EnterPlanMode with built-in subagent types and role-in-prompt binding, omp task/ask/hub preferring live-schema role agents (agents/*.md) with C5b skill-load binding (generic task/scout only as fallback), sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Morning Star Host Adapter
|
|
@@ -1,20 +1,26 @@
|
|
|
1
1
|
# Host role-binding core (C5/C5b)
|
|
2
2
|
|
|
3
|
-
Shared role-binding contract for
|
|
3
|
+
Shared role-binding contract for **Kimi / ZCode** — hosts where Morning Star role ids are **never** valid invoke types, so picking `subagent_type` alone cannot carry Assignment IDENTITY + skill load.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Other hosts follow their own `references/<host>.md` and do **not** use this file for agent selection. Read this file only when the active host reference is Kimi or ZCode.
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
7
|
+
## C5 — invoke type selection (Kimi / ZCode)
|
|
8
|
+
|
|
9
|
+
| Host | Invoke-type selection (C5) | Prompt role binding (C5b) |
|
|
10
|
+
|------|----------------------------|---------------------------|
|
|
11
|
+
| **Kimi / ZCode** | Built-in types only (`coder` / `explore` / `plan`, …). Morning Star role ids are **never** valid invoke types. | **Required** |
|
|
12
|
+
|
|
13
|
+
- **Never invent** agent / subagent names. The **live tool schema** (plus the active host reference C5 table) is SSOT every session.
|
|
14
|
+
- Morning Star role ids (`product-manager`, `fullstack-dev`, `qc-specialist`, …) are **not** valid invoke types — map via the host reference table (`coder` / `explore` / `plan`, …), then rely on C5b.
|
|
9
15
|
|
|
10
16
|
## C5b — role binding in prompt (required)
|
|
11
17
|
|
|
12
|
-
|
|
18
|
+
Every dispatch on Kimi / ZCode **must** carry the played Morning Star role in the **Assignment** and in the **invoke prompt**:
|
|
13
19
|
|
|
14
20
|
1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
|
|
15
21
|
2. **`Act as <role-id>`** (or equivalent) at the top of the invoke prompt.
|
|
16
22
|
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
|
|
23
|
+
4. **`subagent_type`** — pick from the live built-in set per the host C5 table (not a Morning Star role id).
|
|
18
24
|
|
|
19
25
|
Paste-only Assignment **without** an invoke call is **not** dispatch.
|
|
20
26
|
|
|
@@ -36,9 +42,10 @@ Paste-only Assignment **without** an invoke call is **not** dispatch.
|
|
|
36
42
|
**Plan Path**: .mstar/plans/20260717-example.md
|
|
37
43
|
|
|
38
44
|
**IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
|
|
45
|
+
|
|
39
46
|
Load: `mstar-harness-core` → `mstar-host` → `<host>.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
|
|
40
47
|
|
|
41
48
|
<task body>
|
|
42
49
|
```
|
|
43
50
|
|
|
44
|
-
The active host reference shows the matching invoke shape (same turn).
|
|
51
|
+
The active host reference shows the matching invoke shape (same turn) — e.g. Kimi/ZCode `Agent` with `subagent_type: "coder"` plus this C5b body.
|
|
@@ -11,14 +11,14 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2
|
|
|
11
11
|
- Plugin markers: **`.omp-plugin/plugin.json`** (Morning Star host marker) and **`.claude-plugin/plugin.json`** (Claude-compatible marketplace discovery). Plugin root is the **repo root**; paths stay `./skills/`, `./commands/`, `./agents/`.
|
|
12
12
|
- Runtime skills: repo `skills/` discovered after `omp plugin install` / `omp plugin link` (OMP extension-package sub-discovery) or Claude marketplace install.
|
|
13
13
|
- Plugin commands: repo `commands/<name>.md` → slash **`/<name>`** (e.g. `/iteration-start`). omp uses the **filename** as the command name (no `morning-star-harness:` prefix).
|
|
14
|
-
- Plugin agents: repo
|
|
14
|
+
- Plugin agents: repo **`agents/*.md`** are discovered into the live **`task.agent`** list after install/link + reload. Morning Star **subagent** role ids (`product-manager`, `architect`, `fullstack-dev`, `qc-specialist`, …) are valid `agent` values **when listed** — see C5. `project-manager` is **`mode: primary`** (orchestration seat), not a typical `task` dispatch target.
|
|
15
15
|
- **No Kimi-style `sessionStart.skill`** — enter PM manually via **`/skill:pm`** (or the `pm` skill), then **Read next** → `mstar-harness-core` → `project-manager.md`.
|
|
16
16
|
- Install (user-scoped, recommended):
|
|
17
17
|
- `omp plugin install github:btspoony/mstar-harness`
|
|
18
18
|
- or CLI: `npx @mstar-harness/cli init --target omp --scope global` (links `~/.mstar/harness`)
|
|
19
19
|
- Project scope: `omp plugin install github:btspoony/mstar-harness --scope project` or `npx @mstar-harness/cli init --target omp --scope project`.
|
|
20
20
|
- Local maintainers: `omp plugin link /path/to/mstar-harness` (or the CLI-managed `~/.mstar/harness` checkout).
|
|
21
|
-
- After install/link: `omp plugin list` should show package **`morning-star`** (root `package.json` name). Reload / new session to pick up skills and
|
|
21
|
+
- After install/link: `omp plugin list` should show package **`morning-star`** (root `package.json` name). Reload / new session to pick up skills, commands, and agents.
|
|
22
22
|
|
|
23
23
|
## Skill loading
|
|
24
24
|
|
|
@@ -48,7 +48,7 @@ omp resolves **internal URL schemes** natively (see <https://omp.sh/#urls>), so
|
|
|
48
48
|
|
|
49
49
|
| omp tool | Harness use |
|
|
50
50
|
|----------|-------------|
|
|
51
|
-
| **`task`** | Primary dispatch — fan out one or more subagents (`agent`
|
|
51
|
+
| **`task`** | Primary dispatch — fan out one or more subagents (`agent` = live-schema id; prefer Morning Star role id; batch via `tasks[]` + shared `context`) |
|
|
52
52
|
| **`ask`** | Structured clarify (options + recommended); prefer over free-form when choices are known |
|
|
53
53
|
| **`hub`** | Optional peer messaging / long-running process control among subagents — not a substitute for Assignment + `task` |
|
|
54
54
|
| **bash** | Commands, git, tests — evidence per `mstar-coding-behavior` |
|
|
@@ -68,7 +68,7 @@ task(
|
|
|
68
68
|
tasks: [
|
|
69
69
|
{
|
|
70
70
|
name: "CamelCaseId",
|
|
71
|
-
agent: "
|
|
71
|
+
agent: "<Execute as role-id>", # prefer live-schema role agent — see C5
|
|
72
72
|
task: "<full Assignment body including Act as + skill load>"
|
|
73
73
|
}
|
|
74
74
|
]
|
|
@@ -79,36 +79,87 @@ Single-task shorthand may exist depending on host version — always match the l
|
|
|
79
79
|
|
|
80
80
|
## Role agents (C5 — hard constraint)
|
|
81
81
|
|
|
82
|
-
|
|
82
|
+
**Live `task` tool schema is SSOT every session.** Exact `agent` names vary by omp version and which `agents/*.md` were discovered after plugin install/link. Read the tool's Available Agents list before dispatch — do not invent names; do not hard-code stale tables over the live list.
|
|
83
83
|
|
|
84
|
-
|
|
85
|
-
|---------|-------------|-----------------|
|
|
86
|
-
| `scout` / `explore` | Fast read-only investigation | Orientation, codebase survey, Prepare explore passes |
|
|
87
|
-
| `plan` | Architectural planning | Prepare plan-only work when appropriate |
|
|
88
|
-
| `reviewer` / `security-reviewer` | Structured review | Optional QC assist — still bind Morning Star QC role in prompt (C5b) |
|
|
89
|
-
| `designer` | UI/UX | Optional when Assignment is UI-heavy `frontend-dev` |
|
|
90
|
-
| `librarian` | External library/API research | Optional research assist |
|
|
91
|
-
| `sonic` / `quick_task` | Mechanical / low-reasoning | Mechanical transcription only |
|
|
92
|
-
| `task` | General-purpose worker | **Default for Morning Star roles** (`product-manager`, `fullstack-dev`, `qc-specialist`, …) |
|
|
84
|
+
### Selection order (required)
|
|
93
85
|
|
|
94
|
-
|
|
86
|
+
1. **Role match first** — if Assignment `Execute as: <role-id>` appears in the live `task.agent` list, set **`agent: "<role-id>"`**. Examples commonly present after Morning Star plugin discovery: `product-manager`, `architect`, `frontend-dev`, `fullstack-dev`, `fullstack-dev-2`, `ops-engineer`, `prompt-engineer`, `qa-engineer`, `qc-specialist`, `qc-specialist-2`, `qc-specialist-3`, `writing-specialist`.
|
|
87
|
+
2. **Generic built-in only as fallback** — when the role id is **absent** from the live schema, pick the closest host built-in and keep full C5b prompt binding:
|
|
88
|
+
|
|
89
|
+
| Fallback `agent` | When |
|
|
90
|
+
|------------------|------|
|
|
91
|
+
| `scout` / `explore` | Read-only orientation / codebase survey / Prepare explore |
|
|
92
|
+
| `reviewer` / `security-reviewer` | Optional QC assist **only if** the matching `qc-specialist*` agent is missing |
|
|
93
|
+
| `designer` | UI-heavy work when `frontend-dev` is missing |
|
|
94
|
+
| `librarian` | External library/API research assist |
|
|
95
|
+
| `sonic` / `quick_task` | Mechanical / low-reasoning transcription only |
|
|
96
|
+
| `task` (or omit if schema says omit = general worker) | Last resort general worker when no specialist fits |
|
|
97
|
+
|
|
98
|
+
3. **Anti-pattern** — **`agent: "task"` (or omitting agent) while a matching role agent is listed** is incorrect dispatch. Prefer the specialist; generic `task` is not the Morning Star default when role agents are available.
|
|
99
|
+
|
|
100
|
+
### Notes
|
|
101
|
+
|
|
102
|
+
- `project-manager` is the **primary** orchestration agent (`agents/project-manager.md` `mode: primary`). Do not dispatch PM-to-PM via `task` unless the live schema explicitly lists it **and** the Assignment requires it.
|
|
103
|
+
- Host generics (`scout`, `reviewer`, `designer`, …) remain useful for non-role orientation / assist — they do not replace a listed Morning Star role agent for role-owned deliverables.
|
|
95
104
|
|
|
96
105
|
### Role binding in prompt (C5b — required)
|
|
97
106
|
|
|
98
|
-
|
|
107
|
+
omp C5/C5b SSOT is **this file** — do **not** use `_shared/host-role-binding-core.md` (that file is Kimi/ZCode only). Even when `agent` already matches the role id, still bind Morning Star process in the Assignment / `task` body (agent shell ≠ full role prompt; skill load is not automatic).
|
|
108
|
+
|
|
109
|
+
Required in every role dispatch:
|
|
110
|
+
|
|
111
|
+
1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
|
|
112
|
+
2. **`Act as <role-id>`** (or equivalent) at the top of the `task` body.
|
|
113
|
+
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.
|
|
114
|
+
4. **`agent`** — live-schema role id per C5 above (not “always `task`”).
|
|
115
|
+
|
|
116
|
+
Paste-only Assignment **without** a `task` invoke is **not** dispatch.
|
|
117
|
+
|
|
118
|
+
Assignment / prompt template:
|
|
119
|
+
|
|
120
|
+
```markdown
|
|
121
|
+
## Assignment
|
|
122
|
+
|
|
123
|
+
**Execute as**: fullstack-dev
|
|
124
|
+
**Delegation**: forbidden
|
|
125
|
+
**Working branch**: feat/example
|
|
126
|
+
**Plan Path**: .mstar/plans/20260717-example.md
|
|
127
|
+
|
|
128
|
+
**IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
|
|
129
|
+
|
|
130
|
+
Load: `mstar-harness-core` → `mstar-host` → `omp.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
|
|
131
|
+
|
|
132
|
+
<task body>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
omp invoke shapes, same turn:
|
|
99
136
|
|
|
100
137
|
```text
|
|
101
138
|
task(
|
|
102
139
|
context: "Morning Star dispatch for plan 20260717-example",
|
|
103
140
|
tasks: [{
|
|
104
141
|
name: "ImplementAuth",
|
|
105
|
-
agent: "
|
|
142
|
+
agent: "fullstack-dev", # live-schema role id matching Execute as
|
|
106
143
|
task: "<full Assignment body including Act as + skill load>"
|
|
107
144
|
}]
|
|
108
145
|
)
|
|
109
146
|
```
|
|
110
147
|
|
|
111
|
-
|
|
148
|
+
Review & Edit / Prepare specialist chain (sequential, **N=1** each turn):
|
|
149
|
+
|
|
150
|
+
```text
|
|
151
|
+
task(
|
|
152
|
+
context: "Review & Edit — product scope",
|
|
153
|
+
tasks: [{
|
|
154
|
+
name: "ReviewEditProduct",
|
|
155
|
+
agent: "product-manager",
|
|
156
|
+
task: "<Assignment: Execute as product-manager; Act as + skill load>"
|
|
157
|
+
}]
|
|
158
|
+
)
|
|
159
|
+
# wait for return, then architect, then writing-specialist — each with agent: "<role-id>"
|
|
160
|
+
```
|
|
161
|
+
|
|
162
|
+
For explore-only orientation (no Morning Star role deliverable):
|
|
112
163
|
|
|
113
164
|
```text
|
|
114
165
|
task(
|
|
@@ -122,24 +173,24 @@ task(
|
|
|
122
173
|
|
|
123
174
|
## PM dispatch (`task`)
|
|
124
175
|
|
|
125
|
-
Harness **dispatch** on omp = **one or more `task` tool calls** with correct **`agent`** values and role-bound assignment text (C5b
|
|
176
|
+
Harness **dispatch** on omp = **one or more `task` tool calls** with correct **`agent`** values and role-bound assignment text (C5 + C5b in this file). N-parallel / 1-Assignment-1-invoke / paste-only mechanics → **`parallel-dispatch.md`**.
|
|
126
177
|
|
|
127
178
|
| Harness | omp |
|
|
128
179
|
|---------|-----|
|
|
129
|
-
| `Execute as: <role-id>` |
|
|
130
|
-
|
|
|
180
|
+
| `Execute as: <role-id>` | **`agent: "<role-id>"`** when listed in live schema; else generic built-in + C5b |
|
|
181
|
+
| Role identity / skills | Assignment **Act as** + skill load in **task** body (C5b) — always |
|
|
131
182
|
| Parallel batch **N** | **N** `tasks[]` entries in **one** `task` call, or **N** `task` calls in **one** assistant message |
|
|
132
183
|
|
|
133
184
|
### QC default
|
|
134
185
|
|
|
135
|
-
- **`Execution mode: sdd`**: **N=3** task entries
|
|
186
|
+
- **`Execution mode: sdd`**: **N=3** task entries — prefer `agent: "qc-specialist"`, `"qc-specialist-2"`, `"qc-specialist-3"` when listed; each body still **Act as** the respective QC role + QC skill load. If a seat is missing from the live schema, fall back per C5 (generic + C5b) for that seat only. N rules → `parallel-dispatch.md`.
|
|
136
187
|
- **`inline`**: **N=1** per `parallel-dispatch.md`.
|
|
137
188
|
|
|
138
189
|
Cannot emit required **N** → **`Blocked`**.
|
|
139
190
|
|
|
140
191
|
### SDD implement (serial)
|
|
141
192
|
|
|
142
|
-
- **`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.
|
|
193
|
+
- **`Execution mode: sdd`**: one implementer `task` entry per task id with `agent` matching the implementer role when listed; task reviewer = new entry (no sticky resume unless host resume/id is available and recorded). Serial rule → **`parallel-dispatch.md`** § SDD implement.
|
|
143
194
|
- **Never** multiple implementer entries in one message for the same plan.
|
|
144
195
|
|
|
145
196
|
## Clarify
|
|
@@ -174,6 +225,8 @@ Cannot emit required **N** → **`Blocked`**.
|
|
|
174
225
|
- Installed npm/git plugin package name is root **`morning-star`** (`package.json`); Morning Star display name remains **morning-star-harness**.
|
|
175
226
|
- Marketplace (Claude) installs and `omp plugin install` are different discovery providers — prefer one install path per machine to avoid duplicate skill listings.
|
|
176
227
|
- Session plan UI / todos are not durable SSOT unless mirrored to `{HARNESS_DIR}`.
|
|
177
|
-
-
|
|
228
|
+
- After install/link, **reload / new session** so `agents/*.md` appear in the live `task.agent` list — stale sessions may only show host generics and wrongly push you to `agent: "task"`.
|
|
229
|
+
- Role agent shell ≠ full role prompt: **C5b skill load remains required** even when `agent` already equals the role id.
|
|
178
230
|
- omp has no `sessionStart.skill`; new sessions do **not** auto-load PM — invoke `/skill:pm` manually.
|
|
179
231
|
- Do not confuse omp **`task.agent`** with OpenCode **`subagent`** or Cursor **`subagent_type`**.
|
|
232
|
+
- Do not treat Kimi/ZCode “built-ins only → always `coder`/`task`” habits as omp defaults when Morning Star role agents are listed.
|
|
@@ -17,7 +17,7 @@ Printing `## Assignment` in the main thread **without** matching host invocation
|
|
|
17
17
|
|
|
18
18
|
1. Finalize all `N` Assignment payloads (after any prerequisite turn).
|
|
19
19
|
2. Count distinct `Execute as` sessions (`N`).
|
|
20
|
-
3. Issue **`N` host invocations first** — OpenCode: **N `task` tool** calls with **subagent**; Cursor: **N `Task`** with `subagent_type` (JSON field shape → `cursor.md` § Task invoke schema); Kimi: **N `Agent`** calls (each prompt carries **Act as** + skill load; `subagent_type` ∈ {`coder`,`explore`,`plan`} only — see `kimi.md` C5/C5b); omp: **one `task` call with N `tasks[]`** (or N `task` calls) with
|
|
20
|
+
3. Issue **`N` host invocations first** — OpenCode: **N `task` tool** calls with **subagent**; Cursor: **N `Task`** with `subagent_type` (JSON field shape → `cursor.md` § Task invoke schema); Kimi: **N `Agent`** calls (each prompt carries **Act as** + skill load; `subagent_type` ∈ {`coder`,`explore`,`plan`} only — see `kimi.md` C5/C5b); omp: **one `task` call with N `tasks[]`** (or N `task` calls) with `agent` = live-schema role id matching `Execute as` when listed (else generic built-in) + **Act as** / skill load (see `omp.md` C5/C5b); each with one Assignment body. For parallel work, **all `N` tool calls in one assistant message** when the host allows.
|
|
21
21
|
4. Optionally post a short **Status Update** after invocations (audit trail only — does not replace step 3).
|
|
22
22
|
|
|
23
23
|
## Hard rules
|