@mstar-harness/opencode 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness-commands/iteration-drive.md +17 -7
- package/harness-commands/iteration-start.md +5 -6
- package/harness-commands/mstar-bootstrap.md +4 -5
- package/harness-skills/mstar-dispatch-gates/SKILL.md +2 -1
- package/harness-skills/mstar-host/references/codex.md +1 -1
- package/harness-skills/mstar-host/references/cursor.md +17 -1
- package/harness-skills/mstar-host/references/opencode.md +3 -0
- package/harness-skills/mstar-host/references/parallel-dispatch.md +1 -1
- package/harness-skills/mstar-iteration/SKILL.md +25 -3
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +15 -0
- package/harness-skills/mstar-roles/references/project-manager.md +8 -2
- package/harness-skills/mstar-sdd/SKILL.md +13 -5
- package/harness-skills/mstar-sdd/references/file-handoffs.md +3 -0
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +3 -1
- package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
- package/harness-skills/pm/SKILL.md +20 -45
- package/package.json +1 -1
|
@@ -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. `
|
|
54
|
-
4. `mstar-
|
|
55
|
-
5. `mstar-
|
|
56
|
-
6.
|
|
57
|
-
7. `mstar-
|
|
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
|
-
-
|
|
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
|
|
@@ -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. `
|
|
32
|
-
4. `mstar-
|
|
33
|
-
5. `mstar-
|
|
34
|
-
6. `mstar-
|
|
35
|
-
7. `mstar-
|
|
36
|
-
8. `mstar-host` → active host reference(invoke 能力)
|
|
31
|
+
3. `mstar-iteration` → **§ Phase 1: iteration-start**(迭代范围、compass 模板、§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
|
|
|
@@ -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. `
|
|
18
|
-
4. `mstar-
|
|
19
|
-
5. `mstar-
|
|
20
|
-
6. `mstar-compound` →
|
|
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
|
|
|
@@ -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.
|
|
@@ -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
|
-
-
|
|
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`** → `
|
|
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
|
|
@@ -7,7 +7,7 @@ description: Morning Star 迭代管理 —— iteration-start、Autonomous Execu
|
|
|
7
7
|
|
|
8
8
|
## Load order
|
|
9
9
|
|
|
10
|
-
**Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. Per-plan gates → **`mstar-phase-gates`**. Knowledge crystallization → **`mstar-compound`**. On conflict, **`mstar-harness-core` wins**.
|
|
10
|
+
**Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. Per-plan gates → **`mstar-phase-gates`**. Knowledge crystallization → **`mstar-compound`**. **Phase 2 implement 波次**(进入 per-plan implement 前)→ **`mstar-sdd`** + **`mstar-dispatch-gates`**。Phase 2 QC 前 → **`mstar-review-qc`**。On conflict, **`mstar-harness-core` wins**.
|
|
11
11
|
|
|
12
12
|
## 设计思路
|
|
13
13
|
|
|
@@ -227,7 +227,17 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
227
227
|
对每个 active `plan_id`:
|
|
228
228
|
|
|
229
229
|
1. **Plan start — feature branch**:Assignment 用 `Working branch: create <plan-feature-branch> from <spec_integration_branch>`。一个 plan 一条专用实现分支;内部并行 → topic branches + worktrees(`mstar-branch-worktree`)
|
|
230
|
-
2. **Implement → InReview
|
|
230
|
+
2. **Implement → InReview**(`§ 2.5`):
|
|
231
|
+
- **默认 `Execution mode: sdd`**(多 task plan;hotfix 可 `inline`)。
|
|
232
|
+
- PM 载入 **`mstar-sdd`** 后,按 plan task 顺序 **串行** per-task 循环(**不是**一次派发 dev 做全部 tasks):
|
|
233
|
+
1. `sdd-workspace <plan-id>` → `{SDD_DIR}`
|
|
234
|
+
2. `task-brief <plan-file> N` → `{SDD_DIR}/task-N-brief.md`;记录 `BASE_SHA`
|
|
235
|
+
3. Dispatch **one** implementer subagent(`references/implementer-prompt.md`:brief 路径 + report 路径 + `Model tier`;**禁止**贴整份 plan)
|
|
236
|
+
4. Implementer `DONE` → `review-package BASE HEAD` → task diff 文件
|
|
237
|
+
5. Dispatch **one** task reviewer subagent(brief + report + diff + Global Constraints)
|
|
238
|
+
6. Fix loop 直至 review clean;append `{SDD_DIR}/progress.md`;更新 `status.json` / plan checkbox
|
|
239
|
+
7. Next task
|
|
240
|
+
- 每次 Completion Report v2 后更新 `status.json` + 主 plan
|
|
231
241
|
3. **QC → QA → Done**:per-plan 审查链 → **`mstar-sdd`**(L1–L2)+ **`mstar-review-qc/references/review-responsibility-boundaries.md`**(L3 tri / inline 单席)+ QA。
|
|
232
242
|
4. **Plan complete — merge back**:合并 plan feature branch → `spec_integration_branch`;在下一 plan 或 QC 前解决冲突
|
|
233
243
|
5. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` 的 `## Plans` 表状态列
|
|
@@ -241,7 +251,18 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
241
251
|
|
|
242
252
|
### 2.5 Dispatch-first(implement 派发约束)
|
|
243
253
|
|
|
244
|
-
派发纪律 SSOT → **`mstar-dispatch-gates`** · **`mstar-host/references/parallel-dispatch.md
|
|
254
|
+
派发纪律 SSOT → **`mstar-dispatch-gates`** · **`mstar-sdd`** · **`mstar-host/references/parallel-dispatch.md`**。
|
|
255
|
+
|
|
256
|
+
**SDD implement(Phase 2 默认)** — PM **已载入 `mstar-sdd`** 后执行:
|
|
257
|
+
|
|
258
|
+
| 规则 | 说明 |
|
|
259
|
+
|------|------|
|
|
260
|
+
| 串行 | 同一 plan 内 **one implementer at a time**;每 task 后 **one fresh task reviewer** |
|
|
261
|
+
| Sticky(可选) | Assignment **`SDD implementer session: sticky`** + `implementer-session.json`;implementer **resume**,reviewer **fresh** — `mstar-sdd/references/sticky-implementer-session.md` |
|
|
262
|
+
| 文件交接 | brief / report / diff / `progress.md` 在 `{SDD_DIR}`;dispatch prompt **只给路径**,不贴 plan 全文或 task 历史 |
|
|
263
|
+
| Assignment 字段 | 每个 implement dispatch 须含 `Execution mode: sdd`、`SDD dir`、`Model tier`;**禁止**省略 `Model tier` |
|
|
264
|
+
| 大包 inline | **禁止**把 T1–Tn 或整份 plan 写进 **一个** `fullstack-dev` leaf Assignment 冒充 SDD |
|
|
265
|
+
| 分支 diff | 全部 task 完成后 `review-package MERGE_BASE HEAD` → branch diff → plan QC tri(N=3) |
|
|
245
266
|
|
|
246
267
|
Iteration Phase 2 附加:
|
|
247
268
|
|
|
@@ -423,6 +444,7 @@ PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权
|
|
|
423
444
|
|
|
424
445
|
- 不要在 per-plan Done 后立即单独 compound——等 iteration-close 统一做
|
|
425
446
|
- 不要在 Autonomous Execute(Phase 2)中修改 per-plan gate 判定
|
|
447
|
+
- **不要在 Phase 2 用 inline 大包 Assignment 替代 SDD per-task 循环**(除非 plan 显式 `Execution mode: inline` / hotfix)
|
|
426
448
|
- 不要用 compass 替代 `status.json` 作为 plan 状态 SSOT
|
|
427
449
|
- 不要在没有完成 per-plan 前置检查的情况下进入 iteration-close
|
|
428
450
|
- 不要在缺少 `iteration_base_branch` / `target_branch` 时默认使用 `main` / `master`
|
|
@@ -73,6 +73,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
|
|
|
73
73
|
**Execute as**: <role-id>
|
|
74
74
|
**Delegation**: forbidden | allowed (...)
|
|
75
75
|
**Execution mode**: sdd | inline | N/A
|
|
76
|
+
**SDD implementer session**: fresh | sticky | N/A — **default `fresh`**; `sticky` reuses same implementer subagent across tasks (reviewers stay fresh). See `mstar-sdd/references/sticky-implementer-session.md`
|
|
76
77
|
**SDD dir**: `{HARNESS_DIR}/sdd/<plan-id>/` | N/A
|
|
77
78
|
**Model tier**: fast | standard | capable | N/A
|
|
78
79
|
**QC mode**: full tri-review | single | N/A — **default `full tri-review` when `Execution mode: sdd`**; `single` only for `inline` / override
|
|
@@ -163,3 +164,17 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
|
|
|
163
164
|
|
|
164
165
|
For host behavior details (dispatch turn shape, paste-only failure mode, invoke-count discipline),
|
|
165
166
|
read `mstar-host` → the active host reference and `references/parallel-dispatch.md` as host SSOT for dispatch.
|
|
167
|
+
|
|
168
|
+
## SDD vs inline implement Assignment(PM)
|
|
169
|
+
|
|
170
|
+
| Mode | Who loads `mstar-sdd` | Assignment shape |
|
|
171
|
+
|------|----------------------|------------------|
|
|
172
|
+
| **`Execution mode: sdd`**(多 task 默认;iteration Phase 2 默认) | **PM** before first implement dispatch | **Per task**:one implementer dispatch + one **fresh** task reviewer;prompt 只含 `{SDD_DIR}/task-N-brief.md` + report 路径 |
|
|
173
|
+
| **`SDD implementer session: sticky`** | PM | Task 1: `fresh` or start sticky + `implementer-session.json`; Task 2+: host **resume** + continuation prompt — **still** per-task review |
|
|
174
|
+
| **`Execution mode: inline`**(hotfix / 单 task) | PM optional | One leaf Assignment;可含完整 scope,但仍须 canonical 字段 |
|
|
175
|
+
|
|
176
|
+
**NEVER(SDD)**:
|
|
177
|
+
|
|
178
|
+
- 把整份 plan 或 T1–Tn 全文贴进 **一个** `fullstack-dev` leaf Assignment。
|
|
179
|
+
- 省略 `Execution mode` / `SDD dir` / `Model tier` 却期望 SDD 产物(`progress.md`、per-task review)。
|
|
180
|
+
- 期望 leaf `fullstack-dev` 载入 `mstar-sdd` 并自编排 per-task 循环 — **编排仅 PM**(`iteration-drive` / `mstar-iteration` §2.4–2.5)。
|
|
@@ -138,9 +138,15 @@ Before first implement dispatch (non-hotfix):
|
|
|
138
138
|
|
|
139
139
|
If any fail -> do not dispatch implement.
|
|
140
140
|
|
|
141
|
-
### PM entry sessions
|
|
141
|
+
### PM entry sessions
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
| Entry | Next reads |
|
|
144
|
+
|-------|------------|
|
|
145
|
+
| **`/pm`** or **`pm` skill** (Codex, Cursor; OpenCode when no command) | This shim → **`project-manager.md`** § Required Reading + topic skills on demand |
|
|
146
|
+
| **Cursor / OpenCode** **`commands/`** (`iteration-start`, `iteration-drive`, `mstar-bootstrap`) | Command **Boot** + **`project-manager.md`** — iteration lifecycle only; **not** required for ordinary per-plan PM |
|
|
147
|
+
| **OpenCode** (no command, not `/pm`) | `project-manager` + `mstar-host` → `opencode.md` |
|
|
148
|
+
|
|
149
|
+
**Dispatch-first**, iteration branch policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`), Autonomous Execute → **`mstar-iteration`** §2. Routing, gates, Task Board, QC, templates → this file + topic `mstar-*` skills.
|
|
144
150
|
|
|
145
151
|
---
|
|
146
152
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-sdd
|
|
3
|
-
description: Morning Star subagent-driven development (SDD) — file handoff, per-task implementer + task reviewer (L2), progress ledger, branch review-package for plan QC tri (L3). **Must** Read when project-manager runs `Execution mode: sdd` (multi-task plan, single-plan, or iteration Phase 2), dispatches SDD implementer/reviewer subagents, or prepares review-package paths. Leaf implementer/reviewer subagents skip PM sections via SUBAGENT-STOP in dispatch prompts.
|
|
3
|
+
description: Morning Star subagent-driven development (SDD) — file handoff, per-task implementer + task reviewer (L2), progress ledger, branch review-package for plan QC tri (L3). **Implementer session** `fresh` (default) or **`sticky`** (same dev subagent across tasks — `references/sticky-implementer-session.md`). **Must** Read when project-manager runs `Execution mode: sdd` (multi-task plan, single-plan, or iteration Phase 2), dispatches SDD implementer/reviewer subagents, or prepares review-package paths. Leaf implementer/reviewer subagents skip PM sections via SUBAGENT-STOP in dispatch prompts.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order
|
|
@@ -19,7 +19,9 @@ If you were dispatched as an SDD implementer or task reviewer, skip PM orchestra
|
|
|
19
19
|
|
|
20
20
|
## Core principle
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+
**Default:** fresh implementer subagent per task + task review (spec + quality) + plan-level QC on whole branch = quality with isolated context.
|
|
23
|
+
|
|
24
|
+
**Optional:** **`SDD implementer session: sticky`** — same implementer subagent across sequential tasks on one plan/branch; **task reviewers stay fresh per task**. SSOT → **`references/sticky-implementer-session.md`**.
|
|
23
25
|
|
|
24
26
|
**Narration:** at most one short line between tool calls — ledger and file paths carry the record.
|
|
25
27
|
|
|
@@ -39,11 +41,13 @@ Batch all findings for the human in one message. If clean, proceed silently.
|
|
|
39
41
|
1. Record `BASE_SHA` (never use `HEAD~1` later)
|
|
40
42
|
2. `sdd-workspace <plan-id>` → `SDD_DIR`
|
|
41
43
|
3. `task-brief <plan> N` → brief file
|
|
42
|
-
4. Dispatch implementer
|
|
44
|
+
4. Dispatch implementer:
|
|
45
|
+
- **`SDD implementer session: fresh`** (default) — new subagent; templates: `references/implementer-prompt.md`
|
|
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`**)
|
|
43
47
|
5. On `DONE`: `review-package BASE HEAD` → diff file
|
|
44
|
-
6. Dispatch task reviewer (brief, report, diff, Global Constraints) — `references/task-reviewer-prompt.md`
|
|
48
|
+
6. Dispatch **fresh** task reviewer (brief, report, diff, Global Constraints) — `references/task-reviewer-prompt.md` — **never** sticky resume for reviewers
|
|
45
49
|
7. Fix loop for Critical/Important; re-review until approved
|
|
46
|
-
8. Append `progress.md`; update `status.json` `task_commits[]` if
|
|
50
|
+
8. Append `progress.md`; update `status.json` `task_commits[]` and `implementer-session.json` `last_task` if sticky
|
|
47
51
|
9. Next task
|
|
48
52
|
|
|
49
53
|
**Never** dispatch multiple implementers in parallel (write conflicts).
|
|
@@ -100,6 +104,8 @@ Minor findings → `## Minor (for plan QC)` section in same file.
|
|
|
100
104
|
- Skip task review or accept missing verdict
|
|
101
105
|
- Re-dispatch tasks listed complete in ledger
|
|
102
106
|
- PM thread implements instead of subagent dispatch
|
|
107
|
+
- Sticky **resume** for task reviewers
|
|
108
|
+
- Resume implementer without `host_agent_id` in `implementer-session.json`
|
|
103
109
|
|
|
104
110
|
## Scripts
|
|
105
111
|
|
|
@@ -114,5 +120,7 @@ From repo: `skills/mstar-sdd/scripts/` (bundled in OpenCode as `harness-skills/m
|
|
|
114
120
|
## References
|
|
115
121
|
|
|
116
122
|
- `references/file-handoffs.md` — paths and fix-loop evidence
|
|
123
|
+
- `references/sticky-implementer-session.md` — `fresh` vs `sticky`, ledger, host resume, micro-batch fallback
|
|
117
124
|
- `references/implementer-prompt.md`
|
|
125
|
+
- `references/implementer-continuation-prompt.md`
|
|
118
126
|
- `references/task-reviewer-prompt.md`
|
|
@@ -13,6 +13,7 @@ PM and subagents move artifacts as **files**, not pasted text. Pasted content st
|
|
|
13
13
|
- Interfaces / decisions brief cannot know
|
|
14
14
|
- Report path: `$SDD_DIR/task-N-report.md`
|
|
15
15
|
- `Model tier` → host-specific model (required)
|
|
16
|
+
- **`SDD implementer session`**: `fresh` (new subagent) or `sticky` (resume — see **`sticky-implementer-session.md`**)
|
|
16
17
|
|
|
17
18
|
## Implementer report file
|
|
18
19
|
|
|
@@ -71,3 +72,5 @@ Do not paste:
|
|
|
71
72
|
- Full diff content
|
|
72
73
|
|
|
73
74
|
Fresh subagent gets: brief + interfaces + constraints + file paths only.
|
|
75
|
+
|
|
76
|
+
**Sticky implementer** (task 2+): resume same session; read new brief path + `progress.md` — do not re-paste prior task summaries. PM updates `implementer-session.json`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Implementer continuation prompt (sticky session)
|
|
2
|
+
|
|
3
|
+
Use when PM continues **`SDD implementer session: sticky`** for Task N>1. Host: **resume** same agent when supported (`sticky-implementer-session.md`).
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Task / subagent:
|
|
7
|
+
resume: [HOST_AGENT_ID from implementer-session.json]
|
|
8
|
+
description: "SDD continue Task N: <name>"
|
|
9
|
+
model: [same tier as session start unless PM upgrades]
|
|
10
|
+
prompt: |
|
|
11
|
+
<SUBAGENT-STOP> Skip PM orchestration skills. You are a leaf implementer continuing a sticky SDD session.</SUBAGENT-STOP>
|
|
12
|
+
|
|
13
|
+
Continue as the same implementer on plan <plan-id>, Working branch: <branch>.
|
|
14
|
+
|
|
15
|
+
## Completed (do not redo)
|
|
16
|
+
|
|
17
|
+
Read: [SDD_DIR]/progress.md and [SDD_DIR]/implementer-session.json
|
|
18
|
+
|
|
19
|
+
## This task
|
|
20
|
+
|
|
21
|
+
Task N: <name>
|
|
22
|
+
|
|
23
|
+
Read first — your spec (verbatim): [BRIEF_FILE]
|
|
24
|
+
|
|
25
|
+
## Context not in the brief
|
|
26
|
+
|
|
27
|
+
[Interfaces from earlier tasks only if not already in your session]
|
|
28
|
+
|
|
29
|
+
## Report file
|
|
30
|
+
|
|
31
|
+
Write your full report to: [REPORT_FILE]
|
|
32
|
+
|
|
33
|
+
## Your job
|
|
34
|
+
|
|
35
|
+
1. Implement exactly what this brief specifies (prior tasks are done)
|
|
36
|
+
2. Run tests; commit on Working branch
|
|
37
|
+
3. Write report file; return short summary only
|
|
38
|
+
|
|
39
|
+
## When stuck
|
|
40
|
+
|
|
41
|
+
Report BLOCKED or NEEDS_CONTEXT — PM may reset session to fresh.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
First task on a plan uses **`implementer-prompt.md`** (not this file).
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
# Implementer subagent prompt template
|
|
2
2
|
|
|
3
|
-
Use when PM dispatches an SDD implementer (`mstar-sdd`)
|
|
3
|
+
Use when PM dispatches an SDD implementer (`mstar-sdd`) — **first task** or **`SDD implementer session: fresh`**.
|
|
4
|
+
|
|
5
|
+
For **sticky** continuation (task 2+), use **`implementer-continuation-prompt.md`** instead.
|
|
4
6
|
|
|
5
7
|
```
|
|
6
8
|
Task / subagent:
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Sticky implementer session (SDD token optimization)
|
|
2
|
+
|
|
3
|
+
Reuse the **same implementer subagent** across multiple tasks in one plan when tasks are tightly coupled, same `Execute as` role, and same `Working branch`. **L2 task reviewers stay fresh per task** — do not sticky reviewers.
|
|
4
|
+
|
|
5
|
+
SSOT for mode selection and host resume → this file. Per-task artifacts → **`file-handoffs.md`**.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
| `SDD implementer session` | Use |
|
|
10
|
+
|---------------------------|-----|
|
|
11
|
+
| **`fresh`** (default) | Independent tasks, module boundaries, different dev tracks, or first task on a plan |
|
|
12
|
+
| **`sticky`** | Same `fullstack-dev` (or same role id), sequential tasks on one branch, strong file/context continuity (e.g. T3+T4 daemon stderr + DB reset) |
|
|
13
|
+
|
|
14
|
+
**Prefer `sticky`** on iteration-drive Phase 2 when PM will dispatch many tasks to the same dev on one plan feature branch.
|
|
15
|
+
|
|
16
|
+
## Assignment fields (implement dispatch)
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
**Execution mode**: sdd
|
|
20
|
+
**SDD implementer session**: sticky | fresh
|
|
21
|
+
**SDD dir**: `{HARNESS_DIR}/sdd/<plan-id>/`
|
|
22
|
+
**Model tier**: standard
|
|
23
|
+
**Execute as**: fullstack-dev
|
|
24
|
+
**Working branch**: <branch>
|
|
25
|
+
**Covers task**: N | N–M # single task id for this dispatch turn
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- **Task 1** (or first task after `fresh` reset): `SDD implementer session: fresh` or `sticky` (starts sticky ledger).
|
|
29
|
+
- **Task 2+** with sticky: `SDD implementer session: sticky` + host **resume** (Cursor) or continuation prompt (fallback).
|
|
30
|
+
|
|
31
|
+
## Session ledger: `implementer-session.json`
|
|
32
|
+
|
|
33
|
+
PM writes/updates at `{SDD_DIR}/implementer-session.json` when starting or continuing sticky mode:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"plan_id": "<plan-id>",
|
|
38
|
+
"execute_as": "fullstack-dev",
|
|
39
|
+
"session_mode": "sticky",
|
|
40
|
+
"host": "cursor",
|
|
41
|
+
"host_agent_id": "<agent-id from first Task return — required for resume>",
|
|
42
|
+
"working_branch": "feature/...",
|
|
43
|
+
"started_task": 1,
|
|
44
|
+
"last_task": 1,
|
|
45
|
+
"started_at": "2026-07-07T00:00:00Z"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
After each completed task review, PM sets `last_task` to N. **Do not** resume if `host_agent_id` is missing — fall back to `fresh` for that task.
|
|
50
|
+
|
|
51
|
+
## Per-task loop (sticky implementer)
|
|
52
|
+
|
|
53
|
+
Same as default SDD for artifacts and L2 review; only implementer dispatch differs:
|
|
54
|
+
|
|
55
|
+
1. `task-brief` → `{SDD_DIR}/task-N-brief.md`
|
|
56
|
+
2. Record `BASE_SHA`
|
|
57
|
+
3. **Implementer dispatch**
|
|
58
|
+
- **First task** (`fresh` or sticky start): normal Task/subagent invoke → save `host_agent_id` to ledger
|
|
59
|
+
- **Next tasks** (`sticky`): host **resume** with same `host_agent_id` + continuation prompt (`implementer-prompt.md` § Continuation)
|
|
60
|
+
4. On `DONE` → `review-package` → **fresh** task reviewer (never resume reviewer)
|
|
61
|
+
5. Append `progress.md`; update ledger `last_task`
|
|
62
|
+
6. Next task
|
|
63
|
+
|
|
64
|
+
**Still required per task:** commit, `task-N-report.md`, task-level diff, task reviewer, `progress.md` line.
|
|
65
|
+
|
|
66
|
+
## When to reset to `fresh`
|
|
67
|
+
|
|
68
|
+
Start a **new** implementer session (`session_mode: fresh` or new ledger) when any:
|
|
69
|
+
|
|
70
|
+
- `BLOCKED` / `NEEDS_CONTEXT` not resolved in one continuation turn
|
|
71
|
+
- `Execute as` role changes (`fullstack-dev` → `fullstack-dev-2`)
|
|
72
|
+
- `Working branch` changes
|
|
73
|
+
- Host does not support resume (OpenCode without resume → use **micro-batch** or `fresh`)
|
|
74
|
+
- Context clearly degraded (implementer confuses prior tasks) — PM judgment
|
|
75
|
+
- Switching from another dev track mid-plan
|
|
76
|
+
|
|
77
|
+
Delete or archive `implementer-session.json` when resetting.
|
|
78
|
+
|
|
79
|
+
## Micro-batch fallback (no host resume)
|
|
80
|
+
|
|
81
|
+
When resume is unavailable, PM may dispatch **one** implementer for **2–3** tightly coupled tasks:
|
|
82
|
+
|
|
83
|
+
- Prompt lists `task-N-brief.md` … `task-M-brief.md` and matching report paths only
|
|
84
|
+
- Implementer completes tasks **in order** in one session
|
|
85
|
+
- PM still runs **per-task** `review-package` + **fresh** task reviewer after each task (or after batch if PM documents per-task SHAs in Assignment)
|
|
86
|
+
|
|
87
|
+
Max **3** tasks per micro-batch without user override. See `project-manager.md` batch sizing.
|
|
88
|
+
|
|
89
|
+
## Host mapping
|
|
90
|
+
|
|
91
|
+
| Host | Sticky implementer |
|
|
92
|
+
|------|-------------------|
|
|
93
|
+
| **Cursor** | `Task` with `resume: <host_agent_id>` — **`mstar-host/references/cursor.md`** § SDD sticky |
|
|
94
|
+
| **OpenCode** | Resume only if task tool supports it; else micro-batch or `fresh` per task |
|
|
95
|
+
| **Codex** | Thread resume only when callable multi-agent tool documents agent id; else micro-batch or `fresh` |
|
|
96
|
+
|
|
97
|
+
## PM NEVER (sticky)
|
|
98
|
+
|
|
99
|
+
- Resume task **reviewer** sessions — reviewers stay fresh per task
|
|
100
|
+
- Parallel sticky implementers on the same branch
|
|
101
|
+
- Resume without updating `implementer-session.json` / `progress.md`
|
|
102
|
+
- Skip per-task review because implementer "remembers" prior tasks
|
|
103
|
+
- Paste full plan into continuation prompt — only new brief path + report path
|
|
@@ -1,59 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pm
|
|
3
|
-
description: "
|
|
3
|
+
description: "PM entry shim — force project-manager orchestration when user invokes /pm or this skill (Codex and Cursor). General per-plan PM work: this skill + project-manager.md. Formal iteration lifecycle on Cursor/OpenCode: commands (iteration-start, iteration-drive, mstar-bootstrap). Boot, routing, dispatch SSOT → mstar-roles/references/project-manager.md and topic mstar-* skills — not here."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# PM
|
|
6
|
+
# PM (entry shim)
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Thin launcher only.** Boot lists, iteration phases, Assignment templates, and SDD loops are **not** maintained in this file.
|
|
9
9
|
|
|
10
|
-
## Host entry
|
|
10
|
+
## Host entry
|
|
11
11
|
|
|
12
|
-
| Host |
|
|
13
|
-
|
|
14
|
-
| **
|
|
15
|
-
| **
|
|
12
|
+
| Host | Use |
|
|
13
|
+
|------|-----|
|
|
14
|
+
| **Codex** | **`/pm`** or this skill → **`project-manager`** for the session |
|
|
15
|
+
| **Cursor** | **`/pm`** or this skill → general PM orchestration (single-plan, hotfix, QC waves, dispatch) **without** starting an iteration. Formal iteration → **`commands/`** below |
|
|
16
|
+
| **OpenCode** | Same as Cursor when no command: **`project-manager`** via `mstar-roles` → `references/project-manager.md` |
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
**Iteration commands** (optional; carry their own Boot): `iteration-start`, `iteration-drive`, `mstar-bootstrap` — use when running Phase 1–5 iteration lifecycle, not required for ordinary PM work.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Detect host → **`mstar-host`** → `references/codex.md` | `cursor.md` | `opencode.md`.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
2. `mstar-roles` → `references/project-manager.md`
|
|
23
|
-
3. Before first **implement** dispatch: `mstar-dispatch-gates` + host reference
|
|
24
|
-
4. Before **QC**: `mstar-review-qc`
|
|
25
|
-
5. **SDD implement** (`Execution mode: sdd`): `mstar-sdd` before first implement dispatch
|
|
26
|
-
6. **Iteration flow** (start / Execute / close): **`mstar-iteration`** — canonical SSOT for per-plan dispatch loop, integration branch, compound round. Do **not** re-describe the flow in this skill.
|
|
27
|
-
7. **On demand:** `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-plan-artifacts`, `mstar-branch-worktree`, `mstar-skill-authoring` for skill work
|
|
28
|
-
|
|
29
|
-
Prepare/Execute gates, routing, Assignment templates, Task Board, QC (SDD → tri; inline → single), residuals, compound → topic skills + PM references (not repeated here).
|
|
30
|
-
|
|
31
|
-
## Dispatch-first (`implement`)
|
|
32
|
-
|
|
33
|
-
| Do | Don't |
|
|
34
|
-
| --- | --- |
|
|
35
|
-
| **Loop:** `## Assignment` → invoke → Completion Report v2 → report-to-status → next batch | Parent **Write/Edit/Shell** on product code to "move faster" |
|
|
36
|
-
| **1 Assignment ⇒ 1 invoke** when host supports Task/subagent (`mstar-dispatch-gates`) | Assignment markdown only, no matching invoke |
|
|
37
|
-
| Put merge/branch/handoff from **this thread** into Assignment | Skip subagent because context is "already here" |
|
|
38
|
-
|
|
39
|
-
- **NEVER** implement while staying PM — SDD ends with **plan QC tri** (N=3); **implement still delegates** dev + task reviewer subagents.
|
|
40
|
-
- **Delegate scope / PM whitelist:** `mstar-roles` → PM Execution Boundary.
|
|
22
|
+
## Read next (in order)
|
|
41
23
|
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
Formal iteration(Phase 1 → Phase 2 → Phase 3)→ **`mstar-iteration`** only. Do not duplicate phase gates, branch policy, or close checklists here.
|
|
47
|
-
|
|
48
|
-
## Cursor Plan mode
|
|
49
|
-
|
|
50
|
-
CreatePlan / SwitchMode: Read **`mstar-host/references/cursor-plan-mode-bridge.md`**. Bootstrap todos `harness-init` → `spec-register` → `mirror-plan` before implement todos; evidence on **subagent** work.
|
|
24
|
+
1. `mstar-harness-core`
|
|
25
|
+
2. `mstar-roles` → **`references/project-manager.md`** — required reading list, routing, dispatch-first, iteration branch policy
|
|
26
|
+
3. Topic skills **on demand** per that file and the active workflow (`mstar-dispatch-gates`, `mstar-iteration`, `mstar-sdd`, `mstar-review-qc`, …)
|
|
51
27
|
|
|
52
|
-
##
|
|
28
|
+
## Three rules (everything else is a pointer)
|
|
53
29
|
|
|
54
|
-
1.
|
|
55
|
-
2.
|
|
56
|
-
3.
|
|
57
|
-
4. This skill
|
|
30
|
+
1. **Delegate** — PM does not implement, QC, or QA in-thread (`project-manager.md` Execution Boundary; hotfix → `mstar-phase-gates`).
|
|
31
|
+
2. **Dispatch** — when host has invoke/Task tools: **1 Assignment ⇒ 1 invoke** (`mstar-dispatch-gates`). Markdown alone is not dispatch.
|
|
32
|
+
3. **SSOT** — iteration lifecycle → **`mstar-iteration`** (or **`commands/`** on Cursor/OpenCode); Cursor Plan mode → **`mstar-host/references/cursor-plan-mode-bridge.md`**.
|
|
58
33
|
|
|
59
|
-
|
|
34
|
+
Conflict: user instructions → project `AGENTS.md` / `CLAUDE.md` → `mstar-harness-core` → this file.
|