@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
|
@@ -31,7 +31,7 @@ PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration worktree
|
|
|
31
31
|
**STOP**: 打印下方 checklist,且全部为 `[x]` 后,才可进入 §3.2 Compound。
|
|
32
32
|
|
|
33
33
|
- [ ] 所有 compass 中登记的 plan 在 workflow snapshot(`{WORKFLOW_DIR}/<id>/snapshot.json`)均为 `Done`
|
|
34
|
-
- [ ] 所有 plan 的 residual findings
|
|
34
|
+
- [ ] 所有 plan 的 residual findings 已按各自 Assignment `Findings cleanup` mode 收口:优先 empty register 条目(`projects/<id>/residuals.json` → `entries[<plan-id>]`);`allow-residual` 下已登记且披露的非阻断 open R# 可保持 open,`zero-residual` 下仅允许 blocker-defer + roadmap,或已 closed(`lifecycle` / `closed_at` / `closure_note`);任一 plan 有 unresolved `critical` → 不得通过本项(见 `mstar-artifacts` Findings cleanup modes)
|
|
35
35
|
- [ ] compass `## Plans` 表状态列已与 snapshot 同步
|
|
36
36
|
- [ ] 迭代 `## Acceptance Criteria` 已达成或显式豁免(compass 或对话记录原因)
|
|
37
37
|
- [ ] compass shape 已满足(frontmatter + `## Roadmap Position` + close 占位节)
|
|
@@ -65,7 +65,7 @@ PM 批量触发后须:
|
|
|
65
65
|
|
|
66
66
|
1. compass **YAML frontmatter**:`status: completed`,`end_date: YYYY-MM-DD`(必须;见 §3.0.5)
|
|
67
67
|
2. 更新 `{ITERATION_DIR}/README.md` 索引中该迭代行 Status 为 `completed`
|
|
68
|
-
3. 填充 compass `## Quality Gate Summary`、`## Compound Round Summary` 与 `## Iteration Retrospective (minimal)
|
|
68
|
+
3. 填充 compass `## Quality Gate Summary`、`## Compound Round Summary` 与 `## Iteration Retrospective (minimal)`(见模板);`## Quality Gate Summary` 须含 residual 披露 —— 每个 plan 的 open R# 清单(id + severity + 跟踪位置 + blocker-defer 标记;无 open 时写 `N/A — none open`;unresolved `critical` 仍阻断完成)
|
|
69
69
|
|
|
70
70
|
## 3.5 Close exit checklist + commit
|
|
71
71
|
|
|
@@ -76,7 +76,7 @@ PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git co
|
|
|
76
76
|
- [ ] §3.1 前置 gate 已打印并满足
|
|
77
77
|
- [ ] §3.2 compound 完成;**`<iteration-id>/` package 已盘点**(提升 / 保留 / 跳过已记入 Compound Summary);新增 knowledge doc 均已登记 `{KNOWLEDGE_DIR}/README.md`(或已记录无可结晶原因)
|
|
78
78
|
- [ ] §3.3 `## Roadmap Position` current iteration 已标 `delivered`;tracker / STRATEGY 已按需更新
|
|
79
|
-
- [ ] §3.4 frontmatter `status: completed` + `end_date`;Quality Gate Summary + Compound Summary + Retrospective 已填
|
|
79
|
+
- [ ] §3.4 frontmatter `status: completed` + `end_date`;Quality Gate Summary(含 open R# 披露:id + severity + 跟踪位置 + blocker-defer 标记;无 open 时 `N/A — none open`;unresolved `critical` 仍阻断)+ Compound Summary + Retrospective 已填
|
|
80
80
|
- [ ] 当前分支是 `spec_integration_branch`
|
|
81
81
|
- [ ] PR base = snapshot `branch.target`(`target_branch`,与 compass frontmatter 一致);**不是**未记录的 `main`
|
|
82
82
|
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
1. 打印 **`## Phase 4: PR delivery`**
|
|
10
10
|
2. Resolve target:snapshot `branch.target`(`target_branch`;compass frontmatter 镜像);缺失 → **STOP**,问用户
|
|
11
11
|
3. 创建 PR:`spec_integration_branch` → `target_branch`
|
|
12
|
-
4.
|
|
13
|
-
5.
|
|
12
|
+
4. PR 正文须含 residual 披露节:本迭代各 plan 的 open R# 清单(id + severity + 跟踪位置 + blocker-defer 标记;无 open 时写 `N/A — none open`)—— 职责 → **`mstar-artifacts`**「Findings cleanup modes」
|
|
13
|
+
5. 记录 PR URL / number(Phase 5 会话 SSOT)
|
|
14
|
+
6. **Immediately** 进入 **Phase 5** — **Phase 4 exit ≠ 迭代交付完成**
|
|
14
15
|
|
|
15
16
|
---
|
|
16
17
|
|
|
@@ -20,6 +20,8 @@ mstar status workflow-close --workflow <id> [--harness <path>] [--ended-at <date
|
|
|
20
20
|
|
|
21
21
|
- 引擎 `closeWorkflow`:在 snapshot 写锁内**重读最新快照** → identity/shape 校验 → 已 valid terminal 则 no-op;否则要求全部 plan 行 `Done` 且**无任何** `execution_lease` / `integration_merge_lease` → 写 `completed` + `ended_at`
|
|
22
22
|
- fail-loud:dangling lease / 非 `Done` 行 / snapshot 缺失或身份不符 → exit 1,**snapshot 字节不变**(无部分写)
|
|
23
|
+
- **`type: plan` 交付证据 consult**:写终态**前** engine 咨询已注册 delivery kind 的证据(`consultDeliveryEvidence`)——`development` 缺 compound 处置 / PR 身份 / 已核实合并记录(或 PR 的 `head`/`target` 不等于注册的 `branch.source`/`branch.target`),或 `verification/report-only` 缺其完成策略的履行记录 → `PHASE6_DELIVERY_*` 拒绝,snapshot 保持 `running`、根条目保持注册(字节不变、可恢复);补齐用 `mstar workflow evidence --workflow <id> --file <payload.json> [--session <path>]`(与 close 同一 coordinator-session 门、幂等;**PR 身份一次写入**,compound/merge 可覆写)。仅 `completed` close 咨询:`failed`/`stopped` 永不要求交付证据(§5)。write path 与 read-only `mstar iteration gate --phase 6` **共享同一实现**,两侧判定不走偏
|
|
24
|
+
- **kind 在注册期显式声明**(§1/§4a):`workflow register` / `audit promote --delivery-kind`(必填)/ `migrate --delivery-kind`(会产生 ACTIVE 无 kind plan 快照却缺 flag → exit 2;声明是**一个**交付身份,故一次 lift 若产生 2+ 个 ACTIVE standalone plan 同样以 exit 2 拒绝并列出 plan id —— 分批迁移,每批单 plan 声明)——绝不推断、绝不在代码内默认;`development` 需 `--branch-source`/`--branch-target`,`verification/report-only` 需 `--completion-policy`。历史遗留在 **ACTIVE** 无 kind 快照用 `mstar workflow evidence --workflow <id> --declare-kind <kind> [--branch-source <b> --branch-target <b> | --completion-policy <text>] [--session <path>]` 一次性修复(二次声明含同值一律拒绝、terminal 快照拒绝;supplied 锚只**填缺失**或与已注册锚同值复述,冲突值拒绝——已注册锚即交付身份,永不覆盖;legacy **terminal** 无 kind 死路按既有 owner amendment 路径)
|
|
23
25
|
- **禁止**为通过 close 释放 lease —— lease release 是独立的 owner 动作,close 从不释放(甚至 caller 自己的)
|
|
24
26
|
- `--ended-at` 省略时由 CLI 提供当天时间戳;引擎不接受自身时钟读数
|
|
25
27
|
|
|
@@ -39,7 +41,7 @@ mstar status workflow-close --workflow <id> [--harness <path>] [--ended-at <date
|
|
|
39
41
|
2. compass `## Plans` + `{ITERATION_DIR}/README.md` 索引
|
|
40
42
|
3. project roadmap / register
|
|
41
43
|
|
|
42
|
-
- **禁止**伪造 `Done` 行、**禁止**为对齐而 close open residual ——
|
|
44
|
+
- **禁止**伪造 `Done` 行、**禁止**为对齐而 close open residual —— reconciliation **不发明** Done/closed,也不为对齐关闭条目或放宽 `zero-residual` 规则;`allow-residual` 下已登记且披露的非阻断 open R# **保持 open**,不随 lifecycle 终结而“随之关闭”(真实 remaining finding 阻塞 `zero-residual` 交付,而不是被静默关闭)
|
|
43
45
|
- **禁止**把新 tracked 产品/文档 commit 夹带进 Phase 6 —— 新发现的产品修复另开授权 workflow
|
|
44
46
|
|
|
45
47
|
## §6.4 Cleanup handoff(最后一步;显式、不自动)
|
|
@@ -51,12 +53,13 @@ mstar status workflow-close --workflow <id> [--harness <path>] [--ended-at <date
|
|
|
51
53
|
- **lease 释放是手工 owner 动作、cleanup 范围外**:§6.1 close 已拒绝 dangling lease,但 cleanup 仍**从不**替 owner 释放——残留 lease 的候选只会得到 `cleanup.refuse.active-lease`;先手工释放,再重跑 dry-run/apply
|
|
52
54
|
- squash-merged 分支(tip 非 base 祖先)→ STOP → residual;禁止 `git branch -D`
|
|
53
55
|
|
|
54
|
-
Phase-6 gate 只查**本地 state**(valid terminal shape + 无 dangling lease + root
|
|
56
|
+
Phase-6 gate 只查**本地 state**(valid terminal shape + 无 dangling lease + root 条目已注销 + `type: plan` 交付证据,§6.1),**不**验证远端 merged 证据,**不**检查物理清理是否完成。
|
|
55
57
|
|
|
56
58
|
> **Engine check (when available):** run `mstar iteration gate --phase 6 --workflow <id>` (or `import { evaluatePostMergeClose } from "@mstar-harness/engine"` in a host hook) to gate the local post-merge close state(valid terminal shape + 无 dangling lease + root 条目已注销;稳定码 `PHASE6_*`;invalid/unreadable root 不是条目已注销的证明). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
57
59
|
|
|
58
60
|
## Standalone plans & abandonment
|
|
59
61
|
|
|
62
|
+
- 独立 plan 交付生命周期的语义权威(注册 → 交付尾段 → verified merge → terminal close)→ 冻结契约 `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`;本节仅固定 close 侧契约(同一命令 close、本地 gate 不验证远端 merged 证据)
|
|
60
63
|
- `type: plan` 独立 lifecycle 在其 PR merge 后用**同一** completed-close 命令关闭(无第二 verb、无 `--outcome` / `--force`)
|
|
61
64
|
- abandoned lifecycle **不得**静默跑 completed close:已 terminal(`failed` / `stopped`)的 snapshot 保持原状态,CLI 如实报告实际 status;completed close 只属于 verified-merged 完成
|
|
62
65
|
|
|
@@ -35,7 +35,7 @@ Scoped boot does **not** load `mstar-compound` or the Phase 3–6 detail files m
|
|
|
35
35
|
|
|
36
36
|
## 2. Scoped boot
|
|
37
37
|
|
|
38
|
-
1. **Load PM identity in the current primary session**: `mstar-harness-core` → `mstar-roles` → `references/project-manager.md`. No PM subagent is spawned or dispatched for any address form — PM runs in the **primary session** on every host(rule home → `mstar-roles/references/project-manager.md` § Plan-scoped authority;
|
|
38
|
+
1. **Load PM identity in the current primary session**: `mstar-harness-core` → `mstar-roles` → `references/project-manager.md`. No PM subagent is spawned or dispatched for any address form — PM runs in the **primary session** on every host(rule home → `mstar-roles/references/project-manager.md` § Plan-scoped authority;dispatch surface → the active host reference(`mstar-host`)§ C5).
|
|
39
39
|
2. **Bind once**, matching the form exactly:
|
|
40
40
|
|
|
41
41
|
```bash
|
|
@@ -177,3 +177,5 @@ The scoped route **requires** `mstar plan …`. Without it(engine/CLI absent o
|
|
|
177
177
|
## 11. Transport(optional)
|
|
178
178
|
|
|
179
179
|
Herdr / tmux (or any multiplexer) is only a way to open a terminal. It is **not** a prerequisite, dependency, ownership signal or session identity. Nothing in this route reads pane state, TTL or terminal labels to decide ownership.
|
|
180
|
+
|
|
181
|
+
Where the active host reference declares an optional skill-driven extra-primary launch protocol (its native opt-in, its bind/checkpoint/reserve/record calls, non-focus pane creation at the prepared worktree, the absolute `--assignment` submission and terminal uncertainty handling), **`mstar-host`** → that reference's Phase-2 section is the only home for those calls; this file defines none of them. The protocol stays optional there too and adds no load-order dependency here.
|
|
@@ -23,11 +23,12 @@ description: "Morning Star Spec-Driven 双阶段门禁:Prepare(`specify →
|
|
|
23
23
|
- **意图门禁**:锁 plan 前须能书面写清**真实目标 / 成功判据 / 非目标**三项;否则 Prepare 未通过。
|
|
24
24
|
- **长期方案优先**:默认先设计目标状态,再裁剪本轮可交付切片;不得以“临时方案 / 混合方案 / 以后再说”替代目标设计。
|
|
25
25
|
- **Durable Roadmap Gate**:若本轮只做部分范围,plan 必须写明 roadmap(批次、依赖、暂缓项、owner/触发条件、最终完成定义)。只有一句“后续再做 / next plan”视为未通过 plan gate。
|
|
26
|
+
- **Recall receipt(锁 plan 前)**:记录相关 knowledge/research 输入——复用与被否决策一并注明;无适用输入时**如实记空**。不做全库扫描、不发明知识;收据缺失不进入 plan lock。语义 → `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`。
|
|
26
27
|
|
|
27
28
|
### B. Execute:`plan(locked) → tasks → implement`
|
|
28
29
|
|
|
29
30
|
- **`plan(locked)`** — 冻结基线;实现中出现新约束时**先回写 plan 再继续**。
|
|
30
|
-
- **`tasks`** — 含依赖顺序、并行标记、完成判据;每任务可追踪到 plan、roadmap
|
|
31
|
+
- **`tasks`** — 含依赖顺序、并行标记、完成判据;每任务可追踪到 plan、roadmap 批次与验收标准。每任务还须满足单轮容量判据(声明 Effort band、单轮闭合其 Files 与验证门、写明 split point)→ **`mstar-artifacts/references/plan-quality-bar.md`** item 7(Task shape / session fit)。
|
|
31
32
|
- **并行标签**:≥2 条实现轨同时分派 → `Dispatch mode: parallel independent tracks`;同仓可写并发 → `Worktree isolation: required`(清单 **`mstar-branch-worktree`** → **`references/parallel-writable-pre-dispatch.md`**)。
|
|
32
33
|
- **`implement`** — 按 tasks 顺序执行;多 task plan **默认** `Execution mode: sdd`(`mstar-sdd`);hotfix 可 `inline`。完成进入 `InReview`;遵循 **`mstar-coding-behavior`**。
|
|
33
34
|
|
|
@@ -49,10 +50,10 @@ description: "Morning Star Spec-Driven 双阶段门禁:Prepare(`specify →
|
|
|
49
50
|
|
|
50
51
|
- **`plan locked`**
|
|
51
52
|
- 最小动作:在 plan 或 notes 记录当前锁定版本(日期或 hash)。
|
|
52
|
-
- **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review
|
|
53
|
+
- **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review 四问(每 task 可独立验证?依赖顺序清晰?无隐含假设?每 task 可单轮闭合其 Files 与验证门 — Task shape / session fit?→ **`mstar-artifacts/references/plan-quality-bar.md`** item 7)— 见 `mstar-artifacts/templates/plan.main.md` + **`mstar-artifacts/references/plan-quality-bar.md`**(自包含/验证门/STOP 条件/drift check/done criteria)。
|
|
53
54
|
- **`implement`**
|
|
54
55
|
- 最小产物:实现 diff、自检证据、回报与 handoff;行为准则 → **`mstar-coding-behavior`**;编辑纪律 → 上文「可验证编辑与上下文纪律」。
|
|
55
|
-
- **知识库 / 迭代 compass**:**默认**开工前扫 `{KNOWLEDGE_DIR}/README.md` 索引(若存在)并阅读与当轮相关的 **Active** 行(**即使 metadata 无 knowledge 链接**);若 `plans[].metadata` 登记了 `primary_spec` / `spec_refs` / `iteration_compass` / `iteration_refs`,所链接文档**仍须**阅读;两类阅读均须在回报中说明已对齐 → **`mstar-conventions`** · **`mstar-artifacts/references/knowledge-and-designs.md
|
|
56
|
+
- **知识库 / 迭代 compass**:**默认**开工前扫 `{KNOWLEDGE_DIR}/README.md` 索引(若存在)并阅读与当轮相关的 **Active** 行(**即使 metadata 无 knowledge 链接**);若 `plans[].metadata` 登记了 `primary_spec` / `spec_refs` / `iteration_compass` / `iteration_refs`,所链接文档**仍须**阅读;两类阅读均须在回报中说明已对齐 → **`mstar-conventions`** · **`mstar-artifacts/references/knowledge-and-designs.md`**。该 implement 时阅读是输入变化时的 re-alignment,不替代 Prepare 的锁前 recall receipt(见上文 Prepare `plan` 节)。
|
|
56
57
|
|
|
57
58
|
## 角色职责
|
|
58
59
|
|
|
@@ -72,7 +73,7 @@ per-plan 门禁通过后,PM 在**迭代层面**管理以下活动(不计入
|
|
|
72
73
|
- **迭代驱动**(`mstar-iteration` § Phase 2 Autonomous Execute):per-plan 派发循环(分支→实现→QC→**QA gate**→Done→合并),跨 plan 进度追踪,更新 compass 中各 plan 状态。
|
|
73
74
|
- **迭代收口**(`mstar-iteration` § Phase 3 iteration-close):迭代内所有 plan Done 后,执行一轮知识结晶(`mstar-compound`)沉淀迭代经验,更新 roadmap,标记迭代完成。
|
|
74
75
|
|
|
75
|
-
per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动,不影响 per-plan
|
|
76
|
+
per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动,不影响 per-plan 状态判定。此句不否定独立交付 plan 的 disposition 义务——它在交付 PR head 定稿前运行(迭代内 plan 行不各自触发);语义权威 → `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`。
|
|
76
77
|
|
|
77
78
|
> **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 iteration phase-transition gate (Phase 2 → 3 → 4) against the workflow snapshot when iteration-level activities above are reached — per-plan Prepare/Execute gate judgment stays prompt. On `fail` (gate-blocking violations) -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
78
79
|
|
|
@@ -93,10 +94,11 @@ per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动
|
|
|
93
94
|
8. Assignment 是否含 **`Task category`**(实现类任务)并与 Owner 一致?
|
|
94
95
|
9. 若中途出现 plan drift,是否先回写再继续?
|
|
95
96
|
10. 实现说明中是否体现"最小耐久切片 + 手术式改动 + 可验证检查"?
|
|
97
|
+
11. 每个任务是否满足容量判据:声明 Effort band、单轮闭合其 Files 与验证门、写明 split point(Task shape / session fit → `mstar-artifacts/references/plan-quality-bar.md` item 7)?
|
|
96
98
|
|
|
97
99
|
**任一项为「否」时,`Gate decision` 必须是 `blocked`**。
|
|
98
100
|
|
|
99
|
-
> 迭代级活动(compound / iteration-close)见 `mstar-iteration`;不属于 per-plan gate
|
|
101
|
+
> 迭代级活动(compound / iteration-close)见 `mstar-iteration`;不属于 per-plan gate 判定项。独立交付 plan 的 compound disposition 属交付尾段义务(PR head 定稿前),见 `mstar-harness-core`「最小交付循环」。
|
|
100
102
|
|
|
101
103
|
## Hotfix 例外
|
|
102
104
|
|
|
@@ -88,9 +88,9 @@ Register 文档形状(`entries[<plan-id>]` 数组 JSON)、**9 个必填字
|
|
|
88
88
|
|
|
89
89
|
### Findings cleanup(与 Assignment 联动)
|
|
90
90
|
|
|
91
|
-
- Assignment **`Findings cleanup: zero-residual | allow-residual`** 是唯一 mode 来源(`metadata.findings_cleanup` mirror 已删);迭代 Phase 2 默认 `
|
|
92
|
-
- `
|
|
93
|
-
- `
|
|
91
|
+
- Assignment **`Findings cleanup: zero-residual | allow-residual`** 是唯一 mode 来源(`metadata.findings_cleanup` mirror 已删);迭代 Phase 2 默认 `allow-residual`。
|
|
92
|
+
- `allow-residual`(默认):仅 unresolved **critical** 阻止 Approve;open R# 须在离 InReview 前登记 project register,且各决策面披露(id + severity + 跟踪位置;close 面另含 blocker-defer 标记)—— 登记与披露职责 → **`mstar-artifacts`**「Findings cleanup modes」。
|
|
93
|
+
- `zero-residual`(显式 opt-in):可修 findings 当轮 fix → re-review 清干净;仅真 blocker 可 defer 且须 Durable Roadmap + `target`(`critical` 不属 defer —— 定义 → **`mstar-artifacts`**「Findings cleanup modes」);`nit` 必须当场修或删;waived/risk-accepted 必须关闭,不得留 open。
|
|
94
94
|
- mode 全文与 enforcement → **`mstar-artifacts`** `references/status-and-residuals.md`(「Findings cleanup modes」+ 其 engine check)。
|
|
95
95
|
|
|
96
96
|
## Workflow
|
|
@@ -38,8 +38,8 @@ description: "Morning Star QC orchestration — **SDD mandatory plan QC tri-revi
|
|
|
38
38
|
## Residual Findings 留档门禁(PM)
|
|
39
39
|
|
|
40
40
|
- 先读 Assignment **`Findings cleanup`**(`plans[].metadata.findings_cleanup` mirror 已删——Assignment 是唯一 mode 来源)→ **`mstar-artifacts/references/status-and-residuals.md`**「Findings cleanup modes」。
|
|
41
|
-
- **`Findings cleanup: zero-residual
|
|
42
|
-
- **`Findings cleanup: allow-residual`**(standalone / hotfix / inline 默认):阻断项修复后仍有 **Warning / Suggestion** 或技术债 →
|
|
41
|
+
- **`Findings cleanup: zero-residual`**(显式 opt-in):可修 **Warning / Suggestion / Critical** → **fix-now + targeted re-review**,**禁止**把可修项登记为 open R# 或用 `Approve with residuals` 收口;**`nit`** 当场修或丢弃(无 R#)。仅 **真 blocker-defer**(外部依赖 / 须下轮产品决策 / 用户本轮显式 defer + Durable Roadmap)可登记 open R#(`decision: defer`)。此时 `Approve with residuals` **仅**允许剩余项全是该类 defer,且**不含 `critical`**(不安全后果本次 merge 可达,见上文「Findings cleanup modes」);`critical` 当场修复,或走显式 risk acceptance 并在 register 内关闭,**不得**作为批准遗留项。
|
|
42
|
+
- **`Findings cleanup: allow-residual`**(iteration Phase 2 / standalone / hotfix / inline 默认):阻断项修复后仍有 **Warning / Suggestion** 或技术债 → 必须留档,open R# 在离 InReview 前登记 register;**`Approve with residuals`** 仅当无 open **Critical**;PM 汇总结论与各报告面须披露 residual 清单 —— 每条含 id + severity + 跟踪位置(close 面另含 blocker-defer 标记;无 open 时 `N/A — none open`)。
|
|
43
43
|
- **`severity`** 仅允许 `mstar-artifacts/references/status-and-residuals.md` 枚举。
|
|
44
44
|
- **Open SSOT**:`{PROJECT_DIR}/<id>/residuals.json`(默认 `{HARNESS_DIR}/projects/<id>/`;无项目流程 `_default`)→ `entries[<plan-id>]`;PM 在 consolidated 决策分配 **R1…** 并写入。关闭 → 在 register 内 **in place** 置 `lifecycle` / `closed_at` / `closure_note`(v1 `archived/residuals/` 与 `archive-residuals` 已移除)。
|
|
45
45
|
- 主 plan 仅作人类索引;不得作为唯一 SSOT。
|
|
@@ -52,7 +52,7 @@ description: "Morning Star QC orchestration — **SDD mandatory plan QC tri-revi
|
|
|
52
52
|
|
|
53
53
|
## PM consolidated 门禁(摘要)
|
|
54
54
|
|
|
55
|
-
Leaf reviewers apply verdict per **`mstar-roles/references/qc-specialist/report-template.md`**. PM **`{SDD_DIR}/review/qc-consolidated.md`** synthesizes tri (or single-seat `qc.md`) into one gate decision for implement fix waves and QA gate, then records the durable summary in the main plan / workflow snapshot artifacts.
|
|
55
|
+
Leaf reviewers apply verdict per **`mstar-roles/references/qc-specialist/report-template.md`**. PM **`{SDD_DIR}/review/qc-consolidated.md`** synthesizes tri (or single-seat `qc.md`) into one gate decision for implement fix waves and QA gate, then records the durable summary in the main plan / workflow snapshot artifacts. The consolidated decision also discloses the residual situation — open list + each severity + tracking location (`N/A — none open` when none) — per the **`Findings cleanup`** duties (`mstar-artifacts`「Findings cleanup modes」).
|
|
56
56
|
|
|
57
57
|
### 覆盖语义(未提及 = 未审查)
|
|
58
58
|
|
|
@@ -66,7 +66,7 @@ Leaf reviewers apply verdict per **`mstar-roles/references/qc-specialist/report-
|
|
|
66
66
|
- **截断报告保留 verdict。** 席位因触达预算而声明 `Truncated coverage:` 时,其 verdict 有效,PM **不得**因此升级为 `Unconfirmed`——`Unconfirmed` 仍是证据通道失败态(见上条传导规则)。
|
|
67
67
|
- **未覆盖范围不改写门禁。** 席位 verdict 只涵盖其已审范围:当 Assignment 范围未被完整覆盖时,**gate decision 不得为 `Approve`**。PM 二选一——把未覆盖范围按 targeted re-review 重新派发(席位在预算内补完),或显式收窄 `Review range` 并把收窄依据记入 `qc-consolidated.md` 后再收敛。截断范围仍按「未提及 = 未审查」在 `qc-consolidated.md` 中如实标注 `unreviewed`,PM 不重审无关内容来补全它。
|
|
68
68
|
|
|
69
|
-
> **Engine check (when available):** run `mstar qc validate-report <report.md>` on each seat report (and `mstar dispatch validate <assignment-file>` for the Assignment-side round-bounding gate — `Budget` + `Return shape` on review / audit rounds; or `import { validateQcReport } from "@mstar-harness/engine"` in a host hook). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
69
|
+
> **Engine check (when available):** run `mstar qc validate-report <report.md>` on each seat report (and `mstar dispatch validate <assignment-file>` for the Assignment-side round-bounding gate — `Budget` + `Return shape` on review / audit rounds, plus the canonical **`Task budget (implement / ops rounds)`** capacity field on non-review / non-audit rounds; field guidance → `mstar-roles/references/project-manager/dispatch-and-assignment.md`; the review caps above are unchanged; or `import { validateQcReport } from "@mstar-harness/engine"` in a host hook). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
70
70
|
|
|
71
71
|
## 证据规则(PM · consolidated 输入)
|
|
72
72
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
| **L1** Implementer | dev subagent | Per task | Write code + affected unit evidence; non-executable docs/policy may use `scoped-check` | `task-N-brief.md` |
|
|
8
8
|
| **L2** Task reviewer | `code-reviewer` (default; generic fallback when the host agent list lacks it) — PM-dispatched subagent (SDD) | Per task, after implementer | Spec + quality for **one task** (diff-first; no full suite) | brief, report, **task-level** diff |
|
|
9
9
|
| **L3** Plan QC tri (cross-review) | `qc-specialist` + `qc-specialist-2` + `qc-specialist-3` | After **all** tasks on branch | **Code-review seat** — diff, language/logic, security & contract lenses on **the assigned change and directly affected interfaces**; **not** the test-execution path | Branch `review-package` MERGE_BASE..HEAD |
|
|
10
|
-
| **L4** QA | `qa-engineer` when **`QA gate: mandatory`**; else PM acceptance | After QC gate | DoD acceptance, residual verify, named affected **unit-test** verification only, Done recommendation | Review bundle + plan + **L1 evidence** +
|
|
10
|
+
| **L4** QA | `qa-engineer` when **`QA gate: mandatory`**; else PM acceptance | After QC gate | DoD acceptance, residual verify, named affected **unit-test** verification only, Done recommendation | Review bundle + plan + **L1 evidence** + project register |
|
|
11
11
|
|
|
12
12
|
PM sets **`QA gate`** per `mstar-roles/references/project-manager/qa-trigger-matrix.md`. L4 execution when dispatched → `mstar-roles/references/qa-engineer/acceptance-gate.md`.
|
|
13
13
|
|
|
@@ -25,6 +25,7 @@ Every leaf executor returns this template (only `**Agent**` and content fields c
|
|
|
25
25
|
**Artifacts**: ...
|
|
26
26
|
**Validation**: ...
|
|
27
27
|
**Issues/Risks**: ...
|
|
28
|
+
**Residuals disclosure**: <open R# list — id + severity + tracking location; `N/A — none open` when none>
|
|
28
29
|
**Plan Update**: ...
|
|
29
30
|
**Handoff**: ...
|
|
30
31
|
**Git**: ...
|
|
@@ -112,7 +112,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
|
|
|
112
112
|
**QA gate**: mandatory | pm-acceptance | report-only — see `references/project-manager/qa-trigger-matrix.md`
|
|
113
113
|
**QA gate reason**: <tier label, e.g. hotfix-inline | small-feature-clean-qc | mandatory-medium-feature>
|
|
114
114
|
**QA mode**: acceptance-only | targeted | report-only | N/A — required when `QA gate: mandatory` or `report-only`
|
|
115
|
-
**Findings cleanup**: zero-residual | allow-residual — **default `
|
|
115
|
+
**Findings cleanup**: zero-residual | allow-residual — **default `allow-residual` on formal iteration Phase 2** and for standalone `/pm`, hotfix, `Execution mode: inline`; `zero-residual` is the explicit opt-in override via compass or Assignment (Assignment wins; SSOT → `mstar-artifacts` Findings cleanup modes)
|
|
116
116
|
**Why this agent**: <role-fit>
|
|
117
117
|
**PM Task Board coverage**: <task ids>
|
|
118
118
|
**Roadmap / deferred scope**: <required when staged, partial, or temporary; otherwise N/A>
|
|
@@ -123,7 +123,8 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
|
|
|
123
123
|
- In: <owned files/symbols, directly affected interfaces; finding + fix delta for re-review>
|
|
124
124
|
- Out: <excluded work and specific boundary>
|
|
125
125
|
**Inputs**: <brief, diff, relevant knowledge, reusable evidence with original range>
|
|
126
|
-
**Budget (review / QC seats)**: <expansion cap (file opens / wall clock) — may only tighten the default in `mstar-harness-core` § 定向执行与验证边界, never loosen it; `N/A` on implement / ops rounds>
|
|
126
|
+
**Budget (review / QC seats)**: <expansion cap (file opens / wall clock) — may only tighten the default in `mstar-harness-core` § 定向执行与验证边界, never loosen it; `N/A` on implement / ops rounds — those rounds declare the distinct sibling **`Task budget (implement / ops rounds)`** field below>
|
|
127
|
+
**Task budget (implement / ops rounds)**: <one implementer round closing this task's declared Files list and verification gates, citing the task's `Effort (agent-oriented)` band (`mstar-conventions/references/effort-estimation.md`); required on every non-review, non-audit round — the exact complement of the review-seat `Budget` / audit-round fields above, so non-audit docs/Prepare specialists and orientation roles also declare it, and `writable: false` is not a capacity exemption; the engine check is presence-only on this header region before the body, not prose adequacy; a multi-session Effort band never authorizes a multi-round task — split per `mstar-artifacts/references/plan-quality-bar.md` item 7>
|
|
127
128
|
**Return shape (review / QC seats)**: <what the seat returns and how it stops — verdict + findings shape; a clean round returns `findings: []` explicitly instead of prose; `N/A` when the round produces no findings>
|
|
128
129
|
**Severity bar**: <what this round must treat as blocking — the blocking classes are unsafe-to-ship or significant tech debt; class definitions and the full report-section mapping → `mstar-artifacts` `references/status-and-residuals.md`; `N/A` on rounds with no findings>
|
|
129
130
|
**Input provenance**: <how the seat grounds its claims — the command plus observed output for a `declared` / `recorded` / `written` artifact claim, and provenance for an asserted `path:line` citation; `N/A` when the round asserts neither>
|
|
@@ -181,6 +182,7 @@ Do **not** waive worktree because default-gitignored `plans/` are missing under
|
|
|
181
182
|
**Artifacts**: ...
|
|
182
183
|
**Validation**: ...
|
|
183
184
|
**Issues/Risks**: ...
|
|
185
|
+
**Residuals disclosure**: <open R# list — id + severity + tracking location; `N/A — none open` when none>
|
|
184
186
|
**Plan Update**: ...
|
|
185
187
|
**Handoff**: narrative to `project-manager` (not auto-dispatch)
|
|
186
188
|
**Git**: <commit lines or N/A>
|
|
@@ -203,6 +205,7 @@ Do **not** waive worktree because default-gitignored `plans/` are missing under
|
|
|
203
205
|
**Blockers**: ...
|
|
204
206
|
**Decisions needed**: ...
|
|
205
207
|
**Evidence Snapshot**: ...
|
|
208
|
+
**Residuals disclosure**: <open R# list — id + severity + tracking location; `N/A — none open` when none>
|
|
206
209
|
**PM Acceptance**: <required block when QA gate: pm-acceptance before Done — see qa-trigger-matrix.md>
|
|
207
210
|
**Effort note (agent-oriented)**: ...
|
|
208
211
|
```
|
|
@@ -40,6 +40,20 @@ If legacy plan directories already exist, reuse them; avoid dual-structure dupli
|
|
|
40
40
|
- After each Completion Report: update status before next dispatch (`report-to-status` hard gate).
|
|
41
41
|
- On entering `InReview`: ensure review bundle path (`{SDD_DIR}/review/`) and aligned review metadata are set; write durable gate summaries back to the main plan/status artifacts.
|
|
42
42
|
- On `Done`: ensure residual lifecycle state is consistent (open vs archived).
|
|
43
|
+
- At plan commitment: register the workflow through the authorized producer (create-only snapshot + root `workflows[]` entry under one lock) and declare its delivery kind — `development`, or `verification/report-only` with its recorded completion policy:
|
|
44
|
+
```text
|
|
45
|
+
mstar workflow register --workflow <id> --plan-id <id> --plan-title <title> --plan-file <path>
|
|
46
|
+
--delivery-kind <development|verification/report-only> [--project <id>]
|
|
47
|
+
[--branch-source <branch> --branch-target <branch> | --completion-policy <text>]
|
|
48
|
+
[--started-at <ts>] [--harness <dir>]
|
|
49
|
+
```
|
|
50
|
+
The kind is declared here, never inferred (§1): `development` requires `--branch-source` + `--branch-target`, `verification/report-only` requires `--completion-policy`. The same `--delivery-kind` input is required by the specialized producers `audit promote` and (for the ACTIVE plan snapshots it lifts) `migrate` — and it is ONE delivery identity, so a `migrate` run whose lift creates 2+ ACTIVE standalone plans is refused (ids listed) and the tree migrates in batches of one declared plan. An **ACTIVE** `type: plan` snapshot that predates this (no registered kind — e.g. an old audit promotion or v1 lift) is repaired ONCE, before its close:
|
|
51
|
+
```text
|
|
52
|
+
mstar workflow evidence --workflow <id> --declare-kind <development|verification/report-only>
|
|
53
|
+
[--branch-source <branch> --branch-target <branch> | --completion-policy <text>] [--session <path>]
|
|
54
|
+
```
|
|
55
|
+
The declaration is one-time (a second one, even with the same kind, is refused) and refuses a terminal snapshot; a supplied `--branch-source`/`--branch-target` fills a MISSING anchor or restates the registered one — a value conflicting with an anchor the snapshot already carries is refused (the registered anchor is the delivery identity, never overwritten); delivery evidence itself is recorded with `mstar workflow evidence --workflow <id> --file <payload.json>` (PR identity recorded once; `head`/`target` must be the registered `branch.source`/`branch.target`).
|
|
56
|
+
- Delivery tail (standalone `development` plans, after Done): compound disposition (`created` / `updated` / reasoned `skipped`; review → **`mstar-compound`**) on the delivery branch before the PR head is finalized → submit PR with its identity (repo / head / target) recorded → merge-ready declared (resumable milestone; workflow stays registered) → PM-verified merge (provider evidence; never the close verb) → common close reusing the post-merge-close ordering (`mstar-iteration/references/phase-6-post-merge-close.md`). Stage semantics and failure behavior → frozen contract `mstar-artifacts/references/plan-workflow-lifecycle-contract.md`.
|
|
43
57
|
|
|
44
58
|
## PM Plan / Status NEVER
|
|
45
59
|
|
|
@@ -49,6 +63,7 @@ If legacy plan directories already exist, reuse them; avoid dual-structure dupli
|
|
|
49
63
|
## Stage Transitions
|
|
50
64
|
|
|
51
65
|
- Non-hotfix path: `specify -> clarify -> plan -> tasks -> implement -> InReview -> Done`
|
|
66
|
+
- Standalone development plans: row `Done` is not workflow completion — the delivery tail (see PM Responsibilities) runs to verified merge + terminal close before the workflow closes.
|
|
52
67
|
- Hotfix path may be compressed, but requires post-fix clarify/RCA follow-up note.
|
|
53
68
|
- New constraints during implement: write back to plan before continuing.
|
|
54
69
|
|
|
@@ -27,7 +27,7 @@ Set **`QA gate`** on the **first implement Assignment** (or plan frontmatter) an
|
|
|
27
27
|
| Small feature: non-UI, no open R#, QC clean `Approve` (not `Approve with residuals`) | `pm-acceptance` | N/A |
|
|
28
28
|
| Bug fix (RCA + regression scope; default route) | `mandatory` | `acceptance-only` |
|
|
29
29
|
| Medium / Large feature | `mandatory` | `acceptance-only` |
|
|
30
|
-
| `Approve with residuals` or any open R# in `
|
|
30
|
+
| `Approve with residuals` or any open R# in the project register (`{PROJECT_DIR}/<id>/residuals.json`) | `mandatory` | `acceptance-only` (includes R# verify) |
|
|
31
31
|
| UI-visible change (`Task category: visual` or observable evidence gate) | `mandatory` | `acceptance-only` (unit evidence; record unverified UI behavior for independent E2E) |
|
|
32
32
|
| High-risk ops | `mandatory` | `acceptance-only` (reuse ops evidence; named unit-test gaps only) |
|
|
33
33
|
| QA report-only primary route | `report-only` | `report-only` |
|
|
@@ -36,7 +36,7 @@ Set **`QA gate`** on the **first implement Assignment** (or plan frontmatter) an
|
|
|
36
36
|
|
|
37
37
|
**Upgrade rule:** If conditions change mid-round (e.g. QC becomes `Approve with residuals`, UI scope added, open R# registered), change `QA gate` from `pm-acceptance` to `mandatory` before `Done`.
|
|
38
38
|
|
|
39
|
-
**Findings cleanup note:**
|
|
39
|
+
**Findings cleanup note:** Only Assignment **`Findings cleanup: zero-residual`** (explicit opt-in) ties the plan to a clean QC `Approve` with **no open R#** — under it, a clean approval restores the small-feature `pm-acceptance` path when other tier rules allow. The default `allow-residual` carries registered residuals, and any open R# (either mode, even blocker-defer) still forces **`QA gate: mandatory`** like the residual row above. See `mstar-artifacts` Findings cleanup modes.
|
|
40
40
|
|
|
41
41
|
## PM acceptance checklist (required before `Done` when `QA gate: pm-acceptance`)
|
|
42
42
|
|
|
@@ -44,7 +44,7 @@ PM completes this in **Status Update** (or plan closure note). PM **does not** r
|
|
|
44
44
|
|
|
45
45
|
1. **QC verdict:** `{SDD_DIR}/review/qc-consolidated.md` or `{SDD_DIR}/review/qc.md` shows `Approve` with **Critical = 0** and **Warning = 0** (not `Approve with residuals`), and the main plan has a durable gate summary.
|
|
46
46
|
2. **DoD mapping:** Each plan Acceptance Criterion maps to **existing** evidence (dev Completion Report, SDD test triple or applicable scoped-check, CI links; QC report for review verdict/findings only) — cite paths/commands, do not re-execute.
|
|
47
|
-
3. **Residuals:** `
|
|
47
|
+
3. **Residuals:** the project register `{PROJECT_DIR}/<id>/residuals.json` → `entries[<plan-id>]` has **no open R#** for this `plan_id` (or documented waiver per `mstar-artifacts`).
|
|
48
48
|
4. **Checkout alignment:** `Working branch` and `Review range / Diff basis` match QC report verified lines.
|
|
49
49
|
5. **`QA gate reason`:** One line naming the tier (e.g. `hotfix-inline`, `small-feature-clean-qc`).
|
|
50
50
|
|
|
@@ -49,7 +49,7 @@ Use this reference when PM is dispatching QC, consolidating review verdicts, or
|
|
|
49
49
|
|
|
50
50
|
**Decision**: Approve | Request Changes | Needs Discussion | Unconfirmed
|
|
51
51
|
**Blocking Items**: {list or None}
|
|
52
|
-
**Residual Findings**: {
|
|
52
|
+
**Residual Findings**: {each open item: id + severity + tracking location + owner/target date, or `N/A — none open`}
|
|
53
53
|
**Assigned Fix Owners**: {role list}
|
|
54
54
|
**Next Step**: {back to dev fix | to QA verification}
|
|
55
55
|
```
|
|
@@ -65,7 +65,7 @@ Use this reference when PM is dispatching QC, consolidating review verdicts, or
|
|
|
65
65
|
|
|
66
66
|
Read Assignment **`Findings cleanup`** first (`mstar-artifacts` — Findings cleanup modes).
|
|
67
67
|
|
|
68
|
-
### When `Findings cleanup: zero-residual`
|
|
68
|
+
### When `Findings cleanup: zero-residual` (explicit opt-in)
|
|
69
69
|
|
|
70
70
|
- Prefer **fix-now + targeted re-review** for Critical / Warning / Suggestion that can be fixed this session.
|
|
71
71
|
- **NEVER** park fixable findings as open R# or use `Approve with residuals` for them.
|
|
@@ -73,14 +73,16 @@ Read Assignment **`Findings cleanup`** first (`mstar-artifacts` — Findings cle
|
|
|
73
73
|
- `nit`: fix or drop (no R#).
|
|
74
74
|
- Plan Done: prefer empty open list; any remaining open R# must all be blocker-defer + roadmap — never a `critical` (`mstar-artifacts` Findings cleanup modes).
|
|
75
75
|
|
|
76
|
-
### When `Findings cleanup: allow-residual` (
|
|
76
|
+
### When `Findings cleanup: allow-residual` (default)
|
|
77
77
|
|
|
78
|
-
When blocking issues are fixed but non-blocking warnings/suggestions remain:
|
|
78
|
+
The default mode (iteration Phase 2 included; `zero-residual` is the explicit opt-in). When blocking issues are fixed but non-blocking warnings/suggestions remain:
|
|
79
79
|
|
|
80
|
-
- Must register residual findings (do not leave as chat-only).
|
|
80
|
+
- Must register residual findings in the project register before the plan leaves InReview (do not leave as chat-only).
|
|
81
81
|
- Severity enum must follow `mstar-artifacts` SSOT.
|
|
82
82
|
- Canonical store: `{PROJECT_DIR}/<id>/residuals.json` (default `{HARNESS_DIR}/projects/<id>/`; project-less flows `_default`) -> `entries[<plan-id>]`.
|
|
83
83
|
- Required durable gate summary in main plan should list R# ids and decisions, but never replace canonical entries.
|
|
84
|
+
- Every consolidated QC decision, Completion Report, and Status Update discloses the residual situation — the list, each entry's severity, and its tracking location (`N/A — none open` when none). Silence about open residuals is a gate violation.
|
|
85
|
+
- Close-time artifacts (main plan `## Review Gate Summary`, compass `## Quality Gate Summary`, PR body) carry the same list plus a blocker-defer flag; a close without these disclosures is not a close. Disclosure never closes entries and never overrides critical blocking or explicit `zero-residual` rules.
|
|
84
86
|
|
|
85
87
|
Each residual record should include:
|
|
86
88
|
|
|
@@ -4,7 +4,7 @@ Before any non-trivial PM action, read in order:
|
|
|
4
4
|
|
|
5
5
|
1. `mstar-harness-core` (entry, state machine, Task category, skill index)
|
|
6
6
|
2. `mstar-dispatch-gates` + `mstar-phase-gates` (dispatch + Prepare/Execute gates)
|
|
7
|
-
3. Host adapter:
|
|
7
|
+
3. Host adapter: **`mstar-host`** (detect the active host; then Read the reference that detection resolves to)
|
|
8
8
|
4. `mstar-conventions` (path discovery, init, Spec branch summary)
|
|
9
9
|
5. `mstar-review-qc` (same coordination round, **before** any QC dispatch)
|
|
10
10
|
6. **`mstar-sdd`** when implement uses **`Execution mode: sdd`**
|
|
@@ -29,7 +29,7 @@ Detailed procedures are moved to `references/project-manager/*.md`.
|
|
|
29
29
|
|
|
30
30
|
### Plan-scoped authority (bounded)
|
|
31
31
|
|
|
32
|
-
- **PM never runs as a subagent**(**single home for this rule** — `mstar-dispatch-gates` § Plan 作用域与 credential 不下发, `project-manager/dispatch-and-assignment.md` and `mstar-iteration/references/plan-scoped-pm.md` §2 point here). PM is the **primary-session** seat on every host: no `project-manager` **subagent shell** ships in any tracked shell surface
|
|
32
|
+
- **PM never runs as a subagent**(**single home for this rule** — `mstar-dispatch-gates` § Plan 作用域与 credential 不下发, `project-manager/dispatch-and-assignment.md` and `mstar-iteration/references/plan-scoped-pm.md` §2 point here). PM is the **primary-session** seat on every host: no `project-manager` **subagent shell** ships in any tracked shell surface, and no host's role-binding field may ever target `project-manager` — a primary seat is not a dispatch target(per-host seat / shell forms → the active `mstar-host` reference, role-binding and dispatch section). A **leaf** that receives `pm` / `project-manager` / `iteration-drive` wording (role name, handoff prose, `QA gate` field, routing table, multi-track narrative) is **not** being promoted: the leaf stays inside its own task, reports the mismatch, and does **not** dispatch, invoke, or absorb PM scope (`mstar-dispatch-gates` § role boundary / anti-recursion).
|
|
33
33
|
- **Scope is inherited, never self-expanded.** Every child Assignment inherits its parent's plan scope. A child may not select or prepare a plan, mutate the workflow snapshot / root register / shared indexes, release leases, or open PR / close phases — only its own task and its declared write paths.
|
|
34
34
|
- **Scoped primary drive**(`/iteration-drive --assignment|--workflow/--plan|--resume`)runs **in the primary session** (never as a subagent): `mstar plan bind` → `show`, then the session is bounded to that plan's writable surface — no sibling rows, no lifecycle anchors, no Phase 3–6, and its finish is a **handoff**, not `Done` → **`mstar-iteration/references/plan-scoped-pm.md`**.
|
|
35
35
|
|
|
@@ -101,7 +101,7 @@ Detailed conflict priority and dev allocation:
|
|
|
101
101
|
|
|
102
102
|
## Host Dispatch Rule (Critical)
|
|
103
103
|
|
|
104
|
-
In invoke-based hosts (
|
|
104
|
+
In invoke-based hosts (any host whose active reference exposes a callable invoke / delegation tool):
|
|
105
105
|
|
|
106
106
|
- Assignment markdown alone is not dispatch.
|
|
107
107
|
- Each independent Assignment needs one matching invoke.
|
|
@@ -110,8 +110,7 @@ In invoke-based hosts (OpenCode / Cursor Task / Codex with callable multi-agent
|
|
|
110
110
|
|
|
111
111
|
Host invoke/dispatch details: `mstar-host` → active host reference and `references/parallel-dispatch.md`.
|
|
112
112
|
|
|
113
|
-
**
|
|
114
|
-
|
|
113
|
+
**Native-workflow hosts:** when the active host reference declares a native workflow driver instead of a goal loop, iteration progress is that workflow (workflow snapshot phases + dispatch gates + child **settle notifications**), never a goal-round loop. Phase 2 progression is then the **`Rescheduling checkpoint`** (a child settle is a `result-settled` one): dispatch the ready independent work before any wait; waiting is right when a dispatched child already owns that work — **never** a duplicate unit of work against the same worktree. Procedure → `mstar-iteration` `references/phase-2-worktree-lease.md` §2.4; host declaration and its per-step rules → the active `mstar-host` reference.
|
|
115
114
|
Dispatch mechanics and templates:
|
|
116
115
|
`references/project-manager/dispatch-and-assignment.md`.
|
|
117
116
|
|
|
@@ -157,14 +156,16 @@ If any item below matches, fix the dispatch/plan state or mark `Blocked`—do **
|
|
|
157
156
|
|
|
158
157
|
### PM entry sessions
|
|
159
158
|
|
|
160
|
-
|
|
159
|
+
Entry spellings differ per host — the active `mstar-host` reference owns them (its PM entry / skill loading section: command form, skill invocation form, session auto-load behavior). This table carries the routing only.
|
|
160
|
+
|
|
161
|
+
| Entry surface | Next reads |
|
|
161
162
|
|-------|------------|
|
|
162
|
-
| **`/pm`** or **`pm
|
|
163
|
-
|
|
|
164
|
-
|
|
|
163
|
+
| Host ships a **`/pm`** command or exposes this **`pm`** skill | This shim → **`project-manager.md`** § Required Reading + topic skills on demand |
|
|
164
|
+
| Host iteration `commands/` (where shipped) | Command Boot + **`project-manager.md`** — iteration lifecycle only; **not** required for ordinary per-plan PM |
|
|
165
|
+
| Host with no command entry | `project-manager` + `mstar-host` → the active host reference |
|
|
165
166
|
| **`/iteration-drive --assignment` / `--workflow --plan` / `--resume`**(scoped primary) | **`mstar-iteration/references/plan-scoped-pm.md`** — bind → `show` → constrain to the returned scope; finish = handoff; coordinator sequence for accept/integration/complete |
|
|
166
167
|
|
|
167
|
-
**Dispatch-first**, iteration branch policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`), Autonomous Execute → **`mstar-iteration/references/phase-2-worktree-lease.md
|
|
168
|
+
**Dispatch-first**, iteration branch policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`), Autonomous Execute → **`mstar-iteration/references/phase-2-worktree-lease.md`**;Phase 2 的 **`Rescheduling checkpoint`**(何时重新评估可派发 work、五个冻结 reason、wait reason)→ 该文件 §2.4。Routing, gates, Task Board, QC, templates → this file + topic `mstar-*` skills.
|
|
168
169
|
|
|
169
170
|
---
|
|
170
171
|
|
|
@@ -302,7 +303,7 @@ Minimum invariants:
|
|
|
302
303
|
- User conversation follows user language.
|
|
303
304
|
- PM Assignment body can be Chinese by default.
|
|
304
305
|
- Technical artifacts/reports/code/config/commit messages default to English unless user asks otherwise.
|
|
305
|
-
- Keep **all role references** as plain role id (no `@`) in Assignment body — including `Execute as`, routing narrative, `QA gate`, and anti-pattern examples.
|
|
306
|
+
- Keep **all role references** as plain role id (no `@`) in Assignment body — including `Execute as`, routing narrative, `QA gate`, and anti-pattern examples. On an invoke-based host the Assignment role reaches that host's role-binding field (field name and mention hygiene → the active `mstar-host` reference).
|
|
306
307
|
|
|
307
308
|
---
|
|
308
309
|
|
|
@@ -42,6 +42,8 @@ Batch all findings for the human in one message. If clean, proceed silently.
|
|
|
42
42
|
|
|
43
43
|
Dispatch independent ready tasks concurrently after L2 worktree isolation. Keep one canonical per-plan `{SDD_DIR}`. PM alone writes its `context.json`, `progress.md` and workflow snapshot; prepare context-dependent helper outputs serially. Each writable track has its own worktree/branch and immutable task-specific absolute brief/report/diff paths. Artifact subdirectories are namespaces inside that SDD root, never a second SDD root. Parallel leaves use the supplied paths directly and do not invoke shared-context helpers or read mutable context to choose their checkout; never share a writable session or `implementer-session.json`. Use **fresh** implementers for parallel tasks. Serialize only actual dependencies, overlapping write ownership, one sticky session, and integration merges; state the dependency when serializing. A task reviewer may run alongside an unrelated ready implementer. PM alone reconciles reports into the shared `progress.md` and workflow snapshot.
|
|
44
44
|
|
|
45
|
+
**Rescheduling checkpoint:** a running background task is never a reason to stop scheduling. Re-run this ready-task check at the Phase-2 checkpoints named in **`mstar-iteration/references/phase-2-worktree-lease.md` §2.4** — that file is the single authoritative home for the five checkpoint names and their reason vocabulary, and they are deliberately not re-listed here — and start every authorized independent ready task before waiting for an unrelated running task or plan. Waiting is valid only when nothing useful is ready: state the wait reason once and do not re-check or remind on unchanged facts.
|
|
46
|
+
|
|
45
47
|
**Scope and credential boundary:** each task brief carries the **inherited plan scope** (plan id + absolute `SDD dir` / brief / report / diff paths) — a leaf never selects or prepares a plan, writes the workflow snapshot / root register / shared indexes, or releases leases. Session JSON, `mstar plan --session` write credentials, and `--expect <revision>` stay with the PM/coordinator and are **never** handed to an implementer or reviewer (`mstar-iteration/references/plan-scoped-pm.md` §8).
|
|
46
48
|
|
|
47
49
|
**Dependent-task readiness:** review approval alone does not make a prerequisite available. PM serially integrates the reviewed prerequisite commits, then creates or updates the idle dependent worktree from that integrated state before recording its `BASE_SHA` and dispatching. For each required reviewed commit, record `git -C "$FEATURE_CWD" merge-base --is-ancestor <prerequisite-sha> <BASE_SHA>` with exit 0; a missing commit blocks only that dependent task. Do not move an active task's base; independent ready tasks continue concurrently.
|
|
@@ -52,6 +54,7 @@ Dispatch independent ready tasks concurrently after L2 worktree isolation. Keep
|
|
|
52
54
|
2. `mstar sdd workspace <plan-id>` → `SDD_DIR`(iteration L1 从 feature cwd 调用时:`MSTAR_CONTROL_ROOT=<main-repo-root>`(= **Git 派生的主 worktree 根**;先完成派生验证,fail-closed 守卫在其后)或 `mstar sdd workspace <plan-id> <main-repo-root>`;显式值必须与派生主根 canonicalize 一致,integration/外来检出被拒而非静默重定向;probe 以 v2 根 `status.json`(`workflows[]`)或 workflow snapshot 存在为准,linked worktree 缺文件会 fail closed)
|
|
53
55
|
3. `mstar sdd task-brief <plan> N` → brief file
|
|
54
56
|
4. Dispatch implementer:
|
|
57
|
+
- Copy the plan task's budget into the Assignment header field **`Task budget (implement / ops rounds)`** (canonical template → `mstar-roles/references/project-manager/dispatch-and-assignment.md`; one-round capacity criterion → `mstar-artifacts/references/plan-quality-bar.md` item 7) — header region only, before the body markers
|
|
55
58
|
- **`SDD implementer session: fresh`** (default) — new subagent; templates: `references/implementer-prompt.md`
|
|
56
59
|
- **`SDD implementer session: sticky`** — first task: same as fresh + write `{SDD_DIR}/implementer-session.json` with `host_agent_id`; later tasks: host **resume** + `references/implementer-continuation-prompt.md` (see **`references/sticky-implementer-session.md`**)
|
|
57
60
|
5. On `DONE`: `mstar sdd review-package BASE HEAD` → diff file
|
|
@@ -72,8 +75,8 @@ Detail: **`references/file-handoffs.md`**.
|
|
|
72
75
|
|--------|-----------|
|
|
73
76
|
| DONE | review-package → task reviewer |
|
|
74
77
|
| DONE_WITH_CONCERNS | read concerns; fix scope issues before review |
|
|
75
|
-
| NEEDS_CONTEXT | provide context; re-dispatch |
|
|
76
|
-
| BLOCKED | more context, higher tier, split task, or escalate human — **never** same-model blind retry |
|
|
78
|
+
| NEEDS_CONTEXT | provide context; re-dispatch. Budget overrun (the declared round cannot close its Files and gates) → split the task per `mstar-artifacts/references/plan-quality-bar.md` item 7 and re-dispatch with a fresh budget |
|
|
79
|
+
| BLOCKED | more context, higher tier, split task, or escalate human — **never** same-model blind retry. Budget overrun → split the task per `mstar-artifacts/references/plan-quality-bar.md` item 7 and re-dispatch with a fresh budget |
|
|
77
80
|
|
|
78
81
|
## Reviewer ⚠️ items
|
|
79
82
|
|
|
@@ -7,6 +7,7 @@ Dispatch:
|
|
|
7
7
|
Resume: [HOST_AGENT_ID from implementer-session.json]
|
|
8
8
|
Name: <CamelCaseId> # omp/Cursor name
|
|
9
9
|
Model: [same tier as session start unless PM upgrades]
|
|
10
|
+
Assignment header: canonical fields (`mstar-roles/references/project-manager/dispatch-and-assignment.md`) — MUST include **`Task budget (implement / ops rounds)`**: <budget copied from THIS plan task> in the header region, before the first Task heading / horizontal rule / `#` heading of the body; a `Task budget` string only inside the body section cannot satisfy the engine header gate, and a previous task's budget is not inherited as authorization for this task
|
|
10
11
|
Prompt body:
|
|
11
12
|
<SUBAGENT-STOP> Skip PM orchestration skills. You are a leaf implementer continuing a sticky SDD session.</SUBAGENT-STOP>
|
|
12
13
|
|
|
@@ -37,12 +38,14 @@ Dispatch:
|
|
|
37
38
|
|
|
38
39
|
## Report file
|
|
39
40
|
|
|
40
|
-
Write your full report to: [REPORT_FILE]
|
|
41
|
+
Write your full report to: [REPORT_FILE] — follow the fresh implementer prompt's report format (`implementer-prompt.md` § Report format), including the residuals-disclosure row.
|
|
41
42
|
|
|
42
43
|
## Scope and stop
|
|
43
44
|
|
|
44
45
|
Use only the brief's owned files, relevant inputs and named checks. Do not restart global exploration, extend the task, or run local full suites without the user's explicit scoped permission. Reuse unaffected evidence. Stop once the assigned acceptance criteria are evidenced; report concrete missing context instead of over-analyzing settled work.
|
|
45
46
|
|
|
47
|
+
**Task budget / overrun**: the resumed Assignment header declares **`Task budget (implement / ops rounds)`** for THIS task — one implementer round closing its Files and verification gates (value copied from the plan task; a previous task's budget is not inherited as authorization for this task — a continuation is not an automatic budget extension). The value is validated in the header region only, so a `Task budget` string inside this body section cannot satisfy the engine header gate. If the declared round cannot close its Files and verification gates, stop adding work and return `NEEDS_CONTEXT` or `BLOCKED` — persist on disk the completed steps, the remaining implementation and its pending checks, evidence paths, worktree/branch state, and the concrete boundary reached; an incomplete round never reports `DONE` / `DONE_WITH_CONCERNS` as a substitute for the remaining work. **Budget pressure MUST NOT shorten or waive any assigned scoped verification.** Split/re-dispatch authority → `mstar-artifacts/references/plan-quality-bar.md` item 7.
|
|
48
|
+
|
|
46
49
|
## Your job
|
|
47
50
|
|
|
48
51
|
1. Implement exactly what this brief specifies (prior tasks are done)
|
|
@@ -9,6 +9,7 @@ Dispatch:
|
|
|
9
9
|
Role: <Execute as role-id> # omp agent / Cursor subagent_type / OpenCode subagent → mstar-host C5
|
|
10
10
|
Name: <CamelCaseId> # omp/Cursor name
|
|
11
11
|
Model: [REQUIRED — per Model tier in Assignment and mstar-sdd SKILL]
|
|
12
|
+
Assignment header: canonical fields (`mstar-roles/references/project-manager/dispatch-and-assignment.md`) — MUST include **`Task budget (implement / ops rounds)`**: <budget copied from the plan task> in the header region, before the first Task heading / horizontal rule / `#` heading of the body; a `Task budget` string only inside the body section cannot satisfy the engine header gate
|
|
12
13
|
Prompt body:
|
|
13
14
|
<SUBAGENT-STOP> Skip PM orchestration skills. You are a leaf implementer.</SUBAGENT-STOP>
|
|
14
15
|
|
|
@@ -47,6 +48,8 @@ Dispatch:
|
|
|
47
48
|
|
|
48
49
|
Use only the brief's owned files, relevant inputs and named checks. Do not restart global exploration, extend the task, or run local full suites without the user's explicit scoped permission. Reuse unaffected evidence. Stop once the assigned acceptance criteria are evidenced; report concrete missing context instead of over-analyzing settled work.
|
|
49
50
|
|
|
51
|
+
**Task budget / overrun**: the Assignment header above declares **`Task budget (implement / ops rounds)`** — one implementer round closing this task's Files and verification gates (value copied from the plan task; validated in the header region only, so a `Task budget` string inside this body section cannot satisfy the engine header gate). If the declared round cannot close its Files and verification gates, stop adding work and return `NEEDS_CONTEXT` or `BLOCKED` — persist on disk the completed steps, the remaining implementation and its pending checks, evidence paths, worktree/branch state, and the concrete boundary reached; an incomplete round never reports `DONE` / `DONE_WITH_CONCERNS` as a substitute for the remaining work. **Budget pressure MUST NOT shorten or waive any assigned scoped verification.** Split/re-dispatch authority → `mstar-artifacts/references/plan-quality-bar.md` item 7.
|
|
52
|
+
|
|
50
53
|
## Your job
|
|
51
54
|
|
|
52
55
|
1. Implement exactly what the brief specifies
|
|
@@ -66,5 +69,6 @@ Dispatch:
|
|
|
66
69
|
- Verification: affected test files, command, actual output (red/green for executable bug fixes), OR the complete scoped-check block from file-handoffs.md for non-executable docs/policy
|
|
67
70
|
- Reused evidence: original range and reason it remains applicable
|
|
68
71
|
- Files changed
|
|
72
|
+
- Residuals disclosure: open R# list — id + severity + tracking location (`N/A — none open` when none); duty → `mstar-artifacts` Findings cleanup modes
|
|
69
73
|
- Self-review notes
|
|
70
74
|
```
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pm
|
|
3
|
-
description: "PM entry shim — force project-manager orchestration when user invokes /pm or this skill
|
|
3
|
+
description: "PM entry shim — force project-manager orchestration when the user invokes /pm or this skill. General per-plan PM work: this skill + project-manager.md. Formal iteration lifecycle: mstar-iteration (host commands/ may orchestrate Phase 1–5). Boot, routing, dispatch SSOT → mstar-roles/references/project-manager.md and topic mstar-* skills — not here. Host entry spelling → the active mstar-host reference."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PM (entry shim)
|
|
@@ -9,14 +9,13 @@ description: "PM entry shim — force project-manager orchestration when user in
|
|
|
9
9
|
|
|
10
10
|
## Host entry
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
Entry spelling differs per host; the **active `mstar-host` reference** owns it (command form, skill invocation form, session auto-load behaviour, iteration command names). This table keeps the routing only.
|
|
13
|
+
|
|
14
|
+
| Entry surface | Use |
|
|
13
15
|
|------|-----|
|
|
14
|
-
|
|
|
15
|
-
|
|
|
16
|
-
|
|
|
17
|
-
| **Kimi** | **`/skill:pm`** or this skill → **`project-manager`**; iteration → plugin **`commands/`** (`/morning-star-harness:iteration-*`) |
|
|
18
|
-
| **ZCode** | **`/morning-star-harness:pm`** or **`/skill:pm`** → **`project-manager`** (no session auto-load) |
|
|
19
|
-
| **omp** | **`/skill:pm`** or this skill → **`project-manager`**; iteration → **`/iteration-start`** · **`/iteration-drive`** · **`/iteration-loop`** (filename commands) |
|
|
16
|
+
| Host ships a **`/pm`** command or exposes this **`pm`** skill | → **`project-manager`** for the session (general PM orchestration: single-plan, hotfix, QC waves, dispatch) |
|
|
17
|
+
| Host with no command entry | Same route: **`project-manager`** via `mstar-roles` → `references/project-manager.md` |
|
|
18
|
+
| Formal iteration (host **`commands/`** where shipped) | Phase 1–5 sequencing by the host commands — **without** an iteration the shim still serves ordinary per-plan PM |
|
|
20
19
|
|
|
21
20
|
**Iteration lifecycle** (optional): host `commands/` may sequence Phase 1–5; semantics SSOT → **`mstar-iteration`**. Not required for ordinary PM work.
|
|
22
21
|
|
|
@@ -24,7 +23,7 @@ description: "PM entry shim — force project-manager orchestration when user in
|
|
|
24
23
|
|
|
25
24
|
**Codebase audit** (optional): `/codebase-audit` command → **`mstar-audit`** — read-only codebase survey producing prioritized, self-contained improvement plans. Output feeds iteration-start §1 Research or normal Prepare → Execute. Dispatched by PM under `Task category: audit`.
|
|
26
25
|
|
|
27
|
-
Detect host → **`mstar-host`** →
|
|
26
|
+
Detect host → **`mstar-host`** → the reference that detection resolves to (per-host entry, tool shapes and plan-mode bridges live only there).
|
|
28
27
|
|
|
29
28
|
## Read next (in order)
|
|
30
29
|
|
|
@@ -36,7 +35,7 @@ Detect host → **`mstar-host`** → `references/codex.md` | `cursor.md` | `open
|
|
|
36
35
|
|
|
37
36
|
1. **Delegate** — PM does not implement, QC, or QA in-thread (`project-manager.md` Execution Boundary; hotfix → `mstar-phase-gates`).
|
|
38
37
|
2. **Dispatch** — when host has invoke/Task tools: **1 Assignment ⇒ 1 invoke** (`mstar-dispatch-gates`). Markdown alone is not dispatch.
|
|
39
|
-
3. **SSOT** — iteration lifecycle → **`mstar-iteration`**;
|
|
38
|
+
3. **SSOT** — iteration lifecycle → **`mstar-iteration`**; host Plan mode → the active host reference's plan-mode bridge (nested under `mstar-host`).
|
|
40
39
|
4. **Autonomous Execute push** — multi-plan iteration Phase 2–5: continuously dispatch implement → QC → QA → Done through merge-ready exit without routine yes/no prompts; **Blocked** only on true conflicts or metadata gaps → **`mstar-iteration` §2.6**.
|
|
41
40
|
|
|
42
41
|
Conflict: user instructions → project `AGENTS.md` / `CLAUDE.md` → `mstar-harness-core` → this file.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstar-harness/dsh",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.10.1",
|
|
4
4
|
"description": "Morning Star harness dsh (DeepSeek Harness) cordis function plugin — in-process engine gates (status/dispatch/lease) with hard refusal channels.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh",
|