@mstar-harness/dsh 3.11.0 → 3.11.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness-commands/iteration-loop.md +2 -1
- package/harness-commands/iteration-start.md +6 -1
- package/harness-skills/mstar-artifacts/references/status-and-residuals.md +1 -1
- package/harness-skills/mstar-host/SKILL.md +2 -2
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +1 -1
- package/harness-skills/mstar-host/references/omp.md +16 -10
- package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +5 -1
- package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +2 -1
- package/harness-skills/mstar-iteration/references/phase-1-prepare.md +5 -5
- package/package.json +1 -1
|
@@ -66,7 +66,7 @@ Execute **`mstar-iteration/references/phase-1-prepare.md`**(§1.1–§1.6;**
|
|
|
66
66
|
|
|
67
67
|
### 1–4. Research → Explore → Lock → Write
|
|
68
68
|
|
|
69
|
-
Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/`、`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`)+ planning artifacts(`**/roadmap*.md`、`**/deferred*.md`、`**/features*.md`、`**/backlog*.md`、`**/TODO*.md`、`**/*.plan.md`)+ `STRATEGY.md`(if present)→ scope **2–4** candidates → **autonomous** lock(`direction` arg 约束;落盘 rationale + success criteria + non-goals + scale budget;branch resolve — never silent `main`/`master`;**STOP** if no credible candidate and no `direction` arg)→ write compass + plans per §1.3–§1.5(business plan count within scale budget)。
|
|
69
|
+
Survey structured harness dirs(`{HARNESS_DIR}/status.json`、`{ITERATION_DIR}/`、`{KNOWLEDGE_DIR}/`、`{SPECS_DIR}/`)+ planning artifacts(`**/roadmap*.md`、`**/deferred*.md`、`**/features*.md`、`**/backlog*.md`、`**/TODO*.md`、`**/*.plan.md`)+ `STRATEGY.md`(if present)→ scope **2–4** candidates → **autonomous** lock(`direction` arg 约束;落盘 rationale + success criteria + non-goals + scale budget;branch resolve — never silent `main`/`master`;**STOP** if no credible candidate and no `direction` arg)→ execute the `direction-lock` anchor(`mstar-iteration/references/phase-1-prepare.md` §1.2 tail;rationale recorded on disk, compass not yet written)→ write compass + plans per §1.3–§1.5(business plan count within scale budget)。
|
|
70
70
|
|
|
71
71
|
### 5. Review & Edit Chain(HARD GATE)
|
|
72
72
|
|
|
@@ -75,6 +75,7 @@ Execute **`mstar-iteration/references/phase-1-prepare.md` §1.6**:`product-man
|
|
|
75
75
|
**Pre-commit checklist**(print before §6;all `[x]`):
|
|
76
76
|
|
|
77
77
|
- [ ] Autonomous direction lock rationale recorded in compass(**not** grill-me)
|
|
78
|
+
- [ ] `direction-lock` anchor executed once the autonomous lock rationale is recorded and **before** the compass/plans draft(same anchor and carrier as `iteration-start` §3.5;no `grill-me` on this route)
|
|
78
79
|
- [ ] Scale budget applied(business plan 按 S/M/L/XL 名额)
|
|
79
80
|
- [ ] compass + plans + `status.json` registered
|
|
80
81
|
- [ ] product-manager / architect / writing-specialist invokes completed(**未**向 `{KNOWLEDGE_DIR}/` 新增)
|
|
@@ -60,7 +60,7 @@ Execute **`mstar-host`** → active host 的 **plan-mode bridge**(其 "mstar-i
|
|
|
60
60
|
Command-unique 补充(bridge 未枚举):
|
|
61
61
|
|
|
62
62
|
- **空白脚手架字段**:Direction / Scope / Decisions / Open Questions / Acceptance Criteria / Non-Goals / Delivery Branch Policy(`iteration_base_branch` / `spec_integration_branch` / `target_branch`)/ Plans / Feedback log / Deferred grill log
|
|
63
|
-
- **Build 才勾的 todos**(顺序):`harness-init` → `finalize-compass-plans`(同一 session plan 落成 compass + plans + `status.json` 登记 + 索引)→ review-edit-product-manager → review-edit-architect → review-edit-writing-specialist → `pm-lock` → `integration-branch`
|
|
63
|
+
- **Build 才勾的 todos**(顺序):`harness-init` → `direction-lock-arm` → `finalize-compass-plans`(同一 session plan 落成 compass + plans + `status.json` 登记 + 索引)→ review-edit-product-manager → review-edit-architect → review-edit-writing-specialist → `pm-lock` → `integration-branch`
|
|
64
64
|
|
|
65
65
|
## 非 Plan 路径从这里继续 ↓
|
|
66
66
|
|
|
@@ -80,6 +80,10 @@ Scope **2–4** candidates targeting **product completeness**(default to defer
|
|
|
80
80
|
|
|
81
81
|
**Before this step:** Read `skills/grill-me/SKILL.md`. Run **grill-me** to stress-test candidate directions with the user: walk through trade-offs, converge on a **single iteration direction** with shared understanding, document locked direction + success criteria + non-goals。**If `direction` arg given** — seed grill-me with it (still interactive; the hint does **not** skip grill-me)。Confirm delivery branch policy(`iteration_base_branch` / `target_branch`)per **`mstar-iteration/references/phase-1-prepare.md` §1.2** — **Do not default to `main`/`master` just because those names exist.**
|
|
82
82
|
|
|
83
|
+
## 3.5 Arm the coordinator model handoff — `direction-lock`
|
|
84
|
+
|
|
85
|
+
The `direction-lock` anchor (`mstar-iteration/references/phase-1-prepare.md` §1.2 tail) fires **here**: the direction is locked and the compass/plans draft has **not** been written yet. Execute the active host reference's `## Host hooks` declaration for that anchor; this command declares no host action. Do **not** defer it into §4 — the draft is the context carrier the dispatched review roles read, so the anchor must precede it.
|
|
86
|
+
|
|
83
87
|
## 4. Write Compass & Plans
|
|
84
88
|
|
|
85
89
|
Produce harness artifacts per **`mstar-iteration/references/phase-1-prepare.md` §1.3–§1.5**(template: `mstar-iteration/references/iteration-compass-template.md`):compass(frontmatter **must** include `iteration_base_branch`、`target_branch`、`status: active`)、plans、`status.json` 登记(§1.5)、`{ITERATION_DIR}/README.md` 索引(一行 = 一次迭代)、package dirs(`{ITERATION_DIR}/<iteration-id>/{guides,specs}/`)。
|
|
@@ -101,6 +105,7 @@ Execute **`mstar-iteration/references/phase-1-prepare.md` §1.6**(SSOT):
|
|
|
101
105
|
PM must print this block before §6; all `[ ]` must be `[x]`:
|
|
102
106
|
|
|
103
107
|
- [ ] direction lock decisions recorded in compass(Plan 路径:Feedback log + deferred grill log;非 Plan:grill-me)
|
|
108
|
+
- [ ] `direction-lock` anchor executed **before** the draft was written(§3.5;未登记/无 compass 属预期)
|
|
104
109
|
- [ ] Draft compass + plans + `status.json` registered
|
|
105
110
|
- [ ] product-manager / architect / writing-specialist invokes completed — 编辑 compass / plans / specs / **`<iteration-id>/` package**;**未**向 `{KNOWLEDGE_DIR}/` 新增
|
|
106
111
|
- [ ] PM final lock: compass `status: locked`; Prepare gates pass (blocked plans documented)
|
|
@@ -390,7 +390,7 @@ The scoped route(`/iteration-drive --assignment | --workflow <id> --plan <id>
|
|
|
390
390
|
|
|
391
391
|
### Session envelopes and credentials
|
|
392
392
|
|
|
393
|
-
- Session JSON lives at `<resolved-workflow-dir>/<workflow-id>/sessions/<session-id>.json
|
|
393
|
+
- Session JSON lives at `<resolved-workflow-dir>/<workflow-id>/sessions/<role>-<session-id>.json` (`<role>` ∈ `coordinator` / `plan-pm`), created exclusively, mode `0600`. The role prefixes only the file name, so one host session may hold the coordinator envelope and a plan-pm envelope under one shared `session_id`; the payload identity is untouched.
|
|
394
394
|
- It is a **credential / pointer**, not a second process-SSOT copy: session identity, resolved harness root and pointers — never copied snapshot state, never a portable handoff address. Cross-primary handoff references are readable absolute **control-root filesystem paths**; `local://` is not portable.
|
|
395
395
|
- Session paths and `--expect` revisions stay with the dispatching PM/coordinator and are **never** handed to a leaf implementer/reviewer (`mstar-dispatch-gates` § Plan 作用域与 credential 不下发).
|
|
396
396
|
- Supported writers are cooperative same-machine interfaces, not a filesystem sandbox: copying a session file or editing protected files by hand is not prevented, and is not an authorized path.
|
|
@@ -72,7 +72,7 @@ Shared lifecycle skills name **host-agnostic anchors** — named moments at whic
|
|
|
72
72
|
|
|
73
73
|
| Anchor | Moment |
|
|
74
74
|
|--------|--------|
|
|
75
|
-
| `
|
|
75
|
+
| `direction-lock` | direction lock completed and the iteration identified — before the compass/plans draft is written; the workflow is not registered yet |
|
|
76
76
|
| `phase-1-lock` | Phase 1 completion — once the integration worktree exists, the reviewed changes are committed there and that branch is pushed (the PM lock alone is not the moment) |
|
|
77
77
|
| `phase-2-entry` | the Phase 2 execute/resume entry — after the §2.0 gates, before the per-plan loop; **not** the Phase-1-reused integration-worktree step |
|
|
78
78
|
| `rescheduling-checkpoint` | each `Rescheduling checkpoint` re-evaluation |
|
|
@@ -90,7 +90,7 @@ Carrier locations — the four markers in the shared corpus (all four live under
|
|
|
90
90
|
|
|
91
91
|
| File | Location | Anchor |
|
|
92
92
|
|------|----------|--------|
|
|
93
|
-
| `mstar-iteration/references/phase-1-prepare.md` | §1.
|
|
93
|
+
| `mstar-iteration/references/phase-1-prepare.md` | §1.2 tail, after the direction is locked and before `## 1.3` writes the compass/plans draft | `direction-lock` |
|
|
94
94
|
| `mstar-iteration/references/phase-2-worktree-lease.md` | §2.3 「Integration worktree (Phase 2 entry) + control root」 checklist tail, after step 7 (transfer + commit + push) — the Phase 1 route reaches it through `iteration-start` §6, which carries a pointer only | `phase-1-lock` |
|
|
95
95
|
| `mstar-iteration/references/phase-2-worktree-lease.md` | immediately before the `## 2.4 Per-plan loop` heading (the Phase 2 execute/resume entry; §2.3 is the Phase-1-reused step and triggers nothing) | `phase-2-entry` |
|
|
96
96
|
| `mstar-iteration/references/phase-2-worktree-lease.md` | `### Rescheduling checkpoint` | `rescheduling-checkpoint` (the five frozen reason names are handed off verbatim) |
|
|
@@ -150,7 +150,7 @@ When starting a **new iteration** under Cursor Plan mode (host command may orche
|
|
|
150
150
|
|
|
151
151
|
**Single CreatePlan URI (HARD)**: one CreatePlan per Phase 1 Plan session. Updates use file edit tools on that path. If a duplicate plan file was created by mistake: merge into the original, delete the duplicate, keep View Plan on the original.
|
|
152
152
|
|
|
153
|
-
**Bootstrap relationship**: ordinary per-plan work still uses `harness-init` / `spec-register` / `mirror-plan`. Phase 1 CreatePlan uses Phase 1 todos (`harness-init` → `finalize-compass-plans` → review-edit seats → `pm-lock` → `integration-branch`). Snapshot `plans[]` rows should exist as drafts before Build when direction has converged.
|
|
153
|
+
**Bootstrap relationship**: ordinary per-plan work still uses `harness-init` / `spec-register` / `mirror-plan`. Phase 1 CreatePlan uses Phase 1 todos (`harness-init` → `direction-lock-arm` → `finalize-compass-plans` → review-edit seats → `pm-lock` → `integration-branch`). Snapshot `plans[]` rows should exist as drafts before Build when direction has converged.
|
|
154
154
|
|
|
155
155
|
**Helpers**: third-party interview helpers are **not** named here; host **command** layer may use them only after feedback-close when gaps remain.
|
|
156
156
|
|
|
@@ -235,7 +235,7 @@ A second extension entry from this package: `extensions/model-handoff.js` (manif
|
|
|
235
235
|
| Scope | That panel lists **user-scope** installs; a project-scope npm install has no native row (host limitation, documented rather than worked around). Use the user-scope path — never double-install or add a private settings parser/UI. |
|
|
236
236
|
| Supported entries | `/iteration-start`, `/iteration-loop`, and a natural-language / skill-driven start (`skill-start`) as labelled from the host's own `input` event. `/iteration-drive` in any form never arms — the scoped-plan route only restores the session's existing binding, and a start call after it is refused `scoped-plan-route`. |
|
|
237
237
|
| Inert contexts | Ordinary chat, unrelated commands, leaf/subagent sessions (host `session_init` marker), plan-scoped PM sessions, other hosts, and an iteration whose coordinator never armed. |
|
|
238
|
-
| PM binding | Tool `mstar_model_handoff`, executed at two host hook anchors — **`
|
|
238
|
+
| PM binding | Tool `mstar_model_handoff`, executed at two host hook anchors — **`direction-lock`** (`{operation:"start"}`) and **`phase-1-lock`** (`{operation:"phase1-complete"}`). Exact parameters, prerequisites, refusal codes and required-vs-optional per anchor → **§ Host hooks** below. Session identity, cwd, entry route, task-session state and coordinator authority are host-derived from the ledger, the workflow's own session envelopes and the root register. |
|
|
239
239
|
| Ownership | One explicitly named workflow and control root own the coordinator. Missing, foreign or ambiguous ownership fails closed — no `workflows[0]`, latest-mtime, unique-new-row or "most recent" inference, and a concurrent sibling iteration stays untouched. Only the bound coordinator session changes model; role mappings, other sessions, subagents, goal objective and workflow snapshot status are never written. |
|
|
240
240
|
| Full readiness | Fire requires the sequential specialist returns for that iteration, PM-confirmed Prepare gates for every registered plan with `compass status: locked`, a distinct same-repository integration checkout on its recorded branch, and a remote tip equal to the validated integration HEAD. `evaluatePhaseGate` is a later-phase gate and is never readiness evidence; a draft compass, a lock alone, a missing checkout or an unpushed commit is not ready. |
|
|
241
241
|
| Cancellation | While pending, an unowned model change — history or live model — cancels the not-yet-executed switch, and the arm's own transition can never cancel it. Cancellation is deliberately conservative (it can also catch another extension's change; there is no exact user-selection event), and it never clears the saved preference. Navigation arriving during an invoked action is refused immediately; navigation arriving first fences the action instead of letting it start. |
|
|
@@ -297,17 +297,23 @@ Every prerequisite is required and checked per launch: the **corresponding optio
|
|
|
297
297
|
|
|
298
298
|
## Host hooks
|
|
299
299
|
|
|
300
|
-
The four **host hook anchors** — `
|
|
300
|
+
The four **host hook anchors** — `direction-lock`, `phase-1-lock`, `phase-2-entry`, `rescheduling-checkpoint` — are defined host-agnostically in `mstar-host` § `## Host hooks (anchor contract)`. Shared skills carry only the marker `<!-- host-hook: <anchor> -->` plus a one-line pointer and declare no host action; **this section is the OMP declaration for all four**. When the shared step carrying an anchor is reached, the PM executes the call declared here. Tool names, parameters, refusal codes and settings keys for these two mechanisms live in this file and nowhere else.
|
|
301
301
|
|
|
302
302
|
Carrier moments — where the PM meets the marker:
|
|
303
303
|
|
|
304
304
|
| Anchor | Shared carrier |
|
|
305
305
|
|---|---|
|
|
306
|
-
| `
|
|
306
|
+
| `direction-lock` | `mstar-iteration/references/phase-1-prepare.md` §1.2 (tail, once the direction is locked and before the compass/plans draft; the workflow is intentionally **not** registered yet) |
|
|
307
307
|
| `phase-1-lock` | `mstar-iteration/references/phase-2-worktree-lease.md` §2.3 (`## Integration worktree (Phase 2 entry) + control root` checklist tail — after the integration checkout is recorded, the reviewed changes are committed there and that branch is pushed; the Phase 1 route reaches it through `iteration-start` §6, which carries a pointer only) |
|
|
308
308
|
| `phase-2-entry` | `mstar-iteration/references/phase-2-worktree-lease.md` immediately before the `## 2.4 Per-plan loop` heading (the Phase 2 execute/resume entry after the §2.0 gates) |
|
|
309
309
|
| `rescheduling-checkpoint` | `mstar-iteration/references/phase-2-worktree-lease.md` §2.4 (`### Rescheduling checkpoint`) |
|
|
310
310
|
|
|
311
|
+
### Session identity association (host → `plan bind`)
|
|
312
|
+
|
|
313
|
+
Two comparisons this surface makes — the `phase-1-lock` readiness checkpoint and the `direction-lock` start-authority scan — compare the **engine** session id with the **host** session id, so they are one identifier only when the engine was told which one to adopt. The model-handoff extension closes that gap on the host side: each `bash` tool call of its session is revised to carry the host session id in **`MSTAR_HOST_SESSION_ID`** — an overwrite of any caller-supplied value under that name, `bash` only, nothing injected for a host session with no id, and no engine or harness write, notice or state. A fresh `mstar plan bind` resolves its identity **`--session-id` → `MSTAR_HOST_SESSION_ID` → the engine-generated id**: the flag wins and is taken verbatim, the injected variable is the fallback (trimmed; empty or whitespace-only counts as absent), and the generated default is unchanged. One host session may hold both sessions a workflow needs — a coordinator session and a plan-pm session — both carrying the same host-derived `session_id`; the engine distinguishes the two envelopes by the role-scoped file name (`<role>-<session-id>.json`). `--resume` never re-identifies and refuses `--session-id` as a usage error.
|
|
314
|
+
|
|
315
|
+
No comparison is relaxed. An **absent** association (nothing injected, or a host session with no id) and a **foreign** one (the id belongs to another session) still refuse: readiness keeps failing its `binding-invalid` code, the start-authority refusals (`task-session`, `plan-pm-session`, `coordinator-elsewhere`) keep their codes, and an id the engine cannot use as the envelope's file name is refused with `coordination.invalid-session-id` before any write. Other hosts are unaffected — this extension is the only producer of the variable, so a bind elsewhere keeps the engine-generated id unless the variable is set in that session's environment.
|
|
316
|
+
|
|
311
317
|
### Auto-trigger boundary — the diagnosed failure mode
|
|
312
318
|
|
|
313
319
|
Neither extension ever arms, binds or checkpoints by itself:
|
|
@@ -334,19 +340,19 @@ The Phase-2 diagnostic path stays deduplicated by code per generation — at mos
|
|
|
334
340
|
|
|
335
341
|
| Anchor | Call (exact) | When | Prerequisite | Required |
|
|
336
342
|
|---|---|---|---|---|
|
|
337
|
-
| `
|
|
338
|
-
| `phase-1-lock` | `mstar_model_handoff {operation:"phase1-complete", workflowId, coordinatorSessionPath, mainWorktreeBranch, reviews[], plans[]}` | Phase 1 completion — after the integration checkout exists, the reviewed changes are committed there and that branch is pushed (§2.3 integration-worktree checklist tail); the compass/PM lock alone is **not** ready and not the moment | a `pending` binding from `
|
|
343
|
+
| `direction-lock` | `mstar_model_handoff {operation:"start", workflowId}` | once the direction is locked and before `## 1.3` writes the draft (`phase-1-prepare.md` §1.2 tail) — the arm happens **before** `mstar iteration register`, so the binding takes the unregistered reservation route; never before the direction is locked | native `modelHandoff` enabled; an explicitly named workflow id; this session is that workflow's coordinator | **required** — the call itself is unconditional; the arm inside it is conditional |
|
|
344
|
+
| `phase-1-lock` | `mstar_model_handoff {operation:"phase1-complete", workflowId, coordinatorSessionPath, mainWorktreeBranch, reviews[], plans[]}` | Phase 1 completion — after the integration checkout exists, the reviewed changes are committed there and that branch is pushed (§2.3 integration-worktree checklist tail); the compass/PM lock alone is **not** ready and not the moment | a `pending` binding from `direction-lock` **and** the four Phase-1 readiness facts | **required** — never a silent skip |
|
|
339
345
|
| `phase-2-entry` | `mstar_phase2 {operation:"bind", workflowId, coordinatorSessionPath}` | the **Phase 2 execute/resume entry** — immediately before the per-plan loop (§2.4), after the §2.0 gates; also required on a no-argument `/iteration-drive` resume. **Not** the Phase-1-reused integration-worktree step (§2.3), which triggers nothing | accepted phase `phase-2-execute`; a `coordinator`-role session envelope; the caller's checkout = main worktree or the recorded integration worktree | **required** |
|
|
340
346
|
| `rescheduling-checkpoint` | `mstar_phase2 {operation:"checkpoint", reason, decision, note}` | **one call per** `Rescheduling checkpoint` re-evaluation (§2.4), including every settle notification | a live `phase-2-entry` binding in this session | **required** per re-evaluation — never batched, never skipped |
|
|
341
347
|
|
|
342
|
-
#### `
|
|
348
|
+
#### `direction-lock` — `mstar_model_handoff {operation:"start", workflowId}`
|
|
343
349
|
|
|
344
350
|
- **Exact parameters**: `workflowId` (string, required) — the only field a caller supplies that matters here; `coordinatorSessionPath` / `mainWorktreeBranch` are accepted by the schema but unused on this path. Authority, entry route, intent and task-session state are host-derived, never call-declared.
|
|
345
|
-
- **Two structural routes (host-derived)**: the public tool keeps `{operation:"start", workflowId}` — no mode, session credential or authority claim is accepted from the caller. The adapter classifies the branch from the validated root register for that explicit id, never from a newest/unique-workflow inference. **Unregistered workflow** → the
|
|
346
|
-
- **When**: once the
|
|
351
|
+
- **Two structural routes (host-derived)**: the public tool keeps `{operation:"start", workflowId}` — no mode, session credential or authority claim is accepted from the caller. The adapter classifies the branch from the validated root register for that explicit id, never from a newest/unique-workflow inference. **Unregistered workflow** → the reservation path, which is the **expected route** at this anchor: a new iteration has no register row, no snapshot and no compass yet, so root validation is unchanged, the three existing-artifact refusals keep their code and byte-identical messages, and a correctly timed call never trips them — `already-bound`: `workflow <id> is already registered in the root register — a new start never adopts it` · `a workflow snapshot already exists at <snapshotPath>` · `an iteration compass already exists at <compassPath>` (tripping one of them means the call came too late — after `mstar iteration register` — or named the wrong id). **Already-registered workflow** → attach, the **re-entry / abnormal-order case** (for example a coordinator that arms only once the register has landed): the named active register row (exactly one) and the workflow's actual own snapshot, identity and canonical paths are revalidated rather than trusted from the branch classification — on this branch an existing own snapshot/compass is expected, not an adoption refusal — and the start proceeds through the unchanged one-shot arm protocol to `pending` only after the existing authority derivation allows this session. Attach structural failures refuse through the existing vocabulary — `invalid-root` (absent register, vanished or malformed row, missing or mismatched snapshot, wrong canonical path), plus the pre-existing `not-coordinator` / `invalid-workflow` input checks unchanged — with no fallback into reservation and no state write. No new refusal code and no public tool mode is introduced by either branch.
|
|
352
|
+
- **When**: once the direction is locked and before `## 1.3` writes the draft — the tail of `mstar-iteration/references/phase-1-prepare.md` §1.2, immediately before the compass/plans draft. The call precedes `mstar iteration register` (§1.5), so the binding takes the unregistered reservation route; the workflow id is chosen during scope definition (§1.2) and names a workflow that does not exist yet — that is the expected state, never a reason to skip the call. A PM that has not completed its route's lock step must not make the call.
|
|
347
353
|
- **Required or optional**: **required** and unconditional — make the call even when the preference is off, because `preference-off` is then the expected non-fatal answer and its absence from the ledger is what makes the silence undiagnosable. One call per iteration; a second arm of the same workflow is refused.
|
|
348
354
|
- **No-op refusals** (visible in the tool result, **nothing changed**, model unchanged — not failures to fix beyond the stated cause): `preference-off` (not an error) · `already-bound` (the three reservation refusals under **Two structural routes** above; a pending/uncertain/terminal same-workflow binding in this session's ledger — a terminal binding is never re-armed; or, on the attach branch, the foreign-coordinator outcome described under **Authority refusals** below) · `suspended` (state `none`; a navigation is in flight, retry in a moment) · `in-flight` / `arm-in-flight` (a previous handoff action is still running).
|
|
349
|
-
- **Authority refusals** (this session is not the iteration coordinator — fix the session, not the call; no model action, no binding written): `task-session` (leaf/subagent session, or a session with no id) · `scoped-plan-route` (the last observed entry was the scoped-plan PM route, which restores a binding and never arms a new one) · `plan-pm-session` · `coordinator-elsewhere` (this session coordinates another workflow, or the workflow belongs to another session) · `envelope-invalid` · `register-invalid` (unreadable or invalid v2 root register / workflow snapshot). The derivation and its six-code vocabulary are the same on both routes. One approved observable mapping exists on the attach branch only: when the named registered workflow's own coordinator envelope names a different session, that decision — carrying an internal typed discriminator, itself not a refusal code or exported symbol — surfaces as `already-bound` with the original detail, `workflow <id> is bound to coordinator session <sessionId>, not to this session`. Every other authority failure keeps its original code on both routes, including `coordinator-elsewhere` when this session coordinates a different workflow.
|
|
355
|
+
- **Authority refusals** (this session is not the iteration coordinator — fix the session, not the call; no model action, no binding written): `task-session` (leaf/subagent session, or a session with no id) · `scoped-plan-route` (the last observed entry was the scoped-plan PM route, which restores a binding and never arms a new one) · `plan-pm-session` · `coordinator-elsewhere` (this session coordinates another workflow, or the workflow belongs to another session) · `envelope-invalid` · `register-invalid` (unreadable or invalid v2 root register / workflow snapshot). The derivation and its six-code vocabulary are the same on both routes; authority is decided by the adapter's `deriveStartAuthority` from host and engine facts, never by the call. At this anchor the named workflow has no coordinator session envelope yet — envelopes are written by `plan bind` / registration-time coordination, which follow the draft — so the derivation rests on that function's host-fact checks alone, the E1 trusted-assertion boundary already documented for a brand-new iteration at `packages/omp/src/extensions/model-handoff.ts:35-39`. The anchor move neither strengthens nor replaces that boundary and relaxes no envelope check. One approved observable mapping exists on the attach branch only: when the named registered workflow's own coordinator envelope names a different session, that decision — carrying an internal typed discriminator, itself not a refusal code or exported symbol — surfaces as `already-bound` with the original detail, `workflow <id> is bound to coordinator session <sessionId>, not to this session`. Every other authority failure keeps its original code on both routes, including `coordinator-elsewhere` when this session coordinates a different workflow.
|
|
350
356
|
- **Visible arm failures** (reported as failures; **no automatic retry**): `settings-read-failed` · `record-failed` · `slow-unresolved` · `slow-selection-failed` · `slow-selection-refused` · `arm-evidence-conflict`.
|
|
351
357
|
- **Host-level**: `tool-error` (the tool threw without touching model, ledger or engine state).
|
|
352
358
|
- **Success code**: `armed` (state `pending`) — the coordinator holds it until `phase-1-lock` fires or the handoff is cancelled.
|
|
@@ -357,7 +363,7 @@ The Phase-2 diagnostic path stays deduplicated by code per generation — at mos
|
|
|
357
363
|
- **When**: Phase 1 completion — **after** the integration worktree exists (recorded `integration_worktree_path`), the reviewed changes are committed on that checkout and `spec_integration_branch` is pushed: the tail of the §2.3 integration-worktree checklist, whose **step 7** performs that transfer + commit + push (Phase 1 reaches it through `iteration-start` §6). The compass/PM lock alone is **not** the moment — it leaves readiness items 3–4 unmet, so `not-ready` returns, the binding stays `pending`, and no later marker retries it. The call is made once, on the Phase 1 route; a Phase 2 resume that walks the same section must not repeat it — the binding is already terminal, so a repeat call returns `not-pending` (flagged as an error, since no `pending` binding exists any more) and is not required.
|
|
358
364
|
- **Required or optional**: **required**, and never a silent skip — every refusal lands in the tool result, and every state transition additionally as a durable session notice under `mstar:model-handoff-notice` (title semantics → **Coordinator-visible notices** above).
|
|
359
365
|
- **Readiness prerequisite (all four, re-checked at fire time)**: the sequential specialist returns for that iteration; the PM-confirmed Prepare gate for every registered plan with `compass status: locked`; a distinct same-repository integration checkout on its recorded branch; a remote tip equal to the validated integration HEAD. `evaluatePhaseGate` is a later-phase gate and is never readiness evidence; a draft compass, a lock alone, a missing checkout or an unpushed commit is not ready.
|
|
360
|
-
- **Refusals that leave the binding `pending`** (fix the stated cause and call again — **nothing was switched**): `not-ready` (carries `codes[]` naming the unmet readiness facts; not an error) · `preference-off` (`modelHandoff` off at fire time; not an error) · `settings-read-failed` (read once before and once after the readiness work) · `suspended` · `in-flight` · `record-failed` · `not-pending` (no binding — run `
|
|
366
|
+
- **Refusals that leave the binding `pending`** (fix the stated cause and call again — **nothing was switched**): `not-ready` (carries `codes[]` naming the unmet readiness facts; not an error) · `preference-off` (`modelHandoff` off at fire time; not an error) · `settings-read-failed` (read once before and once after the readiness work) · `suspended` · `in-flight` · `record-failed` · `not-pending` (no binding — run `direction-lock` first) · `binding-mismatch` (the call names a different workflow) · `invalid-completion-input` (the evidence shape above).
|
|
361
367
|
- **Terminal refusals** (**no retry**; the session keeps the model it actually has): `cancelled` (an unowned model change arrived while pending; not an error) · `target-unresolved` (`handoffTarget` unresolvable) · `switch-refused` / `switch-threw` (the host refused the selection).
|
|
362
368
|
- **Host-level**: `tool-error`. **Success code**: `handed_off` (state `handed_off`, with the actual model reported).
|
|
363
369
|
|
|
@@ -21,7 +21,11 @@ Document trade-offs for **each** shortlisted candidate (2–4), then lock **one*
|
|
|
21
21
|
|
|
22
22
|
## Lock outputs(must land on disk)
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
Persistence is **two-staged**: the lock record lands on disk before the `direction-lock` anchor; the compass draft is written from it afterwards(§1.3, after that anchor).
|
|
25
|
+
|
|
26
|
+
**1 — Lock time(before the anchor, before the draft)**: the five fields below land on disk as a **direction-lock record** — the fixed-name file `direction-lock.md` at the root of the iteration package directory(`{ITERATION_DIR}/<iteration-id>/`)。The package directory itself is created here, at lock time, ahead of the compass, so this record is the package's **first artifact**(§1.3 then writes the compass into the package that already exists)。This record — not the compass — is what satisfies the `direction-lock` anchor precondition **rationale recorded on disk**; the compass deliberately does not exist yet at that moment, so its absence is expected, not a missing input. **Lifecycle**: once the §1.3 draft has carried its five fields across(stage 2), the record **stays in the package** as the durable lock-time record — it is **not** deleted after being incorporated into the compass.
|
|
27
|
+
|
|
28
|
+
**2 — Compass draft(§1.3)**: the draft incorporates the record's five fields into the compass sections they populate today(`## Scope`, `## Decisions` rationale, `## Acceptance Criteria`, `## Non-Goals`; scale budget as the resulting plan-count cap)and into plan Scope as needed. Carry the recorded text across — do not re-derive or re-word the lock at draft time.
|
|
25
29
|
|
|
26
30
|
| Field | Content |
|
|
27
31
|
|-------|---------|
|
|
@@ -24,12 +24,13 @@ iteration-close (§3.2)
|
|
|
24
24
|
|
|
25
25
|
## `{ITERATION_DIR}/<iteration-id>/` 迭代 package(目录优先)
|
|
26
26
|
|
|
27
|
-
**Canonical layout**(新 iteration-start
|
|
27
|
+
**Canonical layout**(新 iteration-start **只写**此形态):除 `direction-lock.md` 外,列出的产物均在 **§1.3** 写入;**autonomous 路线**下 `<iteration-id>/` 目录**本身**在 `direction-lock` anchor 时刻创建(早于 compass 初稿),其**首个产物**即根级 `direction-lock.md`:
|
|
28
28
|
|
|
29
29
|
```text
|
|
30
30
|
{ITERATION_DIR}/
|
|
31
31
|
README.md # 根索引:每迭代一行 → 指向 <iteration-id>/
|
|
32
32
|
<iteration-id>/
|
|
33
|
+
direction-lock.md # autonomous 路线:锁定时刻落盘的方向记录(package 首产物;§1.3 后保留)
|
|
33
34
|
delivery-compass.md # 迭代状态 SSOT(frontmatter status)
|
|
34
35
|
README.md # 本迭代文档索引(有 guides/specs 时推荐)
|
|
35
36
|
guides/ # 探索笔记、过程指南、未锁定权衡
|
|
@@ -53,6 +53,11 @@ compass/plans 初稿落盘前,必须锁定**单一**迭代方向、成功标
|
|
|
53
53
|
|
|
54
54
|
**Autonomous branch resolve**:仅 `autonomous` 模式;解析顺序与 STOP 规则见 **`references/autonomous-direction-lock.md`**(勿把该顺序套用到 interactive 以跳过向用户确认)。
|
|
55
55
|
|
|
56
|
+
<!-- host-hook: direction-lock -->
|
|
57
|
+
> Execute the active host reference's `## Host hooks` declaration for `direction-lock`; this file defines no host action.
|
|
58
|
+
>
|
|
59
|
+
> 本 anchor 在**方向已锁定**(interactive:与用户收敛 / autonomous:方向 rationale 落盘)之后、**compass 与 plans 初稿落盘之前**执行。此时 workflow 尚未登记、compass 尚不存在,属预期状态 —— anchor 动作由 active host reference 的声明决定;登记(§1.5)发生在本步之后。
|
|
60
|
+
|
|
56
61
|
## 1.3 创建迭代 package + compass
|
|
57
62
|
|
|
58
63
|
创建 `{ITERATION_DIR}/<iteration-id>/`,写入 **`delivery-compass.md`**(canonical;**禁止**新写根目录 `<id>-delivery-compass.md`)。**必须**使用 `references/iteration-compass-template.md` 完整结构(YAML frontmatter + `## Roadmap Position` + close 占位节)。`end_date` 仅在 iteration-close 填入;禁止用正文 completion prose 替代 frontmatter `status`。按需创建 `guides/`、`specs/` 与 package `README.md`。
|
|
@@ -158,11 +163,6 @@ compass frontmatter 的 `iteration_base_branch` / `target_branch` **必须与**
|
|
|
158
163
|
|
|
159
164
|
**中途增减范围(已存在且仍在 Prepare 的 workflow)**:用户/产品批准的范围扩张**不得**手改受保护状态。先以 `mstar plan bind --coordinator --workflow <id>` 建立该 workflow 的 coordinator 会话,再经受守卫入口 `mstar workflow show-prepare` 读取快照与 compass 两个字节版本,并以 `mstar workflow amend-prepare` 追加已批准的 Todo 行、登记已 review 的 integration checkout 与 `plan_parallelism`(仅 Prepare 且无执行所有权时可用;无 force/replace/init 通道)。守卫与字段权威 → **`mstar-artifacts`** `references/status-and-residuals.md`「Prepare workflow amendment」;forms / exit codes → **`mstar-use-cli`** `references/plan-and-workflow.md`。
|
|
160
165
|
|
|
161
|
-
<!-- host-hook: iteration-entry -->
|
|
162
|
-
> Execute the active host reference's `## Host hooks` declaration for `iteration-entry`; this file defines no host action.
|
|
163
|
-
>
|
|
164
|
-
> 本 anchor 只在 workflow 已登记到 v2 状态面(本条完成)**且其 id 已知**之后执行 —— 登记之前没有可用的 workflow id。
|
|
165
|
-
|
|
166
166
|
## 1.5.5 产物边界(specs · iterations · knowledge)
|
|
167
167
|
|
|
168
168
|
Phase 1 与 §1.6 须遵守 **`references/iteration-artifact-boundaries.md`**(HARD):
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mstar-harness/dsh",
|
|
3
|
-
"version": "3.11.
|
|
3
|
+
"version": "3.11.2",
|
|
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",
|