@mstar-harness/opencode 0.7.6 → 0.7.8

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.
@@ -1,46 +1,57 @@
1
1
  ---
2
2
  name: iteration-drive
3
- description: Drive the active iteration to completion — run the Autonomous Execute loop (Phase 2 of mstar-iteration) until all plans are Done, then run iteration-close (Phase 3: compound + compass + roadmap update) on the integration branch, then create PR to the recorded target branch
3
+ description: Drive the active iteration to completion — Phase 2 Autonomous Execute, Phase 3 iteration-close, Phase 4 Create PR, Phase 5 PR merge-ready loop (greploop / babysit / CI fallback) until mergeable. Not Done until Phase 5 exit checklist passes.
4
4
  agent: project-manager
5
5
  ---
6
6
 
7
7
  # Drive Iteration
8
8
 
9
- Drive the active Morning Star iteration forward. **Boot loads skills; this command sequences Phase 2 → Phase 3 → PR.** Domain SSOT → **`mstar-iteration`**.
9
+ Drive the active Morning Star iteration forward. **Boot loads skills; this command sequences Phase 2 → 3 → 4 → 5.** Phase gate SSOT → **`mstar-iteration`** §2–§5;本 command 仅补充 **可选第三方 helper skill 发现**(Phase 5),不反向写入 `mstar-*`。
10
10
 
11
11
  ## Phase state machine(禁止跳步)
12
12
 
13
13
  ```
14
- Phase 2: Autonomous Execute → Phase 3: iteration-close → Completion: PR
15
- (per-plan dispatch loop) (独立 gate,非 final plan) (close 之后)
14
+ Phase 2: Autonomous Execute → Phase 3: iteration-close → Phase 4: Create PR → Phase 5: PR merge-ready
15
+ (per-plan dispatch loop) (独立 gate) (开 PR) (loop 至 mergeable)
16
16
  ```
17
17
 
18
18
  | 当前状态 | 允许 | 禁止 |
19
19
  |----------|------|------|
20
20
  | 存在非 `Done` plan | Phase 2:dispatch implement / QC / QA | 进入 Phase 3 或开 PR |
21
- | **全部** plan `Done` | **立刻** `## Phase 3: iteration-close`(§3.0→§3.5) | 宣称 iteration 完成、写 PR、结束会话 |
22
- | Phase 3 exit checklist 全 `[x]` + compass `status: completed` | `git commit` push PR | 跳过 compound / roadmap / frontmatter |
21
+ | **全部** plan `Done` | **立刻** `## Phase 3: iteration-close`(§3.0→§3.5) | 宣称 iteration-drive 完成、开 PR、结束会话 |
22
+ | Phase 3 exit checklist 全 `[x]` + compass `status: completed` | 进入 **Phase 4: Create PR** | 跳过 compound / roadmap / frontmatter |
23
+ | PR 已创建 | **Phase 5** merge-ready loop(§5) | 汇报「迭代结束」、停止 host todos |
24
+ | Phase 5 exit checklist 全 `[x]` | **iteration-drive Done**;报告 PR link + merge-ready 证据 | — |
23
25
 
24
- **常见误判**:final plan closure notes、compound 草稿、roadmap 口头更新 **≠** iteration-close。必须打印 §3.1 entry + §3.5 exit checklist。
26
+ **Done 定义**:**仅** Phase 5 §5.5 exit checklist `[x]`。**Phase 3 close Done;Phase 4 开 PR ≠ Done。**
25
27
 
26
- ## PM invariants(Phase 2 全程有效)
28
+ ## PM invariants(Phase 2–5 全程有效)
27
29
 
28
30
  | 禁止(PM 线程) | 必须 |
29
31
  |-----------------|------|
30
- | Write/Edit/Shell 产品代码、写测试、跑 QC 审查 | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
32
+ | Write/Edit/Shell 产品代码、写测试、跑 QC 审查(Phase 2) | 每条 implement/QC/QA Assignment ⇒ **1 次 `Task`** |
31
33
  | 只写 Assignment 就进入下一 gate | 同轮 dispatch:`Subagent invokes issued: N`(N = Assignment 条数) |
32
- | 最后一个 plan `Done` 后直接 PR / 汇报结束 | **先** Phase 3(`mstar-iteration` §3),**再** PR(见 Completion) |
34
+ | 最后一个 plan `Done` 后直接开 PR / 汇报结束 | **Phase 3 4 5** 顺序执行 |
35
+ | Phase 4 开 PR 后停止 | Phase 5 loop 至 merge-ready;**禁止**未过 §5.5 就结束会话 |
36
+ | Phase 5 自己改产品代码 | 需改产品代码时 **dispatch** `@fullstack-dev` / `@ops-engineer` |
33
37
 
34
38
  派发细则 → **`mstar-dispatch-gates`** + **`mstar-host`**。Phase 3 细则 → **`mstar-iteration` §3** + **`mstar-compound`**。
35
39
 
36
- **Session todos**:进入 Phase 2 时设 plan-wave todos;当仅剩 1 个非 `Done` plan 时 **追加** `phase-3-iteration-close`(`mstar-iteration` §2.1);§3.5 完成前不得勾掉。
40
+ **Session todos**:
41
+
42
+ | Todo id | 何时追加 | 何时可勾掉 |
43
+ |---------|----------|------------|
44
+ | plan-wave todos | 进入 Phase 2 | 各 plan `Done` |
45
+ | `phase-3-iteration-close` | 仅剩 1 个非 `Done` plan | Phase 3 §3.5 exit 全 `[x]` |
46
+ | `phase-4-create-pr` | Phase 3 完成后 | PR 已创建并记录 URL/number |
47
+ | `phase-5-pr-merge-ready` | Phase 4 完成后 | Phase 5 §5.5 exit 全 `[x]` |
37
48
 
38
49
  ## Boot
39
50
 
40
51
  1. `mstar-harness-core`
41
52
  2. `mstar-roles` → `references/project-manager.md`
42
53
  3. `skills/pm/SKILL.md` → **§ Host entry** + **§ Boot**(PM role identity + dispatch-first rules)
