@mstar-harness/opencode 1.5.5 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +12 -0
- package/harness-skills/mstar-harness-core/SKILL.md +1 -0
- package/harness-skills/mstar-host/SKILL.md +3 -2
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +55 -0
- package/harness-skills/mstar-host/references/zcode.md +156 -0
- package/harness-skills/mstar-iteration/SKILL.md +5 -1
- package/harness-skills/mstar-plan-artifacts/SKILL.md +2 -1
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +37 -0
- package/harness-skills/mstar-review-qc/SKILL.md +5 -3
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +1 -0
- package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +2 -0
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +14 -1
- package/harness-skills/mstar-roles/references/project-manager.md +1 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,18 @@ All notable changes to the `@mstar-harness/opencode` package are documented in t
|
|
|
4
4
|
|
|
5
5
|
The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface releases.
|
|
6
6
|
|
|
7
|
+
## 1.6.0
|
|
8
|
+
|
|
9
|
+
- Version alignment with harness **1.6.0** (no OpenCode plugin change in this release; ZCode host surface is added at the harness/CLI layer, not bundled into the OpenCode package).
|
|
10
|
+
|
|
11
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.6.0**.
|
|
12
|
+
|
|
13
|
+
## 1.5.6
|
|
14
|
+
|
|
15
|
+
- Version alignment with harness **1.5.6** (bundled skills: `Findings cleanup: zero-residual` mode).
|
|
16
|
+
|
|
17
|
+
See root [CHANGELOG.md](../../CHANGELOG.md) **1.5.6**.
|
|
18
|
+
|
|
7
19
|
## 1.5.5
|
|
8
20
|
|
|
9
21
|
- Version alignment with harness **1.5.5** (bundled skills: control-path harness under default gitignore + `sdd-workspace` `MSTAR_CONTROL_ROOT`).
|
|
@@ -149,6 +149,7 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
|
|
|
149
149
|
| `InProgress` 无 `execution_lease` 未恢复即可写派发 | `mstar-plan-artifacts` — orphan recovery |
|
|
150
150
|
| 混淆跨 plan lease 门控并行与单 plan 内 SDD 并行 implementer | `mstar-dispatch-gates` · `mstar-sdd` |
|
|
151
151
|
| residual 只写 plan 不写 SSOT | `mstar-plan-artifacts` |
|
|
152
|
+
| `zero-residual` 下把可修 findings 登记为 open R# / 草草 `Approve with residuals` | `mstar-plan-artifacts` Findings cleanup modes · `mstar-review-qc` |
|
|
152
153
|
| 角色文件塞流程长文 | 用专题 skill |
|
|
153
154
|
| 无证据宣称完成 | `mstar-coding-behavior` / verification |
|
|
154
155
|
| CreatePlan 不落盘 / 无 `{HARNESS_DIR}` mirror | `mstar-host` · `cursor-plan-mode-bridge` |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-host
|
|
3
|
-
description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
|
|
3
|
+
description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi, ZCode). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, ZCode Agent/AskUserQuestion/EnterPlanMode with built-in subagent types and role-in-prompt binding, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Morning Star Host Adapter
|
|
@@ -32,7 +32,8 @@ Use **capability signals** (not filesystem paths):
|
|
|
32
32
|
| **Task** + `subagent_type`, no CreatePlan | `cursor` | `references/cursor.md` |
|
|
33
33
|
| **Codex app/CLI/plugin context**, `/plan`, `/goal`, Goal tools, `functions.*`, `codex_app.*`, `tool_search`, Browser plugin tools | `codex` | `references/codex.md`; Plan/Goal mode also `references/codex-plan-goal-mode-bridge.md` |
|
|
34
34
|
| **`Agent`** / **`AgentSwarm`** / **`AskUserQuestion`** / **`EnterPlanMode`**, Kimi plugin (`.kimi-plugin/plugin.json`), `/morning-star-harness:*` commands | `kimi` | `references/kimi.md`; Plan mode also `references/kimi-plan-mode-bridge.md` |
|
|
35
|
-
|
|
|
35
|
+
| **`Agent`** / **`AskUserQuestion`** / **`EnterPlanMode`** / **`TodoWrite`**, no `AgentSwarm`, ZCode plugin (`.zcode-plugin/plugin.json`), `/morning-star-harness:*` commands | `zcode` | `references/zcode.md`; Plan mode also `references/zcode-plan-mode-bridge.md` |
|
|
36
|
+
| Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, **`codex.md`**, **`kimi.md`**, and **`zcode.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
|
|
36
37
|
|
|
37
38
|
## Parallel dispatch (invoke-capable hosts)
|
|
38
39
|
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# ZCode Plan Mode × Harness Dual-Write Bridge
|
|
2
|
+
|
|
3
|
+
> **Load order**: Read **`mstar-harness-core`** first, then **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** when Plan mode is active. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
|
|
4
|
+
|
|
5
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
ZCode **Plan mode** (`EnterPlanMode` / `ExitPlanMode`) uses read-only exploration for design and a plan approval gate before implementation. Morning Star **SSOT** lives on disk under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`). This reference defines **dual-write**: mirror durable plan artifacts to the repo; never treat the ZCode session todo list alone as the handoff surface.
|
|
8
|
+
|
|
9
|
+
## Priority (hard)
|
|
10
|
+
|
|
11
|
+
1. User explicit instructions (this turn)
|
|
12
|
+
2. Project `AGENTS.md` / `CLAUDE.md`
|
|
13
|
+
3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
|
|
14
|
+
4. ZCode `TodoWrite` UI (session UX mirror)
|
|
15
|
+
|
|
16
|
+
**NEVER** cite only a session todo list path in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
|
|
17
|
+
|
|
18
|
+
## When this applies
|
|
19
|
+
|
|
20
|
+
- ZCode **Plan mode** is active (`EnterPlanMode` succeeded).
|
|
21
|
+
- Morning Star plugin is installed (`.zcode-plugin/plugin.json` skills loaded) or **`/morning-star-harness:pm`** / **`pm` skill** is in use.
|
|
22
|
+
|
|
23
|
+
## Before entering Plan mode
|
|
24
|
+
|
|
25
|
+
1. **Read** (minimum): `mstar-plan-conventions`, `mstar-plan-artifacts` (SKILL.md); Prepare gates from `mstar-phase-gates` if not hotfix.
|
|
26
|
+
2. **Discover** `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions`.
|
|
27
|
+
3. **Initialize** if absent: `{HARNESS_DIR}/`, `{PLAN_DIR}/`, `status.json` from `mstar-plan-artifacts/templates/status.empty.json`, `archived/residuals/`, Morning Star process-artifact gitignore set (see `mstar-plan-conventions` SKILL.md「Git 跟踪策略」).
|
|
28
|
+
|
|
29
|
+
## Plan mode workflow (dual-write)
|
|
30
|
+
|
|
31
|
+
| Step | ZCode session | Harness SSOT |
|
|
32
|
+
|------|---------------|--------------|
|
|
33
|
+
| Enter | `EnterPlanMode` — explore read-only | Ensure `{HARNESS_DIR}` exists; register `plan_id` in `status.json` when known |
|
|
34
|
+
| Design | Draft plan content; surface via `ExitPlanMode` plan text | Mirror main plan to `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes |
|
|
35
|
+
| Clarify | `AskUserQuestion` for blocking ambiguity only | Record decisions in plan / spec when durable |
|
|
36
|
+
| Exit | `ExitPlanMode` — user approves plan to implement | SSOT plan locked; `status.json` row updated |
|
|
37
|
+
| Implement | Agent mode resumes | Per-task commits, Working branch, dispatch per `mstar-dispatch-gates` |
|
|
38
|
+
|
|
39
|
+
`TodoWrite` and ZCode UI todos are **session progress only** — sync meaningful state to SSOT plan checkboxes and `status.json` when coordination requires it.
|
|
40
|
+
|
|
41
|
+
## ExitPlanMode gate
|
|
42
|
+
|
|
43
|
+
Do **not** treat ExitPlanMode approval as Morning Star **Done**. Implementation still follows phase gates, per-task commits, QC, and QA per the SSOT plan.
|
|
44
|
+
|
|
45
|
+
## `mstar-iteration` Phase 1
|
|
46
|
+
|
|
47
|
+
When iteration Phase 1 runs in Plan mode:
|
|
48
|
+
|
|
49
|
+
- Use **one** plan session; iterate the **same** plan content and SSOT mirror in place (feedback-driven edits).
|
|
50
|
+
- Do **not** run Review & Edit, commit integration branch, or dispatch implementers until the user approves via `ExitPlanMode` (or explicit go-ahead after plan lock).
|
|
51
|
+
- After approval: reload `mstar-harness-core` + `zcode.md`; resume as `project-manager` orchestration.
|
|
52
|
+
|
|
53
|
+
## Enforcement
|
|
54
|
+
|
|
55
|
+
Conflict with harness invariants → **`mstar-harness-core`** wins. Full Cursor CreatePlan bridge detail lives in `cursor-plan-mode-bridge.md` when hosts differ; ZCode uses this lighter Enter/Exit bridge only.
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
# ZCode host reference
|
|
2
|
+
|
|
3
|
+
Load when **`mstar-host`** detection resolves **zcode** (ZCode client session, `.zcode-plugin/plugin.json` plugin installed, `Agent` / `AskUserQuestion` / `EnterPlanMode` / `TodoWrite` tools, or `/morning-star-harness:*` plugin commands).
|
|
4
|
+
|
|
5
|
+
Plan mode: read **`zcode-plan-mode-bridge.md`** when `EnterPlanMode` / `ExitPlanMode` is active.
|
|
6
|
+
|
|
7
|
+
Parallel PM dispatch: read **`parallel-dispatch.md`** when dispatching **N ≥ 2** concurrent `Agent` invocations.
|
|
8
|
+
|
|
9
|
+
## ZCode-only context
|
|
10
|
+
|
|
11
|
+
- Plugin manifest: **`.zcode-plugin/plugin.json`** (plugin root is the **repo root**; paths stay `./skills/`, `./commands/`, `./agents/`).
|
|
12
|
+
- Runtime skills: repo `skills/` mounted by the plugin (`"skills": "./skills/"`).
|
|
13
|
+
- Plugin commands: repo `commands/` → `/morning-star-harness:<name>` (e.g. `/morning-star-harness:iteration-start`).
|
|
14
|
+
- Plugin agents: repo `agents/*.md` (role frontmatter `name` + `description`); ZCode reads them as subagent definitions but **does not** expose custom named `subagent_type` values for Morning Star roles (see C5).
|
|
15
|
+
- **No `sessionStart.skill`** (ZCode has no Kimi-style session auto-load) — enter PM manually via **`/morning-star-harness:pm`** or the **`pm`** skill, then **Read next** → `mstar-harness-core` → `project-manager.md`.
|
|
16
|
+
- Install (user-scoped, recommended): `npx @mstar-harness/cli init --target zcode --scope global`, then in ZCode **Settings → Plugin Management → Discover** install **morning-star-harness** from the **mstar-local** marketplace (or add `github:btspoony/mstar-harness` as a marketplace directly).
|
|
17
|
+
- Plugins are **user-scoped** (all projects); managed copy lives under `~/.zcode/cli/plugins/` after install.
|
|
18
|
+
- Project `.agents/skills/` symlinks are **not** required when using the plugin — commands and skills come from the plugin mount.
|
|
19
|
+
|
|
20
|
+
## Skill loading
|
|
21
|
+
|
|
22
|
+
1. On entry: invoke **`pm`** (via `/morning-star-harness:pm` or `/skill:pm`) → **Read next** loads `mstar-harness-core`, then `mstar-roles` → `project-manager.md` when PM is active.
|
|
23
|
+
2. Read `mstar-host` and this ZCode reference.
|
|
24
|
+
3. If Plan mode is active, read `zcode-plan-mode-bridge.md`.
|
|
25
|
+
4. Load `mstar-roles` and the active role reference.
|
|
26
|
+
5. Load topic skills on demand per the role reference.
|
|
27
|
+
|
|
28
|
+
Use skill names in prompts and references. Avoid absolute local paths unless maintaining this repository or skills are not installed.
|
|
29
|
+
|
|
30
|
+
## Tools map (default agent)
|
|
31
|
+
|
|
32
|
+
| ZCode tool | Harness use |
|
|
33
|
+
|------------|-------------|
|
|
34
|
+
| **Agent** | Primary dispatch — delegate one subagent task (`subagent_type`: built-in profiles such as `general-purpose` / `Explore`) |
|
|
35
|
+
| **AskUserQuestion** | Structured clarify (1–4 questions, 2–4 options each); prefer over free-form when choices are known |
|
|
36
|
+
| **EnterPlanMode** / **ExitPlanMode** | Plan mode entry/approval → **`zcode-plan-mode-bridge.md`** |
|
|
37
|
+
| **TodoWrite** | Session UX only; mirror to SSOT plan / `status.json` when durable |
|
|
38
|
+
| **Bash** | Commands, git, tests — evidence per `mstar-coding-behavior` |
|
|
39
|
+
| **Read** | File reads (text + images) |
|
|
40
|
+
| **Edit** / **Write** | Edits |
|
|
41
|
+
| **Glob** / **Grep** | Search (prefer over shell find/grep) |
|
|
42
|
+
| **WebSearch** / **WebFetch** | External docs / facts |
|
|
43
|
+
| **TaskOutput** / **TaskStop** | Long-running task management when present |
|
|
44
|
+
|
|
45
|
+
OpenCode-style `question`/`task`, Cursor **Task**, and Kimi **AgentSwarm** are **not** ZCode tools — do not assume them.
|
|
46
|
+
|
|
47
|
+
## Role agents (C5 — hard constraint)
|
|
48
|
+
|
|
49
|
+
ZCode ships **built-in subagent types only** (e.g. `general-purpose`, `Explore`). Valid **`subagent_type`** values are the host's built-in profiles:
|
|
50
|
+
|
|
51
|
+
| `subagent_type` | ZCode profile | Harness mapping |
|
|
52
|
+
|-----------------|---------------|-----------------|
|
|
53
|
+
| `Explore` | Read-only exploration | Orientation, codebase survey, Prepare explore passes |
|
|
54
|
+
| `general-purpose` | General implementation / research | **All other Morning Star roles** (`product-manager`, `fullstack-dev`, `qc-specialist`, …) |
|
|
55
|
+
|
|
56
|
+
Morning Star role ids (`project-manager`, `fullstack-dev`, `qc-specialist`, …) are **not** valid `subagent_type` values. Although `agents/*.md` are read by ZCode, the host does not register them as callable named agent types the way Codex TOML or Cursor `subagent_type` role ids do.
|
|
57
|
+
|
|
58
|
+
### Role binding in prompt (C5b — required)
|
|
59
|
+
|
|
60
|
+
Because ZCode cannot bind roles via agent config, every dispatch **must** carry the played Morning Star role in the **Assignment** and in the **`Agent` prompt**:
|
|
61
|
+
|
|
62
|
+
1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
|
|
63
|
+
2. **`Act as <role-id>`** (or equivalent) at the top of the Agent prompt.
|
|
64
|
+
3. **Skill load list** — instruct the subagent to read `mstar-roles` → `references/<role-id>.md` (or shared reference + parameters) and topic skills per that reference.
|
|
65
|
+
4. **`subagent_type`** — pick from the host's built-in profiles only (typically `general-purpose`; `Explore` for read-only orientation).
|
|
66
|
+
|
|
67
|
+
Paste-only Assignment without an **`Agent`** call is **not** dispatch.
|
|
68
|
+
|
|
69
|
+
### Assignment / Agent-prompt template
|
|
70
|
+
|
|
71
|
+
```markdown
|
|
72
|
+
## Assignment
|
|
73
|
+
|
|
74
|
+
**Execute as**: fullstack-dev
|
|
75
|
+
**Delegation**: forbidden
|
|
76
|
+
**Working branch**: feat/example
|
|
77
|
+
**Plan Path**: .mstar/plans/20260717-example.md
|
|
78
|
+
|
|
79
|
+
**IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
|
|
80
|
+
Load: `mstar-harness-core` → `mstar-host` → `zcode.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
|
|
81
|
+
|
|
82
|
+
<task body>
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
PM dispatch invocation (same turn):
|
|
86
|
+
|
|
87
|
+
```text
|
|
88
|
+
Agent(
|
|
89
|
+
subagent_type: "general-purpose",
|
|
90
|
+
description: "<short task label>",
|
|
91
|
+
prompt: "<full Assignment body including Act as + skill load>"
|
|
92
|
+
)
|
|
93
|
+
```
|
|
94
|
+
|
|
95
|
+
For **`Explore`** orientation:
|
|
96
|
+
|
|
97
|
+
```text
|
|
98
|
+
Agent(subagent_type: "Explore", description: "...", prompt: "... Act as explore-only orientation; Execute as: n/a ...")
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## PM dispatch (`Agent`)
|
|
102
|
+
|
|
103
|
+
Harness **dispatch** on ZCode = **one or more `Agent` tool calls** with correct **`subagent_type`** and role-bound prompts.
|
|
104
|
+
|
|
105
|
+
| Harness | ZCode |
|
|
106
|
+
|---------|-------|
|
|
107
|
+
| `Execute as: <role-id>` | Role id in Assignment + **Act as** + skill load in **Agent** prompt |
|
|
108
|
+
| `subagent_type` for invoke | built-in profiles only (typically `general-purpose`; `Explore` for read-only) |
|
|
109
|
+
| 1 Assignment ⇒ 1 invoke | **1 `Agent`** call with full Assignment prompt |
|
|
110
|
+
| Parallel batch **N** | **N `Agent`** calls in **one assistant message** |
|
|
111
|
+
| No `Agent` call | **Not dispatched** — paste-only / `dispatch incomplete` |
|
|
112
|
+
|
|
113
|
+
### QC default
|
|
114
|
+
|
|
115
|
+
- **`Execution mode: sdd`**: **N=3** `Agent` calls (`qc-specialist`, `qc-specialist-2`, `qc-specialist-3`) — each prompt **Act as** the respective QC role, all `subagent_type: "general-purpose"`.
|
|
116
|
+
- **`inline`**: **N=1** per `parallel-dispatch.md`.
|
|
117
|
+
|
|
118
|
+
Cannot emit required **N** → **`Blocked`**.
|
|
119
|
+
|
|
120
|
+
### SDD implement (serial)
|
|
121
|
+
|
|
122
|
+
- **`Execution mode: sdd`**: one implementer **`Agent`** per task id; task reviewer = new **`Agent`** (no sticky resume unless host adds it later).
|
|
123
|
+
- **Never** multiple implementer Agents in one message for the same plan.
|
|
124
|
+
|
|
125
|
+
## Clarify
|
|
126
|
+
|
|
127
|
+
- Prefer **`AskUserQuestion`** for 1–3 high-impact choices with known options.
|
|
128
|
+
- Fallback: one concise Markdown question after codebase exploration cannot answer it.
|
|
129
|
+
- `AskUserQuestion` for plan approval is wrong in Plan mode — use **`ExitPlanMode`** for plan sign-off.
|
|
130
|
+
- "Question asked" ≠ clarify done; blocking ambiguity → **`Blocked`** or escalation.
|
|
131
|
+
|
|
132
|
+
## Commands and skills paths
|
|
133
|
+
|
|
134
|
+
| Surface | Path / invocation |
|
|
135
|
+
|---------|-------------------|
|
|
136
|
+
| Plugin skills | `/skill:<skill-name>` or auto-load from `skills/` via plugin |
|
|
137
|
+
| Plugin commands | `/morning-star-harness:iteration-start` etc. |
|
|
138
|
+
| Session entry | `/morning-star-harness:pm` or `/skill:pm` → `mstar-harness-core` via pm **Read next** |
|
|
139
|
+
|
|
140
|
+
## Files, shell, and approvals
|
|
141
|
+
|
|
142
|
+
- Prefer **Glob** / **Grep** for search; **Write** / **Edit** for edits.
|
|
143
|
+
- Respect ZCode permission prompts for destructive operations.
|
|
144
|
+
- Do not edit `~/.zcode/` credentials, managed plugin copies, or user secrets without explicit consent.
|
|
145
|
+
|
|
146
|
+
## Git and final evidence
|
|
147
|
+
|
|
148
|
+
- Git work follows `mstar-branch-worktree` and Assignment **Working branch** / **Branch policy**.
|
|
149
|
+
- Completion reports cite concrete commands, artifacts, and commit lines when required.
|
|
150
|
+
|
|
151
|
+
## Gotchas
|
|
152
|
+
|
|
153
|
+
- Plugin install materializes source under `~/.zcode/cli/plugins/` — edit the harness checkout + reinstall to pick up harness changes.
|
|
154
|
+
- Session todos (`TodoWrite`) are not durable SSOT unless mirrored to `{HARNESS_DIR}`.
|
|
155
|
+
- No custom ZCode agent profiles for Morning Star roles — role binding is **always** prompt + skill load (C5b).
|
|
156
|
+
- ZCode has no `sessionStart.skill`; new sessions do **not** auto-load PM — invoke `/morning-star-harness:pm` or `/skill:pm` manually.
|
|
@@ -208,6 +208,8 @@ Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(
|
|
|
208
208
|
|
|
209
209
|
**本 Phase 是本 skill 的核心**——定义 per-plan 派发循环的完整流程:前置条件检查、session todos、backlog 读取、integration 分支管理、per-plan dispatch 循环(分支→实现→QC→**QA gate**→Done→合并)、dispatch-first 约束、push 纪律。PM 读取本 Phase 即可执行迭代。
|
|
210
210
|
|
|
211
|
+
**Findings cleanup(默认)**:Phase 2 每个 plan Assignment 默认 **`Findings cleanup: zero-residual`**(可修 findings 当轮 fix→re-review 清干净;仅真 blocker-defer + Durable Roadmap 可留 open R#)。compass 或 Assignment 可显式覆写为 `allow-residual`。SSOT → **`mstar-plan-artifacts`**「Findings cleanup modes」。
|
|
212
|
+
|
|
211
213
|
### 2.0 前置条件(五道闸)
|
|
212
214
|
|
|
213
215
|
进入 Autonomous Execute 前必须满足:
|
|
@@ -325,6 +327,7 @@ Iteration Phase 2 附加:
|
|
|
325
327
|
- PM **NEVER** 在 PM 线程实现产品代码(delegate dev;hotfix 例外见 **`mstar-phase-gates`**)
|
|
326
328
|
- `Subagent invokes issued: 0` 而 Assignment 已写出 → **`dispatch incomplete`**;下一条补发 invoke,禁止 PM 顶替
|
|
327
329
|
- QC 初轮:**SDD → N=3**;**inline → N=1**;plan QC tri 三席 **同条消息 N=3**(非 implement 轨数)
|
|
330
|
+
- **`Findings cleanup: zero-residual`(默认)**:QC 后可修 Warning/Suggestion → 继续 fix→targeted re-review,直至 clean `Approve` 或仅剩真 blocker-defer;**禁止**把可修项登记为 open residual 草草 `Approve with residuals`
|
|
328
331
|
|
|
329
332
|
### 2.6 Push 纪律(Autonomous Execute)
|
|
330
333
|
|
|
@@ -336,6 +339,7 @@ Iteration Phase 2 附加:
|
|
|
336
339
|
- 实际 Git ≠ `working_branch` → **同轮**更新 plan + status + `execution_lease.working_branch`(如适用)
|
|
337
340
|
- **跨 plan implement**(**无论** `Worktree mode: waived`):并行可写 implement 须满足 §2.0 #5 跨 plan 并行安全闸——same-host 独占写锁 + 每次协调变更持锁,或默认 **`Plan parallelism: serial`**(waived 时尤其优先),或用户本轮 `Cross-host lease race: accepted` + audit `notes`;**禁止**将 waived 当作无锁跨主机并行授权;未 waive 时另须 verified `execution_lease` + feature worktree。**integration merge 串行**(`integration_merge_lease` 或 waived 下无 lease 仍须串行 merge)
|
|
338
341
|
- plan 内 SDD task **串行** — 见 §2.4、§2.5、`mstar-sdd` Continuous execution
|
|
342
|
+
- **zero-residual(默认)**:单 plan QC findings 尽量在当轮清干净;仅真 blocker 才 defer 到后续迭代(须 Durable Roadmap)— 见 **`mstar-plan-artifacts`** Findings cleanup modes
|
|
339
343
|
|
|
340
344
|
---
|
|
341
345
|
|
|
@@ -370,7 +374,7 @@ PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支
|
|
|
370
374
|
**STOP**: 打印下方 checklist,且全部为 `[x]` 后,才可进入 §3.2 Compound。
|
|
371
375
|
|
|
372
376
|
- [ ] 所有 compass 中登记的 plan 在 `{HARNESS_DIR}/status.json` 均为 `Done`
|
|
373
|
-
- [ ] 所有 plan 的 residual findings
|
|
377
|
+
- [ ] 所有 plan 的 residual findings 已收口:优先 empty open 列表;若仍有 open R#,须均为 Phase 2 `zero-residual` 允许的 blocker-defer + roadmap,或已 closed/accepted/waived 归档(见 `mstar-plan-artifacts` Findings cleanup modes)
|
|
374
378
|
- [ ] compass `## Plans` 表状态列已与 `status.json` 同步
|
|
375
379
|
- [ ] 迭代 `## Acceptance Criteria` 已达成或显式豁免(compass 或对话记录原因)
|
|
376
380
|
- [ ] compass shape 已满足(frontmatter + `## Roadmap Position` + close 占位节)
|
|
@@ -26,9 +26,10 @@ description: "Morning Star plan harness artifacts — `{PLAN_DIR}` main plans an
|
|
|
26
26
|
- **`{HARNESS_DIR}/status.json`**: `plans[]` row status + root **`residual_findings[<plan-id>]`** (open list **SSOT**).
|
|
27
27
|
- **Canonical**: register new findings only at root `residual_findings`; **`metadata.residual_findings`** is legacy read-only — **do not** dual-write.
|
|
28
28
|
- **Lifecycle**: open → verified close → **`archived/residuals/<plan-id>.json`**; machine **`severity`** enum in reference.
|
|
29
|
+
- **Findings cleanup**: Assignment **`Findings cleanup: zero-residual | allow-residual`** (+ optional `metadata.findings_cleanup`); iteration Phase 2 defaults to **`zero-residual`** → **`references/status-and-residuals.md`** (“Findings cleanup modes”).
|
|
29
30
|
- **`notes.json`**, optional **`tech_debt_summary`** (rollup view; compute via **`scripts/tech-debt-rollup.sh`**).
|
|
30
31
|
- **Iteration Phase 2 leases** (`metadata.control_worktree_path`, `plans[].execution_lease`, `metadata.integration_merge_lease`): claim-before-`InProgress`, resume vs steal, orphan recovery → **`references/status-and-residuals.md`** (“Iteration execution leases”).
|
|
31
32
|
|
|
32
|
-
Field semantics, severity mapping, archive flow, and `jq` examples → **`references/status-and-residuals.md`**.
|
|
33
|
+
Field semantics, severity mapping, findings cleanup modes, archive flow, and `jq` examples → **`references/status-and-residuals.md`**.
|
|
33
34
|
|
|
34
35
|
**Templates (this skill):** `templates/status.empty.json`, `templates/notes.empty.json` — copy into `{HARNESS_DIR}/` (`templates/README.md`).
|
|
@@ -106,10 +106,47 @@ In old JSON, **`"severity": "warning"`** is read and rolled up as **`low`**. **F
|
|
|
106
106
|
|
|
107
107
|
---
|
|
108
108
|
|
|
109
|
+
## Findings cleanup modes
|
|
110
|
+
|
|
111
|
+
Plan-level policy for whether non-blocking QC/QA findings may remain as open residuals or must be cleared in the current plan session.
|
|
112
|
+
|
|
113
|
+
### Assignment + metadata
|
|
114
|
+
|
|
115
|
+
| Surface | Values |
|
|
116
|
+
| ------- | ------ |
|
|
117
|
+
| Assignment **`Findings cleanup`** | `zero-residual` \| `allow-residual` |
|
|
118
|
+
| `plans[].metadata.findings_cleanup` | same strings (optional mirror; Assignment wins when both set) |
|
|
119
|
+
|
|
120
|
+
**Defaults**
|
|
121
|
+
|
|
122
|
+
| Context | Default |
|
|
123
|
+
| ------- | ------- |
|
|
124
|
+
| Formal **iteration Phase 2** (Autonomous Execute) | `zero-residual` (compass or Assignment may override to `allow-residual`) |
|
|
125
|
+
| Standalone `/pm`, hotfix, `Execution mode: inline` | `allow-residual` |
|
|
126
|
+
|
|
127
|
+
### `zero-residual` (clean-session)
|
|
128
|
+
|
|
129
|
+
Intent: clear findings in the current plan session whenever possible. Open residuals only for **true blocker-defers**.
|
|
130
|
+
|
|
131
|
+
1. After QC: default path is **fix-now + targeted re-review**, not `Approve with residuals`.
|
|
132
|
+
2. Do **not** register open R# for items that can be fixed in this session.
|
|
133
|
+
3. **`nit`**: fix in-session **or** drop with no R# (existing “no tracking needed”); **never** open residual for style-only nits.
|
|
134
|
+
4. **`Approve with residuals`** only when every remaining open item is a true blocker-defer (`decision: defer`, `target` = next iteration/milestone, Durable Roadmap Gate written).
|
|
135
|
+
5. **True defer** only: external dependency; product/scope decision for a later iteration; or explicit **current-turn** user defer — plus Durable Roadmap Gate.
|
|
136
|
+
6. **`waived` / `risk-accepted`**: still require PM + user/architect alignment; **close/archive** (do not leave open). Prefer a cheap fix over waive-as-shortcut.
|
|
137
|
+
7. Plan **Done**: prefer empty `residual_findings[<plan_id>]`. If any open R# remain, **every** entry must be blocker-defer + roadmap; otherwise keep `InReview` / `Blocked`.
|
|
138
|
+
|
|
139
|
+
### `allow-residual` (legacy default)
|
|
140
|
+
|
|
141
|
+
Non-blocking Warning/Suggestion may ship with open R# registration and `Approve with residuals` when no unresolved Critical remains (existing residual lifecycle unchanged).
|
|
142
|
+
|
|
143
|
+
---
|
|
144
|
+
|
|
109
145
|
## `plans[].metadata` standard optional fields
|
|
110
146
|
|
|
111
147
|
| Key | Type | Purpose |
|
|
112
148
|
| --- | --- | --- |
|
|
149
|
+
| `findings_cleanup` | `zero-residual` \| `allow-residual` | Mirror of Assignment **`Findings cleanup`**; see **Findings cleanup modes** |
|
|
113
150
|
| `working_branch` | string | Implementation branch; aligns with Assignment **`Working branch`** (SSOT) |
|
|
114
151
|
| `spec_integration_branch` | string | (Multi-plan same **Spec**) integration branch name; created from root `metadata.iteration_base_branch`; plan branches merge here before final PR (`mstar-plan-conventions`) |
|
|
115
152
|
| `merge_target` | string | Next merge target; multi-plan + Spec → usually `spec_integration_branch`; final PR target is root `metadata.target_branch` |
|
|
@@ -28,11 +28,13 @@ description: "Morning Star QC orchestration — **SDD mandatory plan QC tri-revi
|
|
|
28
28
|
|
|
29
29
|
## Residual Findings 留档门禁(PM)
|
|
30
30
|
|
|
31
|
-
-
|
|
31
|
+
- 先读 Assignment **`Findings cleanup`**(及可选 `plans[].metadata.findings_cleanup`)→ **`mstar-plan-artifacts/references/status-and-residuals.md`**「Findings cleanup modes」。
|
|
32
|
+
- **`Findings cleanup: zero-residual`**(iteration Phase 2 默认):可修 **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。
|
|
33
|
+
- **`Findings cleanup: allow-residual`**(standalone / hotfix / inline 默认):阻断项修复后仍有 **Warning / Suggestion** 或技术债 → 必须留档;**`Approve with residuals`** 仅当无 open **Critical**;PM 汇总结论须含 residual 清单与跟踪位置。
|
|
34
|
+
- **`severity`** 仅允许 `mstar-plan-artifacts/references/status-and-residuals.md` 枚举。
|
|
32
35
|
- **Open SSOT**:`{HARNESS_DIR}/status.json` 根级 **`residual_findings[<plan-id>]`**;PM 在 consolidated 决策分配 **R1…** 并写入。关闭 → **`{HARNESS_DIR}/archived/residuals/<plan-id>.json`**。
|
|
33
36
|
- 主 plan 仅作人类索引;不得作为唯一 SSOT。
|
|
34
|
-
-
|
|
35
|
-
- 未完成 residual 留档 → 不得进入 plan **Done**。
|
|
37
|
+
- 未完成 residual 留档(`allow-residual`)或未清干净可修 findings(`zero-residual`)→ 不得进入 plan **Done**。
|
|
36
38
|
|
|
37
39
|
### Residual 关闭与验证
|
|
38
40
|
|
|
@@ -98,6 +98,7 @@ The **`**You are a leaf executor. You MUST NOT:**`** section (previously just pr
|
|
|
98
98
|
**QA gate**: mandatory | pm-acceptance | report-only — see `references/project-manager/qa-trigger-matrix.md`
|
|
99
99
|
**QA gate reason**: <tier label, e.g. hotfix-inline | small-feature-clean-qc | mandatory-medium-feature>
|
|
100
100
|
**QA mode**: acceptance-only | full | report-only | N/A — required when `QA gate: mandatory` or `report-only`
|
|
101
|
+
**Findings cleanup**: zero-residual | allow-residual — **default `zero-residual` on formal iteration Phase 2**; **default `allow-residual`** for standalone `/pm`, hotfix, `Execution mode: inline` (override via Assignment or `plans[].metadata.findings_cleanup`; SSOT → `mstar-plan-artifacts` Findings cleanup modes)
|
|
101
102
|
**Why this agent**: <role-fit>
|
|
102
103
|
**PM Task Board coverage**: <task ids>
|
|
103
104
|
**Roadmap / deferred scope**: <required when staged, partial, or temporary; otherwise N/A>
|
|
@@ -34,6 +34,8 @@ Set **`QA gate`** on the **first implement Assignment** (or plan frontmatter) an
|
|
|
34
34
|
|
|
35
35
|
**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`.
|
|
36
36
|
|
|
37
|
+
**Findings cleanup note:** Under Assignment **`Findings cleanup: zero-residual`** (iteration Phase 2 default), prefer clean QC `Approve` with **no open R#** — that restores the small-feature `pm-acceptance` path when other tier rules allow. Any remaining open R# (even blocker-defer) still force **`QA gate: mandatory`** like the residual row above. See `mstar-plan-artifacts` Findings cleanup modes.
|
|
38
|
+
|
|
37
39
|
## PM acceptance checklist (required before `Done` when `QA gate: pm-acceptance`)
|
|
38
40
|
|
|
39
41
|
PM completes this in **Status Update** (or plan closure note). PM **does not** run bash tests or reproduction in the orchestration thread.
|
|
@@ -34,6 +34,7 @@ Use this reference when PM is dispatching QC, consolidating review verdicts, or
|
|
|
34
34
|
- **NEVER** dispatch only QC#2 and QC#3 while skipping QC#1 on initial SDD tri wave — full **N=3** cross-review required (all three seats).
|
|
35
35
|
- **NEVER** consolidate tri-review into `Approve` when any QC report's alignment fields differ from Assignment (character-level).
|
|
36
36
|
- **NEVER** register or rewrite residual `severity` outside `mstar-plan-artifacts` machine enum.
|
|
37
|
+
- **NEVER** under `Findings cleanup: zero-residual`, use `Approve with residuals` or open R# for fixable findings — fix-now + re-review; residual only for true blocker-defer + roadmap.
|
|
37
38
|
- **NEVER** drop residual tracking to chat-only when `Approve with residuals` applies.
|
|
38
39
|
- **NEVER** treat "two of three QC reports arrived" as sufficient — missing seat → `Blocked`.
|
|
39
40
|
- **NEVER** re-dispatch all three after routine fix when only one or two had blockers — **targeted re-review** unless `QC re-review: full tri-review`.
|
|
@@ -59,6 +60,18 @@ Use this reference when PM is dispatching QC, consolidating review verdicts, or
|
|
|
59
60
|
|
|
60
61
|
## Residual Findings (Mandatory)
|
|
61
62
|
|
|
63
|
+
Read Assignment **`Findings cleanup`** first (`mstar-plan-artifacts` — Findings cleanup modes).
|
|
64
|
+
|
|
65
|
+
### When `Findings cleanup: zero-residual`
|
|
66
|
+
|
|
67
|
+
- Prefer **fix-now + targeted re-review** for Critical / Warning / Suggestion that can be fixed this session.
|
|
68
|
+
- **NEVER** park fixable findings as open R# or use `Approve with residuals` for them.
|
|
69
|
+
- Register open R# **only** for true blocker-defers (`decision: defer` + Durable Roadmap + `target` next iteration/milestone).
|
|
70
|
+
- `nit`: fix or drop (no R#).
|
|
71
|
+
- Plan Done: prefer empty open list; any remaining open R# must all be blocker-defer + roadmap.
|
|
72
|
+
|
|
73
|
+
### When `Findings cleanup: allow-residual` (or unset outside iteration Phase 2)
|
|
74
|
+
|
|
62
75
|
When blocking issues are fixed but non-blocking warnings/suggestions remain:
|
|
63
76
|
|
|
64
77
|
- Must register residual findings (do not leave as chat-only).
|
|
@@ -70,7 +83,7 @@ Each residual record should include:
|
|
|
70
83
|
|
|
71
84
|
- `id`, `title`, `severity`, `source`, `scope`, `decision`, `owner`, `target milestone/date`, `tracking link`
|
|
72
85
|
|
|
73
|
-
`Approve with residuals` is only valid when no unresolved blocking items remain.
|
|
86
|
+
`Approve with residuals` is only valid when no unresolved blocking items remain (and under `zero-residual`, only when leftovers are blocker-defers).
|
|
74
87
|
|
|
75
88
|
## Residual Closure & Archive
|
|
76
89
|
|
|
@@ -115,6 +115,7 @@ If any item below matches, fix the dispatch/plan state or mark `Blocked`—do **
|
|
|
115
115
|
- **NEVER** split a required **parallel batch** of `N >= 2` invokes across multiple assistant messages when the host requires a single dispatch turn with all `N` calls.
|
|
116
116
|
- **NEVER** register residuals only inside the plan narrative while skipping root `{HARNESS_DIR}/status.json` `residual_findings[<plan_id>]` when plan conventions require the SSOT field.
|
|
117
117
|
- **NEVER** write non-canonical residual `severity` strings—use only the machine enum from `mstar-plan-artifacts`.
|
|
118
|
+
- **NEVER** under `Findings cleanup: zero-residual`, park fixable Critical/Warning/Suggestion as open R# or use `Approve with residuals` for them — fix-now + re-review; open residual only for true blocker-defer + Durable Roadmap (`mstar-plan-artifacts` Findings cleanup modes).
|
|
118
119
|
- **NEVER** use `Task category: quick` to skip mandatory Prepare (`specify → clarify → plan`) for substantive work (`mstar-harness-core` hard rule).
|
|
119
120
|
- **NEVER** dispatch same-repo **≥2 concurrent writable implement** tracks without **`references/parallel-writable-pre-dispatch.md`**(per-track worktree + absolute **`Worktree path`**;**N invokes ≠ isolation** — also `mstar-dispatch-gates` dual-gate table).
|
|
120
121
|
- **NEVER** point QC at a single dev worktree/`Review cwd` that cannot contain **all** claimed changes from parallel tracks until Git integration lands on one `Working branch` `HEAD` (`mstar-branch-worktree` QC/QA alignment).
|