@mstar-harness/opencode 3.5.1 → 3.6.0-alpha.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,22 @@ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface re
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [3.6.0-alpha.2] - 2026-08-31
10
+
11
+ ### Bundled harness skills (`harness-skills/` at publish)
12
+
13
+ - Version alignment with harness **3.6.0-alpha.2** (no OpenCode package API change).
14
+
15
+ See root [CHANGELOG.md](../../CHANGELOG.md) **3.6.0-alpha.2**.
16
+
17
+ ## [3.6.0-alpha.1] - 2026-08-31
18
+
19
+ ### Bundled harness skills (`harness-skills/` at publish)
20
+
21
+ - Version alignment with harness **3.6.0-alpha.1** (no OpenCode package API change).
22
+
23
+ See root [CHANGELOG.md](../../CHANGELOG.md) **3.6.0-alpha.1**.
24
+
9
25
  ## [3.5.1] - 2026-08-28
10
26
 
11
27
  ### Bundled harness skills (`harness-skills/` at publish)
@@ -43,29 +43,33 @@ Canonical vs legacy residual definitions → **`mstar-artifacts` SKILL.md**("`
43
43
  ```json
44
44
  {
45
45
  "schema_version": 1,
46
- "id": "<plan-id-or-iteration-id>",
47
- "type": "plan | iteration",
48
- "status": "running | paused | completed | failed | stopped",
49
- "started_at": "YYYY-MM-DD",
50
- "ended_at": null,
51
- "updated_at": "YYYY-MM-DD",
46
+ "id": "iter-demo",
47
+ "type": "iteration",
48
+ "status": "running",
49
+ "started_at": "2026-08-30",
50
+ "updated_at": "2026-08-30",
52
51
  "phase": "phase-2-execute",
53
52
  "plans": [
54
53
  {
55
54
  "id": "plan-id",
56
55
  "title": "Plan title",
57
56
  "file": "{PLAN_DIR}/plan-id-feature-name.md",
58
- "status": "Todo | InProgress | InReview | Blocked | Done",
57
+ "status": "InProgress",
59
58
  "owner": "@project-manager",
60
59
  "agents": ["@fullstack-dev"],
61
60
  "progress": 0,
62
61
  "tags": [],
63
- "created_at": "YYYY-MM-DD",
64
- "updated_at": "YYYY-MM-DD",
62
+ "created_at": "2026-08-29",
63
+ "updated_at": "2026-08-30",
65
64
  "done_at": null,
66
65
  "notes": [],
67
66
  "metadata": {},
68
- "execution_lease": {}
67
+ "execution_lease": {
68
+ "holder": "omp:demo-session",
69
+ "claimed_at": "2026-08-30T02:30:00Z",
70
+ "worktree_path": "/tmp/worktrees/demo-plan",
71
+ "working_branch": "feature/demo-plan"
72
+ }
69
73
  }
70
74
  ],
71
75
  "execution_policy": {
@@ -73,14 +77,22 @@ Canonical vs legacy residual definitions → **`mstar-artifacts` SKILL.md**("`
73
77
  "worktree_mode": "",
74
78
  "push_policy": ""
75
79
  },
76
- "integration_merge_lease": {},
77
- "branch": { "base": "", "integration": "", "target": "" },
80
+ "integration_merge_lease": {
81
+ "holder": "omp:demo-session",
82
+ "claimed_at": "2026-08-30T03:00:00Z",
83
+ "plan_id": "plan-id",
84
+ "source_branch": "feature/demo-plan",
85
+ "target_branch": "iteration/iter-demo"
86
+ },
87
+ "branch": { "base": "main", "integration": "iteration/iter-demo", "target": "main" },
78
88
  "control_worktree_path": "/abs/repo/root",
79
89
  "legacy_metadata": {},
80
- "compass_ref": "iterations/<iteration-id>/delivery-compass.md"
90
+ "compass_ref": "iterations/iter-demo/delivery-compass.md"
81
91
  }
