@mstar-harness/opencode 1.0.0 → 1.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/CHANGELOG.md +254 -0
  2. package/README.md +62 -0
  3. package/harness-commands/iteration-drive.md +18 -8
  4. package/harness-commands/iteration-start.md +13 -14
  5. package/harness-commands/mstar-bootstrap.md +4 -5
  6. package/harness-skills/mstar-compound/SKILL.md +24 -2
  7. package/harness-skills/mstar-compound-refresh/SKILL.md +1 -1
  8. package/harness-skills/mstar-dispatch-gates/SKILL.md +3 -2
  9. package/harness-skills/mstar-host/references/codex.md +1 -1
  10. package/harness-skills/mstar-host/references/cursor.md +17 -1
  11. package/harness-skills/mstar-host/references/opencode.md +3 -0
  12. package/harness-skills/mstar-host/references/parallel-dispatch.md +1 -1
  13. package/harness-skills/mstar-iteration/SKILL.md +58 -16
  14. package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +94 -0
  15. package/harness-skills/mstar-iteration/references/iteration-compass-template.md +15 -0
  16. package/harness-skills/mstar-iteration/references/iteration-corpus-hygiene.md +51 -0
  17. package/harness-skills/mstar-iteration/references/iteration-workspace-readme-template.md +29 -0
  18. package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +24 -13
  19. package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +3 -0
  20. package/harness-skills/mstar-roles/references/architect.md +1 -1
  21. package/harness-skills/mstar-roles/references/product-manager.md +1 -1
  22. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +15 -0
  23. package/harness-skills/mstar-roles/references/project-manager.md +8 -2
  24. package/harness-skills/mstar-roles/references/writing-specialist.md +1 -0
  25. package/harness-skills/mstar-sdd/SKILL.md +13 -5
  26. package/harness-skills/mstar-sdd/references/file-handoffs.md +3 -0
  27. package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
  28. package/harness-skills/mstar-sdd/references/implementer-prompt.md +3 -1
  29. package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
  30. package/harness-skills/pm/SKILL.md +20 -45
  31. package/package.json +4 -2
