@mstar-harness/dsh 3.9.4 → 3.10.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/gates/dispatch.d.ts +9 -3
- package/dist/index.js +175 -89
- package/harness-commands/iteration-start.md +15 -11
- package/harness-skills/mstar-artifacts/SKILL.md +4 -2
- package/harness-skills/mstar-artifacts/references/plan-files-and-reports.md +1 -1
- package/harness-skills/mstar-artifacts/references/plan-quality-bar.md +10 -0
- package/harness-skills/mstar-artifacts/references/plan-workflow-lifecycle-contract.md +115 -0
- package/harness-skills/mstar-artifacts/references/status-and-residuals.md +24 -3
- package/harness-skills/mstar-artifacts/templates/plan.main.md +6 -1
- package/harness-skills/mstar-compound/SKILL.md +4 -4
- package/harness-skills/mstar-conventions/SKILL.md +1 -0
- package/harness-skills/mstar-conventions/references/effort-estimation.md +2 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +9 -9
- package/harness-skills/mstar-harness-core/SKILL.md +5 -13
- package/harness-skills/mstar-host/SKILL.md +41 -2
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +2 -0
- package/harness-skills/mstar-host/references/cursor.md +3 -0
- package/harness-skills/mstar-host/references/dsh.md +23 -4
- package/harness-skills/mstar-host/references/kimi.md +3 -0
- package/harness-skills/mstar-host/references/omp.md +140 -1
- package/harness-skills/mstar-host/references/opencode.md +3 -0
- package/harness-skills/mstar-host/references/zcode.md +3 -0
- package/harness-skills/mstar-iteration/SKILL.md +1 -1
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +2 -0
- package/harness-skills/mstar-iteration/references/phase-1-prepare.md +11 -2
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +74 -10
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +3 -3
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +3 -2
- package/harness-skills/mstar-iteration/references/phase-6-post-merge-close.md +5 -2
- package/harness-skills/mstar-iteration/references/plan-scoped-pm.md +3 -1
- package/harness-skills/mstar-phase-gates/SKILL.md +7 -5
- package/harness-skills/mstar-project-governance/SKILL.md +3 -3
- package/harness-skills/mstar-review-qc/SKILL.md +4 -4
- package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +1 -1
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +1 -0
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +5 -2
- package/harness-skills/mstar-roles/references/project-manager/plan-management.md +15 -0
- package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +3 -3
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +7 -5
- package/harness-skills/mstar-roles/references/project-manager.md +12 -11
- package/harness-skills/mstar-sdd/SKILL.md +5 -2
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +4 -1
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +4 -0
- package/harness-skills/pm/SKILL.md +9 -10
- package/package.json +1 -1
|
@@ -42,25 +42,25 @@ Start a new Morning Star harness iteration. **Phase 1 is not complete until the
|
|
|
42
42
|
|
|
43
43
|
| 宿主上下文 | 走哪条 |
|
|
44
44
|
|------------|--------|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
45
|
+
| **宿主 Plan mode**(Plan 会话活跃) | §0 Boot → **§P** — **先**空白 session plan,再 **feedback-driven** 自主改同一份 plan;grill-me **仅**在用户明确结束反馈后、仍有阻塞疑问时;**Build 前不执行** Review 链 / commit / integration 分支 |
|
|
46
|
+
| **其它**(非 Plan 会话) | §0 Boot → §1–§6(Research → Explore → grill-me → Write → Review → branch) |
|
|
47
47
|
|
|
48
48
|
**Both paths converge at §6**(integration worktree)。Default → §7 auto-continue Phase 2→6;`pause` → command ends at §6.
|
|
49
49
|
|
|
50
50
|
## 0. Boot
|
|
51
51
|
|
|
52
|
-
按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration`(route map:start → **`references/phase-1-prepare.md`**)+ `mstar-phase-gates` + `mstar-dispatch-gates` + `mstar-conventions/artifacts` + `mstar-host` → active host reference)。
|
|
52
|
+
按 **`mstar-iteration`** Load order 加载(`mstar-harness-core` → `mstar-roles` → `references/project-manager.md` → `mstar-iteration`(route map:start → **`references/phase-1-prepare.md`**)+ `mstar-phase-gates` + `mstar-dispatch-gates` + `mstar-conventions/artifacts` + `mstar-host` → active host reference)。Plan 会话另读 **active host reference 的 plan-mode bridge**(`mstar-iteration` Phase 1 in Plan mode)。完整 load list → **`mstar-roles`**。
|
|
53
53
|
|
|
54
|
-
|
|
54
|
+
**若宿主 Plan mode 活跃 → 进入 §P;否则继续 §1。**
|
|
55
55
|
|
|
56
|
-
## P.
|
|
56
|
+
## P. 宿主 Plan mode(Phase 1 scaffold → feedback loop → deferred grill → Build)
|
|
57
57
|
|
|
58
|
-
Execute **`mstar-host
|
|
58
|
+
Execute **`mstar-host`** → active host 的 **plan-mode bridge**(其 "mstar-iteration Phase 1 in Plan mode" 等价节:Detect / 语义 / single session-plan(HARD,只允许一份)/ Research → early session plan → Feedback loop → Feedback-close deferred grill → Pre-Build / Build 全流程 SSOT)。
|
|
59
59
|
|
|
60
60
|
Command-unique 补充(bridge 未枚举):
|
|
61
61
|
|
|
62
62
|
- **空白脚手架字段**:Direction / Scope / Acceptance Criteria / Non-Goals / Delivery Branch Policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`)/ Plans / Feedback log / Deferred grill log
|
|
63
|
-
- **Build 才勾的 todos**(顺序):`harness-init` → `finalize-compass-plans`(同一
|
|
63
|
+
- **Build 才勾的 todos**(顺序):`harness-init` → `finalize-compass-plans`(同一 session plan 落成 compass + plans + `status.json` 登记 + 索引)→ review-edit-product-manager → review-edit-architect → review-edit-writing-specialist → `pm-lock` → `integration-branch`
|
|
64
64
|
|
|
65
65
|
## 非 Plan 路径从这里继续 ↓
|
|
66
66
|
|
|
@@ -74,7 +74,7 @@ Scope **2–4** candidates targeting **product completeness**(default to defer
|
|
|
74
74
|
|
|
75
75
|
## 3. Lock Direction — bundled `grill-me`
|
|
76
76
|
|
|
77
|
-
> **非 Plan 路径**。
|
|
77
|
+
> **非 Plan 路径**。Plan mode 用 §P feedback loop + deferred grill(主路径不是 grill)。
|
|
78
78
|
|
|
79
79
|
**Direction lock mode: `interactive`**(`mstar-iteration/references/phase-1-prepare.md` §1.2 默认;本命令不使用 `autonomous`)。This command bundles a **non-`mstar-*`** skill at `skills/grill-me/SKILL.md` — **only this command step** references it.
|
|
80
80
|
|
|
@@ -86,7 +86,7 @@ Produce harness artifacts per **`mstar-iteration/references/phase-1-prepare.md`
|
|
|
86
86
|
|
|
87
87
|
## 5. Review & Edit Chain(HARD GATE — do not commit before this)
|
|
88
88
|
|
|
89
|
-
Execute **`mstar-iteration/references/phase-1-prepare.md` §1.6**(SSOT):顺序 `product-manager` → `architect` → `writing-specialist` → PM lock(**禁止**并行三 roles
|
|
89
|
+
Execute **`mstar-iteration/references/phase-1-prepare.md` §1.6**(SSOT):顺序 `product-manager` → `architect` → `writing-specialist` → PM lock(**禁止**并行三 roles;角色名提及写法 → active host reference);**禁止** `{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").
|
|
90
90
|
|
|
91
91
|
**Assignment preflight**:每次 invoke 前按 **`mstar-iteration/references/command-shared-invariants.md`** 执行(warn-only + `enforcement: hard` fail-fast;bin 缺失静默跳过)。
|
|
92
92
|
|
|
@@ -105,11 +105,15 @@ PM must print this block before §6; all `[ ]` must be `[x]`:
|
|
|
105
105
|
- [ ] product-manager / architect / writing-specialist invokes completed — 编辑 compass / plans / specs / **`<iteration-id>/` package**;**未**向 `{KNOWLEDGE_DIR}/` 新增
|
|
106
106
|
- [ ] PM final lock: compass `status: locked`; Prepare gates pass (blocked plans documented)
|
|
107
107
|
- [ ] Branch policy locked: `iteration_base_branch` / `spec_integration_branch` / `target_branch` recorded in compass / `status.json`
|
|
108
|
-
- [ ] **THEN
|
|
108
|
+
- [ ] **THEN**(§6 按 §2.3 checklist step 7 执行):已 review 的本轮改动在该 integration checkout 上 commit,`iteration/<iteration-id>` 已 push —— never the primary checkout
|
|
109
109
|
|
|
110
110
|
## 6. Integration Branch
|
|
111
111
|
|
|
112
|
-
|
|
112
|
+
**Call site — do not restate the sequence.** Execute **`mstar-iteration/references/phase-2-worktree-lease.md` §2.3**「Integration worktree (Phase 2 entry) + control root」checklist **steps 1–7** —— 该 checklist 是该序列的**唯一 home**。本命令另记两件 command 层事实:register `iteration_base_branch` / `spec_integration_branch` / `target_branch` in compass frontmatter **and** `status.json` metadata;record the observed primary branch as **`Main worktree branch`** in the main plan header。**STOP** if `iteration_base_branch` / `target_branch` missing — never default `main`/`master`。
|
|
113
|
+
|
|
114
|
+
**Phase 1 完成 anchor(pointer only — 本命令不承载 marker)**:checklist **step 7** 走完后必须执行 `phase-1-lock` 的 host 动作 —— 其 marker 与触发条件由 **`mstar-iteration/references/phase-2-worktree-lease.md` §2.3**「Integration worktree (Phase 2 entry) + control root」checklist tail 承载。
|
|
115
|
+
|
|
116
|
+
**Parenthetical**:本处引用的 §2.3 是 **Phase 1** 步骤 —— 它**不**触发 `phase-2-entry` anchor(后者只在 Phase 2 execute/resume entry、即 §2.4 之前触发);Phase 2 resume 再次走到 §2.3 时 `phase-1-lock` 已在 Phase 1 完成,不再重复调用。
|
|
113
117
|
|
|
114
118
|
---
|
|
115
119
|
|
|
@@ -15,6 +15,7 @@ description: "Morning Star plan harness artifacts — `{PLAN_DIR}` main plans an
|
|
|
15
15
|
| Plan template (Global Constraints, Interfaces) | `templates/plan.main.md` |
|
|
16
16
|
| knowledge / iterations / specs boundaries and indexes | `references/knowledge-and-designs.md` |
|
|
17
17
|
| `status.json` (v2 root), workflow snapshots, plan-scoped `coordination` / session / handoff / revision schema, project register, residual severity / lifecycle, engine-check queries | `references/status-and-residuals.md` |
|
|
18
|
+
| Plan-level workflow lifecycle: delivery-kind declaration, stages, evidence contracts, engine seams | `references/plan-workflow-lifecycle-contract.md` |
|
|
18
19
|
| Empty-repo `status.json` template | `templates/status.empty.json` (`templates/README.md`) |
|
|
19
20
|
| Tech-debt rollup (read-only) | `mstar status tech-debt [path]` (engine `techDebtRollup`; see `references/status-and-residuals.md`) |
|
|
20
21
|
|
|
@@ -32,7 +33,7 @@ description: "Morning Star plan harness artifacts — `{PLAN_DIR}` main plans an
|
|
|
32
33
|
- **Fail-loud handoff**: findings must pass `validateResidual` (per entry) / `validateProjectRegister` (register) before registration; snapshots and the v2 root pass `validateWorkflowSnapshot` / `validateStatus` (`mstar status validate`); malformed → reject + rewrite → **`references/status-and-residuals.md`** (“Fail-loud handoff contract”).
|
|
33
34
|
- **Lifecycle**: open → verified close **in place** in the register (`lifecycle` / `closed_at` / `closure_note`); machine **`severity`** enum in reference. v1 `archived/residuals/` + `archive-residuals` are retired.
|
|
34
35
|
|
|
35
|
-
- **Findings cleanup**: Assignment **`Findings cleanup: zero-residual | allow-residual`** (the `metadata.findings_cleanup` mirror is deleted); iteration Phase 2 defaults to **`
|
|
36
|
+
- **Findings cleanup**: Assignment **`Findings cleanup: zero-residual | allow-residual`** (the `metadata.findings_cleanup` mirror is deleted); iteration Phase 2 defaults to **`allow-residual`** (register + disclose duties apply) → **`references/status-and-residuals.md`** (“Findings cleanup modes”).
|
|
36
37
|
|
|
37
38
|
> **Engine check (when available):** run `mstar status findings-cleanup <plan-id> [--project <id>] [--mode zero-residual|allow-residual]` (or import `findingsCleanupGate` from `@mstar-harness/engine` in a host hook) to enforce the Findings cleanup mode above against the plan's register entries. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
38
39
|
|
|
@@ -53,7 +54,7 @@ Field semantics, severity mapping, findings cleanup modes, archive flow, and `jq
|
|
|
53
54
|
## Decision Rules
|
|
54
55
|
|
|
55
56
|
- residual **severity** 是机器字段 SSOT(`references/status-and-residuals.md`);每条新 finding 只登记 project register(`projects/<id>/residuals.json` → `entries[<plan-id>]`),v1 根级 `residual_findings` 仅 legacy 只读,**禁止**双写。
|
|
56
|
-
- **`Findings cleanup:
|
|
57
|
+
- **`Findings cleanup: allow-residual`** 默认(迭代 Phase 2):open R# 先登记 project register,且各决策面披露(清单 + severity + 跟踪位置;close 面另含 blocker-defer 标记);unresolved `critical` 仍阻断 Approve;`zero-residual` 为显式 opt-in —— 细则 → **`references/status-and-residuals.md`**「Findings cleanup modes」。
|
|
57
58
|
- 登记前必须过 `validateResidual` / `validateProjectRegister` / `validateStatus`(fail-loud handoff);malformed → reject + rewrite。
|
|
58
59
|
- **计划行 / register 只经 domain call 修改**:scoped 路线使用 `mstar plan …` 动词(带 `--session` 与 `--expect`),手写 snapshot / register 会被拒(`coordination.direct-write-refused` / `coordination.scoped-writer-required`);只读校验器(`mstar lease verify` / `mstar worktree check`)是检查而非修改替代。
|
|
59
60
|
|
|
@@ -66,3 +67,4 @@ Field semantics, severity mapping, findings cleanup modes, archive flow, and `jq
|
|
|
66
67
|
- `references/plan-files-and-reports.md` — 主 plan / review bundle 命名、QC 波次、durable summaries
|
|
67
68
|
- `references/status-and-residuals.md` — `status.json` (v2), workflow snapshots, plan-scoped coordination (bind / revision / session / handoff / reconcile), project register, residual severity / lifecycle / engine-check queries
|
|
68
69
|
- `references/knowledge-and-designs.md` — knowledge / iterations / specs 边界与索引
|
|
70
|
+
- `references/plan-workflow-lifecycle-contract.md` — plan-level workflow lifecycle contract: delivery-kind declaration, stages, evidence contracts, engine seams
|
|
@@ -42,7 +42,7 @@ Raw bundle files may disappear after the working context is gone. Before Done, P
|
|
|
42
42
|
- `Review bundle`: `{SDD_DIR}/review/`
|
|
43
43
|
- `QC inputs`: `qc1.md` / `qc2.md` / `qc3.md` or `qc.md`
|
|
44
44
|
- `Blocking result`: fixed / none / deferred with reason
|
|
45
|
-
- `Residual findings`: R#
|
|
45
|
+
- `Residual findings`: each open R# — id + short title + severity + tracking location (register `entries[<plan-id>]`) + owner/target + blocker-defer flag (`N/A — none open` when none)
|
|
46
46
|
- Main plan `## QA Gate Summary` when QA applies:
|
|
47
47
|
- `QA gate` / `QA mode`
|
|
48
48
|
- evidence reused vs newly run checks
|
|
@@ -76,6 +76,15 @@ Do not add repository-wide build/test/lint/typecheck gates for insurance. Full s
|
|
|
76
76
|
|
|
77
77
|
"Works correctly" is not a done criterion.
|
|
78
78
|
|
|
79
|
+
### 7. Task shape / session fit
|
|
80
|
+
|
|
81
|
+
Each task fits **one focused implementer round** — the round closes the task's declared Files list and verification gates, not a slice of them:
|
|
82
|
+
|
|
83
|
+
- **Effort (agent-oriented)** — every task cites its band from the existing XS–XL scale (`mstar-conventions/references/effort-estimation.md`). A size estimate and a one-round closure assertion are distinct: a multi-session band never authorizes a multi-round task — split until each task can close its own Files and gates.
|
|
84
|
+
- **Named split point** — every task states where it breaks if one-round closure fails, so PM can split without re-deriving the boundary.
|
|
85
|
+
- **Split strategies** — apply the review split shapes (`mstar-audit/references/pr-review.md` § Sizing & change shape) to task boundaries, each slice with explicit interfaces and independent proof: stack · by file group · horizontal (shared code first) · vertical (full-stack slices). They shape task boundaries; PR line-count thresholds stay review-owned.
|
|
86
|
+
- **Verification is not the shock absorber** — **Budget pressure MUST NOT shorten or waive any assigned scoped verification.** If the round cannot close, stop and report for split/re-dispatch instead of cutting checks.
|
|
87
|
+
|
|
79
88
|
## Relationship to existing plan elements
|
|
80
89
|
|
|
81
90
|
| This quality bar | Existing mstar element |
|
|
@@ -86,6 +95,7 @@ Do not add repository-wide build/test/lint/typecheck gates for insurance. Full s
|
|
|
86
95
|
| STOP conditions | New — not previously formalized |
|
|
87
96
|
| Drift check | SDD `BASE_SHA` — generalized to all plans |
|
|
88
97
|
| Done criteria | `plan.main.md` per-step checkboxes — elevated to machine-checkable |
|
|
98
|
+
| Task shape / session fit | `plan.main.md` per-task **Effort (agent-oriented)** / **Split point** slots + `mstar-phase-gates` capacity quick-check — one-round Files-plus-gates closure per task |
|
|
89
99
|
|
|
90
100
|
## When to apply
|
|
91
101
|
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
# Plan workflow lifecycle contract
|
|
2
|
+
|
|
3
|
+
The authoritative semantics for plan-level workflow delivery: what a `type: plan` workflow declares at registration, the stages it walks, the evidence each stage owes, and the engine seams that enforce them (§6). Corpus surfaces cite this file pointer-level instead of restating it; where a skill's prose and this contract disagree on lifecycle semantics, this contract is the wording authority until it is formally amended.
|
|
4
|
+
|
|
5
|
+
This file owns semantics only. The `packages/engine/src/*` line ranges below are orientation, not stable anchors — re-read the module before relying on a range.
|
|
6
|
+
|
|
7
|
+
## Foundational distinctions
|
|
8
|
+
|
|
9
|
+
Three meanings that must remain separate:
|
|
10
|
+
|
|
11
|
+
- **Standalone plan workflow:** an independently owned `type: plan` lifecycle, with its own delivery obligation and terminal close.
|
|
12
|
+
- **Plan row inside an iteration:** a work unit inside the iteration's existing lifecycle. Its completion does not independently create a second delivery PR obligation.
|
|
13
|
+
- **Plan-scoped primary PM session:** bounded execution authority that ends in handoff to its coordinator. It does not gain lifecycle authority because its role name includes PM. See `skills/mstar-iteration/references/plan-scoped-pm.md:21,62–68,95–109,145`.
|
|
14
|
+
|
|
15
|
+
Four facts that are not interchangeable: plan-row `Done`, workflow `completed`, PR opened, and PR merged are distinct facts. A workflow with completed implementation but an outstanding delivery PR must remain active and resumable.
|
|
16
|
+
|
|
17
|
+
## 1. Delivery-kind declaration
|
|
18
|
+
|
|
19
|
+
Every workflow declares its delivery kind at registration, as part of the registration evidence (§4a). Declared kinds:
|
|
20
|
+
|
|
21
|
+
- **`development`** — the full lifecycle of §3 applies: PR submission, merge-ready milestone, verified merge, and evidence-backed terminal close. The PR obligation is the declared delivery path, not an optional extra.
|
|
22
|
+
- **`verification/report-only`** — an explicit alternative completion policy is recorded at registration and names what evidence completes the workflow (for example the acceptance artifacts or report location). Terminal close still runs through the same evidence-backed close ordering (§4g); only the PR/merge stages are replaced by the recorded policy.
|
|
23
|
+
|
|
24
|
+
Binding rules:
|
|
25
|
+
|
|
26
|
+
- The declared kind is recorded at registration. It is never inferred retroactively from runtime behavior, from the presence or absence of fields, or from convenience.
|
|
27
|
+
- Absence of `branch.target` (or of any other registration field) is not an implicit exemption. Missing fields never select a kind and never waive the declared obligation; a `development` workflow with missing branch fields is incomplete registration, not an exempt workflow.
|
|
28
|
+
- Verification/report-only workflows follow their recorded explicit completion policy, not an accidental PR exemption inferred from missing fields.
|
|
29
|
+
- An iteration uses the same outer lifecycle around its multiple plan rows (§3). Its child plan rows are not standalone workflows and gain no independent delivery PR obligation.
|
|
30
|
+
|
|
31
|
+
## 2. Cardinality stance
|
|
32
|
+
|
|
33
|
+
- The new normal route is **one independently owned development plan per `type: plan` workflow**. A `type: plan` label alone does not establish cardinality; this contract fixes it for the new normal route only.
|
|
34
|
+
- **Producers.** The known multi-row `type: plan` producer is audit promotion (`promoteAuditPlans`), which constructs one plan row per selected plan file (`packages/engine/src/audit.ts:1250-1272`). Existing specialized producers are `audit promote` and `migrate`; the generic normal-entry register producer is seam S1 (§6).
|
|
35
|
+
- **Decision:** audit promotion is explicitly **grandfathered** as a multi-row specialized producer. No schema-level one-row invariant is imposed on the grandfathered producer; it keeps working and is not silently broken. Any future schema tightening must migrate audit promotion off the multi-row shape first, and must re-inventory producers before enforcement. Until such a migration lands, the one-plan norm governs the new normal route and new registrations, not the grandfathered producer.
|
|
36
|
+
|
|
37
|
+
## 3. Lifecycle stages
|
|
38
|
+
|
|
39
|
+
The common delivery lifecycle:
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
register → recall → prepare/lock → execute + review/acceptance → compound disposition → submit PR → merge-ready (milestone) → verify merge → terminal close/unregister/reconcile
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| Stage | Producer | Evidence (recorded) | Failure behavior |
|
|
46
|
+
|---|---|---|---|
|
|
47
|
+
| register | PM via an authorized domain operation (seam S1) | Create-only snapshot + root `workflows[]` entry under one lock; records snapshot type, delivery kind, owned plan, project, source/target branches and coordinator. Registration does not authorize implementation; advisory research and unselected candidates are not silently promoted. | Missing or failed registration blocks execution (admission refusal, seam S2). A failed register write is never treated as partial activation success. |
|
|
48
|
+
| recall | PM, during Prepare before plan lock | Recall receipt: relevant knowledge/research inputs recorded, reused and rejected decisions noted, or a truthful empty result when none apply. No full-corpus scan; no invented knowledge. | Plan lock is not reached without the receipt. Existing implement-time re-alignment still applies when source inputs change. |
|
|
49
|
+
| prepare/lock | PM per `mstar-phase-gates` | Locked plan under the existing Prepare/clarify gates; their ownership and risk rules are unchanged. Workflow unification removes no gates. | Clarify/Prepare gate failure keeps the workflow active in Prepare; nothing advances silently. |
|
|
50
|
+
| execute + review/acceptance | Dev implementers, plan QC tri, QA per existing ownership | The existing per-plan gate evidence (implementation checks, QC tri, QA gate). | Gate failure leaves rows and workflow blocked/active — never silently completed. Row `Done` is not workflow completion (foundational facts). |
|
|
51
|
+
| compound disposition | PM/implementer on the delivery branch/worktree, before the PR head is finalized | Outcome ∈ {`created`, `updated`, reasoned `skipped`} recorded on the workflow. No mandatory new document; high overlap updates an existing document rather than generating a duplicate. | Missing disposition blocks PR head finalization. A reasoned `skipped` is a valid recorded outcome, not an omission. |
|
|
52
|
+
| submit PR | PM/owner | Real PR identity recorded at submission: repo, head, target (§4d). | Missing credentials, remote, or submission failure leaves the workflow blocked/active, not completed. A local commit or a pre-existing unrelated PR does not satisfy this stage. |
|
|
53
|
+
| merge-ready (milestone) | PM declares after submission | Milestone marker only. The workflow stays registered and resumable while the PR is open. | Not a completion state: an outstanding delivery PR keeps the workflow active (foundational facts). |
|
|
54
|
+
| verify merge | PM check — never the close verb | Provider merge evidence. PR opened, mergeable, and merged are different facts; missing or unavailable provider evidence is not accepted as merged. | Unverified merge keeps the workflow registered/resumable. Local close validation is never described as proof of a remote merge. |
|
|
55
|
+
| terminal close/unregister/reconcile | Authorized close path (seam S3): `closeWorkflow` semantics + phase-6 ordering | Terminal snapshot write → root unregister → projection reconcile, ordered and retryable; every row `Done`; delivery-kind evidence consulted (§6 S3). | Refusal when evidence or row state is insufficient. Root-removal failure is explicit partial closure; retry must not rewrite the terminal timestamp. |
|
|
56
|
+
|
|
57
|
+
**Iteration application.** An iteration uses the same outer lifecycle around its multiple plan rows, adding only iteration-specific scope planning, dependency scheduling, integration and package/compass projections. Child plan handoffs do not trigger per-child delivery PRs or premature parent closure; only the iteration workflow itself walks submit PR → verify merge → terminal close.
|
|
58
|
+
|
|
59
|
+
## 4. Evidence contracts
|
|
60
|
+
|
|
61
|
+
**(a) Registration is an authorized domain operation.** It writes the create-only snapshot and the root entry under one lock. The primitive reference is the audit-promotion sequence `packages/engine/src/audit.ts:1250-1324`: plan-row/snapshot construction, entry validation, then the atomic root-lock section — create-only `writeWorkflowSnapshot` → `registerWorkflowEntryLocked`, with rollback that removes only the exact snapshot version that call created. The generic producer (seam S1) reuses these primitives; it does not invent a second registration mechanism.
|
|
62
|
+
|
|
63
|
+
**(b) Admission consumes registration.** `packages/engine/src/sdd.ts:1185-1194` falls back to branch-alignment-only when no active workflow row applies, or a non-InProgress row has no lease — so the SDD seam does not enforce the registration obligation by itself. On the normal plan route that fallback closes with a precise refusal code, and the refusal documents the registration command and the recovery path (seam S2). Registration/recovery semantics: a crash between snapshot creation and root registration leaves no partial activation; recovery re-runs the authorized producer without duplicating identity.
|
|
64
|
+
|
|
65
|
+
**(c) Compound disposition.** The outcome ∈ {`created`, `updated`, reasoned `skipped`} is recorded on the workflow before PR head finalization. Engine checks can validate the disposition and referenced artifacts; that is not semantic-quality proof. Existing compound document/index validation is reused as-is.
|
|
66
|
+
|
|
67
|
+
**(d) PR identity.** Repo, head, and target are recorded at submission. Neither a local commit nor a pre-existing unrelated PR satisfies the obligation; a failed submission leaves the workflow blocked/active, not completed.
|
|
68
|
+
|
|
69
|
+
**(e) Merge-ready.** Leaves the workflow registered and resumable. A requirement to submit a PR implies no authorization to merge it.
|
|
70
|
+
|
|
71
|
+
**(f) Verified merge.** A PM check, never the close verb. It distinguishes opened, mergeable, and merged; missing or unavailable provider evidence is not accepted as merged.
|
|
72
|
+
|
|
73
|
+
**(g) Terminal close.** Existing `closeWorkflow` semantics (`packages/engine/src/workflow.ts:665-725`): close-timestamp validation, snapshot identity check, coordinated-writer authority, every row `Done`, strict terminal validation that refuses leases without deleting them, and idempotent preservation of an existing valid terminal snapshot (including `failed`/`stopped`); it never releases leases. Ordering per phase-6 (`packages/engine/src/iteration.ts:514-616` reuse): snapshot terminal → unregister → reconcile. The local gate deliberately does not verify remote merge — that verification is the PM's separate check in (f). `closeWorkflow` does not inspect PR or compound evidence; seam S3 adds exactly that delivery-kind evidence consultation while reusing every existing guard.
|
|
74
|
+
|
|
75
|
+
## 5. Failure and abandonment
|
|
76
|
+
|
|
77
|
+
- Failure and abandonment close through explicit `failed`/`stopped` statuses with a recorded reason. They are never rewritten as successfully completed.
|
|
78
|
+
- `closeWorkflow` preserves an existing valid terminal snapshot unchanged, including `failed`/`stopped` — idempotence this contract keeps.
|
|
79
|
+
- Close never releases leases. Another owner's lease is not released to force closure; strict terminal validation refuses leases without deleting them.
|
|
80
|
+
- Scoped and plan-scoped sessions cannot mutate lifecycle anchors or close sibling workflows (foundational distinctions, third meaning).
|
|
81
|
+
|
|
82
|
+
## 6. Engine seam inventory
|
|
83
|
+
|
|
84
|
+
Three named seams. Per-seam acceptance checks state the observable behavior each seam owes. This section specifies seams; it implements none of them.
|
|
85
|
+
|
|
86
|
+
**S1 — Generic register producer.** A general authorized registration path for normal plan workflows, reusing the §4a primitives (create-only snapshot + root entry under one lock, rollback of only the created version).
|
|
87
|
+
Acceptance checks: a standalone development plan registers before execution; a missing registration, failed register write, or ambiguous owner blocks execution without partial activation being treated as success; crash/retry between snapshot creation and registration preserves identity, timestamps, ownership and resumability; existing producers (audit promotion) use the same primitives.
|
|
88
|
+
|
|
89
|
+
**S2 — Admission consumption.** The SDD admission fallback (`packages/engine/src/sdd.ts:1185-1194`) closes on the normal plan route: execution without a registered running workflow row is refused with a precise refusal code, and the refusal documents the registration command and recovery path.
|
|
90
|
+
Acceptance checks: an unregistered plan's execution is refused, not silently continued on branch alignment alone; the refusal names registration and recovery; no partial activation is treated as success.
|
|
91
|
+
|
|
92
|
+
**S3 — Standalone close path.** The close path consults the registered delivery kind's evidence before completing. The local post-merge gate is snapshot-type-generic; the delta is the delivery-kind evidence consultation, reusing `closeWorkflow` guards and phase-6 ordering unchanged.
|
|
93
|
+
Acceptance checks: a registered `development` workflow with missing or incomplete delivery evidence refuses the close and stays registered/resumable; `Done` rows without required PR/compound evidence cannot be used to declare the workflow delivered; close retry after the terminal write preserves the original timestamp; `failed`/`stopped` workflows are never rewritten as successfully completed; close never releases leases; crash/retry between terminal write and unregister preserves identity, timestamps, ownership and resumability.
|
|
94
|
+
|
|
95
|
+
**Explicit deferral.** Mid-lifecycle advancement-gate breadth is deferred: per-stage engine gates across recall, prepare/lock, execute, compound disposition and PR submission are not part of this contract. `evaluatePhaseGate` stays iteration-shaped. The process obligations for those stages are carried by corpus pointers to this contract; only registration admission (S2) and terminal evidence (S3) are wired into code, plus the S1 producer.
|
|
96
|
+
|
|
97
|
+
## 7. Scope decisions
|
|
98
|
+
|
|
99
|
+
The direction and reason columns record the reasoning behind each answer; the answers are binding. There are no open decisions in this table.
|
|
100
|
+
|
|
101
|
+
| Decision | Answer | Direction | Reason |
|
|
102
|
+
|---|---|---|---|
|
|
103
|
+
| Does every `type: plan` mean a development PR? | **No.** Delivery kind is declared at registration (§1). Development plans require PR; verification/report-only workflows follow the explicit alternative completion policy recorded at registration. | Declare the delivery obligation explicitly for the workflow's purpose. Development plans require PR; verification/report-only workflows need an explicit alternative completion contract. | `type: plan` is also used for independent verification. Do not force empty PRs or make absence of `branch.target` an implicit escape hatch. The strict universal alternative is possible but must be consciously selected. |
|
|
104
|
+
| Is `type: plan` exactly one plan row? | **One independently owned development plan per workflow for the new normal route; audit promotion grandfathered as an explicitly inventoried multi-row producer (§2).** | Prefer one independently owned development plan for the new normal route; inventory current multi-row producers before tightening schema. | A type label alone does not establish cardinality. Audit promotion must be considered before enforcing a one-row invariant. |
|
|
105
|
+
| Where does compound run for a standalone plan? | **On its delivery branch/worktree, before the PR head is finalized (§3, §4c).** | On its delivery branch/worktree before the PR head is finalized. | Do not invent an iteration compass or extra integration branch solely to reuse iteration-close. Preserve control-root process artifacts versus tracked-result write ownership. |
|
|
106
|
+
| What completes the workflow? | **Verified merge plus common close; PR submission and merge-ready remain resumable milestones (§3, §4e–g).** | Verified merge plus common close; PR submission and merge-ready remain resumable milestones. | Preserves the stronger existing post-merge-close semantics. A user request to submit a PR is not authorization to merge it. |
|
|
107
|
+
| How should failure/abandonment close? | **Explicit failed/stopped handling with reason, never successful completed-close; no lease release by close (§5).** | Explicit failed/stopped handling with reason, never successful completed-close. | Preserve the existing distinction and do not release another owner's lease to force closure. |
|
|
108
|
+
|
|
109
|
+
## Binding negatives
|
|
110
|
+
|
|
111
|
+
- No part of this contract authorizes auto-merge. Submitting a PR never implies merge authorization; merging is a separate authorized act, verified by the PM check in §4f.
|
|
112
|
+
- No forced PR for `verification/report-only` workflows. Their completion follows the policy recorded at registration (§1).
|
|
113
|
+
- No silent completion anywhere. Every stage transition records its evidence; failure renders the workflow blocked/active, never implicitly done.
|
|
114
|
+
- No cleanup authorization is implied by lifecycle completion: worktree/branch deletion stays explicit and ownership/merge-guarded, exactly as the existing post-merge-close contract requires.
|
|
115
|
+
- Close never releases leases, and terminal `failed`/`stopped` states are never rewritten as `completed` (§5).
|
|
@@ -97,6 +97,8 @@ Canonical vs legacy residual definitions → **`mstar-artifacts` SKILL.md**("`
|
|
|
97
97
|
- **Scoped coordination (optional):** top-level `coordination.coordinator` plus per-row `coordination` (`revision` / `prepared` / `session` / `progress` / `handoff`) appear only on the scoped route — field table, session envelopes and version rules → § Plan-scoped coordination below.
|
|
98
98
|
- Terminal statuses (`completed` / `failed` / `stopped`) require `ended_at` and no dangling leases.
|
|
99
99
|
- **Completed close (Phase 6)** runs `mstar status workflow-close --workflow <id> [--harness <path>] [--ended-at <date>]`: engine `closeWorkflow` rereads the latest snapshot under the snapshot write lock, refuses any dangling lease / non-`Done` row (fail-loud, bytes unchanged), writes `completed` + `ended_at`, then unregisters the root entry. Unregister failure after the snapshot write is a reported **partial close** — retry finishes unregister without rewriting `ended_at`; a fully closed retry rewrites neither file. An already-terminal `failed` / `stopped` snapshot keeps its actual status (close never fabricates `completed`).
|
|
100
|
+
- **Delivery-evidence consultation before the close (seam S3):** a `type: plan` snapshot's registered delivery kind is consulted **before** the terminal write (`completed` closes only — a `failed`/`stopped` close is never demanded delivery evidence, §5) — an incomplete `development` delivery (no compound disposition / PR identity / PM-recorded verified-merge evidence, or a PR whose `head`/`target` are not the registered `branch.source`/`branch.target`), or an unfulfilled `verification/report-only` completion policy, refuses with the `PHASE6_DELIVERY_*` codes, leaving the snapshot `running` and the root entry registered (bytes unchanged, workflow resumable). Record the missing evidence with `mstar workflow evidence --workflow <id> --file <payload.json> [--session <path>]` — the same coordinator-session gate as the close, idempotent (identical evidence rewrites nothing) and stage-by-stage mergeable; the PR identity (§4d) is recorded **once** (a different pair is refused), the compound disposition and the merge record stay updatable. It refuses an already-terminal lifecycle plus a non-`plan` snapshot without a registered kind. The read-only `mstar iteration gate --phase 6` shares this same consultation, so gate and close never disagree.
|
|
101
|
+
- **Delivery kind is declared at registration by every producer** (§1/§4a): `mstar workflow register` (normal entry), `mstar audit promote --delivery-kind <kind>` (required flag) and `mstar migrate --delivery-kind <kind>` (a lift that would create an ACTIVE kind-less plan snapshot is refused as usage, exit 2; the declaration is ONE delivery identity, so a tree whose lift creates 2+ ACTIVE standalone plans is refused the same way with the plan ids — migrate in batches of one declared plan) all declare it explicitly — never inferred, never defaulted in code — and one shared rule pairs `development` with `--branch-source`/`--branch-target` and `verification/report-only` with `--completion-policy`. An **ACTIVE** `type: plan` snapshot that predates this (the historical audit-promotion / v1-lift population) is repaired once with `mstar workflow evidence --workflow <id> --declare-kind <development|verification/report-only> [--branch-source <b> --branch-target <b> | --completion-policy <text>] [--session <path>]`: the declaration is one-time (a second one, even with the same kind, is refused) and refuses a terminal snapshot — a supplied anchor fills a MISSING delivery anchor or restates the registered one, while a value conflicting with an anchor the snapshot already carries is refused (the registered anchor is the delivery identity, never overwritten); a legacy **terminal** kind-less snapshot keeps its documented owner-amendment path.
|
|
100
102
|
- **Physical cleanup is out of close's scope**: it is the separate `mstar worktree cleanup --workflow <id> …` verb (dry-run default), run in its own timing lane — same-round after a plan's integration merge (Phase 2) or after §6.1–§6.3 + PR merged (Phase 6). Close and cleanup never release leases — on the scoped route the plan row's lease is moved/deleted by `mstar plan accept | return | complete` (never by close or cleanup, and never by a standalone release verb); on the whole-iteration route the owner releases before either. Guard/decision codes (`cleanup.keep.*`, `cleanup.refuse.*`, `cleanup.remove.merged`) → **`mstar-branch-worktree`**「Worktree / branch cleanup」.
|
|
101
103
|
- `execution_policy` keys are copied from v1 root `metadata` at migrate; values are accepted-but-opaque this iteration (no semantic gate).
|
|
102
104
|
- `notes`: a plan row's `notes` array is the **legacy verbatim copy** preserved at migrate; the **runtime ledger is `notes.jsonl`** in the workflow dir (see `workflows/<id>/notes.jsonl` below). New notes append to the ledger only — never dual-write the row `notes`.
|
|
@@ -245,7 +247,7 @@ The v1 `plans[].metadata.findings_cleanup` mirror is **deleted** in v3 — no du
|
|
|
245
247
|
|
|
246
248
|
| Context | Default |
|
|
247
249
|
| ------- | ------- |
|
|
248
|
-
| Formal **iteration Phase 2** (Autonomous Execute) | `
|
|
250
|
+
| Formal **iteration Phase 2** (Autonomous Execute) | `allow-residual` (compass or Assignment may still override, including to `zero-residual`) |
|
|
249
251
|
| Standalone `/pm`, hotfix, `Execution mode: inline` | `allow-residual` |
|
|
250
252
|
|
|
251
253
|
### `zero-residual` (clean-session)
|
|
@@ -260,9 +262,14 @@ Intent: clear findings in the current plan session whenever possible. Open resid
|
|
|
260
262
|
6. **`waived` / `risk-accepted`**: still require PM + user/architect alignment; **close in the register** (do not leave open). Prefer a cheap fix over waive-as-shortcut.
|
|
261
263
|
7. Plan **Done**: prefer an empty `entries[<plan_id>]` in the register. If any open entries remain, **every** one must be blocker-defer + roadmap and none may be `critical` (item 4); otherwise keep `InReview` / `Blocked`.
|
|
262
264
|
|
|
263
|
-
### `allow-residual`
|
|
265
|
+
### `allow-residual`
|
|
264
266
|
|
|
265
|
-
Non-blocking register entries — `severity` below `critical` on the §3 axis — may ship with open entries and `Approve with residuals` when no unresolved `critical` remains (existing residual lifecycle unchanged).
|
|
267
|
+
Non-blocking register entries — `severity` below `critical` on the §3 axis — may ship with open entries and `Approve with residuals` when no unresolved `critical` remains (existing residual lifecycle unchanged). This is the default mode (see Defaults above; `zero-residual` is the explicit opt-in). Registration and disclosure are hard duties under `allow-residual` — they replace the speed-vs-discipline tradeoff, not the audit trail:
|
|
268
|
+
|
|
269
|
+
1. **Register before InReview exit**: every open R# is entered in the project register `{PROJECT_DIR}/<id>/residuals.json` → `entries[<plan-id>]` with machine-enum `severity` before the plan leaves InReview.
|
|
270
|
+
2. **Disclose on every decision surface**: every consolidated QC decision, Completion Report, and Status Update states the residual situation — the list, each entry's `severity`, and its tracking location. Silence about open residuals is a gate violation, not a style issue; when nothing is open, say `N/A — none open`.
|
|
271
|
+
3. **Critical still blocks**: an unresolved `critical` blocks `Approve`; `medium` / `low` / `nit` may be registered and carried (fix-now remains preferred when cheap).
|
|
272
|
+
4. **Close-time disclosure**: close-time artifacts carry the same residual list with `id` + `severity` + tracking location + blocker-defer flag — each plan's durable `## Review Gate Summary` (main plan), the iteration compass `## Quality Gate Summary`, and the PR delivery body (`N/A — none open` when empty). A close without these disclosures is not a close. Disclosure does not override critical-blocking, explicit `zero-residual` requirements, or register lifecycle rules: terminalizing a workflow never silently closes its open findings. `mstar status tech-debt` remains the cross-iteration visibility rollup.
|
|
266
273
|
|
|
267
274
|
> **Engine check (when available):** run `mstar status findings-cleanup <plan-id> [--project <id>] [--mode zero-residual|allow-residual]` (or import `findingsCleanupGate` from `@mstar-harness/engine` in a host hook) to enforce the mode above against the plan's register entries. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
268
275
|
|
|
@@ -415,6 +422,20 @@ Per-state `reconcile` outcome **and** the recovery action it requires are **rout
|
|
|
415
422
|
|
|
416
423
|
Reconciliation observes **Git ancestry / HEAD facts** in the recorded repository and never trusts a caller's success flag, and never performs a second merge. A crash after `complete` but before CLI output is handled by `show` + `reconcile`; a crash before the session binding leaves only an inert envelope. `return` after a failed merge requires an explicit Git abort plus reconcile first — a merge lease is never discarded while Git may still be in flight. Lost credentials or an abandoned active owner need explicit human recovery outside the normal verbs; no automatic takeover flag is introduced.
|
|
417
424
|
|
|
425
|
+
### Prepare workflow amendment (guarded Prepare-only structural delta)
|
|
426
|
+
|
|
427
|
+
**Coordinator authority only.** The amendment is addressed by the workflow's **coordinator** session envelope (`mstar plan bind --coordinator --workflow <id>` → `top.coordination.coordinator`); identity is never a flag, and the envelope's own harness root / workflow id are the only address. A plan session, an unbound or foreign workflow, a mismatched envelope, or an unregistered / non-`running` root entry refuses before any mutation. The top-level coordinator binding is the sole permitted coordination state.
|
|
428
|
+
|
|
429
|
+
**When it is lawful** (all of it, evaluated inside the snapshot write lock): `status: running` in `phase: phase-1-prepare`, the root register entry still **`running`** (`paused` is active in the register but not admissible here — the refusal reports the observed entry status), and **no execution ownership anywhere** — every row `Todo` with progress 0, no row `execution_lease`, no row `coordination` block (preparation, session binding, progress/QC evidence, handoff and reconcile state all live there), and no top-level `integration_merge_lease`. Resetting a row to `Todo` would erase nothing — it is exactly what this entry must not do, so an evidence-bearing row refuses instead.
|
|
430
|
+
|
|
431
|
+
**What it may change** (minimum delta): append explicitly approved **unique Todo** plan rows — constructed by the engine, never supplied with runtime row state — and fill the reviewed `integration_worktree_path`; the sole editable policy key is `execution_policy.plan_parallelism` (`serial` | `parallel`). Every prior row, unknown field, timestamp, revision, history, root entry and other workflow survives **by value**; only the appended rows, those two requested projections and the snapshot `updated_at` are new. It creates and switches nothing, is not a scheduler, and is not a general snapshot replacement. **One engine-owned exception to that enumeration:** a stored legacy `control_worktree_path` is normalized in memory by the canonical snapshot reader, so this authorized write emits the canonical `integration_worktree_path` and drops the legacy key with the value preserved — the migration the engine's own `workflow.snapshot.legacy-control-worktree-path` diagnostic prescribes (writers emit only the canonical key).
|
|
432
|
+
|
|
433
|
+
**Both byte tokens, always.** The amendment carries the current raw-byte SHA-256 of the **snapshot bytes** and of the workflow's reviewed **compass Markdown bytes** (`sha256:<64 lowercase hex>`, read from the read-only `show-prepare`); both are required even on the first amendment, and neither is a per-plan `coordination.revision`. The compass token binds the reviewed declaration: the resulting plan-id **set** must equal the compass `plans:` list exactly, and its `spec_integration_branch` / `integration_worktree_path` declarations must agree with what the call would leave recorded. The compass is re-read immediately before the single atomic commit.
|
|
434
|
+
|
|
435
|
+
**Refusals are mutation-free.** `coordination.prepare-amendment.{stale, invalid-patch, not-prepare, execution-started, duplicate-plan, invalid-plan, compass-mismatch, invalid-worktree}` (`coordination-write.ts`), plus the existing auth/scope errors; when each fires, the exact exit code and payload → `docs/cli.md` § `mstar-harness workflow`. The protected snapshot, root register, other workflows and the compass stay byte-identical.
|
|
436
|
+
|
|
437
|
+
**Prepare-only, no force.** Recovery from a `stale` token is re-read `show-prepare` → review again → retry with the fresh tokens. There is no force, no replacement snapshot, no reset and no hand-editing workaround for a workflow that has left Prepare or already owns execution.
|
|
438
|
+
|
|
418
439
|
---
|
|
419
440
|
|
|
420
441
|
## General constraints
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
**Execution:** mstar-sdd | inline
|
|
12
12
|
|
|
13
|
-
**Main worktree branch
|
|
13
|
+
**Main worktree branch**: [recorded residency of the primary checkout (main worktree) — PM observes and records before the lifecycle writes, then passes it unchanged in writable Assignments; never invented at check time, and never `branch.base` (that is a creation/merge anchor, not a residency fact)]
|
|
14
14
|
|
|
15
15
|
## Global Constraints
|
|
16
16
|
|
|
@@ -20,6 +20,10 @@
|
|
|
20
20
|
|
|
21
21
|
### Task 1: [Component Name]
|
|
22
22
|
|
|
23
|
+
**Effort (agent-oriented):** [XS–XL band per `mstar-conventions/references/effort-estimation.md` — a size estimate, not a round ceiling]
|
|
24
|
+
|
|
25
|
+
**Split point:** [where the task splits if it cannot close its Files and gates in one round — capacity criterion → `mstar-artifacts/references/plan-quality-bar.md` item 7 (Task shape / session fit)]
|
|
26
|
+
|
|
23
27
|
**Files:**
|
|
24
28
|
- Create: `exact/path/to/file`
|
|
25
29
|
- Modify: `exact/path/existing.py`
|
|
@@ -63,6 +67,7 @@ Reuse unaffected evidence with its original range and applicability; do not repe
|
|
|
63
67
|
1. **Spec coverage:** every spec requirement maps to a task
|
|
64
68
|
2. **Placeholder check:** task-owned paths/checks are concrete; executable tests have a real case, docs/policy have scoped evidence
|
|
65
69
|
3. **Type consistency:** names match across tasks
|
|
70
|
+
4. **Capacity (task shape / session fit):** every task closes its declared Files and verification gates in one implementer round — effort band declared, split point named, budget pressure never shortens verification (`mstar-artifacts/references/plan-quality-bar.md` item 7)
|
|
66
71
|
|
|
67
72
|
## SDD runtime (ephemeral)
|
|
68
73
|
|
|
@@ -13,7 +13,7 @@ description: Morning Star 知识结晶 —— 将已解决问题的经验沉淀
|
|
|
13
13
|
|
|
14
14
|
After solving a non-trivial problem, `mstar-compound` captures the learning as a structured document in `{KNOWLEDGE_DIR}`, so future plan research, debugging, and implementation can find and reuse it.
|
|
15
15
|
|
|
16
|
-
**In the mstar lifecycle**, compound is triggered at iteration-close (`mstar-iteration` § Phase 3), not per-plan Done. It can also be invoked standalone for ad-hoc captures outside formal iterations.
|
|
16
|
+
**In the mstar lifecycle**, compound is triggered at iteration-close (`mstar-iteration` § Phase 3), not per-plan Done. It can also be invoked standalone for ad-hoc captures outside formal iterations. Standalone development plans additionally owe a compound disposition before their delivery PR head is finalized (see「Integration with mstar lifecycle」).
|
|
17
17
|
|
|
18
18
|
Knowledge that isn't captured evaporates when the session ends. Knowledge that is captured but not discoverable is equally lost. This skill addresses both.
|
|
19
19
|
|
|
@@ -29,7 +29,7 @@ Knowledge that isn't captured evaporates when the session ends. Knowledge that i
|
|
|
29
29
|
|
|
30
30
|
## Integration with mstar lifecycle
|
|
31
31
|
|
|
32
|
-
Compound 在迭代收口时触发(`mstar-iteration` § iteration-close),不在 per-plan Done 后单独执行:`iteration-start → [plan lifecycle × N] → iteration-close → mstar-compound(per-iteration round)→ {KNOWLEDGE_DIR} → feeds next iteration's specify/plan`。迭代内所有 plan Done 后,PM 回顾整轮迭代可结晶知识,批量 compound。per-plan Done 是 per-plan 闭环终点;compound
|
|
32
|
+
Compound 在迭代收口时触发(`mstar-iteration` § iteration-close),不在 per-plan Done 后单独执行:`iteration-start → [plan lifecycle × N] → iteration-close → mstar-compound(per-iteration round)→ {KNOWLEDGE_DIR} → feeds next iteration's specify/plan`。迭代内所有 plan Done 后,PM 回顾整轮迭代可结晶知识,批量 compound。per-plan Done 是 per-plan 闭环终点;compound 是迭代级收口活动。独立交付 development plan 并行负有 disposition 义务:交付 PR head 定稿前在其交付分支/worktree 运行 review,结果 ∈ {`created` / `updated` / reasoned `skipped`} 记录在 workflow 上——reasoned skipped 是有效结果,高重叠时更新既有文档而非新建,**不强制新文档**。语义权威 → `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`。
|
|
33
33
|
|
|
34
34
|
### Iteration package promotion(iteration-close 强制盘点)
|
|
35
35
|
|
|
@@ -49,9 +49,9 @@ Compound 在迭代收口时触发(`mstar-iteration` § iteration-close),
|
|
|
49
49
|
|
|
50
50
|
## When to use / Skip
|
|
51
51
|
|
|
52
|
-
**Use**:迭代收口(`mstar-iteration` § iteration-close)批量回顾;独立触发(非迭代或紧急,任何非平凡问题解决后);重大 bug 修复后(`mstar-iteration`
|
|
52
|
+
**Use**:迭代收口(`mstar-iteration` § iteration-close)批量回顾;独立触发(非迭代或紧急,任何非平凡问题解决后);重大 bug 修复后(`mstar-iteration` 未启用时手动);独立 development plan 交付前的 disposition review(PR head 定稿前,见「Integration with mstar lifecycle」)。
|
|
53
53
|
|
|
54
|
-
**Skip**:自检 ≤2 Yes;Q5 高重叠(更新已有而非新建);纯机械工作(格式化、依赖升级、typo
|
|
54
|
+
**Skip**:自检 ≤2 Yes;Q5 高重叠(更新已有而非新建);纯机械工作(格式化、依赖升级、typo);问题未经验证。独立交付 plan 的 disposition 义务不因跳过结晶而消失——结晶跳过时以 reasoned `skipped` 记录结果(记录在 workflow,见「Integration with mstar lifecycle」)。
|
|
55
55
|
|
|
56
56
|
## Two tracks
|
|
57
57
|
|
|
@@ -179,6 +179,7 @@ Legacy `.agents/` 等价:
|
|
|
179
179
|
- **Spec 集成分支**:从 `iteration_base_branch` 创建;各 Plan 实现 merge 回此线后再视为 Spec 在代码侧集成。
|
|
180
180
|
- **Plan 实现分支**:每 `plan_id` 一条(PM 书面)。
|
|
181
181
|
- **PR target**:全部 Plans 与 iteration-close 完成后,向显式 `target_branch` 提 PR(窄例外见 Assignment `Branch policy`)。
|
|
182
|
+
- **Standalone development plan**:单 plan 交付不经迭代集成序列——交付分支上完成 compound disposition 后向显式 target 提交 PR,PR 身份(repo/head/target)在提交时记录;序列与语义 → `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`(迭代序列不变,见上)。
|
|
182
183
|
- Git 操作与 QC 单一 `HEAD` → **`mstar-branch-worktree`**。
|
|
183
184
|
- workflow snapshot 登记顶层 `branch.base`(`iteration_base_branch`)/ `branch.target`(`target_branch`)/ `branch.integration`(`spec_integration_branch`),以及 plan 行 `metadata.spec_integration_branch` / `merge_target` → **`mstar-artifacts`**。
|
|
184
185
|
|
|
@@ -25,6 +25,8 @@
|
|
|
25
25
|
|
|
26
26
|
「**会话**」指:一次连贯的 agent 运行(读上下文 → 实现 → 运行验证),**不是**人类 8 小时工作日。
|
|
27
27
|
|
|
28
|
+
任务层使用:每 task 的容量判据(单轮闭合其 Files 与验证门、命名 split point)→ **`mstar-artifacts/references/plan-quality-bar.md`** item 7(Task shape / session fit);本尺码只是规模预估,**不**定义单轮上限。
|
|
29
|
+
|
|
28
30
|
## 文档与模板中的字段名(建议)
|
|
29
31
|
|
|
30
32
|
- **PRD / 产品文档**:**`## Effort (agent-oriented)`** — 仅 **Complexity (XS–XL) + agent session band + 假设**(规格已锁、契约稳定等)。
|
|
@@ -21,7 +21,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
21
21
|
|
|
22
22
|
**共享红线**(doc-level 并行拆分 ≠ N 个 subagent;Handoff / 路由措辞 / 角色提及 ≠ invoke;工具可用 ≠ 授权;仅 PM 可分派;非 `Delegation: allowed` 不得调用同角色 / 兄弟角色)以 **`mstar-roles/references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」+「Non-Recursive Dispatch Rule (shared shape)」为唯一权威清单(standard preset 下已随角色 ref 在上下文中;explicit `none` 下该 leaf 边界仍可达)。本节保留 dispatch 专属条目:
|
|
23
23
|
|
|
24
|
-
- **NEVER** 在本会话内调用 Task / subagent
|
|
24
|
+
- **NEVER** 在本会话内调用 Task / subagent,且其角色绑定字段**等于**你当前的 **`Execute as`** 角色 id(同角色递归)。
|
|
25
25
|
- **DO NOT** 在 Assignment 缺少 `Execute as` / `Delegation` / `Who runs this turn` 时自行「补齐」为 PM;缺字段时按 **leaf executor** 解释:亲自完成或 **`Blocked`**。
|
|
26
26
|
- **DO NOT** 用「Assignment 太长 / 像编排稿」当作分派依据;先交付本会话任务再回报,分派由 PM 下一轮决定。
|
|
27
27
|
|
|
@@ -29,12 +29,12 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
29
29
|
|
|
30
30
|
1. 我此刻的 **`Execute as`** 是什么?
|
|
31
31
|
2. Assignment 是否写了 **`Delegation: allowed (...)`**?没有 → **禁止**任何 Task / subagent。
|
|
32
|
-
3.
|
|
32
|
+
3. 下一动作是不是「发起一次带角色绑定字段的 invoke」?是 → 停手,改为 Read / Write / Shell / Edit,或 **`Blocked`**。
|
|
33
33
|
4. 命中任一 NEVER → 写 `## Blocked — recursive dispatch refused (<which NEVER>)` 回报 PM,**不**继续 invoke。
|
|
34
34
|
|
|
35
35
|
**Assignment 顶部反模式块**:每个 PM Assignment 开头均有 **`**You are a leaf executor. You MUST NOT:**`** 块(含 IDENTITY + CAPABILITY BOUNDARY + prohibitions),PM 按此 Assignment 的角色+上下文定制反模式清单。leaf executor 收到 Assignment 后须 **首先** 阅读该块;命中任一条 → **停止**(亲自完成或 `Blocked`)。详见 **`mstar-roles/references/project-manager/dispatch-and-assignment.md`**。
|
|
36
36
|
|
|
37
|
-
> **Engine 执行范围(caller-scoped,#156)**:engine `antiRecursionPrecheck` 比较的是**派发方自身角色**(caller)与新 Assignment 的 `Execute as`(target
|
|
37
|
+
> **Engine 执行范围(caller-scoped,#156)**:engine `antiRecursionPrecheck` 比较的是**派发方自身角色**(caller)与新 Assignment 的 `Execute as`(target)。能否在 engine 层做这个判定取决于宿主是否向 engine 提供派发方身份(dispatcher binding):**提供方**在 hard enforcement 下真正硬执行(含 caller 空绑定 fail-closed);**不提供方**的角色绑定字段携带的是**派发目标**——目标 == `Execute as` 正是 C5 合规派发模式——这些宿主上红线保持 prompt 级约束(本节),engine 不做判定。当前宿主属于哪一类、字段名与 fail-closed 细节 → 当前宿主的 **`mstar-host` reference**(角色绑定字段 / engine 判定范围两行)。
|
|
38
38
|
|
|
39
39
|
## Plan 作用域与 credential 不下发(preflight 强制)
|
|
40
40
|
|
|
@@ -42,14 +42,14 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
42
42
|
|
|
43
43
|
- **子 Assignment 继承父 plan 作用域**:`plan_id` + 绝对 `Plan Path`(L1 另含 `SDD dir` / `Control harness root`)逐字下发。child **不得**自选或新建 plan、写 workflow snapshot / root register / 共享索引、释放 `execution_lease` / `integration_merge_lease`。缺失、相对路径或暗示「child 自行选 plan」= **派发未完成**(`mstar-roles/references/project-manager/dispatch-and-assignment.md` § Assignment Template `Plan scope`)。
|
|
44
44
|
- **credential 不下发 leaf**:session JSON 路径、`mstar plan --session` 写凭据、`--expect <revision>` 等**只由派发方(PM/coordinator)持有**。leaf 拿到 session 路径或写凭据即视为越权 → 停止并回报(`mstar-iteration/references/plan-scoped-pm.md` §8)。
|
|
45
|
-
- **`project-manager` 不是派发目标**:PM 是 primary-session 角色,无 subagent shell(规则家 → `mstar-roles/references/project-manager.md` § Plan-scoped authority;宿主派发面 →
|
|
45
|
+
- **`project-manager` 不是派发目标**:PM 是 primary-session 角色,无 subagent shell(规则家 → `mstar-roles/references/project-manager.md` § Plan-scoped authority;宿主派发面 → 当前宿主的 **`mstar-host` reference**(角色绑定 / 派发小节));scoped primary drive(`/iteration-drive --assignment | --workflow --plan | --resume`)在**主会话**启动 PM,不是 subagent。任何 `Execute as: project-manager` 的 invoke = 派发缺陷。
|
|
46
46
|
|
|
47
47
|
## 调度防串扰(强制;leaf executor 已在上方读过反递归红线,此处为完整规则供 PM/对照用)
|
|
48
48
|
|
|
49
49
|
- 只有 **`project-manager`** 可以决定增加/并行 subagent;承接方**默认不得二次分派**。
|
|
50
|
-
- **`Execute as: <role-id>`** = 承接方**亲自**完成本单,**不是**再起同名 subagent
|
|
50
|
+
- **`Execute as: <role-id>`** = 承接方**亲自**完成本单,**不是**再起同名 subagent 或嵌套同角色绑定字段的 Task(禁止**递归误派**)。
|
|
51
51
|
- 额外代理仅以 **`Delegation: allowed (...)`** 为准;未显式写时视为 **`Delegation: forbidden`**。
|
|
52
|
-
- Assignment 正文中的 role 引用:默认 **plain id**(`product-manager
|
|
52
|
+
- Assignment 正文中的 role 引用:默认 **plain id**(`product-manager`)。个别宿主会把堆叠的角色提及扩写成系统行——该宿主的 mention hygiene 规则见其 **`mstar-host` reference**。
|
|
53
53
|
- 承接方若判断必须增加 subagent,应先回报 **`Blocked`** 请 PM 重分派。
|
|
54
54
|
- Per-task informal review, when PM explicitly allows it, must not use `qc-specialist*`; use `code-reviewer` (generic fallback only when the role agent is absent on the host) or PM-marked informal `qa-engineer`. Formal QC remains `mstar-review-qc`.
|
|
55
55
|
|
|
@@ -64,7 +64,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
64
64
|
- **QC 单席(例外)**:`Execution mode: inline`(hotfix 等),或 Assignment 显式 `QC mode: single` / `QC mode: single — override: <reason>` → `qc-specialist` ×1,`N=1`,写 `{SDD_DIR}/review/qc.md`。
|
|
65
65
|
- **QC targeted re-review**:Assignment 含 **`QC re-review: targeted — reviewers: …`** 时,**N** = 所列席位数(1–3),同条消息发满 **N**。
|
|
66
66
|
- **先自检再发送**:发送前核对「Assignment 条数 = 本条消息中的实际 **派发** 调用条数」。
|
|
67
|
-
- **先自检字段再发送(与 count 同级门禁)**:核对**每条** invoke 都携带与 **`Execute as`**
|
|
67
|
+
- **先自检字段再发送(与 count 同级门禁)**:核对**每条** invoke 都携带与 **`Execute as`** 匹配的角色绑定字段——**字段名以当前宿主的 `mstar-host` reference 为准**(共享文本不假定任何宿主的字段名);宿主判定以 **`mstar-host`** §Detect active host 的 tool-shape 检测为准(禁以 config 路径/仓库内容判定)。**漏写或取默认通用值**(部分宿主会**静默回退 generic worker**、无报错)= **派发未完成**,与 paste-only(零 invoke)**同等级**:当场补齐重发,不得进入下一 gate。**N=1 顺序链(Review & Edit)不豁免**——count 门在 N=1 恒过,**字段门是唯一保护**。
|
|
68
68
|
- **前置步骤与派发回合分离(防串行 rollout)**:为派发准备的 **`bash` / `read` / `glob` / `grep`**(如 `merge-base`、`Review range`、`git rev-parse`)**不计入** `N` 次派发;可在上一条仅含准备的消息完成。准备完成后,**下一条派发消息**须**一次性**含 **`N` 次** Task / subagent invoke。**禁止**先发 `1` 次、等返回再补发其余 `N-1` 次。
|
|
69
69
|
- **未齐不发(emit zero until batch-ready)**:宿主支持批调用且需并发 `N≥2` 而当前 payload 只齐 `1` 条时,本条应发 **`0` 条派发 invoke`**(可继续 read/bash 补齐),**禁止**「先发一个顶一下」;`N` 份 payload 就绪后**单次消息发满 `N`**。见 **`mstar-host`** → `references/parallel-dispatch.md`(具备 invoke / Task / subagent 工具的宿主共用)。
|
|
70
70
|
|
|
@@ -72,7 +72,7 @@ description: Morning Star 派发与委派门禁 —— 仅 PM 可增派 subagent
|
|
|
72
72
|
|
|
73
73
|
在支持具名角色 / Task 的宿主上,`## Assignment` **正文不会**拉起子会话。PM 须在**同一条 assistant 消息**(或宿主等价机制)发出与 Assignment **条数一致**的 invoke / Task;仅打印 Markdown = **分派未完成**。**几条 Assignment ⇒ 几次 tool 调用**(默认同消息并行)。
|
|
74
74
|
|
|
75
|
-
> **Engine check (when available):** run `mstar dispatch validate <assignment-file> [--branch <branch>]` (or `import { validateAssignmentFields, assertDefaultBranchProtected } from "@mstar-harness/engine"` in a host hook) to validate the Assignment field contract and the default-branch gate (normative default-branch prose: **`mstar-branch-worktree`** SKILL.md § "Git 功能分支门禁(业务仓库)" — this skill covers dispatch mechanics only). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
75
|
+
> **Engine check (when available):** run `mstar dispatch validate <assignment-file> [--branch <branch>]` (or `import { validateAssignmentFields, assertDefaultBranchProtected } from "@mstar-harness/engine"` in a host hook) to validate the Assignment field contract — including the canonical **`Task budget (implement / ops rounds)`** header field on non-review / non-audit rounds: presence-only in the header region, absent / empty / `N/A` → validation fail (field guidance → `mstar-roles/references/project-manager/dispatch-and-assignment.md`; capacity criterion → `mstar-artifacts/references/plan-quality-bar.md` item 7) — and the default-branch gate (normative default-branch prose: **`mstar-branch-worktree`** SKILL.md § "Git 功能分支门禁(业务仓库)" — this skill covers dispatch mechanics only). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
76
76
|
|
|
77
77
|
## SDD implement 波次(PM only)
|
|
78
78
|
|
|
@@ -128,7 +128,7 @@ When **`Execution mode: sdd`** (`mstar-sdd`):
|
|
|
128
128
|
- Review-and-edit 链未完成即 commit integration 分支;PM 代做专业角色编辑而不 invoke。
|
|
129
129
|
- Phase 1 review-and-edit 链三角色并行派发,或未等上一角色返回即派发下一角色。
|
|
130
130
|
- Assignment 已写、invoke 为零(paste-only)却进入下一 gate。
|
|
131
|
-
- Task/subagent item
|
|
131
|
+
- Task/subagent item 漏写角色绑定字段(字段名与静默回退行为以当前宿主的 `mstar-host` reference 为准)⇒ **静默回退 generic worker**,却因 count=N 通过而误判「派发完成」;属 paste-only 同级的 **dispatch-incomplete**。N=1 顺序 Review-&-Edit 链最易在此漏字段。
|
|
132
132
|
|
|
133
133
|
## Workflow
|
|
134
134
|
|
|
@@ -32,7 +32,7 @@ description: Morning Star (启明星) harness **生命周期 / 授权语义权
|
|
|
32
32
|
|
|
33
33
|
## 最小交付循环
|
|
34
34
|
|
|
35
|
-
**per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement`(多 task 默认 SDD)→ plan QC tri + **QA gate**(`mandatory` 派 QA 或 `pm-acceptance`)→ Done(`inline` 单席例外)。阶段细则 → **`mstar-phase-gates`**;QA 分级 → **`mstar-roles/references/project-manager/qa-trigger-matrix.md
|
|
35
|
+
**per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement`(多 task 默认 SDD)→ plan QC tri + **QA gate**(`mandatory` 派 QA 或 `pm-acceptance`)→ Done(`inline` 单席例外)。阶段细则 → **`mstar-phase-gates`**;QA 分级 → **`mstar-roles/references/project-manager/qa-trigger-matrix.md`**。独立交付 development plan 在 Done 后继续交付尾段 `compound disposition → submit PR → merge-ready(resumable milestone)→ verify merge → terminal close/unregister/reconcile`(`verification/report-only` 按注册声明的替代完成政策,无强制 PR;注册与尾段语义/失败行为的权威 = 冻结契约 **`mstar-artifacts/references/plan-workflow-lifecycle-contract.md`**,PM 步骤序列 → **`mstar-roles/references/project-manager/plan-management.md`**)。迭代内 plan 行不各自走尾段,迭代整体走一次(见下行)。
|
|
36
36
|
|
|
37
37
|
**迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close → PR delivery → PR merge-ready loop`。细则 → **`mstar-iteration`**。
|
|
38
38
|
|
|
@@ -47,7 +47,7 @@ description: Morning Star (启明星) harness **生命周期 / 授权语义权
|
|
|
47
47
|
| **实现/审查/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-conventions`;**PM** 派 QC 前:`mstar-review-qc`;**`qc-specialist*`**:`mstar-roles` → `references/qc-specialist/`;`qa-engineer`:`references/qa-engineer/`;改 status/residual:`mstar-artifacts`;UI:`mstar-design-md`;知识库:`mstar-compound`(PM) |
|
|
48
48
|
| **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
|
|
49
49
|
|
|
50
|
-
Routing eval
|
|
50
|
+
Routing eval(宿主插件内回归用,**非**运行时必读)→ `.cursor/skills/mstar-routing-eval/`。
|
|
51
51
|
|
|
52
52
|
## 状态机
|
|
53
53
|
|
|
@@ -72,7 +72,7 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
|
|
|
72
72
|
| `docs` | `@product-manager` / `@architect` / `@writing-specialist` |
|
|
73
73
|
| `audit` | `@code-reviewer`(mstar-audit 承载;大型仓库经 Assignment `Delegation: allowed (scout/explore only, read-only)` 扇出只读 scout;read-only advisory;不进入状态机) |
|
|
74
74
|
|
|
75
|
-
**硬规则**:`quick` **从不**跳过 `specify → clarify → plan`;禁止把新 CLI/API/多模块/新测例标为 `quick`。已启用 `{HARNESS_DIR}` 时,首次 implement 前须有主 plan 路径 + `status.json` 登记(见 **`mstar-conventions`**)。
|
|
75
|
+
**硬规则**:`quick` **从不**跳过 `specify → clarify → plan`;禁止把新 CLI/API/多模块/新测例标为 `quick`。已启用 `{HARNESS_DIR}` 时,首次 implement 前须有主 plan 路径 + `status.json` 登记(见 **`mstar-conventions`**)。workflow 注册本身是 authorized domain operation(经授权 producer 的引擎原语,不自创第二注册机制),语义 → 冻结契约 `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`。
|
|
76
76
|
|
|
77
77
|
## `@explore` 边界
|
|
78
78
|
|
|
@@ -114,20 +114,12 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
|
|
|
114
114
|
|
|
115
115
|
## 宿主 `mstar-host`
|
|
116
116
|
|
|
117
|
-
Read **`mstar-host`** after this skill;
|
|
118
|
-
|
|
119
|
-
| 宿主 | 要点 |
|
|
120
|
-
|------|------|
|
|
121
|
-
| OpenCode | `question`、**task tool**(**subagent** 参数)→ `references/opencode.md` |
|
|
122
|
-
| Cursor | Task 并行 QC;Plan 双写 → `references/cursor.md` · `cursor-plan-mode-bridge.md` |
|
|
123
|
-
| Codex | plugin skills、sandbox/apply_patch/tool discovery;无 invoke 工具时不声称 subagent dispatch → `references/codex.md` |
|
|
124
|
-
| Kimi | `Agent`/`AgentSwarm`(仅 `coder`/`explore`/`plan`);角色绑定在 prompt(C5b);Plan 双写 → `references/kimi.md` · `kimi-plan-mode-bridge.md` |
|
|
125
|
-
| 其它 | 同 `mstar-host` skill;按工具信号选 reference |
|
|
117
|
+
Read **`mstar-host`** after this skill; it detects the active host and routes to the matching reference — host names, tool shapes and per-host entry details live only there(本表不重复维护)。
|
|
126
118
|
|
|
127
119
|
## 版本对齐(CLI ↔ host 插件)
|
|
128
120
|
|
|
129
121
|
- 全局 CLI 与已安装的宿主插件**独立升级**;版本漂移是已知故障源(skills/commands 与 CLI 预期不再匹配)。
|
|
130
|
-
- 检查:`mstar-harness doctor --target <host
|
|
122
|
+
- 检查:`mstar-harness doctor --target <host>`(各宿主 target 名 = `mstar-host` 检测表中该宿主的 id;已实现的宿主以 `mstar-host` 与 CLI `--help` 为准)。
|
|
131
123
|
- **CLI 较新** → 提示用户更新宿主插件;**插件较新** → 提示用户更新全局 CLI(`npm i -g @mstar-harness/cli@latest`)。
|
|
132
124
|
- 触发纪律:harness 行为异常/疑似过期、已知新版本发布后、或用户要求时运行——**不是**每个会话都跑。
|
|
133
125
|
|