@mstar-harness/dsh 3.1.1 → 3.1.3
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/README.md +2 -2
- package/README.zh.md +2 -2
- package/dist/gates/_shared.d.ts +4 -2
- package/dist/gates/status.d.ts +7 -1
- package/dist/gates/workflow-selection.d.ts +7 -0
- package/dist/index.js +248 -176
- package/harness-commands/iteration-drive.md +9 -90
- package/harness-commands/iteration-loop.md +22 -62
- package/harness-commands/iteration-start.md +20 -77
- package/harness-skills/mstar-audit/SKILL.md +2 -2
- package/harness-skills/mstar-compound-refresh/SKILL.md +1 -1
- package/harness-skills/mstar-dispatch-gates/SKILL.md +1 -1
- package/harness-skills/mstar-harness-core/SKILL.md +4 -3
- package/harness-skills/mstar-iteration/SKILL.md +16 -10
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +62 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +3 -3
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +1 -1
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +1 -1
- package/harness-skills/mstar-phase-gates/SKILL.md +1 -1
- package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +2 -2
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +1 -1
- package/harness-skills/mstar-plan-conventions/SKILL.md +1 -1
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +11 -1
- package/harness-skills/mstar-roles/references/architect.md +4 -7
- package/harness-skills/mstar-roles/references/code-reviewer.md +1 -4
- package/harness-skills/mstar-roles/references/frontend-dev.md +2 -4
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +2 -4
- package/harness-skills/mstar-roles/references/ops-engineer.md +2 -6
- package/harness-skills/mstar-roles/references/product-manager.md +4 -7
- package/harness-skills/mstar-roles/references/prompt-engineer.md +2 -5
- package/harness-skills/mstar-roles/references/qa-engineer.md +2 -6
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +1 -4
- package/harness-skills/mstar-roles/references/writing-specialist.md +2 -5
- package/harness-skills/mstar-strategy/SKILL.md +5 -35
- package/package.json +15 -15
package/README.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
English | [中文](README.zh.md)
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
[Morning Star](https://github.com/btspoony/mstar-harness) as a first-class dsh (DeepSeek Harness) host — a cordis function plugin that mounts the mstar engine in-process, implements the engine `HostAdapter` (`host: 'dsh'`), guards `{HARNESS_DIR}/status.json` writes (validate + advisory; repair-escape under hard), blocks disallowed subagent dispatches when `Enforcement: hard` is on, lints `SKILL.md` writes under the mounted skill roots, mounts the mstar `skills/` mirror through the dsh skill-filesystem provider (single canonical mount), and appends a durable `mstar-engine-status` catalog row to every composed agent step. Boot with a dsh Loader app; everything acts through the seam's refusal/advisory channels, never by patching the tools.
|
|
8
8
|
|
|
@@ -561,7 +561,7 @@ The catalog row is appended at the END of the composed step messages, after dele
|
|
|
561
561
|
- **Entry is a module index over `src/gates/*`** — the split shipped: `src/index.ts` (371 lines) re-exports the frozen 47-name export surface (28 value + 19 type-only names; `Config` counts once) from the gate modules (`_shared` / `status` / `skill-lint` / `seams` / `dispatch` / `catalog` / `tools` / `adapter`) and keeps the plugin manifest, the single cordis augmentation point, the command registration, and the `apply()` startup wiring. The surface is frozen by `tests/export-surface.spec.ts` — the runtime value-export set plus, under `typecheck:tests` (`bunx tsc --noEmit -p tests/tsconfig.json`), the value-namespace identity and the per-name type-only probes.
|
|
562
562
|
- **Engine dsh rows are upstreaming-destined** — the dsh changes to engine `host.ts` (`DetectResult`, `ToolSignal`, `resolveSkillRoot`) live in the mstar-workflow engine mirror and are intended for a user-authorized upstream PR into mstar-harness; the `mstar-host` skill mirror (§ Detect / § Resolve loaded skill root / `references/dsh.md`) updates with it.
|
|
563
563
|
- **Iteration stepper: Step 1 is compass-driven, Step 5 is schema-driven** — the zone dashboard's Step 1 (iteration-start) is the current step while the steering compass is `status: active` (Phase 1 in flight — no gate verdict, so no PASS/FAIL badge); Step 5 (merge-ready) is a schema constant the engine gate never lights as current (transition covers Phase 2→3→4 only), so it always renders idle — recorded in the iteration guide, not a defect. The full panel-limitation list lives in the Web client plugin section.
|
|
564
|
-
- **`dsh-llm-fallbacks` is a registry `dependencies` entry with type-only imports** —
|
|
564
|
+
- **`dsh-llm-fallbacks` is a registry `dependencies` entry with type-only imports** — caret range lives in `package.json` (the probe shape-assertion test is the executable drift gate) and `--external` in the build, so `dist/` carries no bundled runtime import (only three string literals naming the package — the probe's loader-entry match and the two decoration log lines; the advisory logs say `fallbacks`); activation is a SEPARATE explicit install (two-command contract), never transitive. The library-form dependency exists so future value imports resolve without a manifest change; `--external` remains the guard.
|
|
565
565
|
- **Role→model override NOT delivered this batch** — routing a role to a fallbacks `model` (or persona via fallbacks rules) would require rewriting the child's `agentOptions` on the start request, but start-request options are caller-controlled (tool-subagent's own Config; call args are `description`/`prompt`/`run_in_background` only, deep-frozen). Awaits upstream `fallbacks-explicit-role-tool` or the N-B1 systemPrompt adoption (roadmap §10.4).
|
|
566
566
|
- **Decoration is a minimal per-child section, not the N-B1 systemPrompt adoption** — `mstar:role-persona` is one agent-scoped section on the child's context; no harness-rules sections, no PromptContext, no variables. N-B1 (roadmap §10.4) may absorb or replace this channel later without changing the observable (AC-3).
|
|
567
567
|
- **Persona injection is fallbacks-independent** — `dsh-llm-fallbacks` only routes LLM failures; it is never required for decoration. Unmounted → the same persona lands from the mstar Config through the same channel with one debug log (AC-4). If `ctx.get('agents')` is absent in a composition (no dsh-agent), decoration is skipped with one debug log.
|
package/README.zh.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
[English](README.md) | 中文
|
|
4
4
|
|
|
5
|
-

|
|
6
6
|
|
|
7
7
|
让 [Morning Star](https://github.com/btspoony/mstar-harness) 成为一等公民的 dsh(DeepSeek Harness)宿主——一个 cordis 函数插件,将 mstar engine 进程内挂载,实现 engine `HostAdapter`(`host: 'dsh'`),守护 `{HARNESS_DIR}/status.json` 写入(校验 + 咨询;hard 下按修复逃生放行),在 `Enforcement: hard` 开启时阻止被禁止的 subagent 派发,对挂载技能根下的 `SKILL.md` 写入执行技能撰写 lint,通过 dsh skill-filesystem 提供者挂载 mstar `skills/` 镜像(单一规范挂载),并向每个组合后的 agent 步骤追加一条持久化的 `mstar-engine-status` catalog 行。随 dsh Loader 应用启动;一切均通过 seam 的拒绝/咨询通道行使职责,从不改动工具本身。
|
|
8
8
|
|
|
@@ -334,7 +334,7 @@ catalog 行在委托之后追加到组合步骤消息的**末尾**——请求
|
|
|
334
334
|
- **入口是 `src/gates/*` 之上的模块索引**——拆分已交付:`src/index.ts`(371 行)从各 gate 模块(`_shared` / `status` / `skill-lint` / `seams` / `dispatch` / `catalog` / `tools` / `adapter`)原样 re-export 冻结的 47 名导出面(28 值导出 + 19 type-only 名;`Config` 计一次),并保留插件 manifest、单一 cordis augmentation 点、命令注册与 `apply()` 启动接线。导出面由 `tests/export-surface.spec.ts` 冻结——运行时值导出集 + `typecheck:tests`(`bunx tsc --noEmit -p tests/tsconfig.json`)下的值命名空间恒等与逐名类型探测。
|
|
335
335
|
- **engine dsh 行待上游化**——engine `host.ts` 的 dsh 改动(`DetectResult`、`ToolSignal`、`resolveSkillRoot`)位于 mstar-workflow engine 镜像,计划经用户授权的上游 PR 合入 mstar-harness;`mstar-host` 技能镜像(§ Detect / § Resolve loaded skill root / `references/dsh.md`)随之一并更新。
|
|
336
336
|
- **迭代 stepper:Step 1 为 compass 驱动,Step 5 为 schema 驱动**——zone dashboard 的 Step 1(iteration-start)在 steering compass `status: active`(Phase 1 进行中)时为当前步(无 gate 判定 → 无 PASS/FAIL 徽标);Step 5(merge-ready)是 engine 闸门永不点亮为当前的 schema 常量(transition 只覆盖 Phase 2→3→4,merge-ready 从不是 gate transition);仅当 Step 4 为当前步时作为 `next` 渲染,其余为 idle——已记录于迭代 guide,非缺陷。完整面板限制清单见 Web 客户端插件一节。
|
|
337
|
-
- **`dsh-llm-fallbacks` 为 registry `dependencies`
|
|
337
|
+
- **`dsh-llm-fallbacks` 为 registry `dependencies` 条目且仅类型导入**——caret 范围写在 `package.json`(探测形状断言测试是可执行的漂移闸门)并在构建中 `--external`,因此 `dist/` 无打包运行时导入(仅 3 处命名该包的字符串字面量——探测的 loader 条目匹配与两条装饰日志;建议日志写作 `fallbacks`);激活是**单独显式安装**(双命令契约),绝不传递。库形态依赖存在是为未来值导入无需改 manifest 即可解析;`--external` 仍是护栏。
|
|
338
338
|
- **本批次未交付角色→模型覆盖**——把角色路由到 fallbacks `model`(或经 fallbacks 规则路由 persona)需要改写启动请求上的子会话 `agentOptions`,但启动请求选项由调用方控制(tool-subagent 自己的 Config;调用参数仅为 `description`/`prompt`/`run_in_background`,且深度冻结)。等待上游 `fallbacks-explicit-role-tool` 或 N-B1 systemPrompt 采纳(roadmap §10.4)。
|
|
339
339
|
- **装饰是最小化的每子会话段,而非 N-B1 systemPrompt 采纳**——`mstar:role-persona` 是子上下文上的一个 agent 作用域段;无 harness 规则段、无 PromptContext、无变量。N-B1(roadmap §10.4)日后可吸收或替换该通道而不改变可观察行为(AC-3)。
|
|
340
340
|
- **persona 注入与 fallbacks 无关**——`dsh-llm-fallbacks` 只路由 LLM 失败;装饰从不依赖它。未挂载 → 同一 persona 经同一通道来自 mstar Config,仅多一条 debug 日志(AC-4)。若组合中缺 `ctx.get('agents')`(无 dsh-agent),装饰以一条 debug 日志跳过。
|
package/dist/gates/_shared.d.ts
CHANGED
|
@@ -35,8 +35,10 @@ export interface Config {
|
|
|
35
35
|
* as the anti-recursion binding: an Assignment whose `Execute as` equals this
|
|
36
36
|
* role is a self-dispatch (critical violation — leaf executors must not
|
|
37
37
|
* re-invoke their own role). dsh exposes no agent role on the tool-execution
|
|
38
|
-
* context, so the deployment declares it. Absent → the
|
|
39
|
-
*
|
|
38
|
+
* context, so the deployment declares it. Absent → the empty binding FAILS
|
|
39
|
+
* CLOSED: every Assignment-shaped dispatch emits
|
|
40
|
+
* `dispatch.anti-recursion.empty-binding` (critical) until the binding is
|
|
41
|
+
* set.
|
|
40
42
|
*/
|
|
41
43
|
dispatchBinding?: string;
|
|
42
44
|
/**
|
package/dist/gates/status.d.ts
CHANGED
|
@@ -25,7 +25,13 @@ export interface StatusGateAdvisory {
|
|
|
25
25
|
target: string;
|
|
26
26
|
/** The gate verdict (warn-mode: `hardBlocked` false; hard repair escape: `hardBlocked` true). */
|
|
27
27
|
result: GateResult;
|
|
28
|
-
/**
|
|
28
|
+
/**
|
|
29
|
+
* Resolved enforcement flag: true whenever the gate ran under hard
|
|
30
|
+
* enforcement — for hard-mode repair escapes AND for degraded-hard
|
|
31
|
+
* advisories (f9: the catch emits `hard` reflecting ACTUAL enforcement,
|
|
32
|
+
* so a hard deployment can distinguish a dead control from a warn-only
|
|
33
|
+
* pass). False only for warn-mode advisories.
|
|
34
|
+
*/
|
|
29
35
|
hard: boolean;
|
|
30
36
|
/** True when hard mode allowed a write/edit to an ALREADY-invalid document (repair escape). */
|
|
31
37
|
repair?: boolean;
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import type { WorkflowSelectionView } from '../types.ts';
|
|
2
2
|
/** The active-set resolver result: the first active lifecycle or a clear error. */
|
|
3
3
|
export type ActiveWorkflowSelection = WorkflowSelectionView;
|
|
4
|
+
/**
|
|
5
|
+
* Test-only observability hook (plan 20260822-gate-fixes Task 3 / f12):
|
|
6
|
+
* whether a snapshot path is still cached. Production code never calls
|
|
7
|
+
* this — the eviction contract (delete → key gone) is asserted by the
|
|
8
|
+
* workflow-selection spec.
|
|
9
|
+
*/
|
|
10
|
+
export declare function _terminalStatusCacheHas(snapshotPath: string): boolean;
|
|
4
11
|
/**
|
|
5
12
|
* Resolve the ACTIVE lifecycle set (root v2 `status.json` `workflows[]` —
|
|
6
13
|
* the list holds non-terminal lifecycles only, removal-at-terminal). This
|