@mstar-harness/dsh 2.4.0 → 3.0.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.
Files changed (80) hide show
  1. package/README.i18n.yaml +2 -2
  2. package/README.md +10 -8
  3. package/README.zh.md +7 -5
  4. package/bundle/README.md +4 -4
  5. package/dist/client/panel/graph/project-graph.d.ts +29 -3
  6. package/dist/client/panel/locale.d.ts +1 -1
  7. package/dist/client/panel/zones/ProjectRollup.d.ts +24 -0
  8. package/dist/client.js +270 -34
  9. package/dist/gates/_shared.d.ts +4 -4
  10. package/dist/gates/adapter.d.ts +38 -12
  11. package/dist/gates/agent-flow.d.ts +109 -12
  12. package/dist/gates/dispatch.d.ts +16 -10
  13. package/dist/gates/goal-bridge.d.ts +1 -1
  14. package/dist/gates/status.d.ts +64 -14
  15. package/dist/gates/system-prompt.d.ts +6 -2
  16. package/dist/gates/workflow-ledger.d.ts +88 -17
  17. package/dist/gates/workflow-policy.d.ts +2 -1
  18. package/dist/gates/workflow-selection.d.ts +31 -0
  19. package/dist/index.d.ts +1 -1
  20. package/dist/index.js +1532 -692
  21. package/dist/service.d.ts +14 -9
  22. package/dist/types.d.ts +64 -2
  23. package/harness-agents/code-reviewer.md +0 -8
  24. package/harness-skills/mstar-branch-worktree/SKILL.md +14 -14
  25. package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +2 -2
  26. package/harness-skills/mstar-compound/SKILL.md +2 -2
  27. package/harness-skills/mstar-compound/references/compound-workflow.md +3 -3
  28. package/harness-skills/mstar-compound-refresh/SKILL.md +4 -4
  29. package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +1 -1
  30. package/harness-skills/mstar-dispatch-gates/SKILL.md +2 -2
  31. package/harness-skills/mstar-engine-legacy/SKILL.md +53 -0
  32. package/harness-skills/mstar-engine-legacy/references/anti-recursion-checklists.md +58 -0
  33. package/harness-skills/mstar-engine-legacy/references/engine-check-boilerplate.md +26 -0
  34. package/harness-skills/mstar-engine-legacy/references/lease-protocol.md +92 -0
  35. package/harness-skills/mstar-engine-legacy/references/qc-seat-n-restatements.md +57 -0
  36. package/harness-skills/mstar-engine-legacy/references/status-field-history.md +186 -0
  37. package/harness-skills/mstar-harness-core/SKILL.md +6 -3
  38. package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +8 -8
  39. package/harness-skills/mstar-host/references/codex.md +1 -1
  40. package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +19 -8
  41. package/harness-skills/mstar-host/references/cursor.md +5 -5
  42. package/harness-skills/mstar-host/references/dsh.md +10 -7
  43. package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +3 -3
  44. package/harness-skills/mstar-host/references/kimi.md +1 -1
  45. package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +2 -2
  46. package/harness-skills/mstar-host/references/omp.md +2 -2
  47. package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +3 -3
  48. package/harness-skills/mstar-host/references/zcode.md +1 -1
  49. package/harness-skills/mstar-iteration/SKILL.md +38 -37
  50. package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +2 -2
  51. package/harness-skills/mstar-iteration/references/iteration-compass-template.md +3 -3
  52. package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +50 -38
  53. package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +7 -7
  54. package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +2 -2
  55. package/harness-skills/mstar-phase-gates/SKILL.md +3 -3
  56. package/harness-skills/mstar-plan-artifacts/SKILL.md +21 -23
  57. package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +6 -6
  58. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +10 -10
  59. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +190 -309
  60. package/harness-skills/mstar-plan-artifacts/templates/README.md +1 -3
  61. package/harness-skills/mstar-plan-artifacts/templates/status.empty.json +2 -4
  62. package/harness-skills/mstar-plan-conventions/SKILL.md +53 -13
  63. package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +6 -3
  64. package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +9 -10
  65. package/harness-skills/mstar-project-governance/SKILL.md +118 -0
  66. package/harness-skills/mstar-review-qc/SKILL.md +3 -3
  67. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +1 -1
  68. package/harness-skills/mstar-roles/references/project-manager/plan-management.md +6 -8
  69. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +6 -6
  70. package/harness-skills/mstar-roles/references/project-manager.md +7 -7
  71. package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +1 -1
  72. package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +1 -1
  73. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +1 -1
  74. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +2 -2
  75. package/harness-skills/mstar-sdd/SKILL.md +2 -2
  76. package/harness-skills/mstar-sdd/references/file-handoffs.md +1 -1
  77. package/package.json +14 -14
  78. package/harness-skills/mstar-plan-artifacts/references/done-compaction.md +0 -88
  79. package/harness-skills/mstar-plan-artifacts/templates/notes.empty.json +0 -5
  80. package/harness-skills/mstar-plan-artifacts/templates/plans-done.empty.json +0 -3
