@mstar-harness/opencode 1.7.1 → 1.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/harness-commands/codebase-audit.md +34 -0
- package/harness-commands/iteration-drive.md +17 -159
- package/harness-commands/iteration-loop.md +16 -194
- package/harness-commands/iteration-start.md +17 -183
- package/harness-skills/mstar-audit/SKILL.md +181 -0
- package/harness-skills/mstar-audit/references/audit-playbook.md +130 -0
- package/harness-skills/mstar-audit/references/finding-format.md +65 -0
- package/harness-skills/mstar-branch-worktree/SKILL.md +38 -27
- package/harness-skills/mstar-coding-behavior/SKILL.md +40 -114
- package/harness-skills/mstar-compound/SKILL.md +25 -197
- package/harness-skills/mstar-compound/references/compound-workflow.md +155 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +3 -8
- package/harness-skills/mstar-harness-core/SKILL.md +3 -1
- package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +44 -0
- package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
- package/harness-skills/mstar-host/references/codex-plan-goal-mode-bridge.md +6 -11
- package/harness-skills/mstar-host/references/codex.md +1 -1
- package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +9 -78
- package/harness-skills/mstar-host/references/cursor.md +3 -3
- package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +5 -24
- package/harness-skills/mstar-host/references/kimi.md +5 -32
- package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +3 -13
- package/harness-skills/mstar-host/references/omp.md +5 -32
- package/harness-skills/mstar-host/references/opencode.md +1 -3
- package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +5 -24
- package/harness-skills/mstar-host/references/zcode.md +5 -32
- package/harness-skills/mstar-iteration/SKILL.md +21 -211
- package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +95 -0
- package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +81 -0
- package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
- package/harness-skills/mstar-phase-gates/SKILL.md +2 -2
- package/harness-skills/mstar-plan-artifacts/references/plan-quality-bar.md +99 -0
- package/harness-skills/mstar-roles/SKILL.md +1 -1
- package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +46 -0
- package/harness-skills/mstar-roles/references/architect.md +3 -23
- package/harness-skills/mstar-roles/references/frontend-dev.md +4 -24
- package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +4 -24
- package/harness-skills/mstar-roles/references/ops-engineer.md +3 -23
- package/harness-skills/mstar-roles/references/product-manager.md +3 -23
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +5 -5
- package/harness-skills/mstar-roles/references/project-manager.md +4 -13
- package/harness-skills/mstar-roles/references/prompt-engineer.md +4 -23
- package/harness-skills/mstar-roles/references/qa-engineer.md +3 -22
- package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +16 -75
- package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +1 -1
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +4 -17
- package/harness-skills/mstar-roles/references/writing-specialist.md +4 -24
- package/harness-skills/mstar-sdd/SKILL.md +1 -0
- package/harness-skills/pm/SKILL.md +2 -0
- package/package.json +1 -1
|
@@ -295,7 +295,7 @@ SSOT = `{HARNESS_DIR}/status.json` + `{PLAN_DIR}/`。todos 只追踪本轮下一
|
|
|
295
295
|
5. Dispatch **one** task reviewer subagent(brief + report + diff + Global Constraints)
|
|
296
296
|
6. Fix loop 直至 review clean;append `{SDD_DIR}/progress.md`;更新 `status.json` / plan checkbox
|
|
297
297
|
7. Next task
|
|
298
|
-
- 每次 Completion Report
|
|
298
|
+
- 每次 Completion Report 后更新 `status.json` + 主 plan
|
|
299
299
|
4. **QC → QA gate**(plan 保持 **`InReview`**;**保留** `execution_lease`):per-plan 审查链 → **`mstar-sdd`**(L1–L2)+ **`mstar-review-qc/references/review-responsibility-boundaries.md`**(L3 tri / inline 单席;raw reports in `{SDD_DIR}/review/`,durable summary in main plan/status)+ **`QA gate`**(`mandatory` → `qa-engineer`;`pm-acceptance` → PM checklist)。**禁止**在 integration merge 成功前设 `Done` 或删除 `execution_lease`。
|
|
300
300
|
5. **Plan complete — serial merge back**(§2.0 #5 未 waive):自 **control worktree** claim/resume `metadata.integration_merge_lease` → 将 plan feature branch 合并入 `spec_integration_branch`(仅 merge-lease holder;细则 → **`references/phase-2-worktree-lease.md`**)→ 记录 merge commit 证据 → 释放 merge lease;**同轮**设 `Done` 并删除 `execution_lease`。merge 失败:保持 `InReview` + 保留 lease,不得标 `Done`。
|
|
301
301
|
6. **Cross-plan 进度同步**:更新 `{ITERATION_DIR}/<iteration-id>/delivery-compass.md` 的 `## Plans` 表状态列
|
|
@@ -341,181 +341,21 @@ Iteration Phase 2 附加:
|
|
|
341
341
|
- plan 内 SDD task **串行** — 见 §2.4、§2.5、`mstar-sdd` Continuous execution
|
|
342
342
|
- **zero-residual(默认)**:单 plan QC findings 尽量在当轮清干净;仅真 blocker 才 defer 到后续迭代(须 Durable Roadmap)— 见 **`mstar-plan-artifacts`** Findings cleanup modes
|
|
343
343
|
|
|
344
|
-
---
|
|
345
|
-
|
|
346
344
|
## Phase 3: iteration-close(收口迭代)
|
|
347
345
|
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
**Close Done 定义**:§3.1→§3.5 全部完成;compass frontmatter 写入 `status: completed` + `end_date`;每篇新增 knowledge doc 已登记 `{KNOWLEDGE_DIR}/README.md`。只在 final plan 中写了 compound / roadmap / PR 说明,不算 iteration-close 完成。
|
|
351
|
-
|
|
352
|
-
### 3.0 Phase boundary(HARD)
|
|
353
|
-
|
|
354
|
-
- Phase 3 是 iteration 级收口,不是任一 plan 的子任务。
|
|
355
|
-
- final plan closure、plan notes、plan compaction 可作为输入,但不能替代 §3.1→§3.5。
|
|
356
|
-
- 读过 `mstar-iteration` / `mstar-compound` 不等于执行 gate;必须打印 checklist 并写入产物。
|
|
357
|
-
|
|
358
|
-
### 3.0.5 Compass shape normalization(legacy 漂移修复)
|
|
359
|
-
|
|
360
|
-
进入 §3.1 前,先确认 compass 具有 close 可写入的结构。若缺失,PM 在本 thread 做最小规范化,不委派、不重写无关内容。
|
|
361
|
-
|
|
362
|
-
| 检查 | 缺则补齐 |
|
|
363
|
-
|------|----------|
|
|
364
|
-
| YAML frontmatter:`iteration_id`, `start_date`, `status` | 从文件名 / 正文提取;收口前 `status` 保持 `active` 或 `locked` |
|
|
365
|
-
| `## Roadmap Position` | 从 general context / roadmap prose 迁移为本节 |
|
|
366
|
-
| `## Quality Gate Summary` | 按模板补占位,§3.4 填写 |
|
|
367
|
-
| `## Compound Round Summary` | 按模板补占位,§3.4 填写 |
|
|
368
|
-
| `## Iteration Retrospective (minimal)` | 按模板补占位,§3.4 填写 |
|
|
369
|
-
|
|
370
|
-
正文 completion status 只能作为历史注释;最终状态必须写入 frontmatter `status: completed` + `end_date`。
|
|
371
|
-
|
|
372
|
-
### 3.1 Close entry checklist(HARD GATE)
|
|
373
|
-
|
|
374
|
-
**STOP**: 打印下方 checklist,且全部为 `[x]` 后,才可进入 §3.2 Compound。
|
|
375
|
-
|
|
376
|
-
- [ ] 所有 compass 中登记的 plan 在 `{HARNESS_DIR}/status.json` 均为 `Done`
|
|
377
|
-
- [ ] 所有 plan 的 residual findings 已收口:优先 empty open 列表;若仍有 open R#,须均为 Phase 2 `zero-residual` 允许的 blocker-defer + roadmap,或已 closed/accepted/waived 归档(见 `mstar-plan-artifacts` Findings cleanup modes)
|
|
378
|
-
- [ ] compass `## Plans` 表状态列已与 `status.json` 同步
|
|
379
|
-
- [ ] 迭代 `## Acceptance Criteria` 已达成或显式豁免(compass 或对话记录原因)
|
|
380
|
-
- [ ] compass shape 已满足(frontmatter + `## Roadmap Position` + close 占位节)
|
|
381
|
-
|
|
382
|
-
PM **必须**在对话中打印本 checklist;不得默认同过。
|
|
383
|
-
|
|
384
|
-
### 3.2 知识结晶(Compound)—— 迭代级核心收口
|
|
385
|
-
|
|
386
|
-
**Compound 在此执行,不在 per-plan Done 后独立执行。** 工作流 SSOT → **`mstar-compound`**(Q1–Q8 自检、Phase 1–7、Phase 6 索引登记强制)。
|
|
387
|
-
|
|
388
|
-
PM 批量触发后须:
|
|
389
|
-
|
|
390
|
-
1. 收集本迭代 plan 实现 / debug / review 素材,筛候选知识
|
|
391
|
-
2. **盘点** `{ITERATION_DIR}/<iteration-id>/**` package(`guides/`、`specs/`;默认排除 `delivery-compass.md`)— **`mstar-compound`**「Iteration package promotion」;提升值得保留者进 `{KNOWLEDGE_DIR}/`
|
|
392
|
-
3. 逐条过 `mstar-compound` 自检;跳过项记入 compass `## Compound Round Summary`
|
|
393
|
-
4. 写入或更新 `{KNOWLEDGE_DIR}/<category>/<slug>.md`;新领域词更新 `CONCEPTS.md`
|
|
394
|
-
5. **每篇**新 doc 完成 Phase 6(`{KNOWLEDGE_DIR}/README.md` 登记)
|
|
395
|
-
|
|
396
|
-
若无结晶且无 package 提升,仍在 `## Compound Round Summary` 写明 `无可结晶知识` / package 盘点结论及原因。
|
|
397
|
-
|
|
398
|
-
### 3.3 更新 roadmap
|
|
399
|
-
|
|
400
|
-
1. 更新 compass **`## Roadmap Position`**(§3.0.5 已确保本节存在):
|
|
401
|
-
- current iteration 行标记为 **`delivered`**(或等价明确措辞)
|
|
402
|
-
- next iteration 更新为即将开始的内容、触发条件、owner
|
|
403
|
-
2. 若 `status.json` 中有 `plans[].metadata.roadmap` 字段,同步更新
|
|
404
|
-
3. 若存在 deferred-features / roadmap tracker 类文档,按项目惯例刷新
|
|
405
|
-
4. 若 `STRATEGY.md` 存在,可更新 `## Decision Log`(重大架构决策时)
|
|
406
|
-
|
|
407
|
-
### 3.4 标记迭代完成
|
|
408
|
-
|
|
409
|
-
1. compass **YAML frontmatter**:`status: completed`,`end_date: YYYY-MM-DD`(必须;见 §3.0.5)
|
|
410
|
-
2. 更新 `{ITERATION_DIR}/README.md` 索引中该迭代行 Status 为 `completed`
|
|
411
|
-
3. 填充 compass `## Quality Gate Summary`、`## Compound Round Summary` 与 `## Iteration Retrospective (minimal)`(见模板)
|
|
412
|
-
|
|
413
|
-
### 3.5 Close exit checklist + commit
|
|
414
|
-
|
|
415
|
-
**Precondition**: §3.1 checklist `[x]`;§3.4 frontmatter `completed` + `end_date` 已写。
|
|
416
|
-
|
|
417
|
-
PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git commit`;然后进入 **Phase 4**(§4):
|
|
418
|
-
|
|
419
|
-
- [ ] §3.1 前置 gate 已打印并满足
|
|
420
|
-
- [ ] §3.2 compound 完成;**`<iteration-id>/` package 已盘点**(提升 / 保留 / 跳过已记入 Compound Summary);新增 knowledge doc 均已登记 `{KNOWLEDGE_DIR}/README.md`(或已记录无可结晶原因)
|
|
421
|
-
- [ ] §3.3 `## Roadmap Position` current iteration 已标 `delivered`;tracker / STRATEGY 已按需更新
|
|
422
|
-
- [ ] §3.4 frontmatter `status: completed` + `end_date`;Quality Gate Summary + Compound Summary + Retrospective 已填
|
|
423
|
-
- [ ] 当前分支是 `spec_integration_branch`
|
|
424
|
-
- [ ] PR base = `metadata.target_branch`(与 compass frontmatter 一致);**不是**未记录的 `main`
|
|
425
|
-
|
|
426
|
-
**Commit 到 integration 分支**:
|
|
427
|
-
|
|
428
|
-
```bash
|
|
429
|
-
git add {ITERATION_DIR}/<id>/ {ITERATION_DIR}/README.md {KNOWLEDGE_DIR}/ CONCEPTS.md
|
|
430
|
-
git commit -m "chore(iteration): close <iteration-id> — compound round, roadmap update"
|
|
431
|
-
git push origin <spec_integration_branch>
|
|
432
|
-
```
|
|
433
|
-
|
|
434
|
-
PR 目标使用 root `metadata.target_branch`;缺失时停止并补齐,不得默认 `main`。
|
|
346
|
+
**入口**:Phase 2 全部 plan `Done` 后按 **Phase transition gates** 进入。本 Phase 在 **integration 分支**上运行;产出物 commit 到该分支,随迭代 PR 合入 `metadata.target_branch`。
|
|
435
347
|
|
|
436
|
-
|
|
348
|
+
完整流程(§3.0 phase boundary、§3.0.5 compass 规范化、§3.1 entry checklist **HARD GATE**、§3.2 compound、§3.3 roadmap、§3.4 标记完成、§3.5 exit checklist + commit、§3.6 可选 compound-refresh)→ **`references/phase-3-iteration-close.md`**。
|
|
437
349
|
|
|
438
|
-
|
|
350
|
+
**Close Done 定义**:§3.1→§3.5 全部完成;compass frontmatter 写入 `status: completed` + `end_date`;每篇新增 knowledge doc 已登记 `{KNOWLEDGE_DIR}/README.md`。只在 final plan 中写了 compound / roadmap / PR 说明,不算 iteration-close 完成。
|
|
439
351
|
|
|
440
352
|
---
|
|
441
353
|
|
|
442
|
-
## Phase 4: PR delivery
|
|
354
|
+
## Phase 4 & 5: PR delivery + merge-ready loop
|
|
443
355
|
|
|
444
|
-
**
|
|
356
|
+
**Phase 4**(开 PR)与 **Phase 5**(merge-ready loop)完整流程(§4、§5.0、§5.1a push cadence、§5.1 loop、§5.2 exit checklist)→ **`references/phase-4-5-pr-delivery.md`**。
|
|
445
357
|
|
|
446
|
-
|
|
447
|
-
2. Resolve target:`metadata.target_branch`(compass frontmatter 镜像);缺失 → **STOP**,问用户
|
|
448
|
-
3. 创建 PR:`spec_integration_branch` → `target_branch`
|
|
449
|
-
4. 记录 PR URL / number(Phase 5 会话 SSOT)
|
|
450
|
-
5. **Immediately** 进入 **Phase 5** — **Phase 4 exit ≠ 迭代交付完成**
|
|
451
|
-
|
|
452
|
-
---
|
|
453
|
-
|
|
454
|
-
## Phase 5: PR merge-ready loop
|
|
455
|
-
|
|
456
|
-
**Precondition**: Phase 4 PR 已创建且 head = `spec_integration_branch`。
|
|
457
|
-
|
|
458
|
-
**Loop 理念**(mstar SSOT):PR 开完后进入 **验证—修复—再验证** 循环,直至 PR 可合并。与 Phase 2 per-plan loop 类似,但对象是 **PR 级** merge 门禁(CI、review、冲突),不是 plan 实现。
|
|
459
|
-
|
|
460
|
-
### 5.0 Phase boundary
|
|
461
|
-
|
|
462
|
-
- Phase 5 在 PR head(`spec_integration_branch`)上 push 修复;**禁止**另开替代分支
|
|
463
|
-
- 产品代码修复 → PM **dispatch** dev/ops(`mstar-dispatch-gates`);PM 线程不代写实现
|
|
464
|
-
- 禁止为「让 CI 变绿」而改 workflow,除非用户明确授权
|
|
465
|
-
- **Push cadence** → **§5.1a**(本地可提前修;**禁止**在 CI / AI review 波次未结束时 push)
|
|
466
|
-
|
|
467
|
-
### 5.1a Push cadence(HARD — 防打断 CI / AI review)
|
|
468
|
-
|
|
469
|
-
发现 CI 失败或 review 问题时,**允许本地提前修**(含 dispatch implement/ops、落盘 commit),但 **`git push`(更新 PR head)必须等上一波次跑完**。
|
|
470
|
-
|
|
471
|
-
| 允许 | 禁止 |
|
|
472
|
-
|------|------|
|
|
473
|
-
| CI/review **进行中**就开始本地诊断与修复 | 当前 head 上仍有 **CI queued/in_progress**,或 **AI review 波次**(Bugbot / Greptile / 等价 bot)未结束时 **push** |
|
|
474
|
-
| CI **全部结束后**出现新的 review 评论 → 继续本地修,批完再 push | 为「抢时间」在 CI 仍在跑时 push(会取消/孤儿化进行中的 CI 与 **AI reviews**,浪费 token 且无完整结果) |
|
|
475
|
-
| 一批本地修复 **合并为一次 push**(本 head 波次 settled 后) | 同一波次未 settled 就连续多次 push |
|
|
476
|
-
|
|
477
|
-
**Push gate(每次 push 前必须核对)**:
|
|
478
|
-
|
|
479
|
-
1. 当前 PR head 的 **required CI**(及已启动的检查)均已 **completed**(success / failure / cancelled — 不得仍为 queued / in_progress)
|
|
480
|
-
2. 附着在该 head 的 **AI / bot review 波次**已跑完(无进行中的 review job;若宿主无法探测 job,则至少等 CI settled **且** review 评论不再增长一小段稳定窗口后再 push)
|
|
481
|
-
3. 仅当 **1–2 满足** 且本地仍有未推送修复时,才 **push 一次**
|
|
482
|
-
4. Push 后:等 **新 head** 的 CI + reviews 全部跑完 → 再决定下一轮本地修 / push
|
|
483
|
-
|
|
484
|
-
**顺序记忆**:`observe findings → fix locally early → wait until CI + review wave idle → push batch → wait new wave → repeat`。
|
|
485
|
-
|
|
486
|
-
### 5.1 Loop(repeat until §5.5 exit)
|
|
487
|
-
|
|
488
|
-
1. **Status** — PR mergeable?required CI?unresolved review threads?**任一 CI/AI review 是否仍在跑?**
|
|
489
|
-
2. **Merge conflicts** — blocking 则在 integration 分支**本地**解决;**仅当 §5.1a push gate 满足时**再 push(意图冲突 → **Blocked**)
|
|
490
|
-
3. **Reviews** — fetch unresolved threads;triage;dispatch **本地**修复(可在上一波次仍在跑时开工)
|
|
491
|
-
4. **CI** — 失败项在 PR 范围内**本地**修复(可提前开工);**不**在 CI 仍在跑时 push
|
|
492
|
-
5. **Push** — 仅当 §5.1a 满足:无 in-flight CI,上一波 CI **与** reviews 均已跑完 → **一次** push 本批修复
|
|
493
|
-
6. **Review fix hygiene**(每次因 review 而 push 后):
|
|
494
|
-
- 在同 thread **comment**(改动 + 验证)
|
|
495
|
-
- **Resolve** when addressed
|
|
496
|
-
7. Return to step 1(CI 结束后若出现 **新** reviews → 继续本地修,再等 idle 后 push)
|
|
497
|
-
|
|
498
|
-
**Optional host helpers(command 层发现;非 `mstar-*` load order)**:
|
|
499
|
-
|
|
500
|
-
| Priority | Helper | When |
|
|
501
|
-
|----------|--------|------|
|
|
502
|
-
| 1 | `babysit` or any `*-babysit` skill(first readable `SKILL.md`) | **Default prefer** — CI green + reviews resolved loop |
|
|
503
|
-
| 2 | `greploop` | **Optional** — only when the **repo** uses Greptile / has `greploop` available; then run for Greptile **5/5** in addition to babysit/`*-babysit` (or fallback) gates |
|
|
504
|
-
| 3 | neither | Command fallback = babysit-equivalent CI + reviews gates |
|
|
505
|
-
|
|
506
|
-
When both babysit/`*-babysit` and `greploop` apply: **babysit/`*-babysit` first**(CI + reviews),then optional greploop for Greptile score. Discovery paths → host `commands/iteration-drive` / `iteration-loop` Phase 5.
|
|
507
|
-
|
|
508
|
-
### 5.2 Phase 5 exit checklist(迭代交付完成)
|
|
509
|
-
|
|
510
|
-
打印 **`## Phase 5 exit checklist`**;全 `[x]` 后方可宣称 **迭代交付完成**:
|
|
511
|
-
|
|
512
|
-
- [ ] PR mergeable(无 blocking merge conflicts)
|
|
513
|
-
- [ ] All **required** CI checks green on latest head
|
|
514
|
-
- [ ] All review threads **resolved**(或用户书面 waive 特定 thread)
|
|
515
|
-
- [ ] §5.1 review comment + resolve 已覆盖本轮所有 addressed feedback
|
|
516
|
-
- [ ] Host todo `phase-5-pr-merge-ready` 可勾选
|
|
517
|
-
|
|
518
|
-
PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权 auto-merge。
|
|
358
|
+
**关键定位(hard)**:Phase 4 开 PR **≠** 迭代交付完成;必须完成 Phase 5 §5.2 merge-ready exit。**Push cadence(§5.1a HARD)**:本地可提前修,**禁止**在 CI / AI review 波次未结束时 `git push`。
|
|
519
359
|
|
|
520
360
|
---
|
|
521
361
|
|
|
@@ -525,50 +365,20 @@ PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权
|
|
|
525
365
|
|
|
526
366
|
## 与其它技能的关系
|
|
527
367
|
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
| `mstar-review-qc` | SDD 强制 plan QC tri — per-plan loop |
|
|
536
|
-
| `mstar-branch-worktree` | 分支/merge/worktree 隔离 |
|
|
537
|
-
| `mstar-compound` | iteration-close 中触发知识结晶(**唯一**默认 knowledge 新增路径) |
|
|
538
|
-
| `mstar-compound-refresh` | iteration-close 后可触发知识维护 |
|
|
539
|
-
| `references/iteration-artifact-boundaries.md` | Phase 1 specs / iteration package / knowledge 分工 |
|
|
540
|
-
| `references/iteration-workspace-readme-template.md` | `<iteration-id>/README.md` 可选模板(Documents 单表) |
|
|
541
|
-
| `references/iteration-corpus-hygiene.md` | §1.6 writing-specialist specs 卫生细则 |
|
|
542
|
-
| `references/autonomous-direction-lock.md` | §1.2 autonomous direction lock、scale budget、branch resolve |
|
|
543
|
-
| `references/phase-2-worktree-lease.md` | Phase 2 control worktree、`execution_lease`、`integration_merge_lease` |
|
|
544
|
-
| `mstar-strategy` | iteration-start 时读 `STRATEGY.md` 对齐方向 |
|
|
368
|
+
完整 topic-skill 索引见 **`mstar-harness-core`**。本 skill 迭代级关键引用:
|
|
369
|
+
|
|
370
|
+
- **`mstar-compound`** — iteration-close 中触发知识结晶(**唯一**默认 knowledge 新增路径)
|
|
371
|
+
- **`references/phase-2-worktree-lease.md`** — Phase 2 control worktree、`execution_lease`、`integration_merge_lease`
|
|
372
|
+
- **`references/autonomous-direction-lock.md`** — §1.2 autonomous direction lock、scale budget、branch resolve
|
|
373
|
+
- **`references/iteration-artifact-boundaries.md`** — Phase 1 specs / iteration package / knowledge 分工
|
|
374
|
+
- **`references/iteration-corpus-hygiene.md`** — §1.6 writing-specialist specs 卫生细则
|
|
545
375
|
|
|
546
376
|
## NOT to do
|
|
547
377
|
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
-
|
|
551
|
-
-
|
|
552
|
-
-
|
|
553
|
-
-
|
|
554
|
-
-
|
|
555
|
-
- 不要用 prose completion status 替代 compass frontmatter `status: completed` + `end_date`
|
|
556
|
-
- 不要跳过 compound Phase 6(`{KNOWLEDGE_DIR}/README.md` 索引)——即使只结晶一篇文档
|
|
557
|
-
- 不要跳过 compound——如果本迭代确实没有可结晶的知识,在 compass `## Compound Round Summary` 写 `无可结晶知识(原因:<简述>)`
|
|
558
|
-
- 不要将 **Phase 4 开 PR** 等同于 **迭代交付完成** — 必须完成 **Phase 5** §5.5 merge-ready loop
|
|
559
|
-
- **不要在 Phase 5 于 CI 仍在跑或 AI review 波次未结束时 push**(浪费 token、打断 review;§5.1a)— 本地可提前修,push 必须等 idle
|
|
560
|
-
- **不要在 iteration-start §1.6 由 product/architect 向 `{KNOWLEDGE_DIR}/` 新增文档**(知识 → iteration-close **`mstar-compound`**)
|
|
561
|
-
- **不要把迭代级草案写入 `{SPECS_DIR}/`**(应进 `{ITERATION_DIR}/<iteration-id>/specs/` 或 `guides/`)
|
|
562
|
-
- **不要在 iteration-close 跳过 `<iteration-id>/` package 盘点**(compound 提升 SSOT → **`mstar-compound`**)
|
|
563
|
-
- **不要新写根目录 `<iteration-id>-delivery-compass.md`**(canonical:`<iteration-id>/delivery-compass.md`;legacy flat 仅兼容读)
|
|
564
|
-
- **不要在 `{ITERATION_DIR}/README.md` 为同一迭代登记 compass + workspace 双行**(一行 = 一次迭代)
|
|
565
|
-
- **不要在 iteration-start §1.6 跳过 writing-specialist 全库 specs corpus hygiene**(仅改当轮 compass/plans 而不扫 `{SPECS_DIR}/`)
|
|
566
|
-
- **不要在 SDD plan 上以单席 `qc.md` 收尾**(除非用户书面 `QC mode: single — override`)
|
|
567
|
-
- **不要在未显式 `Direction lock mode: autonomous` 时跳过与用户收敛方向**(interactive 仍为默认)
|
|
568
|
-
- **不要在 `autonomous` mode 下例行问用户「是否同意该方向」**(须落盘 rationale;无候选且无约束时 STOP)
|
|
569
|
-
- **不要把 harness 流程(Review 链 / QC / QA / compound / close / PR 等)计进 Scale budget 的 plan 数量**,也不得为此单独建 process plan 占坑
|
|
570
|
-
- **不要在 Phase 2 无 verified `execution_lease` 就做可写 implement 派发**(resume 仅限同 `holder` verify-held-lease)
|
|
571
|
-
- **不要 steal / 覆盖他人 `execution_lease` 或 `integration_merge_lease`**(除非用户本轮显式 override + audit `notes`)
|
|
572
|
-
- **不要从 feature worktree 的 `{HARNESS_DIR}` 路径当作 plans / status / iterations / SDD SSOT**(control worktree 绝对路径为准;默认 gitignore 下 feature 缺 plans **不得**推断 `Worktree mode: waived`)
|
|
573
|
-
- **不要把「无 flock」与「gitignore / feature 缺 plans」捆成一次 waive**(无锁 → `Plan parallelism: serial` only;gitignore → control-path harness)
|
|
574
|
-
- **不要并行 merge 入 `spec_integration_branch`**(merge 必须经 `integration_merge_lease` 串行)
|
|
378
|
+
完整反模式索引见 **`mstar-harness-core`**。迭代级高频陷阱(其余各 Phase 内已含对应 hard rule):
|
|
379
|
+
|
|
380
|
+
- **不要将 Phase 4 开 PR 等同于迭代交付完成** — 必须完成 Phase 5 §5.2 merge-ready loop
|
|
381
|
+
- **不要在 Phase 5 CI 仍跑或 AI review 波次未结束时 push**(§5.1a)— 本地可提前修,push 等 idle
|
|
382
|
+
- **不要在缺 `iteration_base_branch` / `target_branch` 时默认 `main` / `master`**
|
|
383
|
+
- **不要在 iteration-start §1.6 由 product/architect 向 `{KNOWLEDGE_DIR}/` 新增**(知识 → iteration-close **`mstar-compound`**)
|
|
384
|
+
- **不要在 per-plan Done 后立即 compound** — 等 iteration-close 统一做
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Phase 3: iteration-close(收口迭代)
|
|
2
|
+
|
|
3
|
+
> Loaded by `mstar-iteration` SKILL.md when entering Phase 3. **Read `mstar-harness-core` first.** Phase 2 全部 plan `Done` 后按 **Phase transition gates** 进入本 Phase。
|
|
4
|
+
|
|
5
|
+
PM 在迭代内全部 plan Done 后执行。**本 Phase 在 integration 分支上运行**,产出物 commit 到 integration 分支,随迭代 PR 合入 root `metadata.target_branch`。入口:Phase 2 全部 plan `Done` 后按 **Phase transition gates** 进入。
|
|
6
|
+
|
|
7
|
+
**Close Done 定义**:§3.1→§3.5 全部完成;compass frontmatter 写入 `status: completed` + `end_date`;每篇新增 knowledge doc 已登记 `{KNOWLEDGE_DIR}/README.md`。只在 final plan 中写了 compound / roadmap / PR 说明,不算 iteration-close 完成。
|
|
8
|
+
|
|
9
|
+
## 3.0 Phase boundary(HARD)
|
|
10
|
+
|
|
11
|
+
- Phase 3 是 iteration 级收口,不是任一 plan 的子任务。
|
|
12
|
+
- final plan closure、plan notes、plan compaction 可作为输入,但不能替代 §3.1→§3.5。
|
|
13
|
+
- 读过 `mstar-iteration` / `mstar-compound` 不等于执行 gate;必须打印 checklist 并写入产物。
|
|
14
|
+
|
|
15
|
+
## 3.0.5 Compass shape normalization(legacy 漂移修复)
|
|
16
|
+
|
|
17
|
+
进入 §3.1 前,先确认 compass 具有 close 可写入的结构。若缺失,PM 在本 thread 做最小规范化,不委派、不重写无关内容。
|
|
18
|
+
|
|
19
|
+
| 检查 | 缺则补齐 |
|
|
20
|
+
|------|----------|
|
|
21
|
+
| YAML frontmatter:`iteration_id`, `start_date`, `status` | 从文件名 / 正文提取;收口前 `status` 保持 `active` 或 `locked` |
|
|
22
|
+
| `## Roadmap Position` | 从 general context / roadmap prose 迁移为本节 |
|
|
23
|
+
| `## Quality Gate Summary` | 按模板补占位,§3.4 填写 |
|
|
24
|
+
| `## Compound Round Summary` | 按模板补占位,§3.4 填写 |
|
|
25
|
+
| `## Iteration Retrospective (minimal)` | 按模板补占位,§3.4 填写 |
|
|
26
|
+
|
|
27
|
+
正文 completion status 只能作为历史注释;最终状态必须写入 frontmatter `status: completed` + `end_date`。
|
|
28
|
+
|
|
29
|
+
## 3.1 Close entry checklist(HARD GATE)
|
|
30
|
+
|
|
31
|
+
**STOP**: 打印下方 checklist,且全部为 `[x]` 后,才可进入 §3.2 Compound。
|
|
32
|
+
|
|
33
|
+
- [ ] 所有 compass 中登记的 plan 在 `{HARNESS_DIR}/status.json` 均为 `Done`
|
|
34
|
+
- [ ] 所有 plan 的 residual findings 已收口:优先 empty open 列表;若仍有 open R#,须均为 Phase 2 `zero-residual` 允许的 blocker-defer + roadmap,或已 closed/accepted/waived 归档(见 `mstar-plan-artifacts` Findings cleanup modes)
|
|
35
|
+
- [ ] compass `## Plans` 表状态列已与 `status.json` 同步
|
|
36
|
+
- [ ] 迭代 `## Acceptance Criteria` 已达成或显式豁免(compass 或对话记录原因)
|
|
37
|
+
- [ ] compass shape 已满足(frontmatter + `## Roadmap Position` + close 占位节)
|
|
38
|
+
|
|
39
|
+
PM **必须**在对话中打印本 checklist;不得默认同过。
|
|
40
|
+
|
|
41
|
+
## 3.2 知识结晶(Compound)—— 迭代级核心收口
|
|
42
|
+
|
|
43
|
+
**Compound 在此执行,不在 per-plan Done 后独立执行。** 工作流 SSOT → **`mstar-compound`**(Q1–Q8 自检、Phase 1–7、Phase 6 索引登记强制)。
|
|
44
|
+
|
|
45
|
+
PM 批量触发后须:
|
|
46
|
+
|
|
47
|
+
1. 收集本迭代 plan 实现 / debug / review 素材,筛候选知识
|
|
48
|
+
2. **盘点** `{ITERATION_DIR}/<iteration-id>/**` package(`guides/`、`specs/`;默认排除 `delivery-compass.md`)— **`mstar-compound`**「Iteration package promotion」;提升值得保留者进 `{KNOWLEDGE_DIR}/`
|
|
49
|
+
3. 逐条过 `mstar-compound` 自检;跳过项记入 compass `## Compound Round Summary`
|
|
50
|
+
4. 写入或更新 `{KNOWLEDGE_DIR}/<category>/<slug>.md`;新领域词更新 `CONCEPTS.md`
|
|
51
|
+
5. **每篇**新 doc 完成 Phase 6(`{KNOWLEDGE_DIR}/README.md` 登记)
|
|
52
|
+
|
|
53
|
+
若无结晶且无 package 提升,仍在 `## Compound Round Summary` 写明 `无可结晶知识` / package 盘点结论及原因。
|
|
54
|
+
|
|
55
|
+
## 3.3 更新 roadmap
|
|
56
|
+
|
|
57
|
+
1. 更新 compass **`## Roadmap Position`**(§3.0.5 已确保本节存在):
|
|
58
|
+
- current iteration 行标记为 **`delivered`**(或等价明确措辞)
|
|
59
|
+
- next iteration 更新为即将开始的内容、触发条件、owner
|
|
60
|
+
2. 若 `status.json` 中有 `plans[].metadata.roadmap` 字段,同步更新
|
|
61
|
+
3. 若存在 deferred-features / roadmap tracker 类文档,按项目惯例刷新
|
|
62
|
+
4. 若 `STRATEGY.md` 存在,可更新 `## Decision Log`(重大架构决策时)
|
|
63
|
+
|
|
64
|
+
## 3.4 标记迭代完成
|
|
65
|
+
|
|
66
|
+
1. compass **YAML frontmatter**:`status: completed`,`end_date: YYYY-MM-DD`(必须;见 §3.0.5)
|
|
67
|
+
2. 更新 `{ITERATION_DIR}/README.md` 索引中该迭代行 Status 为 `completed`
|
|
68
|
+
3. 填充 compass `## Quality Gate Summary`、`## Compound Round Summary` 与 `## Iteration Retrospective (minimal)`(见模板)
|
|
69
|
+
|
|
70
|
+
## 3.5 Close exit checklist + commit
|
|
71
|
+
|
|
72
|
+
**Precondition**: §3.1 checklist `[x]`;§3.4 frontmatter `completed` + `end_date` 已写。
|
|
73
|
+
|
|
74
|
+
PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git commit`;然后进入 **Phase 4**(见 `references/phase-4-5-pr-delivery.md`):
|
|
75
|
+
|
|
76
|
+
- [ ] §3.1 前置 gate 已打印并满足
|
|
77
|
+
- [ ] §3.2 compound 完成;**`<iteration-id>/` package 已盘点**(提升 / 保留 / 跳过已记入 Compound Summary);新增 knowledge doc 均已登记 `{KNOWLEDGE_DIR}/README.md`(或已记录无可结晶原因)
|
|
78
|
+
- [ ] §3.3 `## Roadmap Position` current iteration 已标 `delivered`;tracker / STRATEGY 已按需更新
|
|
79
|
+
- [ ] §3.4 frontmatter `status: completed` + `end_date`;Quality Gate Summary + Compound Summary + Retrospective 已填
|
|
80
|
+
- [ ] 当前分支是 `spec_integration_branch`
|
|
81
|
+
- [ ] PR base = `metadata.target_branch`(与 compass frontmatter 一致);**不是**未记录的 `main`
|
|
82
|
+
|
|
83
|
+
**Commit 到 integration 分支**:
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
git add {ITERATION_DIR}/<id>/ {ITERATION_DIR}/README.md {KNOWLEDGE_DIR}/ CONCEPTS.md
|
|
87
|
+
git commit -m "chore(iteration): close <iteration-id> — compound round, roadmap update"
|
|
88
|
+
git push origin <spec_integration_branch>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
PR 目标使用 root `metadata.target_branch`;缺失时停止并补齐,不得默认 `main`。
|
|
92
|
+
|
|
93
|
+
## 3.6 可选:触发 compound-refresh
|
|
94
|
+
|
|
95
|
+
若本轮 compound 新增了较多知识文档,或 compass 标记了可能过时的旧知识,触发 `mstar-compound-refresh` 对有重叠的知识文档做维护。
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# Phase 4 & 5: PR delivery + merge-ready loop
|
|
2
|
+
|
|
3
|
+
> Loaded by `mstar-iteration` SKILL.md when entering Phase 4/5. **Read `mstar-harness-core` first.** 进入前置:Phase 3 §3.5 exit 全 `[x]`(Phase 4);Phase 4 PR 已创建(Phase 5)。
|
|
4
|
+
|
|
5
|
+
## Phase 4: PR delivery(开 PR)
|
|
6
|
+
|
|
7
|
+
**Precondition**: Phase 3 §3.5 exit 全 `[x]`;close commit 已 push 到 `spec_integration_branch`。
|
|
8
|
+
|
|
9
|
+
1. 打印 **`## Phase 4: PR delivery`**
|
|
10
|
+
2. Resolve target:`metadata.target_branch`(compass frontmatter 镜像);缺失 → **STOP**,问用户
|
|
11
|
+
3. 创建 PR:`spec_integration_branch` → `target_branch`
|
|
12
|
+
4. 记录 PR URL / number(Phase 5 会话 SSOT)
|
|
13
|
+
5. **Immediately** 进入 **Phase 5** — **Phase 4 exit ≠ 迭代交付完成**
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
## Phase 5: PR merge-ready loop
|
|
18
|
+
|
|
19
|
+
**Precondition**: Phase 4 PR 已创建且 head = `spec_integration_branch`。
|
|
20
|
+
|
|
21
|
+
**Loop 理念**(mstar SSOT):PR 开完后进入 **验证—修复—再验证** 循环,直至 PR 可合并。与 Phase 2 per-plan loop 类似,但对象是 **PR 级** merge 门禁(CI、review、冲突),不是 plan 实现。
|
|
22
|
+
|
|
23
|
+
### 5.0 Phase boundary
|
|
24
|
+
|
|
25
|
+
- Phase 5 在 PR head(`spec_integration_branch`)上 push 修复;**禁止**另开替代分支
|
|
26
|
+
- 产品代码修复 → PM **dispatch** dev/ops(`mstar-dispatch-gates`);PM 线程不代写实现
|
|
27
|
+
- 禁止为「让 CI 变绿」而改 workflow,除非用户明确授权
|
|
28
|
+
- **Push cadence** → **§5.1a**(本地可提前修;**禁止**在 CI / AI review 波次未结束时 push)
|
|
29
|
+
|
|
30
|
+
### 5.1a Push cadence(HARD — 防打断 CI / AI review)
|
|
31
|
+
|
|
32
|
+
发现 CI 失败或 review 问题时,**允许本地提前修**(含 dispatch implement/ops、落盘 commit),但 **`git push`(更新 PR head)必须等上一波次跑完**。
|
|
33
|
+
|
|
34
|
+
| 允许 | 禁止 |
|
|
35
|
+
|------|------|
|
|
36
|
+
| CI/review **进行中**就开始本地诊断与修复 | 当前 head 上仍有 **CI queued/in_progress**,或 **AI review 波次**(Bugbot / Greptile / 等价 bot)未结束时 **push** |
|
|
37
|
+
| CI **全部结束后**出现新的 review 评论 → 继续本地修,批完再 push | 为「抢时间」在 CI 仍在跑时 push(会取消/孤儿化进行中的 CI 与 **AI reviews**,浪费 token 且无完整结果) |
|
|
38
|
+
| 一批本地修复 **合并为一次 push**(本 head 波次 settled 后) | 同一波次未 settled 就连续多次 push |
|
|
39
|
+
|
|
40
|
+
**Push gate(每次 push 前必须核对)**:
|
|
41
|
+
|
|
42
|
+
1. 当前 PR head 的 **required CI**(及已启动的检查)均已 **completed**(success / failure / cancelled — 不得仍为 queued / in_progress)
|
|
43
|
+
2. 附着在该 head 的 **AI / bot review 波次**已跑完(无进行中的 review job;若宿主无法探测 job,则至少等 CI settled **且** review 评论不再增长一小段稳定窗口后再 push)
|
|
44
|
+
3. 仅当 **1–2 满足** 且本地仍有未推送修复时,才 **push 一次**
|
|
45
|
+
4. Push 后:等 **新 head** 的 CI + reviews 全部跑完 → 再决定下一轮本地修 / push
|
|
46
|
+
|
|
47
|
+
**顺序记忆**:`observe findings → fix locally early → wait until CI + review wave idle → push batch → wait new wave → repeat`。
|
|
48
|
+
|
|
49
|
+
### 5.1 Loop(repeat until §5.5 exit)
|
|
50
|
+
|
|
51
|
+
1. **Status** — PR mergeable?required CI?unresolved review threads?**任一 CI/AI review 是否仍在跑?**
|
|
52
|
+
2. **Merge conflicts** — blocking 则在 integration 分支**本地**解决;**仅当 §5.1a push gate 满足时**再 push(意图冲突 → **Blocked**)
|
|
53
|
+
3. **Reviews** — fetch unresolved threads;triage;dispatch **本地**修复(可在上一波次仍在跑时开工)
|
|
54
|
+
4. **CI** — 失败项在 PR 范围内**本地**修复(可提前开工);**不**在 CI 仍在跑时 push
|
|
55
|
+
5. **Push** — 仅当 §5.1a 满足:无 in-flight CI,上一波 CI **与** reviews 均已跑完 → **一次** push 本批修复
|
|
56
|
+
6. **Review fix hygiene**(每次因 review 而 push 后):
|
|
57
|
+
- 在同 thread **comment**(改动 + 验证)
|
|
58
|
+
- **Resolve** when addressed
|
|
59
|
+
7. Return to step 1(CI 结束后若出现 **新** reviews → 继续本地修,再等 idle 后 push)
|
|
60
|
+
|
|
61
|
+
**Optional host helpers(command 层发现;非 `mstar-*` load order)**:
|
|
62
|
+
|
|
63
|
+
| Priority | Helper | When |
|
|
64
|
+
|----------|--------|------|
|
|
65
|
+
| 1 | `babysit` or any `*-babysit` skill(first readable `SKILL.md`) | **Default prefer** — CI green + reviews resolved loop |
|
|
66
|
+
| 2 | `greploop` | **Optional** — only when the **repo** uses Greptile / has `greploop` available; then run for Greptile **5/5** in addition to babysit/`*-babysit` (or fallback) gates |
|
|
67
|
+
| 3 | neither | Command fallback = babysit-equivalent CI + reviews gates |
|
|
68
|
+
|
|
69
|
+
When both babysit/`*-babysit` and `greploop` apply: **babysit/`*-babysit` first**(CI + reviews),then optional greploop for Greptile score. Discovery paths → host `commands/iteration-drive` / `iteration-loop` Phase 5.
|
|
70
|
+
|
|
71
|
+
### 5.2 Phase 5 exit checklist(迭代交付完成)
|
|
72
|
+
|
|
73
|
+
打印 **`## Phase 5 exit checklist`**;全 `[x]` 后方可宣称 **迭代交付完成**:
|
|
74
|
+
|
|
75
|
+
- [ ] PR mergeable(无 blocking merge conflicts)
|
|
76
|
+
- [ ] All **required** CI checks green on latest head
|
|
77
|
+
- [ ] All review threads **resolved**(或用户书面 waive 特定 thread)
|
|
78
|
+
- [ ] §5.1 review comment + resolve 已覆盖本轮所有 addressed feedback
|
|
79
|
+
- [ ] Host todo `phase-5-pr-merge-ready` 可勾选
|
|
80
|
+
|
|
81
|
+
PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权 auto-merge。
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# Phase 5 helper skill discovery(babysit / greploop)
|
|
2
|
+
|
|
3
|
+
> Loaded by host `commands/iteration-drive` / `iteration-loop`(Phase 5 §5.0)before the first merge-ready loop pass. Search for optional **non-`mstar-*`** helper skills;first readable `SKILL.md` wins per name. Does **not** enter `mstar-*` load order.
|
|
4
|
+
|
|
5
|
+
## Search paths(示例,按宿主扩展)
|
|
6
|
+
|
|
7
|
+
| Skill | Search paths |
|
|
8
|
+
|-------|--------------|
|
|
9
|
+
| `babysit` / `*-babysit` | `skills/babysit/SKILL.md`;`skills/*-babysit/SKILL.md`;`~/.cursor/skills-cursor/babysit/SKILL.md`;`~/.cursor/skills-cursor/*-babysit/SKILL.md`;`~/.agents/skills/babysit/SKILL.md`;`~/.agents/skills/*-babysit/SKILL.md` |
|
|
10
|
+
| `greploop`(optional) | `skills/greploop/SKILL.md`;`~/.cursor/skills-cursor/greploop/SKILL.md`;`~/.agents/skills/greploop/SKILL.md`;Codex plugin `skills/greploop/` — **only adopt when the repo uses Greptile / has greploop** |
|
|
11
|
+
|
|
12
|
+
## Mode selection(babysit-first)
|
|
13
|
+
|
|
14
|
+
| Priority | Condition | Read before loop | Primary done signal |
|
|
15
|
+
|----------|-----------|------------------|---------------------|
|
|
16
|
+
| 1 | `babysit` **or** any `*-babysit` found | that skill’s `SKILL.md`(prefer exact `babysit`, else first matching `*-babysit`) | Required CI **all green** + **all** review threads **resolved** |
|
|
17
|
+
| 2 | `greploop` found **and** repo has Greptile/greploop | `greploop` SKILL.md | Greptile score **5/5** on this PR(**additive** — does not replace priority-1 gates) |
|
|
18
|
+
| 3 | else neither babysit/`*-babysit` | —(command fallback = babysit 同级 CI + reviews 门禁) | Required CI **all green** + **all** review threads **resolved** |
|
|
19
|
+
|
|
20
|
+
**Both babysit/`*-babysit` and greploop apply**: run **babysit/`*-babysit` first**(CI + reviews),then optional greploop until Greptile **5/5**(串行)。Do **not** prefer greploop over babysit。
|
|
21
|
+
|
|
22
|
+
**No greploop / repo without Greptile**: skip greploop entirely — babysit/`*-babysit` or fallback only。
|
|
23
|
+
|
|
24
|
+
**All modes** share the §5.2 exit checklist(CI + reviews + mergeable;Greptile 5/5 only when greploop mode ran or repo shows a Greptile score)。
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-phase-gates
|
|
3
|
-
description: "Morning Star
|
|
3
|
+
description: "Morning Star Spec-Driven 双阶段门禁:Prepare(`specify → clarify → plan`)、Execute(`plan(locked) → tasks → implement`;多 task 默认 `Execution mode: sdd`)。覆盖意图门禁、长期目标优先、分批 roadmap 强制落盘、clarify 纪律、hotfix 压缩路径、可验证编辑、Phase Gate 最小证据。Read when judging Prepare/Execute gates, before first implement dispatch, when product/architect enter Prepare, or to justify not skipping plan/clarify. `@project-manager` 每轮非 hotfix 必读;`@product-manager`/`@architect` 锁规格/plan 必读 Prepare;实现角色读 Execute + hotfix 例外。`quick` 禁豁免规则在 `mstar-harness-core`。"
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
## Load order(必读顺序)
|
|
@@ -49,7 +49,7 @@ description: "Morning Star (启明星) Spec-Driven 双阶段门禁 —— Prepar
|
|
|
49
49
|
|
|
50
50
|
- **`plan locked`**
|
|
51
51
|
- 最小动作:在 plan 或 notes 记录当前锁定版本(日期或 hash)。
|
|
52
|
-
- **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review 三问(每 task 可独立验证?依赖顺序清晰?无隐含假设?)— 见 `mstar-plan-artifacts/templates/plan.main.md
|
|
52
|
+
- **Plan 质量门**(新 plan / 大改):无 placeholder(`...`、`TBD`、`etc.`);含 **Global Constraints** 与 per-task **Interfaces**;PM self-review 三问(每 task 可独立验证?依赖顺序清晰?无隐含假设?)— 见 `mstar-plan-artifacts/templates/plan.main.md` + **`mstar-plan-artifacts/references/plan-quality-bar.md`**(自包含/验证门/STOP 条件/drift check/done criteria)。
|
|
53
53
|
- **`implement`**
|
|
54
54
|
- 最小产物:实现 diff、自检证据、回报与 handoff;行为准则 → **`mstar-coding-behavior`**;编辑纪律 → 上文「可验证编辑与上下文纪律」。
|
|
55
55
|
- **知识库 / 迭代 compass**:若 `plans[].metadata` 登记了 `primary_spec` / `spec_refs` / `iteration_compass` / `iteration_refs`,**开工前**须阅读并在回报中说明已对齐 → **`mstar-plan-conventions`** · **`mstar-plan-artifacts/references/knowledge-and-designs.md`**。
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# Plan Quality Bar
|
|
2
|
+
|
|
3
|
+
The standard every implementation plan must meet before it is locked and dispatched. Applies to `{PLAN_DIR}` main plans, SDD task-briefs derived from them, and audit-generated plans. Extends the Plan 质量门 in **`mstar-phase-gates`** and the `plan.main.md` template.
|
|
4
|
+
|
|
5
|
+
## Core principle: write for a zero-context executor
|
|
6
|
+
|
|
7
|
+
SDD implementers start with a fresh session — they have not seen the Prepare conversation, the spec, or other tasks. Audit plans may be executed sessions or days later by a different model. If a plan references "the pattern discussed above" or "as agreed in clarify", it is broken.
|
|
8
|
+
|
|
9
|
+
The plan is the spec. Everything the executor needs must be in the file or reachable from a file path it names.
|
|
10
|
+
|
|
11
|
+
## Quality checklist
|
|
12
|
+
|
|
13
|
+
Before a plan is locked, verify every item:
|
|
14
|
+
|
|
15
|
+
### 1. Self-contained context
|
|
16
|
+
|
|
17
|
+
- Every task names **exact file paths** (create / modify / test), not "the relevant module".
|
|
18
|
+
- **Current-state excerpts** — when a task modifies existing code, include the code as it exists today (short, with `file:line` markers), enough that the executor can confirm it is looking at the right thing.
|
|
19
|
+
- **Conventions to follow** — name the repo pattern (error handling, naming, layering) and point to one exemplar file: "Error handling follows the Result pattern — see `src/lib/result.ts` and its use in `src/users/api.ts:40-60`. Match it."
|
|
20
|
+
- **Interfaces** — consumed and produced signatures are listed verbatim, not paraphrased.
|
|
21
|
+
|
|
22
|
+
### 2. Verification gates
|
|
23
|
+
|
|
24
|
+
Every step ends with a **command and its expected result**, not a judgment call.
|
|
25
|
+
|
|
26
|
+
| Pattern | Weak (do not use) | Strong (required) |
|
|
27
|
+
|---------|-------------------|-------------------|
|
|
28
|
+
| Test step | "run the tests" | `pnpm test -- orders` → all pass, including 2 new tests |
|
|
29
|
+
| Typecheck | "make sure it compiles" | `pnpm typecheck` → exit 0, no errors |
|
|
30
|
+
| Removal | "clean up the old code" | `grep -rn "oldPattern" src/` → no matches |
|
|
31
|
+
|
|
32
|
+
The executor should never have to *judge* whether a step succeeded — it runs a command and compares output.
|
|
33
|
+
|
|
34
|
+
### 3. Hard boundaries
|
|
35
|
+
|
|
36
|
+
Each task lists:
|
|
37
|
+
|
|
38
|
+
- **In scope** — the only files the executor should modify.
|
|
39
|
+
- **Out of scope** — files that look related but must not be touched, with a one-line reason ("deprecated path, scheduled for deletion").
|
|
40
|
+
|
|
41
|
+
### 4. STOP conditions
|
|
42
|
+
|
|
43
|
+
Plan-specific escape hatches — not boilerplate. Name the risks particular to this work:
|
|
44
|
+
|
|
45
|
+
- "If `config.ts` no longer exports `getDb`, STOP — the migration in plan 003 may have landed first."
|
|
46
|
+
- "If the test in step 2 fails for a reason other than the missing import, STOP — the assumption that `User.email` is non-nullable may be false."
|
|
47
|
+
|
|
48
|
+
The executor stops and reports instead of improvising. This is what lets a weaker model execute safely.
|
|
49
|
+
|
|
50
|
+
### 5. Drift check
|
|
51
|
+
|
|
52
|
+
Stamp the commit the plan was written against. Before execution, the executor (or PM) runs:
|
|
53
|
+
|
|
54
|
+
```
|
|
55
|
+
git diff --stat <planned-at-sha>..HEAD -- <in-scope-paths>
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
If any in-scope file changed, the executor compares the plan's "current state" excerpts against live code before proceeding. On mismatch → STOP condition.
|
|
59
|
+
|
|
60
|
+
In SDD, this maps to the `BASE_SHA` recorded before Task 1.
|
|
61
|
+
|
|
62
|
+
### 6. Done criteria (machine-checkable)
|
|
63
|
+
|
|
64
|
+
ALL must hold — commands and expected results, not prose:
|
|
65
|
+
|
|
66
|
+
```markdown
|
|
67
|
+
## Done criteria
|
|
68
|
+
|
|
69
|
+
- [ ] `pnpm typecheck` exits 0
|
|
70
|
+
- [ ] `pnpm test` exits 0; new tests for <X> exist and pass
|
|
71
|
+
- [ ] `grep -rn "<old-pattern>" src/` returns no matches
|
|
72
|
+
- [ ] No files outside the in-scope list are modified (`git status`)
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
"Works correctly" is not a done criterion.
|
|
76
|
+
|
|
77
|
+
## Relationship to existing plan elements
|
|
78
|
+
|
|
79
|
+
| This quality bar | Existing mstar element |
|
|
80
|
+
|------------------|----------------------|
|
|
81
|
+
| Self-contained context | `plan.main.md` Global Constraints + per-task Files/Interfaces |
|
|
82
|
+
| Verification gates | `plan.main.md` per-step "Run: `cmd`" lines |
|
|
83
|
+
| Hard boundaries | `plan.main.md` per-task Files (Create/Modify) — extended with explicit Out-of-scope |
|
|
84
|
+
| STOP conditions | New — not previously formalized |
|
|
85
|
+
| Drift check | SDD `BASE_SHA` — generalized to all plans |
|
|
86
|
+
| Done criteria | `plan.main.md` per-step checkboxes — elevated to machine-checkable |
|
|
87
|
+
|
|
88
|
+
## When to apply
|
|
89
|
+
|
|
90
|
+
| Plan source | Applies |
|
|
91
|
+
|-------------|---------|
|
|
92
|
+
| PM/architect Prepare | Full bar before `plan(locked)` |
|
|
93
|
+
| SDD task-brief (extracted from plan) | Inherits from plan; task-brief script carries excerpts forward |
|
|
94
|
+
| Audit-generated plan (`mstar-audit`) | Full bar — audit plans are the most context-isolated |
|
|
95
|
+
| Hotfix (`inline`) | Relaxed — see `mstar-phase-gates` hotfix exception |
|
|
96
|
+
|
|
97
|
+
## Attribution
|
|
98
|
+
|
|
99
|
+
The self-containment, verification-gate, STOP-condition, and drift-check concepts are adapted from the [improve](https://github.com/shadcn/improve) skill (MIT, © shadcn), integrated into Morning Star's plan-artifact conventions.
|
|
@@ -41,7 +41,7 @@ If any conflict appears, `mstar-harness-core` remains the authoritative source f
|
|
|
41
41
|
| `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 |
|
|
42
42
|
| `qc-specialist*` | `mstar-branch-worktree`, `mstar-plan-artifacts` (review bundle paths); `references/qc-specialist/` (workflow, checklist, template, lenses); `mstar-design-md` when reviewing UI |
|
|
43
43
|
| `qa-engineer` | `mstar-branch-worktree`, `mstar-plan-artifacts` (closing R#); `references/qa-engineer/acceptance-gate.md`; `mstar-design-md` when verifying visual output |
|
|
44
|
-
| `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent); `mstar-strategy` (STRATEGY.md creation/maintenance) |
|
|
44
|
+
| `architect`, `product-manager` | `mstar-phase-gates` (Prepare), `mstar-plan-artifacts` (knowledge/specs); `mstar-design-md` (creator + design intent); `mstar-strategy` (STRATEGY.md creation/maintenance); **`mstar-audit`** (`audit` Task category — architect leads codebase audit → improvement plans) |
|
|
45
45
|
| `ops-engineer` | `mstar-coding-behavior`, `mstar-branch-worktree` |
|
|
46
46
|
| `prompt-engineer` | All topic skills when editing harness text |
|
|
47
47
|
|