43
- 4. `mstar-iteration` → **§ Phase 2** + **§ Phase 3**(close 为独立 gate,§3.0–§3.5
54
+ 4. `mstar-iteration` → **§ Phase 2–5**(§3 close gate;§4 PR delivery;§5 merge-ready loop
44
55
  5. `mstar-compound` — Phase 3 §3.2 前加载(含 Phase 6 索引登记)
45
56
  6. `mstar-dispatch-gates` + host reference
46
57
  7. `mstar-plan-artifacts`, `mstar-plan-conventions`, `mstar-branch-worktree`
@@ -69,7 +80,7 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
69
80
  - Merge plan branch → integration branch
70
81
  - Cross-plan progress sync → compass
71
82
  - Next plan
72
- 6. Repeat until **all** plans `Done` → **STOP**(见 Phase state machine)→ 打印 `## Phase 3: iteration-close` → 执行 **`mstar-iteration` §3**;**不得**开 PR
83
+ 6. Repeat until **all** plans `Done` → **STOP**(见 Phase state machine)→ 打印 `## Phase 3: iteration-close` → 执行 **`mstar-iteration` §3**;**不得**进入 Phase 4
73
84
 
74
85
  派发回合纪律 → **`mstar-dispatch-gates`** + **`mstar-iteration` §2.5**。
75
86
 
@@ -77,10 +88,10 @@ Execute **`mstar-iteration` § Phase 2** exactly. Summary:
77
88
 
78
89
  当 **every** plan 为 `Done` 时:
79
90
 
80
- 1. **STOP** per-plan loop — 不得合并 plan 分支、写 PR、或输出「迭代完成」摘要。
91
+ 1. **STOP** per-plan loop — 不得开 PR、不得进入 Phase 4/5、不得输出「迭代完成」摘要。
81
92
  2. 打印标题 **`## Phase 3: iteration-close`**(用户可见的 phase 边界)。
82
93
  3. 按 **`mstar-iteration` § Phase 3** 逐步执行 §3.0→§3.5。final plan 的 closure 只能提供输入,不能替代 close gate。
83
- 4. §3.5 exit checklist 全 `[x]` 且 compass frontmatter `status: completed` 后,才进入下方 **Completion: Create PR**。
94
+ 4. §3.5 exit checklist 全 `[x]` 且 compass frontmatter `status: completed` → 打印 **`## Phase 4: Create PR`** → 执行下方 Phase 4。
84
95
 
85
96
  | Step | Section | 要点 |
86
97
  |------|---------|------|
@@ -97,17 +108,106 @@ git commit -m "chore(iteration): close <iteration-id> — compound round, roadma
97
108
  git push origin <spec_integration_branch>
98
109
  ```
99
110
 
100
- **Not Done until**: §3.5 checklist `[x]` + compass frontmatter `completed`.
111
+ **Phase 3 exit(非 iteration-drive Done)**: §3.5 checklist `[x]` + compass frontmatter `completed`。
112
+
113
+ ## Phase 4: Create PR
114
+
115
+ Execute **`mstar-iteration` § Phase 4**(PR delivery gate)。本 command 步骤摘要:
116
+
117
+ 1. 打印 **`## Phase 4: Create PR`**
118
+ 2. Resolve PR target: `status.json` → `metadata.target_branch`(fallback:compass frontmatter `target_branch`)
119
+ 3. If missing → **stop and ask**; never default `main` / `master`
120
+ 4. Create PR: `spec_integration_branch` → `target_branch`
121
+ 5. Record PR URL + number(Phase 5 SSOT for this session)
122
+ 6. 勾掉 host todo `phase-4-create-pr`
123
+ 7. **Immediately** 打印 **`## Phase 5: PR merge-ready`** → 执行下方 Phase 5(**禁止**在此停止或汇报 Done)
124
+
125
+ **Phase 4 exit(非 iteration-drive Done)**: PR 已创建且 head = `spec_integration_branch`。
126
+
127
+ ## Phase 5: PR merge-ready(babysit loop)
128
+
129
+ Execute **`mstar-iteration` § Phase 5**(merge-ready loop SSOT)。**§5.5 exit 全 `[x]` = iteration-drive Done.**
130
+
131
+ 本 command **叠加**可选 helper skill 发现(**non-`mstar-*`**;不写入 `mstar-*` load order):
132
+
133
+ ### 5.0 Discover optional helper skills
134
+
135
+ Before the first loop pass, search for bundled/host skills(first readable `SKILL.md` wins per name):
136
+
137
+ | Skill | Search paths(示例,按宿主扩展) |
138
+ |-------|----------------------------------|
139
+ | `greploop` | `skills/greploop/SKILL.md`;`~/.cursor/skills-cursor/greploop/SKILL.md`;`~/.agents/skills/greploop/SKILL.md`;Codex plugin `skills/greploop/` |
140
+ | `babysit` | `skills/babysit/SKILL.md`;`~/.cursor/skills-cursor/babysit/SKILL.md`;`~/.agents/skills/babysit/SKILL.md` |
141
+
142
+ **Mode selection**:
143
+
144
+ | Priority | Condition | Read before loop | Primary done signal |
145
+ |----------|-----------|------------------|---------------------|
146
+ | 1 | `greploop` found | `greploop` SKILL.md | Greptile score **5/5** on this PR |
147
+ | 2 | else `babysit` found | `babysit` SKILL.md | Required CI **all green** + **all** review threads **resolved** |
148
+ | 3 | else neither | —(本 command §5.2–§5.4) | Required CI **all green** + **all** review threads **resolved** |
149
+
150
+ **Both greploop and babysit present**: run greploop until **5/5**, then babysit until CI green + reviews resolved(串行;§5.5 仍须满足全部 exit 项).
151
+
152
+ **All modes** share §5.5 exit checklist(CI + reviews + mergeable;Greptile 5/5 按 mode / repo 条件).
153
+
154
+ ### 5.1 PM invariants(Phase 5)
155
+
156
+ | 禁止 | 必须 |
157
+ |------|------|
158
+ | 改 CI workflow 只为「让检查变绿」 | 仅修 **本 PR 范围内** 引起的失败;workflow 变更需用户明确授权 |
159
+ | 未 comment + resolve 就宣称 review 已处理 | 每次 push 针对 review 的修复 → §5.3 |
160
+ | §5.5 未全 `[x]` 就结束会话 | 循环直至 merge-ready |
161
+
162
+ Fixes **push 到 `spec_integration_branch`**(PR head);禁止另开分支替代。
163
+
164
+ ### 5.2 Loop(all modes)
165
+
166
+ Repeat until §5.5 exit checklist passes:
167
+
168
+ 1. **Status** — `gh pr view <number> --json mergeable,mergeStateStatus,statusCheckRollup,reviewDecision`(或宿主等价 API)
169
+ 2. **Merge conflicts** — if blocking: resolve on integration branch(意图冲突 → **Blocked**,问用户)→ push
170
+ 3. **Active reviews** — fetch **unresolved** review threads only;triage valid change requests
171
+ 4. **CI** — list failing required checks;dispatch or fix in-scope → push
172
+ 5. **Mode-specific pass**:
173
+ - **greploop**: follow greploop SKILL until Greptile **5/5**
174
+ - **babysit**: follow babysit SKILL(comments + CI loop)
175
+ - **fallback**: triage unresolved review threads(§5.3)+ poll CI until all required checks green(no skill Read;**与 babysit 同级的 CI + reviews 门禁**)
176
+ 6. After each push → §5.3 → return to step 1
177
+
178
+ **Stop looping only when** §5.5 全 `[x]`。若多轮仍 blocked → 升级用户(列出 failing checks / unresolved threads / Greptile score)。
179
+
180
+ ### 5.3 Review fix hygiene(HARD — all modes)
181
+
182
+ Whenever a push addresses PR review feedback(human or bot, including Bugbot / Greptile):
183
+
184
+ 1. **Comment** on the **same review thread** — 简述改动与验证(链接 commit / 文件)
185
+ 2. **Resolve** the thread when the fix is complete and you stand behind the response
186
+ 3. Re-fetch thread list — unresolved count must trend to **zero** before §5.5
187
+
188
+ Do not bulk-resolve without a per-thread reply. Disagree or uncertain → reply explaining why; leave unresolved and escalate.
189
+
190
+ ### 5.4 Fallback mode detail(no greploop / babysit)
191
+
192
+ When neither skill is found, **本 command 承担 babysit 同级职责**(无外部 SKILL,但 exit 标准相同):
193
+
194
+ 1. Fetch **unresolved** review threads;triage valid change requests → dispatch fix → push → §5.3 comment + resolve
195
+ 2. Poll PR required checks until **all green**(reasonable backoff between polls)
196
+ 3. On CI failure: diagnose → dispatch implement/ops if code fix needed → push → poll again
197
+ 4. Do **not** exit until **both** CI green **and** all review threads resolved(或用户书面 waive)
198
+ 5. Do **not** exit on first green if new commits or reviews reopened checks
101
199
 
102
- ## Completion: Create PR
200
+ ### 5.5 Phase 5 exit checklist(iteration-drive Done)
103
201
 
104
- **Precondition(HARD)**: Phase 3 complete — §3.5 exit checklist `[x]`;compass YAML `status: completed` + `end_date`;compound Phase 6 索引已登记(或已记录无可结晶原因)。**不满足 → 禁止开 PR。**
202
+ **`mstar-iteration` §5.2** 对齐;打印 checklist 并全 `[x]` 后结束本 command:
105
203
 
106
- All iteration-close changes committed to integration branch:
204
+ - [ ] PR mergeable(无 blocking merge conflicts)
205
+ - [ ] All **required** CI checks green on latest head
206
+ - [ ] All review threads **resolved**(或用户书面 waive 特定 thread)
207
+ - [ ] Greptile **5/5**(若运行了 greploop mode,或 repo 启用 Greptile 且 PR 上可见分数)
208
+ - [ ] §5.3 comment + resolve 已完成于本轮所有 addressed reviews
209
+ - [ ] Host todo `phase-5-pr-merge-ready` 可勾选
107
210
 
108
- - Resolve PR target: `status.json` `metadata.target_branch`(fallback:compass frontmatter `target_branch`)
109
- - If missing → **stop and ask**; never default `main` / `master`
110
- - Create PR: `spec_integration_branch` → `target_branch`
111
- - Report summary: plans completed, compound round(结晶文档数), target branch, PR link
211
+ **Then** report: iteration id, plans completed, compound summary, PR link, merge-ready evidence(CI snapshot + review resolution + Greptile if applicable).
112
212
 
113
- PR 合并后(babysit loop 或手动),本次迭代完整结束。
213
+ PR merge itself may still be manual or a separate host action unless user authorized auto-merge.
@@ -64,9 +64,13 @@ Explore candidate directions targeting **product completeness**:
64
64
  - Allow substantive refactoring where it accelerates product maturity
65
65
  - Scope 2–4 candidates, each with clear product-completeness goals and trade-offs
66
66
 
67
- ## 3. Lock Direction — grill-me
67
+ ## 3. Lock Direction — bundled `grill-me`
68
68
 
69
- Run the **grill-me skill** to stress-test candidate directions with the user:
69
+ This command bundles a **non-`mstar-*`** skill at `skills/grill-me/SKILL.md`. **Only this command step** references it — **do not** load it from `mstar-harness-core` or other `mstar-*` skills.
70
+
71
+ **Before this step:** Read `skills/grill-me/SKILL.md`.
72
+
73
+ Run **grill-me** to stress-test candidate directions with the user:
70
74
 
71
75
  - Walk through trade-offs for each candidate
72
76
  - Converge on a **single iteration direction** with shared understanding
@@ -0,0 +1,10 @@
1
+ ---
2
+ name: grill-me
3
+ description: Interview the user relentlessly about a plan or design until reaching shared understanding, resolving each branch of the decision tree. Use when user wants to stress-test a plan, get grilled on their design, or mentions "grill me".
4
+ ---
5
+
6
+ Interview me relentlessly about every aspect of this plan until we reach a shared understanding. Walk down each branch of the design tree, resolving dependencies between decisions one-by-one. For each question, provide your recommended answer.
7
+
8
+ Ask the questions one at a time.
9
+
10
+ If a question can be answered by exploring the codebase, explore the codebase instead.
@@ -26,7 +26,7 @@ description: DESIGN.md design system specification for Morning Star projects. Cr
26
26
 
27
27
  **YAML frontmatter is the SSOT for token values.** Colors, typography, spacing, rounded, and components live in the frontmatter as structured, machine-readable data. The Markdown body is supplementary documentation (rules, intent, usage guidance). When reading DESIGN.md, always parse the YAML frontmatter first; when writing, keep frontmatter and body in sync.
28
28
 
29
- **Out of scope:** rendered UI artifacts (use Open Design MCP `user-open-design`); frontend implementation that consumes DESIGN.md tokens (use `@frontend-dev` / `@fullstack-dev`); QC review verdict rules (→ **`mstar-review-qc`**).
29
+ **Out of scope:** rendered UI preview tooling outside the repo; frontend implementation that consumes DESIGN.md tokens (use `@frontend-dev` / `@fullstack-dev`); QC review verdict rules (→ **`mstar-review-qc`**).
30
30
 
31
31
  ## Location
32
32
 
@@ -129,14 +129,6 @@ gray-1000: #000 gray-1000: #eee
129
129
  - Token names are the **SSOT interface** — consumers reference tokens by name, not raw values
130
130
  - `references/design-md-spec.md` § Light/Dark rules defines the contract
131
131
 
132
- ## Open Design integration
133
-
134
- If `user-open-design` MCP is available:
135
- - DESIGN.md is the **design intent** (tokens + rules)
136
- - Open Design manages **rendered artifacts** (HTML/CSS/JSX previews)
137
- - When DESIGN.md is updated, recommend syncing the Open Design project to reflect new tokens
138
- - DESIGN.md does not replace Open Design; they are complementary
139
-
140
132
  ## References
141
133
 
142
134
  - `references/design-md-spec.md` — normative spec: section definitions, token naming conventions, light/dark contract
@@ -11,7 +11,13 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
11
11
 
12
12
  - 凡 **`mstar-*`**(`name` ≠ `mstar-harness-core`)假定读者**已 Read 本 skill**。
13
13
  - **仅读专题、未读核心** → 未完成 harness 加载。
14
- - 各专题 SKILL.md 含 **Load order**;按 **`mstar-roles`** 角色矩阵按需加载,**禁止**为「保险」通读全部专题。
14
+ - 各专题 SKILL.md 含 **Load order**;按 **`mstar-harness-core`** 专题 skill 索引 + 角色 load contract 按需加载,**禁止**为「保险」通读全部专题。
15
+
16
+ ## Standalone harness(`mstar-*` 自洽)
17
+
18
+ - **`mstar-*` skill 体系**在本仓库内自洽运行:正文与 load order **不得**依赖仓库外的 skills、CLI、或 MCP 服务。
19
+ - **Commands**(如 `/iteration-start`)可引用本仓库 bundled、**非 `mstar-*`** 的辅助资产(例如 `skills/grill-me/`);该引用**仅**存在于 command 层,**不**进入 `mstar-*` 专题索引或 load matrix。
20
+ - 框架/SDK/API 问题:先 Read/Grep 项目内文档与源码;不将第三方文档工具写入 `mstar-*` 必读路径。
15
21
 
16
22
  ## 信息源优先级
17
23
 
@@ -26,14 +32,14 @@ description: Morning Star (启明星) harness **强制全局入口** —— 信
26
32
 
27
33
  **per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement` → QC 三审 + QA → Done。阶段细则 → **`mstar-phase-gates`**。
28
34
 
29
- **迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close(含知识结晶 `mstar-compound`)`。细则 → **`mstar-iteration`**。
35
+ **迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close → PR delivery → PR merge-ready loop`。细则 → **`mstar-iteration`**。
30
36
 
31
37
  ## 加载约定(强制)
32
38
 
33
39
  | 角色 | 始终 | 按任务追加(典型) |
34
40
  |------|------|-------------------|
35
41
  | **全部** | 本 skill | — |
36
- | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);新建/大改 skill 时 `mstar-skill-authoring`;迭代管理 `mstar-iteration`(Phase 1–3 含 compound);战略性工作 `mstar-strategy`。**不**读 `mstar-coding-behavior` |
42
+ | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-plan-conventions`、`mstar-roles`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/reports `mstar-plan-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);新建/大改 skill 时 `mstar-skill-authoring`;迭代管理 `mstar-iteration`(Phase 1–5);战略性工作 `mstar-strategy`。**不**读 `mstar-coding-behavior` |
37
43
  | **实现/审查/QA/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-plan-conventions`(路径符号节);QC/QA:`mstar-review-qc`;改 status/residual:`mstar-plan-artifacts`;UI 任务:`mstar-design-md`(读取 DESIGN.md tokens);写入知识库 `{KNOWLEDGE_DIR}`:`mstar-compound`(PM 触发) |
38
44
  | **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
39
45
 
@@ -81,7 +87,7 @@ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
81
87
  |-------|------|
82
88
  | `mstar-harness-core` | 本文件:入口、状态机、Task category、explore、索引、护栏 |
83
89
  | `mstar-phase-gates` | per-plan 双阶段门禁:Prepare/Execute、意图门禁、hotfix、可验证编辑 |
84
- | `mstar-iteration` | 迭代管理:iteration-start(锁定范围/Roadmap)、Phase 2 Autonomous Execute(per-plan 派发循环:分支→实现→QC→QA→Done→合并)、iteration-close(收口 compound、更新 roadmap) |
90
+ | `mstar-iteration` | 迭代管理:Phase 1–5(start / Autonomous Execute / iteration-close / PR delivery / PR merge-ready loop) |
85
91
  | `mstar-dispatch-gates` | 派发、Delegation、反递归、并行 invoke、QC 同消息三审 |
86
92
  | `mstar-branch-worktree` | 功能分支、worktree、QC/QA 检出对齐 |
87
93
  | `mstar-plan-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec 分支模型摘要、产物路径 SSOT |
@@ -117,9 +123,9 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
117
123
  - plan-writing artifacts land in `{PLAN_DIR}`, not external default plan directories.
118
124
  - PM Assignment 键名英文;任务正文可中文;产出/报告默认英文。
119
125
 
120
- ## 库文档(Context7)
126
+ ## 库文档 / API 问题
121
127
 
122
- 框架/SDK/API 问题 → **`references/library-docs-protocol.md`**(MCP 优先,CLI 兜底,禁双跑)。
128
+ 先 Read/Grep 项目内文档、规格与源码;仍不确定时再向用户澄清。**不**将第三方 MCP/CLI 文档工具写入 `mstar-*` load order。
123
129
 
124
130
  ## 升级触发
125
131
 
@@ -142,17 +148,20 @@ Read **`mstar-host`** after this skill; detect host per its table, then Read the
142
148
  | Phase 1 review chain 未完成即 commit | `mstar-iteration` §1.6;PM 代做专业角色编辑;或三角色并行派发 |
143
149
  | Phase 2 paste-only / PM 自实现 | `mstar-dispatch-gates` |
144
150
  | Phase 3 折叠进 final plan closure / 跳过 §3.1 gate | `mstar-iteration` §3.0–§3.5 |
151
+ | Phase 4 开 PR 后跳过 merge-ready loop | `mstar-iteration` §5 |
145
152
  | iteration-close 无 frontmatter completed / 漏 compound Phase 6 | `mstar-iteration` §3.0.5、§3.4、§3.2 #5 |
146
153
  | iteration 默认 `main` 作 base 或 PR 目标 | `mstar-iteration` §1.2、§2.3;`mstar-plan-conventions` Spec 分支模型 |
147
154
 
148
- ## 可选:OpenViking Memory
149
-
150
- 会话有 **`memsearch`** 工具时 Read **`references/openviking-memory-plugin.md`**。
155
+ ## 常见 harness 说法对照(帮助理解角色分工)
151
156
 
152
- ## References(保留在 core)
157
+ | 常见说法 | 本仓库实体 |
158
+ |----------|------------|
159
+ | 总编排 | `@project-manager` |
160
+ | 规划/访谈 | `@product-manager` / `@architect` + Prepare 阶段 |
161
+ | category 路由 | **`Task category`** + 路由表 + 子代理选择 |
162
+ | 持续推进 / 不半途而废 | Phase Gate + Todo/`tasks` + 验证门禁 |
163
+ | 行级哈希锚定编辑 | 以 **读后再改 + 小步 Patch** 纪律落实(`mstar-phase-gates`) |
153
164
 
154
- - `references/open-harness-principles.md` 理念与分层 `AGENTS.md`
155
- - `references/library-docs-protocol.md` — Context7
156
- - `references/openviking-memory-plugin.md` — 条件加载
165
+ 项目根 **`AGENTS.md` 写什么、分层 bootstrap** → **`mstar-plan-conventions`** `references/harness-bootstrap-and-agents-layering.md`(勿在 core 重复长文)。
157
166
 
158
167
  **专题 skill**(规则在各自 `SKILL.md`):`mstar-phase-gates`、`mstar-branch-worktree`、`mstar-plan-artifacts` 等 — 见上表索引。
@@ -37,10 +37,6 @@ Use **capability signals** (not filesystem paths):
37
37
 
38
38
  When PM dispatches **N >= 2** concurrent assignees (QC tri-review, dual-track implement, etc.) and the host exposes actual invoke / Task / subagent tools, read **`references/parallel-dispatch.md`** in the dispatch round (shared with `mstar-dispatch-gates`). Without a callable invoke tool when dispatch is required → **`Blocked`**; Assignment Markdown alone is not dispatch.
39
39
 
40
- ## Library docs (Context7)
41
-
42
- Follow `mstar-harness-core` → `references/library-docs-protocol.md`.
43
-
44
40
  ## Conflict order
45
41
 
46
42
  1. User explicit instructions (this turn)
@@ -36,22 +36,9 @@ Use host subagent / Task / equivalent per **`parallel-dispatch.md`**. OpenCode P
36
36
  - Large unrelated platform injections (e.g. long ecosystem prompts): prefer on-demand / `alwaysApply: false` when not stack-relevant.
37
37
  - One default channel per capability class (search, docs).
38
38
 
39
- ## Optional MCPs / skills (user-enabled)
40
-
41
- Aligned with `mstar-harness-core` `references/open-harness-principles.md`. Editing global `opencode.json` requires explicit user consent.
42
-
43
- | Capability | Purpose | Notes |
44
- |------|------|------|
45
- | **Current docs** | Versioned API/libs | Context7-like MCP or equivalent |
46
- | **Web search** | Time-sensitive / migrations | Avoid duplicate search MCPs |
47
- | **Code pattern search** | Cross-repo references | e.g. grep.app MCP |
48
- | **Repo graph** | Impact / PR risk | e.g. GitNexus |
49
- | **Browser / E2E** | Observable QA evidence | agent-browser, Playwright |
50
- | **Git workflow** | Atomic commits, branch closure | git-commit, finishing-a-development-branch |
51
- | **Systematic debugging** | RCA before fix | `mstar-coding-behavior` |
52
- | **OpenViking memory** | Long-term memory tools | Only if `memsearch` present; `openviking-memory-plugin.md` |
53
-
54
- **Not recommended**: overlapping search MCPs; extra tools to mask missing harness baseline.
39
+ ## Standalone harness note
40
+
41
+ Bundled **`mstar-*` skills** are self-contained in this repository. User-installed host MCPs, external skills, or CLIs are **outside harness SSOT** do not add them to `mstar-*` load order or treat them as required for gates.
55
42
 
56
43
  ## Maintenance boundary
57
44
 
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-iteration
3
- description: Morning Star 迭代管理 —— iteration-start(显式 `iteration_base_branch` / `target_branch`、Review & Edit chain 硬门禁)、Autonomous Execute(per-plan 派发;禁止默认 `main`)、iteration-close(独立 Phase gate)。compass:`{ITERATION_DIR}/`;分支 SSOT:`status.json` metadata + compass frontmatter。
3
+ description: Morning Star 迭代管理 —— iteration-startAutonomous Execute、iteration-close、PR 交付(Phase 4)、PR merge-ready loop(Phase 5)。显式分支策略;compass `{ITERATION_DIR}/`;分支 SSOT:`status.json` metadata + compass frontmatter。
4
4
  ---
5
5
 
6
6
  # mstar-iteration(迭代管理)
@@ -13,26 +13,36 @@ description: Morning Star 迭代管理 —— iteration-start(显式 `iteratio
13
13
 
14
14
  mstar 实践模式通常是:一次迭代锁定几个 spec 点(`specify + clarify`),产生多个 `plan`,每个 plan 含多个 tasks。**per-plan 生命周期有完整的闭环**(Prepare → Execute → QC → Done)。Compound 不是 per-plan 活动——它是**迭代级收口**,在迭代内所有 plan Done 后,沉淀一轮知识。
15
15
 
16
- 本 skill 管理三个迭代节点:
16
+ 本 skill 管理迭代 **Phase 1–5**(command 层可聚合编排,但 **不得**反向引用 command 名;第三方 helper 仅由 command 按需发现):
17
17
 
18
18
  ```
19
- iteration-start [per-plan lifecycle × N] → iteration-close → PR → merge
20
- │ │
21
- 锁定范围、创建 compass │ compound、更新 roadmap
22
- │ Review & Edit chain → PM lock │ 标记迭代完成
23
- 创建 integration 分支 │ commit 到 integration 分支
24
- │ │
25
- └──────── Phase 2(Autonomous Execute)────────┘
19
+ Phase 1: iteration-start
20
+
21
+ Phase 2: Autonomous Execute —— [per-plan lifecycle × N]
22
+
23
+ Phase 3: iteration-close
24
+
25
+ Phase 4: PR delivery(开 PR)
26
+
27
+ Phase 5: PR merge-ready loop —— 至 mergeable + CI 全绿 + reviews resolved
28
+
29
+ 迭代交付完成
26
30
  ```
27
31
 
28
- **关键定位**:Phase 3 iteration-close 是 **Autonomous Execute 之后的独立 Phase**,在 integration 分支上执行,**完成后再创建 PR**。所有 compound 产物(knowledge docs、compass 更新、CONCEPTS.md)作为迭代交付的一部分随 PR 合入已记录的 `target_branch`。一次迭代 = 一个 PR。
32
+ **关键定位**:
33
+
34
+ - **Phase 3** 在 integration 分支收口 compound / roadmap;**开 PR(Phase 4)≠ 迭代交付完成**。
35
+ - **Phase 5** 是 **merge-ready loop**:修复 → push → 再验证,直至 §5.5 exit。**Loop 理念 SSOT 在本 skill**;宿主 command 可叠加额外 helper,但不写入 `mstar-*` load order。
36
+ - 一次迭代 = 一个 PR;compound 产物随 PR 合入 `metadata.target_branch`。
29
37
 
30
38
  ## Phase transition gates(HARD — 防跳步)
31
39
 
32
40
  | 边界 | 触发 | 必须 | 禁止 |
33
41
  |------|------|------|------|
34
- | **→ Phase 3** | `status.json` 中 compass 登记的全部 plan 均为 `Done` | 打印 `## Phase 3: iteration-close`;执行 §3.0→§3.5;host todo `phase-3-iteration-close` 保持 open 直至 §3.5 | 开 PR;宣称 iteration 完成;仅依赖 final plan closure |
35
- | **→ PR** | §3.5 exit checklist 全 `[x]`;frontmatter `status: completed` + `end_date` | commit integration 分支 PR 到 `metadata.target_branch` | 跳过 §3.1 entry checklist 或 compound Phase 6 |
42
+ | **→ Phase 3** | `status.json` 中 compass 登记的全部 plan 均为 `Done` | 打印 `## Phase 3: iteration-close`;执行 §3.0→§3.5;host todo `phase-3-iteration-close` 保持 open 直至 §3.5 | 开 PR;宣称迭代交付完成;仅依赖 final plan closure |
43
+ | **→ Phase 4** | §3.5 exit checklist 全 `[x]`;frontmatter `status: completed` + `end_date` | 打印 `## Phase 4: PR delivery`;开 PR 到 `metadata.target_branch`(§4) | 跳过 §3.1 entry checklist 或 compound Phase 6 |
44
+ | **→ Phase 5** | Phase 4 PR 已创建 | 打印 `## Phase 5: PR merge-ready`;执行 §5 loop 至 §5.5 exit | 开 PR 后停止;跳过 review resolve / CI loop |
45
+ | **→ 迭代交付完成** | §5.5 exit checklist 全 `[x]` | PR mergeable;required CI 全绿;reviews resolved | Phase 4 开 PR 即宣称完成 |
36
46
  | **iteration-start → integration branch** | §1.6 Review & Edit chain | 三角色 **按序** invoke 完成 + compass `status: locked` | PM 线程代做三角色编辑;并行三角色;review 前 commit |
37
47
 
38
48
  **误判信号**:对话里出现 compound 摘要、roadmap 更新、或「所有 plan 已完成」但 **未** 打印 §3.1 / §3.5 checklist → 视为 **Phase 3 未执行**,回到 §3.0。
@@ -74,6 +84,8 @@ PM 在新迭代启动时执行。
74
84
 
75
85
  **Branch policy gate**:若用户、现有 roadmap、或项目约定未明确 `iteration_base_branch` / `target_branch`,PM 必须检查当前分支并向用户确认。**不得**因为存在 `main` / `master` 就默认从默认分支开 iteration 或向默认分支提 PR。
76
86
 
87
+ **Direction lock**:compass/plans 初稿落盘前,PM 须与用户逐问收敛**单一**迭代方向、成功标准、非目标,并确认 delivery branch policy;决策写入 compass `## Scope` / `## Acceptance Criteria` / `## Non-Goals` 与 Delivery Branch Policy。
88
+
77
89
  ### 1.3 创建迭代 compass
78
90
 
79
91
  写入 `{ITERATION_DIR}/<iteration-id>-delivery-compass.md`。**必须**使用 `references/iteration-compass-template.md` 完整结构(YAML frontmatter + `## Roadmap Position` + close 占位节)。`end_date` 仅在 iteration-close 填入;禁止用正文 completion prose 替代 frontmatter `status`。
@@ -179,7 +191,7 @@ compass frontmatter 的 `iteration_base_branch` / `target_branch` **必须与**
179
191
 
180
192
  | Host | 工具 | 最小集合 |
181
193
  |------|------|---------|
182
- | **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/QA);分支 checkpoint;**仅剩 1 个非 Done plan 时追加 `phase-3-iteration-close`**(Done 后保持 open 直至 §3.5) |
194
+ | **Cursor** | `TodoWrite` / CreatePlan todos | 当前 `plan_id`;下一批 gates(implement/QC/QA);分支 checkpoint;**仅剩 1 个非 Done plan 时追加 `phase-3-iteration-close`**(open 直至 §3.5);Phase 4 后 **`phase-5-pr-merge-ready`**(open 直至 §5.5) |
183
195
  | **Codex** | `update_plan` / Goal UI | 同上 |
184
196
  | **OpenCode** | host todo/plan UI(如有) | 同上 |
185
197
 
@@ -332,7 +344,7 @@ PM 触发 `mstar-compound`(可批量):
332
344
 
333
345
  **Precondition**: §3.1 checklist `[x]`;§3.4 frontmatter `completed` + `end_date` 已写。
334
346
 
335
- PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git commit` / 开 PR:
347
+ PM 打印 **iteration-close exit checklist**;全部为 `[x]` 后方可 `git commit`;然后进入 **Phase 4**(§4):
336
348
 
337
349
  - [ ] §3.1 前置 gate 已打印并满足
338
350
  - [ ] §3.2 compound 完成;新增 knowledge doc 均已登记 `{KNOWLEDGE_DIR}/README.md`(或已记录无可结晶原因)
@@ -357,6 +369,55 @@ PR 目标使用 root `metadata.target_branch`;缺失时停止并补齐,不
357
369
 
358
370
  ---
359
371
 
372
+ ## Phase 4: PR delivery(开 PR)
373
+
374
+ **Precondition**: Phase 3 §3.5 exit 全 `[x]`;close commit 已 push 到 `spec_integration_branch`。
375
+
376
+ 1. 打印 **`## Phase 4: PR delivery`**
377
+ 2. Resolve target:`metadata.target_branch`(compass frontmatter 镜像);缺失 → **STOP**,问用户
378
+ 3. 创建 PR:`spec_integration_branch` → `target_branch`
379
+ 4. 记录 PR URL / number(Phase 5 会话 SSOT)
380
+ 5. **Immediately** 进入 **Phase 5** — **Phase 4 exit ≠ 迭代交付完成**
381
+
382
+ ---
383
+
384
+ ## Phase 5: PR merge-ready loop
385
+
386
+ **Precondition**: Phase 4 PR 已创建且 head = `spec_integration_branch`。
387
+
388
+ **Loop 理念**(mstar SSOT):PR 开完后进入 **验证—修复—再验证** 循环,直至 PR 可合并。与 Phase 2 per-plan loop 类似,但对象是 **PR 级** merge 门禁(CI、review、冲突),不是 plan 实现。
389
+
390
+ ### 5.0 Phase boundary
391
+
392
+ - Phase 5 在 PR head(`spec_integration_branch`)上 push 修复;**禁止**另开替代分支
393
+ - 产品代码修复 → PM **dispatch** dev/ops(`mstar-dispatch-gates`);PM 线程不代写实现
394
+ - 禁止为「让 CI 变绿」而改 workflow,除非用户明确授权
395
+
396
+ ### 5.1 Loop(repeat until §5.5 exit)
397
+
398
+ 1. **Status** — PR mergeable?required CI?unresolved review threads?
399
+ 2. **Merge conflicts** — blocking 则在 integration 分支解决 → push(意图冲突 → **Blocked**)
400
+ 3. **Reviews** — fetch unresolved threads;triage;dispatch 修复 → push
401
+ 4. **CI** — 失败项在 PR 范围内修复 → push
402
+ 5. **Review fix hygiene**(每次因 review 而 push 后):
403
+ - 在同 thread **comment**(改动 + 验证)
404
+ - **Resolve** when addressed
405
+ 6. Return to step 1
406
+
407
+ ### 5.2 Phase 5 exit checklist(迭代交付完成)
408
+
409
+ 打印 **`## Phase 5 exit checklist`**;全 `[x]` 后方可宣称 **迭代交付完成**:
410
+
411
+ - [ ] PR mergeable(无 blocking merge conflicts)
412
+ - [ ] All **required** CI checks green on latest head
413
+ - [ ] All review threads **resolved**(或用户书面 waive 特定 thread)
414
+ - [ ] §5.1 review comment + resolve 已覆盖本轮所有 addressed feedback
415
+ - [ ] Host todo `phase-5-pr-merge-ready` 可勾选
416
+
417
+ PR **merge** 本身可仍由用户手动执行,除非 Assignment 明确授权 auto-merge。
418
+
419
+ ---
420
+
360
421
  ## 迭代 compass 模板
361
422
 
362
423
  完整模板见 `references/iteration-compass-template.md`。
@@ -386,3 +447,5 @@ PR 目标使用 root `metadata.target_branch`;缺失时停止并补齐,不
386
447
  - 不要用 prose completion status 替代 compass frontmatter `status: completed` + `end_date`
387
448
  - 不要跳过 compound Phase 6(`{KNOWLEDGE_DIR}/README.md` 索引)——即使只结晶一篇文档
388
449
  - 不要跳过 compound——如果本迭代确实没有可结晶的知识,在 compass `## Compound Round Summary` 写 `无可结晶知识(原因:<简述>)`
450
+ - 不要将 **Phase 4 开 PR** 等同于 **迭代交付完成** — 必须完成 **Phase 5** §5.5 merge-ready loop
451
+ - 不要在 Phase 5 跳过 review comment + resolve 纪律(§5.1 step 5)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: mstar-roles
3
- description: Morning Star role prompt hub — `agents/*.md` shells plus full behavior in `references/*.md`, each with a **Required Skill Dependencies** list (which `mstar-*` topic skills to load after `mstar-harness-core`). Always load for any Morning Star role (`project-manager`, `product-manager`, `architect`, `fullstack-dev`, `fullstack-dev-2`, `frontend-dev`, `qa-engineer`, `qc-specialist*`, `ops-engineer`, `writing-specialist`, `prompt-engineer`). Cross-role summary table in this SKILL.md; per-role lists are authoritative for that role's session.
3
+ description: Morning Star role prompt hub — `agents/*.md` shells plus full behavior in `references/*.md`, each with a **Required Skill Dependencies** list (which `mstar-*` topic skills to load after `mstar-harness-core`). Always load for any Morning Star role (`project-manager`, `product-manager`, `architect`, `fullstack-dev`, `fullstack-dev-2`, `frontend-dev`, `qa-engineer`, `qc-specialist*`, `ops-engineer`, `writing-specialist`, `prompt-engineer`). Cross-role **Role → typical topic skills** summary in this SKILL.md; per-role lists in `references/*.md` are authoritative for that role's session. Full topic skill index → **`mstar-harness-core`**.
4
4
  ---
5
5
 
6
6
  ## Load Order (Required)
@@ -33,28 +33,6 @@ If any conflict appears, `mstar-harness-core` remains the authoritative source f
33
33
  | `writing-specialist` | `references/writing-specialist.md` | — |
34
34
  | `prompt-engineer` | `references/prompt-engineer.md` | — |
35
35
 
36
- ## Shared Skill Dependencies
37
-
38
- Treat these as baseline dependencies **where the role touches implementation, review, verification, or ops execution** (see `mstar-harness-core` load contract). Load **on demand**, not as a fixed bundle.
39
-
40
- | Skill | Use when task involves |
41
- | --- | --- |
42
- | `mstar-harness-core` | **Always** (non-trivial work): entry, state machine, Task category, explore boundary, skill index |
43
- | `mstar-phase-gates` | Prepare/Execute gates, clarify, hotfix path, intention gate |
44
- | `mstar-dispatch-gates` | PM dispatch; **all leaf executors** before any Task/subagent call |
45
- | `mstar-branch-worktree` | Git write, parallel worktrees, QC/QA checkout fields |
46
- | `mstar-plan-conventions` | `{HARNESS_DIR}` discovery, init, Spec branch naming, plan-writing path gate |
47
- | `mstar-plan-artifacts` | Main plan, `reports/`, `status.json`, residual, knowledge/iteration, Done compaction |
48
- | `mstar-design-md` | DESIGN.md design system spec — create/audit/maintain tokens, completeness checklist, light/dark dual-theme |
49
- | `mstar-review-qc` | QC workflow, template, verdict, high-risk checks |
50
- | `mstar-coding-behavior` | Implementation/debug/refactor/review-feedback handling (**not** PM orchestration-only) |
51
- | `mstar-skill-authoring` | New skills, major skill rewrites, trigger descriptions, behavior-shaping skill validation |
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 |
56
- | `mstar-host` | Host-specific behavior (auto-detect; `references/opencode.md` / `cursor.md` / `codex.md`) |
57
-
58
36
  ### Role → typical topic skills (after `mstar-harness-core`)
59
37
 
60
38
  | Role | Typical adds |
@@ -51,7 +51,7 @@ If any item below matches, **stop** and return `Blocked` to `project-manager` in
51
51
  When creating a new skill, making a major skill rewrite, changing frontmatter `description`, or changing behavior-shaping skill text:
52
52
 
53
53
  1. MUST read `mstar-skill-authoring` before editing.
54
- 2. MUST follow the repository `skill-creator` requirement when the change is a new skill or major rewrite.
54
+ 2. MUST follow the repository **`skill-creator`** requirement when the change is a new skill or major rewrite (`AGENTS.md` → Skill-Creator Requirement).
55
55
  3. MUST include validation evidence for behavior-shaping changes, or explicitly state why only manual/search validation is practical.
56
56
 
57
57
  ## Prompt Change Minimal Checklist
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "0.7.6",
3
+ "version": "0.7.8",
4
4
  "description": "Morning Star harness OpenCode plugin (skills bootstrap and agent loading).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -1,35 +0,0 @@
1
- # Context7 Library Docs Protocol (Shared)
2
-
3
- This protocol is shared by all hosts in Morning Star. Host adapter skills should consume this section, not redefine it.
4
-
5
- ## When to use
6
-
7
- - The question is about library/framework/SDK/CLI/cloud API syntax, config options, migration behavior, or version-specific usage.
8
- - The answer quality depends on current docs rather than model memory.
9
-
10
- ## When not to use
11
-
12
- - Pure refactoring strategy.
13
- - Writing scripts from scratch without external API dependence.
14
- - Business logic debugging not tied to third-party docs.
15
- - Generic programming concepts.
16
- - PR/code review judgment.
17
-
18
- ## Single-path policy
19
-
20
- Use one path per question. Do not run MCP and CLI in parallel for the same library/question pair.
21
-
22
- 1. **Primary path: Context7 MCP (if available)**
23
- - Read tool schema first.
24
- - Query with the user's full question.
25
- - Prefer versioned library IDs when version is known.
26
- 2. **Fallback path: ctx7 CLI (only if MCP unavailable/fails)**
27
- - `npx ctx7@latest library <name> "<user question>"`
28
- - `npx ctx7@latest docs <libraryId> "<user question>"`
29
- - Max 3 commands per question.
30
-
31
- ## Guardrails
32
-
33
- - Never include secrets in commands or queries.
34
- - Switch to fallback only after primary path fails.
35
- - Report uncertainty when docs retrieval fails on both paths.
@@ -1,76 +0,0 @@
1
- # 开源 Agent Harness 理念(Morning Star)
2
-
3
- ## 定位
4
-
5
- 本文归纳从公开 agent harness 实践中提炼的**流程理念**,并已写入 `mstar-harness-core`、`mstar-roles` skill 的 `project-manager` 角色 等,作为本配置的默认行为约定。
6
-
7
- ## 已内化的原则(执行时必须遵守)
8
-
9
- | 理念 | 含义 | 在本仓库的落点 |
10
- |------|------|----------------|
11
- | **意图优先于字面** | 先弄清「用户真正要达成什么」,再分类与分派 | `mstar-phase-gates` SKILL.md Prepare · `clarify` / `plan` 意图门禁;PM「第一性原理」 |
12
- | **先准备再实现** | 访谈式规划、锁范围、再写代码 | Prepare:`specify -> clarify -> plan`;Execute:`plan locked -> tasks -> implement` |
13
- | **`clarify` 核心纪律** | 逐方面核对至共享理解;沿设计决策树逐枝、一次一决;能探索代码库则先探索;每问带推荐答案 | **`mstar-phase-gates`** SKILL.md(含 Phase Gate Playbook) |
14
- | **按任务类别选能力与模型** | 视觉/深读/快改/硬逻辑等用不同强项 | `mstar-harness-core` SKILL.md「Task category」;Assignment 字段 **`Task category`**;宿主侧按角色配置 model(如 OpenCode 的 `opencode.json`) |
15
- | **可验证编辑** | 减少「凭记忆 Patch」导致的漂移与损坏 | `mstar-phase-gates` SKILL.md「可验证编辑与上下文纪律」:读后再改、失败则重读 |
16
- | **持续推进与可核对完成** | 长任务有清单、有关门证据,避免空转 | `mstar-phase-gates` / `mstar-review-qc`;实现侧自检见 `mstar-coding-behavior` |
17
- | **编码行为约束(轻量)** | 降低静默假设、过度设计与无关改动 | `mstar-coding-behavior`:Think Before Coding / Simplicity First / Surgical Changes / Goal-Driven Execution |
18
- | **并行与边界** | 多线任务不踩同一写归属、不绕过分支门禁;**开发**阶段同仓多可写并发须独立 **`git worktree`**;**QC / QA** 在 **同一检出**(`Review cwd`)与 **同一 `plan_id` + `Review range` / `Diff basis`** 上审查与验证,保证三票同一功能 | `mstar-branch-worktree`;`mstar-review-qc`;`mstar-dispatch-gates` |
19
- | **分层上下文(可选)** | 大仓库用目录级 `AGENTS.md` 降噪;根 `AGENTS.md` 维护边界见下文专节 | `mstar-harness-core` SKILL.md「分层上下文」;由业务项目维护者按需添加 |
20
- | **结构化澄清(按宿主)** | 向用户澄清/抉择时,**有 `question` 类能力则优先**;否则结构化正文;长问兜底 | `mstar-phase-gates` SKILL.md Prepare · `clarify`;当前宿主的 `mstar-host` skill;`mstar-roles` · `project-manager` |
21
-
22
- ## 与常见 harness 说法的对照(帮助理解角色分工)
23
-
24
- | 常见说法 | 本仓库实体 |
25
- |----------|------------|
26
- | 总编排 | `@project-manager` |
27
- | 规划/访谈 | `@product-manager` / `@architect` + Prepare 阶段 |
28
- | category 路由 | **`Task category`** + 路由表 + 子代理选择 |
29
- | 持续推进 / 不半途而废 | Phase Gate + Todo/`tasks` + 验证门禁 |
30
- | 行级哈希锚定编辑 | 本仓库以 **读后再改 + 小步 Patch** 纪律落实(见 `mstar-harness-core`) |
31
-
32
- ## 项目根 `AGENTS.md` 写什么、不写什么(建议)
33
-
34
- 业务仓库根目录(或分层中的目录级)`AGENTS.md` 适合承载:**长期有效的规则、技术栈约束、工作流门禁**;不宜承载易变状态或已另有 SSOT 的内容,以免双轨漂移。
35
-
36
- ### 宜放入
37
-
38
- - 技术栈与架构边界(变更时更新)
39
- - 开发与验证命令、目录布局、命名约定
40
- - 与 harness 对齐的**持久**规则(分支策略引用、**`{HARNESS_DIR}`** / **`{PLAN_DIR}`** 路径说明等)
41
-
42
- ### 不宜放入(应指向专门落点)
43
-
44
- | 内容 | 更合适的落点 |
45
- |------|----------------|
46
- | 详细计划状态、阻塞列表、当前 sprint 叙述 | `{HARNESS_DIR}/status.json`(及可选 `{HARNESS_DIR}/notes.json` 程序时间线) |
47
- | 规格正文、枚举定义、API 契约全文 | 项目约定的冻结规格目录(如 `docs/spec/`、`.agents/designs/...`,名称自定) |
48
- | 迭代/版本级 delivery compass、program 范围快照 | `{ITERATION_DIR}`(并维护索引 README,见 `mstar-plan-conventions`) |
49
- | 某一 plan 的评审稿、gap 分析、跨版本实施 SSOT | `{KNOWLEDGE_DIR}`(并维护索引 README,见 `mstar-plan-conventions`) |
50
- | 临时 workaround、仅本轮有效的结论 | 主 plan 文件或 knowledge,收口后提炼再考虑进 `AGENTS.md` |
51
-
52
- ### 更新前自检(避免污染单一权威)
53
-
54
- - 是否为**持久规则**,而非一两次性的当前状态?
55
- - 是否适用于**整个项目**,而非单个 plan?
56
- - 是否与冻结规格**重复**?若重复,应改为「引用路径」而非粘贴全文。
57
- - 是否其实属于 **`{HARNESS_DIR}/status.json`**(状态、门禁摘要、时间线)?
58
-
59
- ### 典型信息源层级(模板)
60
-
61
- 项目可自定义目录名;逻辑顺序常为:
62
-
63
- 1. **冻结规格 / 设计权威**(版本化、显式变更流程)
64
- 2. **根 `AGENTS.md`** — 项目级规则与约定
65
- 3. **`{HARNESS_DIR}/status.json`** — 当前执行状态与 open residual 的 SSOT
66
- 4. **`{ITERATION_DIR}`** — 迭代/版本级 compass(可选)
67
- 5. **`{KNOWLEDGE_DIR}`** — 支撑实施的上下文文档(可选)
68
-
69
- 若 `AGENTS.md` 与冻结规格冲突,**以规格为准**,并修订 `AGENTS.md` 对齐。细节分工与可到达性要求见 `mstar-plan-conventions`。
70
-
71
- ## 延伸阅读
72
-
73
- - 按能力选配 MCP/skills:OpenCode → `mstar-host` `references/opencode.md`;其它宿主见 `mstar-host` 检测表
74
- - Evidence and checkpoints: `mstar-phase-gates` / `mstar-review-qc`; implementation self-checks: `mstar-coding-behavior`
75
- - 库文档检索共享协议:`mstar-harness-core` `references/library-docs-protocol.md`
76
- - 跨角色编码行为准则(轻量、可复用):`mstar-coding-behavior`
@@ -1,45 +0,0 @@
1
- # OpenViking Memory Plugin (OpenCode, optional)
2
-
3
- This reference applies **only** when the current agent session exposes OpenViking tools (detection: **`memsearch`** is available in the tool list). It documents harness-aligned usage; implementation details follow the OpenCode plugin (for example `openviking-memory.ts` beside `openviking-config.json` under the user’s OpenCode plugins directory).
4
-
5
- ## What the plugin provides
6
-
7
- Typical tools (names match the reference plugin):
8
-
9
- | Tool | Purpose |
10
- | --- | --- |
11
- | `memsearch` | Unified semantic search over memories, resources, and skills (`mode`: `auto` / `fast` / `deep`). |
12
- | `memread` | Read a single item by `viking://` URI with progressive depth (`abstract` / `overview` / `read` / `auto`). |
13
- | `membrowse` | List / tree / stat views under a `viking://` prefix. |
14
- | `memcommit` | Trigger session commit / memory extraction for the mapped OpenViking session (optional mid-session). |
15
-
16
- **URI rule**: `memread` and `membrowse` require URIs starting with `viking://` (validated by the plugin).
17
-
18
- **Service dependency**: The plugin calls an OpenViking HTTP API (default `http://localhost:1933` unless overridden). If tools error with connection or health failures, treat memory as **unavailable** for this turn; do not block core harness gates on memory.
19
-
20
- **Auto features** (when enabled in plugin config): conversation capture, periodic auto-commit, and optional **auto-recall** injection (`<relevant-memories>` appended to the latest user message). Recall is best-effort and must not replace explicit search when you need traceable evidence.
21
-
22
- ## Harness alignment (mandatory)
23
-
24
- 1. **Subordinate to SSOT**: `mstar-harness-core` state machine, phase gates, branch/worktree rules, and QC/QA alignment **always** override any suggestion retrieved from memory. If memory conflicts with plan, `status.json`, or Assignment, **follow the written artifacts** and record the conflict in notes or Completion Report.
25
-
26
- 2. **No secrets in memory tools**: Do not paste API keys, tokens, or private credentials into `memsearch` queries or stored memories. Redact before commit-style operations.
27
-
28
- 3. **Evidence for claims**: Memory hits are **hints**, not proof. For library/API facts, still follow `references/library-docs-protocol.md` (Context7 MCP / ctx7) when the question depends on current docs.
29
-
30
- 4. **When to call `memsearch`**: Prefer early in a **new** task or thread when user preferences, prior decisions, or plan IDs may exist in OpenViking; after major clarify/plan changes, a fresh search can reduce stale context.
31
-
32
- 5. **`memread` after `memsearch`**: Use URIs from search results; escalate depth (`overview` → `read`) only when needed to avoid token burn.
33
-
34
- 6. **`memcommit`**: Use for explicit “persist now” or mid-session extraction when the user asks or when wrapping a milestone. Do **not** spam commits after every trivial edit; the plugin may already run **auto-commit** on an interval—respect that and user policy.
35
-
36
- 7. **Parallel / multi-agent**: Memory tools do **not** replace PM dispatch, worktree isolation, or QC tri-review invokes. They do not authorize subagent recursion.
37
-
38
- ## When **not** to rely on this reference
39
-
40
- - `memsearch` (and sibling tools) are **absent** → skip this file; no OpenViking rules apply.
41
- - Non-OpenCode hosts (unless they expose the same tool names with the same semantics) → ignore.
42
-
43
- ## Configuration (user-owned)
44
-
45
- Plugin reads `openviking-config.json` next to the plugin file and env vars such as `OPENVIKING_API_KEY`, `OPENVIKING_ACCOUNT`, `OPENVIKING_USER`. Agents must **not** edit user global config without explicit user consent (see `mstar-harness-core` guardrails).