@mstar-harness/omp 3.6.0-alpha.4
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 +63 -0
- package/agents/architect.md +35 -0
- package/agents/code-reviewer.md +90 -0
- package/agents/frontend-dev.md +33 -0
- package/agents/fullstack-dev-2.md +33 -0
- package/agents/fullstack-dev.md +33 -0
- package/agents/ops-engineer.md +33 -0
- package/agents/product-manager.md +35 -0
- package/agents/project-manager.md +32 -0
- package/agents/prompt-engineer.md +33 -0
- package/agents/qa-engineer.md +35 -0
- package/agents/qc-specialist-2.md +62 -0
- package/agents/qc-specialist-3.md +62 -0
- package/agents/qc-specialist.md +62 -0
- package/agents/writing-specialist.md +35 -0
- package/assets/icon.png +0 -0
- package/assets/logo-dark.png +0 -0
- package/assets/logo-dark.svg +6 -0
- package/assets/logo.png +0 -0
- package/assets/logo.svg +6 -0
- package/commands/amazing-pr-review.md +31 -0
- package/commands/codebase-audit.md +40 -0
- package/commands/iteration-drive.md +48 -0
- package/commands/iteration-loop.md +99 -0
- package/commands/iteration-start.md +122 -0
- package/dist/hooks/pre/mstar-gates.js +6579 -0
- package/dist/tools/mstar_dispatch_validate/index.js +6291 -0
- package/dist/tools/mstar_iteration_gate/index.js +6321 -0
- package/dist/tools/mstar_lease_verify/index.js +6343 -0
- package/dist/tools/mstar_path_resolve/index.js +6297 -0
- package/dist/tools/mstar_status_validate/index.js +6402 -0
- package/dist/tools/mstar_worktree_check/index.js +6343 -0
- package/harness-agents/architect.md +35 -0
- package/harness-agents/code-reviewer.md +90 -0
- package/harness-agents/frontend-dev.md +33 -0
- package/harness-agents/fullstack-dev-2.md +33 -0
- package/harness-agents/fullstack-dev.md +33 -0
- package/harness-agents/ops-engineer.md +33 -0
- package/harness-agents/product-manager.md +35 -0
- package/harness-agents/project-manager.md +32 -0
- package/harness-agents/prompt-engineer.md +33 -0
- package/harness-agents/qa-engineer.md +35 -0
- package/harness-agents/qc-specialist-2.md +62 -0
- package/harness-agents/qc-specialist-3.md +62 -0
- package/harness-agents/qc-specialist.md +62 -0
- package/harness-agents/writing-specialist.md +35 -0
- package/harness-commands/amazing-pr-review.md +31 -0
- package/harness-commands/codebase-audit.md +40 -0
- package/harness-commands/iteration-drive.md +48 -0
- package/harness-commands/iteration-loop.md +99 -0
- package/harness-commands/iteration-start.md +122 -0
- package/harness-skills/grill-me/SKILL.md +10 -0
- package/harness-skills/mstar-artifacts/SKILL.md +66 -0
- package/harness-skills/mstar-artifacts/references/knowledge-and-designs.md +110 -0
- package/harness-skills/mstar-artifacts/references/plan-files-and-reports.md +98 -0
- package/harness-skills/mstar-artifacts/references/plan-quality-bar.md +99 -0
- package/harness-skills/mstar-artifacts/references/status-and-residuals.md +472 -0
- package/harness-skills/mstar-artifacts/templates/README.md +7 -0
- package/harness-skills/mstar-artifacts/templates/plan.main.md +54 -0
- package/harness-skills/mstar-artifacts/templates/status.empty.json +5 -0
- package/harness-skills/mstar-audit/SKILL.md +151 -0
- package/harness-skills/mstar-audit/references/audit-playbook.md +175 -0
- package/harness-skills/mstar-audit/references/codebase-audit.md +103 -0
- package/harness-skills/mstar-audit/references/finding-format.md +69 -0
- package/harness-skills/mstar-audit/references/pr-review-seat-evidence.md +28 -0
- package/harness-skills/mstar-audit/references/pr-review.md +475 -0
- package/harness-skills/mstar-audit/references/security-review.md +219 -0
- package/harness-skills/mstar-branch-worktree/SKILL.md +236 -0
- package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
- package/harness-skills/mstar-coding-behavior/SKILL.md +167 -0
- package/harness-skills/mstar-compound/SKILL.md +109 -0
- package/harness-skills/mstar-compound/assets/resolution-template.md +94 -0
- package/harness-skills/mstar-compound/references/category-mapping.md +37 -0
- package/harness-skills/mstar-compound/references/compound-workflow.md +171 -0
- package/harness-skills/mstar-compound/references/concepts-vocabulary.md +44 -0
- package/harness-skills/mstar-compound/references/schema.yaml +122 -0
- package/harness-skills/mstar-compound-refresh/SKILL.md +154 -0
- package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
- package/harness-skills/mstar-conventions/SKILL.md +215 -0
- package/harness-skills/mstar-conventions/references/artifact-storage-paths.md +53 -0
- package/harness-skills/mstar-conventions/references/effort-estimation.md +38 -0
- package/harness-skills/mstar-conventions/references/harness-bootstrap-and-agents-layering.md +96 -0
- package/harness-skills/mstar-design-md/SKILL.md +142 -0
- package/harness-skills/mstar-design-md/references/completeness-checklist.md +181 -0
- package/harness-skills/mstar-design-md/references/design-md-spec.md +508 -0
- package/harness-skills/mstar-design-md/references/vercel-example.md +200 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
- package/harness-skills/mstar-design-md/templates/DESIGN.md.template +474 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +134 -0
- package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
- package/harness-skills/mstar-engine-legacy/SKILL.md +53 -0
- package/harness-skills/mstar-engine-legacy/references/anti-recursion-checklists.md +58 -0
- package/harness-skills/mstar-engine-legacy/references/engine-check-boilerplate.md +26 -0
- package/harness-skills/mstar-engine-legacy/references/lease-protocol.md +92 -0
- package/harness-skills/mstar-engine-legacy/references/qc-seat-n-restatements.md +57 -0
- package/harness-skills/mstar-engine-legacy/references/status-field-history.md +186 -0
- package/harness-skills/mstar-harness-core/SKILL.md +196 -0
- package/harness-skills/mstar-host/SKILL.md +96 -0
- package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
- package/harness-skills/mstar-host/references/codex.md +61 -0
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +170 -0
- package/harness-skills/mstar-host/references/cursor.md +183 -0
- package/harness-skills/mstar-host/references/dsh.md +507 -0
- package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
- package/harness-skills/mstar-host/references/kimi.md +136 -0
- package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
- package/harness-skills/mstar-host/references/omp.md +245 -0
- package/harness-skills/mstar-host/references/opencode.md +76 -0
- package/harness-skills/mstar-host/references/parallel-dispatch.md +68 -0
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
- package/harness-skills/mstar-host/references/zcode.md +129 -0
- package/harness-skills/mstar-iteration/SKILL.md +408 -0
- package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
- package/harness-skills/mstar-iteration/references/command-shared-invariants.md +62 -0
- package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +142 -0
- package/harness-skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
- package/harness-skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
- package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +205 -0
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +105 -0
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +85 -0
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +118 -0
- package/harness-skills/mstar-project-governance/SKILL.md +119 -0
- package/harness-skills/mstar-review-qc/SKILL.md +76 -0
- package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
- package/harness-skills/mstar-roles/SKILL.md +103 -0
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +65 -0
- package/harness-skills/mstar-roles/references/architect.md +109 -0
- package/harness-skills/mstar-roles/references/code-reviewer.md +118 -0
- package/harness-skills/mstar-roles/references/frontend-dev.md +70 -0
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
- package/harness-skills/mstar-roles/references/ops-engineer.md +72 -0
- package/harness-skills/mstar-roles/references/product-manager.md +102 -0
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +200 -0
- package/harness-skills/mstar-roles/references/project-manager/plan-management.md +59 -0
- package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +99 -0
- package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
- package/harness-skills/mstar-roles/references/project-manager.md +310 -0
- package/harness-skills/mstar-roles/references/prompt-engineer.md +65 -0
- package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
- package/harness-skills/mstar-roles/references/qa-engineer.md +71 -0
- package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +104 -0
- package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +88 -0
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +120 -0
- package/harness-skills/mstar-roles/references/writing-specialist.md +88 -0
- package/harness-skills/mstar-sdd/SKILL.md +137 -0
- package/harness-skills/mstar-sdd/references/file-handoffs.md +85 -0
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +56 -0
- package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
- package/harness-skills/mstar-skill-authoring/SKILL.md +182 -0
- package/harness-skills/mstar-skill-authoring/references/regression-fixation.md +46 -0
- package/harness-skills/mstar-skill-authoring/references/skillsbench-authoring.md +154 -0
- package/harness-skills/mstar-strategy/SKILL.md +114 -0
- package/harness-skills/pm/SKILL.md +40 -0
- package/hooks/pre/mstar-gates.js +6579 -0
- package/package.json +45 -0
- package/plugin.json +49 -0
- package/skills/grill-me/SKILL.md +10 -0
- package/skills/mstar-artifacts/SKILL.md +66 -0
- package/skills/mstar-artifacts/references/knowledge-and-designs.md +110 -0
- package/skills/mstar-artifacts/references/plan-files-and-reports.md +98 -0
- package/skills/mstar-artifacts/references/plan-quality-bar.md +99 -0
- package/skills/mstar-artifacts/references/status-and-residuals.md +472 -0
- package/skills/mstar-artifacts/templates/README.md +7 -0
- package/skills/mstar-artifacts/templates/plan.main.md +54 -0
- package/skills/mstar-artifacts/templates/status.empty.json +5 -0
- package/skills/mstar-audit/SKILL.md +151 -0
- package/skills/mstar-audit/references/audit-playbook.md +175 -0
- package/skills/mstar-audit/references/codebase-audit.md +103 -0
- package/skills/mstar-audit/references/finding-format.md +69 -0
- package/skills/mstar-audit/references/pr-review-seat-evidence.md +28 -0
- package/skills/mstar-audit/references/pr-review.md +475 -0
- package/skills/mstar-audit/references/security-review.md +219 -0
- package/skills/mstar-branch-worktree/SKILL.md +236 -0
- package/skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
- package/skills/mstar-coding-behavior/SKILL.md +167 -0
- package/skills/mstar-compound/SKILL.md +109 -0
- package/skills/mstar-compound/assets/resolution-template.md +94 -0
- package/skills/mstar-compound/references/category-mapping.md +37 -0
- package/skills/mstar-compound/references/compound-workflow.md +171 -0
- package/skills/mstar-compound/references/concepts-vocabulary.md +44 -0
- package/skills/mstar-compound/references/schema.yaml +122 -0
- package/skills/mstar-compound-refresh/SKILL.md +154 -0
- package/skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
- package/skills/mstar-conventions/SKILL.md +215 -0
- package/skills/mstar-conventions/references/artifact-storage-paths.md +53 -0
- package/skills/mstar-conventions/references/effort-estimation.md +38 -0
- package/skills/mstar-conventions/references/harness-bootstrap-and-agents-layering.md +96 -0
- package/skills/mstar-design-md/SKILL.md +142 -0
- package/skills/mstar-design-md/references/completeness-checklist.md +181 -0
- package/skills/mstar-design-md/references/design-md-spec.md +508 -0
- package/skills/mstar-design-md/references/vercel-example.md +200 -0
- package/skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
- package/skills/mstar-design-md/templates/DESIGN.md.template +474 -0
- package/skills/mstar-dispatch-gates/SKILL.md +134 -0
- package/skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
- package/skills/mstar-engine-legacy/SKILL.md +53 -0
- package/skills/mstar-engine-legacy/references/anti-recursion-checklists.md +58 -0
- package/skills/mstar-engine-legacy/references/engine-check-boilerplate.md +26 -0
- package/skills/mstar-engine-legacy/references/lease-protocol.md +92 -0
- package/skills/mstar-engine-legacy/references/qc-seat-n-restatements.md +57 -0
- package/skills/mstar-engine-legacy/references/status-field-history.md +186 -0
- package/skills/mstar-harness-core/SKILL.md +196 -0
- package/skills/mstar-host/SKILL.md +96 -0
- package/skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
- package/skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
- package/skills/mstar-host/references/codex.md +61 -0
- package/skills/mstar-host/references/cursor-plan-mode-bridge.md +170 -0
- package/skills/mstar-host/references/cursor.md +183 -0
- package/skills/mstar-host/references/dsh.md +507 -0
- package/skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
- package/skills/mstar-host/references/kimi.md +136 -0
- package/skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
- package/skills/mstar-host/references/omp.md +245 -0
- package/skills/mstar-host/references/opencode.md +76 -0
- package/skills/mstar-host/references/parallel-dispatch.md +68 -0
- package/skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
- package/skills/mstar-host/references/zcode.md +129 -0
- package/skills/mstar-iteration/SKILL.md +408 -0
- package/skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
- package/skills/mstar-iteration/references/command-shared-invariants.md +62 -0
- package/skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
- package/skills/mstar-iteration/references/iteration-compass-template.md +142 -0
- package/skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
- package/skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
- package/skills/mstar-iteration/references/phase-2-worktree-lease.md +205 -0
- package/skills/mstar-iteration/references/phase-3-iteration-close.md +105 -0
- package/skills/mstar-iteration/references/phase-4-5-pr-delivery.md +85 -0
- package/skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
- package/skills/mstar-phase-gates/SKILL.md +118 -0
- package/skills/mstar-project-governance/SKILL.md +119 -0
- package/skills/mstar-review-qc/SKILL.md +76 -0
- package/skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
- package/skills/mstar-roles/SKILL.md +103 -0
- package/skills/mstar-roles/references/_shared/leaf-executor-core.md +65 -0
- package/skills/mstar-roles/references/architect.md +109 -0
- package/skills/mstar-roles/references/code-reviewer.md +118 -0
- package/skills/mstar-roles/references/frontend-dev.md +70 -0
- package/skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
- package/skills/mstar-roles/references/ops-engineer.md +72 -0
- package/skills/mstar-roles/references/product-manager.md +102 -0
- package/skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +200 -0
- package/skills/mstar-roles/references/project-manager/plan-management.md +59 -0
- package/skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
- package/skills/mstar-roles/references/project-manager/qc-and-residuals.md +99 -0
- package/skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
- package/skills/mstar-roles/references/project-manager.md +310 -0
- package/skills/mstar-roles/references/prompt-engineer.md +65 -0
- package/skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
- package/skills/mstar-roles/references/qa-engineer.md +71 -0
- package/skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +104 -0
- package/skills/mstar-roles/references/qc-specialist/report-template.md +88 -0
- package/skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
- package/skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
- package/skills/mstar-roles/references/qc-specialist-shared.md +120 -0
- package/skills/mstar-roles/references/writing-specialist.md +88 -0
- package/skills/mstar-sdd/SKILL.md +137 -0
- package/skills/mstar-sdd/references/file-handoffs.md +85 -0
- package/skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
- package/skills/mstar-sdd/references/implementer-prompt.md +56 -0
- package/skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
- package/skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
- package/skills/mstar-skill-authoring/SKILL.md +182 -0
- package/skills/mstar-skill-authoring/references/regression-fixation.md +46 -0
- package/skills/mstar-skill-authoring/references/skillsbench-authoring.md +154 -0
- package/skills/mstar-strategy/SKILL.md +114 -0
- package/skills/pm/SKILL.md +40 -0
- package/tools/mstar_dispatch_validate.js +6291 -0
- package/tools/mstar_iteration_gate.js +6321 -0
- package/tools/mstar_lease_verify.js +6343 -0
- package/tools/mstar_path_resolve.js +6297 -0
- package/tools/mstar_status_validate.js +6402 -0
- package/tools/mstar_worktree_check.js +6343 -0
|
@@ -0,0 +1,472 @@
|
|
|
1
|
+
# `{HARNESS_DIR}/status.json` (v2), Workflow Snapshots and Project Registers (Morning Star)
|
|
2
|
+
|
|
3
|
+
> **Load order (same as other `mstar-*` skills):** Before changing SSOT / residual fields using this reference, Read **`mstar-harness-core`** (SKILL.md; same-repo branches and worktrees → **`mstar-branch-worktree`**). On conflict, **`mstar-harness-core` wins**; skill index in that SKILL.md.
|
|
4
|
+
|
|
5
|
+
v3 布局把 v1 的「单文件 `status.json`(根 `plans[]` + 根级 `residual_findings` + `metadata`)」拆成三层。**只使用 v2 地址;v1 地址(根 `plans[]` / 根级 `residual_findings` / `archived/residuals/`)由 `mstar migrate` 一次性迁移,不再读写**。v1 字段形状/历史全文(v1 行表、v1 `metadata` 表、jq/flock 读路径示例)→ **`mstar-engine-legacy`** `references/status-field-history.md`(engine-absent 历史 + fallback);本文件只保留 v2 地址与一次性 legacy 只读警告。
|
|
6
|
+
|
|
7
|
+
- **根 `{HARNESS_DIR}/status.json`(v2)** — 活跃生命周期登记:`{ "version": 2, "updated_at", "workflows": [...] }`。只登记 **active**(`running` / `paused`)lifecycle;terminal 时先写 snapshot 再从根列表移除(removal-at-terminal)。由 engine `validateStatus`(v2)/ `registerWorkflow` / `unregisterWorkflow` 读写。
|
|
8
|
+
- **`{WORKFLOW_DIR}/<id>/snapshot.json`** — 每 lifecycle 的运行态快照(`schema_version: 1`):**`plans[]` 行(legacy PlanRow 形状逐字保留)**、per-row **`execution_lease`**、顶层 **`integration_merge_lease`** / **`execution_policy`** / **`branch` anchors** / **`control_worktree_path`** / `compass_ref`。`<id>` = plan id 或 iteration id。
|
|
9
|
+
- **`{PROJECT_DIR}/<id>/roadmap.md` + `residuals.json`** — 项目层:roadmap frontmatter(machine-checkable)+ residual **register**(`entries[<plan-id>]` 数组;severity 枚举与 lifecycle 语义**逐字保留**)。无项目的流程回落到 `_default` 项目。
|
|
10
|
+
|
|
11
|
+
`status.json`(根)、workflow snapshot 与 project register 都是 **SSOT**:plan 行状态与 lease 在 snapshot,open residual 在 register。
|
|
12
|
+
Canonical vs legacy residual definitions → **`mstar-artifacts` SKILL.md**("`status.json`, workflow snapshots, and open residual (summary)");本文件 covers **fields, severity, lifecycle, v2 地址与 engine-check 命令**。
|
|
13
|
+
**Closed** residuals close **in place** in the register(`lifecycle` / `closed_at` / `closure_note`)— v1 的 `archived/residuals/<plan-id>.json` 归档路径与 `archive-residuals` 已移除(`mstar status archive-residuals` 在 v3 仅报错并指向 register 状态变更)。
|
|
14
|
+
|
|
15
|
+
**Why this matters:** Within a working copy, the workflow snapshot and project registers are the **local session SSOT** for risk and decisions. Non-blocking conclusions that stay only in chat or a gitignored review bundle **without local SSOT update** cannot be inherited reliably in that session; `Done` drifts from visible known debt. **`@project-manager`** should register trackable open items soon after review closure; close after verification per **`QA gate`** (`qa-engineer` when `mandatory`, else PM acceptance checklist).
|
|
16
|
+
|
|
17
|
+
**Cross-clone handoff** (default git policy): tracked `{HARNESS_DIR}/AGENTS.md`, `{KNOWLEDGE_DIR}/**`, `{SPECS_DIR}/**`, and root `CONCEPTS.md` / `STRATEGY.md` when used. Residuals that must survive clone must be **promoted** (compound) or written into those tracked results — do not treat `status.json` / `workflows/` / `projects/` / `plans/` as the default clone handoff surface.
|
|
18
|
+
|
|
19
|
+
## Basic structure
|
|
20
|
+
|
|
21
|
+
**Root `{HARNESS_DIR}/status.json` (v2)** — active lifecycle register:
|
|
22
|
+
|
|
23
|
+
```json
|
|
24
|
+
{
|
|
25
|
+
"version": 2,
|
|
26
|
+
"updated_at": "YYYY-MM-DD",
|
|
27
|
+
"workflows": [
|
|
28
|
+
{
|
|
29
|
+
"id": "<plan-id-or-iteration-id>",
|
|
30
|
+
"type": "plan | iteration",
|
|
31
|
+
"started_at": "YYYY-MM-DD",
|
|
32
|
+
"dir": "workflows/<id>"
|
|
33
|
+
}
|
|
34
|
+
]
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
- `dir` is **harness-relative** (`workflows/<id>`), never absolute.
|
|
39
|
+
- Terminal writers unregister AFTER the snapshot write (removal-at-terminal): terminal snapshots are **not** listed in the root.
|
|
40
|
+
|
|
41
|
+
**`workflows/<id>/snapshot.json`** — lifecycle snapshot (`schema_version: 1`; engine `validateWorkflowSnapshot` / `writeWorkflowSnapshot`):
|
|
42
|
+
|
|
43
|
+
```json
|
|
44
|
+
{
|
|
45
|
+
"schema_version": 1,
|
|
46
|
+
"id": "iter-demo",
|
|
47
|
+
"type": "iteration",
|
|
48
|
+
"status": "running",
|
|
49
|
+
"started_at": "2026-08-30",
|
|
50
|
+
"updated_at": "2026-08-30",
|
|
51
|
+
"phase": "phase-2-execute",
|
|
52
|
+
"plans": [
|
|
53
|
+
{
|
|
54
|
+
"id": "plan-id",
|
|
55
|
+
"title": "Plan title",
|
|
56
|
+
"file": "{PLAN_DIR}/plan-id-feature-name.md",
|
|
57
|
+
"status": "InProgress",
|
|
58
|
+
"owner": "@project-manager",
|
|
59
|
+
"agents": ["@fullstack-dev"],
|
|
60
|
+
"progress": 0,
|
|
61
|
+
"tags": [],
|
|
62
|
+
"created_at": "2026-08-29",
|
|
63
|
+
"updated_at": "2026-08-30",
|
|
64
|
+
"done_at": null,
|
|
65
|
+
"notes": [],
|
|
66
|
+
"metadata": {},
|
|
67
|
+
"execution_lease": {
|
|
68
|
+
"holder": "omp:demo-session",
|
|
69
|
+
"claimed_at": "2026-08-30T02:30:00Z",
|
|
70
|
+
"worktree_path": ".worktrees/demo-plan",
|
|
71
|
+
"working_branch": "feature/demo-plan"
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
],
|
|
75
|
+
"execution_policy": {
|
|
76
|
+
"plan_parallelism": "serial",
|
|
77
|
+
"worktree_mode": "",
|
|
78
|
+
"push_policy": ""
|
|
79
|
+
},
|
|
80
|
+
"integration_merge_lease": {
|
|
81
|
+
"holder": "omp:demo-session",
|
|
82
|
+
"claimed_at": "2026-08-30T03:00:00Z",
|
|
83
|
+
"plan_id": "plan-id",
|
|
84
|
+
"source_branch": "feature/demo-plan",
|
|
85
|
+
"target_branch": "iteration/iter-demo"
|
|
86
|
+
},
|
|
87
|
+
"branch": { "base": "main", "integration": "iteration/iter-demo", "target": "main" },
|
|
88
|
+
"control_worktree_path": "/abs/repo/root",
|
|
89
|
+
"legacy_metadata": {},
|
|
90
|
+
"compass_ref": "iterations/iter-demo/delivery-compass.md"
|
|
91
|
+
}
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
- The example above depicts the **held** state (both leases populated, illustrative placeholder values) and passes `validateWorkflowSnapshot`; the released state is **key absence** (delete-key-on-release below), never `null` or `{}`, and enum scalars (`type` / `status` / plan-row `status`) are always single values — the full enum sets are `type`: `plan | iteration`, snapshot `status`: `running | paused | completed | failed | stopped`, plan-row `status`: `Todo | InProgress | InReview | Blocked | Done`.
|
|
95
|
+
|
|
96
|
+
- `plans[]` rows are the **legacy PlanRow shape verbatim** (unknown row fields preserved, never re-bucketed). Per-row `execution_lease` stays on the row; `integration_merge_lease` is **top-level** (the v1 root-`metadata` home is gone).
|
|
97
|
+
- Terminal statuses (`completed` / `failed` / `stopped`) require `ended_at` and no dangling leases.
|
|
98
|
+
- `execution_policy` keys are copied from v1 root `metadata` at migrate; values are accepted-but-opaque this iteration (no semantic gate).
|
|
99
|
+
- `notes`: a plan row's `notes` array is the **legacy verbatim copy** preserved at migrate; the **runtime ledger is `notes.jsonl`** in the workflow dir (see `workflows/<id>/notes.jsonl` below). New notes append to the ledger only — never dual-write the row `notes`.
|
|
100
|
+
|
|
101
|
+
**`projects/<id>/residuals.json`** — project register (entries keyed by plan id, each an ARRAY):
|
|
102
|
+
|
|
103
|
+
```json
|
|
104
|
+
{
|
|
105
|
+
"entries": {
|
|
106
|
+
"plan-id": [
|
|
107
|
+
{
|
|
108
|
+
"id": "R1",
|
|
109
|
+
"title": "Finding title",
|
|
110
|
+
"severity": "critical | high | medium | low | nit",
|
|
111
|
+
"source": "QC-#1 qc1.md F-001 @ <review-range>, QA qa.md, review, …",
|
|
112
|
+
"scope": "Affected file or component",
|
|
113
|
+
"decision": "defer | accept | risk-accepted",
|
|
114
|
+
"owner": "@fullstack-dev",
|
|
115
|
+
"target": "Before plan 02 / YYYY-MM-DD / milestone",
|
|
116
|
+
"tracking": "Issue URL or null",
|
|
117
|
+
"detail_doc": "{PLAN_DIR}/residuals/plan-id/R1-short-label.md",
|
|
118
|
+
"source_plan": "plan-id",
|
|
119
|
+
"registered_at": "YYYY-MM-DD",
|
|
120
|
+
"lifecycle_id": "<workflow id when owned by an iteration>"
|
|
121
|
+
}
|
|
122
|
+
]
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
- `entries[<plan-id>]` values are **arrays** — v1 `residual_findings[plan-id]` multi-finding semantics preserved verbatim (a plan may hold 2+ open residuals).
|
|
128
|
+
- Register entries = the v1 residual entry **verbatim** + provenance: `source_plan` (must equal its entries key), `registered_at` (`YYYY-MM-DD`), optional `lifecycle_id` (owning workflow id when an iteration owns the plan).
|
|
129
|
+
- Project-less flows use the fallback **`_default`** project (`projects/_default/`).
|
|
130
|
+
- Register document validation delegates verbatim to `validateResidual` (severity enum + lifecycle states preserved at the new address).
|
|
131
|
+
|
|
132
|
+
**`projects/<id>/roadmap.md`** — roadmap frontmatter (engine `validateRoadmap`):
|
|
133
|
+
|
|
134
|
+
```markdown
|
|
135
|
+
---
|
|
136
|
+
project_id: <id>
|
|
137
|
+
title: <title>
|
|
138
|
+
status: active | paused | completed
|
|
139
|
+
created_at: YYYY-MM-DD
|
|
140
|
+
milestones: [ ... ] # optional
|
|
141
|
+
residuals_ref: residuals.json # optional
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
# <title>
|
|
145
|
+
|
|
146
|
+
## Direction
|
|
147
|
+
...
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
Body conventions (`## Direction` + goal items as `- [ ]` / `- [x]` markdown task-list items) are **warnings only** — never a hard gate.
|
|
151
|
+
|
|
152
|
+
**Empty-repo template:** **`templates/status.empty.json`** — the v2 shape (`version: 2`, `updated_at`, `workflows: []`). See **`templates/README.md`**.
|
|
153
|
+
|
|
154
|
+
**Closed entries** add: `lifecycle`, `closed_at`, `closure_note`; optional `closure_evidence`, `superseded_by`. See “Residual findings lifecycle”.
|
|
155
|
+
|
|
156
|
+
**Open `detail_doc` (optional):** repo-relative path under **`{PLAN_DIR}/residuals/<plan-id>/`** matching **`id`** (e.g. `R1`); omit if prose layer unused (`knowledge-and-designs.md`).
|
|
157
|
+
|
|
158
|
+
## Fail-loud handoff contract
|
|
159
|
+
|
|
160
|
+
Findings must pass engine validation **before** registration into the project register: `validateResidual(entry)` per entry, `validateProjectRegister(doc)` for the whole register, `validateWorkflowSnapshot(doc)` for the snapshot, `validateStatus` for the v2 root (`mstar status validate <path>` / engine import). Malformed entries — **non-object**, missing any of the nine required fields (`id`, `title`, `severity`, `source`, `scope`, `decision`, `owner`, `target`, `tracking` — mirroring engine `RESIDUAL_REQUIRED_FIELDS` in `packages/engine/src/status.ts`), or **severity** outside the enum — are **rejected** (`ok:false` + violation): fix and rewrite — never silent pass-through, downgrade-write, or “write then patch”.
|
|
161
|
+
|
|
162
|
+
dsh-derived findings map their keys per the engine-residual validation verification spec §5; dsh keys never enter the schema.
|
|
163
|
+
|
|
164
|
+
---
|
|
165
|
+
|
|
166
|
+
## Residual findings: `severity` (SSOT, machine field)
|
|
167
|
+
|
|
168
|
+
Each register entry (`projects/<id>/residuals.json` → `entries[<plan-id>][]`)’s **`severity`** must be from this enum. QC report Markdown **Critical / Warning / Suggestion** are **section titles** — **do not** copy them verbatim into JSON `severity`.
|
|
169
|
+
|
|
170
|
+
### 1. Allowed values
|
|
171
|
+
|
|
172
|
+
Only these five, **lowercase English**:
|
|
173
|
+
|
|
174
|
+
`critical`, `high`, `medium`, `low`, `nit`
|
|
175
|
+
|
|
176
|
+
### 2. Total order (heavy → light)
|
|
177
|
+
|
|
178
|
+
`critical` > `high` > `medium` > `low` > `nit`
|
|
179
|
+
|
|
180
|
+
- **`nit` is always lighter than `low`** — never invert or equate.
|
|
181
|
+
- **Forbidden** in JSON: `warning`, `Major`, non-English, or any value not listed.
|
|
182
|
+
|
|
183
|
+
### 3. Meaning and gate relationship
|
|
184
|
+
|
|
185
|
+
| `severity` | Meaning |
|
|
186
|
+
| ---------- | ------- |
|
|
187
|
+
| `critical` | Merge-blocking; maps to QC **Critical** findings. |
|
|
188
|
+
| `high` | Not blocking but high impact (security, correctness, data, significant tech debt); fix, escalate, or open residual with PM follow-up. |
|
|
189
|
+
| `medium` | Should address this or next milestone; may be open residual. |
|
|
190
|
+
| `low` | Small impact, cheap fix; may be open residual. |
|
|
191
|
+
| `nit` | Style, naming, wording, non-behavior doc nits; **lighter than `low`**. PM may omit from the register if no tracking needed. |
|
|
192
|
+
|
|
193
|
+
Summary vs `mstar-review-qc`: unresolved **`critical`** → usually `Request Changes`; **`high`** often “fix or explicit decision before merge”; **`medium` / `low` / `nit`** may ship with residual tracking (final **Verdict** = PM consolidation).
|
|
194
|
+
|
|
195
|
+
### 4. QC report section → JSON `severity`
|
|
196
|
+
|
|
197
|
+
When registering into the project register (template in `mstar-review-qc`):
|
|
198
|
+
|
|
199
|
+
| Report Findings section | JSON `severity` |
|
|
200
|
+
| ----------------------- | --------------- |
|
|
201
|
+
| **Critical** | Default `critical`. PM may record `high` if “not blocking this merge but follow up soon” — state reason in `title`/`scope`. |
|
|
202
|
+
| **Warning** | `high` or `medium`: security/correctness/data → `high`; other substantive non-blocking → `medium`; **when unsure, use `high`**. |
|
|
203
|
+
| **Suggestion** | `low` or `nit`: substantive improvement → `low`; pure style/optional → `nit`. |
|
|
204
|
+
|
|
205
|
+
**Common mistake:** report **Warning** is not a valid `severity` string; there is no `warning` in the enum (see legacy below).
|
|
206
|
+
|
|
207
|
+
### 5. Legacy `"severity": "warning"`
|
|
208
|
+
|
|
209
|
+
In old JSON, **`"severity": "warning"`** is read and rolled up as **`low`**. **Forbidden** on new entries.
|
|
210
|
+
|
|
211
|
+
---
|
|
212
|
+
|
|
213
|
+
## Findings cleanup modes
|
|
214
|
+
|
|
215
|
+
Plan-level policy for whether non-blocking QC/QA findings may remain as open residual entries or must be cleared in the current plan session.
|
|
216
|
+
|
|
217
|
+
### Assignment (SSOT)
|
|
218
|
+
|
|
219
|
+
| Surface | Values |
|
|
220
|
+
| ------- | ------ |
|
|
221
|
+
| Assignment **`Findings cleanup`** | `zero-residual` \| `allow-residual` |
|
|
222
|
+
|
|
223
|
+
The v1 `plans[].metadata.findings_cleanup` mirror is **deleted** in v3 — no dual-track. Assignment wins; the register is the only residual store.
|
|
224
|
+
|
|
225
|
+
**Defaults**
|
|
226
|
+
|
|
227
|
+
| Context | Default |
|
|
228
|
+
| ------- | ------- |
|
|
229
|
+
| Formal **iteration Phase 2** (Autonomous Execute) | `zero-residual` (compass or Assignment may override to `allow-residual`) |
|
|
230
|
+
| Standalone `/pm`, hotfix, `Execution mode: inline` | `allow-residual` |
|
|
231
|
+
|
|
232
|
+
### `zero-residual` (clean-session)
|
|
233
|
+
|
|
234
|
+
Intent: clear findings in the current plan session whenever possible. Open residuals only for **true blocker-defers**.
|
|
235
|
+
|
|
236
|
+
1. After QC: default path is **fix-now + targeted re-review**, not `Approve with residuals`.
|
|
237
|
+
2. Do **not** register open R# for items that can be fixed in this session.
|
|
238
|
+
3. **`nit`**: fix in-session **or** drop with no R# (existing “no tracking needed”); **never** open residual for style-only nits.
|
|
239
|
+
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).
|
|
240
|
+
5. **True defer** only: external dependency; product/scope decision for a later iteration; or explicit **current-turn** user defer — plus Durable Roadmap Gate.
|
|
241
|
+
6. **`waived` / `risk-accepted`**: still require PM + user/architect alignment; **close in the register** (do not leave open). Prefer a cheap fix over waive-as-shortcut.
|
|
242
|
+
7. Plan **Done**: prefer an empty `entries[<plan_id>]` in the register. If any open entries remain, **every** one must be blocker-defer + roadmap; otherwise keep `InReview` / `Blocked`.
|
|
243
|
+
|
|
244
|
+
### `allow-residual` (legacy default)
|
|
245
|
+
|
|
246
|
+
Non-blocking Warning/Suggestion may ship with open register entries and `Approve with residuals` when no unresolved Critical remains (existing residual lifecycle unchanged).
|
|
247
|
+
|
|
248
|
+
> **Engine check (when available):** run `mstar status findings-cleanup <plan-id> [--project <id>] [--mode zero-residual|allow-residual]` (or import `findingsCleanupGate` from `@mstar-harness/engine` in a host hook) to enforce the mode above against the plan's register entries. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
|
|
249
|
+
|
|
250
|
+
---
|
|
251
|
+
|
|
252
|
+
## Snapshot plan-row fields (`plans[].metadata` standard optional fields)
|
|
253
|
+
|
|
254
|
+
Snapshot plan rows keep the v1 PlanRow shape verbatim; the standard optional `metadata` keys below are unchanged from v1:
|
|
255
|
+
|
|
256
|
+
| Key | Type | Purpose |
|
|
257
|
+
| --- | --- | --- |
|
|
258
|
+
| `working_branch` | string | Implementation branch; aligns with Assignment **`Working branch`** (SSOT) |
|
|
259
|
+
| `spec_integration_branch` | string | (Multi-plan same **Spec**) integration branch name; created from snapshot `branch.base` / `execution_policy` context; plan branches merge here before final PR (`mstar-conventions`) |
|
|
260
|
+
| `merge_target` | string | Next merge target; multi-plan + Spec → usually `spec_integration_branch`; final PR target is snapshot `branch.target` |
|
|
261
|
+
| `branch_policy` | string | One-line policy per `mstar-harness-core` |
|
|
262
|
+
| `phase` | string | Program/roadmap label |
|
|
263
|
+
| `priority` | `high` \| `medium` \| `low` | PM scheduling |
|
|
264
|
+
| `description` / `scope` | string | One-line scope; pick one key per repo |
|
|
265
|
+
| `gates` | object | Gate summary (`qc`, `qa`, `typecheck`, `tests`, `lint`, …) |
|
|
266
|
+
| `blocked_since` | `YYYY-MM-DD` | When `status` is `Blocked` |
|
|
267
|
+
| `blocked_reason` | string | Block reason |
|
|
268
|
+
| `blocked_by_plan_id` | string | Blocking **`plans[].id`** |
|
|
269
|
+
| `dependency` | string | Other dependencies |
|
|
270
|
+
| `next_action` | string | Next step after unblock/review |
|
|
271
|
+
| `primary_spec` | string | Main spec path (`{KNOWLEDGE_DIR}/…`, `{SPECS_DIR}/…`) |
|
|
272
|
+
| `iteration_compass` | string | Optional `{ITERATION_DIR}/…` |
|
|
273
|
+
| `iteration_refs` | string[] | Optional multiple compass paths |
|
|
274
|
+
| `knowledge_refs` | string[] | Optional knowledge-doc references (e.g. `{KNOWLEDGE_DIR}/…` paths or doc ids) linked from this plan; written by `mstar-compound` Phase 6 / `mstar-compound-refresh` Phase 4; v1 root `status.json` metadata references are legacy read-only |
|
|
275
|
+
| `qc_status` / `tests` / `commits` | string | InReview/Done snapshots; not a substitute for durable plan gate summaries or the project register |
|
|
276
|
+
| `sdd_dir` | string | SDD scratch path, e.g. `{HARNESS_DIR}/sdd/<plan-id>/` (gitignored; `mstar-sdd`) |
|
|
277
|
+
| `sdd_progress` | string | Optional pointer to `{SDD_DIR}/progress.md` ledger |
|
|
278
|
+
| `review_bundle` | string | Optional pointer to `{SDD_DIR}/review/` for current ephemeral QC/QA evidence |
|
|
279
|
+
| `task_commits` | array\<object\> | SDD recovery: `{ "task_id": "T1", "base": "<sha>", "head": "<sha>" }` per completed task — recorded on the snapshot plan row |
|
|
280
|
+
|
|
281
|
+
### `plans[].execution_lease` (iteration Phase 2)
|
|
282
|
+
|
|
283
|
+
Optional when a plan is not owned; **required** while a Phase 2 session owns writable execution for that plan. Normative protocol below; iteration command checklist → `mstar-iteration/references/phase-2-worktree-lease.md`.
|
|
284
|
+
|
|
285
|
+
| Field | Type | Required | Semantics |
|
|
286
|
+
| --- | --- | --- | --- |
|
|
287
|
+
| `holder` | non-empty string | Yes | Opaque cooperative owner identity (recommended `<host>:<stable-session-id>`, e.g. `cursor:bc-1234`). Stable for claim lifetime; **no credentials**; used for ownership comparison — not `session_label`. |
|
|
288
|
+
| `claimed_at` | RFC 3339 UTC (`Z`) | Yes | Acquisition time (audit only; **not** an expiry clock). |
|
|
289
|
+
| `worktree_path` | absolute path string | Yes | Dedicated feature-worktree root; **MUST** differ from `control_worktree_path`. |
|
|
290
|
+
| `working_branch` | non-empty string | Yes | Feature branch at `worktree_path`; MUST agree with Assignment **`Working branch`**. |
|
|
291
|
+
| `session_label` | string | No | Human display only — **MUST NOT** authorize or compare ownership. |
|
|
292
|
+
|
|
293
|
+
Writers **delete** `execution_lease` on release; `null` and tombstone objects are invalid.
|
|
294
|
+
|
|
295
|
+
V1: **manual release only** — omit `expires_at`; readers **MUST NOT** treat unknown or draft `expires_at` as authority to steal or release.
|
|
296
|
+
|
|
297
|
+
### Snapshot top-level fields
|
|
298
|
+
|
|
299
|
+
| Field | Type | Semantics |
|
|
300
|
+
| --- | --- | --- |
|
|
301
|
+
| `integration_merge_lease` | object | While one integration merge is owned; **absent** = unclaimed. Writers **delete** the key on release — never `null` or tombstones |
|
|
302
|
+
| `execution_policy` | object | `plan_parallelism` / `worktree_mode` / `push_policy` — first-class (copied from v1 root `metadata` at migrate; values accepted-but-opaque this iteration) |
|
|
303
|
+
| `branch` | object | Iteration branch anchors: `base` (from `iteration_base_branch`), `integration` (the `spec_integration_branch`), `target` (final PR target) |
|
|
304
|
+
| `control_worktree_path` | absolute path string | Iteration Phase 2: canonical **repository root** (not `{HARNESS_DIR}`) checked out to the `branch.integration` branch; coordination + serial merge cwd |
|
|
305
|
+
| `compass_ref` | string | Relative pointer to the iteration delivery compass |
|
|
306
|
+
| `legacy_metadata` | object | Catch-all for unmapped v1 root-`metadata` keys at migrate |
|
|
307
|
+
|
|
308
|
+
### Snapshot `notes` vs `{WORKFLOW_DIR}/<id>/notes.jsonl`
|
|
309
|
+
|
|
310
|
+
- `plans[].notes`: per-plan timeline — **legacy verbatim copy** (read-only; preserved at migrate; never a dual-write target).
|
|
311
|
+
- `{WORKFLOW_DIR}/<id>/notes.jsonl`: **runtime notes ledger** — append-only; new notes go here only (`kind` + `ts` + `text` JSON lines; `mstar migrate` seeds it from v1 arrays).
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Iteration execution leases (Phase 2)
|
|
316
|
+
|
|
317
|
+
Leases live in the **workflow snapshot** `{WORKFLOW_DIR}/<id>/snapshot.json` (`plans[].execution_lease` per row; `integration_merge_lease` top-level). Coordination happens through the **control worktree** copy of that file. This is cooperative, not a distributed lock service — non-cooperating processes are out of scope.
|
|
318
|
+
|
|
319
|
+
**When fields apply:** iteration Phase 2 (after control worktree entry, or primary checkout when `Worktree mode: waived`). Control worktree + lease fields are waived only by explicit current-turn user instruction (`Worktree mode: waived` or equivalent). `Plan parallelism: serial` does **not** waive leases. **`Worktree mode: waived` does not waive the cross-plan parallel safety gate.**
|
|
320
|
+
|
|
321
|
+
**Path SSOT:** Default-gitignored process artifacts — `status.json`, `workflows/`, `projects/`, `plans/`, `iterations/`, `sdd/` — read/write via `<control_worktree_path>/{HARNESS_DIR}/…` (absolute). A feature worktree's same-looking `{HARNESS_DIR}` path is **not** the SSOT. Missing plans under a feature checkout (gitignore) is **not** grounds for `Worktree mode: waived` — keep feature worktrees and use control absolute **`Plan Path`** / **`SDD dir`**. Detail → **`mstar-branch-worktree`** 「Harness path SSOT under default gitignore」.
|
|
322
|
+
|
|
323
|
+
**Protocol home (single canonical copy):** the full lease protocol prose — same-host exclusive write lock, hard gate, claim-before-`InProgress`, hold/release/override, integration merge protocol, orphan recovery, lease prohibitions — lives in **`mstar-engine-legacy`** `references/lease-protocol.md` (engine-absent fallback). The Phase 2 iteration-command **execution checklist** → **`mstar-iteration`** `references/phase-2-worktree-lease.md`. This file carries the **field semantics** only (tables below + the lockdir location summary).
|
|
324
|
+
|
|
325
|
+
**Same-host exclusive write lock (snapshot / root):** all control-path lease mutations (execution claim/release/transfer, plan-status transitions that touch leases, `integration_merge_lease` claim/release) **MUST** run inside a same-host exclusive write lock for the full read-check-replace-verify sequence. Engine writers handle this automatically (`writeWorkflowSnapshot` / `registerWorkflow` acquire `<status-file dir>/.status-write.lockdir/` next to the file — for snapshots the lockdir lands inside `workflows/<id>/`). Prefer the engine-check commands below over hand-rolled `flock` snippets; the atomic-mkdir alternative (`.status-write.lockdir/` in the same directory as the file) remains the documented fallback when no engine writer exists. Hard gate, cross-host exception and pre-dispatch re-verify → `mstar-engine-legacy/references/lease-protocol.md`.
|
|
326
|
+
|
|
327
|
+
> **Lease Engine-check:** single canonical callout in `mstar-artifacts` `SKILL.md`(Engine-check lease 行)— pointer only, do not re-vendor.
|
|
328
|
+
|
|
329
|
+
### `integration_merge_lease` (snapshot top-level)
|
|
330
|
+
|
|
331
|
+
Single global lease authorizing one plan feature branch integration into `branch.integration` (the `spec_integration_branch`).
|
|
332
|
+
|
|
333
|
+
| Field | Type | Required | Semantics |
|
|
334
|
+
| --- | --- | --- | --- |
|
|
335
|
+
| `holder` | non-empty string | Yes | Same format and comparison rules as `execution_lease.holder`. |
|
|
336
|
+
| `claimed_at` | RFC 3339 UTC (`Z`) | Yes | Acquisition time (audit only). |
|
|
337
|
+
| `plan_id` | non-empty string | Yes | `plans[].id` of the feature being integrated. |
|
|
338
|
+
| `source_branch` | non-empty string | Yes | Plan feature branch to integrate. |
|
|
339
|
+
| `target_branch` | non-empty string | Yes | Resolved `spec_integration_branch` — no other target is valid. |
|
|
340
|
+
| `session_label` | string | No | Display only. |
|
|
341
|
+
|
|
342
|
+
### Claim-before-`InProgress`, hold/release/override, integration merge, orphan recovery, prohibitions
|
|
343
|
+
|
|
344
|
+
These are **full-protocol prose** — the single canonical copy lives in **`mstar-engine-legacy`** `references/lease-protocol.md` (engine-absent fallback); the Phase 2 iteration-command **execution checklist** is **`mstar-iteration`** `references/phase-2-worktree-lease.md`. This file carries the field semantics (tables above) and the engine checks only — do not re-state the protocol here. `V1: manual release only` — omit `expires_at`; readers **MUST NOT** treat unknown or draft `expires_at` as authority to steal or release (see the `execution_lease` field table).
|
|
345
|
+
|
|
346
|
+
---
|
|
347
|
+
|
|
348
|
+
## General constraints
|
|
349
|
+
|
|
350
|
+
- Each snapshot `plans[]` row may include optional **`metadata`** (`{}` or omit).
|
|
351
|
+
- A workflow root entry is **active only** (`running` | `paused`); terminal writers unregister the root entry after the snapshot write (removal-at-terminal).
|
|
352
|
+
- **`plans[].id`** keys must align with register `entries` keys and `{SDD_DIR}` plan-id segments. Do not store `residual_findings_plan_id`.
|
|
353
|
+
- **Empty `plan-id` key:** when no open entries remain, **delete** the key from the register (`entries`) — no `"plan-id": []`.
|
|
354
|
+
- **`residual_summary` (optional):** one-line human summary of **open** entries only.
|
|
355
|
+
|
|
356
|
+
---
|
|
357
|
+
|
|
358
|
+
## Residual findings lifecycle (close, archive, remove)
|
|
359
|
+
|
|
360
|
+
### `lifecycle` (optional; default open)
|
|
361
|
+
|
|
362
|
+
| `lifecycle` | Meaning | `closure_note` should explain |
|
|
363
|
+
| ----------- | ------- | ----------------------------- |
|
|
364
|
+
| `open` | Not closed (omit field = open) | — |
|
|
365
|
+
| `resolved` | Fixed in code/config/docs and **verified** | What changed; how verified |
|
|
366
|
+
| `waived` | Explicit decision not to fix | Who decided; why; optional `tracking` Issue |
|
|
367
|
+
| `superseded` | Replaced by new finding/spec/refactor | `superseded_by` |
|
|
368
|
+
| `duplicate` | Duplicate of another R# | Canonical `id` or mistake note |
|
|
369
|
+
|
|
370
|
+
**On close:** set **`closed_at`** (`YYYY-MM-DD`) and **`closure_note`**; recommend **`closure_evidence`** (PR, commit, test, doc anchor).
|
|
371
|
+
|
|
372
|
+
### Who updates when
|
|
373
|
+
|
|
374
|
+
| Action | Owner | When |
|
|
375
|
+
| ------ | ----- | ---- |
|
|
376
|
+
| Implement fix | `@fullstack-dev` / assignee | Completion Report cites R# + evidence |
|
|
377
|
+
| Verify | `@qa-engineer` when **`QA gate: mandatory`**; else PM per acceptance checklist | Regression / acceptance; open R# close requires verify before close |
|
|
378
|
+
| Write the register | **`@project-manager`** or **`@qa-engineer`** | After verification; waivers after PM + user/architect alignment |
|
|
379
|
+
|
|
380
|
+
Do not claim “R3 fixed” in chat/plan only without SSOT update.
|
|
381
|
+
|
|
382
|
+
PM should register open items after **`Approve with residuals`**; QA should state each related R# (open / resolved this round / needs waiver).
|
|
383
|
+
|
|
384
|
+
### Close in place (the only close path)
|
|
385
|
+
|
|
386
|
+
After **`closed_at`**, **`closure_note`**, and PM/QA confirm close:
|
|
387
|
+
|
|
388
|
+
1. Set `lifecycle` / `closed_at` / `closure_note` on the entry **in place** in the register (`projects/<id>/residuals.json` → `entries[<plan-id>]`).
|
|
389
|
+
2. Optional: delete the entry from the register instead when the team prefers an empty open list — the closed record's `lifecycle` + `closed_at` is the durable record either way.
|
|
390
|
+
3. Delete empty **`plan-id`** keys; update root `updated_at`; optional milestone entry in the workflow `notes.jsonl`.
|
|
391
|
+
|
|
392
|
+
Closed records live in the register + durable plan summaries; raw review bundles are ephemeral and not part of the long-term record.
|
|
393
|
+
|
|
394
|
+
### Short in-place close (transition only)
|
|
395
|
+
|
|
396
|
+
May set `lifecycle` / `closed_*` in the register for one PR; same milestone close/delete as above.
|
|
397
|
+
|
|
398
|
+
### Hard delete
|
|
399
|
+
|
|
400
|
+
- **Forbidden** for **open** entries.
|
|
401
|
+
- Do not delete closed entries; correct via new entry or new R# referencing old `id`.
|
|
402
|
+
- Mistaken open-only entry: PM may delete or mark **`duplicate`** then close.
|
|
403
|
+
|
|
404
|
+
### Query open and closed (examples)
|
|
405
|
+
|
|
406
|
+
```bash
|
|
407
|
+
# Engine-check (read-only): validate the register / rollup / cleanup gate
|
|
408
|
+
mstar status validate <path-to-residuals-or-root.json> # schema
|
|
409
|
+
mstar status tech-debt <project-dir> # rollup over registers
|
|
410
|
+
mstar status findings-cleanup <plan-id> --project <id> # mode gate
|
|
411
|
+
```
|
|
412
|
+
|
|
413
|
+
- The v1 read paths (root `residual_findings` / `metadata.residual_findings` / `archived/residuals/<plan-id>.json`) are **legacy read-only** — `mstar migrate` moved open entries into the register; old files may remain for history.
|
|
414
|
+
|
|
415
|
+
---
|
|
416
|
+
|
|
417
|
+
## `{WORKFLOW_DIR}/<id>/notes.jsonl` (per-workflow notes ledger)
|
|
418
|
+
|
|
419
|
+
Append-only JSON-lines log for merge closure, batch close, register refreshes, etc. Does not compete with **snapshot `plans[].status`** / open residual SSOT.
|
|
420
|
+
|
|
421
|
+
```jsonl
|
|
422
|
+
{"kind": "note", "ts": "2026-04-08", "text": "Short milestone"}
|
|
423
|
+
```
|
|
424
|
+
|
|
425
|
+
- **`@project-manager`** maintains; do not rewrite past lines — add a correction as a new line.
|
|
426
|
+
- **`plans[].notes`**: per-plan legacy verbatim array; **`notes.jsonl`**: runtime ledger — new notes append here only (no dual-write).
|
|
427
|
+
|
|
428
|
+
---
|
|
429
|
+
|
|
430
|
+
## `mstar status tech-debt` (project-register rollup)
|
|
431
|
+
|
|
432
|
+
**Role:** Cross-plan aggregate over **open** register entries across every `{PROJECT_DIR}/<id>/residuals.json` register. Does **not** replace per-entry SSOT. The v1 stored-summary drift check (`metadata.tech_debt_summary`) is a **v1 dead path** — the register is the source of truth, so `stored` is always null and the retained `checks`/`overall` fields report DRIFT (export-surface compatibility).
|
|
433
|
+
|
|
434
|
+
**Compute (canonical):** engine / CLI (do **not** hand-count):
|
|
435
|
+
|
|
436
|
+
```ts
|
|
437
|
+
// Engine check (when available) — pass the project dir (default: resolved {PROJECT_DIR})
|
|
438
|
+
import { techDebtRollup } from "@mstar-harness/engine";
|
|
439
|
+
const rollup = techDebtRollup("{HARNESS_DIR}/projects"); // { computed, stored: null, checks, overall }
|
|
440
|
+
// CLI form (same output; informational exit 0): mstar status tech-debt <path> (default: {PROJECT_DIR})
|
|
441
|
+
```
|
|
442
|
+
|
|
443
|
+
- Prints computed `total_open`, `by_severity`, `by_target`, `by_plan` (`by_plan` keyed by plan id — the snapshot/register plan linkage; legacy `"warning"` → `low`, `null`/`""` → `medium`; closed entries skipped; missing `target` groups under `"unspecified"`).
|
|
444
|
+
- The engine call **does not write** anything.
|
|
445
|
+
|
|
446
|
+
---
|
|
447
|
+
|
|
448
|
+
## Pre-merge: snapshot + register should match reality
|
|
449
|
+
|
|
450
|
+
Before merge/PR, **`@project-manager`** (or delegate) should verify: snapshot `plans[].status`, `metadata.gates`, project register (no accidental leftovers), vs review/CI.
|
|
451
|
+
|
|
452
|
+
**Common gaps:**
|
|
453
|
+
|
|
454
|
+
- R# added/closed but the register was not updated.
|
|
455
|
+
- Finding only in `plans[].notes` or chat, not in the register `entries[<plan-id>]`.
|
|
456
|
+
- Major milestone with no `notes.jsonl` entry when team uses the workflow ledger.
|
|
457
|
+
|
|
458
|
+
## Compatibility: plan key names
|
|
459
|
+
|
|
460
|
+
- Read: accept `id` or `plan_id` (v1 rows / entries read compatibility).
|
|
461
|
+
- Write: one canonical key (prefer `id`).
|
|
462
|
+
- Document the canonical key in `{HARNESS_DIR}/AGENTS.md` if migrating.
|
|
463
|
+
|
|
464
|
+
## Common queries
|
|
465
|
+
|
|
466
|
+
```bash
|
|
467
|
+
# Engine-check (recommended): validate any v2 artifact
|
|
468
|
+
mstar status validate .mstar/status.json # root v2
|
|
469
|
+
mstar status validate .mstar/workflows/<id>/snapshot.json # snapshot
|
|
470
|
+
mstar status tech-debt .mstar/projects # register rollup
|
|
471
|
+
```
|
|
472
|
+
v1 trees (root `plans[]` / `residual_findings`) are migrated first: `mstar migrate [--dry-run] [--path <root>]`.
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
# Plan harness file templates
|
|
2
|
+
|
|
3
|
+
Copy these into `{HARNESS_DIR}` when bootstrapping a project. Path symbols (`{HARNESS_DIR}`, `{PLAN_DIR}`, …) → **`mstar-conventions`**. Field semantics and residual lifecycle → **`mstar-artifacts/references/status-and-residuals.md`**. Optional rollup: engine `techDebtRollup` import (read-only; see that reference).
|
|
4
|
+
|
|
5
|
+
| File | Copy to | Notes |
|
|
6
|
+
|------|---------|--------|
|
|
7
|
+
| `status.empty.json` | `{HARNESS_DIR}/status.json` | The **v2 root register** shape (`version: 2`, `updated_at`, `workflows: []`) — see **`mstar-artifacts` SKILL.md** + `references/status-and-residuals.md`. Replace `updated_at` with the real date. Per-lifecycle snapshot / register / lease fields are created at runtime by engine writers (`workflows/<id>/snapshot.json`, `projects/<id>/residuals.json`) — not in the empty template. |
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# [Feature Name] Implementation Plan
|
|
2
|
+
|
|
3
|
+
> **For agentic workers:** REQUIRED SUB-SKILL: Use `mstar-sdd` (recommended) or inline execution. Steps use checkbox (`- [ ]`) syntax.
|
|
4
|
+
|
|
5
|
+
**Goal:** [One sentence]
|
|
6
|
+
|
|
7
|
+
**Architecture:** [2–3 sentences]
|
|
8
|
+
|
|
9
|
+
**Tech Stack:** [Key technologies]
|
|
10
|
+
|
|
11
|
+
**Execution:** mstar-sdd | inline
|
|
12
|
+
|
|
13
|
+
## Global Constraints
|
|
14
|
+
|
|
15
|
+
[Project-wide requirements — version floors, naming, exact values — copied verbatim from spec. Every task implicitly includes this section.]
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
### Task 1: [Component Name]
|
|
20
|
+
|
|
21
|
+
**Files:**
|
|
22
|
+
- Create: `exact/path/to/file`
|
|
23
|
+
- Modify: `exact/path/existing.py`
|
|
24
|
+
- Test: `tests/path/test.py`
|
|
25
|
+
|
|
26
|
+
**Interfaces:**
|
|
27
|
+
- Consumes: [signatures from earlier tasks]
|
|
28
|
+
- Produces: [what later tasks rely on]
|
|
29
|
+
|
|
30
|
+
- [ ] **Step 1: Write the failing test**
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
# complete test code
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- [ ] **Step 2: Run test — expect FAIL**
|
|
37
|
+
|
|
38
|
+
Run: `pytest tests/path/test.py -v`
|
|
39
|
+
|
|
40
|
+
- [ ] **Step 3: Minimal implementation**
|
|
41
|
+
|
|
42
|
+
- [ ] **Step 4: Run test — expect PASS**
|
|
43
|
+
|
|
44
|
+
- [ ] **Step 5: Commit**
|
|
45
|
+
|
|
46
|
+
## Plan self-review (PM before locked)
|
|
47
|
+
|
|
48
|
+
1. **Spec coverage:** every spec requirement maps to a task
|
|
49
|
+
2. **Placeholder scan:** no TBD, no "add tests" without code
|
|
50
|
+
3. **Type consistency:** names match across tasks
|
|
51
|
+
|
|
52
|
+
## SDD runtime (ephemeral)
|
|
53
|
+
|
|
54
|
+
When using `mstar-sdd`, artifacts live under `{SDD_DIR}` (see `mstar-conventions`). Do not duplicate briefs/reports in this file.
|