@mstar-harness/opencode 0.7.3 → 0.7.5
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/INSTALL.md +2 -5
- package/harness-commands/iteration-drive.md +15 -6
- package/harness-commands/iteration-start.md +20 -6
- package/harness-skills/mstar-branch-worktree/SKILL.md +8 -8
- package/harness-skills/mstar-coding-behavior/SKILL.md +27 -4
- package/harness-skills/mstar-dispatch-gates/SKILL.md +4 -4
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +6 -5
- package/harness-skills/mstar-harness-core/references/open-harness-principles.md +3 -3
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +1 -1
- package/harness-skills/mstar-host/references/cursor.md +2 -2
- package/harness-skills/mstar-host/references/opencode.md +2 -2
- package/harness-skills/mstar-iteration/SKILL.md +48 -12
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +14 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +4 -4
- package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +2 -2
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +23 -2
- package/harness-skills/mstar-plan-conventions/SKILL.md +9 -6
- package/harness-skills/mstar-roles/SKILL.md +4 -4
- package/harness-skills/mstar-roles/references/architect.md +7 -11
- package/harness-skills/mstar-roles/references/frontend-dev.md +2 -2
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +2 -2
- package/harness-skills/mstar-roles/references/ops-engineer.md +2 -2
- package/harness-skills/mstar-roles/references/product-manager.md +7 -9
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +5 -5
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +1 -1
- package/harness-skills/mstar-roles/references/project-manager.md +5 -6
- package/harness-skills/mstar-roles/references/prompt-engineer.md +11 -5
- package/harness-skills/mstar-roles/references/qa-engineer.md +2 -2
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -1
- package/harness-skills/mstar-roles/references/writing-specialist.md +2 -2
- package/harness-skills/mstar-skill-authoring/SKILL.md +186 -0
- package/harness-skills/pm/SKILL.md +13 -1
- package/package.json +1 -1
- package/harness-skills/mstar-superpowers-align/SKILL.md +0 -150
- package/harness-skills/mstar-superpowers-align/references/per-role-matrix.md +0 -99
- package/harness-skills/mstar-superpowers-align/references/tension-table.md +0 -19
package/INSTALL.md
CHANGED
|
@@ -6,14 +6,11 @@
|
|
|
6
6
|
|
|
7
7
|
## Installation
|
|
8
8
|
|
|
9
|
-
Add Morning Star to the `plugin` array in your `opencode.json` (global or project-level)
|
|
10
|
-
|
|
11
|
-
If you use Superpowers together, use:
|
|
9
|
+
Add Morning Star to the `plugin` array in your `opencode.json` (global or project-level):
|
|
12
10
|
|
|
13
11
|
```json
|
|
14
12
|
{
|
|
15
13
|
"plugin": [
|
|
16
|
-
"superpowers@git+https://github.com/obra/superpowers.git",
|
|
17
14
|
"@mstar-harness/opencode@latest"
|
|
18
15
|
]
|
|
19
16
|
}
|
|
@@ -64,7 +61,7 @@ The `@mstar-harness/cli` package (`npx @mstar-harness/cli init`) migrates that e
|
|
|
64
61
|
|
|
65
62
|
### Plugin not loading
|
|
66
63
|
|
|
67
|
-
1. Check logs: `opencode run --print-logs "hello" 2>&1 | grep -i
|
|
64
|
+
1. Check logs: `opencode run --print-logs "hello" 2>&1 | grep -i mstar`
|
|
68
65
|
2. Verify the plugin line in your `opencode.json`
|
|
69
66
|
3. Make sure you're running a recent version of OpenCode
|
|
70
67
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: iteration-drive
|
|
3
|
-
description: Drive the active iteration to completion — run the Autonomous Execute loop (Phase 2 of mstar-iteration) until all plans are Done, then run iteration-close (Phase 3: compound + compass + roadmap update) on the integration branch, then create PR to target branch
|
|
3
|
+
description: Drive the active iteration to completion — run the Autonomous Execute loop (Phase 2 of mstar-iteration) until all plans are Done, then run iteration-close (Phase 3: compound + compass + roadmap update) on the integration branch, then create PR to the recorded target branch
|
|
4
4
|
agent: project-manager
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -20,12 +20,20 @@ Drive the active Morning Star iteration forward. The canonical flow is in **`mst
|
|
|
20
20
|
|
|
21
21
|
## Phase 2: Autonomous Execute
|
|
22
22
|
|
|
23
|
+
**Branch policy first** — before any plan dispatch(`mstar-iteration` §2.3):
|
|
24
|
+
|
|
25
|
+
| Field | SSOT | If missing |
|
|
26
|
+
|-------|------|------------|
|
|
27
|
+
| `iteration_base_branch` | `status.json` `metadata` → compass frontmatter | **STOP** — ask user; **never** default `main` |
|
|
28
|
+
| `spec_integration_branch` | plan `metadata` | backfill from iteration-start / compass |
|
|
29
|
+
| `target_branch` | `status.json` `metadata` → compass frontmatter | **STOP** — ask user |
|
|
30
|
+
|
|
23
31
|
Execute **`mstar-iteration` § Phase 2** exactly. Summary:
|
|
24
32
|
|
|
25
|
-
1. **Precondition gate** (§ 2.0) —
|
|
33
|
+
1. **Precondition gate** (§ 2.0) — **four** checks(含 branch metadata #4)
|
|
26
34
|
2. **Session todos** (§ 2.1) — set host todos per plan wave
|
|
27
|
-
3. **Read backlog** (§ 2.2) — `status.json` +
|
|
28
|
-
4. **Integration branch** (§ 2.3) — checkout
|
|
35
|
+
3. **Read backlog** (§ 2.2) — `status.json` + branch metadata
|
|
36
|
+
4. **Integration branch** (§ 2.3) — `git checkout -b <spec_integration_branch> <iteration_base_branch>` when creating(**not** implicit `main`)
|
|
29
37
|
5. **Per-plan loop** (§ 2.4) — for each non-`Done` plan:
|
|
30
38
|
- Create plan feature branch from integration
|
|
31
39
|
- Dispatch implement subagents (dispatch-first)
|
|
@@ -63,8 +71,9 @@ git push origin <spec_integration_branch>
|
|
|
63
71
|
|
|
64
72
|
All iteration-close changes committed to integration branch:
|
|
65
73
|
|
|
66
|
-
- Resolve PR target
|
|
67
|
-
-
|
|
74
|
+
- Resolve PR target: `status.json` → `metadata.target_branch`(fallback:compass frontmatter `target_branch`)
|
|
75
|
+
- If missing → **stop and ask**; never default `main` / `master`
|
|
76
|
+
- Create PR: `spec_integration_branch` → `target_branch`
|
|
68
77
|
- Report summary: plans completed, compound round(结晶文档数), target branch, PR link
|
|
69
78
|
|
|
70
79
|
PR 合并后(babysit loop 或手动),本次迭代完整结束。
|
|
@@ -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 Task dispatch (product-manager → architect → writing-specialist each review-and-edit, then PM final lock), then integration branch. Not Done until review chain completes
|
|
3
|
+
description: Start a new harness iteration — research backlog, lock direction with grill-me, produce compass/plans, run mandatory Review & Edit chain via 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.
|
|
4
4
|
agent: project-manager
|
|
5
5
|
---
|
|
6
6
|
|
|
@@ -56,14 +56,18 @@ Run the **grill-me skill** to stress-test candidate directions with the user:
|
|
|
56
56
|
- Walk through trade-offs for each candidate
|
|
57
57
|
- Converge on a **single iteration direction** with shared understanding
|
|
58
58
|
- Document: locked direction, success criteria, non-goals
|
|
59
|
+
- Confirm delivery branch policy:
|
|
60
|
+
- `iteration_base_branch`: branch/ref used to create `spec_integration_branch`
|
|
61
|
+
- `target_branch`: PR target after iteration-close
|
|
62
|
+
- If either is not explicit, inspect the current branch and ask. **Do not default to `main` / `master` just because those names exist.**
|
|
59
63
|
|
|
60
64
|
## 4. Write Compass & Plans
|
|
61
65
|
|
|
62
|
-
Produce harness artifacts per **`mstar-iteration` § 1.3
|
|
66
|
+
Produce harness artifacts per **`mstar-iteration` § 1.3**(template: `mstar-iteration/references/iteration-compass-template.md`):
|
|
63
67
|
|
|
64
|
-
- `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` —
|
|
68
|
+
- `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` — YAML frontmatter **must** include `iteration_base_branch`, `target_branch`, `status: active`
|
|
65
69
|
- `{PLAN_DIR}/<plan-id>-<name>.md` for each plan in this iteration
|
|
66
|
-
- Register all plans in `{HARNESS_DIR}/status.json`(per `mstar-plan-artifacts`)
|
|
70
|
+
- Register all plans in `{HARNESS_DIR}/status.json`(per `mstar-plan-artifacts` §1.5:root `metadata` + plan `spec_integration_branch`)
|
|
67
71
|
- Update `{ITERATION_DIR}/README.md` index(per `mstar-iteration` § 1.4)
|
|
68
72
|
|
|
69
73
|
## 5. Review & Edit Chain(HARD GATE — do not commit before this)
|
|
@@ -103,12 +107,22 @@ PM must print this block before §6; all `[ ]` must be `[x]`:
|
|
|
103
107
|
- [ ] @architect Task completed — compass / specs edited
|
|
104
108
|
- [ ] @writing-specialist Task completed — iteration docs edited
|
|
105
109
|
- [ ] PM final lock: compass `status: locked`; Prepare gates pass (blocked plans documented)
|
|
110
|
+
- [ ] Branch policy locked: `iteration_base_branch`, `spec_integration_branch`, and `target_branch` recorded in compass / `status.json`
|
|
106
111
|
- [ ] **THEN**: git commit + push `iteration/<iteration-id>`
|
|
107
112
|
|
|
108
113
|
## 6. Integration Branch
|
|
109
114
|
|
|
110
115
|
**Precondition**: §5 complete — compass `status: locked`; specialist Tasks returned; Prepare gates confirmed.
|
|
111
116
|
|
|
112
|
-
- Create `iteration/<iteration-id>` from `
|
|
113
|
-
|
|
117
|
+
- Create `spec_integration_branch` (e.g. `iteration/<iteration-id>`) **from** the locked `iteration_base_branch`:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
git fetch origin # if needed
|
|
121
|
+
git checkout -b <spec_integration_branch> <iteration_base_branch>
|
|
122
|
+
# or: git checkout <spec_integration_branch> if it already exists
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
- Register `iteration_base_branch`, `spec_integration_branch`, and `target_branch` in compass frontmatter **and** `{HARNESS_DIR}/status.json` root `metadata`
|
|
114
126
|
- Commit all documents to the integration branch and push to remote
|
|
127
|
+
|
|
128
|
+
**STOP** if `iteration_base_branch` or `target_branch` is missing. Ask the user or derive only from an already documented project/iteration policy; never silently substitute `main`.
|
|
@@ -7,7 +7,7 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
7
7
|
|
|
8
8
|
**首次 Read 本 skill 前:必须先 Read `mstar-harness-core`(SKILL.md)。** 冲突时 **以 `mstar-harness-core` 为准**。
|
|
9
9
|
|
|
10
|
-
**Spec 多 plan 命名**(`spec_integration_branch
|
|
10
|
+
**Spec 多 plan 命名**(`iteration_base_branch`、`spec_integration_branch`、`target_branch` PR 门禁)→ **`mstar-plan-conventions`**。下文为 **Git 操作与 QC/QA 检出对齐** 全文(无单独 reference 层)。
|
|
11
11
|
|
|
12
12
|
## Scope(摘要)
|
|
13
13
|
|
|
@@ -105,16 +105,16 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
105
105
|
|
|
106
106
|
当 **`@project-manager` 在同一调度轮次内并发启动多个** subagent(含宿主侧「并行 Task / 并行 subagent」),且 **≥2 个承接方**可能对 **同一 Git 仓库的同一工作区(同一 cwd 检出目录)**产生写文件或 `git commit` 级改动时:
|
|
107
107
|
|
|
108
|
-
- **必须**为每条并发写流使用
|
|
108
|
+
- **必须**为每条并发写流使用 **独立检出目录**:优先使用宿主原生 worktree/checkout 隔离能力;没有原生能力时使用 `git worktree`,并按本 skill 的目录、分支和 QC/QA 对齐规则执行。
|
|
109
109
|
- **必须**与既有分支门禁一致:每个可写承接方的 Assignment 仍须含 PM 已批准的 **`Working branch`** / **`Branch policy`**;在某一 worktree 内 **不得**擅自 `checkout` 到未授权分支或私自新建分支。
|
|
110
|
-
- **PM 须在 Assignment 中写清**各并发写流的 **检出约定**(例如预期 **`Worktree path`** /
|
|
110
|
+
- **PM 须在 Assignment 中写清**各并发写流的 **检出约定**(例如预期 **`Worktree path`** / 命名规则,或「由承接方创建/使用隔离 worktree 并在 Completion Report 回报路径」),避免多代理默认共享同一目录导致互相覆盖、冲突或半写入状态。
|
|
111
111
|
- **同仓、同一 plan、≥2 可写并行轨**:**推荐**在首次向各轨下发实现 Assignment **之前**,先由 PM 与用户确认 **`Branch policy`**,并 **明确 plan 集成分支与各轨 topic 分支的关系**(见下节 **「推荐默认编排:先建 plan 集成分支,再挂各 worktree」**),再为各轨约定 **`git worktree`**。这样 QC 前可把各轨 **自然归并**到同一条 **`HEAD`**,减少「多头分支、无合并靶」导致的误派。
|
|
112
112
|
|
|
113
113
|
**可不强制新开 worktree** 的情形包括:并发流 **全部为只读**;各写入者针对 **不同 Git 仓库根**;或写入 **串行**(同一时刻仅一个代理持有该仓工作区)。
|
|
114
114
|
|
|
115
115
|
### 并发 subagent 与同仓工作树(对齐)
|
|
116
116
|
|
|
117
|
-
当多个可写 subagent **并发**修改 **同一仓库** 时,**不得**共用同一检出目录作为写入 cwd。PM 在分派前应规划
|
|
117
|
+
当多个可写 subagent **并发**修改 **同一仓库** 时,**不得**共用同一检出目录作为写入 cwd。PM 在分派前应规划 worktree/checkout 隔离,并在各承接方 Assignment 中写明 **`Working branch`** / **`Branch policy`** 及 **检出路径约定**(或要求回报实际 worktree 路径)。单分支决策权仍仅属 PM;worktree 只解决「目录与工作区隔离」,不替代分支授权。
|
|
118
118
|
|
|
119
119
|
**同仓、同一 plan、多可写并行轨(推荐)**:在挂齐各轨 `git worktree` **之前**,先与用户确认并写明 **plan 集成分支**(从商定 `<base>` 创建)及各轨 **topic 分支** 如何从该线分出或如何 **merge 回** 该线;QC 前再将待一并验收的提交 **全部归并**到 PM 指定为 QC **`Working branch`** 的那条分支的 **`HEAD`**。分步说明与示例命名边界见下节 **「推荐默认编排:先建 plan 集成分支,再挂各 worktree」**。
|
|
120
120
|
|
|
@@ -124,10 +124,10 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
124
124
|
|
|
125
125
|
- **语义区分(必须理解)**:开发阶段可以存在 **多个** `Worktree path`(每条约流一条检出目录);**一轮**正式 QC 三审及与之 **逐字对齐** 的 QA 验证,在 harness 中仍只对应 **一套** `Review cwd` / `Worktree path` + **`Working branch`** + **`Review range` / `Diff basis`**(三票 QC 与 QA **共用且逐字相同**)。**不要**把「多个开发 worktree」误解成「QC 应轮流进多个目录各审一半」。
|
|
126
126
|
- **推荐默认编排:先建 plan 集成分支,再挂各 worktree(PM;强推荐)**:在 **同仓**、**同一 plan** 且 **≥2 条可写并行轨** 时,按下列顺序编排可最大幅度降低 QC/QA 误用单一开发目录的风险。**此为推荐套路,不是唯一合法 Git 拓扑**;若采用其它拓扑,仍须满足本节下文 **强制**条款(派 QC 前 **单一**待审 `HEAD` + 一套对齐字段)。
|
|
127
|
-
1. **先起集成分支(再挂 worktree)**:在派发各轨 **实现** Assignment 之前,PM 与用户确认 **`Branch policy`**,并建立 **plan 集成分支**(Assignment 使用 **`Working branch: create <plan-integration-branch> from <base>`** 或等价明确写法;`<base>`
|
|
127
|
+
1. **先起集成分支(再挂 worktree)**:在派发各轨 **实现** Assignment 之前,PM 与用户确认 **`Branch policy`**,并建立 **plan 集成分支**(Assignment 使用 **`Working branch: create <plan-integration-branch> from <base>`** 或等价明确写法;`<base>` 必须是 PM 明确记录的 base,例如 root `metadata.iteration_base_branch`、现有 feature 分支、远程跟踪分支或团队既定主线,**不得**未授权假设)。**分支名由 PM 指定**;下文 **`feature/<plan-id>-integrate`**、**`integrate/<plan-id>`** 仅为命名示例,**非强制**。**多 `plan_id` 同源一条 `primary_spec`(Spec 文档)时**:该集成分支在计划语义上即 **Spec 集成分支**;各 Plan 的 feature 线 merge 回此线,**全部 Plans 完成后** 向显式 `target_branch` **走 PR**(见 `mstar-plan-conventions` SKILL.md「Spec 驱动的分支模型」)。
|
|
128
128
|
2. **再挂各轨 worktree**:为每条并行轨分配 **独立** `git worktree` + **`Worktree path`**;各轨 **`Working branch`** 一般为 **从集成分支出** 的 topic 分支(`create <topic-i> from <plan-integration-branch>`)或 PM 书面约定的等价结构(例如从同一 `<base>` 出 topic、但 **书面指定** 合并时 **以集成分支为靶**)。**禁止**承接方擅自把未授权功能提交直接堆在 `main`/`master`。
|
|
129
129
|
3. **进 QC 之前**:将全部 **须同一轮三审覆盖** 的提交 **merge / rebase / cherry-pick**(以 PM 指定的团队方式)**归并**到 **同一条** PM 将作为 QC **`Working branch`** 的分支的 **`HEAD`**(**通常即 plan 集成分支**;若 PM 已将集成分支重命名或快进为最终 `feature/*`,以 Assignment 为准)。**在此**解决冲突;**勿**在 QC Assignment 仍指向「只含部分轨」的旧 `HEAD` 时派三审。
|
|
130
|
-
4. **QC / QA 的 `Working branch` 与合并主线**:派发 QC 三审与对齐的 QA 时,**`Working branch`** **即为**上一步 **已含全部待审提交** 的那条分支(常见为 plan 集成分支)。**`Review range` / `Diff basis`** 通常相对 **尚未合并 feature
|
|
130
|
+
4. **QC / QA 的 `Working branch` 与合并主线**:派发 QC 三审与对齐的 QA 时,**`Working branch`** **即为**上一步 **已含全部待审提交** 的那条分支(常见为 plan 集成分支)。**`Review range` / `Diff basis`** 通常相对 **尚未合并 feature 的**显式目标或 base 参照(例如 `merge-base: <target_branch-or-base-ref>` + `tip: HEAD`),审查的是 **「feature 线 vs 目标线」** 的差异;**默认不要求**在 QC **通过前** 已把该分支 merge 进目标分支(除非 **`Branch policy`** 或用户明确约定 trunk 式例外)。
|
|
131
131
|
5. **本推荐不适用时**:单轨、多仓库、或 plan 已 **拆 scope / 多轮增量三审**(见 `mstar-plan-conventions`)— 仍须 **逐轮**满足 **强制**条款:每轮 QC 对应 **一条**快照、**一套**逐字相同的 `plan_id` + `Review range` / `Diff basis`。
|
|
132
132
|
- **单一待审 Git 快照(派 QC 前置条件)**:若本 plan 下曾有多条 **可写** 并行轨落在 **同一业务仓** 且其成果分布在 **不同分支**、或 **未互相合并进同一条分支的 `HEAD`**,则在派发 **QC 三审**(及同范围的 QA)**之前**,**必须**先在 Git 中完成 **归并**(merge / rebase / 按团队约定的集成方式),使 **全部**待审提交都出现在 **同一条** PM 指定的 **`Working branch`** 的 **`HEAD`** 上;**然后**再填写 **一个** `Review cwd`(可为该分支上新开的只读审查 worktree)与 **一个** 可复现的 **`Review range` / `Diff basis`**。**禁止**仅填写并行轨 **A** 的开发用 `Worktree path` 作为 `Review cwd`,却期望审查覆盖仍只存在于并行轨 **B** 的分支或提交上的变更(在该变更 **未进入** 轨 A 所检出分支的 `HEAD` 时,这在 Git 上不可复现,属 **Assignment 错误**)。
|
|
133
133
|
- **不应合并为一次审时的做法**:若两轨 **有意**保持独立可合并单元(例如两条独立 PR),**不得**共用 **同一套** `plan_id` + **`Review range` / `Diff basis`** 假装「一轮三审覆盖全部」。应 **拆分 scope**:分轮次审查、不同 **`Feature / scope label`**、不同 `plan_id`、或按 `mstar-plan-conventions` 写明的 **显式增量三审** 例外,使每轮 QC 各对应 **一条**分支快照与 **一套**对齐字段。
|
|
@@ -137,10 +137,10 @@ description: Morning Star business-repo Git feature branches, same-repo concurre
|
|
|
137
137
|
|
|
138
138
|
开发在 **feature 分支**上完成(往往在 **独立 worktree** 中实现)后,**QC 审查与 QA 验证针对的都是这份 feature**,而不是 `main` 或任意未对齐的默认 cwd。
|
|
139
139
|
|
|
140
|
-
- **`@project-manager`** 分派 **QC** 时须在 Assignment 写明与待审实现一致的 **`Working branch`**,并写明 **`Review cwd` / `Worktree path`**:**优先**沿用开发 **Completion Report** 中回报的业务仓 **实现检出路径**(即「该 feature 的 worktree」)**当且仅当**该路径上的检出分支 **`HEAD` 已包含本轮待审的全部提交**(含曾发生在其他并行 worktree、现已归并到该分支的变更)。否则 **必须**改用 **集成完成后的** `Working branch`
|
|
140
|
+
- **`@project-manager`** 分派 **QC** 时须在 Assignment 写明与待审实现一致的 **`Working branch`**,并写明 **`Review cwd` / `Worktree path`**:**优先**沿用开发 **Completion Report** 中回报的业务仓 **实现检出路径**(即「该 feature 的 worktree」)**当且仅当**该路径上的检出分支 **`HEAD` 已包含本轮待审的全部提交**(含曾发生在其他并行 worktree、现已归并到该分支的变更)。否则 **必须**改用 **集成完成后的** `Working branch` 与对应检出路径(或在该分支上 **另开** 审查专用 worktree)。若开发未用 worktree,则写明单一明确的业务仓根路径。若审查需与开发目录 **物理分离** 但仍审 **同一分支**,可指示在 **`Working branch`** 上 **另加** 一个 worktree 专供审查(只读使用业务仓)。**多流并行开发**时的前置归并、**推荐默认编排(plan 集成分支先行)** 与误派禁令见上一小节。
|
|
141
141
|
- **三票审同一功能(强制对齐)**:分派 **QC 三审**时,除上述字段外,**必须**在 **三份 Assignment 中逐字写入相同**的 **`plan_id`** 与 **`Review range` / `Diff basis`**:
|
|
142
142
|
- **`plan_id`**:与 `{PLAN_DIR}/reports/<plan-id>/` 及主 **Plan Path** 一致;无 `{PLAN_DIR}` 流程时写 **`plan_id: N/A`**,并另给一行 **`Feature / scope label`**(不可歧义,足以与并行其它 feature 区分)。
|
|
143
|
-
- **`Review range` / `Diff basis`**:明确本次审查所针对的 **diff/提交范围**(例如 `merge-base:
|
|
143
|
+
- **`Review range` / `Diff basis`**:明确本次审查所针对的 **diff/提交范围**(例如 `merge-base: <target_branch-or-base-ref>` + `tip: HEAD`;或 `rev-range: <full-40>..<full-40>`;或一句 `equivalent to: git diff <merge-base>...HEAD`,以团队可复现为准)。**三名 reviewer 的 Assignment 间该字段必须完全一致**;**@qa-engineer** 验证同一 feature 时 **复用同一 `plan_id` 与同一 `Review range` / `Diff basis`**。**热修 / QC 单审**路径也须含 **同一组字段**,仅承接方份数为 1。
|
|
144
144
|
- **三审并行**时,三名 reviewer **共用同一组 `Review cwd` / `Worktree path` + `Working branch` + `plan_id` + `Review range` / `Diff basis`**(对业务仓只读分析);**一般不必**为每位 reviewer 各开一个 worktree,除非宿主或执行环境要求进程级隔离。
|
|
145
145
|
- QC 的 **报告落盘**仍仅限 `{PLAN_DIR}/reports/`;上述约定保证 `git diff`、`git log`、lint 与所读文件与 **待合并 feature** 一致。
|
|
146
146
|
- **`@project-manager`** 分派 **`@qa-engineer`** 做 **本 feature 的验证**(跑测试、复现、可观察取证、或向业务仓提交测试/配置)时,须在 Assignment 中写明 **同一套** **`Review cwd` / `Worktree path`**、**`Working branch`**、**`plan_id`** 与 **`Review range` / `Diff basis`**(与 QC 三审 **逐字相同**;若 QC 已写清,QA **照抄**)。**@qa-engineer** 在执行业务仓命令前须核对当前目录与分支与 Assignment 一致;**Report-only**、且本轮 **不涉及** 业务仓内命令/路径依赖时,若 Assignment 未写 `Review cwd`,须在回报中说明验证所基于的检出或环境,缺失则 `Blocked` 并请 PM 补全。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-coding-behavior
|
|
3
|
-
description: Morning Star (启明星) 跨角色通用编码行为准则 —— Think Before Coding(先读懂再改、显式假设、不静默猜测、读 imports/test/项目模式)、Simplicity First(YAGNI 优先不写代码、The Ladder 决策层级含依赖评估、删除优于添加、简洁优于聪明、5 项具名反模式速查、`simplify:` 标记天花板与升级路径、最小耐久切片)、Surgical Changes(改动可追溯、Bug 修根因先 grep 所有调用点、不顺手重构、不 piggyback)、Debugging(读完整报错与栈追踪、先复现、一步一测、根因分析、Bug 修复前先写复现测试、卡住时坦白)、Goal-Driven Execution(非平凡逻辑必留一个可运行检查、模糊请求转可验证结果、测行为不测实现、已有测试前后对比、不能测试说理由、Step → verify 微模板、分批留 roadmap)、Communication(说做了什么及为什么、标记顾虑、精确表达不确定性、不解释已知的、commit message 质量)。任何实现、调试、重构、审查任务都应优先 Read 本 skill;`@fullstack-dev` / `@frontend-dev` / `@fullstack-dev-2` / `@architect` / `@qa-engineer` / `@ops-engineer` / `@prompt-engineer` 动手前必读;QC 审查员核对变更是否只做了该做的手术时必读。本 skill 不覆盖分支门禁、QC/QA 路由、Assignment 权限、Done 所有权等不变量(那些以 `mstar-harness-core` 为准)。
|
|
3
|
+
description: Morning Star (启明星) 跨角色通用编码行为准则 —— Think Before Coding(先读懂再改、显式假设、不静默猜测、读 imports/test/项目模式)、Simplicity First(YAGNI 优先不写代码、The Ladder 决策层级含依赖评估、删除优于添加、简洁优于聪明、5 项具名反模式速查、`simplify:` 标记天花板与升级路径、最小耐久切片)、Surgical Changes(改动可追溯、Bug 修根因先 grep 所有调用点、不顺手重构、不 piggyback)、Debugging(读完整报错与栈追踪、先复现、一步一测、根因分析、Bug 修复前先写复现测试、卡住时坦白)、Review Feedback Handling(先核实反馈再改、逐项处理、可用证据反驳错误建议)、Goal-Driven Execution(非平凡逻辑必留一个可运行检查、模糊请求转可验证结果、测行为不测实现、已有测试前后对比、不能测试说理由、Step → verify 微模板、分批留 roadmap)、Communication(说做了什么及为什么、标记顾虑、精确表达不确定性、不解释已知的、commit message 质量)。任何实现、调试、重构、审查任务都应优先 Read 本 skill;`@fullstack-dev` / `@frontend-dev` / `@fullstack-dev-2` / `@architect` / `@qa-engineer` / `@ops-engineer` / `@prompt-engineer` 动手前必读;QC 审查员核对变更是否只做了该做的手术时必读。本 skill 不覆盖分支门禁、QC/QA 路由、Assignment 权限、Done 所有权等不变量(那些以 `mstar-harness-core` 为准)。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
@@ -166,7 +166,31 @@ Micro template:
|
|
|
166
166
|
- **Test behavior, not implementation.** A test that checks whether a constructor sets properties is worthless. A test that checks whether validation actually rejects bad input is valuable. Focus on the interesting cases.
|
|
167
167
|
- **If you cannot write a test, say why.** "I cannot easily test this because the database calls are tightly coupled to the business logic" is useful information that may signal a need for restructuring. Do not skip testing without an explanation.
|
|
168
168
|
|
|
169
|
-
## 6)
|
|
169
|
+
## 6) Review Feedback Handling
|
|
170
|
+
|
|
171
|
+
Core idea: review feedback is technical input, not an order to perform unverified edits.
|
|
172
|
+
|
|
173
|
+
When receiving code review, QA, CI, or human feedback:
|
|
174
|
+
|
|
175
|
+
1. Read all feedback before editing.
|
|
176
|
+
2. Clarify ambiguous items before partial implementation.
|
|
177
|
+
3. Verify each suggestion against codebase reality.
|
|
178
|
+
4. Apply technically correct feedback one item at a time.
|
|
179
|
+
5. Test each fix individually where practical.
|
|
180
|
+
6. Push back with evidence when feedback is incorrect, obsolete, risky, out of scope, or violates YAGNI.
|
|
181
|
+
|
|
182
|
+
Feedback priority:
|
|
183
|
+
|
|
184
|
+
| Feedback type | Handling |
|
|
185
|
+
|---|---|
|
|
186
|
+
| Security, correctness, data loss, build/test failure | Fix or escalate before proceeding. |
|
|
187
|
+
| Scope mismatch, reviewer misunderstanding, obsolete assumption | Verify and push back with evidence. |
|
|
188
|
+
| Style-only suggestion | Apply only if it matches project conventions or is requested by the user/PM. |
|
|
189
|
+
| New feature disguised as review | Route through PM/plan unless explicitly in scope. |
|
|
190
|
+
|
|
191
|
+
Do not perform agreement. State the technical action, the verification result, or the technical reason for disagreement.
|
|
192
|
+
|
|
193
|
+
## 7) Communication
|
|
170
194
|
|
|
171
195
|
Core idea: how you communicate about code matters as much as the code itself.
|
|
172
196
|
|
|
@@ -178,8 +202,7 @@ Core idea: how you communicate about code matters as much as the code itself.
|
|
|
178
202
|
|
|
179
203
|
## Integration Notes
|
|
180
204
|
|
|
181
|
-
- This skill
|
|
182
|
-
- It must not be used to bypass:
|
|
205
|
+
- This skill must not be used to bypass:
|
|
183
206
|
- branch constraints,
|
|
184
207
|
- QC/QA gate definitions,
|
|
185
208
|
- assignment authority,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-dispatch-gates
|
|
3
|
-
description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、同条消息 N 次 invoke、QC 三审禁止串行 rollout、Assignment 文案≠派发(invoke 条数须对齐)、未齐不发(emit zero until batch-ready)。**必须**在 `@project-manager` 每轮派发、QC 三审并发、双轨 implement、或 leaf 角色疑惑能否 Task 时 Read;所有非 PM 承接方动手前必读反递归与自检。同仓 worktree 与 QC 检出对齐见 `mstar-branch-worktree
|
|
3
|
+
description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent、`Execute as` 与 `Delegation`、承接方反递归 NEVER 红线、同条消息 N 次 invoke、QC 三审禁止串行 rollout、Assignment 文案≠派发(invoke 条数须对齐)、未齐不发(emit zero until batch-ready)。**必须**在 `@project-manager` 每轮派发、QC 三审并发、双轨 implement、或 leaf 角色疑惑能否 Task 时 Read;所有非 PM 承接方动手前必读反递归与自检。同仓 worktree 与 QC 检出对齐见 `mstar-branch-worktree`。宿主细则见 `mstar-host`(`references/parallel-dispatch.md` 与各宿主 reference)。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
@@ -14,7 +14,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
14
14
|
> **先回到你 Assignment 最顶部的 `**IDENTITY**` 块重读一遍** —— 那里已经告诉你:你是谁、你不是谁、Task 工具不属于你。本节是那个身份断言的加固版。
|
|
15
15
|
|
|
16
16
|
**身份断言(牢记,不动摇):**
|
|
17
|
-
- **你就是** `Execute as` 写的那个角色。你**不是 PM**,不是调度者,不是
|
|
17
|
+
- **你就是** `Execute as` 写的那个角色。你**不是 PM**,不是调度者,不是 parallel-agent dispatch 的使用者。
|
|
18
18
|
- Task/subagent 工具即使在你的工具列表里出现,它**不属于你**。把它当作你没见过的工具 —— 不是"不能用",是"你没有"。
|
|
19
19
|
- 所有工作由你**本人**在当前会话内完成(Read / Write / Edit / Shell / Grep / Glob)。任何"这样做更高效"的想法都不构成 dispatch 的理由。
|
|
20
20
|
- 遇到超出能力范围的需求 → 写 `## Blocked` 回报 PM,**不是**尝试 dispatch。Blocked 是你能发出的正确信号,dispatch 不是。
|
|
@@ -27,7 +27,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
27
27
|
- **NEVER** 把 Assignment 里出现的 **任何** `@<role>`、反引号 `` `<role-id>` ``、**Handoff**、**QA note**、**Completion Report** 模板里的角色名、路由表下游角色当成「立刻 invoke」的指令;这些是**叙事 / 路由文档 / 后续 PM 编排意图**,不是命令。
|
|
28
28
|
- **NEVER** 把「分解为多个计划 / 多 phase / 多 track」等**设计产物层面**的并行或拆分读成「应 invoke 与子会话数量对应的多个 subagent」。**纸面产物**由本会话写盘完成;并行**调度**由 PM 在后续轮次决定。
|
|
29
29
|
- **NEVER** 因宿主**暴露**了 `Task` 或若干 `subagent_type` 名称就推断可以调用。**工具可用 ≠ 授权使用**;授权只来自 **`Delegation: allowed (...)`**。
|
|
30
|
-
- **NEVER**(非 PM)主动执行
|
|
30
|
+
- **NEVER**(非 PM)主动执行 parallel-agent dispatch 来分派子代理;需要并行时回报 PM。
|
|
31
31
|
- **DO NOT** 在 Assignment 缺少 `Execute as` / `Delegation` / `Who runs this turn` 时自行「补齐」为 PM;缺字段时按 **leaf executor** 解释:亲自完成或 **`Blocked`**。
|
|
32
32
|
- **DO NOT** 用「Assignment 太长 / 像编排稿」当作分派依据;先交付本会话任务再回报,分派由 PM 下一轮决定。
|
|
33
33
|
|
|
@@ -47,7 +47,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
47
47
|
- 额外代理仅以 **`Delegation: allowed (...)`** 为准;未显式写时视为 **`Delegation: forbidden`**。
|
|
48
48
|
- Assignment 正文中的 `@xxx` 默认按「文本引用」解释,**不**视为自动调用命令。
|
|
49
49
|
- 承接方若判断必须增加 subagent,应先回报 **`Blocked`** 请 PM 重分派。
|
|
50
|
-
-
|
|
50
|
+
- Per-task informal review, when PM explicitly allows it, must not use `@qc-specialist*`; use `@general` / `generalPurpose` or PM-marked informal `@qa-engineer`. Formal QC remains `mstar-review-qc`.
|
|
51
51
|
|
|
52
52
|
## 并发分派完整性门禁(PM 强制)
|
|
53
53
|
|
|
@@ -16,7 +16,7 @@ Before any Task/subagent call (if I somehow forget the preamble):
|
|
|
16
16
|
4. Is `subagent_type` equal to my `Execute as`? If yes → **forbidden** (recursive dispatch).
|
|
17
17
|
5. Am I treating `@roles`, Handoff, QA note, Completion Report roles, or multi-plan/multi-track **design text** as invoke commands? If yes → **stop**; deliver in-session.
|
|
18
18
|
6. Am I invoking because the tool exists? **Available ≠ authorized.**
|
|
19
|
-
7. Need parallel work or PM-only
|
|
19
|
+
7. Need parallel work or PM-only dispatch? → **`Blocked`**; PM dispatches on the next round.
|
|
20
20
|
|
|
21
21
|
If blocked, report: `## Blocked — recursive dispatch refused (<which NEVER or reason>)`
|
|
22
22
|
|
|
@@ -33,7 +33,7 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
|
|
|
33
33
|
| 角色 | 始终 | 按任务追加(典型) |
|
|
34
34
|
|------|------|-------------------|
|
|
35
35
|
| **全部** | 本 skill | — |
|
|
36
|
-
| **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-
|
|
36
|
+
| **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);新建/大改 skill 时 `mstar-skill-authoring`;迭代管理 `mstar-iteration`(iteration-start/drive/close 含 compound);战略性工作 `mstar-strategy`。**不**读 `mstar-coding-behavior` |
|
|
37
37
|
| **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts`;UI 任务:`mstar-design-md`(读取 DESIGN.md tokens);写入知识库 `{KNOWLEDGE_DIR}`:`mstar-compound`(PM 触发) |
|
|
38
38
|
| **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
|
|
39
39
|
|
|
@@ -71,7 +71,7 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
|
|
|
71
71
|
|
|
72
72
|
## 长任务纪律
|
|
73
73
|
|
|
74
|
-
可追踪清单(plan `tasks` 或 Todo);偏离时 PM
|
|
74
|
+
可追踪清单(plan `tasks` 或 Todo);偏离时 PM 拉回;完成前须可核对证据(实现侧自检见 **`mstar-coding-behavior`**;门禁证据见 **`mstar-phase-gates`** / **`mstar-review-qc`**)。
|
|
75
75
|
|
|
76
76
|
**Durable Roadmap Gate**:凡声明“分批 / 后续 / next plan / later / temporary workaround”的非热修任务,必须在 `{PLAN_DIR}` 主 plan、CreatePlan mirror、`status.json`/residual、或 PM Task Board 中写清后续路线(批次、依赖、owner/触发条件、完成定义)。只在对话或 Completion Report 里说“以后做”不算可追踪,不能进入 implement GO 或 Done。
|
|
77
77
|
|
|
@@ -88,11 +88,11 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
|
|
|
88
88
|
| `mstar-plan-artifacts` | 主 plan、reports、`status.json`、residual、knowledge、Done 归档 |
|
|
89
89
|
| `mstar-design-md` | DESIGN.md 设计系统规范 —— 创建/审计/维护 design tokens,三级检查清单,light/dark 双主题 |
|
|
90
90
|
| `mstar-review-qc` | QC 工作流、模板、verdict、residual 留档、deep review 透镜 |
|
|
91
|
-
| `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Goal-Driven / Communication |
|
|
91
|
+
| `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Review Feedback / Goal-Driven / Communication |
|
|
92
92
|
| `mstar-compound` | 知识结晶 —— 已解决问题→结构化知识文档,双轨(Bug/Knowledge),「是否值得结晶」自检清单,重叠检测,可发现性检查,CONCEPTS.md 协同 |
|
|
93
93
|
| `mstar-compound-refresh` | 知识维护 —— 审查/更新/合并/删除 `{KNOWLEDGE_DIR}` 文档 |
|
|
94
94
|
| `mstar-strategy` | `STRATEGY.md` 全局战略方向 —— 产品愿景、技术方向、决策原则 |
|
|
95
|
-
| `mstar-
|
|
95
|
+
| `mstar-skill-authoring` | mstar-native skill authoring: trigger contracts, progressive disclosure, pressure scenarios, behavior-change evidence |
|
|
96
96
|
| `mstar-roles` | 角色正文 hub |
|
|
97
97
|
| `mstar-host` | 宿主适配(自动识别;`references/opencode.md` / `cursor.md` / `codex.md` / `parallel-dispatch.md`) |
|
|
98
98
|
|
|
@@ -114,7 +114,7 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
|
|
|
114
114
|
- 业务仓默认功能分支(Assignment `Branch policy` 例外)→ **`mstar-branch-worktree`**。
|
|
115
115
|
- **Dev 三角**:`@fullstack-dev` 后端主导;UI → `@frontend-dev`;第二轨 → `@fullstack-dev-2`(`mstar-roles` PM 节)。
|
|
116
116
|
- 工期仅 agent-oriented → **`mstar-plan-conventions`** · effort-estimation。
|
|
117
|
-
-
|
|
117
|
+
- plan-writing artifacts land in `{PLAN_DIR}`, not external default plan directories.
|
|
118
118
|
- PM Assignment 键名英文;任务正文可中文;产出/报告默认英文。
|
|
119
119
|
|
|
120
120
|
## 库文档(Context7)
|
|
@@ -142,6 +142,7 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
|
|
|
142
142
|
| iteration-start commit before review chain | `mstar-iteration` §1.6;PM 模拟三角色编辑而不派发 Task |
|
|
143
143
|
| Phase 3 折叠进 final plan closure / 跳过 §3.1 gate | `mstar-iteration` §3.0–§3.5;`iteration-drive` Phase 3 |
|
|
144
144
|
| iteration-close 无 frontmatter completed / 漏 compound Phase 6 | `mstar-iteration` §3.0.5、§3.4、§3.2 #5 |
|
|
145
|
+
| iteration 默认 `main` 作 base 或 PR 目标 | `mstar-iteration` §1.2、§2.3;`mstar-plan-conventions` Spec 分支模型 |
|
|
145
146
|
|
|
146
147
|
## 可选:OpenViking Memory
|
|
147
148
|
|
|
@@ -13,9 +13,9 @@
|
|
|
13
13
|
| **`clarify` 核心纪律** | 逐方面核对至共享理解;沿设计决策树逐枝、一次一决;能探索代码库则先探索;每问带推荐答案 | **`mstar-phase-gates`** SKILL.md(含 Phase Gate Playbook) |
|
|
14
14
|
| **按任务类别选能力与模型** | 视觉/深读/快改/硬逻辑等用不同强项 | `mstar-harness-core` SKILL.md「Task category」;Assignment 字段 **`Task category`**;宿主侧按角色配置 model(如 OpenCode 的 `opencode.json`) |
|
|
15
15
|
| **可验证编辑** | 减少「凭记忆 Patch」导致的漂移与损坏 | `mstar-phase-gates` SKILL.md「可验证编辑与上下文纪律」:读后再改、失败则重读 |
|
|
16
|
-
| **持续推进与可核对完成** | 长任务有清单、有关门证据,避免空转 | `mstar-
|
|
16
|
+
| **持续推进与可核对完成** | 长任务有清单、有关门证据,避免空转 | `mstar-phase-gates` / `mstar-review-qc`;实现侧自检见 `mstar-coding-behavior` |
|
|
17
17
|
| **编码行为约束(轻量)** | 降低静默假设、过度设计与无关改动 | `mstar-coding-behavior`:Think Before Coding / Simplicity First / Surgical Changes / Goal-Driven Execution |
|
|
18
|
-
| **并行与边界** | 多线任务不踩同一写归属、不绕过分支门禁;**开发**阶段同仓多可写并发须独立 **`git worktree`**;**QC / QA** 在 **同一检出**(`Review cwd`)与 **同一 `plan_id` + `Review range` / `Diff basis`** 上审查与验证,保证三票同一功能 | `mstar-branch-worktree`;`mstar-review-qc`;`mstar-
|
|
18
|
+
| **并行与边界** | 多线任务不踩同一写归属、不绕过分支门禁;**开发**阶段同仓多可写并发须独立 **`git worktree`**;**QC / QA** 在 **同一检出**(`Review cwd`)与 **同一 `plan_id` + `Review range` / `Diff basis`** 上审查与验证,保证三票同一功能 | `mstar-branch-worktree`;`mstar-review-qc`;`mstar-dispatch-gates` |
|
|
19
19
|
| **分层上下文(可选)** | 大仓库用目录级 `AGENTS.md` 降噪;根 `AGENTS.md` 维护边界见下文专节 | `mstar-harness-core` SKILL.md「分层上下文」;由业务项目维护者按需添加 |
|
|
20
20
|
| **结构化澄清(按宿主)** | 向用户澄清/抉择时,**有 `question` 类能力则优先**;否则结构化正文;长问兜底 | `mstar-phase-gates` SKILL.md Prepare · `clarify`;当前宿主的 `mstar-host` skill;`mstar-roles` · `project-manager` |
|
|
21
21
|
|
|
@@ -71,6 +71,6 @@
|
|
|
71
71
|
## 延伸阅读
|
|
72
72
|
|
|
73
73
|
- 按能力选配 MCP/skills:OpenCode → `mstar-host` `references/opencode.md`;其它宿主见 `mstar-host` 检测表
|
|
74
|
-
-
|
|
74
|
+
- Evidence and checkpoints: `mstar-phase-gates` / `mstar-review-qc`; implementation self-checks: `mstar-coding-behavior`
|
|
75
75
|
- 库文档检索共享协议:`mstar-harness-core` `references/library-docs-protocol.md`
|
|
76
76
|
- 跨角色编码行为准则(轻量、可复用):`mstar-coding-behavior`
|
|
@@ -197,7 +197,7 @@ When `/pm` runs under Plan mode:
|
|
|
197
197
|
|
|
198
198
|
## Related skills
|
|
199
199
|
|
|
200
|
-
- `mstar-plan-conventions` — discovery, init,
|
|
200
|
+
- `mstar-plan-conventions` — discovery, init, plan-writing path gate
|
|
201
201
|
- `mstar-plan-artifacts` — `status.json`, reports, checkboxes, residual
|
|
202
202
|
- `mstar-phase-gates` — Prepare / Execute order
|
|
203
203
|
- `mstar-roles/references/project-manager/dispatch-and-assignment.md` — Checkpoint: commit → Completion Report → Status Update
|
|
@@ -61,9 +61,9 @@ Enforcement: `rules/mstar-cursor-plan-mode.mdc` when plugin active.
|
|
|
61
61
|
- No `question` tool: structured Markdown or Cursor UI.
|
|
62
62
|
- “Question asked” ≠ clarify done; high-impact ambiguity → `Blocked` or escalation.
|
|
63
63
|
|
|
64
|
-
##
|
|
64
|
+
## Execution Discipline
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
Implementation roles use `mstar-coding-behavior` for RCA, test-first checks, review feedback, and completion evidence. Plan checkpoints remain in `mstar-phase-gates`; external skill plugins are not required.
|
|
67
67
|
|
|
68
68
|
## Gotchas
|
|
69
69
|
|
|
@@ -8,7 +8,7 @@ Parallel PM dispatch: **`parallel-dispatch.md`** (read in dispatch rounds).
|
|
|
8
8
|
|
|
9
9
|
- **Role shell**: `agents/<id>.md` referenced by `opencode.json` `agent.<id>` (frontmatter + role binding only).
|
|
10
10
|
- **Role body**: `mstar-roles` `references/<id>.md` (or shared references + parameters).
|
|
11
|
-
-
|
|
11
|
+
- Implementation evidence and RCA behavior: `mstar-coding-behavior`.
|
|
12
12
|
|
|
13
13
|
## OpenCode-specific capabilities
|
|
14
14
|
|
|
@@ -48,7 +48,7 @@ Aligned with `mstar-harness-core` `references/open-harness-principles.md`. Editi
|
|
|
48
48
|
| **Repo graph** | Impact / PR risk | e.g. GitNexus |
|
|
49
49
|
| **Browser / E2E** | Observable QA evidence | agent-browser, Playwright |
|
|
50
50
|
| **Git workflow** | Atomic commits, branch closure | git-commit, finishing-a-development-branch |
|
|
51
|
-
| **Systematic debugging** | RCA before fix | `mstar-
|
|
51
|
+
| **Systematic debugging** | RCA before fix | `mstar-coding-behavior` |
|
|
52
52
|
| **OpenViking memory** | Long-term memory tools | Only if `memsearch` present; `openviking-memory-plugin.md` |
|
|
53
53
|
|
|
54
54
|
**Not recommended**: overlapping search MCPs; extra tools to mask missing harness baseline.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-iteration
|
|
3
|
-
description: Morning Star 迭代管理 —— iteration-start
|
|
3
|
+
description: Morning Star 迭代管理 —— iteration-start(显式 `iteration_base_branch` / `target_branch`、Review & Edit chain 硬门禁)、Autonomous Execute(per-plan 派发;禁止默认 `main`)、iteration-close(独立 Phase gate)。compass:`{ITERATION_DIR}/`;分支 SSOT:`status.json` metadata + compass frontmatter。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# mstar-iteration(迭代管理)
|
|
@@ -25,10 +25,11 @@ iteration-start → [per-plan lifecycle × N] → iteration-close → PR → mer
|
|
|
25
25
|
└──────── iteration-drive(跨 plan 追踪)────────┘
|
|
26
26
|
```
|
|
27
27
|
|
|
28
|
-
**关键定位**:iteration-close 是 iteration-drive 命令的**最后一个 Phase**,在 integration 分支上执行,**完成后再创建 PR**。所有 compound 产物(knowledge docs、compass 更新、CONCEPTS.md)作为迭代交付的一部分随 PR
|
|
28
|
+
**关键定位**:iteration-close 是 iteration-drive 命令的**最后一个 Phase**,在 integration 分支上执行,**完成后再创建 PR**。所有 compound 产物(knowledge docs、compass 更新、CONCEPTS.md)作为迭代交付的一部分随 PR 合入已记录的 `target_branch`。一次迭代 = 一个 PR。
|
|
29
29
|
|
|
30
30
|
**per-plan 状态 SSOT**:`{HARNESS_DIR}/status.json`(per-plan Todo/InProgress/InReview/Done)。
|
|
31
31
|
**迭代状态 SSOT**:`{ITERATION_DIR}/<id>-delivery-compass.md` frontmatter `status` + `{ITERATION_DIR}/README.md` 索引。
|
|
32
|
+
**迭代分支 SSOT**:root `metadata.iteration_base_branch` + `metadata.target_branch`(`status.json`);compass frontmatter 镜像同名字段。解析顺序见 §2.3。**禁止**因仓库存在 `main`/`master` 就假定 base 或 PR 目标。
|
|
32
33
|
|
|
33
34
|
## 产物存储位置
|
|
34
35
|
|
|
@@ -59,6 +60,9 @@ PM 在新迭代启动时执行。
|
|
|
59
60
|
| **验收标准** | 迭代级别的 Done 定义 |
|
|
60
61
|
| **非目标** | 明确排除在本次迭代外的事项 |
|
|
61
62
|
| **Roadmap 上下文** | 本迭代在整体 roadmap 中的位置(current iteration / next iteration) |
|
|
63
|
+
| **Delivery branch policy** | `iteration_base_branch`(integration 分支从何处分出)、`spec_integration_branch`、`target_branch`(最终 PR 目标) |
|
|
64
|
+
|
|
65
|
+
**Branch policy gate**:若用户、现有 roadmap、或项目约定未明确 `iteration_base_branch` / `target_branch`,PM 必须检查当前分支并向用户确认。**不得**因为存在 `main` / `master` 就默认从默认分支开 iteration 或向默认分支提 PR。
|
|
62
66
|
|
|
63
67
|
### 1.3 创建迭代 compass
|
|
64
68
|
|
|
@@ -69,6 +73,8 @@ PM 在新迭代启动时执行。
|
|
|
69
73
|
iteration_id: <id>
|
|
70
74
|
start_date: YYYY-MM-DD
|
|
71
75
|
status: active
|
|
76
|
+
iteration_base_branch: <branch-or-ref>
|
|
77
|
+
target_branch: <branch>
|
|
72
78
|
plans: []
|
|
73
79
|
---
|
|
74
80
|
|
|
@@ -97,6 +103,14 @@ plans: []
|
|
|
97
103
|
## Roadmap Position
|
|
98
104
|
- Current iteration: <what this iteration delivers>
|
|
99
105
|
- Next iteration: <what comes next, owner, trigger>
|
|
106
|
+
|
|
107
|
+
## Delivery Branch Policy
|
|
108
|
+
|
|
109
|
+
| Field | Value |
|
|
110
|
+
|-------|-------|
|
|
111
|
+
| iteration_base_branch | <branch-or-ref> |
|
|
112
|
+
| spec_integration_branch | iteration/<iteration-id> |
|
|
113
|
+
| target_branch | <PR target> |
|
|
100
114
|
```
|
|
101
115
|
|
|
102
116
|
### 1.4 更新索引
|
|
@@ -107,9 +121,15 @@ plans: []
|
|
|
107
121
|
|----------|-----------|-------------|--------|
|
|
108
122
|
| `<iteration-id>-delivery-compass.md` | `<iteration-id>` | `<简短描述>` | `active` |
|
|
109
123
|
|
|
110
|
-
### 1.5 登记到 status.json
|
|
124
|
+
### 1.5 登记到 status.json(formal iteration 必填)
|
|
125
|
+
|
|
126
|
+
iteration-start / iteration-drive 正式流程**必须**写入 `{HARNESS_DIR}/status.json`:
|
|
127
|
+
|
|
128
|
+
- root `metadata.iteration_base_branch` — 创建 `spec_integration_branch` 的祖先 ref(**不是**隐式 `main`)
|
|
129
|
+
- root `metadata.target_branch` — iteration-close 后 PR 的目标分支
|
|
130
|
+
- 各 plan `metadata.iteration_refs`、`spec_integration_branch`、`merge_target`(`merge_target` 通常为 `spec_integration_branch`)
|
|
111
131
|
|
|
112
|
-
|
|
132
|
+
compass frontmatter 的 `iteration_base_branch` / `target_branch` **必须与** `status.json` 一致;若仅写在 compass 而 status 缺失,§2.3 同轮 backfill。
|
|
113
133
|
|
|
114
134
|
### 1.6 Review & Edit chain(integration 分支前强制)
|
|
115
135
|
|
|
@@ -132,13 +152,14 @@ PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直
|
|
|
132
152
|
|
|
133
153
|
**本 Phase 是本 skill 的核心**——定义 per-plan 派发循环的完整流程:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QC→QA→Done→合并)、dispatch-first 约束、push 纪律。PM 读取本 Phase 即可执行迭代。
|
|
134
154
|
|
|
135
|
-
### 2.0
|
|
155
|
+
### 2.0 前置条件(四道闸)
|
|
136
156
|
|
|
137
157
|
进入 Autonomous Execute 前必须满足:
|
|
138
158
|
|
|
139
159
|
1. `{HARNESS_DIR}/status.json` 中至少一条 plan `status` ≠ `Done`
|
|
140
160
|
2. **Pre-implement gate = GO**:plan 已 locked、tasks ready(见 `mstar-phase-gates`)
|
|
141
|
-
3. 用户意图为 **continue Execute**(`/pm`、"推进 iteration"
|
|
161
|
+
3. 用户意图为 **continue Execute**(`/pm`、`/iteration-drive`、"推进 iteration" 等)
|
|
162
|
+
4. **Branch metadata gate**:root `metadata.iteration_base_branch`、`metadata.target_branch` 已登记,且至少一条 active plan 有 `metadata.spec_integration_branch`(或可从 compass 同轮 backfill)。**缺失 → STOP**,不得用 `main`/`master` 补位。
|
|
142
163
|
|
|
143
164
|
任一 false → **stop**。Prepare 未完成 → 引导先跑 `/iteration-start`。
|
|
144
165
|
|
|
@@ -158,15 +179,26 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
158
179
|
|
|
159
180
|
1. 读 `mstar-plan-artifacts` + `{HARNESS_DIR}/status.json`
|
|
160
181
|
2. 列出 `status` ∈ `{Todo, InProgress, InReview, Blocked}` 的 plan(优先级:`InProgress` → `InReview` → `Todo` → unblock `Blocked`)
|
|
161
|
-
3. 读 `metadata.spec_integration_branch` / `merge_target` / `primary_spec` 链接
|
|
182
|
+
3. 读 root `metadata.iteration_base_branch` / `metadata.target_branch`,以及 plan `metadata.spec_integration_branch` / `merge_target` / `primary_spec` 链接
|
|
162
183
|
|
|
163
184
|
### 2.3 Integration branch
|
|
164
185
|
|
|
165
|
-
|
|
166
|
-
2. **checkout 或创建**该分支;`git branch --show-current` 确认
|
|
167
|
-
3. 若 metadata 缺失 → **stop**,读 `mstar-plan-conventions` + 用户确认(`mstar-branch-worktree`);同轮写入 plan + status
|
|
186
|
+
**Metadata 解析顺序**(任一环节缺失则 STOP,**禁止**默认 `main`/`master`):
|
|
168
187
|
|
|
169
|
-
|
|
188
|
+
1. `{HARNESS_DIR}/status.json` → `metadata.iteration_base_branch`、`metadata.target_branch`;plan → `metadata.spec_integration_branch`
|
|
189
|
+
2. 若 (1) 缺字段 → 读当前迭代 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md` frontmatter 同名键
|
|
190
|
+
3. 若 compass 有值而 `status.json` 无 → **同轮 backfill** `status.json`
|
|
191
|
+
4. 仍缺 → 向用户确认 base / PR target;**不得**因 `git symbolic-ref refs/remotes/origin/HEAD` 指向 `main` 就自动采用
|
|
192
|
+
|
|
193
|
+
**Git 操作**:
|
|
194
|
+
|
|
195
|
+
1. `git fetch`(按需)确认 `iteration_base_branch` 存在
|
|
196
|
+
2. **checkout 或创建** `spec_integration_branch`:
|
|
197
|
+
- 已存在 → `git checkout <spec_integration_branch>`
|
|
198
|
+
- 不存在 → `git checkout -b <spec_integration_branch> <iteration_base_branch>`(**必须**从记录的 base 创建,不是从当前未记录的 `main` 检出)
|
|
199
|
+
3. `git branch --show-current` 确认在 `spec_integration_branch`
|
|
200
|
+
|
|
201
|
+
此分支是本迭代内所有 plan feature branch 的 merge target。QC **`Review range` / `Diff basis`** 的 merge-base 参照优先用 `metadata.target_branch`(或 PM 书面指定的 base ref),**禁止**无 Assignment 依据写死 `origin/main`。
|
|
170
202
|
|
|
171
203
|
### 2.4 Per-plan loop(直到全部 Done)
|
|
172
204
|
|
|
@@ -203,7 +235,7 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
203
235
|
|
|
204
236
|
## Phase 3: iteration-close(收口迭代)
|
|
205
237
|
|
|
206
|
-
PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支上运行**,产出物 commit 到 integration 分支,随迭代 PR 合入
|
|
238
|
+
PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支上运行**,产出物 commit 到 integration 分支,随迭代 PR 合入 root `metadata.target_branch`。触发方:`commands/iteration-drive.md`(Autonomous Execute 全部 Done 后进入)。
|
|
207
239
|
|
|
208
240
|
**Close Done 定义**:§3.1→§3.5 全部完成;compass frontmatter 写入 `status: completed` + `end_date`;每篇新增 knowledge doc 已登记 `{KNOWLEDGE_DIR}/README.md`。只在 final plan 中写了 compound / roadmap / PR 说明,不算 iteration-close 完成。
|
|
209
241
|
|
|
@@ -287,6 +319,7 @@ PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git co
|
|
|
287
319
|
- [ ] §3.3 `## Roadmap Position` current iteration 已标 `delivered`;tracker / STRATEGY 已按需更新
|
|
288
320
|
- [ ] §3.4 frontmatter `status: completed` + `end_date`;Compound Summary + Retrospective 已填
|
|
289
321
|
- [ ] 当前分支是 `spec_integration_branch`
|
|
322
|
+
- [ ] PR base = `metadata.target_branch`(与 compass frontmatter 一致);**不是**未记录的 `main`
|
|
290
323
|
|
|
291
324
|
**Commit 到 integration 分支**:
|
|
292
325
|
|
|
@@ -296,6 +329,8 @@ git commit -m "chore(iteration): close <iteration-id> — compound round, roadma
|
|
|
296
329
|
git push origin <spec_integration_branch>
|
|
297
330
|
```
|
|
298
331
|
|
|
332
|
+
PR 目标使用 root `metadata.target_branch`;缺失时停止并补齐,不得默认 `main`。
|
|
333
|
+
|
|
299
334
|
### 3.6 可选:触发 compound-refresh
|
|
300
335
|
|
|
301
336
|
若本轮 compound 新增了较多知识文档,或 compass 标记了可能过时的旧知识,触发 `mstar-compound-refresh` 对有重叠的知识文档做维护。
|
|
@@ -326,6 +361,7 @@ git push origin <spec_integration_branch>
|
|
|
326
361
|
- 不要在 iteration-drive 中修改 per-plan gate 判定
|
|
327
362
|
- 不要用 compass 替代 `status.json` 作为 plan 状态 SSOT
|
|
328
363
|
- 不要在没有完成 per-plan 前置检查的情况下进入 iteration-close
|
|
364
|
+
- 不要在缺少 `iteration_base_branch` / `target_branch` 时默认使用 `main` / `master`
|
|
329
365
|
- 不要将 Phase 3 折叠进 final plan closure——须显式 §3.0→§3.5
|
|
330
366
|
- 不要用 prose completion status 替代 compass frontmatter `status: completed` + `end_date`
|
|
331
367
|
- 不要跳过 compound Phase 6(`{KNOWLEDGE_DIR}/README.md` 索引)——即使只结晶一篇文档
|
|
@@ -7,6 +7,8 @@ Copy this template when creating a new iteration compass in `{ITERATION_DIR}/`.
|
|
|
7
7
|
iteration_id: <id>
|
|
8
8
|
start_date: YYYY-MM-DD
|
|
9
9
|
status: active
|
|
10
|
+
iteration_base_branch: <branch-or-ref>
|
|
11
|
+
target_branch: <branch>
|
|
10
12
|
plans: []
|
|
11
13
|
---
|
|
12
14
|
|
|
@@ -53,6 +55,16 @@ Status values: `Todo` | `InProgress` | `InReview` | `Done` | `Blocked`
|
|
|
53
55
|
- **Next iteration**:<what comes next>,触发条件:<condition>,owner:<who>
|
|
54
56
|
- **最终目标**:<the long-term Done definition this iteration contributes to>
|
|
55
57
|
|
|
58
|
+
## Delivery Branch Policy
|
|
59
|
+
|
|
60
|
+
> Mirror of frontmatter; keep in sync with `{HARNESS_DIR}/status.json` `metadata`.
|
|
61
|
+
|
|
62
|
+
| Field | Value |
|
|
63
|
+
|-------|-------|
|
|
64
|
+
| `iteration_base_branch` | <branch-or-ref integration branch is cut from> |
|
|
65
|
+
| `spec_integration_branch` | <e.g. iteration/<iteration-id>> |
|
|
66
|
+
| `target_branch` | <PR target after iteration-close> |
|
|
67
|
+
|
|
56
68
|
## Risk Register
|
|
57
69
|
|
|
58
70
|
| Risk | Likelihood | Impact | Mitigation |
|
|
@@ -84,6 +96,8 @@ Status values: `Todo` | `InProgress` | `InReview` | `Done` | `Blocked`
|
|
|
84
96
|
| `start_date` | Yes | iteration-start |
|
|
85
97
|
| `end_date` | No | Add at iteration-close §3.4 only |
|
|
86
98
|
| `status` | Yes | iteration-start → `active` / `locked`(§1.6 PM lock);iteration-close §3.4 → **`completed`**(YAML frontmatter,非 prose completion status) |
|
|
99
|
+
| `iteration_base_branch` | Yes | iteration-start; integration branch must be created from this ref |
|
|
100
|
+
| `target_branch` | Yes | iteration-start; final PR target after iteration-close |
|
|
87
101
|
| `plans` (frontmatter) | Recommended | iteration-start (initial), iteration-drive (add new) |
|
|
88
102
|
| `## Plans` table | Yes | iteration-drive (sync status), iteration-close (final) |
|
|
89
103
|
| `## Milestones` | Recommended | iteration-start, iteration-drive (update) |
|