82
92
  ```
83
93
 
94
+ - The example above depicts the **held** state (both leases populated, illustrative placeholder values) and passes `validateWorkflowSnapshot`; the released state is **key absence** (delete-key-on-release below), never `null` or `{}`, and enum scalars (`type` / `status` / plan-row `status`) are always single values — the full enum sets are `type`: `plan | iteration`, snapshot `status`: `running | paused | completed | failed | stopped`, plan-row `status`: `Todo | InProgress | InReview | Blocked | Done`.
95
+
84
96
  - `plans[]` rows are the **legacy PlanRow shape verbatim** (unknown row fields preserved, never re-bucketed). Per-row `execution_lease` stays on the row; `integration_merge_lease` is **top-level** (the v1 root-`metadata` home is gone).
85
97
  - Terminal statuses (`completed` / `failed` / `stopped`) require `ended_at` and no dangling leases.
86
98
  - `execution_policy` keys are copied from v1 root `metadata` at migrate; values are accepted-but-opaque this iteration (no semantic gate).
@@ -31,6 +31,8 @@ The failure mode: "correct" code that is alien to the codebase — works but loo
31
31
 
32
32
  ## 2) Simplicity First
33
33
 
34
+ **Upstream invariants**: the global engineering rules live in `mstar-harness-core`(核心研发守则)——no backward-compat layers, simplest implementation, layered growth, modularity, dependency discipline, long-term architecture; this section is their implementation-level playbook.
35
+
34
36
  Implement the smallest durable slice that satisfies the request and acceptance criteria.
35
37
 
36
38
  **The Ladder.** A reflex hierarchy for every decision — stop at the first rung that holds:
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-harness-core
3
- description: Morning Star (启明星) harness **强制全局入口** —— 信息源优先级、最小交付循环、状态机与 Done 权限、Task category 路由(含 quick 禁豁免)、@explore 边界、长任务纪律、护栏不变量、反模式索引、Morning Star Skill 索引与宿主入口。**任何**非平凡任务开始前必须先 Read 本 skill;再按角色与任务 **按需** Read 其它 `mstar-*` 专题(勿默认通读全部)。`@project-manager` 开轮必读 + `mstar-dispatch-gates` / `mstar-phase-gates` / `mstar-conventions` 等;实现/审查/QA 必读本 skill + `mstar-coding-behavior` 及角色清单(见 `mstar-roles`)。Prepare/派发/Git/residual/QC 细则在专题 skill,不在此重复。
3
+ description: Morning Star (启明星) harness **强制全局入口** —— 信息源优先级、最小交付循环、状态机与 Done 权限、Task category 路由(含 quick 禁豁免)、@explore 边界、长任务纪律、核心研发守则、护栏不变量、反模式索引、Morning Star Skill 索引与宿主入口。**任何**非平凡任务开始前必须先 Read 本 skill;再按角色与任务 **按需** Read 其它 `mstar-*` 专题(勿默认通读全部)。`@project-manager` 开轮必读 + `mstar-dispatch-gates` / `mstar-phase-gates` / `mstar-conventions` 等;实现/审查/QA 必读本 skill + `mstar-coding-behavior` 及角色清单(见 `mstar-roles`)。Prepare/派发/Git/residual/QC 细则在专题 skill,不在此重复。
4
4
  ---
5
5
 
6
6
  # Morning Star Harness Core(启明星核心)
@@ -121,6 +121,18 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
121
121
  | Kimi | `Agent`/`AgentSwarm`(仅 `coder`/`explore`/`plan`);角色绑定在 prompt(C5b);Plan 双写 → `references/kimi.md` · `kimi-plan-mode-bridge.md` |
122
122
  | 其它 | 同 `mstar-host` skill;按工具信号选 reference |
123
123
 
124
+ ## 核心研发守则
125
+
126
+ 全局工程不变量,适用于所有角色;实现级操作细节(The Ladder、surgical、debugging 等)→ **`mstar-coding-behavior`**。
127
+
128
+ - Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations.
129
+ - Choose the simplest implementation that fully meets the current requirements. Avoid speculative abstractions, configuration, and indirection.
130
+ - Grow the system in layers. Start from the smallest version that works end to end, and add each new capability on top of a product that already works. Never trade a working product for unfinished complexity.
131
+ - Keep components modular and concerns clearly separated.
132
+ - Prefer established, well-maintained libraries when they reduce overall complexity or improve reliability. Do not reimplement common functionality without a clear reason.
133
+ - Lean on the dependencies already in the project before writing your own implementation or adding packages. Do not assume a library lacks a capability without checking its documentation and types.
134
+ - Make architectural decisions for the long term. Do not accept a stopgap that only works for now and is meant to be replaced later.
135
+
124
136
  ## 护栏(不变量)
125
137
 
126
138
  - 未经用户同意不改宿主配置文件与用户凭据。
@@ -45,7 +45,7 @@ Phase 5: PR merge-ready loop —— 至 mergeable + CI 全绿 + reviews resolved
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
- > **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.
48
+ > **Engine check (when available):** run `mstar iteration gate --workflow <id> --compass <delivery-compass.md> --branch "$(git branch --show-current)" --integration <spec_integration_branch> --target <target_branch>` (or `import { evaluatePhaseGate } from "@mstar-harness/engine"` with the `currentBranch` / `specIntegrationBranch` / `prBaseBranch` probe inputs in a host hook) to evaluate the transition gate above against the workflow snapshot — the branch probes cover §3.5 exit item 5 (`EXIT_BRANCH_MISMATCH` when the commit checkout is not on `spec_integration_branch`; verify **before** the §3.5 close commit, not after). 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
 
50
50
  **误判信号**:对话里出现 compound 摘要、roadmap 更新、或「所有 plan 已完成」但 **未** 打印 §3.1 / §3.5 checklist → 视为 **Phase 3 未执行**,回到 §3.0。
51
51
 
@@ -80,14 +80,24 @@ PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git co
80
80
  - [ ] 当前分支是 `spec_integration_branch`
81
81
  - [ ] PR base = snapshot `branch.target`(`target_branch`,与 compass frontmatter 一致);**不是**未记录的 `main`
82
82
 
83
- **Commit integration 分支**:
83
+ **Commit 前提(HARD — branch-anchored,防递交到控制分支)**:§3.5 的 commit 是 **branch 锚定**的——`git commit` 落在**当前检出分支**,`<spec_integration_branch>` 只出现在 push 参数里。当控制 worktree(或任一检出)不在 integration 分支时,未经下述核对直接执行本配方,compound 会把 tracked 的 `{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`、`CONCEPTS.md` 递交到控制分支(如 `main`),integration 分支的 PR 永远带不上这些 shared 产物。因此 **任何 `git add` 之前**必须先验分支;mismatch → **STOP**(不得 commit、不得 push、不得「先提交后挪」),改在正确检出上重做(见下)。
84
+
85
+ 1. 解析 `<spec_integration_branch>`:snapshot `branch.integration`(workflows/<id>/snapshot.json)→ 缺失时 compass frontmatter `spec_integration_branch`;仍缺 → STOP 补齐,不得默认 `main`。
86
+ 2. **先验后提交**(在执行 commit 的检出处):`git branch --show-current` === `<spec_integration_branch>`。§3.2–§3.4 产生的 tracked close 产物本就应处于未提交状态等待本 commit,**不要求**此处工作树干净。engine 可用 → 在 add/commit **前**运行 `mstar iteration gate --workflow <id> --compass <delivery-compass.md> --branch <current> --integration <spec_integration_branch> --target <target_branch>` 并确认 exit 无 `EXIT_BRANCH_MISMATCH` / `EXIT_PR_BASE_MISMATCH`(Phase-3 窗口预期的其它 exit-1 除外,见 Phase transition gates 注)。
87
+ 3. **mismatch 时**:不产生任何提交。tracked 子树(`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`、`CONCEPTS.md`、迭代 package 中 tracked 部分)在**检出 `<spec_integration_branch>` 的 worktree** 重新写入或在 commit 前恢复(它们默认 tracked、随 Git 分支走;进程产物 plans/iterations/status/sdd 经 control 绝对路径不受影响)。然后重跑本 checklist。
88
+
89
+ **在 `<spec_integration_branch>` 检出上执行**:
84
90
 
85
91
  ```bash
86
- git add {ITERATION_DIR}/<id>/ {ITERATION_DIR}/README.md {KNOWLEDGE_DIR}/ CONCEPTS.md
92
+ git branch --show-current # must print <spec_integration_branch> — mismatch → STOP, see above
93
+ git add {ITERATION_DIR}/<id>/ {ITERATION_DIR}/README.md {KNOWLEDGE_DIR}/ {SPECS_DIR}/ CONCEPTS.md
94
+ git add STRATEGY.md # only if updated in §3.3 (tracked root file); skip line otherwise
87
95
  git commit -m "chore(iteration): close <iteration-id> — compound round, roadmap update"
88
96
  git push origin <spec_integration_branch>
89
97
  ```
90
98
 
99
+ Staging 说明:`{SPECS_DIR}` 为解析后的实际 specs 目录(候选链见 `mstar-conventions`,如 `{HARNESS_DIR}/specs/`、`docs/specs/`、`specs/`);本轮更新过才加入。§3.3 更新过的 tracked 项目层 roadmap tracker 若为 tracked 文件,一并 stage(gitignored 的 process 产物不进 commit)。
100
+
91
101
  PR 目标使用 snapshot `branch.target`;缺失时停止并补齐,不得默认 `main`。
92
102
 
93
103
  ## 3.6 可选:触发 compound-refresh
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "3.5.1",
3
+ "version": "3.6.0-alpha.2",
4
4
  "description": "Morning Star harness OpenCode plugin — skills bootstrap + engine-backed runtime hooks (status lint, dispatch validation, Enforcement: hard gates).",
5
5
  "license": "MIT",
6
6
  "repository": {