@mstar-harness/opencode 3.1.1 → 3.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -0
- package/dist/mstar.js +244 -134
- package/harness-commands/iteration-drive.md +9 -90
- package/harness-commands/iteration-loop.md +22 -62
- package/harness-commands/iteration-start.md +20 -77
- package/harness-skills/mstar-audit/SKILL.md +2 -2
- package/harness-skills/mstar-compound-refresh/SKILL.md +1 -1
- package/harness-skills/mstar-dispatch-gates/SKILL.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +4 -3
- package/harness-skills/mstar-iteration/SKILL.md +16 -10
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +62 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +3 -3
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +1 -1
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
- package/harness-skills/mstar-phase-gates/SKILL.md +1 -1
- package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +2 -2
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +1 -1
- package/harness-skills/mstar-plan-conventions/SKILL.md +1 -1
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +11 -1
- package/harness-skills/mstar-roles/references/architect.md +4 -7
- package/harness-skills/mstar-roles/references/code-reviewer.md +1 -4
- package/harness-skills/mstar-roles/references/frontend-dev.md +2 -4
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +2 -4
- package/harness-skills/mstar-roles/references/ops-engineer.md +2 -6
- package/harness-skills/mstar-roles/references/product-manager.md +4 -7
- package/harness-skills/mstar-roles/references/prompt-engineer.md +2 -5
- package/harness-skills/mstar-roles/references/qa-engineer.md +2 -6
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -4
- package/harness-skills/mstar-roles/references/writing-specialist.md +2 -5
- package/harness-skills/mstar-strategy/SKILL.md +5 -35
- package/package.json +1 -1
|
@@ -15,114 +15,33 @@ Drive the active Morning Star iteration forward. **Boot loads skills; this comma
|
|
|
15
15
|
|
|
16
16
|
**Done 定义**:**仅** Phase 5 §5.5 exit checklist 全 `[x]`。**Phase 3 close ≠ Done;Phase 4 开 PR ≠ Done。**
|
|
17
17
|
|
|
18
|
-
##
|
|
18
|
+
## 共享 invariants / preflight / todos / STOP
|
|
19
19
|
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
**合法 STOP(仅此升级用户)**:
|
|
23
|
-
|
|
24
|
-
- §2.0 / Phase 4 branch metadata 缺失(`iteration_base_branch` / `target_branch`)
|
|
25
|
-
- **`Blocked`**:真冲突、secrets、不可逆范围缺口、Phase 5 多轮仍无法 merge-ready
|
|
26
|
-
- 用户本轮显式打断
|
|
27
|
-
|
|
28
|
-
**Turn 收束纪律**:若 host 即将结束本轮,最后一条 assistant 内容必须是 **in-flight 动作**(invoke 已发出、或写明下一 dispatch 的 Assignment 字段),**不得**以对用户的确认问句结尾。
|
|
29
|
-
|
|
30
|
-
## PM invariants(Phase 2–5 全程有效)
|
|
31
|
-
|
|
32
|
-
| 禁止(PM 线程) | 必须 |
|
|
33
|
-
|-----------------|------|
|
|
34
|
-
| Write/Edit/Shell 产品代码、写测试、跑 QC 审查(Phase 2) | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
|
|
35
|
-
| **多 task plan 用 inline 大包派发**(整份 plan / T1–Tn 贴进一个 dev Assignment) | **SDD**:`mstar-sdd` per-task 循环 — `mstar-harness sdd task-brief` → implementer → `mstar-harness sdd review-package` → task reviewer → `progress.md` |
|
|
36
|
-
| 只写 Assignment 就进入下一 gate | 同轮 dispatch:`Subagent invokes issued: N`(N = Assignment 条数) |
|
|
37
|
-
| 最后一个 plan `Done` 后直接开 PR / 汇报结束 | **Phase 3 → 4 → 5** 顺序执行 |
|
|
38
|
-
| Phase 4 开 PR 后停止 | Phase 5 loop 至 merge-ready;**禁止**未过 §5.5 就结束会话 |
|
|
39
|
-
| Phase 5 自己改产品代码 | 需改产品代码时 **dispatch** `fullstack-dev` / `ops-engineer` |
|
|
40
|
-
|
|
41
|
-
派发细则 → **`mstar-dispatch-gates`** + **`mstar-host`**。Phase 3 细则 → **`mstar-iteration` §3** + **`mstar-compound`**。
|
|
42
|
-
|
|
43
|
-
**Session todos**:
|
|
44
|
-
|
|
45
|
-
| Todo id | 何时追加 | 何时可勾掉 |
|
|
46
|
-
|---------|----------|------------|
|
|
47
|
-
| plan-wave todos | 进入 Phase 2 | 各 plan `Done` |
|
|
48
|
-
| `phase-3-iteration-close` | 仅剩 1 个非 `Done` plan | Phase 3 §3.5 exit 全 `[x]` |
|
|
49
|
-
| `phase-4-create-pr` | Phase 3 完成后 | PR 已创建并记录 URL/number |
|
|
50
|
-
| `phase-5-pr-merge-ready` | Phase 4 完成后 | Phase 5 §5.5 exit 全 `[x]` |
|
|
20
|
+
Phase 2–5 共享内容(PM invariants、assignment preflight、session todos、continuous-execution STOP)→ **`mstar-iteration/references/command-shared-invariants.md`**(SSOT;不在本命令重复)。
|
|
51
21
|
|
|
52
22
|
## Boot
|
|
53
23
|
|
|
54
|
-
|
|
55
|
-
2. `mstar-roles` → `references/project-manager.md`
|
|
56
|
-
3. `mstar-iteration` → **§ Phase 2–5**(§3 close gate;§4 PR delivery;§5 merge-ready loop)
|
|
57
|
-
4. `mstar-compound` — Phase 3 §3.2 前加载(含 Phase 6 索引登记)
|
|
58
|
-
5. `mstar-dispatch-gates` + host reference
|
|
59
|
-
6. **`mstar-sdd`** — **before first implement dispatch** in Phase 2(per-task loop SSOT;多 task plan 默认 `Execution mode: sdd`)
|
|
60
|
-
7. `mstar-review-qc` — before first QC dispatch in Phase 2
|
|
61
|
-
8. `mstar-plan-artifacts`, `mstar-plan-conventions`, `mstar-branch-worktree`
|
|
62
|
-
9. **`mstar-iteration/references/phase-2-worktree-lease.md`** — Phase 2 control worktree、`execution_lease`、serial `integration_merge_lease`(§2.0 #5 未 waive)
|
|
24
|
+
按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration` § Phase 2–5 + `command-shared-invariants.md` → `mstar-compound` → `mstar-dispatch-gates` + host reference → **`mstar-sdd`**(first implement dispatch 前)→ `mstar-review-qc`(first QC 前)→ `mstar-plan-artifacts` / `mstar-plan-conventions` / `mstar-branch-worktree` → **`mstar-iteration/references/phase-2-worktree-lease.md`**)。完整 load list → **`mstar-roles`**。
|
|
63
25
|
|
|
64
26
|
## Phase 2: Autonomous Execute
|
|
65
27
|
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
**Assignment preflight**(`mstar-harness` bin 未安装时静默跳过): 在每次 implement/QC/QA 派发前(**SDD** 下为最新 `{SDD_DIR}/task-N-brief.md` 或临时写盘的 Assignment),若本机装有 CLI,校验最新 Assignment。模式由迭代 compass frontmatter 的 `enforcement` 键决定(Slice 5):
|
|
69
|
-
|
|
70
|
-
- **默认(compass 无 `enforcement: hard`)— 可选 warn-only**:exit 1 仅提示,不阻断派发(Slice 3 行为不变):
|
|
71
|
-
|
|
72
|
-
```bash
|
|
73
|
-
command -v mstar-harness >/dev/null 2>&1 && mstar-harness dispatch validate "<latest-assignment-file>"
|
|
74
|
-
```
|
|
75
|
-
|
|
76
|
-
- **`enforcement: hard`(迭代 compass frontmatter 声明)— fail-fast**:校验失败即 `exit 1` 阻断派发(bin 缺失仍静默跳过):
|
|
28
|
+
Execute **`mstar-iteration` § Phase 2** exactly(§2.0 五道闸 → §2.1 session todos → §2.2 backlog → §2.3 integration branch + control worktree → §2.4 per-plan loop(lease-gated;SDD per-task;QC tri N=3 + QA;serial merge)→ §2.5 dispatch-first → §2.6 push 纪律)。全部 plan `Done` → **STOP** → 打印 `## Phase 3: iteration-close`。
|
|
77
29
|
|
|
78
|
-
|
|
79
|
-
if command -v mstar-harness >/dev/null 2>&1; then mstar-harness dispatch validate "<latest-assignment-file>" || exit 1; fi
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
> 路径必须加引号且替换为具体文件(如最新 `{SDD_DIR}/task-N-brief.md`,勿留尖括号)——agent 代入的路径不得进入 shell 无引号展开。
|
|
30
|
+
**Assignment preflight**:每次 implement/QC/QA 派发前按 **`mstar-iteration/references/command-shared-invariants.md`** 执行。
|
|
83
31
|
|
|
84
32
|
## Phase 3: iteration-close
|
|
85
33
|
|
|
86
|
-
当 **every** plan 为 `Done
|
|
87
|
-
|
|
88
|
-
1. **STOP** per-plan loop — 不得开 PR、不得进入 Phase 4/5、不得输出「迭代完成」摘要。
|
|
89
|
-
2. 打印标题 **`## Phase 3: iteration-close`**(用户可见的 phase 边界)。
|
|
90
|
-
3. Execute **`mstar-iteration` § Phase 3**(→ **`references/phase-3-iteration-close.md`** §3.0→§3.5):§3.0.5 compass 规范化 → §3.1 close entry checklist(**HARD GATE**,必须打印)→ §3.2 compound + **`<iteration-id>/` package promotion**(`mstar-compound` Phase 6 索引登记)→ §3.3 roadmap → §3.4 frontmatter `status: completed` + `end_date` → §3.5 close exit checklist + commit → push。
|
|
91
|
-
4. §3.5 exit 全 `[x]` 且 compass `status: completed` 后 → 打印 **`## Phase 4: Create PR`**。
|
|
92
|
-
|
|
93
|
-
**Phase 3 exit(非 iteration-drive Done)**: §3.5 checklist `[x]` + compass frontmatter `completed`。
|
|
34
|
+
当 **every** plan 为 `Done`:**STOP** per-plan loop → 打印 **`## Phase 3: iteration-close`** → execute **`mstar-iteration` § Phase 3**(→ **`references/phase-3-iteration-close.md`** §3.0→§3.5;§3.1 entry checklist HARD GATE;§3.2 compound + package promotion;§3.4 `status: completed` + `end_date`)→ §3.5 exit 全 `[x]` 后打印 **`## Phase 4: Create PR`**。
|
|
94
35
|
|
|
95
36
|
## Phase 4: Create PR
|
|
96
37
|
|
|
97
|
-
Execute **`mstar-iteration` § Phase 4**(→ **`references/phase-4-5-pr-delivery.md`**):打印 `## Phase 4: Create PR` → resolve `metadata.target_branch
|
|
98
|
-
|
|
99
|
-
**Phase 4 exit(非 iteration-drive Done)**: PR 已创建且 head = `spec_integration_branch`。
|
|
38
|
+
Execute **`mstar-iteration` § Phase 4**(→ **`references/phase-4-5-pr-delivery.md`**):打印 `## Phase 4: Create PR` → resolve `metadata.target_branch`(缺失 → **STOP**,never default `main`/`master`)→ 创建 PR `spec_integration_branch` → `target_branch` → 记录 PR URL + number → 勾掉 `phase-4-create-pr` → **Immediately** 打印 **`## Phase 5: PR merge-ready`**(**禁止**在此停止或汇报 Done)。
|
|
100
39
|
|
|
101
40
|
## Phase 5: PR merge-ready(babysit loop)
|
|
102
41
|
|
|
103
|
-
Execute **`mstar-iteration` § Phase 5**(→ **`references/phase-4-5-pr-delivery.md`** §5.0–§5.2;**§5.1a push cadence HARD**)。**§5.5 exit 全 `[x]` =
|
|
104
|
-
|
|
105
|
-
本 command **叠加**可选 helper skill 发现(**non-`mstar-*`**;不写入 `mstar-*` load order):
|
|
106
|
-
|
|
107
|
-
### 5.0 Discover optional helper skills
|
|
108
|
-
|
|
109
|
-
Helper 搜索路径 → **`mstar-iteration/references/phase5-helper-discovery.md`**(babysit / `*-babysit` / greploop 路径清单;first readable `SKILL.md` wins per name)。
|
|
110
|
-
|
|
111
|
-
| Priority | Condition | Read before loop | Primary done signal |
|
|
112
|
-
|----------|-----------|------------------|---------------------|
|
|
113
|
-
| 1 | `babysit` **or** any `*-babysit` found | that skill’s `SKILL.md`(prefer exact `babysit`, else first matching `*-babysit`) | Required CI **all green** + **all** review threads **resolved** |
|
|
114
|
-
| 2 | `greploop` found **and** repo has Greptile/greploop | `greploop` SKILL.md | Greptile score **5/5** on this PR(**additive** — does not replace priority-1 gates) |
|
|
115
|
-
| 3 | else neither babysit/`*-babysit` | —(fallback = babysit 同级 CI + reviews 门禁) | Required CI **all green** + **all** review threads **resolved** |
|
|
116
|
-
|
|
117
|
-
**Both babysit/`*-babysit` and greploop apply**: run **babysit/`*-babysit` first**(CI + reviews),then optional greploop until Greptile **5/5**(串行;§5.5 仍须满足全部 exit 项)。Do **not** prefer greploop over babysit。**No greploop / repo without Greptile**: skip greploop entirely。**All modes** share §5.5 exit checklist(Greptile 5/5 only when greploop mode ran or repo shows a Greptile score)。
|
|
118
|
-
|
|
119
|
-
### 5.1 Loop + review fix hygiene(all modes)
|
|
120
|
-
|
|
121
|
-
Execute **`mstar-iteration` §5.1 loop**(`references/phase-4-5-pr-delivery.md` §5.1):status(`gh pr view <number> --json mergeable,mergeStateStatus,statusCheckRollup,reviewDecision` 或宿主等价 API)→ merge conflicts → unresolved reviews → CI → **§5.1a idle push**(一批修复一次 push)→ mode-specific pass(babysit SKILL / greploop / fallback)→ §5.1 review fix hygiene(**comment on same thread + resolve**)→ repeat until §5.5。Fixes **push 到 `spec_integration_branch`**(PR head);禁止另开分支替代。**Checkout(HARD,§5.0)**:直接在 control / 集成分支 checkout 上修;**禁止**另开 Phase 5 fix worktree,**禁止**套用 Phase 2 control 产品编辑禁令。产品代码修复 → **dispatch** dev/ops(Assignment cwd = control);PM 线程不代写。**禁止**为「让 CI 变绿」而改 workflow,除非用户明确授权。多轮仍 blocked → 升级用户。
|
|
122
|
-
|
|
123
|
-
### 5.2 Phase 5 exit checklist(iteration-drive Done)
|
|
42
|
+
Execute **`mstar-iteration` § Phase 5**(→ **`references/phase-4-5-pr-delivery.md`** §5.0–§5.2;**§5.1a push cadence HARD**)。**§5.5 exit checklist 全 `[x]` = 本 command Done.**
|
|
124
43
|
|
|
125
|
-
|
|
44
|
+
本 command **叠加**可选 helper skill 发现(**non-`mstar-*`**;不写入 `mstar-*` load order)→ **`mstar-iteration/references/phase5-helper-discovery.md`**(babysit / `*-babysit` / greploop / fallback 路径清单;first readable `SKILL.md` wins)。Loop + review fix hygiene + exit checklist → §5.1–§5.2(同上 reference)。
|
|
126
45
|
|
|
127
46
|
**Then** report: iteration id, plans completed, compound summary, PR link, merge-ready evidence(CI snapshot + review resolution + Greptile if applicable)。
|
|
128
47
|
|
|
@@ -46,94 +46,54 @@ Parse: if the last token is exactly `S`/`M`/`L`/`XL` (case-insensitive), treat i
|
|
|
46
46
|
|
|
47
47
|
## Continuous execution(HARD — Phase 1 lock 后至 Phase 5 exit)
|
|
48
48
|
|
|
49
|
-
Execute **`mstar-iteration` §2.6**(Continuous execution SSOT
|
|
49
|
+
Execute **`mstar-iteration` §2.6**(Continuous execution SSOT)+ **`mstar-iteration/references/command-shared-invariants.md`** STOP list(branch metadata 缺失 / **`Blocked`** / 用户显式打断 — 不在本命令重复)。**Loop 特有 STOP**:branch metadata 按 **`mstar-iteration`** autonomous resolve 顺序仍无法确定(**禁止**静默默认 `main`/`master`);代码/roadmap **无可信候选**且无 `direction` 参数。**Turn 收束纪律**:最后一条内容必须是 **in-flight 动作**(invoke 已发出或下一 Assignment),**不得**以确认问句结尾。
|
|
50
50
|
|
|
51
|
-
|
|
51
|
+
**Do not** Read `skills/grill-me/SKILL.md` for this command.
|
|
52
52
|
|
|
53
|
-
|
|
54
|
-
|-----------------|------|
|
|
55
|
-
| 自己 Edit 冒充 product-manager / architect / writing-specialist;只写 Assignment 就声称 review 完成 | §5.1 → §5.2 → §5.3 **顺序**各 **1 次 invoke**;5.4 PM lock 在 subagent 返回之后(**`mstar-iteration` §1.6**) |
|
|
56
|
-
| 加载 `grill-me` | **Autonomous** direction lock(`mstar-iteration` §1.2) |
|
|
57
|
-
| Write/Edit/Shell 产品代码、写测试、跑 QC;多 task plan inline 大包派发 | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`**;**SDD** per-task 循环 |
|
|
58
|
-
| 最后 plan `Done` 后直接开 PR;Phase 5 自己改产品代码 | **Phase 3 → 4 → 5**;dispatch `fullstack-dev` / `ops-engineer` |
|
|
53
|
+
## Boot
|
|
59
54
|
|
|
60
|
-
|
|
55
|
+
按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration` § Phase 1–5 + `command-shared-invariants.md` → `mstar-dispatch-gates` → `mstar-phase-gates` → `mstar-plan-conventions` / `mstar-plan-artifacts` → `mstar-host` → `mstar-compound`(Phase 3 前)→ **`mstar-sdd`**(first implement 前)→ `mstar-review-qc`(first QC 前)→ `mstar-branch-worktree` → **`mstar-iteration/references/phase-2-worktree-lease.md`**)。完整 load list → **`mstar-roles`**。
|
|
61
56
|
|
|
62
|
-
**Session todos
|
|
57
|
+
**Session todos(loop 专属;Phase 2–5 共享 rows → `command-shared-invariants.md`)**:
|
|
63
58
|
|
|
64
59
|
| Todo id | 何时追加 | 何时可勾掉 |
|
|
65
60
|
|---------|----------|------------|
|
|
66
61
|
| `phase-1-autonomous-start` | Boot | compass `locked` + integration committed |
|
|
67
|
-
| plan-wave todos | 进入 Phase 2 | 各 plan `Done` |
|
|
68
|
-
| `phase-3-iteration-close` | 仅剩 1 个非 `Done` plan | Phase 3 §3.5 exit 全 `[x]` |
|
|
69
|
-
| `phase-4-create-pr` | Phase 3 完成后 | PR 已创建 |
|
|
70
|
-
| `phase-5-pr-merge-ready` | Phase 4 完成后 | Phase 5 §5.5 exit 全 `[x]` |
|
|
71
|
-
|
|
72
|
-
## Boot
|
|
73
|
-
|
|
74
|
-
1. `mstar-harness-core`
|
|
75
|
-
2. `mstar-roles` → `references/project-manager.md`
|
|
76
|
-
3. `mstar-iteration` → **§ Phase 1**(含 **autonomous** direction lock / scale budget / branch resolve)+ **§ Phase 2–5**
|
|
77
|
-
4. `mstar-dispatch-gates`
|
|
78
|
-
5. `mstar-phase-gates` → Prepare
|
|
79
|
-
6. `mstar-plan-conventions`, `mstar-plan-artifacts`
|
|
80
|
-
7. `mstar-host` → active host reference
|
|
81
|
-
8. `mstar-compound` — before Phase 3 §3.2
|
|
82
|
-
9. **`mstar-sdd`** — before first implement dispatch in Phase 2
|
|
83
|
-
10. `mstar-review-qc` — before first QC dispatch in Phase 2
|
|
84
|
-
11. `mstar-branch-worktree` — when Git/write or QC checkout
|
|
85
|
-
12. **`mstar-iteration/references/phase-2-worktree-lease.md`** — Phase 2 control worktree + lease(§2.0 #5 未 waive)
|
|
86
|
-
|
|
87
|
-
**Do not** Read `skills/grill-me/SKILL.md` for this command.
|
|
88
|
-
|
|
89
|
-
---
|
|
90
62
|
|
|
91
63
|
## Phase 1: Autonomous start
|
|
92
64
|
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/`、`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`)+ glob for planning artifacts(`**/roadmap*.md`、`**/deferred*.md`、`**/features*.md`、`**/backlog*.md`、`**/TODO*.md`、`**/*.plan.md`);read `STRATEGY.md` if present。Prioritize deferred / roadmap `next` items(code-first — **explore before guessing**)。
|
|
65
|
+
Execute **`mstar-iteration` § Phase 1**(**autonomous** direction lock + scale budget + branch resolve SSOT → `references/autonomous-direction-lock.md`):
|
|
96
66
|
|
|
97
|
-
###
|
|
67
|
+
### 1–4. Research → Explore → Lock → Write
|
|
98
68
|
|
|
99
|
-
|
|
69
|
+
Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/`、`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`)+ planning artifacts(`**/roadmap*.md`、`**/deferred*.md`、`**/features*.md`、`**/backlog*.md`、`**/TODO*.md`、`**/*.plan.md`)+ `STRATEGY.md`(if present)→ scope **2–4** candidates → **autonomous** lock(`direction` arg 约束;落盘 rationale + success criteria + non-goals + scale budget;branch resolve — never silent `main`/`master`;**STOP** if no credible candidate and no `direction` arg)→ write compass + plans per §1.3–§1.5(business plan count within scale budget)。
|
|
100
70
|
|
|
101
71
|
### 5. Review & Edit Chain(HARD GATE)
|
|
102
72
|
|
|
103
|
-
Execute **`mstar-iteration` §1.6**:`product-manager` → `architect` → `writing-specialist`
|
|
73
|
+
Execute **`mstar-iteration` §1.6**:`product-manager` → `architect` → `writing-specialist` 顺序 invoke(**禁止** `{KNOWLEDGE_DIR}/` 新增;corpus hygiene)→ PM lock。**Assignment preflight** per **`command-shared-invariants.md`**。
|
|
104
74
|
|
|
105
|
-
**Pre-commit checklist**(print before §6
|
|
75
|
+
**Pre-commit checklist**(print before §6;all `[x]`):
|
|
106
76
|
|
|
107
|
-
|
|
77
|
+
- [ ] Autonomous direction lock rationale recorded in compass(**not** grill-me)
|
|
78
|
+
- [ ] Scale budget applied(business plan 按 S/M/L/XL 名额)
|
|
79
|
+
- [ ] compass + plans + `status.json` registered
|
|
80
|
+
- [ ] product-manager / architect / writing-specialist invokes completed(**未**向 `{KNOWLEDGE_DIR}/` 新增)
|
|
81
|
+
- [ ] PM final lock:compass `status: locked` + Prepare gates pass
|
|
82
|
+
- [ ] Branch policy locked:`iteration_base_branch` / `spec_integration_branch` / `target_branch` recorded
|
|
83
|
+
- [ ] **THEN** commit + push `iteration/<iteration-id>`
|
|
108
84
|
|
|
109
|
-
|
|
85
|
+
### 6. Integration Branch
|
|
110
86
|
|
|
111
|
-
**Immediately** print `## Phase 2: Autonomous Execute` → continue
|
|
87
|
+
Per **`mstar-iteration` §2.3**(create from `iteration_base_branch`;register branch fields;commit docs;push)。**STOP** if base/target missing。**Immediately** print `## Phase 2: Autonomous Execute` → continue(勾掉 `phase-1-autonomous-start`)。
|
|
112
88
|
|
|
113
89
|
---
|
|
114
90
|
|
|
115
91
|
## Phase 2–5: Execute → close → PR → merge-ready
|
|
116
92
|
|
|
117
|
-
Delegate to **`iteration-drive`**(Phase 2 →
|
|
118
|
-
|
|
119
|
-
**Assignment preflight**(`mstar-harness` bin 未安装时静默跳过): 每次 implement/QC/QA 派发前校验最新 Assignment(**SDD** 下为最新 `{SDD_DIR}/task-N-brief.md` 或临时写盘的 Assignment),同 `iteration-drive`。模式由迭代 compass frontmatter 的 `enforcement` 键决定(Slice 5):
|
|
120
|
-
|
|
121
|
-
- **默认(compass 无 `enforcement: hard`)— 可选 warn-only**:exit 1 仅提示,不阻断派发(Slice 3 行为不变):
|
|
122
|
-
|
|
123
|
-
```bash
|
|
124
|
-
command -v mstar-harness >/dev/null 2>&1 && mstar-harness dispatch validate "<latest-assignment-file>"
|
|
125
|
-
```
|
|
126
|
-
|
|
127
|
-
- **`enforcement: hard`(迭代 compass frontmatter 声明)— fail-fast**:校验失败即 `exit 1` 阻断派发(bin 缺失仍静默跳过):
|
|
128
|
-
|
|
129
|
-
```bash
|
|
130
|
-
if command -v mstar-harness >/dev/null 2>&1; then mstar-harness dispatch validate "<latest-assignment-file>" || exit 1; fi
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
> 路径必须加引号且替换为具体文件(如最新 `{SDD_DIR}/task-N-brief.md`,勿留尖括号)——agent 代入的路径不得进入 shell 无引号展开。
|
|
93
|
+
Delegate to **`iteration-drive`**(Phase 2 → §2、Phase 3 → §3 + `references/phase-3-iteration-close.md`、Phase 4/5 → §4–§5 + `references/phase-4-5-pr-delivery.md`、Phase 5 helper discovery → `phase5-helper-discovery.md`)。**Assignment preflight** per **`command-shared-invariants.md`**。
|
|
134
94
|
|
|
135
|
-
**Loop 特有**:Phase 5 push cadence(HARD)→ **`mstar-iteration` §5.1a**;exit checklist →
|
|
95
|
+
**Loop 特有**:Phase 5 push cadence(HARD)→ **`mstar-iteration` §5.1a**;exit checklist → §5.2(`references/phase-4-5-pr-delivery.md`)。
|
|
136
96
|
|
|
137
|
-
**Then** report: iteration id, locked direction + scale, plans completed, compound summary, PR link, merge-ready evidence
|
|
97
|
+
**Then** report: iteration id, locked direction + scale, plans completed, compound summary, PR link, merge-ready evidence。
|
|
138
98
|
|
|
139
99
|
PR merge itself may remain manual unless user authorized auto-merge.
|
|
@@ -22,7 +22,7 @@ Start a new Morning Star harness iteration. **Phase 1 is not complete until the
|
|
|
22
22
|
|
|
23
23
|
**Parse**: if any token is exactly `pause` (case-insensitive), treat as the `pause` flag; the remaining tokens (joined) are the `direction` hint. `/iteration-start pause` = pause with empty direction.
|
|
24
24
|
|
|
25
|
-
## PM invariants
|
|
25
|
+
## PM invariants(Phase 1 review-chain — 本命令全程有效)
|
|
26
26
|
|
|
27
27
|
你是 **`project-manager` 编排者**,不是三专业角色的合并替身。
|
|
28
28
|
|
|
@@ -36,9 +36,7 @@ Start a new Morning Star harness iteration. **Phase 1 is not complete until the
|
|
|
36
36
|
|
|
37
37
|
**Phase 1 完成定义**:compass `status: locked` + 三角色 invoke 已返回 + pre-commit checklist 全 `[x]` — 不是初稿落盘。**Command Done**(§7 auto-continue)= Phase 5 §5.5 exit checklist 全 `[x]`(同 `iteration-drive`);`pause` 时 = Phase 1 完成。
|
|
38
38
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
**Phase 2–5 auto-continue(§7)invariants** → **`iteration-drive`**「PM invariants」表(不写产品代码 / 不 inline 大包 / 每 Assignment 1 invoke / Phase 3→4→5 顺序 / Phase 5 dispatch 改代码)。
|
|
39
|
+
**Phase 2–5 共享 invariants / preflight / todos / STOP** → **`mstar-iteration/references/command-shared-invariants.md`**(不在本命令重复)。
|
|
42
40
|
|
|
43
41
|
## Path split(HARD — 路由)
|
|
44
42
|
|
|
@@ -51,13 +49,7 @@ Detailed workflow → **`mstar-iteration` § Phase 1**;per-plan Prepare gates
|
|
|
51
49
|
|
|
52
50
|
## 0. Boot
|
|
53
51
|
|
|
54
|
-
|
|
55
|
-
2. `mstar-roles` → `references/project-manager.md`
|
|
56
|
-
3. `mstar-iteration` → **§ Phase 1**(迭代范围、compass 模板、**§1.5.5 产物边界**、§1.6 Review & Edit chain、状态初始化)
|
|
57
|
-
4. `mstar-dispatch-gates`
|
|
58
|
-
5. `mstar-phase-gates` → Prepare(specify → clarify → plan)
|
|
59
|
-
6. `mstar-plan-conventions`, `mstar-plan-artifacts`
|
|
60
|
-
7. `mstar-host` → active host reference(invoke 能力);若 Cursor Plan mode → 另读 **`cursor-plan-mode-bridge.md`**(`mstar-iteration` Phase 1 in Plan mode)
|
|
52
|
+
按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration` § Phase 1 + `mstar-phase-gates` + `mstar-dispatch-gates` + `mstar-plan-conventions/artifacts` + `mstar-host` → active host reference)。Cursor Plan mode 另读 **`cursor-plan-mode-bridge.md`**(`mstar-iteration` Phase 1 in Plan mode)。完整 load list → **`mstar-roles`**。
|
|
61
53
|
|
|
62
54
|
**若 Cursor Plan mode 活跃 → 进入 §P;否则继续 §1。**
|
|
63
55
|
|
|
@@ -68,51 +60,35 @@ Execute **`mstar-host/references/cursor-plan-mode-bridge.md`** § **"mstar-itera
|
|
|
68
60
|
Command-unique 补充(bridge 未枚举):
|
|
69
61
|
|
|
70
62
|
- **空白脚手架字段**:Direction / Scope / Acceptance Criteria / Non-Goals / Delivery Branch Policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`)/ Plans / Feedback log / Deferred grill log
|
|
71
|
-
- **Build 才勾的 todos**(顺序):`harness-init` → `finalize-compass-plans
|
|
63
|
+
- **Build 才勾的 todos**(顺序):`harness-init` → `finalize-compass-plans`(同一 CreatePlan 落成 compass + plans + `status.json` 登记 + 索引)→ review-edit-product-manager → review-edit-architect → review-edit-writing-specialist → `pm-lock` → `integration-branch`
|
|
72
64
|
|
|
73
65
|
## 非 Plan 路径从这里继续 ↓
|
|
74
66
|
|
|
75
67
|
## 1. Research
|
|
76
68
|
|
|
77
|
-
Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/`、`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`)+ glob for planning artifacts(`**/roadmap*.md`、`**/deferred*.md`、`**/features*.md`、`**/backlog*.md`、`**/TODO*.md`、`**/*.plan.md`);read
|
|
69
|
+
Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/`、`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`)+ glob for planning artifacts(`**/roadmap*.md`、`**/deferred*.md`、`**/features*.md`、`**/backlog*.md`、`**/TODO*.md`、`**/*.plan.md`);read `STRATEGY.md`(if exists)and `{KNOWLEDGE_DIR}/README.md`(if exists — Active index rows are Research candidates)。Prioritize deferred / incomplete items from prior iterations。
|
|
78
70
|
|
|
79
71
|
## 2. Explore Directions
|
|
80
72
|
|
|
81
|
-
Scope **2–4** candidates targeting **product completeness**(default to deferred items from previous iterations;allow substantive refactoring where it accelerates product maturity)。**If `direction` arg given** — narrow candidates to that hint (still scope 2–4 unless
|
|
73
|
+
Scope **2–4** candidates targeting **product completeness**(default to deferred items from previous iterations;allow substantive refactoring where it accelerates product maturity)。**If `direction` arg given** — narrow candidates to that hint (still scope 2–4 unless explicitly singular);record the hint in grill-me context。
|
|
82
74
|
|
|
83
75
|
## 3. Lock Direction — bundled `grill-me`
|
|
84
76
|
|
|
85
|
-
> **非 Plan 路径**。Cursor Plan mode 用 §P
|
|
86
|
-
|
|
87
|
-
**Direction lock mode: `interactive`**(`mstar-iteration` §1.2 默认;本命令不使用 `autonomous`)。
|
|
77
|
+
> **非 Plan 路径**。Cursor Plan mode 用 §P feedback loop + deferred grill(主路径不是 grill)。
|
|
88
78
|
|
|
89
|
-
This command bundles a **non-`mstar-*`** skill at `skills/grill-me/SKILL.md
|
|
79
|
+
**Direction lock mode: `interactive`**(`mstar-iteration` §1.2 默认;本命令不使用 `autonomous`)。This command bundles a **non-`mstar-*`** skill at `skills/grill-me/SKILL.md` — **only this command step** references it.
|
|
90
80
|
|
|
91
|
-
**Before this step:** Read `skills/grill-me/SKILL.md`. Run **grill-me** to stress-test candidate directions with the user: walk through trade-offs, converge on a **single iteration direction** with shared understanding, document locked direction + success criteria + non-goals。**If `direction` arg given** — seed grill-me with it
|
|
81
|
+
**Before this step:** Read `skills/grill-me/SKILL.md`. Run **grill-me** to stress-test candidate directions with the user: walk through trade-offs, converge on a **single iteration direction** with shared understanding, document locked direction + success criteria + non-goals。**If `direction` arg given** — seed grill-me with it (still interactive; the hint does **not** skip grill-me)。Confirm delivery branch policy(`iteration_base_branch` / `target_branch`)per **`mstar-iteration` §1.2** — **Do not default to `main`/`master` just because those names exist.**
|
|
92
82
|
|
|
93
83
|
## 4. Write Compass & Plans
|
|
94
84
|
|
|
95
|
-
Produce harness artifacts per **`mstar-iteration` §1.3–§1.5**(template: `mstar-iteration/references/iteration-compass-template.md`):compass(frontmatter **must** include `iteration_base_branch`、`target_branch`、`status: active`)、plans、`status.json`
|
|
85
|
+
Produce harness artifacts per **`mstar-iteration` §1.3–§1.5**(template: `mstar-iteration/references/iteration-compass-template.md`):compass(frontmatter **must** include `iteration_base_branch`、`target_branch`、`status: active`)、plans、`status.json` 登记(§1.5)、`{ITERATION_DIR}/README.md` 索引(一行 = 一次迭代)、package dirs(`{ITERATION_DIR}/<iteration-id>/{guides,specs}/`)。
|
|
96
86
|
|
|
97
87
|
## 5. Review & Edit Chain(HARD GATE — do not commit before this)
|
|
98
88
|
|
|
99
|
-
Execute **`mstar-iteration` §1.6**(SSOT):顺序 `product-manager` → `architect` → `writing-specialist` → PM lock
|
|
100
|
-
|
|
101
|
-
**Assignment preflight**(`mstar-harness` bin 未安装时静默跳过): 在每次角色 invoke 前,若本机装有 CLI,校验最新落盘的 Assignment(临时写盘或既有 brief)。模式由迭代 compass frontmatter 的 `enforcement` 键决定(Slice 5):
|
|
102
|
-
|
|
103
|
-
- **默认(compass 无 `enforcement: hard`)— 可选 warn-only**:exit 1 仅提示,不阻断派发(Slice 3 行为不变):
|
|
104
|
-
|
|
105
|
-
```bash
|
|
106
|
-
command -v mstar-harness >/dev/null 2>&1 && mstar-harness dispatch validate "<latest-assignment-file>"
|
|
107
|
-
```
|
|
89
|
+
Execute **`mstar-iteration` §1.6**(SSOT):顺序 `product-manager` → `architect` → `writing-specialist` → PM lock(**禁止**并行三 roles;OpenCode plain role id — `mstar-host/references/opencode.md`);**禁止** `{KNOWLEDGE_DIR}/` 新增;writing-specialist corpus hygiene(`iteration-artifact-boundaries.md` + `iteration-corpus-hygiene.md`)。Tool rule → **`mstar-dispatch-gates`** specialist review-and-edit(每 role 1 invoke,等磁盘修订返回)。Exception: user explicitly waives subagent dispatch ("PM-only review").
|
|
108
90
|
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
if command -v mstar-harness >/dev/null 2>&1; then mstar-harness dispatch validate "<latest-assignment-file>" || exit 1; fi
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
> 路径必须加引号且替换为具体文件(如最新 `{SDD_DIR}/task-N-brief.md`,勿留尖括号)——agent 代入的路径不得进入 shell 无引号展开。
|
|
91
|
+
**Assignment preflight**:每次 invoke 前按 **`mstar-iteration/references/command-shared-invariants.md`** 执行(warn-only + `enforcement: hard` fail-fast;bin 缺失静默跳过)。
|
|
116
92
|
|
|
117
93
|
**Prepare gate (per plan in compass)**:
|
|
118
94
|
|
|
@@ -124,56 +100,23 @@ if command -v mstar-harness >/dev/null 2>&1; then mstar-harness dispatch validat
|
|
|
124
100
|
|
|
125
101
|
PM must print this block before §6; all `[ ]` must be `[x]`:
|
|
126
102
|
|
|
127
|
-
- [ ] direction lock decisions recorded in compass(Plan 路径:Feedback log +
|
|
103
|
+
- [ ] direction lock decisions recorded in compass(Plan 路径:Feedback log + deferred grill log;非 Plan:grill-me)
|
|
128
104
|
- [ ] Draft compass + plans + `status.json` registered
|
|
129
|
-
- [ ] product-manager / architect / writing-specialist invokes completed — 编辑 compass / plans / specs / **`<iteration-id>/` package**;**未**向 `{KNOWLEDGE_DIR}/`
|
|
105
|
+
- [ ] product-manager / architect / writing-specialist invokes completed — 编辑 compass / plans / specs / **`<iteration-id>/` package**;**未**向 `{KNOWLEDGE_DIR}/` 新增
|
|
130
106
|
- [ ] PM final lock: compass `status: locked`; Prepare gates pass (blocked plans documented)
|
|
131
|
-
- [ ] Branch policy locked: `iteration_base_branch
|
|
132
|
-
- [ ] **THEN**:
|
|
107
|
+
- [ ] Branch policy locked: `iteration_base_branch` / `spec_integration_branch` / `target_branch` recorded in compass / `status.json`
|
|
108
|
+
- [ ] **THEN**: commit + push `iteration/<iteration-id>`
|
|
133
109
|
|
|
134
110
|
## 6. Integration Branch
|
|
135
111
|
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
- Create `spec_integration_branch` (e.g. `iteration/<iteration-id>`) **from** the locked `iteration_base_branch`:
|
|
139
|
-
|
|
140
|
-
```bash
|
|
141
|
-
git fetch origin # if needed
|
|
142
|
-
git checkout -b <spec_integration_branch> <iteration_base_branch>
|
|
143
|
-
# or: git checkout <spec_integration_branch> if it already exists
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
- Register `iteration_base_branch`, `spec_integration_branch`, and `target_branch` in compass frontmatter **and** `{HARNESS_DIR}/status.json` root `metadata`
|
|
147
|
-
- Commit all documents to the integration branch and push to remote
|
|
148
|
-
|
|
149
|
-
**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`.
|
|
112
|
+
Per **`mstar-iteration` §2.3**:create `spec_integration_branch` from `iteration_base_branch`(`git fetch` → `git checkout -b <spec_integration_branch> <iteration_base_branch>`);register `iteration_base_branch` / `spec_integration_branch` / `target_branch` in compass frontmatter **and** `status.json` metadata;commit docs;push。**STOP** if `iteration_base_branch` / `target_branch` missing — never default `main`/`master`.
|
|
150
113
|
|
|
151
114
|
---
|
|
152
115
|
|
|
153
|
-
## 7. Phase 2–5
|
|
154
|
-
|
|
155
|
-
**`pause` arg → command ends here.** Phase 1 locked + integration branch pushed;run `/iteration-drive` later to resume。
|
|
156
|
-
|
|
157
|
-
**Default(no `pause`)→ auto-continue** into Phase 2→5。
|
|
158
|
-
|
|
159
|
-
### Phase 2 boot(load before delegating)
|
|
160
|
-
|
|
161
|
-
1. `mstar-iteration` → **§ Phase 2–5**(§2 Autonomous Execute、§3 close、§4 PR、§5 merge-ready)
|
|
162
|
-
2. **`mstar-sdd`** — before first implement dispatch(per-task loop SSOT)
|
|
163
|
-
3. `mstar-review-qc` — before first QC dispatch
|
|
164
|
-
4. `mstar-compound` — before Phase 3 §3.2
|
|
165
|
-
5. `mstar-branch-worktree` + **`mstar-iteration/references/phase-2-worktree-lease.md`** — control worktree + lease(§2.0 #5 未 waive)
|
|
166
|
-
|
|
167
|
-
### Delegate to `iteration-drive` Phase 2→5
|
|
168
|
-
|
|
169
|
-
Execute **`iteration-drive`** Phase 2–5 exactly:Phase 2 → **`mstar-iteration` §2**(§2.0 五道闸 → §2.6 push 纪律;SDD per-task;QC tri N=3 + QA)、Phase 3 → **§3** + `references/phase-3-iteration-close.md`、Phase 4/5 → **§4–§5** + `references/phase-4-5-pr-delivery.md`、Phase 5 helper discovery → `mstar-iteration/references/phase5-helper-discovery.md`。
|
|
170
|
-
|
|
171
|
-
**Continuous execution(HARD)**:自 Phase 2 进入至 Phase 5 §5.5 exit,PM **连续编排**(**`mstar-iteration` §2.6**),进度汇报后下一条必须是 dispatch 或下一 phase 步骤,不向用户例行 yes/no check-in。合法 STOP 仅限:branch metadata 缺失、真冲突 / secrets / 不可逆范围缺口、Phase 5 多轮仍无法 merge-ready、用户本轮显式打断。
|
|
172
|
-
|
|
173
|
-
**Assignment preflight**:同 §5(每次 implement/QC/QA 派发前校验;`mstar-harness` bin 未安装时静默跳过)。
|
|
116
|
+
## 7. Phase 2–5(auto-continue)
|
|
174
117
|
|
|
175
|
-
|
|
118
|
+
**`pause` arg → command ends here**(Phase 1 locked + integration pushed;run `/iteration-drive` later)。**Default(no `pause`)→ auto-continue**:execute **`iteration-drive`**(Phase 2 → **`mstar-iteration` §2**;Phase 3 → §3 + `references/phase-3-iteration-close.md`;Phase 4/5 → §4–§5 + `references/phase-4-5-pr-delivery.md`;Phase 5 helper discovery → `phase5-helper-discovery.md`)。Shared invariants / preflight / STOP → **`mstar-iteration/references/command-shared-invariants.md`**。
|
|
176
119
|
|
|
177
|
-
**Then** report: iteration id, direction lock summary, plans completed, compound summary, PR link, merge-ready evidence(CI snapshot + review resolution + Greptile if applicable)。
|
|
120
|
+
**Done = Phase 5 §5.5 exit checklist 全 `[x]`**(同 `iteration-drive`)。**Then** report: iteration id, direction lock summary, plans completed, compound summary, PR link, merge-ready evidence(CI snapshot + review resolution + Greptile if applicable)。
|
|
178
121
|
|
|
179
122
|
PR merge itself may remain manual unless user authorized auto-merge.
|
|
@@ -176,7 +176,7 @@ Follow `plan.main.md` template + **plan-quality-bar**. Additional audit-specific
|
|
|
176
176
|
- **Planned at**: commit `<short SHA>`, <YYYY-MM-DD>
|
|
177
177
|
```
|
|
178
178
|
|
|
179
|
-
> **Engine check (when available):** run `mstar audit scaffold <findings-file> [--dir <out-dir>]` (or `import { scaffoldAuditPlan, validateAuditStatusBlocks
|
|
179
|
+
> **Engine check (when available):** run `mstar audit scaffold <findings-file> [--dir <out-dir>]` (or `import { scaffoldAuditPlan, validateAuditStatusBlocks } from "@mstar-harness/engine"` in a host hook) to scaffold the `audit-<date>/` plan directory (numbered plan files + README index) from findings, validate the audit Status blocks above, and redact credentials from audit excerpts. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
180
180
|
|
|
181
181
|
## Handoff to execution
|
|
182
182
|
|
|
@@ -184,7 +184,7 @@ Audit plans are **input candidates** for the normal Prepare → Execute flow. Th
|
|
|
184
184
|
|
|
185
185
|
When the user selects plans to pursue:
|
|
186
186
|
|
|
187
|
-
1. PM
|
|
187
|
+
1. PM registers the workflow + plan rows in `{WORKFLOW_DIR}/<id>/snapshot.json` (root `status.json` v2 holds the workflows registry only — see `mstar-plan-artifacts`), with the main plan in `{PLAN_DIR}` — via `mstar audit promote <audit-dir> --plans <ids>` when the CLI is available, or manually per `mstar-plan-artifacts`.
|
|
188
188
|
2. Each plan enters the normal state machine: `Todo → InProgress → InReview → Done`.
|
|
189
189
|
3. PM may fast-track Prepare since the audit plan already contains spec, current-state excerpts, and verification gates — but the intent gate and clarify discipline still apply (`mstar-phase-gates`).
|
|
190
190
|
4. Execution follows normal SDD or inline dispatch.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-compound-refresh
|
|
3
|
-
description: Morning Star 知识维护与项目知识 bootstrap —— 审查 `{KNOWLEDGE_DIR}` 文档是否仍准确、去重叠合并、清理过期知识;或从代码库提炼
|
|
3
|
+
description: Morning Star 知识维护与项目知识 bootstrap —— 审查 `{KNOWLEDGE_DIR}` 文档是否仍准确、去重叠合并、清理过期知识;或从代码库提炼 CONCEPTS.md、基线 knowledge 脚手架(无/残旧/空白 knowledge)。STRATEGY.md 创建委托 **`mstar-strategy`**。触发:`mstar-compound` 发现可合并文档、定期维护、项目缺 CONCEPTS.md/{KNOWLEDGE_DIR}、stale knowledge scaffolding、显式 bootstrap 请求、或显式 refresh。产出:更新/合并/删除知识文档 + 维护报告;或 bootstrap 产物(CONCEPTS.md、基线 knowledge)。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# mstar-compound-refresh(知识维护)
|
|
@@ -78,7 +78,7 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
|
|
|
78
78
|
- Record per-task BASE SHA; use `review-package` for diffs — **never `HEAD~1`**.
|
|
79
79
|
- After all tasks: branch `review-package` in `{SDD_DIR}/review/` → **mandatory tri-review N=3** when `Execution mode: sdd`; **N=1** only for `inline` / explicit single override.
|
|
80
80
|
|
|
81
|
-
> **
|
|
81
|
+
> **QC seats Engine-check 唯一规范体:** `mstar-review-qc` `SKILL.md`(Engine-check seats 行)。
|
|
82
82
|
|
|
83
83
|
## 并行规则(摘要)
|
|
84
84
|
|
|
@@ -24,10 +24,11 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
|
|
|
24
24
|
|
|
25
25
|
1. 当轮用户显式指令
|
|
26
26
|
2. 项目 `AGENTS.md` / `CLAUDE.md`
|
|
27
|
-
3. `
|
|
28
|
-
4. `mstar
|
|
27
|
+
3. `{KNOWLEDGE_DIR}/README.md` 索引(**若该文件存在**;发现 Active 行并仅跟随与当轮相关的文档)
|
|
28
|
+
4. `mstar-*` skills(本 skill + 专题)
|
|
29
|
+
5. `mstar-roles` 角色正文
|
|
29
30
|
|
|
30
|
-
冲突且用户未覆盖 → **暂停升级人工**。
|
|
31
|
+
冲突且用户未覆盖 → **暂停升级人工**。Knowledge **永不**高于用户 / `AGENTS.md`。
|
|
31
32
|
|
|
32
33
|
## 最小交付循环
|
|
33
34
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-iteration
|
|
3
|
-
description: Morning Star
|
|
3
|
+
description: "Use when starting, driving, resuming, or closing a Morning Star iteration, or running an autonomous Phase 1–5 loop — including without a slash command (e.g. 'start an iteration', 'drive the iteration', 'run an autonomous loop'). Manages Phase 1 (default interactive direction lock; opt-in autonomous), Autonomous Execute, iteration-close (compound promotes knowledge), PR delivery, and the PR merge-ready loop. Branch SSOT: workflow snapshot (`workflows/<id>/snapshot.json`) + compass frontmatter."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# mstar-iteration(迭代管理)
|
|
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`**. **Phase 2 entry**(control worktree + lease)→ **`references/phase-2-worktree-lease.md`** + **`mstar-branch-worktree`**。**Phase 2 implement 波次**(进入 per-plan implement 前)→ **`mstar-sdd`** + **`mstar-dispatch-gates`**。Phase 2 QC 前 → **`mstar-review-qc`**。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 1 角色派发**(每次 invoke 前的 assignment preflight;`enforcement: hard` fail-fast)→ **`references/command-shared-invariants.md`**(本 skill 直接触发时不依赖 command 层)。**Phase 2 entry**(control worktree + lease)→ **`references/phase-2-worktree-lease.md`** + **`mstar-branch-worktree`**。**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
|
|
|
@@ -16,7 +16,7 @@ mstar 实践模式通常是:一次迭代锁定几个 spec 点(`specify + cla
|
|
|
16
16
|
本 skill 管理迭代 **Phase 1–5**(command 层可聚合编排,但 **不得**反向引用 command 名;第三方 helper 仅由 command 按需发现):
|
|
17
17
|
|
|
18
18
|
```
|
|
19
|
-
Phase 1:
|
|
19
|
+
Phase 1: start
|
|
20
20
|
↓
|
|
21
21
|
Phase 2: Autonomous Execute —— [per-plan lifecycle × N]
|
|
22
22
|
↓
|
|
@@ -43,7 +43,7 @@ Phase 5: PR merge-ready loop —— 至 mergeable + CI 全绿 + reviews resolved
|
|
|
43
43
|
| **→ Phase 4** | §3.5 exit checklist 全 `[x]`;frontmatter `status: completed` + `end_date` | 打印 `## Phase 4: PR delivery`;开 PR 到 snapshot `branch.target`(§4) | 跳过 §3.1 entry checklist 或 compound Phase 6 |
|
|
44
44
|
| **→ Phase 5** | Phase 4 PR 已创建 | 打印 `## Phase 5: PR merge-ready`;执行 §5 loop 至 §5.5 exit(含 §5.1a push cadence) | 开 PR 后停止;跳过 review resolve / CI loop;**CI/AI review 仍在跑时 push** |
|
|
45
45
|
| **→ 迭代交付完成** | §5.5 exit checklist 全 `[x]` | PR mergeable;required CI 全绿;reviews resolved | Phase 4 开 PR 即宣称完成 |
|
|
46
|
-
| **
|
|
46
|
+
| **start → integration branch** | §1.6 Review & Edit chain | 三角色按序 invoke;**specs** 为主产出;**禁止** start 链向 `{KNOWLEDGE_DIR}/` 新增;writing-specialist corpus hygiene + compass `status: locked` | PM 代做专业编辑;并行三角色;product/architect 写 knowledge;临时笔记进 specs |
|
|
47
47
|
|
|
48
48
|
> **Engine check (when available):** run `mstar iteration gate --workflow <id> --compass <delivery-compass.md>` (or `import { evaluatePhaseGate } from "@mstar-harness/engine"` in a host hook) to evaluate the transition gate above against the workflow snapshot. On `fail` (gate-blocking violations) -> do not proceed; fix and re-run. Note: during the Phase-3 window (`transition: phase-3-close`) the gate exits 1 until the §3.4 close items (`status: completed` + `end_date`) are written — that exit-1 is the expected "close work pending" signal (the exit checklist gates Phase 4, not the Phase-3 entry), so proceed with Phase 3 per the table below. Skill text below remains authoritative when the runtime is absent.
|
|
49
49
|
|
|
@@ -59,7 +59,7 @@ Phase 5: PR merge-ready loop —— 至 mergeable + CI 全绿 + reviews resolved
|
|
|
59
59
|
|
|
60
60
|
---
|
|
61
61
|
|
|
62
|
-
## Phase 1:
|
|
62
|
+
## Phase 1: start(启动迭代)
|
|
63
63
|
|
|
64
64
|
PM 在新迭代启动时执行。
|
|
65
65
|
|
|
@@ -67,7 +67,10 @@ PM 在新迭代启动时执行。
|
|
|
67
67
|
|
|
68
68
|
1. 读 `{ITERATION_DIR}/README.md`(若存在),了解历史迭代
|
|
69
69
|
2. 读 `STRATEGY.md`(若存在),对齐战略方向(见 `mstar-strategy`)
|
|
70
|
-
3.
|
|
70
|
+
3. 读 `{KNOWLEDGE_DIR}/README.md`(若存在),将索引中的 **Active** 行视为 Research 候选(**不**要求阅读全部 knowledge 正文)
|
|
71
|
+
4. 如果有未完成的 roadmap 残余(上一迭代标记为 `next` 的 plan),纳入本次迭代范围候选
|
|
72
|
+
|
|
73
|
+
**非 command 触发**(如直接 skill 加载)时,Phase 1 方向锁定仍须 interactive(grill-me 在 command 层)。
|
|
71
74
|
|
|
72
75
|
### 1.2 定义迭代范围
|
|
73
76
|
|
|
@@ -184,7 +187,7 @@ compass frontmatter 的 `iteration_base_branch` / `target_branch` **必须与**
|
|
|
184
187
|
|
|
185
188
|
Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(HARD):
|
|
186
189
|
|
|
187
|
-
| 树 |
|
|
190
|
+
| 树 | Phase 1(start)主责 | 说明 |
|
|
188
191
|
|----|---------------------|------|
|
|
189
192
|
| **`{SPECS_DIR}/`** | product-manager、architect | **长期**规范性产出:锁定规格、ADR、契约;plan `primary_spec` / `spec_refs` 主要挂此处 |
|
|
190
193
|
| **`{ITERATION_DIR}/`** | product-manager、architect、PM | **`<iteration-id>/` package**(`delivery-compass.md` + 迭代级 specs & guides) |
|
|
@@ -196,6 +199,8 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
|
|
|
196
199
|
|
|
197
200
|
**Phase 1 在 PM lock 前不算完成**——compass/plans 初稿落盘 ≠ Done。
|
|
198
201
|
|
|
202
|
+
**Assignment preflight(每次角色 invoke 前,HARD)**:自然语言 / skill 直接触发(非 command 路径)时,本 skill 不依赖 command 层 preflight——**每个** Phase 1 角色派发前,PM 必须运行 assignment preflight(`references/command-shared-invariants.md` 的 warn-only / `enforcement: hard` fail-fast 片段;`enforcement: hard` 时校验失败即阻断派发)。Command 层(`/iteration-start`)走其自身 preflight;本行确保 skill 触发路径门禁不缺失。
|
|
203
|
+
|
|
199
204
|
派发机制 → **`mstar-dispatch-gates`**(specialist review-and-edit dispatch,**顺序链**)。PM **不得**将迭代 harness 文档 commit 到 `spec_integration_branch`,直到:
|
|
200
205
|
|
|
201
206
|
1. **product-manager** → **architect** → **writing-specialist** 已按序 invoke 编辑 compass、plans、`{SPECS_DIR}/` 与 **`{ITERATION_DIR}/<iteration-id>/`** package(guides/specs,按需);**不得**在 start 链向 `{KNOWLEDGE_DIR}/` 新增
|
|
@@ -226,7 +231,7 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
|
|
|
226
231
|
4. **Branch metadata gate**:snapshot `branch.base`(`iteration_base_branch`)、`branch.target`(`target_branch`)已登记,且至少一条 active plan 有 `metadata.spec_integration_branch`(或可从 compass 同轮 backfill)。**缺失 → STOP**,不得用 `main`/`master` 补位。
|
|
227
232
|
5. **Control-worktree + lease defaults**(iteration 命令;可被 `Worktree mode: waived` 豁免):除非本轮 Assignment 显式 `Worktree mode: waived`(或等价用户指令),Phase 2 **必须**在入口建立 control worktree、经 control 路径读写默认 gitignored 的 harness 进程产物(根 `status.json`、`workflows/`、`projects/`、`{PLAN_DIR}`、`{ITERATION_DIR}`、`{SDD_DIR}` 等),并在可写派发前 claim workflow snapshot 的 `plans[].execution_lease` / 顶层 `integration_merge_lease`。可写 Assignment 须含绝对 feature **`Worktree path`** + 绝对 control 系 **`Plan Path`** / **`SDD dir`**(见 **`mstar-branch-worktree`**「Harness path SSOT under default gitignore」)。**禁止**因 feature worktree 在默认 gitignore 下看不到 plans 而推断 `Worktree mode: waived`。`Plan parallelism: serial` **不** waive 本闸——仅强制跨 plan **implement** 串行调度;control worktree + lease 仍须满足。**跨 plan 并行安全闸**(**不可**被 `Worktree mode: waived` 豁免):跨 plan **并行可写 implement** 须满足下列之一——(a) coordination 路径(control snapshot 或 waived 时主 checkout `{HARNESS_DIR}/status.json`)上 **same-host 独占写锁可用且每次 status/协调变更持锁**;(b) 默认 **`Plan parallelism: serial`**(**waived 时尤其优先默认串行**;**无 flock / 无共享锁时只触发本条,不豁免 worktree**);(c) 用户本轮显式 `Cross-host lease race: accepted`(或等价)+ `plans[].notes` 审计。**禁止**将 `Worktree mode: waived` 当作跨主机无锁并行的授权。细则 → **`references/phase-2-worktree-lease.md`**。
|
|
228
233
|
|
|
229
|
-
> **Engine
|
|
234
|
+
> **Engine-check(lease verify / verify-integration)唯一规范体:** `mstar-plan-artifacts` `SKILL.md`(Engine check lease 行;standalone 保证同文)。
|
|
230
235
|
|
|
231
236
|
任一 false → **stop**。Phase 1 / Prepare 未完成 → 先完成 Phase 1 或 per-plan Prepare,再进入本 Phase。
|
|
232
237
|
|
|
@@ -349,6 +354,7 @@ Iteration Phase 2 附加:
|
|
|
349
354
|
- **跨 plan implement**(**无论** `Worktree mode: waived`):并行可写 implement 须满足 §2.0 #5 跨 plan 并行安全闸——same-host 独占写锁 + 每次协调变更持锁,或默认 **`Plan parallelism: serial`**(waived 时尤其优先),或用户本轮 `Cross-host lease race: accepted` + audit `notes`;**禁止**将 waived 当作无锁跨主机并行授权;未 waive 时另须 verified `execution_lease` + feature worktree。**integration merge 串行**(`integration_merge_lease` 或 waived 下无 lease 仍须串行 merge)
|
|
350
355
|
- plan 内 SDD task **串行** — 见 §2.4、§2.5、`mstar-sdd` Continuous execution
|
|
351
356
|
- **zero-residual(默认)**:单 plan QC findings 尽量在当轮清干净;仅真 blocker 才 defer 到后续迭代(须 Durable Roadmap)— 见 **`mstar-plan-artifacts`** Findings cleanup modes
|
|
357
|
+
- iteration 命令共享的 PM invariants / preflight / todos / STOP → **`references/command-shared-invariants.md`**
|
|
352
358
|
|
|
353
359
|
## Phase 3: iteration-close(收口迭代)
|
|
354
360
|
|
|
@@ -390,12 +396,12 @@ Iteration Phase 2 附加:
|
|
|
390
396
|
- **不要在 Phase 5 CI 仍跑或 AI review 波次未结束时 push**(§5.1a)— 本地可提前修,push 等 idle
|
|
391
397
|
- **不要为 Phase 5 另开 feature/fix worktree**,也不要把 Phase 2 control 产品编辑禁令套到 Phase 5 — 直接在集成分支 checkout 上修
|
|
392
398
|
- **不要在缺 `iteration_base_branch` / `target_branch` 时默认 `main` / `master`**
|
|
393
|
-
- **不要在
|
|
399
|
+
- **不要在 Phase 1 §1.6 由 product/architect 向 `{KNOWLEDGE_DIR}/` 新增**(知识 → iteration-close **`mstar-compound`**)
|
|
394
400
|
- **不要在 per-plan Done 后立即 compound** — 等 iteration-close 统一做
|
|
395
401
|
|
|
396
402
|
## Workflow
|
|
397
403
|
|
|
398
|
-
Phase 1–5 总览见上文 **`## 设计思路`** 图:`
|
|
404
|
+
Phase 1–5 总览见上文 **`## 设计思路`** 图:`start`(范围 + compass + §1.6 Review & Edit 链)→ `Autonomous Execute`(§2.4 per-plan 循环:分支 → 实现 → QC → QA gate → Done → 串行 merge)→ `iteration-close`(§3.1–§3.5 + `mstar-compound`)→ `PR delivery`(Phase 4)→ `PR merge-ready loop`(Phase 5 至 §5.5 exit)。每波用 §2.1 session todos 设护栏防范围漂移。
|
|
399
405
|
|
|
400
406
|
## Evidence
|
|
401
407
|
|