package/CHANGELOG.md ADDED
@@ -0,0 +1,254 @@
1
+ # Changelog
2
+
3
+ All notable changes to the `@mstar-harness/opencode` package are documented in this file.
4
+
5
+ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface releases.
6
+
7
+ ## 1.0.2
8
+
9
+ - Bundled skills/commands: iteration artifact boundaries (`{ITERATION_DIR}/<id>/` workspace, specs-first start, compound workspace promotion at close); new iteration references; corpus hygiene aligned.
10
+
11
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.0.2**.
12
+
13
+ ## 1.0.1
14
+
15
+ - Bundled skills/commands: `iteration-drive` + `mstar-iteration` Phase 2 per-task SDD mandate; optional sticky implementer session (`resume` + ledger); thin `pm` skill shim; routing-eval v14.
16
+
17
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.0.1**.
18
+
19
+ ## 1.0.0
20
+
21
+ - Bundle `mstar-sdd` skill + scripts; SDD mandatory plan QC tri-review (`Execution mode: sdd`); inline/hotfix single-seat; plan template and SDD metadata fields.
22
+
23
+ See root [CHANGELOG.md](../../CHANGELOG.md) **1.0.0**.
24
+
25
+ ## 0.7.9
26
+
27
+ - Bundled commands/skills: Assignment plain role ids across PM templates, dispatch gates, branch-worktree, iteration commands, opencode host hygiene, and role NEVER rules — avoids OpenCode `@` auto-dispatch in harness prose.
28
+
29
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.9**.
30
+
31
+ ## 0.7.8
32
+
33
+ - Bundled commands/skills: `mstar-iteration` Phase 4–5 (PR delivery + merge-ready loop); `iteration-drive` sequences through Phase 5 with optional greploop/babysit helpers; core index and anti-patterns updated.
34
+
35
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.8**.
36
+
37
+ ## 0.7.7
38
+
39
+ - Bundled commands/skills: standalone `mstar-*` invariant; bundle `grill-me` for `/iteration-start` only; remove Context7/OpenViking/Open Design from runtime load paths; distill `open-harness-principles.md` into core and plan-conventions references; keep Role → typical topic skills matrix in `mstar-roles`.
40
+
41
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.7**.
42
+
43
+ ## 0.7.6
44
+
45
+ - Bundled commands/skills: commands–skills layering for iteration (`iteration-start` / `iteration-drive` orchestration vs `mstar-iteration` / `mstar-dispatch-gates` SSOT); hardened dispatch gates, Phase 2→3→PR transitions, canonical host dispatch (no Mode A/B/C fallbacks); Phase 1 Review & Edit chain is **sequential** product-manager → architect → writing-specialist.
46
+
47
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.6**.
48
+
49
+ ## 0.7.5
50
+
51
+ - Bundled commands/skills: explicit iteration branch policy — `iteration_base_branch`, `spec_integration_branch`, and `target_branch` required in compass/status metadata; no silent default to `main` for integration branch or PR target. Hardened `iteration-start` / `iteration-drive` gates and QC merge-base rules.
52
+
53
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.5**.
54
+
55
+ ## 0.7.4
56
+
57
+ - Bundled skills/docs: remove Superpowers runtime dependency from Morning Star guidance and host docs; assignments now rely on native mstar dispatch, worktree, plan, review, and evidence contracts.
58
+ - Bundled skills: add `mstar-skill-authoring`, delete `mstar-execution-practices`, and fold review feedback handling into `mstar-coding-behavior`.
59
+
60
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.4**.
61
+
62
+ ## 0.7.3
63
+
64
+ - Bundled commands/skills: `mstar-iteration` Phase 3 close is now an explicit gate after all plans are `Done`; close requires compass normalization when needed, compound Phase 6 knowledge indexing, roadmap update, completed frontmatter, and close checklists before PR.
65
+ - Bundled docs: README command table now includes `/mstar-bootstrap`; workflow and skill overview now match the iteration lifecycle.
66
+
67
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.3**.
68
+
69
+ ## 0.7.2
70
+
71
+ - Docs only at package level: root **0.7.2** documents CLI Cursor install layout (real git checkout at plugin path, not symlink). Re-bundle on publish if CLI dist changed.
72
+
73
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.2**.
74
+
75
+ ## 0.7.1
76
+
77
+ - Bundled commands/skills: `/iteration-start` §5 Review & Edit chain is a hard gate before integration branch commit — Task dispatch for product-manager, architect, writing-specialist; evidence is edited docs + locked compass (no iteration `reports/` artifacts). Synced in `mstar-iteration` §1.6, `pm`, `mstar-dispatch-gates`, `mstar-harness-core`.
78
+
79
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.7.1**.
80
+
81
+ ## 0.6.22
82
+
83
+ - Bundled skills: `mstar-dispatch-gates`, `mstar-roles` (qc-specialist-shared, dispatch-and-assignment) — replace prohibition-based anti-recursion with identity-deprivation framework. Assignment template gains IDENTITY + CAPABILITY BOUNDARY blocks before prohibitions, shifting from "I must not dispatch" (negation) to "I am a leaf executor; Task is not my tool" (capability deprivation).
84
+
85
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.22**.
86
+
87
+ ## 0.6.21
88
+
89
+ - Bundled skills: `mstar-design-md` — add YAML frontmatter as SSOT for token values in templates and spec. Bump template format version to 0.1.0.
90
+
91
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.21**.
92
+
93
+ ## 0.6.20
94
+
95
+ - Bundled commands: `/iteration-start` §5 changed to "Review & Edit Chain" — each reviewer now directly edits documents rather than only flagging issues. PM only does the final lock.
96
+
97
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.20**.
98
+
99
+ ## 0.6.19
100
+
101
+ - Bundled skills: `mstar-coding-behavior` strengthened with distilled Ponytail principles — YAGNI gate, The Ladder (7-level decision hierarchy), "deletion over addition / boring over clever", `simplify:` marker discipline, "bug fix = root cause", and "minimal check for non-trivial logic".
102
+
103
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.19**.
104
+
105
+ ## 0.6.18
106
+
107
+ - Bundled commands: `/iteration-start` now includes explicit `## 0. Boot` section aligned with `/iteration-drive`, loading core harness entry and PM role identity before research.
108
+
109
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.18**.
110
+
111
+ ## 0.6.17
112
+
113
+ - Bundled commands: `/iteration-drive` PR target now resolved from iteration metadata (`target_branch` in `status.json`), defaulting to `main` when not set.
114
+
115
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.17**.
116
+
117
+ ## 0.6.16
118
+
119
+ - Bundled commands: Add `/iteration-drive` command that invokes the PM Autonomous Execute driver to push all non-`Done` plans to completion (implement → QC → QA → Done loop, then optional PR to `main`).
120
+
121
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.16**.
122
+
123
+ ## 0.6.15
124
+
125
+ - Bundled commands: New `harness-commands/` directory bundle and `loadBundledCommands()` registration in the config hook. Adds `/iteration-start` command that guides PM through iteration bootstrap (research, explore, lock, compass/plans, review chain, integration branch).
126
+
127
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.15**.
128
+
129
+ ## 0.6.11
130
+
131
+ - Bundled agents: Cursor-first frontmatter on all role shells so hosts that share `agents/*.md` parse `name`/`description`/`model` before OpenCode fields.
132
+
133
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.11**.
134
+
135
+ ## 0.6.10
136
+
137
+ - Bundled skills: Profile B `archived/plans-done.json` schema is `{ "plans": [<plan-id>, ...] }` only; add `plans-done.empty.json` template and bootstrap/PM init notes.
138
+
139
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.10**.
140
+
141
+ ## 0.6.9
142
+
143
+ - Bundled skills: universal `pm` orchestration entry (Cursor/Codex `/pm`, OpenCode PM role switch) and Autonomous Execute driver (`status.json` backlog, `spec_integration_branch`, per-plan feature branches, host todos).
144
+
145
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.9**.
146
+
147
+ ## 0.6.8
148
+
149
+ - Bundled skills: targeted QC re-review after fixes (owner seat only, in-place reports), short QC report basenames under `reports/<plan-id>/` (`qc1.md` …).
150
+
151
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.8**.
152
+
153
+ ## 0.6.7
154
+
155
+ - Bundled skills: Codex Plan / Goal Mode bridge for keeping `/plan`, `update_plan`, `/goal`, and goal progress aligned with `.mstar/` SSOT.
156
+
157
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.7**.
158
+
159
+ ## 0.6.6
160
+
161
+ - Bundled skills/agents: Codex custom-agent source files, `.mstar/` harness defaults, and updated host install docs.
162
+
163
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.6**.
164
+
165
+ ## 0.6.5
166
+
167
+ - Bundled skills: Durable Roadmap Gate for staged/partial/temporary work, plus routing-eval v8.
168
+
169
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.5**.
170
+
171
+ ## 0.6.4
172
+
173
+ - Bundled skills: Cursor Plan Build resume contract and routing-eval v7.
174
+
175
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.4**.
176
+
177
+ ## 0.6.3
178
+
179
+ - Bundled skills: slim `/pm` with dispatch-first + `/pm`-only rules; PM shell pointer.
180
+
181
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.3**.
182
+
183
+ ## 0.6.2
184
+
185
+ - Bundled skills: `/pm` Autonomous Execute push (iteration driver, multi-plan); PM shell cross-reference.
186
+
187
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.2**.
188
+
189
+ ## 0.6.1
190
+
191
+ - Bundled skills: `tech-debt-rollup.sh`, PM dual fullstack spread defaults, routing-eval v6.
192
+
193
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.1**.
194
+
195
+ ## 0.6.0
196
+
197
+ - Unified **`mstar-host`** in bundled `harness-skills/`; removed separate package `skills/` host path.
198
+
199
+ See root [CHANGELOG.md](../../CHANGELOG.md) **0.6.0**.
200
+
201
+ ## 0.5.1
202
+
203
+ ### Bundled harness skills (`harness-skills/` at publish)
204
+
205
+ - Cursor Plan mode dual-write bridge (`mstar-host`, `cursor-plan-mode-bridge`, `pm`, `mstar-harness-core`); `rules/mstar-cursor-plan-mode.mdc`.
206
+
207
+ See root [CHANGELOG.md](../../CHANGELOG.md).
208
+
209
+ ## 0.5.0
210
+
211
+ ### Bundled harness skills (`harness-skills/` at publish)
212
+
213
+ - Align bundled assets with the 0.5.0 harness release, including Codex plugin validation fixes in shared skill metadata.
214
+
215
+ See root [CHANGELOG.md](../../CHANGELOG.md).
216
+
217
+ ## 0.4.1
218
+
219
+ ### Bundled harness skills (`harness-skills/` at publish)
220
+
221
+ - **`mstar-plan-artifacts/templates/`**: `status.empty.json` and `notes.empty.json` moved from `mstar-plan-conventions` (paths in skill text updated).
222
+
223
+ See root [CHANGELOG.md](../../CHANGELOG.md).
224
+
225
+ ## 0.4.0
226
+
227
+ ### Bundled harness skills (`harness-skills/` at publish)
228
+
229
+ - **Topic skill split**: `mstar-phase-gates`, `mstar-dispatch-gates`, `mstar-branch-worktree`, `mstar-plan-artifacts` (status/residual included); slimmer `mstar-harness-core` and `mstar-plan-conventions`.
230
+ - **`mstar-roles`**: Per-role required skill lists; host adapters updated for on-demand topic loading.
231
+ - **`mstar-plan-conventions`**: `{ITERATION_DIR}`, `{KNOWLEDGE_DIR}`, content boundaries; optional `iteration_compass` / `iteration_refs`.
232
+ - **`mstar-phase-gates`**: Prepare **`clarify` core discipline** (shared understanding, explore before asking, recommended answers).
233
+
234
+ See root [CHANGELOG.md](../../CHANGELOG.md) for full release notes.
235
+
236
+ ## 0.3.2
237
+
238
+ ### Bundled harness skills (`harness-skills/` at publish)
239
+
240
+ - **`mstar-plan-conventions`**: Formalize `{ITERATION_DIR}` (`{HARNESS_DIR}/iterations/`) and `{KNOWLEDGE_DIR}` (`{HARNESS_DIR}/knowledge/`); add `docs/` vs harness subtree content boundaries; optional `iteration_compass` / `iteration_refs` in `status.json` metadata.
241
+ - **`mstar-harness-core`**: Embed Prepare **`clarify` core discipline** — walk the design decision tree to shared understanding, explore the codebase before asking the user, provide a recommended answer per question.
242
+
243
+ ## 0.3.1
244
+
245
+ - Align package version with monorepo **0.3.1** (see root `CHANGELOG.md` for harness and host-adapter notes bundled via `harness-skills/` / `harness-agents/`).
246
+
247
+ ## 0.3.0
248
+
249
+ - Align package version with monorepo **0.3.0** (see root `CHANGELOG.md` for harness and host-adapter notes bundled via `harness-skills/` / `harness-agents/`).
250
+
251
+ ## 0.2.0
252
+
253
+ - Publish OpenCode plugin with bundled repo `skills/` and `agents/` (`bundle-assets` / root `postinstall`).
254
+ - Remove cwd-based harness path resolution; consume bundled assets only.
package/README.md ADDED
@@ -0,0 +1,62 @@
1
+ # @mstar-harness/opencode
2
+
3
+ Morning Star (启明星) harness plugin for [OpenCode](https://opencode.ai).
4
+
5
+ Install this package via OpenCode’s `plugin` array — it bundles `mstar-*` skills, role agents, and iteration commands so multi-role workflows (PM routing, SDD implement, QC tri-review, iteration lifecycle) work the same way as in the Cursor and Codex plugins.
6
+
7
+ ## Install
8
+
9
+ Add to `opencode.json` (global or project):
10
+
11
+ ```json
12
+ {
13
+ "plugin": ["@mstar-harness/opencode@latest"]
14
+ }
15
+ ```
16
+
17
+ Restart OpenCode.
18
+
19
+ Or use the installer CLI:
20
+
21
+ ```bash
22
+ npx @mstar-harness/cli init --target opencode
23
+ ```
24
+
25
+ ## What you get
26
+
27
+ | Path in package | Contents |
28
+ |-----------------|----------|
29
+ | `harness-skills/` | `mstar-harness-core`, `mstar-iteration`, `mstar-sdd`, roles, phase/dispatch gates, … |
30
+ | `harness-agents/` | Role shells (`project-manager`, `fullstack-dev`, `qc-specialist`, …) |
31
+ | `harness-commands/` | `/iteration-start`, `/iteration-drive`, `/mstar-bootstrap` |
32
+
33
+ The plugin resolves **only paths inside this package** — not `process.cwd()/skills`, so your app repo root does not affect harness loading.
34
+
35
+ ## Quick start
36
+
37
+ 1. Install the plugin (above).
38
+ 2. In OpenCode, start with the **Project Manager** agent (`project-manager`).
39
+ 3. For a full iteration: run **`/iteration-start`**, then **`/iteration-drive`** when plans are ready.
40
+
41
+ Entry skill: **`mstar-harness-core`** (loaded before other `mstar-*` skills).
42
+
43
+ ## Docs
44
+
45
+ - [INSTALL.md](./INSTALL.md) — setup, monorepo checkout, migration from legacy git plugin, troubleshooting
46
+ - [Monorepo README](https://github.com/btspoony/mstar-harness#readme) — cross-host overview
47
+ - [CHANGELOG.md](./CHANGELOG.md) — package release notes
48
+
49
+ ## Development (this monorepo)
50
+
51
+ From the repository root:
52
+
53
+ ```bash
54
+ bun install # postinstall bundles harness-skills/ + harness-agents/
55
+ bun run opencode:bundle-assets # if you used --ignore-scripts
56
+ ```
57
+
58
+ Plugin entry: `packages/opencode/src/mstar.ts` → `dist/mstar.js`.
59
+
60
+ ## License
61
+
62
+ MIT — see [LICENSE](https://github.com/btspoony/mstar-harness/blob/main/LICENSE).
@@ -30,6 +30,7 @@ Phase 2: Autonomous Execute → Phase 3: iteration-close → Phase 4: Create
30
30
  | 禁止(PM 线程) | 必须 |
31
31
  |-----------------|------|
32
32
  | Write/Edit/Shell 产品代码、写测试、跑 QC 审查(Phase 2) | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
33
+ | **多 task plan 用 inline 大包派发**(整份 plan / T1–Tn 贴进一个 dev Assignment) | **SDD**:`mstar-sdd` per-task 循环 — `task-brief` → implementer → `review-package` → task reviewer → `progress.md` |
33
34
  | 只写 Assignment 就进入下一 gate | 同轮 dispatch:`Subagent invokes issued: N`(N = Assignment 条数) |
34
35
  | 最后一个 plan `Done` 后直接开 PR / 汇报结束 | **Phase 3 → 4 → 5** 顺序执行 |
35
36
  | Phase 4 开 PR 后停止 | Phase 5 loop 至 merge-ready;**禁止**未过 §5.5 就结束会话 |
@@ -50,11 +51,12 @@ Phase 2: Autonomous Execute → Phase 3: iteration-close → Phase 4: Create
50
51
 
51
52
  1. `mstar-harness-core`
52
53
  2. `mstar-roles` → `references/project-manager.md`
53
- 3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**(PM role identity + dispatch-first rules
54
- 4. `mstar-iteration` **§ Phase 2–5**(§3 close gate;§4 PR delivery;§5 merge-ready loop)
55
- 5. `mstar-compound` Phase 3 §3.2 前加载(含 Phase 6 索引登记)
56
- 6. `mstar-dispatch-gates` + host reference
57
- 7. `mstar-plan-artifacts`, `mstar-plan-conventions`, `mstar-branch-worktree`
54
+ 3. `mstar-iteration` → **§ Phase 2–5**(§3 close gate;§4 PR delivery;§5 merge-ready loop
55
+ 4. `mstar-compound` Phase 3 §3.2 前加载(含 Phase 6 索引登记)
56
+ 5. `mstar-dispatch-gates` + host reference
57
+ 6. **`mstar-sdd`** — **before first implement dispatch** in Phase 2(per-task loop SSOT;多 task plan 默认 `Execution mode: sdd`)
58
+ 7. `mstar-review-qc` — before first QC dispatch in Phase 2
59
+ 8. `mstar-plan-artifacts`, `mstar-plan-conventions`, `mstar-branch-worktree`
58
60
 
59
61
  ## Phase 2: Autonomous Execute
60
62
 
@@ -74,9 +76,17 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
74
76
  4. **Integration branch** (§ 2.3) — `git checkout -b <spec_integration_branch> <iteration_base_branch>` when creating(**not** implicit `main`)
75
77
  5. **Per-plan loop** (§ 2.4) — for each non-`Done` plan:
76
78
  - Create plan feature branch from integration
77
- - Dispatch implement subagents (dispatch-first)
79
+ - **SDD implement**(默认 `Execution mode: sdd`;`mstar-sdd` 已载入)— per task **串行**:
80
+ 1. `sdd-workspace <plan-id>` → `{SDD_DIR}`
81
+ 2. `task-brief <plan> N` → `{SDD_DIR}/task-N-brief.md`
82
+ 3. Dispatch **one** implementer subagent(brief + report 路径;`references/implementer-prompt.md` 或 sticky 时 `implementer-continuation-prompt.md`)
83
+ 4. `review-package BASE HEAD` → task diff
84
+ 5. Dispatch **one** task reviewer subagent
85
+ 6. Append `{SDD_DIR}/progress.md`;更新 `status.json` `task_commits[]`(如使用)
86
+ 7. Next task — **never** parallel implementers;同 plan 同 dev 可用 **`SDD implementer session: sticky`**(`mstar-sdd/references/sticky-implementer-session.md`)
87
+ - **禁止**:把整份 plan 或 T1–Tn 全文贴进 implement dispatch;文件交接 SSOT → `mstar-sdd/references/file-handoffs.md`
78
88
  - Update `status.json` + main plan after each Completion Report v2
79
- - QC **full tri-review** (`QC mode: full tri-review`, **N=3**, `mstar-review-qc`) + QA per plan
89
+ - QC **full tri-review** (`QC mode: full tri-review`, **N=3**, `mstar-review-qc`) + branch `review-package` + QA per plan
80
90
  - Merge plan branch → integration branch
81
91
  - Cross-plan progress sync → compass
82
92
  - Next plan
@@ -97,7 +107,7 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
97
107
  |------|---------|------|
98
108
  | 1 | §3.0 / §3.0.5 | Phase 边界;legacy compass 规范化(frontmatter + `## Roadmap Position`) |
99
109
  | 2 | §3.1 | 打印 close entry checklist,全部 `[x]` |
100
- | 3 | §3.2 | Compound;新增 doc 完成 `mstar-compound` Phase 6(`{KNOWLEDGE_DIR}/README.md`) |
110
+ | 3 | §3.2 | Compound + **`<iteration-id>/` workspace promotion**;新增 doc 完成 `mstar-compound` Phase 6(`{KNOWLEDGE_DIR}/README.md`) |
101
111
  | 4 | §3.3 | `## Roadmap Position` current iteration → `delivered`;STRATEGY/tracker 按需更新 |
102
112
  | 5 | §3.4 | frontmatter `status: completed` + `end_date`;Compound Summary + Retrospective |
103
113
  | 6 | §3.5 | 打印 close exit checklist → commit → push |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: iteration-start
3
- description: Start a new harness iteration — research backlog, lock direction with grill-me, produce compass/plans, run mandatory Review & Edit chain via sequential Task dispatch (product-manager architect writing-specialist, each review-and-edit, then PM final lock), then create the integration branch from an explicit base. Not Done until review chain completes, compass is locked, and base/target branches are recorded.
3
+ description: Start a new harness iteration — research, grill-me, compass/plans, Review & Edit chain (long-lived {SPECS_DIR}/ + {ITERATION_DIR}/<id>/ workspace; compound promotes workspace at close only), PM lock, integration branch.
4
4
  agent: project-manager
5
5
  ---
6
6
 
@@ -28,12 +28,11 @@ Detailed workflow → **`mstar-iteration` § Phase 1: iteration-start**(含 §
28
28
 
29
29
  1. `mstar-harness-core`
30
30
  2. `mstar-roles` → `references/project-manager.md`
31
- 3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**
32
- 4. `mstar-iteration` → **§ Phase 1: iteration-start**(迭代范围、compass 模板、§1.6 Review & Edit chain、状态初始化)
33
- 5. `mstar-dispatch-gates`
34
- 6. `mstar-phase-gates` → Prepare(specify → clarify → plan
35
- 7. `mstar-plan-conventions`, `mstar-plan-artifacts`
36
- 8. `mstar-host` → active host reference(invoke 能力)
31
+ 3. `mstar-iteration` → **§ Phase 1: iteration-start**(迭代范围、compass 模板、**§1.5.5 产物边界**、§1.6 Review & Edit chain、状态初始化)
32
+ 4. `mstar-dispatch-gates`
33
+ 5. `mstar-phase-gates` → Prepare(specify → clarify → plan)
34
+ 6. `mstar-plan-conventions`, `mstar-plan-artifacts`
35
+ 7. `mstar-host` → active host reference(invoke 能力)
37
36
 
38
37
  ## 1. Research
39
38
 
@@ -99,12 +98,12 @@ Each role below **reviews and directly edits** the documents. Do not just flag i
99
98
 
100
99
  | # | Role | Required action | Gate |
101
100
  |---|------|-----------------|------|
102
- | 5.1 | **product-manager** | invoke: **edit** compass, plans, `{SPECS_DIR}/`; scope, UX, priorities | 完成后方可 5.2 |
103
- | 5.2 | **architect** | invoke: **edit** compass, plans, specs(含 5.1 修订后版本); contracts, SQL, module boundaries | 5.1 返回后;完成后方可 5.3 |
104
- | 5.3 | **writing-specialist** | invoke: **edit** all iteration docs(含 5.1–5.2 修订后版本); terminology, structure, clarity | 5.2 返回后 |
101
+ | 5.1 | **product-manager** | invoke: **edit** compass, plans, **`{SPECS_DIR}/`**, **`{ITERATION_DIR}/<iteration-id>/`**(`guides/`、`specs/` 按需)— **禁止** `{KNOWLEDGE_DIR}/` 新增 | 完成后方可 5.2 |
102
+ | 5.2 | **architect** | invoke: **edit** compass, plans, **`{SPECS_DIR}/`**, workspace `specs/`(含 5.1 后版本)— **禁止** `{KNOWLEDGE_DIR}/` 新增 | 5.1 返回后;完成后方可 5.3 |
103
+ | 5.3 | **writing-specialist** | invoke: **edit** compass / plans / specs / iteration 文档; **specs corpus hygiene**(全库 `{SPECS_DIR}/` + 既有 `{KNOWLEDGE_DIR}/` 卫生与错放纠正,**不**新增 knowledge)— `mstar-iteration/references/iteration-artifact-boundaries.md` + `iteration-corpus-hygiene.md` | 5.2 返回后 |
105
104
  | 5.4 | **project-manager** | Merge subagent edits; resolve conflicts; **lock** compass (`status: locked`); confirm Prepare gates | 5.3 返回后 |
106
105
 
107
- **Evidence of done** = edited compass / plans / specs on disk + compass `status: locked`. **No** separate iteration review reports under `reports/` unlike per-plan QC, there is no downstream audit chain to preserve.
106
+ **Evidence of done** = edited compass / plans / **specs** / iteration docs on disk + specs corpus hygiene(及既有 knowledge 归档/错放纠正,如有)+ compass `status: locked`. **No** new `{KNOWLEDGE_DIR}/` from this chainknowledge → **`mstar-compound`** @ iteration-close. **No** separate iteration review reports under `reports/`.
108
107
 
109
108
  **Tool rule (hosts with invoke)** — per **`mstar-dispatch-gates`** · specialist review-and-edit dispatch(**顺序链**,非 parallel batch):
110
109
 
@@ -129,9 +128,9 @@ PM must print this block before §6; all `[ ]` must be `[x]`:
129
128
 
130
129
  - [ ] grill-me decisions recorded in compass
131
130
  - [ ] Draft compass + plans + `status.json` registered
132
- - [ ] product-manager invoke completed — compass / plans / specs edited
133
- - [ ] architect invoke completed — compass / specs edited
134
- - [ ] writing-specialist invoke completed — iteration docs edited
131
+ - [ ] product-manager invoke completed — compass / plans / specs / **`<iteration-id>/` workspace**(按需);**未**向 `{KNOWLEDGE_DIR}/` 新增
132
+ - [ ] architect invoke completed — compass / **specs** edited;**未**向 `{KNOWLEDGE_DIR}/` 新增
133
+ - [ ] writing-specialist invoke completed — specs + iteration docs edited;**specs corpus hygiene** done(全库 `{SPECS_DIR}/`;既有 knowledge 仅卫生/归档;错放已迁回 `iterations/` 或 archive)
135
134
  - [ ] PM final lock: compass `status: locked`; Prepare gates pass (blocked plans documented)
136
135
  - [ ] Branch policy locked: `iteration_base_branch`, `spec_integration_branch`, and `target_branch` recorded in compass / `status.json`
137
136
  - [ ] **THEN**: git commit + push `iteration/<iteration-id>`
@@ -14,11 +14,10 @@ Distill a coherent knowledge baseline from the current project — useful when t
14
14
 
15
15
  1. `mstar-harness-core`
16
16
  2. `mstar-roles` → `references/project-manager.md`
17
- 3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**
18
- 4. `mstar-plan-conventions`(路径符号)
19
- 5. `mstar-strategy` → **§ STRATEGY.md structure** + **§ Creating STRATEGY.md**
20
- 6. `mstar-compound` → **references/concepts-vocabulary.md**(CONCEPTS.md 规则)
21
- 7. `mstar-compound-refresh` → **§ Core rules**(知识维护基线)
17
+ 3. `mstar-plan-conventions`(路径符号)
18
+ 4. `mstar-strategy` → **§ STRATEGY.md structure** + **§ Creating STRATEGY.md**
19
+ 5. `mstar-compound` → **references/concepts-vocabulary.md**(CONCEPTS.md 规则)
20
+ 6. `mstar-compound-refresh` → **§ Core rules**(知识维护基线)
22
21
 
23
22
  ## Phase 1: Survey — understand what exists
24
23
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-compound
3
- description: Morning Star 知识结晶 —— 将已解决问题的经验沉淀为结构化知识文档,存入 `{KNOWLEDGE_DIR}`。支持 Bug track(症状/失败尝试/解决方案)与 Knowledge track(上下文/指南/适用场景)双轨。含重叠检测(更新已有文档)、可发现性检查(AGENTS.md 索引)、CONCEPTS.md 领域词汇协同。触发:迭代收口时(`mstar-iteration` § iteration-close)批量执行;也可独立触发。产出:`{KNOWLEDGE_DIR}/<category>/<slug>.md` + 可选 AGENTS.md 更新。
3
+ description: Morning Star 知识结晶 —— 将已解决问题的经验沉淀为结构化知识文档,存入 `{KNOWLEDGE_DIR}`;迭代收口时从 `{ITERATION_DIR}/<iteration-id>/` 工作区提升 specs/guides。支持 Bug track Knowledge track 双轨。含重叠检测、可发现性检查、CONCEPTS.md 协同。触发:iteration-close(`mstar-iteration` §3.2)或独立触发。产出:`{KNOWLEDGE_DIR}/<category>/<slug>.md`。
4
4
  ---
5
5
 
6
6
  # mstar-compound(知识结晶)
@@ -79,6 +79,26 @@ iteration-start → [plan lifecycle × N: specify→...→Done] → iteration-cl
79
79
 
80
80
  迭代内所有 plan Done 后,PM 回顾整轮迭代中产生的可结晶知识,批量 compound。per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动。
81
81
 
82
+ ### Iteration workspace promotion(iteration-close 强制盘点)
83
+
84
+ 正式迭代收口时,compound **除** plan 实现/debug/review 素材外,**必须**盘点当前迭代的 workspace:
85
+
86
+ **路径**:`{ITERATION_DIR}/<iteration-id>/**`(含 `guides/`、`specs/`、扁平 `.md`;不含根目录 `*-delivery-compass.md` 除非 PM 显式纳入)。
87
+
88
+ | 步骤 | 动作 |
89
+ |------|------|
90
+ | 1. Inventory | 列出 workspace 下全部 `.md`;读各文件 + workspace `README.md`(若有) |
91
+ | 2. Triage | 每篇:**Promote** / **Keep snapshot** / **Skip**(理由写入 compound 摘要) |
92
+ | 3. Promote | 值得跨迭代复用 → 走 Q1–Q8(或轻量判定)→ Phase 2 重叠检测 → Phase 3–6 **结构化重写**进 `{KNOWLEDGE_DIR}/`(**禁止**无改写整文件复制) |
93
+ | 4. Trace | 源文件顶栏或 workspace README:`Promoted to: <knowledge-path>`;`{KNOWLEDGE_DIR}/README.md` 的 Source 可记 `iteration:<iteration-id>/<relpath>` |
94
+ | 5. Summary | PM 写入 compass `## Compound Round Summary`:提升篇数、保留快照、跳过及原因 |
95
+
96
+ **Promote 典型**:迭代 spec 已验证且指导未来实现;guide 含非显而易见的过程知识或失败尝试。
97
+
98
+ **Keep snapshot**:仅迭代史、已被 `{SPECS_DIR}/` 取代的草案、或自检 ≤2 Yes 的琐碎笔记。
99
+
100
+ 边界 SSOT → **`mstar-iteration/references/iteration-artifact-boundaries.md`**。
101
+
82
102
  ## When to use (trigger)
83
103
 
84
104
  - **迭代收口时**(`mstar-iteration` § iteration-close):PM 批量回顾所有 plan 的产物
@@ -114,7 +134,9 @@ In Cursor, Full mode dispatches subagents via Task tool. PM selects mode.
114
134
 
115
135
  ## Phase 1: Gather context
116
136
 
117
- Read the conversation history to understand:
137
+ Read the conversation history **and**, when `iteration_id` is known, scan **`{ITERATION_DIR}/<iteration-id>/`** workspace per **Iteration workspace promotion** above.
138
+
139
+ Understand:
118
140
  - What problem was solved (the concrete issue)
119
141
  - What was tried and didn't work
120
142
  - What the working solution was
@@ -45,7 +45,7 @@ For each candidate document, classify into one of five outcomes:
45
45
  3. **Match docs to reality.** When code differs from doc, update the doc — not ask whether the code change was "intentional."
46
46
  4. **Be decisive.** When evidence is clear (file renamed, class moved), apply. Only ask PM when genuinely ambiguous.
47
47
  5. **Avoid low-value churn.** Don't edit for typos, polish, or cosmetic changes that don't improve accuracy.
48
- 6. **Delete, don't archive.** No `_archived/` directory. Git history is the archive. `git log --diff-filter=D -- <path>` finds deleted docs.
48
+ 6. **Delete, don't archive** **except** formal **iteration-start** §1.6 corpus hygiene (`mstar-iteration/references/iteration-corpus-hygiene.md`), which **moves** superseded/redundant knowledge/specs to `{HARNESS_DIR}/archived/knowledge|specs/`. Outside that gate, git history is the archive; `git log --diff-filter=D -- <path>` finds deleted docs.
49
49
  7. **Evaluate document-set design.** Check whether two+ docs overlap and should be consolidated. Redundant docs silently drift apart.
50
50
 
51
51
  ## Scope selection
@@ -69,7 +69,8 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
69
69
 
70
70
  When **`Execution mode: sdd`** (`mstar-sdd`):
71
71
 
72
- - **串行**:one implementer at a time; one task reviewer after each — **never** parallel implementers (write conflicts).
72
+ - **串行**:one implementer at a time; one **fresh** task reviewer after each — **never** parallel implementers (write conflicts).
73
+ - **`SDD implementer session: sticky`**:same implementer subagent may **resume** across tasks when host supports it; **reviewers never resume** — see **`mstar-sdd/references/sticky-implementer-session.md`**.
73
74
  - File handoffs only — no pasted plan/diff/history in dispatch prompts.
74
75
  - Record per-task BASE SHA; use `review-package` for diffs — **never `HEAD~1`**.
75
76
  - After all tasks: branch `review-package` → **mandatory tri-review N=3** when `Execution mode: sdd`; **N=1** only for `inline` / explicit single override.
@@ -86,7 +87,7 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
86
87
 
87
88
  - PM 写初稿;各角色通过宿主 invoke **直接编辑**目标文件(**不**另写仅评论式 `reports/` 替代修订)。
88
89
  - **1 Assignment ⇒ 1 invoke**。
89
- - **Phase 1 Review & Edit chain**(`mstar-iteration` §1.6):**顺序** `product-manager` `architect` `writing-specialist`;上一角色落盘修订完成后再派发下一角色。**禁止**本链并行 batch(与 QC 三审不同)。
90
+ - **Phase 1 Review & Edit chain**(`mstar-iteration` §1.6):主产出 **`{SPECS_DIR}/`** + **`{ITERATION_DIR}/<iteration-id>/`** workspace;**禁止** start 链向 `{KNOWLEDGE_DIR}/` 新增。close 时 **`mstar-compound`** 提升 workspace → knowledge。
90
91
  - 其他彼此独立、无先后依赖的文档编辑任务:可并行(同条消息发满 N),见 **`parallel-dispatch.md`**。
91
92
  - PM 线程代做全部专业编辑 = **反模式**(`mstar-iteration` §1.6、`mstar-harness-core` 反模式索引)。
92
93
  - PM merge / lock(如 compass `status: locked`)在链末 subagent 返回后于 PM 线程完成。**不得**在 review-and-edit 链完成前 commit integration 分支。
@@ -11,7 +11,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** only when Codex exposes an
11
11
  - Plugin source: `.codex-plugin/plugin.json`.
12
12
  - Runtime skills: repo `skills/` mounted by the Codex plugin (`"skills": "./skills/"`).
13
13
  - Custom agent source: repo `codex/agents/*.toml`; CLI/manual install links these into `~/.codex/agents/` or project `.codex/agents/`.
14
- - `/pm`: shared force entry via the `pm` skill; after that, role behavior comes from `mstar-roles`.
14
+ - **`/pm`** or **`pm` skill**: force PM entry `mstar-roles` `project-manager.md` (Codex primary; Cursor/OpenCode for general per-plan work). **`commands/`** when running iteration Phase 1–5.
15
15
  - Role files under root `agents/` are for hosts that load OpenCode/Cursor-style agent shells; Codex uses `codex/agents/*.toml` and still loads `mstar-roles` references directly.
16
16
  - Tool and plugin availability can be lazy-loaded or session-dependent. Use the tools actually present in the current session; do not infer capability from documentation alone.
17
17
 
@@ -6,7 +6,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (Task tool uses same turn model
6
6
 
7
7
  ## Cursor-only context
8
8
 
9
- - Role prompts: `mstar-roles`; **`/pm`** → `project-manager` via `pm` skill + `mstar-roles`.
9
+ - Role prompts: `mstar-roles`; **`/pm`** or **`pm` skill** general PM orchestration (per-plan dispatch, gates, QC) without an iteration command. **`commands/`** (`iteration-start`, `iteration-drive`, `mstar-bootstrap`) only when running formal iteration Phase 1–5.
10
10
  - Routing-eval: `.cursor/skills/mstar-routing-eval/` — regression tooling only; not runtime load order.
11
11
 
12
12
  ## Plan mode × harness dual-write
@@ -44,6 +44,22 @@ Enforcement: `rules/mstar-cursor-plan-mode.mdc` when plugin active.
44
44
  - **`inline`**: **N=1** per `parallel-dispatch.md`.
45
45
  - SDD implement/reviewer: **serial** — see **`mstar-sdd`**.
46
46
 
47
+ ## SDD sticky implementer (Cursor Task resume)
48
+
49
+ When Assignment has **`SDD implementer session: sticky`** (`mstar-sdd/references/sticky-implementer-session.md`):
50
+
51
+ | Turn | Task tool |
52
+ |------|-----------|
53
+ | **First task** (or after `fresh` reset) | `subagent_type: <Execute as>` + `implementer-prompt.md` body; capture returned **agent id** → `{SDD_DIR}/implementer-session.json` → `host_agent_id` |
54
+ | **Task 2+** | `resume: <host_agent_id>` + `implementer-continuation-prompt.md` body (new brief path + report path only) |
55
+
56
+ **Rules:**
57
+
58
+ - **1 implement dispatch ⇒ 1 Task** per task id (resume counts as the implement dispatch for that task).
59
+ - **Task reviewer**: always **new** Task — **no** `resume` for reviewers.
60
+ - After each task reviewer passes, PM updates `progress.md` and `implementer-session.json` `last_task`.
61
+ - If `resume` fails or agent id missing → reset to **`fresh`** for that task; log reason in Status Update.
62
+
47
63
  ## Dispatch execution(canonical)
48
64
 
49
65
  Cursor PM dispatch = **`Task`** with `subagent_type` matching the Assignment `Execute as` role.
@@ -6,6 +6,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
6
6
 
7
7
  ## Role loading
8
8
 
9
+ - **PM entry**: **`/pm`** or **`pm` skill** → `project-manager` for general orchestration; **`commands/`** (`iteration-start`, `iteration-drive`, `mstar-bootstrap`) for formal iteration only.
9
10
  - **Role shell**: `agents/<id>.md` referenced by `opencode.json` `agent.<id>` (frontmatter + role binding only).
10
11
  - **Role body**: `mstar-roles` `references/<id>.md` (or shared references + parameters).
11
12
  - Implementation evidence and RCA behavior: `mstar-coding-behavior`.
@@ -30,6 +31,8 @@ Harness **dispatch** on OpenCode = **one or more `task` tool calls**, each with
30
31
 
31
32
  PM workflow: finalize Assignment → **call task tool** with **subagent** + generated prompt → wait for subagent Completion Report → update plan / status.
32
33
 
34
+ **SDD sticky implementer:** if the task tool exposes **resume** / agent id, follow **`mstar-sdd/references/sticky-implementer-session.md`** and the active host reference. If resume is **not** available, use **micro-batch** (2–3 tasks, one invoke) or **`SDD implementer session: fresh`** per task — do not assume sticky without host support.
35
+
33
36
  ## Role-mention hygiene (OpenCode)
34
37
 
35
38
  OpenCode may **auto-append** system lines when prompt text stacks multiple agent-id **prefix mentions**. Typical boilerplate (host-generated — **not** harness Assignment):
@@ -63,4 +63,4 @@ Formal iteration Phase 2 uses the same SDD + tri rule — not a separate carve-o
63
63
  2. Prerequisite-only message? → **zero** batch dispatches unless `N = 1`.
64
64
  3. Dispatch message contains **exactly `N`** invocation calls?
65
65
  4. QC initial: **`Execution mode: sdd`** → **N=3**? **`inline`** → **N=1**? Targeted re-review → **N** = Assignment reviewer count?
66
- 5. SDD implement → **serial** (never batch implementers)?
66
+ 5. SDD implement → **serial** (never batch implementers); sticky = **resume** same implementer, not parallel