@mstar-harness/opencode 0.6.22 → 0.6.23
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/harness-commands/bootstrap.md +171 -0
- package/harness-commands/iteration-drive.md +42 -30
- package/harness-commands/iteration-start.md +11 -7
- package/harness-skills/mstar-compound/SKILL.md +251 -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/concepts-vocabulary.md +44 -0
- package/harness-skills/mstar-compound/references/schema.yaml +122 -0
- package/harness-skills/mstar-compound-refresh/SKILL.md +128 -0
- package/harness-skills/mstar-harness-core/SKILL.md +13 -7
- package/harness-skills/mstar-iteration/SKILL.md +273 -0
- package/harness-skills/mstar-iteration/references/iteration-compass-template.md +96 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +15 -3
- package/harness-skills/mstar-plan-artifacts/references/knowledge-and-designs.md +1 -0
- package/harness-skills/mstar-plan-conventions/SKILL.md +1 -0
- package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +46 -0
- package/harness-skills/mstar-review-qc/SKILL.md +9 -0
- package/harness-skills/mstar-review-qc/references/deep-review-personas.md +151 -0
- package/harness-skills/mstar-roles/SKILL.md +6 -2
- package/harness-skills/mstar-strategy/SKILL.md +128 -0
- package/harness-skills/pm/SKILL.md +10 -67
- package/package.json +1 -1
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Iteration Compass Template
|
|
2
|
+
|
|
3
|
+
Copy this template when creating a new iteration compass in `{ITERATION_DIR}/`.
|
|
4
|
+
|
|
5
|
+
```markdown
|
|
6
|
+
---
|
|
7
|
+
iteration_id: <id>
|
|
8
|
+
start_date: YYYY-MM-DD
|
|
9
|
+
end_date: <filled at close>
|
|
10
|
+
status: active
|
|
11
|
+
plans: []
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
# <iteration-id> Delivery Compass
|
|
15
|
+
|
|
16
|
+
## Scope
|
|
17
|
+
|
|
18
|
+
本迭代锁定的 spec 点:
|
|
19
|
+
|
|
20
|
+
- <spec point 1>
|
|
21
|
+
- <spec point 2>
|
|
22
|
+
|
|
23
|
+
## Plans
|
|
24
|
+
|
|
25
|
+
| plan_id | Name | Status | Notes |
|
|
26
|
+
|---------|------|--------|-------|
|
|
27
|
+
| <plan-id-1> | <plan name> | Todo | |
|
|
28
|
+
| <plan-id-2> | <plan name> | Todo | |
|
|
29
|
+
|
|
30
|
+
Status values: `Todo` | `InProgress` | `InReview` | `Done` | `Blocked`
|
|
31
|
+
|
|
32
|
+
## Milestones
|
|
33
|
+
|
|
34
|
+
| Milestone | Target date | Status |
|
|
35
|
+
|-----------|-------------|--------|
|
|
36
|
+
| Spec freeze | YYYY-MM-DD | pending |
|
|
37
|
+
| Dev complete | YYYY-MM-DD | pending |
|
|
38
|
+
| QC complete | YYYY-MM-DD | pending |
|
|
39
|
+
| Iteration close | YYYY-MM-DD | pending |
|
|
40
|
+
|
|
41
|
+
## Acceptance Criteria
|
|
42
|
+
|
|
43
|
+
- <迭代级验收项 1>
|
|
44
|
+
- <迭代级验收项 2>
|
|
45
|
+
|
|
46
|
+
## Non-Goals
|
|
47
|
+
|
|
48
|
+
- <明确排除项 1>
|
|
49
|
+
- <明确排除项 2>
|
|
50
|
+
|
|
51
|
+
## Roadmap Position
|
|
52
|
+
|
|
53
|
+
- **本批(<iteration-id>)**:<what this iteration delivers>
|
|
54
|
+
- **下批**:<what comes next>,触发条件:<condition>,owner:<who>
|
|
55
|
+
- **最终目标**:<the long-term Done definition this iteration contributes to>
|
|
56
|
+
|
|
57
|
+
## Risk Register
|
|
58
|
+
|
|
59
|
+
| Risk | Likelihood | Impact | Mitigation |
|
|
60
|
+
|------|-----------|--------|------------|
|
|
61
|
+
| <risk> | Low/Med/High | Low/Med/High | <mitigation> |
|
|
62
|
+
|
|
63
|
+
## Compound Round Summary
|
|
64
|
+
|
|
65
|
+
> Filled at iteration-close.
|
|
66
|
+
|
|
67
|
+
- 结晶文档数:<N>
|
|
68
|
+
- 新增 CONCEPTS.md 条目:<N>
|
|
69
|
+
- 触发 compound-refresh:<是/否>
|
|
70
|
+
|
|
71
|
+
## Iteration Retrospective (minimal)
|
|
72
|
+
|
|
73
|
+
> Filled at iteration-close.
|
|
74
|
+
|
|
75
|
+
- 做得好的:
|
|
76
|
+
- 可改进的:
|
|
77
|
+
- 下迭代建议:
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Fields guide
|
|
81
|
+
|
|
82
|
+
| Field | Required | When to fill |
|
|
83
|
+
|-------|----------|-------------|
|
|
84
|
+
| `iteration_id` | Yes | iteration-start |
|
|
85
|
+
| `start_date` | Yes | iteration-start |
|
|
86
|
+
| `end_date` | No (fill at close) | iteration-close |
|
|
87
|
+
| `status` | Yes | iteration-start → `active`; iteration-close → `completed` |
|
|
88
|
+
| `plans` (frontmatter) | Recommended | iteration-start (initial), iteration-drive (add new) |
|
|
89
|
+
| `## Plans` table | Yes | iteration-drive (sync status), iteration-close (final) |
|
|
90
|
+
| `## Milestones` | Recommended | iteration-start, iteration-drive (update) |
|
|
91
|
+
| `## Acceptance Criteria` | Yes | iteration-start |
|
|
92
|
+
| `## Non-Goals` | Yes | iteration-start |
|
|
93
|
+
| `## Roadmap Position` | Yes | iteration-start, iteration-close (update) |
|
|
94
|
+
| `## Risk Register` | Optional | iteration-start, iteration-drive (update) |
|
|
95
|
+
| `## Compound Round Summary` | Yes | iteration-close |
|
|
96
|
+
| `## Iteration Retrospective` | Recommended | iteration-close |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-phase-gates
|
|
3
|
-
description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare(`specify → clarify → plan`)、Execute(`plan(locked) → tasks → implement`)、意图门禁、长期目标优先、分批 roadmap 强制落盘、clarify 核心纪律(共享理解 / 先探索 / 每问推荐答案)、hotfix 压缩路径、可验证编辑、Phase Gate 最小证据。**必须**在 PM 判定 gate、首次 implement 派单前、产品/架构参与 Prepare、或解释为何不能跳过 plan/clarify 时 Read;`@project-manager` 每轮编排非 hotfix 任务必读;`@product-manager` / `@architect` 写规格与锁 plan 时必读 Prepare 节;实现角色 Read Execute 与 hotfix 例外即可。Task category 与 `quick` 禁豁免规则仍在 `mstar-harness-core`。并行 Superpowers 短语见 `mstar-superpowers-align`。
|
|
3
|
+
description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare(`specify → clarify → plan`)、Execute(`plan(locked) → tasks → implement`)、意图门禁、长期目标优先、分批 roadmap 强制落盘、clarify 核心纪律(共享理解 / 先探索 / 每问推荐答案)、hotfix 压缩路径、可验证编辑、Phase Gate 最小证据。**必须**在 PM 判定 gate、首次 implement 派单前、产品/架构参与 Prepare、或解释为何不能跳过 plan/clarify 时 Read;`@project-manager` 每轮编排非 hotfix 任务必读;`@product-manager` / `@architect` 写规格与锁 plan 时必读 Prepare 节;实现角色 Read Execute 与 hotfix 例外即可。Task category 与 `quick` 禁豁免规则仍在 `mstar-harness-core`。并行 Superpowers 短语见 `mstar-superpowers-align`。迭代级活动(iteration-start / iteration-close / compound)见 `mstar-iteration`。
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
@@ -50,7 +50,7 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
|
|
|
50
50
|
- 非热修(non-hotfix)任务默认强制执行全链路门禁。
|
|
51
51
|
- 热修可走压缩路径,但必须补事后 `clarify/RCA` 记录。
|
|
52
52
|
|
|
53
|
-
##
|
|
53
|
+
## 两阶段门禁(per-plan Playbook)
|
|
54
54
|
|
|
55
55
|
### A. Prepare
|
|
56
56
|
|
|
@@ -100,6 +100,16 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
|
|
|
100
100
|
- `@qa-engineer`
|
|
101
101
|
- 在 `InReview` 阶段验证实现与验收映射是否一致。
|
|
102
102
|
|
|
103
|
+
## 迭代级活动
|
|
104
|
+
|
|
105
|
+
per-plan 门禁通过后,PM 在**迭代层面**管理以下活动(不计入 per-plan gate):
|
|
106
|
+
|
|
107
|
+
- **迭代启动**(`mstar-iteration` § Phase 1 iteration-start):锁定迭代范围(本迭代包含哪些 plan)、里程碑、验收标准,产出 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md`。
|
|
108
|
+
- **迭代驱动**(`mstar-iteration` § Phase 2 Autonomous Execute):per-plan 派发循环(分支→实现→QC→QA→Done→合并),跨 plan 进度追踪,更新 compass 中各 plan 状态。
|
|
109
|
+
- **迭代收口**(`mstar-iteration` § Phase 3 iteration-close):迭代内所有 plan Done 后,执行一轮知识结晶(`mstar-compound`)沉淀迭代经验,更新 roadmap,标记迭代完成。
|
|
110
|
+
|
|
111
|
+
per-plan Done 是 per-plan 的闭环终点;compound 是迭代级收口活动,不影响 per-plan 状态判定。
|
|
112
|
+
|
|
103
113
|
## Plan 目录与审查报告(启用 `{PLAN_DIR}` 时)
|
|
104
114
|
|
|
105
115
|
- 进入 `InReview` 后,QC 书面产出落入 `{PLAN_DIR}/reports/<plan-id>/`(如 `qc1.md` … `qc-consolidated.md`);**fix 后默认 targeted re-review**(原位更新同文件,不默认 `-rev2`),见 **`mstar-plan-artifacts/references/plan-files-and-reports.md`**。**多 batch**:完整三审**默认在整 plan dev 完成后一次**(非每 batch)。
|
|
@@ -118,7 +128,9 @@ description: Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepare
|
|
|
118
128
|
9. 若中途出现 plan drift,是否先回写再继续?
|
|
119
129
|
10. 实现说明中是否体现"最小耐久切片 + 手术式改动 + 可验证检查"?
|
|
120
130
|
|
|
121
|
-
|
|
131
|
+
**任一项为「否」时,`Gate decision` 必须是 `blocked`**。
|
|
132
|
+
|
|
133
|
+
> 迭代级活动(compound / iteration-close)见 `mstar-iteration`;不属于 per-plan gate 判定项。
|
|
122
134
|
|
|
123
135
|
## Hotfix 例外
|
|
124
136
|
|
|
@@ -53,6 +53,7 @@
|
|
|
53
53
|
2. **阅读**:开发类 agent 在开始编码前,**必须**阅读当前 plan 在 `metadata` 中指向的 knowledge 文档(若存在);`@project-manager` 在 Assignment 中可再次点名路径。
|
|
54
54
|
3. **修订**:评审或规格变更若改动了 knowledge 文件,同步更新 README 中 **Status** 或 Description;版本迭代优先新文件名 `v<N+1>` 或保留旧版并标明 Superseded。
|
|
55
55
|
4. **归档**:当文档内容已完全反映到已合并代码中时:**保留文件不删除**(保留设计考据);将索引 **Status** 标为 `Superseded by implementation (...)` 或 `Archived`。**不要**把知识库产物搬进 `**{HARNESS_DIR}/archived/plans/`**(该处用于**计划行**冷快照);知识库用索引状态表达生命周期即可。
|
|
56
|
+
5. **结晶(Compound)**:PM 在迭代收口时(`mstar-iteration` § iteration-close)批量触发 `mstar-compound`,将整轮迭代的经验沉淀为结构化知识文档(`{KNOWLEDGE_DIR}/<category>/<slug>.md`,YAML frontmatter + 双轨模板)。compound 是迭代级活动,不在 per-plan Done 后单独执行。定期维护由 `mstar-compound-refresh` 执行。详见 **`mstar-compound`**、**`mstar-iteration`** 与 **`mstar-compound-refresh`**。
|
|
56
57
|
|
|
57
58
|
## 与 `reports/`、`{PLAN_DIR}/residuals/` 的区分
|
|
58
59
|
|
|
@@ -84,5 +84,6 @@ PM 在需要持久化追踪时:
|
|
|
84
84
|
|
|
85
85
|
- `references/harness-bootstrap-and-agents-layering.md` — 新仓 harness + AGENTS 分层
|
|
86
86
|
- `references/effort-estimation.md` — agent-oriented 工期(禁人天/FTE)
|
|
87
|
+
- `references/artifact-storage-paths.md` — **产物存储路径 SSOT**(知识文档、CONCEPTS.md、STRATEGY.md 等落盘位置;`mstar-compound`、`mstar-compound-refresh`、`mstar-strategy` 等技能引用此表,不得本地重定义)
|
|
87
88
|
|
|
88
89
|
**Plan 工件细则**(主 plan、reports、`status.json`、residual、knowledge、Done 归档、**`templates/`**)→ skill **`mstar-plan-artifacts`**(`references/` 与 `templates/`)。
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 产物存储路径(SSOT · 路径符号解析后)
|
|
2
|
+
|
|
3
|
+
> **Authority**: `mstar-plan-conventions` `references/artifact-storage-paths.md`.
|
|
4
|
+
> Symbol definitions (`{HARNESS_DIR}`, `{KNOWLEDGE_DIR}`, `{PLAN_DIR}`, etc.) → `mstar-plan-conventions` SKILL.md § 路径符号。
|
|
5
|
+
> All `mstar-*` skills that produce or operate on files **must** follow this table; do not redefine paths locally.
|
|
6
|
+
|
|
7
|
+
## Harness 子树内(`{HARNESS_DIR}/` 下)
|
|
8
|
+
|
|
9
|
+
这些是 agent handoff 用的结构化产物,随 `.git` 追踪,不面向人类直接阅读。
|
|
10
|
+
|
|
11
|
+
| 产物 | 解析后路径(默认 `.mstar/`) | 读写的技能 |
|
|
12
|
+
|------|---------------------------|-----------|
|
|
13
|
+
| **知识文档** | `.mstar/knowledge/<category>/<slug>.md` | `mstar-compound`(写)、`mstar-compound-refresh`(读写) |
|
|
14
|
+
| **知识索引** | `.mstar/knowledge/README.md` | `mstar-compound`(写)、`mstar-compound-refresh`(读写) |
|
|
15
|
+
| **主 plan** | `.mstar/plans/<plan-id>-<name>.md` | PM / `mstar-plan-artifacts` |
|
|
16
|
+
| **QC 报告** | `.mstar/plans/reports/<plan-id>/qcN.md` | `mstar-review-qc` |
|
|
17
|
+
| **status.json** | `.mstar/status.json` | `mstar-plan-artifacts` |
|
|
18
|
+
| **迭代 compass** | `.mstar/iterations/<iteration-id>-delivery-compass.md` | `mstar-iteration`(读写) |
|
|
19
|
+
| **迭代索引** | `.mstar/iterations/README.md` | `mstar-iteration`(读写) |
|
|
20
|
+
| **规格** | `specs/`(优先),否则 `designs/` | `mstar-plan-artifacts` |
|
|
21
|
+
| **archived residuals** | `.mstar/archived/residuals/<plan-id>.json` | `mstar-plan-artifacts` |
|
|
22
|
+
|
|
23
|
+
## 仓库根目录(`<repo-root>/`,与 `.git/` 同级)
|
|
24
|
+
|
|
25
|
+
这些是人类和所有 agent 的共同入口,**不在** `{HARNESS_DIR}` 子树内。
|
|
26
|
+
|
|
27
|
+
| 产物 | 解析后路径 | 读写的技能 |
|
|
28
|
+
|------|----------|-----------|
|
|
29
|
+
| **CONCEPTS.md** | `<repo-root>/CONCEPTS.md` | `mstar-compound`(写/协同)、`mstar-compound-refresh`(reconciliation/bootstrapping) |
|
|
30
|
+
| **STRATEGY.md** | `<repo-root>/STRATEGY.md` | `mstar-strategy`(读写) |
|
|
31
|
+
| **AGENTS.md 更新** | `<repo-root>/AGENTS.md`(或 `CLAUDE.md`) | `mstar-compound`(可发现性检查编辑)、`mstar-strategy`(索引编辑) |
|
|
32
|
+
|
|
33
|
+
## 禁止操作区域
|
|
34
|
+
|
|
35
|
+
以下目录**不属于** harness 知识/策略的产出目标,skills 不得在其中写入:
|
|
36
|
+
|
|
37
|
+
| 路径 | 说明 |
|
|
38
|
+
|------|------|
|
|
39
|
+
| `docs/` | 人类文档(安装、贡献指南等),知识产物不放此处 |
|
|
40
|
+
| `{ITERATION_DIR}/` | 仅限迭代 compass,知识文档不放此处 |
|
|
41
|
+
| `{SPECS_DIR}/` | 仅限冻结规格/ADR,运行时知识不放此处 |
|
|
42
|
+
| `{PLAN_DIR}/reports/` | 仅限 QC 报告,知识文档不放此处 |
|
|
43
|
+
|
|
44
|
+
## `<category>` 取值
|
|
45
|
+
|
|
46
|
+
知识文档的 `<category>` 子目录由 `mstar-compound` 的 `references/category-mapping.md` 定义,在 `{KNOWLEDGE_DIR}` 下按需创建。示例:`runtime-errors/`、`conventions/`、`architecture-patterns/` 等。
|
|
@@ -49,6 +49,15 @@ description: Morning Star QC/QA review baseline — tri-review workflow, checkli
|
|
|
49
49
|
7. **报告入库(Git)**:将 QC 报告 **`.md`** 写入 `{PLAN_DIR}/reports/<plan-id>/` 后,在业务仓根执行 **`git add`**(**仅**本次报告路径)与 **`git commit`**,并在 Completion Report 给出 **真实** `git log -1 --oneline`。**禁止**仅完成 Write/Edit 而不提交(权限与例外见各 `agents/qc-specialist*.md`)。
|
|
50
50
|
8. **禁止收尾套话**:报告与 commit 成功后,**不得**向终端用户追问「是否要交付报告」「下一步是否通知 PM」等;须在同一轮内输出完整 **Completion Report v2** 结束(见各 `agents/qc-specialist*.md` **「回合结束方式」**)。
|
|
51
51
|
|
|
52
|
+
### Deep Review 模式(自动触发,透镜制)
|
|
53
|
+
|
|
54
|
+
QC reviewer 在开工时按 `references/deep-review-personas.md` § 触发规则自行判定是否启用 deep review(≥2 条信号即触发)。**不派发子代理**,不依赖 PM 显式标注 mode。
|
|
55
|
+
|
|
56
|
+
- **触发信号**:变更规模、敏感模块、新领域、数据结构变更、plan 高风险声明、多模块耦合 —— 达 2 条即触发。
|
|
57
|
+
- **审查方式**:单人加载**透镜(lens)**——结构化检查表,逐项覆盖(如 Security Lens、Auth Lens、Data Migration Lens),不派发 persona subagent(反递归红线)。
|
|
58
|
+
- **透镜选择**:默认透镜 + 按触发信号追加。详见 `references/deep-review-personas.md`。
|
|
59
|
+
- **报告中体现**:`## Scope` 写 `Deep review: triggered (<signals>)` + `Lenses applied: <list>`;发现归入主报告 Findings,`Source Type` 标注为 `deep-lens: <lens-name>`。
|
|
60
|
+
|
|
52
61
|
## 共享审查清单
|
|
53
62
|
|
|
54
63
|
### 代码质量
|
|
@@ -0,0 +1,151 @@
|
|
|
1
|
+
# QC Deep Review Lenses(审查透镜 · 单人模式)
|
|
2
|
+
|
|
3
|
+
> **关键约束**:mstar 派发模型下,QC reviewer 是 PM 派发的 **leaf executor**(`Delegation: forbidden`),**禁止**自行派发任何 subagent 或 persona(`mstar-dispatch-gates` § 承接方反递归 NEVER 红线)。
|
|
4
|
+
> 本文件的设计选择:**透镜(lens)而非代理(subagent)**——QC reviewer **本人**在审查时额外覆盖的检查维度,每个透镜是一组结构化问题,审查者在本地逐一回答即可。
|
|
5
|
+
> 不派发子 agent,不产生额外对话轮次,不违反反递归约束。
|
|
6
|
+
|
|
7
|
+
## Deep review 触发规则(自动判定,无需人工指定)
|
|
8
|
+
|
|
9
|
+
QC reviewer 在开工时根据以下信号自判是否启用 deep review。满足 **≥2 条**即触发。
|
|
10
|
+
|
|
11
|
+
### 触发信号
|
|
12
|
+
|
|
13
|
+
| # | 信号 | 检测方式 |
|
|
14
|
+
|---|------|---------|
|
|
15
|
+
| S1 | **变更规模大** | `git diff --stat <Review range>` → 变更行数 ≥ 200 或 变更文件数 ≥ 8 |
|
|
16
|
+
| S2 | **触及敏感模块** | diff 中包含 `auth/`、`payment/`、`security/`、`permission/`、`login/`、`migration/`、`db/migrate/`、`schema/` 路径 |
|
|
17
|
+
| S3 | **首次涉足新领域** | `{KNOWLEDGE_DIR}` 中不存在 diff 触及的模块名;或 plan metadata 标记为首次实现 |
|
|
18
|
+
| S4 | **数据结构变更** | diff 中包含 DDL(`CREATE TABLE`、`ALTER TABLE`、`ADD COLUMN`、schema 文件、migration 文件) |
|
|
19
|
+
| S5 | **plan 显式声明高风险** | plan 正文或 `status.json` 的 plan metadata 中包含 `high-risk`、`critical-path`、`breaking-change` 标记 |
|
|
20
|
+
| S6 | **多模块耦合** | diff 跨越 ≥3 个不同模块/包/目录边界 |
|
|
21
|
+
|
|
22
|
+
**判定**:满足 ≥2 条 → 启用 deep review。QC reviewer 在报告 `## Scope` 节中写明判定依据(例:`Deep review: triggered (S1: 350 lines / 12 files, S2: auth/ + payment/)`)。
|
|
23
|
+
|
|
24
|
+
## 透镜选择
|
|
25
|
+
|
|
26
|
+
触发后,QC reviewer 根据信号匹配相关透镜。每个 reviewer 身份有默认透镜,再按触发的信号追加特定透镜。
|
|
27
|
+
|
|
28
|
+
### 默认透镜(各 reviewer 始终覆盖)
|
|
29
|
+
|
|
30
|
+
| Reviewer | 默认透镜 |
|
|
31
|
+
|----------|---------|
|
|
32
|
+
| QC1 (architecture/maintainability) | **Modularity Lens** + **Contract Lens** |
|
|
33
|
+
| QC2 (security/correctness) | **Security Lens** + **Correctness Lens** |
|
|
34
|
+
| QC3 (performance/reliability) | **Performance Lens** + **Reliability Lens** |
|
|
35
|
+
|
|
36
|
+
### 按信号追加透镜
|
|
37
|
+
|
|
38
|
+
| 触发信号 | 追加透镜 | 适用于 |
|
|
39
|
+
|---------|---------|-------|
|
|
40
|
+
| S2 (敏感模块) | **Auth Lens**(若涉及 auth/login)、**Data Migration Lens**(若涉及 DDL/migration)、**Input Validation Lens**(若涉及用户输入/API) | 全体 |
|
|
41
|
+
| S3 (新领域) | **Standards Lens**、**Testing Lens** | 全体 |
|
|
42
|
+
| S4 (数据结构变更) | **Data Migration Lens** | 全体 |
|
|
43
|
+
| S5 (显式高风险) | **全部透镜**(每个 reviewer 覆盖自己身份相关的所有透镜) | 全体 |
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## 透镜清单(结构化检查表)
|
|
48
|
+
|
|
49
|
+
每个透镜是一组审查问题。QC reviewer 在报告中按透镜分节列出发现,每个发现标注来自哪个透镜。
|
|
50
|
+
|
|
51
|
+
### Modularity Lens
|
|
52
|
+
- [ ] 本次变更是否引入了新的模块依赖?方向是否合理?
|
|
53
|
+
- [ ] 是否有逻辑被放在不合适的模块/层级中(如 controller 中的业务逻辑、model 中的视图逻辑)?
|
|
54
|
+
- [ ] 新引入的公共接口是否职责单一、边界清晰?
|
|
55
|
+
- [ ] 是否存在循环依赖或隐含的耦合将被后续变更放大?
|
|
56
|
+
|
|
57
|
+
### Contract Lens
|
|
58
|
+
- [ ] 任何公共 API/接口签名是否发生了不兼容变更?
|
|
59
|
+
- [ ] 若有 breaking change,是否在 plan 中声明?是否有迁移说明?
|
|
60
|
+
- [ ] 新增的 API 端点是否遵循现有命名和参数约定?
|
|
61
|
+
- [ ] 接口返回类型是否稳定(新增字段不使用破坏已有字段解析的方式)?
|
|
62
|
+
|
|
63
|
+
### Security Lens
|
|
64
|
+
- [ ] 变更是否涉及认证/授权流程?session、token、permission 逻辑是否正确?
|
|
65
|
+
- [ ] 是否存在未验证的用户输入被直接用于数据库查询、命令执行或文件操作?
|
|
66
|
+
- [ ] 敏感数据(密钥、token、密码、PII)是否在日志/错误信息/返回值中泄露?
|
|
67
|
+
- [ ] 新增的访问控制点是否覆盖了所有调用路径?
|
|
68
|
+
|
|
69
|
+
### Correctness Lens
|
|
70
|
+
- [ ] 错误处理是否显式、可恢复?是否有吞掉关键异常的 catch-all?
|
|
71
|
+
- [ ] 边界条件是否覆盖?(空值、零值、溢出、并发冲突)
|
|
72
|
+
- [ ] 状态转换逻辑是否一致?是否存在中间状态会被外部观察到?
|
|
73
|
+
- [ ] 返回值/副作用是否与声明一致?
|
|
74
|
+
|
|
75
|
+
### Performance Lens
|
|
76
|
+
- [ ] 是否引入了 N+1 查询?新增的 ORM 调用是否有 eager loading?
|
|
77
|
+
- [ ] 循环或批处理中是否有无界操作?
|
|
78
|
+
- [ ] 新索引是否必要且不会造成写入性能退化?
|
|
79
|
+
- [ ] 大对象/大列表是否做分页或流式处理?
|
|
80
|
+
|
|
81
|
+
### Reliability Lens
|
|
82
|
+
- [ ] 资源(连接、文件句柄、锁)是否在异常路径中也正确释放?
|
|
83
|
+
- [ ] 外部服务调用是否有超时和重试策略?
|
|
84
|
+
- [ ] 缓存失效策略是否正确(不会长期返回过期数据)?
|
|
85
|
+
- [ ] 是否存在可能无限增长的结构(无界缓存、无界日志、无界队列)?
|
|
86
|
+
|
|
87
|
+
### Auth Lens
|
|
88
|
+
- [ ] 认证中间件是否覆盖了所有新增端点?
|
|
89
|
+
- [ ] 权限检查是否在业务逻辑执行前完成(先鉴权再操作)?
|
|
90
|
+
- [ ] session 生命周期管理是否正确(创建、续期、失效)?
|
|
91
|
+
- [ ] 是否有权限提升路径(如 admin 操作需二次确认)?
|
|
92
|
+
|
|
93
|
+
### Input Validation Lens
|
|
94
|
+
- [ ] 所有外部输入(query params、body、headers)是否经过类型/范围/格式验证?
|
|
95
|
+
- [ ] 是否存在可通过输入触发的路径遍历、注入或 XSS?
|
|
96
|
+
- [ ] 文件上传是否有大小/类型检查?
|
|
97
|
+
- [ ] API 返回的错误信息是否在暴露内部实现细节?
|
|
98
|
+
|
|
99
|
+
### Data Migration Lens
|
|
100
|
+
- [ ] migration 是否可回滚?`down` 方法是否存在且正确?
|
|
101
|
+
- [ ] 是否对大数据量表使用了非阻塞的 migration 策略?
|
|
102
|
+
- [ ] 数据迁移是否保持了一致性(不丢数据、不产生中间脏状态)?
|
|
103
|
+
- [ ] 是否考虑了并发写入场景下的迁移安全性?
|
|
104
|
+
|
|
105
|
+
### Error Handling Lens
|
|
106
|
+
- [ ] 异常层级是否清晰(业务异常 vs 系统异常)?
|
|
107
|
+
- [ ] 面向用户的错误消息是否安全(不泄露内部细节)?
|
|
108
|
+
- [ ] 关键操作失败后的副作用是否被正确处理(事务回滚、补偿操作)?
|
|
109
|
+
- [ ] 是否有"静默失败"的路径(错误被忽略但后续逻辑假定成功)?
|
|
110
|
+
|
|
111
|
+
### Standards Lens
|
|
112
|
+
- [ ] 代码风格、命名、文件组织是否符合项目已有约定?
|
|
113
|
+
- [ ] 是否引入了与现有方案冲突的重复实现?
|
|
114
|
+
- [ ] 新依赖的引入是否有充分理由?
|
|
115
|
+
- [ ] 是否遵循了项目 `AGENTS.md` 中的维护契约?
|
|
116
|
+
|
|
117
|
+
### Testing Lens
|
|
118
|
+
- [ ] 对关键逻辑路径是否有测试覆盖?
|
|
119
|
+
- [ ] 边界和异常路径是否被测试覆盖?
|
|
120
|
+
- [ ] 是否存在仅验证 happy path 而跳过了 failure mode 的测试?
|
|
121
|
+
- [ ] 集成测试是否覆盖了与外部服务的交互边界?
|
|
122
|
+
|
|
123
|
+
---
|
|
124
|
+
|
|
125
|
+
## 透镜发现与主审查的整合
|
|
126
|
+
|
|
127
|
+
所有透镜发现归入主报告的 `## Findings` 三节(Critical / Warning / Suggestion)中,每个发现的 `Source Type` 标注为对应透镜名(如 `deep-lens: Security Lens`),与主审查者的 `manual-reasoning` 发现同等待遇。
|
|
128
|
+
|
|
129
|
+
```markdown
|
|
130
|
+
## Scope
|
|
131
|
+
- plan_id: <id>
|
|
132
|
+
- Review range: <hash..hash>
|
|
133
|
+
- Deep review: triggered (S1: 280 lines / 10 files, S2: auth/ + migration/)
|
|
134
|
+
- Lenses applied: Security Lens, Auth Lens, Data Migration Lens, Modularity Lens, Contract Lens
|
|
135
|
+
|
|
136
|
+
## Findings
|
|
137
|
+
### 🔴 Critical
|
|
138
|
+
- [DS-001] Auth middleware missing on POST /api/admin/users → <fix>
|
|
139
|
+
- Source Type: deep-lens: Auth Lens
|
|
140
|
+
- Confidence: High
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
报告中无需专门统计透镜数量或列出"未应用的透镜"——报告中只出现实际应用且有发现的透镜。无任何发现的透镜不出现在报告中。
|
|
144
|
+
|
|
145
|
+
## 例外:不适用 deep review 的情况
|
|
146
|
+
|
|
147
|
+
即使触发信号阈值达标,以下情况 QC reviewer 仍按默认单透镜模式审查:
|
|
148
|
+
|
|
149
|
+
- **Re-review(targeted re-review)**:只在原报告基础上验证修复点,不重新扩展审查范围
|
|
150
|
+
- **Hotfix**:时间窗口不允许扩展审查,按 hotfix 压缩路径处理(事后在 plan notes 中补 deep review 追记)
|
|
151
|
+
- **上下文限制**:宿主会话上下文不足以加载透镜内容时,标记为 `Deep review: skipped (context constraint)` 并仅执行默认审查
|
|
@@ -49,17 +49,21 @@ Treat these as baseline dependencies **where the role touches implementation, re
|
|
|
49
49
|
| `mstar-review-qc` | QC workflow, template, verdict, high-risk checks |
|
|
50
50
|
| `mstar-coding-behavior` | Implementation/debug/refactor (**not** PM orchestration-only) |
|
|
51
51
|
| `mstar-superpowers-align` | Superpowers plugin on; Assignment `Superpowers` lines |
|
|
52
|
+
| `mstar-compound` | Capturing solved problems as structured knowledge in `{KNOWLEDGE_DIR}`; Discoverability check; CONCEPTS.md synergy |
|
|
53
|
+
| `mstar-compound-refresh` | Auditing/updating/consolidating knowledge docs; maintaining `{KNOWLEDGE_DIR}` accuracy |
|
|
54
|
+
| `mstar-iteration` | Iteration lifecycle: iteration-start (scope/roadmap lock), Autonomous Execute (per-plan dispatch loop), iteration-close (compound + roadmap update) |
|
|
55
|
+
| `mstar-strategy` | Creating/maintaining `STRATEGY.md`; project vision, principles, technology direction |
|
|
52
56
|
| `mstar-host` | Host-specific behavior (auto-detect; `references/opencode.md` / `cursor.md` / `codex.md`) |
|
|
53
57
|
|
|
54
58
|
### Role → typical topic skills (after `mstar-harness-core`)
|
|
55
59
|
|
|
56
60
|
| Role | Typical adds |
|
|
57
61
|
| --- | --- |
|
|
58
|
-
| `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-superpowers-align`, `mstar-roles` ref; + `mstar-review-qc` before QC; + `mstar-branch-worktree` / `mstar-plan-artifacts` as the round requires |
|
|
62
|
+
| `project-manager` | `mstar-dispatch-gates`, `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-superpowers-align`, `mstar-roles` ref; + `mstar-review-qc` before QC; + `mstar-branch-worktree` / `mstar-plan-artifacts` as the round requires; + `mstar-iteration` for iteration lifecycle (start/drive/close); + `mstar-strategy` for strategic alignment; + `mstar-compound` / `mstar-compound-refresh` pre-loaded by `mstar-iteration` § iteration-close |
|
|
59
63
|
| `fullstack-dev*`, `frontend-dev` | `mstar-coding-behavior`, `mstar-dispatch-gates`, `mstar-branch-worktree` (if repo writes); plan path symbols from `mstar-plan-conventions` (minimal); `mstar-design-md` when implementing styled UI |
|
|
60
64
|
| `qc-specialist*` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (report paths); `mstar-design-md` when reviewing UI |
|
|
61
65
|
| `qa-engineer` | `mstar-review-qc`, `mstar-branch-worktree`, `mstar-plan-artifacts` (closing R#); `mstar-design-md` when verifying visual output |
|
|
62
|
-
| `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent) |
|
|
66
|
+
| `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent); `mstar-strategy` (STRATEGY.md creation/maintenance) |
|
|
63
67
|
| `ops-engineer` | `mstar-coding-behavior`, `mstar-branch-worktree` |
|
|
64
68
|
| `prompt-engineer` | All topic skills when editing harness text |
|
|
65
69
|
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mstar-strategy
|
|
3
|
+
description: Morning Star 全局战略方向 —— 创建并维护 `STRATEGY.md`(项目级战略文档),作为 brainstorm/plan 的上游锚点。定义产品愿景、技术方向、不做事项、决策原则。触发:项目初始化、方向性决策变更、或 PM 要求战略对齐时。
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# mstar-strategy(全局战略方向)
|
|
7
|
+
|
|
8
|
+
## Load order
|
|
9
|
+
|
|
10
|
+
**Read `mstar-harness-core` first.** Path symbols → **`mstar-plan-conventions`**. On conflict, **`mstar-harness-core` wins**.
|
|
11
|
+
|
|
12
|
+
## Purpose
|
|
13
|
+
|
|
14
|
+
`STRATEGY.md` is the project's **upstream anchor** — a concise declaration of what the project is, where it's going, and what principles guide decisions. It is read as grounding by brainstorm, plan, and ideation phases so strategic choices flow into every feature.
|
|
15
|
+
|
|
16
|
+
Without a strategy document, decisions are made in isolation — each plan misses the larger context.
|
|
17
|
+
|
|
18
|
+
## 产物存储位置
|
|
19
|
+
|
|
20
|
+
**SSOT**: `mstar-plan-conventions/references/artifact-storage-paths.md`。STRATEGY.md → `<repo-root>/STRATEGY.md`(与 `.git/`、`AGENTS.md` 同级)。**禁止**放入 `{HARNESS_DIR}`、`docs/` 或任何子目录。
|
|
21
|
+
|
|
22
|
+
## When to use
|
|
23
|
+
|
|
24
|
+
| Trigger | Example |
|
|
25
|
+
|---------|---------|
|
|
26
|
+
| Project initialization | "Create STRATEGY.md for this new project" |
|
|
27
|
+
| Directional change | "We're pivoting from monolith to microservices" |
|
|
28
|
+
| PM requests alignment | "Check if this plan aligns with our strategy" |
|
|
29
|
+
| Periodic review | "Review and update STRATEGY.md" |
|
|
30
|
+
|
|
31
|
+
## STRATEGY.md structure
|
|
32
|
+
|
|
33
|
+
A good strategy document is opinionated and concise. It should fit in one screen of reading.
|
|
34
|
+
|
|
35
|
+
### Required sections
|
|
36
|
+
|
|
37
|
+
```markdown
|
|
38
|
+
# Strategy
|
|
39
|
+
|
|
40
|
+
## Vision
|
|
41
|
+
<1-2 sentences: what the project aims to become>
|
|
42
|
+
|
|
43
|
+
## What we build
|
|
44
|
+
<Core product/users/use cases>
|
|
45
|
+
|
|
46
|
+
## What we don't build
|
|
47
|
+
<Explicit non-goals — as important as goals>
|
|
48
|
+
|
|
49
|
+
## Guiding Principles
|
|
50
|
+
- <Principle 1>
|
|
51
|
+
- <Principle 2>
|
|
52
|
+
- <Principle 3>
|
|
53
|
+
|
|
54
|
+
## Technology Direction
|
|
55
|
+
<Key tech choices and rationale>
|
|
56
|
+
|
|
57
|
+
## Decision Log
|
|
58
|
+
<Major past decisions with context — why, not just what>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Optional sections
|
|
62
|
+
|
|
63
|
+
- **Current Focus** — what the team is working on now
|
|
64
|
+
- **Risks & Mitigations** — known strategic risks
|
|
65
|
+
- **Competitive Context** — what alternatives exist and how we differ
|
|
66
|
+
|
|
67
|
+
## Creating STRATEGY.md
|
|
68
|
+
|
|
69
|
+
### Phase 1: Gather context
|
|
70
|
+
|
|
71
|
+
1. Read existing project documentation (README, AGENTS.md, existing specs).
|
|
72
|
+
2. If `{KNOWLEDGE_DIR}` or `{ITERATION_DIR}` exist, scan for architectural decisions and patterns.
|
|
73
|
+
3. If `CONCEPTS.md` exists, use it to understand domain vocabulary.
|
|
74
|
+
|
|
75
|
+
### Phase 2: Interview
|
|
76
|
+
|
|
77
|
+
Ask PM these questions (one at a time):
|
|
78
|
+
|
|
79
|
+
1. "What is the one-sentence vision for this project?"
|
|
80
|
+
2. "Who are the primary users and what do they need most?"
|
|
81
|
+
3. "What are you explicitly NOT building? What's out of scope permanently?"
|
|
82
|
+
4. "What 2-3 principles should guide every technical decision?"
|
|
83
|
+
5. "What technology bets have you made, and why?"
|
|
84
|
+
|
|
85
|
+
### Phase 3: Draft
|
|
86
|
+
|
|
87
|
+
Write STRATEGY.md at the repo root. Keep it concise — each section should be 1-3 sentences or a short bullet list.
|
|
88
|
+
|
|
89
|
+
### Phase 4: Discoverability
|
|
90
|
+
|
|
91
|
+
Check if AGENTS.md references STRATEGY.md. If not, propose adding:
|
|
92
|
+
|
|
93
|
+
```markdown
|
|
94
|
+
- `STRATEGY.md` — project vision and guiding principles
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
Ask for consent before applying.
|
|
98
|
+
|
|
99
|
+
## Maintaining STRATEGY.md
|
|
100
|
+
|
|
101
|
+
### Review triggers
|
|
102
|
+
|
|
103
|
+
- After a major architectural decision
|
|
104
|
+
- When a plan introduces a new technology stack
|
|
105
|
+
- Quarterly review (scheduled by PM)
|
|
106
|
+
|
|
107
|
+
### Update rules
|
|
108
|
+
|
|
109
|
+
1. **Be decisive about direction changes.** Don't keep old strategy alongside new — replace it.
|
|
110
|
+
2. **Log decisions with context.** The Decision Log captures *why* a choice was made, not just what.
|
|
111
|
+
3. **Keep it current.** Stale strategy is worse than no strategy — it misdirects plans.
|
|
112
|
+
|
|
113
|
+
## STRATEGY.md vs other docs
|
|
114
|
+
|
|
115
|
+
| Document | Purpose | Audience |
|
|
116
|
+
|----------|---------|----------|
|
|
117
|
+
| `STRATEGY.md` | Product/technical direction, principles, decisions | PM, architect, all implementers |
|
|
118
|
+
| `AGENTS.md` | Repo maintenance policy, conventions | Contributors and agents |
|
|
119
|
+
| `CONCEPTS.md` | Domain vocabulary | Anyone reading/writing project docs |
|
|
120
|
+
| Plans in `{PLAN_DIR}/` | Feature-level implementation plan | Implementers, reviewers |
|
|
121
|
+
|
|
122
|
+
## NOT to do
|
|
123
|
+
|
|
124
|
+
- Do not write STRATEGY.md as a novel — it should be scannable
|
|
125
|
+
- Do not include implementation details or file paths
|
|
126
|
+
- Do not create without PM/architect input (ask the questions)
|
|
127
|
+
- Do not keep outdated strategy as "historical reference" — git preserves it
|
|
128
|
+
- Do not conflate strategy (direction) with conventions (how-to)
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pm
|
|
3
|
-
description: "Morning Star PM orchestration entry
|
|
3
|
+
description: "Morning Star PM orchestration entry. On Cursor/Codex, /pm launches project-manager. On OpenCode, switch to project-manager when the active agent is not PM. The autonomous Execute flow (per-plan dispatch, iteration management, compound) lives in mstar-iteration — this skill covers PM role identity, host entry, dispatch-first rules, and host-specific concerns."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# PM — Morning Star orchestration entry
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
**PM role launcher and host adapter.** Iteration flow (start → Execute → close) → **`mstar-iteration`** (canonical SSOT). This skill handles: PM role identity per host, boot order, dispatch-first rules, Cursor Plan mode.
|
|
9
9
|
|
|
10
10
|
## Host entry (read `mstar-host` first)
|
|
11
11
|
|
|
12
12
|
| Host | Entry | PM role |
|
|
13
13
|
| --- | --- | --- |
|
|
14
|
-
| **Cursor / Codex** | User invokes **`/pm`** (or explicit
|
|
14
|
+
| **Cursor / Codex** | User invokes **`/pm`** (or explicit "run as PM") | Force **`project-manager`** for the session |
|
|
15
15
|
| **OpenCode** | User may already be on a configured agent | **If active role ≠ `project-manager`**: operate **only** as PM — load `mstar-roles` → `references/project-manager.md`; do **not** stay in dev/QC/architect voice for orchestration. Named invokes still use `@<agent-id>` per Assignment |
|
|
16
16
|
|
|
17
17
|
Detect host → Read `mstar-host` → `references/cursor.md` | `opencode.md` | `codex.md`.
|
|
@@ -20,77 +20,20 @@ Detect host → Read `mstar-host` → `references/cursor.md` | `opencode.md` | `
|
|
|
20
20
|
|
|
21
21
|
1. `mstar-harness-core`
|
|
22
22
|
2. `mstar-roles` → `references/project-manager.md`
|
|
23
|
-
3. Before first **implement**
|
|
23
|
+
3. Before first **implement** dispatch: `mstar-dispatch-gates` + host reference
|
|
24
24
|
4. Before **QC**: `mstar-review-qc`
|
|
25
|
-
5. **
|
|
25
|
+
5. **Iteration flow** (start / Execute / close): **`mstar-iteration`** — canonical SSOT for per-plan dispatch loop, integration branch, compound round. Do **not** re-describe the flow in this skill.
|
|
26
|
+
6. **On demand:** `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-plan-artifacts`, `mstar-branch-worktree`, `mstar-superpowers-align`
|
|
26
27
|
|
|
27
|
-
Prepare/Execute gates, routing, Assignment templates, Task Board, QC tri-review, residuals → topic skills + PM references (not repeated here).
|
|
28
|
-
|
|
29
|
-
## When to activate autonomous Execute
|
|
30
|
-
|
|
31
|
-
Run **§ Autonomous Execute driver** when **all** are true:
|
|
32
|
-
|
|
33
|
-
1. Harness has **`{HARNESS_DIR}/status.json`** (default `.mstar/status.json`) with at least one plan **not** `Done`
|
|
34
|
-
2. **Pre-implement gate = GO** (`plan` locked, tasks ready — see `mstar-phase-gates` / PM Pre-Implement Gate Check)
|
|
35
|
-
3. User intent is **continue Execute** (`/pm`, “推进 iteration”, “继续 plans”, or equivalent)
|
|
36
|
-
|
|
37
|
-
If Prepare is incomplete → follow phase gates first; do **not** skip to implement dispatch.
|
|
38
|
-
|
|
39
|
-
## Autonomous Execute driver
|
|
40
|
-
|
|
41
|
-
**Goal:** finish the **active iteration** (all non-`Done` rows in `status.json.plans[]`) via dispatch loops — may span **multiple** `plan_id`s; do **not** stop after one plan while siblings remain open.
|
|
42
|
-
|
|
43
|
-
### 0. Session todos (before any dispatch)
|
|
44
|
-
|
|
45
|
-
Host UI todos are **session guardrails**, not SSOT. Set them **before** each plan wave so scope does not drift:
|
|
46
|
-
|
|
47
|
-
| Host | Tool | Minimum set |
|
|
48
|
-
| --- | --- | --- |
|
|
49
|
-
| **Cursor** | `TodoWrite` or CreatePlan todos | Current `plan_id`; next batch (implement / QC / QA); branch checkpoint |
|
|
50
|
-
| **Codex** | `update_plan` / Goal or Plan UI todos | Same intent — mirror active `plan_id` + next gate |
|
|
51
|
-
| **OpenCode** | Host todo/plan UI if present | Same intent |
|
|
52
|
-
|
|
53
|
-
SSOT remains `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/` — todos track **this session’s next moves**, not replace status.
|
|
54
|
-
|
|
55
|
-
### 1. Read backlog
|
|
56
|
-
|
|
57
|
-
1. Read **`mstar-plan-artifacts`** + **`{HARNESS_DIR}/status.json`**
|
|
58
|
-
2. List plans where `status` ∈ `{Todo, InProgress, InReview, Blocked}` (priority: `InProgress` → `InReview` → `Todo` → unblock `Blocked` if PM can)
|
|
59
|
-
3. Read **`metadata.spec_integration_branch`** / **`merge_target`** and **`primary_spec`** links (`mstar-plan-conventions`)
|
|
60
|
-
|
|
61
|
-
### 2. Iteration integration branch (Git cwd)
|
|
62
|
-
|
|
63
|
-
1. Resolve **Spec / iteration integration branch** from `status.json` (`spec_integration_branch` on plan metadata or iteration-level registration — see `mstar-plan-artifacts/references/status-and-residuals.md`)
|
|
64
|
-
2. **Checkout or create** that branch on the **business repo** cwd PM will orchestrate from; confirm with `git branch --show-current`
|
|
65
|
-
3. If missing from metadata → **stop**, Read `mstar-plan-conventions` + confirm with user per `mstar-branch-worktree` (PM branch confirmation template); record in plan + status **same round**
|
|
66
|
-
|
|
67
|
-
This branch is the **merge target** for each plan’s work until **all** plans under the iteration are `Done`.
|
|
68
|
-
|
|
69
|
-
### 3. Per-plan loop (until all `Done`)
|
|
70
|
-
|
|
71
|
-
For each active `plan_id`:
|
|
72
|
-
|
|
73
|
-
1. **Plan start — feature branch:** Assignment uses **`Working branch: create <plan-feature-branch> from <spec_integration_branch>`** (or PM-approved equivalent). One **dedicated plan implementation branch** per `plan_id`; parallel tracks inside a plan → topic branches from integration + worktrees (`mstar-branch-worktree`).
|
|
74
|
-
2. **Implement → InReview:** dispatch-only loops (`§ Dispatch-first`); update `status.json` + main plan after each Completion Report v2
|
|
75
|
-
3. **QC → QA → Done:** tri-review + QA per `mstar-review-qc`; PM marks `Done` only when gates pass
|
|
76
|
-
4. **Plan complete — merge back:** merge **plan feature branch** (and any integrated topic heads) **into `spec_integration_branch`**; resolve conflicts **before** next plan or QC on shared scope
|
|
77
|
-
5. **Next plan** from step 1 on updated integration branch
|
|
78
|
-
|
|
79
|
-
When **every** plan in the iteration is `Done` → optional PR from `spec_integration_branch` to `main` per `mstar-plan-conventions` (unless Assignment `Branch policy` says otherwise).
|
|
80
|
-
|
|
81
|
-
### 4. Push discipline
|
|
82
|
-
|
|
83
|
-
- **No** routine “should I continue?” on harness basics — decide, record in Assignment if needed, **dispatch**
|
|
84
|
-
- Unknowns → **Read** `mstar-*`; **`Blocked`** or user only for stop, secrets, irreversible scope gaps, or post-read rule conflict
|
|
85
|
-
- Actual Git ≠ plan/`status.json` `working_branch` → **same round** update plan + status **or** worktree dispatches before next implement
|
|
28
|
+
Prepare/Execute gates, routing, Assignment templates, Task Board, QC tri-review, residuals, compound → topic skills + PM references (not repeated here).
|
|
86
29
|
|
|
87
30
|
## Dispatch-first (`implement`)
|
|
88
31
|
|
|
89
32
|
| Do | Don't |
|
|
90
33
|
| --- | --- |
|
|
91
|
-
| **Loop:** `## Assignment` → invoke → Completion Report v2 → report-to-status → next batch | Parent **Write/Edit/Shell** on product code to
|
|
34
|
+
| **Loop:** `## Assignment` → invoke → Completion Report v2 → report-to-status → next batch | Parent **Write/Edit/Shell** on product code to "move faster" |
|
|
92
35
|
| **1 Assignment ⇒ 1 invoke** when host supports Task/@agent (`mstar-dispatch-gates`) | Assignment markdown only, no matching invoke |
|
|
93
|
-
| Put merge/branch/handoff from **this thread** into Assignment | Skip subagent because context is
|
|
36
|
+
| Put merge/branch/handoff from **this thread** into Assignment | Skip subagent because context is "already here" |
|
|
94
37
|
|
|
95
38
|
- **NEVER** implement while staying PM — QC 3× comes later; **implement still delegates** dev roles.
|
|
96
39
|
- **Delegate scope / PM whitelist:** `mstar-roles` → PM Execution Boundary.
|
|
@@ -108,4 +51,4 @@ CreatePlan / SwitchMode: Read **`mstar-host/references/cursor-plan-mode-bridge.m
|
|
|
108
51
|
3. `mstar-harness-core` + runtime `mstar-*`
|
|
109
52
|
4. This skill
|
|
110
53
|
|
|
111
|
-
**Dispatch-first + `mstar-dispatch-gates`** win over
|
|
54
|
+
**Dispatch-first + `mstar-dispatch-gates`** win over "fast parent agent" unless user overrides.
|