package/dist/client.js CHANGED
@@ -120,6 +120,10 @@ var zh = {
120
120
  "zone.tasks.no-plans": "暂无计划",
121
121
  "zone.tasks.more": "+{count} 更多",
122
122
  "zone.tasks.collapse": "收起",
123
+ "zone.project.title": "项目汇总",
124
+ "zone.project.milestones": "里程碑",
125
+ "zone.project.residuals": "未结残留",
126
+ "zone.project.none": "无",
123
127
  "zone.state.Todo": "待办",
124
128
  "zone.state.InProgress": "进行中",
125
129
  "zone.state.InReview": "审查中",
@@ -147,6 +151,8 @@ var zh = {
147
151
  "flow.advisory": "提示",
148
152
  "flow.denied": "拒绝",
149
153
  "state.title": "工作区状态",
154
+ "state.selection": "所选工作流",
155
+ "state.selection.history": "历史视图(终端快照)",
150
156
  "state.plans": "计划",
151
157
  "state.residuals": "未决残留",
152
158
  "state.policy": "策略",
@@ -235,6 +241,10 @@ var en = {
235
241
  "zone.tasks.no-plans": "no plans",
236
242
  "zone.tasks.more": "+{count} more",
237
243
  "zone.tasks.collapse": "collapse",
244
+ "zone.project.title": "Project Rollup",
245
+ "zone.project.milestones": "Milestones",
246
+ "zone.project.residuals": "Open Residuals",
247
+ "zone.project.none": "none",
238
248
  "zone.state.Todo": "Todo",
239
249
  "zone.state.InProgress": "InProgress",
240
250
  "zone.state.InReview": "InReview",
@@ -262,6 +272,8 @@ var en = {
262
272
  "flow.advisory": "advisory",
263
273
  "flow.denied": "denied",
264
274
  "state.title": "Workspace state",
275
+ "state.selection": "Selected workflow",
276
+ "state.selection.history": "history view (terminal snapshot)",
265
277
  "state.plans": "Plans",
266
278
  "state.residuals": "Open residuals",
267
279
  "state.policy": "Policy",
@@ -962,6 +974,29 @@ var css = `
962
974
  overflow-wrap: anywhere;
963
975
  }
964
976
 
977
+
978
+ .\\34 364e615_selection {
979
+ margin: 0;
980
+ overflow-wrap: anywhere;
981
+ }
982
+
983
+ .\\30 ae21b10_selectionId {
984
+ font-weight: 600;
985
+ }
986
+
987
+ .\\35 e43d3a8_selectionMeta,
988
+ .da64723f_selectionWarning {
989
+ display: block;
990
+ color: var(--dsw-alias-label-caption);
991
+ font: var(--dsw-font-xxxs-11);
992
+ }
993
+
994
+ .ac988a64_selectionCode {
995
+ color: var(--dsw-alias-label-secondary);
996
+ font: var(--dsw-font-xxxs-11);
997
+ font-weight: 600;
998
+ }
999
+
965
1000
  .\\31 8a7beee_empty {
966
1001
  margin: 0;
967
1002
  color: var(--dsw-alias-label-caption);
@@ -993,7 +1028,7 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
993
1028
  tag.textContent = css;
994
1029
  document.head.appendChild(tag);
995
1030
  }
996
- var panel_module_default = { root: "20fd0e45_root", emptyRoot: "f83e09fa_emptyRoot", noHarnessCard: "58245a20_noHarnessCard", noHarnessIcon: "ffb65da7_noHarnessIcon", noHarnessTitle: "81e1817c_noHarnessTitle", noHarnessHint: "a2289da7_noHarnessHint", sidebar: "c87acfc7_sidebar", iterationHeadSplit: "77aea5a6_iterationHeadSplit", iterationBranches: "c3b8dcb0_iterationBranches", main: "ea90e208_main", tabNav: "4bb38bc9_tabNav", tab: "98f72e4c_tab", tabActive: "59e199de_tabActive", content: "90bec3c2_content", iterationPage: "3b1c4147_iterationPage", iterationHead: "8a629a8e_iterationHead", iterationSummary: "2d1bee34_iterationSummary", iterationSummaryId: "17162a99_iterationSummaryId", iterationSummaryVerdict: "d3d74135_iterationSummaryVerdict", iterationSummaryStatus: "d9a886be_iterationSummaryStatus", iterationSummaryStatusMuted: "13bf2f41_iterationSummaryStatusMuted", iterationSummaryHint: "ede5708d_iterationSummaryHint", iterationHeadBody: "64d1da62_iterationHeadBody", iterationStepsRow: "c52f7b85_iterationStepsRow", iterationStepItem: "81013a9d_iterationStepItem", iterationStepBadge: "7befde45_iterationStepBadge", iterationStepPhase: "d6cd23a5_iterationStepPhase", iterationStepChip: "de293024_iterationStepChip", iterationVerdictSeat: "afea5850_iterationVerdictSeat", iterationVerdict: "ebe6bbcd_iterationVerdict", iterationBranchesTitle: "e6921da6_iterationBranchesTitle", iterationBranchList: "8a2cd65c_iterationBranchList", iterationBranchRow: "997b0230_iterationBranchRow", iterationBranchLabel: "6cafc032_iterationBranchLabel", iterationBranchValue: "cdcd06ed_iterationBranchValue", iterationTasks: "87f7efbe_iterationTasks", sidebarScroll: "a0b80516_sidebarScroll", meta: "81fe4f58_meta", metaLine: "0fc275e2_metaLine", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", subTitle: "b7190159_subTitle", defList: "26763614_defList", defTerm: "670df156_defTerm", defValue: "3f1b3a05_defValue", planList: "a129f16e_planList", residualList: "113e0aa2_residualList", leaseList: "33dfcc85_leaseList", violationList: "999efdc0_violationList", planId: "744bf63f_planId", leasePlan: "560663a6_leasePlan", leaseHolder: "a68a6d03_leaseHolder", leaseWorktree: "db027b44_leaseWorktree", findingSeverity: "1797fd51_findingSeverity", findingTitle: "c80b7bb0_findingTitle", findingPlan: "616667ad_findingPlan", violationCode: "e42c0bfd_violationCode", knowledgeCategories: "e2098247_knowledgeCategories", planStatus: "a3021d7c_planStatus", truncated: "1849d129_truncated", knowledge: "3eb5feeb_knowledge", direction: "df6dc76a_direction", empty: "18a7beee_empty", freshness: "c75c59b0_freshness" };
1031
+ var panel_module_default = { root: "20fd0e45_root", emptyRoot: "f83e09fa_emptyRoot", noHarnessCard: "58245a20_noHarnessCard", noHarnessIcon: "ffb65da7_noHarnessIcon", noHarnessTitle: "81e1817c_noHarnessTitle", noHarnessHint: "a2289da7_noHarnessHint", sidebar: "c87acfc7_sidebar", iterationHeadSplit: "77aea5a6_iterationHeadSplit", iterationBranches: "c3b8dcb0_iterationBranches", main: "ea90e208_main", tabNav: "4bb38bc9_tabNav", tab: "98f72e4c_tab", tabActive: "59e199de_tabActive", content: "90bec3c2_content", iterationPage: "3b1c4147_iterationPage", iterationHead: "8a629a8e_iterationHead", iterationSummary: "2d1bee34_iterationSummary", iterationSummaryId: "17162a99_iterationSummaryId", iterationSummaryVerdict: "d3d74135_iterationSummaryVerdict", iterationSummaryStatus: "d9a886be_iterationSummaryStatus", iterationSummaryStatusMuted: "13bf2f41_iterationSummaryStatusMuted", iterationSummaryHint: "ede5708d_iterationSummaryHint", iterationHeadBody: "64d1da62_iterationHeadBody", iterationStepsRow: "c52f7b85_iterationStepsRow", iterationStepItem: "81013a9d_iterationStepItem", iterationStepBadge: "7befde45_iterationStepBadge", iterationStepPhase: "d6cd23a5_iterationStepPhase", iterationStepChip: "de293024_iterationStepChip", iterationVerdictSeat: "afea5850_iterationVerdictSeat", iterationVerdict: "ebe6bbcd_iterationVerdict", iterationBranchesTitle: "e6921da6_iterationBranchesTitle", iterationBranchList: "8a2cd65c_iterationBranchList", iterationBranchRow: "997b0230_iterationBranchRow", iterationBranchLabel: "6cafc032_iterationBranchLabel", iterationBranchValue: "cdcd06ed_iterationBranchValue", iterationTasks: "87f7efbe_iterationTasks", sidebarScroll: "a0b80516_sidebarScroll", meta: "81fe4f58_meta", metaLine: "0fc275e2_metaLine", section: "fcdd0ccc_section", sectionTitle: "aded23ea_sectionTitle", subTitle: "b7190159_subTitle", defList: "26763614_defList", defTerm: "670df156_defTerm", defValue: "3f1b3a05_defValue", planList: "a129f16e_planList", residualList: "113e0aa2_residualList", leaseList: "33dfcc85_leaseList", violationList: "999efdc0_violationList", planId: "744bf63f_planId", leasePlan: "560663a6_leasePlan", leaseHolder: "a68a6d03_leaseHolder", leaseWorktree: "db027b44_leaseWorktree", findingSeverity: "1797fd51_findingSeverity", findingTitle: "c80b7bb0_findingTitle", findingPlan: "616667ad_findingPlan", violationCode: "e42c0bfd_violationCode", knowledgeCategories: "e2098247_knowledgeCategories", planStatus: "a3021d7c_planStatus", truncated: "1849d129_truncated", knowledge: "3eb5feeb_knowledge", direction: "df6dc76a_direction", selection: "4364e615_selection", selectionId: "0ae21b10_selectionId", selectionMeta: "5e43d3a8_selectionMeta", selectionWarning: "da64723f_selectionWarning", selectionCode: "ac988a64_selectionCode", empty: "18a7beee_empty", freshness: "c75c59b0_freshness" };
997
1032
 
998
1033
  // src/client/panel/guards.ts
999
1034
  function str(value) {
@@ -1241,6 +1276,7 @@ function projectGraph(source) {
1241
1276
  }
1242
1277
  const agents = projectAgents(source, currentStep);
1243
1278
  const flow = projectFlowEvents(source);
1279
+ const project = projectRollup(source);
1244
1280
  return {
1245
1281
  iteration: {
1246
1282
  active,
@@ -1253,6 +1289,7 @@ function projectGraph(source) {
1253
1289
  },
1254
1290
  tasks: { columns, total, truncated },
1255
1291
  agents,
1292
+ project,
1256
1293
  verdict,
1257
1294
  violations,
1258
1295
  events: flow.events,
@@ -1260,6 +1297,16 @@ function projectGraph(source) {
1260
1297
  degraded
1261
1298
  };
1262
1299
  }
1300
+ function projectRollup(source) {
1301
+ const state = stateRow(source);
1302
+ const project = state?.project;
1303
+ const milestones = Array.isArray(project?.milestones) ? project.milestones.filter((milestone) => typeof milestone === "string" && milestone !== "") : [];
1304
+ const openResiduals = Array.isArray(project?.openResiduals) ? project.openResiduals.map((row) => {
1305
+ const r = row;
1306
+ return { severity: str(r?.severity) ?? "", count: count(r?.count) ?? 0 };
1307
+ }) : [];
1308
+ return { milestones, openResiduals };
1309
+ }
1263
1310
  function bucketOf(role) {
1264
1311
  if (SDD_BUCKET_ROLES.implementor.includes(role))
1265
1312
  return "implementor";
@@ -1723,6 +1770,7 @@ function StateSection({ t, state, enforcement }) {
1723
1770
  const hiddenFindings = findings === null ? 0 : Math.max(0, findings.length - FINDINGS_CAP);
1724
1771
  const leases = Array.isArray(state?.leases) ? state.leases : [];
1725
1772
  const knowledge = state?.knowledge ?? null;
1773
+ const selection = state?.selection;
1726
1774
  return /* @__PURE__ */ jsx_runtime2.jsxs("section", {
1727
1775
  className: panel_module_default.section,
1728
1776
  "data-mstar-section": "state",
@@ -1731,6 +1779,55 @@ function StateSection({ t, state, enforcement }) {
1731
1779
  className: panel_module_default.sectionTitle,
1732
1780
  children: t("state.title")
1733
1781
  }),
1782
+ /* @__PURE__ */ jsx_runtime2.jsx("h3", {
1783
+ className: panel_module_default.subTitle,
1784
+ children: t("state.selection")
1785
+ }),
1786
+ selection?.kind === "active" ? /* @__PURE__ */ jsx_runtime2.jsxs("p", {
1787
+ className: panel_module_default.selection,
1788
+ "data-selection-kind": "active",
1789
+ "data-selection-workflow": selection.workflowId,
1790
+ children: [
1791
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
1792
+ className: panel_module_default.selectionId,
1793
+ children: selection.workflowId
1794
+ }),
1795
+ selection.warning !== undefined ? /* @__PURE__ */ jsx_runtime2.jsx("span", {
1796
+ className: panel_module_default.selectionWarning,
1797
+ "data-selection-warning": true,
1798
+ children: selection.warning.message
1799
+ }) : null
1800
+ ]
1801
+ }) : selection?.kind === "terminal" ? /* @__PURE__ */ jsx_runtime2.jsxs("p", {
1802
+ className: panel_module_default.selection,
1803
+ "data-selection-kind": "terminal",
1804
+ "data-selection-workflow": selection.workflowId,
1805
+ children: [
1806
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
1807
+ className: panel_module_default.selectionId,
1808
+ children: selection.workflowId
1809
+ }),
1810
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
1811
+ className: panel_module_default.selectionMeta,
1812
+ "data-selection-history": true,
1813
+ children: t("state.selection.history")
1814
+ })
1815
+ ]
1816
+ }) : /* @__PURE__ */ jsx_runtime2.jsxs("p", {
1817
+ className: panel_module_default.selection,
1818
+ "data-selection-kind": "error",
1819
+ "data-selection-code": selection?.code ?? t("panel.unknown"),
1820
+ children: [
1821
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
1822
+ className: panel_module_default.selectionCode,
1823
+ children: selection?.code ?? t("panel.unknown")
1824
+ }),
1825
+ /* @__PURE__ */ jsx_runtime2.jsx("span", {
1826
+ className: panel_module_default.selectionMeta,
1827
+ children: selection?.message ?? t("state.none")
1828
+ })
1829
+ ]
1830
+ }),
1734
1831
  /* @__PURE__ */ jsx_runtime2.jsx("h3", {
1735
1832
  className: panel_module_default.subTitle,
1736
1833
  children: t("state.plans")
@@ -2237,6 +2334,69 @@ var css2 = `
2237
2334
  color: var(--dsw-alias-label-secondary);
2238
2335
  }
2239
2336
 
2337
+
2338
+
2339
+
2340
+ .a2f9476f_zoneTitle {
2341
+ margin: var(--mstar-space-1) 0 0;
2342
+ color: var(--dsw-alias-label-secondary);
2343
+ font: var(--dsw-font-xxxs-11);
2344
+ font-weight: 600;
2345
+ letter-spacing: 0.03em;
2346
+ text-transform: uppercase;
2347
+ }
2348
+
2349
+ .\\31 ca74b3b_rollupList {
2350
+ display: flex;
2351
+ flex-direction: column;
2352
+ gap: var(--mstar-space-1);
2353
+ margin: 0;
2354
+ padding: 0;
2355
+ list-style: none;
2356
+ }
2357
+
2358
+ .\\33 71169b4_rollupItem {
2359
+ display: flex;
2360
+ align-items: center;
2361
+ justify-content: space-between;
2362
+ gap: var(--mstar-space-2);
2363
+ min-width: 0;
2364
+ }
2365
+
2366
+ .\\35 f3f5403_rollupMilestone {
2367
+ overflow: hidden;
2368
+ text-overflow: ellipsis;
2369
+ white-space: nowrap;
2370
+ color: var(--dsw-alias-label-primary);
2371
+ font: var(--dsw-font-xxxs-11);
2372
+ }
2373
+
2374
+ .d87816b2_rollupCount {
2375
+ flex: none;
2376
+ color: var(--dsw-alias-label-secondary);
2377
+ font: var(--dsw-font-xxxs-11);
2378
+ font-variant-numeric: tabular-nums;
2379
+ }
2380
+
2381
+
2382
+ .\\38 f4e5388_severityChip {
2383
+ align-self: flex-start;
2384
+ padding: 0 var(--mstar-space-1);
2385
+ border: 1px solid var(--dsw-alias-border-l2);
2386
+ border-radius: 999px;
2387
+ color: var(--dsw-alias-label-secondary);
2388
+ font: var(--dsw-font-xxxs-11);
2389
+ }
2390
+
2391
+ .\\38 f4e5388_severityChip[data-severity='critical'] {
2392
+ border-color: var(--dsw-alias-state-danger-primary);
2393
+ color: var(--dsw-alias-state-danger-primary);
2394
+ }
2395
+
2396
+ .\\38 f4e5388_severityChip[data-severity='high'] {
2397
+ border-color: var(--dsw-alias-state-warning-primary);
2398
+ color: var(--dsw-alias-state-warning-primary);
2399
+ }
2240
2400
  `;
2241
2401
  var tagId2 = "@mstar-harness/dsh/zones.module.css";
2242
2402
  if (typeof document !== "undefined" && document.querySelector("style[data-plugin-css=" + JSON.stringify(tagId2) + "]") === null) {
@@ -2246,7 +2406,7 @@ if (typeof document !== "undefined" && document.querySelector("style[data-plugin
2246
2406
  tag.textContent = css2;
2247
2407
  document.head.appendChild(tag);
2248
2408
  }
2249
- var zones_module_default = { zone: "0390dc47_zone", zoneHeader: "fa5472ae_zoneHeader", zoneEmpty: "2358ca74_zoneEmpty", legend: "0214fc64_legend", legendTitle: "7fdf3af2_legendTitle", legendList: "5751e1ec_legendList", legendItem: "c648f79b_legendItem", legendSwatch: "84f03998_legendSwatch", swatchAgentRunning: "637ae7a1_swatchAgentRunning", swatchAgentSettled: "e8a7988b_swatchAgentSettled", swatchAgentIdle: "d34b3834_swatchAgentIdle", tasksHeader: "9c376db8_tasksHeader", tasksTotal: "b5ad0f15_tasksTotal", kanban: "12dfaa6e_kanban", kanbanColumn: "1f8473a4_kanbanColumn", kanbanColumnHeader: "3b1cc701_kanbanColumnHeader", kanbanColumnTitle: "503b6432_kanbanColumnTitle", kanbanCount: "496af60d_kanbanCount", kanbanCards: "161359fd_kanbanCards", planCard: "73f0e028_planCard", planCardId: "a37c7a75_planCardId", planCardStatus: "11b4fd6a_planCardStatus", kanbanArrow: "63518033_kanbanArrow", kanbanMore: "0c600f2f_kanbanMore", kanbanMoreButton: "d0f95d1f_kanbanMoreButton" };
2409
+ var zones_module_default = { zone: "0390dc47_zone", zoneHeader: "fa5472ae_zoneHeader", zoneEmpty: "2358ca74_zoneEmpty", legend: "0214fc64_legend", legendTitle: "7fdf3af2_legendTitle", legendList: "5751e1ec_legendList", legendItem: "c648f79b_legendItem", legendSwatch: "84f03998_legendSwatch", swatchAgentRunning: "637ae7a1_swatchAgentRunning", swatchAgentSettled: "e8a7988b_swatchAgentSettled", swatchAgentIdle: "d34b3834_swatchAgentIdle", tasksHeader: "9c376db8_tasksHeader", tasksTotal: "b5ad0f15_tasksTotal", kanban: "12dfaa6e_kanban", kanbanColumn: "1f8473a4_kanbanColumn", kanbanColumnHeader: "3b1cc701_kanbanColumnHeader", kanbanColumnTitle: "503b6432_kanbanColumnTitle", kanbanCount: "496af60d_kanbanCount", kanbanCards: "161359fd_kanbanCards", planCard: "73f0e028_planCard", planCardId: "a37c7a75_planCardId", planCardStatus: "11b4fd6a_planCardStatus", kanbanArrow: "63518033_kanbanArrow", kanbanMore: "0c600f2f_kanbanMore", kanbanMoreButton: "d0f95d1f_kanbanMoreButton", zoneTitle: "a2f9476f_zoneTitle", rollupList: "1ca74b3b_rollupList", rollupItem: "371169b4_rollupItem", rollupMilestone: "5f3f5403_rollupMilestone", rollupCount: "d87816b2_rollupCount", severityChip: "8f4e5388_severityChip" };
2250
2410
 
2251
2411
  // src/client/panel/zones/Legend.tsx
2252
2412
  var jsx_runtime5 = require("react/jsx-runtime");
@@ -4385,24 +4545,100 @@ function TaskBoard({ view, t }) {
4385
4545
  });
4386
4546
  }
4387
4547
 
4388
- // src/client/panel/pages/IterationTaskPage.tsx
4548
+ // src/client/panel/zones/ProjectRollup.tsx
4389
4549
  var jsx_runtime10 = require("react/jsx-runtime");
4550
+ function ProjectRollup({ view, t }) {
4551
+ const { milestones, openResiduals } = view;
4552
+ return /* @__PURE__ */ jsx_runtime10.jsxs("section", {
4553
+ className: zones_module_default.zone,
4554
+ "data-zone": "project",
4555
+ children: [
4556
+ /* @__PURE__ */ jsx_runtime10.jsx("header", {
4557
+ className: zones_module_default.tasksHeader,
4558
+ "data-zone-header": true,
4559
+ children: /* @__PURE__ */ jsx_runtime10.jsx("h2", {
4560
+ className: zones_module_default.zoneHeader,
4561
+ children: t("zone.project.title")
4562
+ })
4563
+ }),
4564
+ /* @__PURE__ */ jsx_runtime10.jsx("h3", {
4565
+ className: zones_module_default.zoneTitle,
4566
+ "data-project-milestones-title": true,
4567
+ children: t("zone.project.milestones")
4568
+ }),
4569
+ milestones.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4570
+ className: zones_module_default.zoneEmpty,
4571
+ "data-mstar-empty": "no-milestones",
4572
+ children: t("zone.project.none")
4573
+ }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4574
+ className: zones_module_default.rollupList,
4575
+ "data-project-milestones": true,
4576
+ children: milestones.map((milestone, i) => /* @__PURE__ */ jsx_runtime10.jsx("li", {
4577
+ className: zones_module_default.rollupItem,
4578
+ "data-project-milestone": true,
4579
+ children: /* @__PURE__ */ jsx_runtime10.jsx("span", {
4580
+ className: zones_module_default.rollupMilestone,
4581
+ children: milestone
4582
+ })
4583
+ }, `${milestone}-${i}`))
4584
+ }),
4585
+ /* @__PURE__ */ jsx_runtime10.jsx("h3", {
4586
+ className: zones_module_default.zoneTitle,
4587
+ "data-project-residuals-title": true,
4588
+ children: t("zone.project.residuals")
4589
+ }),
4590
+ openResiduals.length === 0 ? /* @__PURE__ */ jsx_runtime10.jsx("p", {
4591
+ className: zones_module_default.zoneEmpty,
4592
+ "data-mstar-empty": "no-project-residuals",
4593
+ children: t("zone.project.none")
4594
+ }) : /* @__PURE__ */ jsx_runtime10.jsx("ul", {
4595
+ className: zones_module_default.rollupList,
4596
+ "data-project-residuals": true,
4597
+ children: openResiduals.map((row, i) => /* @__PURE__ */ jsx_runtime10.jsxs("li", {
4598
+ className: zones_module_default.rollupItem,
4599
+ "data-project-residual": true,
4600
+ children: [
4601
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4602
+ className: zones_module_default.severityChip,
4603
+ "data-severity": row.severity,
4604
+ children: row.severity
4605
+ }),
4606
+ /* @__PURE__ */ jsx_runtime10.jsx("span", {
4607
+ className: zones_module_default.rollupCount,
4608
+ "data-project-residual-count": row.count,
4609
+ children: row.count
4610
+ })
4611
+ ]
4612
+ }, `${row.severity}-${i}`))
4613
+ })
4614
+ ]
4615
+ });
4616
+ }
4617
+
4618
+ // src/client/panel/pages/IterationTaskPage.tsx
4619
+ var jsx_runtime11 = require("react/jsx-runtime");
4390
4620
  function IterationTaskPage({ view, t }) {
4391
- return /* @__PURE__ */ jsx_runtime10.jsxs("div", {
4621
+ return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4392
4622
  className: panel_module_default.iterationPage,
4393
4623
  "data-mstar-page": "tasks",
4394
4624
  children: [
4395
- /* @__PURE__ */ jsx_runtime10.jsx(IterationInfoSection, {
4625
+ /* @__PURE__ */ jsx_runtime11.jsx(IterationInfoSection, {
4396
4626
  iteration: view.iteration,
4397
4627
  t
4398
4628
  }),
4399
- /* @__PURE__ */ jsx_runtime10.jsx("div", {
4629
+ /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4400
4630
  className: panel_module_default.iterationTasks,
4401
4631
  "data-mstar-tasks-scroll": true,
4402
- children: /* @__PURE__ */ jsx_runtime10.jsx(TaskBoard, {
4403
- view: view.tasks,
4404
- t
4405
- })
4632
+ children: [
4633
+ /* @__PURE__ */ jsx_runtime11.jsx(TaskBoard, {
4634
+ view: view.tasks,
4635
+ t
4636
+ }),
4637
+ /* @__PURE__ */ jsx_runtime11.jsx(ProjectRollup, {
4638
+ view: view.project,
4639
+ t
4640
+ })
4641
+ ]
4406
4642
  })
4407
4643
  ]
4408
4644
  });
@@ -4444,25 +4680,25 @@ function useMstarEngineStatus(useSession) {
4444
4680
  }
4445
4681
 
4446
4682
  // src/client/panel/PanelView.tsx
4447
- var jsx_runtime11 = require("react/jsx-runtime");
4683
+ var jsx_runtime12 = require("react/jsx-runtime");
4448
4684
  function formatTime(ms) {
4449
4685
  return new Date(ms).toLocaleTimeString("en-GB");
4450
4686
  }
4451
4687
  function PanelContent({ tab, source, t }) {
4452
4688
  if (tab === "agents") {
4453
4689
  const view = projectGraph(source);
4454
- return /* @__PURE__ */ jsx_runtime11.jsx(AgentCanvasPage, {
4690
+ return /* @__PURE__ */ jsx_runtime12.jsx(AgentCanvasPage, {
4455
4691
  view: view.agents,
4456
4692
  iteration: view.iteration,
4457
4693
  t
4458
4694
  });
4459
4695
  }
4460
4696
  if (tab === "events")
4461
- return /* @__PURE__ */ jsx_runtime11.jsx(EventLogPage, {
4697
+ return /* @__PURE__ */ jsx_runtime12.jsx(EventLogPage, {
4462
4698
  view: projectGraph(source),
4463
4699
  t
4464
4700
  });
4465
- return /* @__PURE__ */ jsx_runtime11.jsx(IterationTaskPage, {
4701
+ return /* @__PURE__ */ jsx_runtime12.jsx(IterationTaskPage, {
4466
4702
  view: projectGraph(source),
4467
4703
  t
4468
4704
  });
@@ -4471,11 +4707,11 @@ function PanelView({ t, useSession }) {
4471
4707
  const { source, lastUpdated } = useMstarEngineStatus(useSession);
4472
4708
  const [tab, setTab] = import_react3.useState("tasks");
4473
4709
  if (source === null || source === undefined) {
4474
- return /* @__PURE__ */ jsx_runtime11.jsx("div", {
4710
+ return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4475
4711
  className: panel_module_default.emptyRoot,
4476
4712
  "data-mstar-panel": "waiting",
4477
4713
  "data-conversation-composer-overlay": "",
4478
- children: /* @__PURE__ */ jsx_runtime11.jsx("p", {
4714
+ children: /* @__PURE__ */ jsx_runtime12.jsx("p", {
4479
4715
  className: panel_module_default.empty,
4480
4716
  "data-mstar-empty": "waiting",
4481
4717
  children: t("empty.waiting")
@@ -4483,32 +4719,32 @@ function PanelView({ t, useSession }) {
4483
4719
  });
4484
4720
  }
4485
4721
  const noHarness = source.harnessDir === null && source.state === null && source.iteration == null;
4486
- const freshness = /* @__PURE__ */ jsx_runtime11.jsxs("footer", {
4722
+ const freshness = /* @__PURE__ */ jsx_runtime12.jsxs("footer", {
4487
4723
  className: panel_module_default.freshness,
4488
4724
  "data-mstar-freshness": true,
4489
4725
  children: [
4490
- typeof lastUpdated === "number" ? /* @__PURE__ */ jsx_runtime11.jsx("span", {
4726
+ typeof lastUpdated === "number" ? /* @__PURE__ */ jsx_runtime12.jsx("span", {
4491
4727
  children: t("freshness.last-updated", { time: formatTime(lastUpdated) })
4492
4728
  }) : null,
4493
- /* @__PURE__ */ jsx_runtime11.jsx("span", {
4729
+ /* @__PURE__ */ jsx_runtime12.jsx("span", {
4494
4730
  children: t("freshness.refresh-note")
4495
4731
  })
4496
4732
  ]
4497
4733
  });
4498
4734
  if (noHarness) {
4499
- return /* @__PURE__ */ jsx_runtime11.jsx("div", {
4735
+ return /* @__PURE__ */ jsx_runtime12.jsx("div", {
4500
4736
  className: panel_module_default.root,
4501
4737
  "data-mstar-panel": "no-harness",
4502
4738
  "data-conversation-composer-overlay": "",
4503
- children: /* @__PURE__ */ jsx_runtime11.jsxs("main", {
4739
+ children: /* @__PURE__ */ jsx_runtime12.jsxs("main", {
4504
4740
  className: panel_module_default.main,
4505
4741
  "data-mstar-graph": true,
4506
4742
  children: [
4507
- /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4743
+ /* @__PURE__ */ jsx_runtime12.jsxs("div", {
4508
4744
  className: panel_module_default.noHarnessCard,
4509
4745
  "data-mstar-empty-card": true,
4510
4746
  children: [
4511
- /* @__PURE__ */ jsx_runtime11.jsxs("svg", {
4747
+ /* @__PURE__ */ jsx_runtime12.jsxs("svg", {
4512
4748
  className: panel_module_default.noHarnessIcon,
4513
4749
  "data-mstar-empty-icon": true,
4514
4750
  width: "32",
@@ -4521,25 +4757,25 @@ function PanelView({ t, useSession }) {
4521
4757
  strokeLinejoin: "round",
4522
4758
  "aria-hidden": "true",
4523
4759
  children: [
4524
- /* @__PURE__ */ jsx_runtime11.jsx("path", {
4760
+ /* @__PURE__ */ jsx_runtime12.jsx("path", {
4525
4761
  d: "M3 7a2 2 0 0 1 2-2h4l2 2h8a2 2 0 0 1 2 2v8a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"
4526
4762
  }),
4527
- /* @__PURE__ */ jsx_runtime11.jsx("path", {
4763
+ /* @__PURE__ */ jsx_runtime12.jsx("path", {
4528
4764
  d: "M9.7 9.4a2.4 2.4 0 1 1 3.4 2.2c-.7.3-1 .8-1 1.5"
4529
4765
  }),
4530
- /* @__PURE__ */ jsx_runtime11.jsx("circle", {
4766
+ /* @__PURE__ */ jsx_runtime12.jsx("circle", {
4531
4767
  cx: "12",
4532
4768
  cy: "16.4",
4533
4769
  r: "0.6"
4534
4770
  })
4535
4771
  ]
4536
4772
  }),
4537
- /* @__PURE__ */ jsx_runtime11.jsx("p", {
4773
+ /* @__PURE__ */ jsx_runtime12.jsx("p", {
4538
4774
  className: panel_module_default.noHarnessTitle,
4539
4775
  "data-mstar-empty": "no-harness",
4540
4776
  children: t("empty.no-harness")
4541
4777
  }),
4542
- /* @__PURE__ */ jsx_runtime11.jsx("p", {
4778
+ /* @__PURE__ */ jsx_runtime12.jsx("p", {
4543
4779
  className: panel_module_default.noHarnessHint,
4544
4780
  children: t("empty.no-harness-hint")
4545
4781
  })
@@ -4550,23 +4786,23 @@ function PanelView({ t, useSession }) {
4550
4786
  })
4551
4787
  });
4552
4788
  }
4553
- return /* @__PURE__ */ jsx_runtime11.jsxs("div", {
4789
+ return /* @__PURE__ */ jsx_runtime12.jsxs("div", {
4554
4790
  className: panel_module_default.root,
4555
4791
  "data-mstar-panel": "panel",
4556
4792
  "data-conversation-composer-overlay": "",
4557
4793
  children: [
4558
- /* @__PURE__ */ jsx_runtime11.jsxs("main", {
4794
+ /* @__PURE__ */ jsx_runtime12.jsxs("main", {
4559
4795
  className: panel_module_default.main,
4560
4796
  children: [
4561
- /* @__PURE__ */ jsx_runtime11.jsx(TabNav, {
4797
+ /* @__PURE__ */ jsx_runtime12.jsx(TabNav, {
4562
4798
  active: tab,
4563
4799
  onChange: setTab,
4564
4800
  t
4565
4801
  }),
4566
- /* @__PURE__ */ jsx_runtime11.jsx("div", {
4802
+ /* @__PURE__ */ jsx_runtime12.jsx("div", {
4567
4803
  className: panel_module_default.content,
4568
4804
  "data-mstar-graph": true,
4569
- children: /* @__PURE__ */ jsx_runtime11.jsx(PanelContent, {
4805
+ children: /* @__PURE__ */ jsx_runtime12.jsx(PanelContent, {
4570
4806
  tab,
4571
4807
  source,
4572
4808
  t
@@ -4575,7 +4811,7 @@ function PanelView({ t, useSession }) {
4575
4811
  freshness
4576
4812
  ]
4577
4813
  }),
4578
- /* @__PURE__ */ jsx_runtime11.jsx(Sidebar, {
4814
+ /* @__PURE__ */ jsx_runtime12.jsx(Sidebar, {
4579
4815
  t,
4580
4816
  state: source.state,
4581
4817
  source
@@ -11,8 +11,7 @@ export interface Config {
11
11
  * `{HARNESS_DIR}` resolution order); when absent the plugin probes from
12
12
  * the SESSION workspace root (`agent.session.header.cwd`) — never the
13
13
  * process cwd — walking `.mstar/` → `.agents/` → `.plans/`/`plans/`.
14
- * Required for repos whose harness root is not a probed name (e.g. a
15
- * `.harness/` maintenance root).
14
+ * Required for repos whose harness root is not a probed name.
16
15
  */
17
16
  harnessDir?: string;
18
17
  /**
@@ -163,8 +162,9 @@ export declare function formatViolation(violation: ValidationResult): string;
163
162
  export declare function asRecord(value: unknown): Record<string, unknown> | undefined;
164
163
  /**
165
164
  * Resolve the hard-enforcement flag for the artifact gates: explicit
166
- * Config override wins, else the iteration compass frontmatter (when a
167
- * harness dir resolves), else warn-only. {@link resolveHard} parity with a
165
+ * Config override wins, else the repo `.mstarc` `[config] enforcement`,
166
+ * else the iteration compass frontmatter (when a harness dir resolves),
167
+ * else warn-only. {@link resolveHard} parity with a
168
168
  * null-tolerant harness dir — the skill roots and the artifact
169
169
  * seams (design-md / audit / compound / roles) do not require
170
170
  * `{HARNESS_DIR}` (compound scoping is the only seam that does, and only
@@ -2,6 +2,7 @@ import { Service, type Context } from '@deepseek-ai/cordis';
2
2
  import type { AssignmentFields, GateResult, HostAdapter, IntegrationMergeLease, ValidationResult } from '@mstar-harness/engine';
3
3
  import type { ToolExecution } from '@deepseek-ai/dsh-tools';
4
4
  import type { HarnessResolver, Config } from './_shared.ts';
5
+ import { type HarnessDocKind } from './status.ts';
5
6
  import type { AgentFlowPairing, WorkflowVerdictInput } from './agent-flow.ts';
6
7
  import { WorkflowAskCache } from './workflow-policy.ts';
7
8
  /** Options for {@link DshHostAdapter}. */
@@ -50,7 +51,10 @@ export interface DshHostAdapterOptions {
50
51
  * the host provides it (the write's content — the opencode consumer
51
52
  * convention for this engine hook), else the current on-disk document at
52
53
  * `path` via the gate's single-read `validateStatusDoc` semantics (missing
53
- * file = first create = pass). Both inputs flow through
54
+ * file = first create = pass). The path is classified against the resolved
55
+ * harness dir (v2 root / workflow snapshot / project register — the
56
+ * P2-fixed `harnessDocKindOfTarget` shape) and validated with the MATCHING
57
+ * engine validator; non-coordination paths pass. Both inputs flow through
54
58
  * `validateStatusValue` — the same pipeline the fs-intent gate runs, so
55
59
  * codes match by construction. Returns the FIRST violation: the engine
56
60
  * hook shape is one `ValidationResult`; the gate's full violation list
@@ -95,12 +99,18 @@ export declare class DshHostAdapter extends Service implements HostAdapter {
95
99
  /**
96
100
  * Shared status-gate core (plugin-internal): the fs-intent listeners and
97
101
  * the `beforeStatusWrite` on-disk fallback route through this method —
98
- * ONE validation code path. Missing file = first create = pass (the
102
+ * ONE validation code path, kind-dispatched (v2 root / workflow snapshot
103
+ * / project register — the matching engine validator per
104
+ * {@link validateStatusValue}). Missing file = first create = pass (the
99
105
  * intent waterfall carries no incoming content, so the vetoable signal is
100
106
  * the pre-write on-disk state).
101
- * @param statusPath - the canonical `{HARNESS_DIR}/status.json` path.
107
+ * @param path - the canonical coordination-document path (the caller
108
+ * classifies it against the resolved harness dir).
109
+ * @param kind - the target's {@link HarnessDocKind}.
110
+ * @param harnessDir - the resolved `{HARNESS_DIR}` (the snapshot kind's
111
+ * cleanup extension needs it to locate the project registers).
102
112
  */
103
- statusGate(statusPath: string): GateResult;
113
+ statusGate(path: string, kind: HarnessDocKind, harnessDir: string | null): GateResult;
104
114
  /**
105
115
  * Shared dispatch-gate core (plugin-internal): the `tools/pre-execute`
106
116
  * listener and `beforeDispatch` route through this method — ONE
@@ -133,11 +143,17 @@ export declare class DshHostAdapter extends Service implements HostAdapter {
133
143
  recordWorkflowVerdict(input: WorkflowVerdictInput): void;
134
144
  /**
135
145
  * `HostAdapter.beforeStatusWrite` — see the class doc for the doc-first /
136
- * on-disk-fallback semantics. Never throws; a failing gate maps to its
137
- * FIRST violation (severity/code/message/fix/aliases preserved failing
138
- * gates always carry ≥1 violation), a passing gate to
146
+ * on-disk-fallback semantics, now KIND-DISPATCHED: the path is classified
147
+ * against the resolved harness dir (`harnessDocKindOfTarget`root
148
+ * status.json / workflow snapshot / project register, the P2-fixed shape)
149
+ * and validated with the matching engine validator
150
+ * (`validateStatusValue`). Non-coordination paths (unclassifiable) pass —
151
+ * the hook's business is harness coordination documents only. Never
152
+ * throws; a failing gate maps to its FIRST violation
153
+ * (severity/code/message/fix/aliases preserved — failing gates always
154
+ * carry ≥1 violation), a passing gate to
139
155
  * `host.beforeStatusWrite.ok` (the engine test convention for this hook).
140
- * @param path - the status.json target path.
156
+ * @param path - the coordination-document target path.
141
157
  * @param doc - the document about to be written (undefined → validate the
142
158
  * on-disk document at `path`).
143
159
  */
@@ -155,10 +171,20 @@ export declare class DshHostAdapter extends Service implements HostAdapter {
155
171
  beforeDispatch(assignment: AssignmentFields | string): Promise<GateResult>;
156
172
  /**
157
173
  * `HostAdapter.beforeMerge` — reserve/validate the integration merge
158
- * lease. Thin wrapper over the engine `validateIntegrationMergeLease`
159
- * (the engine owns the lease shape; the reservation write into
160
- * `{HARNESS_DIR}/status.json` is a P3 seam).
161
- * @param lease - the `metadata.integration_merge_lease` object.
174
+ * lease. v3 relocation (plan `20260819-workflow-dsh-viz` Task 3): the
175
+ * `integration_merge_lease` home is the ACTIVE workflow snapshot
176
+ * (`workflows/<id>/snapshot.json` top-level the v1 root-metadata home
177
+ * is gone), so the hook READS the snapshot's current lease and validates
178
+ * it (CLI `lease verify-integration` parity) plus a no-steal comparison
179
+ * against the passed lease. The passed lease object is still
180
+ * shape-validated (the hook contract). Degrade edges (never false
181
+ * positives): no harness dir (exec-less hook — the explicit config
182
+ * resolves or nothing), no active workflow, an unreadable/missing
183
+ * snapshot, or a snapshot WITHOUT an `integration_merge_lease`
184
+ * (unclaimed) all skip the snapshot read — the passed-lease shape gate
185
+ * stands alone.
186
+ * @param lease - the `metadata.integration_merge_lease` object being
187
+ * reserved/validated.
162
188
  */
163
189
  beforeMerge(lease: IntegrationMergeLease): Promise<GateResult>;
164
190
  }