@mstar-harness/opencode 1.8.3 → 1.8.6
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 +25 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +3 -1
- package/harness-skills/mstar-host/SKILL.md +14 -0
- package/harness-skills/mstar-host/references/codex.md +1 -1
- package/harness-skills/mstar-host/references/cursor.md +1 -0
- package/harness-skills/mstar-host/references/kimi.md +1 -1
- package/harness-skills/mstar-host/references/omp.md +17 -3
- package/harness-skills/mstar-host/references/opencode.md +1 -0
- package/harness-skills/mstar-host/references/parallel-dispatch.md +5 -3
- package/harness-skills/mstar-host/references/zcode.md +1 -1
- package/harness-skills/mstar-iteration/SKILL.md +4 -4
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +5 -3
- package/harness-skills/mstar-plan-conventions/SKILL.md +1 -1
- package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +1 -1
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +1 -1
- package/harness-skills/mstar-sdd/SKILL.md +10 -8
- package/harness-skills/mstar-sdd/references/file-handoffs.md +6 -4
- package/harness-skills/mstar-skill-authoring/SKILL.md +11 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -6,6 +6,31 @@ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface re
|
|
|
6
6
|
|
|
7
7
|
## [Unreleased]
|
|
8
8
|
|
|
9
|
+
## [1.8.6] - 2026-08-06
|
|
10
|
+
|
|
11
|
+
### Bundled harness skills (`harness-skills/` at publish)
|
|
12
|
+
|
|
13
|
+
- Sync dispatch field-completeness gate: `mstar-dispatch-gates` self-check + anti-pattern, `mstar-host/references/parallel-dispatch.md` hard rule + self-check, `mstar-host/references/omp.md` Review-&-Edit example + N=1 gotcha.
|
|
14
|
+
- Version alignment with harness **1.8.6** (no OpenCode package API change).
|
|
15
|
+
|
|
16
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.8.6**.
|
|
17
|
+
|
|
18
|
+
## [1.8.5] - 2026-08-06
|
|
19
|
+
|
|
20
|
+
### Bundled harness skills (`harness-skills/` at publish)
|
|
21
|
+
|
|
22
|
+
- Sync `mstar-host` § Resolve loaded skill root + host-reference skill-root cues; `mstar-skill-authoring` anti-pattern for rules/CLI cwd paths.
|
|
23
|
+
- Version alignment with harness **1.8.5** (no OpenCode package API change).
|
|
24
|
+
|
|
25
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.8.5**.
|
|
26
|
+
|
|
27
|
+
## [1.8.4] - 2026-08-06
|
|
28
|
+
|
|
29
|
+
- **Bundled skills**: skill-relative script path naming (`mstar-sdd` → `scripts/…`) so agents resolve scripts from the loaded skill directory instead of consumer-cwd `skills/…` paths.
|
|
30
|
+
- Version alignment with harness **1.8.4** (no OpenCode package API change).
|
|
31
|
+
|
|
32
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.8.4**.
|
|
33
|
+
|
|
9
34
|
## [1.8.3] - 2026-08-05
|
|
10
35
|
|
|
11
36
|
- **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.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-dispatch-gates
|
|
3
|
-
description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、SDD implement 串行派发、**SDD 路径 plan QC 强制 tri-review(N=3)**、inline 单席 QC 例外、Assignment
|
|
3
|
+
description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、SDD implement 串行派发、**SDD 路径 plan QC 强制 tri-review(N=3)**、inline 单席 QC 例外、Assignment 文案≠派发、未齐不发、**invoke 角色字段必填(漏写=静默 generic 回退=派发未完成)**。`project-manager` 派发时必读;leaf 动手前必读反递归。worktree 见 `mstar-branch-worktree`;SDD 见 `mstar-sdd`;宿主见 `mstar-host`。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
@@ -58,6 +58,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
58
58
|
- **QC 单席(例外)**:`Execution mode: inline`(hotfix 等),或 Assignment 显式 `QC mode: single` / `QC mode: single — override: <reason>` → `qc-specialist` ×1,`N=1`,写 `{SDD_DIR}/review/qc.md`。
|
|
59
59
|
- **QC targeted re-review**:Assignment 含 **`QC re-review: targeted — reviewers: …`** 时,**N** = 所列席位数(1–3),同条消息发满 **N**。
|
|
60
60
|
- **先自检再发送**:发送前核对「Assignment 条数 = 本条消息中的实际 **派发** 调用条数」。
|
|
61
|
+
- **先自检字段再发送(与 count 同级门禁)**:核对**每条** invoke 都携带与 **`Execute as`** 匹配的角色绑定字段——omp **`agent`** / Cursor **`subagent_type`** / OpenCode **`subagent`** / Kimi·ZCode **`subagent_type`**。**漏写或取默认通用值**(omp 漏 `agent` ⇒ 自动回退 generic `task`,无报错)= **派发未完成**,与 paste-only(零 invoke)**同等级**:当场补齐重发,不得进入下一 gate。**N=1 顺序链(Review & Edit)不豁免**——count 门在 N=1 恒过,**字段门是唯一保护**。
|
|
61
62
|
- **前置步骤与派发回合分离(防串行 rollout)**:为派发准备的 **`bash` / `read` / `glob` / `grep`**(如 `merge-base`、`Review range`、`git rev-parse`)**不计入** `N` 次派发;可在上一条仅含准备的消息完成。准备完成后,**下一条派发消息**须**一次性**含 **`N` 次** Task / subagent invoke。**禁止**先发 `1` 次、等返回再补发其余 `N-1` 次。
|
|
62
63
|
- **未齐不发(emit zero until batch-ready)**:需并发 `N≥2` 而当前只能发 `1` 条时,本条应发 **`0` 条派发 invoke`**(可继续 read/bash 补齐),**禁止**「先发一个顶一下」;`N` 份 payload 就绪后**单次消息发满 `N`**。见 **`mstar-host`** → `references/parallel-dispatch.md`(具备 invoke / Task / subagent 工具的宿主共用)。
|
|
63
64
|
|
|
@@ -114,6 +115,7 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
|
|
|
114
115
|
- Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
|
|
115
116
|
- Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
|
|
116
117
|
- Assignment 已写、invoke 为零(paste-only)却进入下一 gate。
|
|
118
|
+
- Task/subagent item 漏写角色绑定字段(omp 漏 `agent` / Cursor 漏 `subagent_type` / OpenCode 漏 `subagent`)⇒ **静默回退 generic worker**,却因 count=N 通过而误判「派发完成」;属 paste-only 同级的 **dispatch-incomplete**。N=1 顺序 Review-&-Edit 链最易在此漏字段。
|
|
117
119
|
|
|
118
120
|
## References
|
|
119
121
|
|
|
@@ -41,6 +41,20 @@ Order matters: check `cursor` → `opencode` → `omp` → `kimi` → `zcode`
|
|
|
41
41
|
|
|
42
42
|
When PM dispatches **N >= 2** concurrent assignees (QC tri-review, dual-track implement, etc.) and the host exposes actual invoke / Task / subagent tools, read **`references/parallel-dispatch.md`** in the dispatch round (shared with `mstar-dispatch-gates`). Without a callable invoke tool when dispatch is required → **`Blocked`**; Assignment Markdown alone is not dispatch.
|
|
43
43
|
|
|
44
|
+
## Resolve loaded skill root
|
|
45
|
+
|
|
46
|
+
Docs name assets as skill **`<name>`** → `scripts/…` / `references/…`. **Resolve the loaded skill directory first** — do **not** open `skills/<name>/…` from a consumer app cwd (that layout exists in the harness source / plugin package only).
|
|
47
|
+
|
|
48
|
+
| Host | Prefer | Filesystem fallback (only if the host cannot load by name) |
|
|
49
|
+
|------|--------|--------------------------------------------------------------|
|
|
50
|
+
| **omp** | `skill://<name>` / `skill://<name>/<rel>` / `/skill:<name>` | Plugin package root `skills/<name>/` after install/link — not app cwd |
|
|
51
|
+
| **Cursor** | Skill **name** via plugin skills | Global `~/.cursor/plugins/local/morning-star-harness/skills/<name>/`; project `.cursor/plugins/morning-star-harness/skills/<name>/` |
|
|
52
|
+
| **Codex** | Skill **name** via plugin | Plugin-mounted `skills/<name>/`; project command skills under `.agents/skills/<name>/` |
|
|
53
|
+
| **OpenCode** | Skill **name** via `@mstar-harness/opencode` | Package-internal `harness-skills/<name>/` — never `process.cwd()/skills/` |
|
|
54
|
+
| **Kimi / ZCode** | Skill **name** / `/skill:<name>` | Plugin mount `./skills/<name>/` from the installed plugin root |
|
|
55
|
+
|
|
56
|
+
Authoring convention: **`mstar-skill-authoring`** § Skill-relative script and asset paths. Per-host URI / mount detail: `references/<host>.md`.
|
|
57
|
+
|
|
44
58
|
## Conflict order
|
|
45
59
|
|
|
46
60
|
1. User explicit instructions (this turn)
|
|
@@ -23,7 +23,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** only when Codex exposes an
|
|
|
23
23
|
4. Load `mstar-roles` and the active role reference.
|
|
24
24
|
5. Load topic skills on demand per the role reference.
|
|
25
25
|
|
|
26
|
-
Use skill names in prompts and references. Avoid absolute local paths unless the user is maintaining this repository or the skill is not installed and must be read from the checkout.
|
|
26
|
+
Use skill names in prompts and references. Avoid absolute local paths unless the user is maintaining this repository or the skill is not installed and must be read from the checkout. Skill-root resolve (plugin `skills/<name>/`, project `.agents/skills/<name>/`) → `mstar-host` § Resolve loaded skill root.
|
|
27
27
|
|
|
28
28
|
## Clarify
|
|
29
29
|
|
|
@@ -6,6 +6,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (Task tool uses same turn model
|
|
|
6
6
|
|
|
7
7
|
## Cursor-only context
|
|
8
8
|
|
|
9
|
+
- Skill root: load by skill **name**; filesystem fallback → `mstar-host` § Resolve loaded skill root (`~/.cursor/plugins/local/morning-star-harness/skills/<name>/` or project `.cursor/plugins/morning-star-harness/skills/<name>/`). Never app-cwd `skills/<name>/`.
|
|
9
10
|
- Role prompts: `mstar-roles`; **`/pm`** or **`pm` skill** → general PM orchestration (per-plan dispatch, gates, QC) without an iteration command. Host **`commands/`** for formal iteration Phase 1–5 (semantics → **`mstar-iteration`**).
|
|
10
11
|
- Routing-eval: `.cursor/skills/mstar-routing-eval/` — regression tooling only; not runtime load order.
|
|
11
12
|
|
|
@@ -25,7 +25,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2
|
|
|
25
25
|
4. Load `mstar-roles` and the active role reference.
|
|
26
26
|
5. Load topic skills on demand per the role reference.
|
|
27
27
|
|
|
28
|
-
Use skill names in prompts and references. Avoid absolute local paths unless maintaining this repository or skills are not installed.
|
|
28
|
+
Use skill names in prompts and references. Avoid absolute local paths unless maintaining this repository or skills are not installed. Skill-root resolve (plugin mount `./skills/<name>/`) → `mstar-host` § Resolve loaded skill root.
|
|
29
29
|
|
|
30
30
|
## Tools map (default agent)
|
|
31
31
|
|
|
@@ -28,7 +28,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2
|
|
|
28
28
|
4. Load `mstar-roles` and the active role reference.
|
|
29
29
|
5. Load topic skills on demand per the role reference.
|
|
30
30
|
|
|
31
|
-
Use skill names in prompts and references. Prefer `skill://<name>/…` / `/skill:<name>` over absolute local paths unless maintaining this repository.
|
|
31
|
+
Use skill names in prompts and references. Prefer `skill://<name>/…` / `/skill:<name>` over absolute local paths unless maintaining this repository. Full skill-root table (all hosts) → `mstar-host` § Resolve loaded skill root.
|
|
32
32
|
|
|
33
33
|
## Internal URLs
|
|
34
34
|
|
|
@@ -77,6 +77,8 @@ task(
|
|
|
77
77
|
|
|
78
78
|
Single-task shorthand may exist depending on host version — always match the live schema. Parallel **N** Morning Star assignees ⇒ **one** `task` call with **N** `tasks[]` entries **or** **N** `task` calls in one assistant message when the host requires that shape. Count emitted dispatches = **N**.
|
|
79
79
|
|
|
80
|
+
**Construct the envelope first (production cue — prevents the omission at the source, not just at the gate).** When building a `tasks[]` entry, write **`agent`** + **`name`** as the first fields, *before* the long `task` body. The Assignment body is hundreds of lines of structured text and dominates working memory; `agent`/`name` are one-line envelope fields with no intrinsic saliency and no auto-check — writing the body first and the envelope last is how `agent` gets silently dropped (omp then defaults to generic `task`). The pre-send field gate (see **C5** below) catches it, but **envelope-first is the cheaper failure mode**: it makes the high-stakes-but-low-saliency field structural, so it cannot be forgotten by attention drift while authoring the body.
|
|
81
|
+
|
|
80
82
|
## Role agents (C5 — hard constraint)
|
|
81
83
|
|
|
82
84
|
**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.
|
|
@@ -145,7 +147,7 @@ task(
|
|
|
145
147
|
)
|
|
146
148
|
```
|
|
147
149
|
|
|
148
|
-
Review & Edit / Prepare specialist chain (sequential, **N=1** each turn):
|
|
150
|
+
Review & Edit / Prepare specialist chain (sequential, **N=1** each turn — re-set **`agent`** on **every** dispatch; at N=1 the count gate is trivial, so the **field** gate is the only protection):
|
|
149
151
|
|
|
150
152
|
```text
|
|
151
153
|
task(
|
|
@@ -156,7 +158,18 @@ task(
|
|
|
156
158
|
task: "<Assignment: Execute as product-manager; Act as + skill load>"
|
|
157
159
|
}]
|
|
158
160
|
)
|
|
159
|
-
#
|
|
161
|
+
# pass 2 — architect (re-set agent on EVERY dispatch; a bare tasks:[{task:"…"}] with no agent silently falls back to generic task — C5 anti-pattern)
|
|
162
|
+
task(
|
|
163
|
+
context: "Review & Edit — architecture",
|
|
164
|
+
tasks: [{ name: "ReviewEditArchitect", agent: "architect",
|
|
165
|
+
task: "<Assignment: Execute as architect; Act as + skill load>" }]
|
|
166
|
+
)
|
|
167
|
+
# pass 3 — writing-specialist
|
|
168
|
+
task(
|
|
169
|
+
context: "Review & Edit — writing",
|
|
170
|
+
tasks: [{ name: "ReviewEditWriting", agent: "writing-specialist",
|
|
171
|
+
task: "<Assignment: Execute as writing-specialist; Act as + skill load>" }]
|
|
172
|
+
)
|
|
160
173
|
```
|
|
161
174
|
|
|
162
175
|
For explore-only orientation (no Morning Star role deliverable):
|
|
@@ -230,3 +243,4 @@ Cannot emit required **N** → **`Blocked`**.
|
|
|
230
243
|
- omp has no `sessionStart.skill`; new sessions do **not** auto-load PM — invoke `/skill:pm` manually.
|
|
231
244
|
- Do not confuse omp **`task.agent`** with OpenCode **`subagent`** or Cursor **`subagent_type`**.
|
|
232
245
|
- Do not treat Kimi/ZCode “built-ins only → always `coder`/`task`” habits as omp defaults when Morning Star role agents are listed.
|
|
246
|
+
- **Sequential N=1 Review-&-Edit turns are where `agent` gets dropped**: the “all N in one message” pressure is absent and the count gate passes trivially — re-verify **`agent: "<Execute as>"`** on every single dispatch; `tasks:[{task:"…"}]` with no `agent` is a silent generic fallback, not a valid role invoke.
|
|
@@ -6,6 +6,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
|
|
|
6
6
|
|
|
7
7
|
## Role loading
|
|
8
8
|
|
|
9
|
+
- Skill root: load by skill **name** from `@mstar-harness/opencode` (`harness-skills/<name>/` inside the package). Never `process.cwd()/skills/` — see `mstar-host` § Resolve loaded skill root.
|
|
9
10
|
- **PM entry**: **`/pm`** or **`pm` skill** → `project-manager` for general orchestration; host **`commands/`** for formal iteration Phase 1–5 (semantics → **`mstar-iteration`**).
|
|
10
11
|
- **Role shell**: `agents/<id>.md` referenced by `opencode.json` `agent.<id>` (frontmatter + role binding only).
|
|
11
12
|
- **Role body**: `mstar-roles` `references/<id>.md` (or shared references + parameters).
|
|
@@ -15,7 +15,7 @@ Printing `## Assignment` in the main thread **without** matching host invocation
|
|
|
15
15
|
|
|
16
16
|
## Mandatory order (dispatch turn)
|
|
17
17
|
|
|
18
|
-
1. Finalize all `N` Assignment payloads (after any prerequisite turn).
|
|
18
|
+
1. Finalize all `N` Assignment payloads (after any prerequisite turn). **Build each invoke entry envelope-first**: set the role-binding field (omp `agent` / Cursor `subagent_type` / OpenCode `subagent` / Kimi·ZCode `subagent_type`) + `name` *before* writing the long Assignment body — the body is high-volume and will crowd out the one-line envelope field from working memory.
|
|
19
19
|
2. Count distinct `Execute as` sessions (`N`).
|
|
20
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).
|
|
@@ -26,6 +26,7 @@ Printing `## Assignment` in the main thread **without** matching host invocation
|
|
|
26
26
|
- Do not end the dispatch turn until **`N` invocations emitted**, or mark `Blocked` / `dispatch incomplete`.
|
|
27
27
|
- Dual-track implement: **`N = 2` ⇒ two invocations in one message** when parallel is required.
|
|
28
28
|
- Status Update on dispatch turns: **`Subagent invokes issued: N`** (must match Assignment count). If Assignments were written but `N = 0` → **`dispatch failed — paste-only`**; fix next message.
|
|
29
|
+
- **Per-item field completeness (same severity as paste-only)**: every invocation must carry the role-binding field set to **`Execute as`** — omp **`agent`** / Cursor **`subagent_type`** / OpenCode **`subagent`** / Kimi·ZCode **`subagent_type`**. A missing field (e.g. omp omitting `agent` ⇒ silent generic `task` fallback) = **dispatch incomplete** even though count = N passes. Sequential **N=1** Review-&-Edit turns are not exempt — re-set the field on **every** dispatch.
|
|
29
30
|
|
|
30
31
|
## QC default (initial wave)
|
|
31
32
|
|
|
@@ -62,5 +63,6 @@ Formal iteration Phase 2 uses the same SDD + tri rule — not a separate carve-o
|
|
|
62
63
|
1. Required assignments this turn? (`N`)
|
|
63
64
|
2. Prerequisite-only message? → **zero** batch dispatches unless `N = 1`.
|
|
64
65
|
3. Dispatch message contains **exactly `N`** invocation calls?
|
|
65
|
-
4.
|
|
66
|
-
5.
|
|
66
|
+
4. **Each** invocation carries its role-binding field set to **`Execute as`** (omp `agent` / Cursor `subagent_type` / OpenCode `subagent` / Kimi·ZCode `subagent_type`)? A bare `task`/prompt item with no role field = **incomplete**, even at **N=1**.
|
|
67
|
+
5. QC initial: **`Execution mode: sdd`** → **N=3**? **`inline`** → **N=1**? Targeted re-review → **N** = Assignment reviewer count?
|
|
68
|
+
6. SDD implement → **serial** (never batch implementers); sticky = **resume** same implementer, not parallel
|
|
@@ -25,7 +25,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2
|
|
|
25
25
|
4. Load `mstar-roles` and the active role reference.
|
|
26
26
|
5. Load topic skills on demand per the role reference.
|
|
27
27
|
|
|
28
|
-
Use skill names in prompts and references. Avoid absolute local paths unless maintaining this repository or skills are not installed.
|
|
28
|
+
Use skill names in prompts and references. Avoid absolute local paths unless maintaining this repository or skills are not installed. Skill-root resolve (plugin mount `./skills/<name>/`) → `mstar-host` § Resolve loaded skill root.
|
|
29
29
|
|
|
30
30
|
## Tools map (default agent)
|
|
31
31
|
|
|
@@ -288,10 +288,10 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
288
288
|
3. **Implement → InReview**(`§ 2.5`;产品编辑在 feature worktree;plans / status / iterations / SDD 经 control 绝对路径):
|
|
289
289
|
- **默认 `Execution mode: sdd`**(多 task plan;hotfix 可 `inline`)。
|
|
290
290
|
- PM 载入 **`mstar-sdd`** 后,按 plan task 顺序 **串行** per-task 循环(**不是**一次派发 dev 做全部 tasks):
|
|
291
|
-
1. `sdd-workspace <plan-id>` → `{SDD_DIR}`
|
|
292
|
-
2. `task-brief <plan-file> N` → `{SDD_DIR}/task-N-brief.md`;记录 `BASE_SHA`
|
|
291
|
+
1. skill **`mstar-sdd`** → `scripts/sdd-workspace <plan-id>` → `{SDD_DIR}`
|
|
292
|
+
2. `scripts/task-brief <plan-file> N` → `{SDD_DIR}/task-N-brief.md`;记录 `BASE_SHA`
|
|
293
293
|
3. Dispatch **one** implementer subagent(`references/implementer-prompt.md`:brief 路径 + report 路径 + `Model tier`;**禁止**贴整份 plan)
|
|
294
|
-
4. Implementer `DONE` → `review-package BASE HEAD` → task diff 文件
|
|
294
|
+
4. Implementer `DONE` → `scripts/review-package BASE HEAD` → task diff 文件
|
|
295
295
|
5. Dispatch **one** task reviewer subagent(brief + report + diff + Global Constraints)
|
|
296
296
|
6. Fix loop 直至 review clean;append `{SDD_DIR}/progress.md`;更新 `status.json` / plan checkbox
|
|
297
297
|
7. Next task
|
|
@@ -320,7 +320,7 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
320
320
|
| 文件交接 | brief / report / diff / `progress.md` 在 `{SDD_DIR}`;dispatch prompt **只给路径**,不贴 plan 全文或 task 历史 |
|
|
321
321
|
| Assignment 字段 | 每个 implement dispatch 须含 `Execution mode: sdd`、`SDD dir`、`Model tier`;§2.0 #5 未 waive 时还须含绝对 `Worktree path` + verified `execution_lease`;**禁止**省略 `Model tier` |
|
|
322
322
|
| 大包 inline | **禁止**把 T1–Tn 或整份 plan 写进 **一个** `fullstack-dev` leaf Assignment 冒充 SDD |
|
|
323
|
-
| 分支 diff | 全部 task 完成后 `review-package MERGE_BASE HEAD` → `{SDD_DIR}/review/` branch diff → plan QC tri(N=3) |
|
|
323
|
+
| 分支 diff | 全部 task 完成后 skill **`mstar-sdd`** → `scripts/review-package MERGE_BASE HEAD` → `{SDD_DIR}/review/` branch diff → plan QC tri(N=3) |
|
|
324
324
|
|
|
325
325
|
Iteration Phase 2 附加:
|
|
326
326
|
|
|
@@ -475,7 +475,8 @@ Prefer **`archived/residuals/`**; migrate and delete history key when possible.
|
|
|
475
475
|
# Replace .mstar with your resolved {HARNESS_DIR}; legacy projects may use .agents.
|
|
476
476
|
jq '.residual_findings["01-data-infrastructure"] // .metadata.residual_findings["01-data-infrastructure"]' .mstar/status.json
|
|
477
477
|
jq '.entries[] | select(.id == "R1")' .mstar/archived/residuals/01-data-infrastructure.json
|
|
478
|
-
|
|
478
|
+
# skill mstar-plan-artifacts → scripts/tech-debt-rollup.sh (not a consumer cwd path)
|
|
479
|
+
bash <mstar-plan-artifacts>/scripts/tech-debt-rollup.sh .mstar/status.json
|
|
479
480
|
```
|
|
480
481
|
|
|
481
482
|
(`//` right-hand side = legacy read path.)
|
|
@@ -508,8 +509,9 @@ Append-only log for merge closure, batch archive, `tech_debt_summary` refresh, e
|
|
|
508
509
|
**Compute (canonical):** run the read-only script (do **not** hand-count):
|
|
509
510
|
|
|
510
511
|
```bash
|
|
511
|
-
#
|
|
512
|
-
|
|
512
|
+
# Resolve from skill mstar-plan-artifacts → scripts/tech-debt-rollup.sh
|
|
513
|
+
# Pass path to status.json if not .mstar/status.json
|
|
514
|
+
bash <mstar-plan-artifacts>/scripts/tech-debt-rollup.sh .mstar/status.json
|
|
513
515
|
```
|
|
514
516
|
|
|
515
517
|
- Prints computed `total_open`, `by_severity`, `by_target`, `by_plan`.
|
|
@@ -65,7 +65,7 @@ description: Morning Star (启明星) harness 计划目录约定 —— `{HARNES
|
|
|
65
65
|
PM 在需要持久化追踪时:
|
|
66
66
|
|
|
67
67
|
1. 建 `.mstar/`、`plans/`、`status.json`(空模板见 **`mstar-plan-artifacts/templates/status.empty.json`**)
|
|
68
|
-
2. 可选 `notes.json`(模板 **`mstar-plan-artifacts/templates/notes.empty.json`**)、`knowledge/`、`iterations/`、`{HARNESS_DIR}/specs/`、`sdd/`(空目录占位;运行时 per-plan 子目录由
|
|
68
|
+
2. 可选 `notes.json`(模板 **`mstar-plan-artifacts/templates/notes.empty.json`**)、`knowledge/`、`iterations/`、`{HARNESS_DIR}/specs/`、`sdd/`(空目录占位;运行时 per-plan 子目录由 skill **`mstar-sdd`** → `scripts/sdd-workspace` 创建)
|
|
69
69
|
3. 项目根 `.gitignore` 追加 Morning Star **进程产物**忽略集(见下文「Git 跟踪策略」)— CLI `init` 可自动添加
|
|
70
70
|
4. Git:**进程本地、结果共享** — 默认跟踪 `{HARNESS_DIR}/AGENTS.md`、`{KNOWLEDGE_DIR}/**`、`{SPECS_DIR}/**`;`plans/`、`iterations/`、`status.json` 等为**本地会话 SSOT**,默认 gitignored。跨 clone 持久 handoff = knowledge + specs + `{HARNESS_DIR}/AGENTS.md`(及根 `CONCEPTS.md` / `STRATEGY.md` 若使用);须跨 clone 的 residual 须提升(compound)或写入 tracked results — **勿**默认 `git add` `status.json` / `plans/`。
|
|
71
71
|
|
package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
|
|
15
15
|
1. 创建 `{HARNESS_DIR}`(推荐 `.mstar/`)与 `{PLAN_DIR}`(推荐 `.mstar/plans/`)。
|
|
16
16
|
2. 初始化 `status.json`:从 **`mstar-plan-artifacts/templates/status.empty.json`** 复制;residual canonical 见 **`mstar-plan-artifacts` SKILL.md**;字段与生命周期见 **`mstar-plan-artifacts/references/status-and-residuals.md`**。
|
|
17
|
-
3. 初始化可选 `notes.json`(**`mstar-plan-artifacts/templates/notes.empty.json`**);`sdd/` 空目录占位(per-plan 子目录由
|
|
17
|
+
3. 初始化可选 `notes.json`(**`mstar-plan-artifacts/templates/notes.empty.json`**);`sdd/` 空目录占位(per-plan 子目录由 skill **`mstar-sdd`** → `scripts/sdd-workspace` 创建)。
|
|
18
18
|
4. 项目根 `.gitignore` 追加 Morning Star **进程产物**忽略集(canonical snippet → `mstar-plan-conventions` SKILL.md「Git 跟踪策略」;legacy `.agents/` 有等价表)。
|
|
19
19
|
5. **Profile B**(统一 Done 压缩)时另建 `{HARNESS_DIR}/archived/plans/` 与 `archived/plans-done.json`(自 **`mstar-plan-artifacts/templates/plans-done.empty.json`** 复制;schema 仅 `{ "plans": [] }`,见 **`mstar-plan-artifacts/references/done-compaction.md`**)。
|
|
20
20
|
6. 可选:创建 `{ITERATION_DIR}`(`iterations/` + `README.md`)与 `{KNOWLEDGE_DIR}`(`knowledge/` + `README.md`);`{HARNESS_DIR}/specs/`(解析后的 `{SPECS_DIR}` 默认落点);内容边界见 `mstar-plan-conventions` SKILL.md 与 `references/knowledge-and-designs.md`。
|
|
@@ -137,7 +137,7 @@ When `metadata.control_worktree_path` is set and worktree mode is **not** waived
|
|
|
137
137
|
| **`Worktree path`** | Absolute **feature** checkout (`execution_lease.worktree_path`) — product/source edits only |
|
|
138
138
|
| **`Control harness root`** | Absolute `<control_worktree_path>/{HARNESS_DIR}` |
|
|
139
139
|
| **`Plan Path`** | Absolute under control harness (not relative from feature cwd) |
|
|
140
|
-
| **`SDD dir`** | Absolute under control harness; run `sdd-workspace` with `MSTAR_CONTROL_ROOT=<control_worktree_path>` when cwd is the feature tree |
|
|
140
|
+
| **`SDD dir`** | Absolute under control harness; run skill **`mstar-sdd`** → `scripts/sdd-workspace` with `MSTAR_CONTROL_ROOT=<control_worktree_path>` when cwd is the feature tree |
|
|
141
141
|
|
|
142
142
|
Do **not** waive worktree because default-gitignored `plans/` are missing under the feature checkout — see `mstar-branch-worktree` 「Harness path SSOT under default gitignore」.
|
|
143
143
|
## Completion Report Template
|
|
@@ -39,12 +39,12 @@ Batch all findings for the human in one message. If clean, proceed silently.
|
|
|
39
39
|
## Per-task loop (PM only)
|
|
40
40
|
|
|
41
41
|
1. Record `BASE_SHA` (never use `HEAD~1` later)
|
|
42
|
-
2. `sdd-workspace <plan-id>` → `SDD_DIR`(iteration L1 从 feature cwd 调用时:`MSTAR_CONTROL_ROOT=<control_worktree_path>` 或 `sdd-workspace <plan-id> <control_worktree_path>`;缺 status.json 的 linked worktree 会 fail closed)
|
|
43
|
-
3. `task-brief <plan> N` → brief file
|
|
42
|
+
2. skill **`mstar-sdd`** → `scripts/sdd-workspace <plan-id>` → `SDD_DIR`(iteration L1 从 feature cwd 调用时:`MSTAR_CONTROL_ROOT=<control_worktree_path>` 或 `scripts/sdd-workspace <plan-id> <control_worktree_path>`;缺 status.json 的 linked worktree 会 fail closed)
|
|
43
|
+
3. `scripts/task-brief <plan> N` → brief file
|
|
44
44
|
4. Dispatch implementer:
|
|
45
45
|
- **`SDD implementer session: fresh`** (default) — new subagent; templates: `references/implementer-prompt.md`
|
|
46
46
|
- **`SDD implementer session: sticky`** — first task: same as fresh + write `{SDD_DIR}/implementer-session.json` with `host_agent_id`; later tasks: host **resume** + `references/implementer-continuation-prompt.md` (see **`references/sticky-implementer-session.md`**)
|
|
47
|
-
5. On `DONE`: `review-package BASE HEAD` → diff file
|
|
47
|
+
5. On `DONE`: `scripts/review-package BASE HEAD` → diff file
|
|
48
48
|
6. Dispatch **fresh** task reviewer — **`subagent_type: generalPurpose`** (L2; **not** `qc-specialist*`) — brief, report, diff, Global Constraints — `references/task-reviewer-prompt.md` — **never** sticky resume for reviewers
|
|
49
49
|
7. Fix loop for Critical/Important; re-review until approved
|
|
50
50
|
8. Append `progress.md`; update `status.json` `task_commits[]` and `implementer-session.json` `last_task` if sticky
|
|
@@ -81,7 +81,7 @@ Host mapping → **`mstar-host`** references (`model` / Task field).
|
|
|
81
81
|
|
|
82
82
|
## After all tasks
|
|
83
83
|
|
|
84
|
-
1. `review-package MERGE_BASE HEAD` → branch diff in `{SDD_DIR}/review/`
|
|
84
|
+
1. `scripts/review-package MERGE_BASE HEAD` → branch diff in `{SDD_DIR}/review/`
|
|
85
85
|
2. PM dispatches **plan QC tri-review (L3)** — **`QC mode: full tri-review`**, **N=3** — with branch review-package path and report paths under `{SDD_DIR}/review/` → **`mstar-review-qc`** · **`mstar-dispatch-gates`**. Layer SSOT → **`mstar-review-qc/references/review-responsibility-boundaries.md`**. PM writes `{SDD_DIR}/review/qc-consolidated.md` and durable main-plan gate summary. **Mandatory whenever `Execution mode: sdd`** (single-plan or iteration).
|
|
86
86
|
3. Critical/Important QC findings → **one** fix dispatch (full list), then targeted re-review
|
|
87
87
|
4. QA gate → **`mstar-harness-core`** Done rules; PM **`mstar-roles/references/project-manager/qa-trigger-matrix.md`**
|
|
@@ -109,13 +109,15 @@ Minor findings → `## Minor (for plan QC)` section in same file.
|
|
|
109
109
|
|
|
110
110
|
## Scripts
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
Scripts live under this skill: **`mstar-sdd`** → `scripts/<name>`.
|
|
113
|
+
|
|
114
|
+
Resolve the loaded **`mstar-sdd`** skill directory first, then run the script by skill-relative path. **Do not** treat `skills/mstar-sdd/scripts/...` as a consumer-project cwd path — that layout exists only in the harness source tree (and OpenCode's bundled `harness-skills/mstar-sdd/scripts/`).
|
|
113
115
|
|
|
114
116
|
| Script | Usage |
|
|
115
117
|
|--------|--------|
|
|
116
|
-
| `sdd-workspace` | `PLAN_ID [CONTROL_ROOT]` → creates `{SDD_DIR}` under control harness when set (`MSTAR_CONTROL_ROOT` or 2nd arg); fail closed on linked worktree without `status.json` |
|
|
117
|
-
| `task-brief` | `PLAN_FILE TASK_N [OUTFILE]` |
|
|
118
|
-
| `review-package` | `BASE HEAD [OUTFILE]` |
|
|
118
|
+
| `scripts/sdd-workspace` | `PLAN_ID [CONTROL_ROOT]` → creates `{SDD_DIR}` under control harness when set (`MSTAR_CONTROL_ROOT` or 2nd arg); fail closed on linked worktree without `status.json` |
|
|
119
|
+
| `scripts/task-brief` | `PLAN_FILE TASK_N [OUTFILE]` |
|
|
120
|
+
| `scripts/review-package` | `BASE HEAD [OUTFILE]` |
|
|
119
121
|
|
|
120
122
|
## References
|
|
121
123
|
|
|
@@ -4,12 +4,14 @@ PM and subagents move artifacts as **files**, not pasted text. Pasted content st
|
|
|
4
4
|
|
|
5
5
|
## Before implementer dispatch
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Resolve scripts from skill **`mstar-sdd`** → `scripts/…` (loaded skill directory). Do **not** run `skills/mstar-sdd/scripts/…` from a consumer project cwd.
|
|
8
|
+
|
|
9
|
+
1. `export SDD_DIR=$(<mstar-sdd>/scripts/sdd-workspace <plan-id>)`
|
|
8
10
|
- Iteration L1 (implementer cwd = feature worktree):
|
|
9
11
|
`export MSTAR_CONTROL_ROOT=<control_worktree_path>`
|
|
10
12
|
or `sdd-workspace <plan-id> <control_worktree_path>`
|
|
11
13
|
so `{SDD_DIR}` lands on the control harness (default-gitignored plans/status/sdd). Do not create a second SDD tree under the feature checkout.
|
|
12
|
-
2.
|
|
14
|
+
2. `<mstar-sdd>/scripts/task-brief <plan-file> <N> "$SDD_DIR/task-N-brief.md"`
|
|
13
15
|
3. Record `BASE_SHA` (`git rev-parse HEAD` before dispatch).
|
|
14
16
|
4. Dispatch implementer with:
|
|
15
17
|
- One line scene-setting (where task fits)
|
|
@@ -31,7 +33,7 @@ Implementer writes full report to `task-N-report.md`. Return to PM only:
|
|
|
31
33
|
## After implementer DONE
|
|
32
34
|
|
|
33
35
|
1. `HEAD_SHA=$(git rev-parse HEAD)`
|
|
34
|
-
2.
|
|
36
|
+
2. `<mstar-sdd>/scripts/review-package "$BASE_SHA" "$HEAD_SHA" "$SDD_DIR/review-....diff"`
|
|
35
37
|
3. Dispatch task reviewer with: brief path, report path, diff path, Global Constraints (verbatim from plan).
|
|
36
38
|
|
|
37
39
|
**Never use `HEAD~1` as BASE** — multi-commit tasks truncate.
|
|
@@ -63,7 +65,7 @@ After all tasks:
|
|
|
63
65
|
```bash
|
|
64
66
|
MERGE_BASE=$(git merge-base <target-branch> HEAD)
|
|
65
67
|
mkdir -p "$SDD_DIR/review"
|
|
66
|
-
|
|
68
|
+
<mstar-sdd>/scripts/review-package "$MERGE_BASE" HEAD "$SDD_DIR/review/branch-review-....diff"
|
|
67
69
|
```
|
|
68
70
|
|
|
69
71
|
Pass **branch** diff path and bundle report paths (`$SDD_DIR/review/qc1.md` …) to QC dispatch — not task-level diffs. Raw QC/QA files stay in the gitignored review bundle; PM records durable summary and open residuals in **local** plan/`status.json` (session SSOT) and promotes cross-clone decisions into tracked knowledge/specs/`AGENTS.md` per `mstar-plan-conventions` git policy.
|
|
@@ -103,6 +103,17 @@ Optional files to read only when needed.
|
|
|
103
103
|
|
|
104
104
|
Keep `SKILL.md` focused on the main execution path. Move long examples, templates, schemas, and detailed variants into `references/`, `templates/`, or `scripts/`.
|
|
105
105
|
|
|
106
|
+
## Skill-relative script and asset paths
|
|
107
|
+
|
|
108
|
+
When a skill ships executables or assets under `scripts/` / `templates/` / `references/`, name them as **skill → relative path**:
|
|
109
|
+
|
|
110
|
+
- Good: skill **`mstar-sdd`** → `scripts/sdd-workspace`
|
|
111
|
+
- Good: `<mstar-sdd>/scripts/sdd-workspace` (placeholder for the loaded skill root)
|
|
112
|
+
- Bad in runtime docs: `skills/mstar-sdd/scripts/sdd-workspace` as if it were a consumer-project cwd path
|
|
113
|
+
- Bad in shipped rules / CLI notes: `skills/mstar-host/references/…` as a consumer cwd path — use **`mstar-host`** → `references/…` (omp may also cite `skill://mstar-host/references/…`)
|
|
114
|
+
|
|
115
|
+
Agents discover skills by **name**; they often miss files when docs present a full repo-relative path and they search that literal string under the app checkout. Resolve the loaded skill directory first, then append `scripts/…` / `references/…`. **How** to resolve differs by host — use **`mstar-host`** § Resolve loaded skill root (omp `skill://`, Cursor plugin checkout under `~/.cursor/plugins/…` or `.cursor/plugins/…`, OpenCode `harness-skills/`, Codex/Kimi/ZCode plugin mounts). Reserve `skills/<name>/…` only for harness-repo maintenance notes that explicitly say "from this repository root".
|
|
116
|
+
|
|
106
117
|
## Progressive Disclosure
|
|
107
118
|
|
|
108
119
|
Use three levels:
|