@mstar-harness/omp 3.6.0-alpha.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/README.md +63 -0
  2. package/agents/architect.md +35 -0
  3. package/agents/code-reviewer.md +90 -0
  4. package/agents/frontend-dev.md +33 -0
  5. package/agents/fullstack-dev-2.md +33 -0
  6. package/agents/fullstack-dev.md +33 -0
  7. package/agents/ops-engineer.md +33 -0
  8. package/agents/product-manager.md +35 -0
  9. package/agents/project-manager.md +32 -0
  10. package/agents/prompt-engineer.md +33 -0
  11. package/agents/qa-engineer.md +35 -0
  12. package/agents/qc-specialist-2.md +62 -0
  13. package/agents/qc-specialist-3.md +62 -0
  14. package/agents/qc-specialist.md +62 -0
  15. package/agents/writing-specialist.md +35 -0
  16. package/assets/icon.png +0 -0
  17. package/assets/logo-dark.png +0 -0
  18. package/assets/logo-dark.svg +6 -0
  19. package/assets/logo.png +0 -0
  20. package/assets/logo.svg +6 -0
  21. package/commands/amazing-pr-review.md +31 -0
  22. package/commands/codebase-audit.md +40 -0
  23. package/commands/iteration-drive.md +48 -0
  24. package/commands/iteration-loop.md +99 -0
  25. package/commands/iteration-start.md +122 -0
  26. package/dist/hooks/pre/mstar-gates.js +6579 -0
  27. package/dist/tools/mstar_dispatch_validate/index.js +6291 -0
  28. package/dist/tools/mstar_iteration_gate/index.js +6321 -0
  29. package/dist/tools/mstar_lease_verify/index.js +6343 -0
  30. package/dist/tools/mstar_path_resolve/index.js +6297 -0
  31. package/dist/tools/mstar_status_validate/index.js +6402 -0
  32. package/dist/tools/mstar_worktree_check/index.js +6343 -0
  33. package/harness-agents/architect.md +35 -0
  34. package/harness-agents/code-reviewer.md +90 -0
  35. package/harness-agents/frontend-dev.md +33 -0
  36. package/harness-agents/fullstack-dev-2.md +33 -0
  37. package/harness-agents/fullstack-dev.md +33 -0
  38. package/harness-agents/ops-engineer.md +33 -0
  39. package/harness-agents/product-manager.md +35 -0
  40. package/harness-agents/project-manager.md +32 -0
  41. package/harness-agents/prompt-engineer.md +33 -0
  42. package/harness-agents/qa-engineer.md +35 -0
  43. package/harness-agents/qc-specialist-2.md +62 -0
  44. package/harness-agents/qc-specialist-3.md +62 -0
  45. package/harness-agents/qc-specialist.md +62 -0
  46. package/harness-agents/writing-specialist.md +35 -0
  47. package/harness-commands/amazing-pr-review.md +31 -0
  48. package/harness-commands/codebase-audit.md +40 -0
  49. package/harness-commands/iteration-drive.md +48 -0
  50. package/harness-commands/iteration-loop.md +99 -0
  51. package/harness-commands/iteration-start.md +122 -0
  52. package/harness-skills/grill-me/SKILL.md +10 -0
  53. package/harness-skills/mstar-artifacts/SKILL.md +66 -0
  54. package/harness-skills/mstar-artifacts/references/knowledge-and-designs.md +110 -0
  55. package/harness-skills/mstar-artifacts/references/plan-files-and-reports.md +98 -0
  56. package/harness-skills/mstar-artifacts/references/plan-quality-bar.md +99 -0
  57. package/harness-skills/mstar-artifacts/references/status-and-residuals.md +472 -0
  58. package/harness-skills/mstar-artifacts/templates/README.md +7 -0
  59. package/harness-skills/mstar-artifacts/templates/plan.main.md +54 -0
  60. package/harness-skills/mstar-artifacts/templates/status.empty.json +5 -0
  61. package/harness-skills/mstar-audit/SKILL.md +151 -0
  62. package/harness-skills/mstar-audit/references/audit-playbook.md +175 -0
  63. package/harness-skills/mstar-audit/references/codebase-audit.md +103 -0
  64. package/harness-skills/mstar-audit/references/finding-format.md +69 -0
  65. package/harness-skills/mstar-audit/references/pr-review-seat-evidence.md +28 -0
  66. package/harness-skills/mstar-audit/references/pr-review.md +475 -0
  67. package/harness-skills/mstar-audit/references/security-review.md +219 -0
  68. package/harness-skills/mstar-branch-worktree/SKILL.md +236 -0
  69. package/harness-skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
  70. package/harness-skills/mstar-coding-behavior/SKILL.md +167 -0
  71. package/harness-skills/mstar-compound/SKILL.md +109 -0
  72. package/harness-skills/mstar-compound/assets/resolution-template.md +94 -0
  73. package/harness-skills/mstar-compound/references/category-mapping.md +37 -0
  74. package/harness-skills/mstar-compound/references/compound-workflow.md +171 -0
  75. package/harness-skills/mstar-compound/references/concepts-vocabulary.md +44 -0
  76. package/harness-skills/mstar-compound/references/schema.yaml +122 -0
  77. package/harness-skills/mstar-compound-refresh/SKILL.md +154 -0
  78. package/harness-skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
  79. package/harness-skills/mstar-conventions/SKILL.md +215 -0
  80. package/harness-skills/mstar-conventions/references/artifact-storage-paths.md +53 -0
  81. package/harness-skills/mstar-conventions/references/effort-estimation.md +38 -0
  82. package/harness-skills/mstar-conventions/references/harness-bootstrap-and-agents-layering.md +96 -0
  83. package/harness-skills/mstar-design-md/SKILL.md +142 -0
  84. package/harness-skills/mstar-design-md/references/completeness-checklist.md +181 -0
  85. package/harness-skills/mstar-design-md/references/design-md-spec.md +508 -0
  86. package/harness-skills/mstar-design-md/references/vercel-example.md +200 -0
  87. package/harness-skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
  88. package/harness-skills/mstar-design-md/templates/DESIGN.md.template +474 -0
  89. package/harness-skills/mstar-dispatch-gates/SKILL.md +134 -0
  90. package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
  91. package/harness-skills/mstar-engine-legacy/SKILL.md +53 -0
  92. package/harness-skills/mstar-engine-legacy/references/anti-recursion-checklists.md +58 -0
  93. package/harness-skills/mstar-engine-legacy/references/engine-check-boilerplate.md +26 -0
  94. package/harness-skills/mstar-engine-legacy/references/lease-protocol.md +92 -0
  95. package/harness-skills/mstar-engine-legacy/references/qc-seat-n-restatements.md +57 -0
  96. package/harness-skills/mstar-engine-legacy/references/status-field-history.md +186 -0
  97. package/harness-skills/mstar-harness-core/SKILL.md +196 -0
  98. package/harness-skills/mstar-host/SKILL.md +96 -0
  99. package/harness-skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
  100. package/harness-skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
  101. package/harness-skills/mstar-host/references/codex.md +61 -0
  102. package/harness-skills/mstar-host/references/cursor-plan-mode-bridge.md +170 -0
  103. package/harness-skills/mstar-host/references/cursor.md +183 -0
  104. package/harness-skills/mstar-host/references/dsh.md +507 -0
  105. package/harness-skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
  106. package/harness-skills/mstar-host/references/kimi.md +136 -0
  107. package/harness-skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
  108. package/harness-skills/mstar-host/references/omp.md +245 -0
  109. package/harness-skills/mstar-host/references/opencode.md +76 -0
  110. package/harness-skills/mstar-host/references/parallel-dispatch.md +68 -0
  111. package/harness-skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
  112. package/harness-skills/mstar-host/references/zcode.md +129 -0
  113. package/harness-skills/mstar-iteration/SKILL.md +408 -0
  114. package/harness-skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
  115. package/harness-skills/mstar-iteration/references/command-shared-invariants.md +62 -0
  116. package/harness-skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
  117. package/harness-skills/mstar-iteration/references/iteration-compass-template.md +142 -0
  118. package/harness-skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
  119. package/harness-skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
  120. package/harness-skills/mstar-iteration/references/phase-2-worktree-lease.md +205 -0
  121. package/harness-skills/mstar-iteration/references/phase-3-iteration-close.md +105 -0
  122. package/harness-skills/mstar-iteration/references/phase-4-5-pr-delivery.md +85 -0
  123. package/harness-skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
  124. package/harness-skills/mstar-phase-gates/SKILL.md +118 -0
  125. package/harness-skills/mstar-project-governance/SKILL.md +119 -0
  126. package/harness-skills/mstar-review-qc/SKILL.md +76 -0
  127. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
  128. package/harness-skills/mstar-roles/SKILL.md +103 -0
  129. package/harness-skills/mstar-roles/references/_shared/leaf-executor-core.md +65 -0
  130. package/harness-skills/mstar-roles/references/architect.md +109 -0
  131. package/harness-skills/mstar-roles/references/code-reviewer.md +118 -0
  132. package/harness-skills/mstar-roles/references/frontend-dev.md +70 -0
  133. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
  134. package/harness-skills/mstar-roles/references/ops-engineer.md +72 -0
  135. package/harness-skills/mstar-roles/references/product-manager.md +102 -0
  136. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +200 -0
  137. package/harness-skills/mstar-roles/references/project-manager/plan-management.md +59 -0
  138. package/harness-skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
  139. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +99 -0
  140. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
  141. package/harness-skills/mstar-roles/references/project-manager.md +310 -0
  142. package/harness-skills/mstar-roles/references/prompt-engineer.md +65 -0
  143. package/harness-skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
  144. package/harness-skills/mstar-roles/references/qa-engineer.md +71 -0
  145. package/harness-skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +104 -0
  146. package/harness-skills/mstar-roles/references/qc-specialist/report-template.md +88 -0
  147. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
  148. package/harness-skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
  149. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +120 -0
  150. package/harness-skills/mstar-roles/references/writing-specialist.md +88 -0
  151. package/harness-skills/mstar-sdd/SKILL.md +137 -0
  152. package/harness-skills/mstar-sdd/references/file-handoffs.md +85 -0
  153. package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
  154. package/harness-skills/mstar-sdd/references/implementer-prompt.md +56 -0
  155. package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
  156. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
  157. package/harness-skills/mstar-skill-authoring/SKILL.md +182 -0
  158. package/harness-skills/mstar-skill-authoring/references/regression-fixation.md +46 -0
  159. package/harness-skills/mstar-skill-authoring/references/skillsbench-authoring.md +154 -0
  160. package/harness-skills/mstar-strategy/SKILL.md +114 -0
  161. package/harness-skills/pm/SKILL.md +40 -0
  162. package/hooks/pre/mstar-gates.js +6579 -0
  163. package/package.json +45 -0
  164. package/plugin.json +49 -0
  165. package/skills/grill-me/SKILL.md +10 -0
  166. package/skills/mstar-artifacts/SKILL.md +66 -0
  167. package/skills/mstar-artifacts/references/knowledge-and-designs.md +110 -0
  168. package/skills/mstar-artifacts/references/plan-files-and-reports.md +98 -0
  169. package/skills/mstar-artifacts/references/plan-quality-bar.md +99 -0
  170. package/skills/mstar-artifacts/references/status-and-residuals.md +472 -0
  171. package/skills/mstar-artifacts/templates/README.md +7 -0
  172. package/skills/mstar-artifacts/templates/plan.main.md +54 -0
  173. package/skills/mstar-artifacts/templates/status.empty.json +5 -0
  174. package/skills/mstar-audit/SKILL.md +151 -0
  175. package/skills/mstar-audit/references/audit-playbook.md +175 -0
  176. package/skills/mstar-audit/references/codebase-audit.md +103 -0
  177. package/skills/mstar-audit/references/finding-format.md +69 -0
  178. package/skills/mstar-audit/references/pr-review-seat-evidence.md +28 -0
  179. package/skills/mstar-audit/references/pr-review.md +475 -0
  180. package/skills/mstar-audit/references/security-review.md +219 -0
  181. package/skills/mstar-branch-worktree/SKILL.md +236 -0
  182. package/skills/mstar-branch-worktree/references/parallel-writable-pre-dispatch.md +68 -0
  183. package/skills/mstar-coding-behavior/SKILL.md +167 -0
  184. package/skills/mstar-compound/SKILL.md +109 -0
  185. package/skills/mstar-compound/assets/resolution-template.md +94 -0
  186. package/skills/mstar-compound/references/category-mapping.md +37 -0
  187. package/skills/mstar-compound/references/compound-workflow.md +171 -0
  188. package/skills/mstar-compound/references/concepts-vocabulary.md +44 -0
  189. package/skills/mstar-compound/references/schema.yaml +122 -0
  190. package/skills/mstar-compound-refresh/SKILL.md +154 -0
  191. package/skills/mstar-compound-refresh/references/project-knowledge-bootstrap.md +164 -0
  192. package/skills/mstar-conventions/SKILL.md +215 -0
  193. package/skills/mstar-conventions/references/artifact-storage-paths.md +53 -0
  194. package/skills/mstar-conventions/references/effort-estimation.md +38 -0
  195. package/skills/mstar-conventions/references/harness-bootstrap-and-agents-layering.md +96 -0
  196. package/skills/mstar-design-md/SKILL.md +142 -0
  197. package/skills/mstar-design-md/references/completeness-checklist.md +181 -0
  198. package/skills/mstar-design-md/references/design-md-spec.md +508 -0
  199. package/skills/mstar-design-md/references/vercel-example.md +200 -0
  200. package/skills/mstar-design-md/templates/DESIGN.dark.md.template +354 -0
  201. package/skills/mstar-design-md/templates/DESIGN.md.template +474 -0
  202. package/skills/mstar-dispatch-gates/SKILL.md +134 -0
  203. package/skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +23 -0
  204. package/skills/mstar-engine-legacy/SKILL.md +53 -0
  205. package/skills/mstar-engine-legacy/references/anti-recursion-checklists.md +58 -0
  206. package/skills/mstar-engine-legacy/references/engine-check-boilerplate.md +26 -0
  207. package/skills/mstar-engine-legacy/references/lease-protocol.md +92 -0
  208. package/skills/mstar-engine-legacy/references/qc-seat-n-restatements.md +57 -0
  209. package/skills/mstar-engine-legacy/references/status-field-history.md +186 -0
  210. package/skills/mstar-harness-core/SKILL.md +196 -0
  211. package/skills/mstar-host/SKILL.md +96 -0
  212. package/skills/mstar-host/references/_shared/host-role-binding-core.md +51 -0
  213. package/skills/mstar-host/references/_shared/plan-mode-bridge-core.md +91 -0
  214. package/skills/mstar-host/references/codex.md +61 -0
  215. package/skills/mstar-host/references/cursor-plan-mode-bridge.md +170 -0
  216. package/skills/mstar-host/references/cursor.md +183 -0
  217. package/skills/mstar-host/references/dsh.md +507 -0
  218. package/skills/mstar-host/references/kimi-plan-mode-bridge.md +36 -0
  219. package/skills/mstar-host/references/kimi.md +136 -0
  220. package/skills/mstar-host/references/omp-plan-mode-bridge.md +32 -0
  221. package/skills/mstar-host/references/omp.md +245 -0
  222. package/skills/mstar-host/references/opencode.md +76 -0
  223. package/skills/mstar-host/references/parallel-dispatch.md +68 -0
  224. package/skills/mstar-host/references/zcode-plan-mode-bridge.md +36 -0
  225. package/skills/mstar-host/references/zcode.md +129 -0
  226. package/skills/mstar-iteration/SKILL.md +408 -0
  227. package/skills/mstar-iteration/references/autonomous-direction-lock.md +90 -0
  228. package/skills/mstar-iteration/references/command-shared-invariants.md +62 -0
  229. package/skills/mstar-iteration/references/iteration-artifact-boundaries.md +103 -0
  230. package/skills/mstar-iteration/references/iteration-compass-template.md +142 -0
  231. package/skills/mstar-iteration/references/iteration-corpus-hygiene.md +45 -0
  232. package/skills/mstar-iteration/references/iteration-workspace-readme-template.md +27 -0
  233. package/skills/mstar-iteration/references/phase-2-worktree-lease.md +205 -0
  234. package/skills/mstar-iteration/references/phase-3-iteration-close.md +105 -0
  235. package/skills/mstar-iteration/references/phase-4-5-pr-delivery.md +85 -0
  236. package/skills/mstar-iteration/references/phase5-helper-discovery.md +24 -0
  237. package/skills/mstar-phase-gates/SKILL.md +118 -0
  238. package/skills/mstar-project-governance/SKILL.md +119 -0
  239. package/skills/mstar-review-qc/SKILL.md +76 -0
  240. package/skills/mstar-review-qc/references/review-responsibility-boundaries.md +54 -0
  241. package/skills/mstar-roles/SKILL.md +103 -0
  242. package/skills/mstar-roles/references/_shared/leaf-executor-core.md +65 -0
  243. package/skills/mstar-roles/references/architect.md +109 -0
  244. package/skills/mstar-roles/references/code-reviewer.md +118 -0
  245. package/skills/mstar-roles/references/frontend-dev.md +70 -0
  246. package/skills/mstar-roles/references/fullstack-dev-shared.md +89 -0
  247. package/skills/mstar-roles/references/ops-engineer.md +72 -0
  248. package/skills/mstar-roles/references/product-manager.md +102 -0
  249. package/skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +200 -0
  250. package/skills/mstar-roles/references/project-manager/plan-management.md +59 -0
  251. package/skills/mstar-roles/references/project-manager/qa-trigger-matrix.md +56 -0
  252. package/skills/mstar-roles/references/project-manager/qc-and-residuals.md +99 -0
  253. package/skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +99 -0
  254. package/skills/mstar-roles/references/project-manager.md +310 -0
  255. package/skills/mstar-roles/references/prompt-engineer.md +65 -0
  256. package/skills/mstar-roles/references/qa-engineer/acceptance-gate.md +62 -0
  257. package/skills/mstar-roles/references/qa-engineer.md +71 -0
  258. package/skills/mstar-roles/references/qc-specialist/deep-review-lenses.md +104 -0
  259. package/skills/mstar-roles/references/qc-specialist/report-template.md +88 -0
  260. package/skills/mstar-roles/references/qc-specialist/reviewer-checklist.md +44 -0
  261. package/skills/mstar-roles/references/qc-specialist/reviewer-workflow.md +57 -0
  262. package/skills/mstar-roles/references/qc-specialist-shared.md +120 -0
  263. package/skills/mstar-roles/references/writing-specialist.md +88 -0
  264. package/skills/mstar-sdd/SKILL.md +137 -0
  265. package/skills/mstar-sdd/references/file-handoffs.md +85 -0
  266. package/skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
  267. package/skills/mstar-sdd/references/implementer-prompt.md +56 -0
  268. package/skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
  269. package/skills/mstar-sdd/references/task-reviewer-prompt.md +53 -0
  270. package/skills/mstar-skill-authoring/SKILL.md +182 -0
  271. package/skills/mstar-skill-authoring/references/regression-fixation.md +46 -0
  272. package/skills/mstar-skill-authoring/references/skillsbench-authoring.md +154 -0
  273. package/skills/mstar-strategy/SKILL.md +114 -0
  274. package/skills/pm/SKILL.md +40 -0
  275. package/tools/mstar_dispatch_validate.js +6291 -0
  276. package/tools/mstar_iteration_gate.js +6321 -0
  277. package/tools/mstar_lease_verify.js +6343 -0
  278. package/tools/mstar_path_resolve.js +6297 -0
  279. package/tools/mstar_status_validate.js +6402 -0
  280. package/tools/mstar_worktree_check.js +6343 -0
@@ -0,0 +1,196 @@
1
+ ---
2
+ name: mstar-harness-core
3
+ description: Morning Star (启明星) harness **强制全局入口** —— 信息源优先级、最小交付循环、状态机与 Done 权限、Task category 路由(含 quick 禁豁免)、@explore 边界、长任务纪律、核心研发守则、护栏不变量、反模式索引、Morning Star Skill 索引与宿主入口。**任何**非平凡任务开始前必须先 Read 本 skill;再按角色与任务 **按需** Read 其它 `mstar-*` 专题(勿默认通读全部)。`@project-manager` 开轮必读 + `mstar-dispatch-gates` / `mstar-phase-gates` / `mstar-conventions` 等;实现/审查/QA 必读本 skill + `mstar-coding-behavior` 及角色清单(见 `mstar-roles`)。Prepare/派发/Git/residual/QC 细则在专题 skill,不在此重复。
4
+ ---
5
+
6
+ # Morning Star Harness Core(启明星核心)
7
+
8
+ 本 skill 是 harness 的**唯一全局入口与裁决层**。专题 skill 展开细节;**冲突时以本 skill 的状态机、Done 权限与索引为准**。
9
+
10
+ ## 与其它 `mstar-*` skill 的加载契约
11
+
12
+ - 凡 **`mstar-*`**(`name` ≠ `mstar-harness-core`)假定读者**已 Read 本 skill**。
13
+ - **仅读专题、未读核心** → 未完成 harness 加载。
14
+ - 各专题 SKILL.md 含 **Load order**;按 **`mstar-harness-core`** 专题 skill 索引 + 角色 load contract 按需加载,**禁止**为「保险」通读全部专题。
15
+ - **加载条件(`mstar-engine-legacy`)**:`mstar-engine-legacy` 是**条件契约档案**(engine-absent fallback)。**engine 约束激活(或宿主含 engine 能力)时不加载**——engine-present 宿主以运行时 skills 的 engine-check 指针 + engine 校验为权威;仅 engine-absent 宿主(无 `mstar` CLI / engine import)为找回被 engine 校验接管的 contract 全文而读取(触发契约见其 description)。
16
+
17
+ ## Standalone harness(`mstar-*` 自洽)
18
+
19
+ - **`mstar-*` skill 体系**在本仓库内自洽运行:正文与 load order **不得**依赖仓库外的 skills、CLI、或 MCP 服务。
20
+ - **Commands**(如 `/iteration-start`)可引用本仓库 bundled、**非 `mstar-*`** 的辅助资产(例如 `skills/grill-me/`);该引用**仅**存在于 command 层,**不**进入 `mstar-*` 专题索引或 load matrix。
21
+ - 框架/SDK/API 问题:先 Read/Grep 项目内文档与源码;不将第三方文档工具写入 `mstar-*` 必读路径。
22
+
23
+ ## 信息源优先级
24
+
25
+ 1. 当轮用户显式指令
26
+ 2. 项目 `AGENTS.md` / `CLAUDE.md`
27
+ 3. `{KNOWLEDGE_DIR}/README.md` 索引(**若该文件存在**;发现 Active 行并仅跟随与当轮相关的文档)
28
+ 4. `mstar-*` skills(本 skill + 专题)
29
+ 5. `mstar-roles` 角色正文
30
+
31
+ 冲突且用户未覆盖 → **暂停升级人工**。Knowledge **永不**高于用户 / `AGENTS.md`。
32
+
33
+ ## 最小交付循环
34
+
35
+ **per-plan**:`specify → clarify → plan` → `plan(locked) → tasks → implement`(多 task 默认 SDD)→ plan QC tri + **QA gate**(`mandatory` 派 QA 或 `pm-acceptance`)→ Done(`inline` 单席例外)。阶段细则 → **`mstar-phase-gates`**;QA 分级 → **`mstar-roles/references/project-manager/qa-trigger-matrix.md`**。
36
+
37
+ **迭代级**:`iteration-start → [per-plan cycle × N] → iteration-close → PR delivery → PR merge-ready loop`。细则 → **`mstar-iteration`**。
38
+
39
+ ## 加载约定(强制)
40
+
41
+ | 角色 | 始终 | 按任务追加(典型) |
42
+ |------|------|-------------------|
43
+ | **全部** | 本 skill | — |
44
+ | **`@project-manager`** | 本 skill | `mstar-dispatch-gates`、`mstar-phase-gates`、`mstar-conventions`、`mstar-roles`;implement 波次 `mstar-sdd`;派 QC 前 `mstar-review-qc`;并行/审查 `mstar-branch-worktree`;plan/status/review bundle `mstar-artifacts`;UI 类 plan Prepare 阶段 `mstar-design-md`(DESIGN.md 门禁);新建/大改 skill 时 `mstar-skill-authoring`;迭代管理 `mstar-iteration`(Phase 1–5);战略性工作 `mstar-strategy`;`audit` 类请求 `mstar-audit`(执行归 `@code-reviewer`)。**不**读 `mstar-coding-behavior` |
45
+ | **实现/审查/运维** | 本 skill + `mstar-coding-behavior` + 角色 ref | 有 git 写:`mstar-branch-worktree`;有 plan 路径:`mstar-conventions`;**PM** 派 QC 前:`mstar-review-qc`;**`qc-specialist*`**:`mstar-roles` → `references/qc-specialist/`;`qa-engineer`:`references/qa-engineer/`;改 status/residual:`mstar-artifacts`;UI:`mstar-design-md`;知识库:`mstar-compound`(PM) |
46
+ | **leaf 承接方** | 上栏 + **`mstar-dispatch-gates`**(反递归节) | — |
47
+
48
+ Routing eval(Cursor 插件内回归用,**非**运行时必读)→ `.cursor/skills/mstar-routing-eval/`。
49
+
50
+ ## 状态机
51
+
52
+ `Todo` → `InProgress` → `InReview` → `Done` | `Blocked`
53
+
54
+ - **`Done`**:仅 `@project-manager` 或 `@qa-engineer`。
55
+ - 实现类可设 **`InReview`**,不可设 **`Done`**。
56
+
57
+ `status.json`(v2 根)/ workflow snapshot / project register 字段与 residual → **`mstar-artifacts`**。
58
+
59
+ ## Task category(路由摘要)
60
+
61
+ PM 在 Assignment 写 **`Task category`**(主类 + 可选 `secondary`):
62
+
63
+ | Category | 倾向角色 |
64
+ |----------|----------|
65
+ | `visual` | `@frontend-dev`(复杂 IA 可前置 `@product-manager`) |
66
+ | `deep` | `@explore` → dev / `@architect` |
67
+ | `quick` | `@general` 或单 dev — **不豁免 Prepare** |
68
+ | `logic` | `@architect` + dev |
69
+ | `ops` | `@ops-engineer` |
70
+ | `docs` | `@product-manager` / `@architect` / `@writing-specialist` |
71
+ | `audit` | `@code-reviewer`(mstar-audit 承载;大型仓库经 Assignment `Delegation: allowed (scout/explore only, read-only)` 扇出只读 scout;read-only advisory;不进入状态机) |
72
+
73
+ **硬规则**:`quick` **从不**跳过 `specify → clarify → plan`;禁止把新 CLI/API/多模块/新测例标为 `quick`。已启用 `{HARNESS_DIR}` 时,首次 implement 前须有主 plan 路径 + `status.json` 登记(见 **`mstar-conventions`**)。
74
+
75
+ ## `@explore` 边界
76
+
77
+ - 已分派角色的 Assignment:**禁止**用 `@explore` 代替实现/测试/审查/文档交付。
78
+ - 允许短窄只读辅助;`glob`/`grep`/`read` 够用时不必 `@explore`。
79
+ - PM 分派前摸底:**推荐**;分派后承接方**勿**转包。
80
+
81
+ ## 长任务纪律
82
+
83
+ 可追踪清单(plan `tasks` 或 Todo);偏离时 PM 拉回;完成前须可核对证据(实现侧自检见 **`mstar-coding-behavior`**;门禁证据见 **`mstar-phase-gates`** / **`mstar-review-qc`**)。
84
+
85
+ **Durable Roadmap Gate**:凡声明“分批 / 后续 / next plan / later / temporary workaround”的非热修任务,必须在 `{PLAN_DIR}` 主 plan、CreatePlan mirror、`status.json`/residual、或 PM Task Board 中写清后续路线(批次、依赖、owner/触发条件、完成定义)。只在对话或 Completion Report 里说“以后做”不算可追踪,不能进入 implement GO 或 Done。
86
+
87
+ ## 专题 skill 索引
88
+
89
+ | Skill | 职责 |
90
+ |-------|------|
91
+ | `mstar-harness-core` | 本文件:入口、状态机、Task category、explore、索引、护栏 |
92
+ | `mstar-phase-gates` | per-plan 双阶段门禁:Prepare/Execute、意图门禁、hotfix、可验证编辑 |
93
+ | `mstar-iteration` | 迭代管理:Phase 1–5(start / Autonomous Execute / iteration-close / PR delivery / PR merge-ready loop) |
94
+ | `mstar-dispatch-gates` | 派发、Delegation、反递归、SDD 串行、SDD 路径 plan QC 强制 tri |
95
+ | `mstar-engine-legacy` | 条件契约档案(engine-absent fallback):status v1→v2 字段历史、lease 协议全文、各宿主 N=3/N=1 重述、反递归全清单、Engine-check 样板;engine 激活时不加载 |
96
+ | `mstar-sdd` | Subagent-driven development:file handoff、per-task review、ledger |
97
+ | `mstar-branch-worktree` | 功能分支、worktree、QC/QA 检出对齐 |
98
+ | `mstar-conventions` | `{HARNESS_DIR}` 发现、初始化、Spec 分支模型摘要、产物路径 SSOT |
99
+ | `mstar-artifacts` | 主 plan、review bundle / durable summaries、`status.json`(v2 根)+ workflow snapshots + project register、residual、knowledge |
100
+ | `mstar-project-governance` | 项目治理层:`projects/<id>/roadmap.md` 编写约定 + `residuals.json` register 生命周期(open → verified close in place)、`_default` 回退、provenance;schema 与 engine `project.ts` 逐字一致 |
101
+ | `mstar-design-md` | DESIGN.md 设计系统规范 —— 创建/审计/维护 design tokens,三级检查清单,light/dark 双主题 |
102
+ | `mstar-review-qc` | PM:QC tri 编排、residual 留档、四层边界;leaf 执行 → `mstar-roles/references/qc-specialist/` |
103
+ | `mstar-coding-behavior` | Think / Simplicity / Surgical / Debugging / Review Feedback / Goal-Driven / Communication |
104
+ | `mstar-compound` | 知识结晶 —— 已解决问题→结构化知识文档,双轨(Bug/Knowledge),「是否值得结晶」自检清单,重叠检测,可发现性检查,CONCEPTS.md 协同 |
105
+ | `mstar-compound-refresh` | 知识维护 —— 审查/更新/合并/删除 `{KNOWLEDGE_DIR}` 文档;**项目知识 bootstrap**(无/残旧 STRATEGY.md、CONCEPTS.md、`{KNOWLEDGE_DIR}`)→ `references/project-knowledge-bootstrap.md` |
106
+ | `mstar-strategy` | `STRATEGY.md` 全局战略方向 —— 产品愿景、技术方向、决策原则 |
107
+ | `mstar-skill-authoring` | 通用 skill 撰写门控(SkillsBench 六原则):trigger 契约、紧凑 5 问 body、渐进披露、paired 证据 |
108
+ | `mstar-audit` | Variant carrier:common core(hard rules、recon、vet、variant dispatch)+ SKILL.md `## Plan output (all variants)`(Status block、plan files、handoff)+ `references/codebase-audit.md`(full-audit 变体:9 类别 fan-out、effort、scope variants、Phase 4 excerpt/reconcile、audit index 模板)+ `references/security-review.md`(security 深查:exploitability 门槛、FP 纪律、LLM/供应链面)+ `references/pr-review.md`(`pr` 变体);`audit-playbook` + `finding-format` + `plan-quality-bar` |
109
+ | `mstar-roles` | 角色正文 hub |
110
+ | `mstar-host` | 宿主适配(自动识别;`references/opencode.md` / `cursor.md` / `codex.md` / `kimi.md` / `parallel-dispatch.md`) |
111
+
112
+ ## 宿主 `mstar-host`
113
+
114
+ Read **`mstar-host`** after this skill; detect host per its table, then Read the matching reference.
115
+
116
+ | 宿主 | 要点 |
117
+ |------|------|
118
+ | OpenCode | `question`、**task tool**(**subagent** 参数)→ `references/opencode.md` |
119
+ | Cursor | Task 并行 QC;Plan 双写 → `references/cursor.md` · `cursor-plan-mode-bridge.md` |
120
+ | Codex | plugin skills、sandbox/apply_patch/tool discovery;无 invoke 工具时不声称 subagent dispatch → `references/codex.md` |
121
+ | Kimi | `Agent`/`AgentSwarm`(仅 `coder`/`explore`/`plan`);角色绑定在 prompt(C5b);Plan 双写 → `references/kimi.md` · `kimi-plan-mode-bridge.md` |
122
+ | 其它 | 同 `mstar-host` skill;按工具信号选 reference |
123
+
124
+ ## 核心研发守则
125
+
126
+ 全局工程不变量,适用于所有角色;实现级操作细节(The Ladder、surgical、debugging 等)→ **`mstar-coding-behavior`**。
127
+
128
+ - Do not preserve backward compatibility. Remove obsolete paths instead of adding compatibility layers, fallbacks, or migrations.
129
+ - Choose the simplest implementation that fully meets the current requirements. Avoid speculative abstractions, configuration, and indirection.
130
+ - Grow the system in layers. Start from the smallest version that works end to end, and add each new capability on top of a product that already works. Never trade a working product for unfinished complexity.
131
+ - Keep components modular and concerns clearly separated.
132
+ - Prefer established, well-maintained libraries when they reduce overall complexity or improve reliability. Do not reimplement common functionality without a clear reason.
133
+ - Lean on the dependencies already in the project before writing your own implementation or adding packages. Do not assume a library lacks a capability without checking its documentation and types.
134
+ - Make architectural decisions for the long term. Do not accept a stopgap that only works for now and is meant to be replaced later.
135
+
136
+ ## 护栏(不变量)
137
+
138
+ - 未经用户同意不改宿主配置文件与用户凭据。
139
+ - 行为变更须有验证证据。
140
+ - 业务仓默认功能分支(Assignment `Branch policy` 例外)→ **`mstar-branch-worktree`**。
141
+ - **Dev 三角**:`@fullstack-dev` 后端主导;UI → `@frontend-dev`;第二轨 → `@fullstack-dev-2`(`mstar-roles` PM 节)。
142
+ - 工期仅 agent-oriented → **`mstar-conventions`** · effort-estimation。
143
+ - plan-writing artifacts land in `{PLAN_DIR}`, not external default plan directories.
144
+ - PM Assignment 键名英文;任务正文可中文;产出/报告默认英文。
145
+
146
+ ## 库文档 / API 问题
147
+
148
+ 先 Read/Grep 项目内文档、规格与源码;仍不确定时再向用户澄清。**不**将第三方 MCP/CLI 文档工具写入 `mstar-*` load order。
149
+
150
+ ## 升级触发
151
+
152
+ 验收仍模糊、评审冲突、重复失败、根因不可收敛 → 升级报告(状态、方案、推荐路径)。
153
+
154
+ ## 反模式(索引)
155
+
156
+ | 反模式 | 详见 |
157
+ |--------|------|
158
+ | SDD paste-only / 跳过 task review / 并行 implementer | `mstar-sdd` · `mstar-dispatch-gates` |
159
+ | SDD plan 以单席 `qc.md` 收尾 / 跳过 plan tri | `mstar-dispatch-gates` · `mstar-review-qc` · `mstar-sdd` |
160
+ | fix 后无脑重派三审 / 用 `-rev2` 代替原位复验 | `mstar-artifacts` · `mstar-review-qc` |
161
+ | 递归误派 / 误读 Handoff | `mstar-dispatch-gates` |
162
+ | `quick` 跳过 Prepare | 上表 + `mstar-phase-gates` |
163
+ | 多 worktree 未归并就 QC | `mstar-branch-worktree` |
164
+ | 因默认 gitignore 致 feature 缺 plans 而 `Worktree mode: waived`(应保留 feature worktree + control 绝对 Plan Path / SDD dir;无 flock 仅 → `Plan parallelism: serial`) | `mstar-branch-worktree` · `mstar-iteration` §2.0 #5 · `phase-2-worktree-lease` |
165
+ | 并行 writable implement 无隔离(L2 同 plan 多轨:N invoke ≠ worktree;L1 跨 plan:无 verified `execution_lease` + feature worktree) | `mstar-branch-worktree` L1/L2 · `mstar-iteration` §2.6 · `references/parallel-writable-pre-dispatch.md` |
166
+ | 跨 plan 可写派发无 verified `execution_lease` / steal 活跃 lease / 并行 merge 入 `spec_integration_branch` | `mstar-iteration` · `mstar-artifacts`(leases)· `mstar-branch-worktree` L1 |
167
+ | `InProgress` 无 `execution_lease`(snapshot 行)未恢复即可写派发 | `mstar-artifacts` — orphan recovery |
168
+ | 混淆跨 plan lease 门控并行与单 plan 内 SDD 并行 implementer | `mstar-dispatch-gates` · `mstar-sdd` |
169
+ | residual 只写 plan 不写 SSOT | `mstar-artifacts` |
170
+ | `zero-residual` 下把可修 findings 登记为 open R# / 草草 `Approve with residuals` | `mstar-artifacts` Findings cleanup modes · `mstar-review-qc` |
171
+ | 角色文件塞流程长文 | 用专题 skill |
172
+ | 无证据宣称完成 | `mstar-coding-behavior` / verification |
173
+ | CreatePlan 不落盘 / 无 `{HARNESS_DIR}` mirror | `mstar-host` · `cursor-plan-mode-bridge` |
174
+ | 临时方案 / 后续计划只写在对话里 | `mstar-phase-gates` · Durable Roadmap Gate |
175
+ | Phase 1 review chain 未完成即 commit | `mstar-iteration` §1.6;PM 代做专业角色编辑;或三角色并行派发 |
176
+ | OpenCode prompt 含多个 prefix-style role mention | `mstar-host/references/opencode.md` § Role-mention hygiene |
177
+ | Phase 2 paste-only / PM 自实现 | `mstar-dispatch-gates` |
178
+ | Phase 3 折叠进 final plan closure / 跳过 §3.1 gate | `mstar-iteration` §3.0–§3.5 |
179
+ | Phase 4 开 PR 后跳过 merge-ready loop | `mstar-iteration` §5 |
180
+ | Phase 5 在 CI / AI review 仍在跑时 push | `mstar-iteration` §5.1a |
181
+ | iteration-close 无 frontmatter completed / 漏 compound Phase 6 | `mstar-iteration` §3.0.5、§3.4、§3.2 #5 |
182
+ | iteration 默认 `main` 作 base 或 PR 目标 | `mstar-iteration` §1.2、§2.3;`mstar-conventions` Spec 分支模型 |
183
+
184
+ ## 常见 harness 说法对照(帮助理解角色分工)
185
+
186
+ | 常见说法 | 本仓库实体 |
187
+ |----------|------------|
188
+ | 总编排 | `@project-manager` |
189
+ | 规划/访谈 | `@product-manager` / `@architect` + Prepare 阶段 |
190
+ | category 路由 | **`Task category`** + 路由表 + 子代理选择 |
191
+ | 持续推进 / 不半途而废 | Phase Gate + Todo/`tasks` + 验证门禁 |
192
+ | 行级哈希锚定编辑 | 以 **读后再改 + 小步 Patch** 纪律落实(`mstar-phase-gates`) |
193
+
194
+ 项目根 **`AGENTS.md` 写什么、分层 bootstrap** → **`mstar-conventions`** `references/harness-bootstrap-and-agents-layering.md`(勿在 core 重复长文)。
195
+
196
+ **专题 skill**(规则在各自 `SKILL.md`):`mstar-phase-gates`、`mstar-branch-worktree`、`mstar-artifacts` 等 — 见上表索引。
@@ -0,0 +1,96 @@
1
+ ---
2
+ name: mstar-host
3
+ description: Morning Star host adapter (OpenCode, Cursor, Codex, Kimi, ZCode, omp, dsh). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/task-tool subagent invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, Kimi Agent/AgentSwarm with built-in subagent types only (coder/explore/plan) and role-in-prompt binding, ZCode Agent/AskUserQuestion/EnterPlanMode with built-in subagent types and role-in-prompt binding, omp task/ask/hub preferring live-schema role agents (agents/*.md) with C5b skill-load binding (generic task/scout only as fallback), dsh (DeepSeek Harness) subagent tool with in-process engine gates and bundled mstar commands, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
4
+ ---
5
+
6
+ # Morning Star Host Adapter
7
+
8
+ Host-specific **capabilities and entry behavior** for Morning Star. Process gates and invariants stay in `mstar-harness-core` and topic `mstar-*` skills.
9
+
10
+ ## Load order
11
+
12
+ **本 skill 总是在 `mstar-harness-core` 之后加载**(先 Read `mstar-harness-core` SKILL.md;宿主注入项目 `AGENTS.md` 也不跳过,见下 `## First action`)。本 skill 只适配宿主入口 / 检测 / 计划 UX;状态机与门禁以 `mstar-harness-core` 为准。
13
+
14
+ ## First action
15
+
16
+ Read **`mstar-harness-core`** before this skill (even when the host injects project `AGENTS.md`).
17
+
18
+ ## Default path
19
+
20
+ 1. Read `mstar-harness-core`
21
+ 2. Read **`mstar-host`** (this skill) and detect host below
22
+ 3. Read **`references/<host>.md`** for the active host
23
+ 4. Load role via `mstar-roles`
24
+ 5. Execute with evidence-first completion checks
25
+
26
+ Load topic skills **on demand** per `mstar-roles` (do not read every `mstar-*` skill by default). Cursor routing-eval (`.cursor/skills/mstar-routing-eval/`) is regression tooling only — not part of runtime load order.
27
+
28
+ ## Detect active host
29
+
30
+ Detect from **session tool shapes and available commands** — not from plugin markers on disk. The `*-plugin/plugin.json` files **cannot** identify the host: they all coexist in this harness source repo and in any multi-host install.
31
+
32
+ | Signal | Host | Next read |
33
+ |--------|------|-----------|
34
+ | **`subagent_type`** param on the Task tool (plus **CreatePlan**/**SwitchMode** when Plan mode is active) | `cursor` | `references/cursor.md`; Plan mode also `references/cursor-plan-mode-bridge.md` |
35
+ | **`question`** tool, or **`task`** tool with **`subagent`** (singular) — no `tasks[]` batch | `opencode` | `references/opencode.md` |
36
+ | **`task`** tool with **`agent`** / **`tasks[]`** batch, **`ask`**, **`hub`** (omp also exposes `/goal`; goal rule is host-agnostic per below) | `omp` | `references/omp.md`; Plan mode also `references/omp-plan-mode-bridge.md` |
37
+ | **`subagent`** tool (dsh's model-facing delegation tool — `@deepseek-ai/dsh-tool-subagent` default `toolName`) | `dsh` | `references/dsh.md` |
38
+ | **`Agent`** / **`AskUserQuestion`** / **`EnterPlanMode`** + **`AgentSwarm`** (Kimi-only) | `kimi` | `references/kimi.md`; Plan mode also `references/kimi-plan-mode-bridge.md` |
39
+ | **`Agent`** / **`AskUserQuestion`** / **`EnterPlanMode`** / **`TodoWrite`**, **no `AgentSwarm`** | `zcode` | `references/zcode.md`; Plan mode also `references/zcode-plan-mode-bridge.md` |
40
+ | `/plan`, `/goal` slash commands; **Goal tools**; `functions.*` / `codex_app.*` tool namespaces; `tool_search`; Browser plugin tools | `codex` | `references/codex.md`; Plan mode also `references/_shared/plan-mode-bridge-core.md` |
41
+ | Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, **`codex.md`**, **`kimi.md`**, **`zcode.md`**, **`omp.md`**, and **`dsh.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
42
+
43
+ Order matters: check `cursor` → `opencode` → `omp` → `dsh` → `kimi` → `zcode` → `codex`. `subagent_type` (Cursor) vs `subagent` (OpenCode) vs `agent`/`tasks[]` (omp) is the sharpest split among the Task-based hosts; dsh's `subagent` tool collides with no other row, so it sits with the agent-tool hosts.
44
+
45
+ > **Engine check (when available):** run `mstar host detect --signals <comma-list>` (or `import { detectHost } from "@mstar-harness/engine"` in a host hook) to resolve the detection table above from session tool shapes (prints the host id, or `ambiguous` to fall back on the table + judgment). On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
46
+
47
+ ## Parallel dispatch (invoke-capable hosts)
48
+
49
+ 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.
50
+
51
+ ## `/goal` directive (host-agnostic)
52
+
53
+ **Applicability is by capability, not host identity**: any host that exposes a `/goal` command (currently Codex Goal Mode and omp; other code agents may add it later) attaches a persistent objective to the thread. Rule — **always set the goal to running the complete flow to the end**, never a sub-stage:
54
+
55
+ - **Advancing an iteration**: set the goal to **complete the entire iteration flow** (`iteration-start → per-plan cycles → iteration-close → PR delivery → PR merge-ready loop`). Do not set a sub-stage goal (e.g. "finish Phase 1 only").
56
+ - **Advancing non-iteration work** (single plan / hotfix / one-off task): set the goal to **complete the entire per-plan flow** (`specify → clarify → plan → tasks → implement → plan QC tri + QA gate → Done`). Do not set a sub-stage goal (e.g. "write the plan" or "implement one task").
57
+
58
+ Goal text is a session-level objective only: `{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json` remain SSOT, and goal completion is **not** harness Done. Mirror goal success criteria into the SSOT plan; when the goal changes, update goal text and the SSOT in the same round.
59
+
60
+ ## Resolve loaded skill root
61
+
62
+ Docs name assets as skill **`<name>`** → `scripts/…` / `references/…`. **Resolve the loaded skill directory first** — do **not** open `skills/<name>/…` from a consumer app cwd (that layout exists in the harness source / plugin package only).
63
+
64
+ | Host | Prefer | Filesystem fallback (only if the host cannot load by name) |
65
+ |------|--------|--------------------------------------------------------------|
66
+ | **omp** | `skill://<name>` / `skill://<name>/<rel>` / `/skill:<name>` | Plugin package root `skills/<name>/` after install/link — not app cwd |
67
+ | **Cursor** | Skill **name** via plugin skills | Global `~/.cursor/plugins/local/morning-star-harness/skills/<name>/`; project `.cursor/plugins/morning-star-harness/skills/<name>/` |
68
+ | **Codex** | Skill **name** via plugin | Plugin-mounted `skills/<name>/`; project command skills under `.agents/skills/<name>/` |
69
+ | **OpenCode** | Skill **name** via `@mstar-harness/opencode` | Package-internal `harness-skills/<name>/` — never `process.cwd()/skills/` |
70
+ | **dsh** | Skill **name** via the mstar skill-local provider (`providerName: mstar`) | `$DSH_BUNDLED_SKILL_DIR/<name>[/<rel>]` — the packaged `harness-skills/` mirror mounted package-relative by `@mstar-harness/dsh`; never app cwd |
71
+ | **Kimi / ZCode** | Skill **name** / `/skill:<name>` | Plugin mount `./skills/<name>/` from the installed plugin root |
72
+
73
+ Authoring convention: **`mstar-skill-authoring`** § Skill-relative script and asset paths. Per-host URI / mount detail: `references/<host>.md`.
74
+
75
+ > **Engine check (when available):** run `mstar host skill-root --host <id> --skill <name>` (or import `resolveSkillRoot` from `@mstar-harness/engine` in a host hook) to resolve the loaded skill root per the table above. On `fail` -> do not proceed; fix and re-run. Skill text below remains authoritative when the runtime is absent.
76
+
77
+ ## Conflict order(Decision Rules)
78
+
79
+ 1. User explicit instructions (this turn)
80
+ 2. Project `AGENTS.md` / `CLAUDE.md`
81
+ 3. `mstar-harness-core` and related `mstar-*` skills
82
+ 4. This `mstar-host` skill and `references/*`
83
+
84
+ ## Workflow
85
+
86
+ 按 `## Default path` 执行:Read `mstar-harness-core` → 读本 skill 并按 `## Detect active host` 检测宿主(`cursor` → `opencode` → `omp` → `dsh` → `kimi` → `zcode` → `codex`)→ 读 `references/<host>.md`(计划模式另读对应 plan-mode bridge)→ 经 `mstar-roles` 加载角色 → 执行并以证据收尾。topic skill 按需加载,不默认通读。
87
+
88
+ ## Evidence
89
+
90
+ 正确结果 = 检测输出:`mstar host detect --signals <comma-list>` 打印 `host: <id>`(或 `ambiguous` → 按检测表 + 判断降级);已加载的是**对应当前宿主工具形状**的 `references/<host>.md`。计划模式按宿主 plan-mode bridge 完成双写 / 对齐。
91
+
92
+ ## References
93
+
94
+ - 各宿主适配细则 → `references/<host>.md`(cursor / opencode / omp / dsh / kimi / zcode / codex;计划模式另见 plan-mode bridge references)
95
+ - invoke-capable 宿主并行派发 → `references/parallel-dispatch.md`
96
+ - 角色加载与参数 → **`mstar-roles`**
@@ -0,0 +1,51 @@
1
+ # Host role-binding core (C5/C5b)
2
+
3
+ Shared role-binding contract for **Kimi / ZCode** — hosts where Morning Star role ids are **never** valid invoke types, so picking `subagent_type` alone cannot carry Assignment IDENTITY + skill load.
4
+
5
+ Other hosts follow their own `references/<host>.md` and do **not** use this file for agent selection. Read this file only when the active host reference is Kimi or ZCode.
6
+
7
+ ## C5 — invoke type selection (Kimi / ZCode)
8
+
9
+ | Host | Invoke-type selection (C5) | Prompt role binding (C5b) |
10
+ |------|----------------------------|---------------------------|
11
+ | **Kimi / ZCode** | Built-in types only (`coder` / `explore` / `plan`, …). Morning Star role ids are **never** valid invoke types. | **Required** |
12
+
13
+ - **Never invent** agent / subagent names. The **live tool schema** (plus the active host reference C5 table) is SSOT every session.
14
+ - Morning Star role ids (`product-manager`, `fullstack-dev`, `qc-specialist`, …) are **not** valid invoke types — map via the host reference table (`coder` / `explore` / `plan`, …), then rely on C5b.
15
+
16
+ ## C5b — role binding in prompt (required)
17
+
18
+ Every dispatch on Kimi / ZCode **must** carry the played Morning Star role in the **Assignment** and in the **invoke prompt**:
19
+
20
+ 1. **`Execute as: <role-id>`** in Assignment (harness routing SSOT).
21
+ 2. **`Act as <role-id>`** (or equivalent) at the top of the invoke prompt.
22
+ 3. **Skill load list** — instruct the subagent to read `mstar-roles` → `references/<role-id>.md` (or shared reference + parameters) and topic skills per that reference.
23
+ 4. **`subagent_type`** — pick from the live built-in set per the host C5 table (not a Morning Star role id).
24
+
25
+ Paste-only Assignment **without** an invoke call is **not** dispatch.
26
+
27
+ ## Invocation rules
28
+
29
+ - **1 Assignment ⇒ 1 invoke**: one invoke call carrying the full Assignment body per assignee.
30
+ - **Parallel batch N**: **N** invocations in **one** assistant message (mechanics → **`parallel-dispatch.md`**).
31
+ - **No invoke call** → **Not dispatched** — paste-only / `dispatch incomplete`.
32
+ - **Anti-recursion NEVER**: leaf executors are already `Execute as` — **no** recursive invoke of the same role; Assignment wins (`Delegation: forbidden` unless stated). **Never** multiple implementer invokes in one message for the same plan (SDD serial → **`parallel-dispatch.md`** § SDD implement).
33
+
34
+ ## Assignment / prompt template
35
+
36
+ ```markdown
37
+ ## Assignment
38
+
39
+ **Execute as**: fullstack-dev
40
+ **Delegation**: forbidden
41
+ **Working branch**: feat/example
42
+ **Plan Path**: .mstar/plans/20260717-example.md
43
+
44
+ **IDENTITY:** You ARE `fullstack-dev`. Act as `fullstack-dev` for this task.
45
+
46
+ Load: `mstar-harness-core` → `mstar-host` → `<host>.md` → `mstar-roles` → `references/fullstack-dev-shared.md` → topic skills per that reference.
47
+
48
+ <task body>
49
+ ```
50
+
51
+ The active host reference shows the matching invoke shape (same turn) — e.g. Kimi/ZCode `Agent` with `subagent_type: "coder"` plus this C5b body.
@@ -0,0 +1,91 @@
1
+ # Plan-Mode Bridge Core (shared)
2
+
3
+ > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and the host reference + this bridge. When plan management is required, also read **`mstar-conventions`** and **`mstar-artifacts`** before creating or claiming any durable plan state. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-conventions`. On conflict, **`mstar-harness-core`** wins.
4
+
5
+ Each per-host bridge (`cursor-plan-mode-bridge.md`, `kimi-plan-mode-bridge.md`, `zcode-plan-mode-bridge.md`, `omp-plan-mode-bridge.md`) loads this core and adds its host-specific plan UX (plan tooling, approval gate, todo UI, command surfaces). Codex Plan Mode reads this core directly via `references/codex.md` (no per-host codex plan bridge; the `/goal` rule is host-agnostic in `mstar-host` SKILL.md).
6
+
7
+ ## Dual-write SSOT rule
8
+
9
+ The host **Plan mode** (session plan file, todos, UI) is a **session UX mirror**. Morning Star **SSOT** lives on disk under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`): the main plan in `{PLAN_DIR}/<plan-id>-<name>.md`, the plan registry in `{HARNESS_DIR}/status.json` (v2 root `workflows[]`) + per-lifecycle `{WORKFLOW_DIR}/<id>/snapshot.json` (`plans[]` rows + leases), the iteration compass under `{ITERATION_DIR}/…` when in a formal iteration. Mirror every durable plan artifact to the repo; never treat the host plan file/URI/UI alone as the handoff surface.
10
+
11
+ ### Priority (hard)
12
+
13
+ 1. User explicit instructions (this turn)
14
+ 2. Project `AGENTS.md` / `CLAUDE.md`
15
+ 3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json` (v2) + workflow snapshot** (harness SSOT)
16
+ 4. Host session plan / todos / UI (session UX mirror) — the host bridge names its surfaces
17
+
18
+ **NEVER** cite only a host plan path / session todo list / chat summary in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
19
+
20
+ ## Before the first plan (bootstrap init)
21
+
22
+ 1. **Read** (minimum): `mstar-conventions`, `mstar-artifacts` (SKILL.md); Prepare gates from `mstar-phase-gates` if not hotfix.
23
+ 2. **Discover** `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-conventions` (prefer `.mstar/` + `.mstar/plans/`; reuse legacy `.agents/` only when already present and `.mstar/` is absent).
24
+ 3. **Initialize** if absent: `{HARNESS_DIR}/`, `{PLAN_DIR}/`, `status.json` from `mstar-artifacts/templates/status.empty.json` (v2 shape), Morning Star process-artifact gitignore set (canonical snippet → `mstar-conventions` SKILL.md「Git 跟踪策略」; `workflows/` / `projects/` subdirs are created on demand by engine writers, not pre-created). Full PM checklist: `mstar-roles/references/project-manager/plan-management.md`.
25
+
26
+ ## Build resume contract
27
+
28
+ Host **Build** / plan approval resumes the current plan in Agent mode. Do **not** assume it replays `/pm` or re-enters a role skill automatically.
29
+
30
+ First action after Build, before product-code edits:
31
+
32
+ 1. Reload the harness entry: `mstar-harness-core` → `mstar-host` host reference → this bridge.
33
+ 2. If the plan is a Morning Star plan, resume as `project-manager` for coordination and dispatch only.
34
+ 3. Read the SSOT plan and `status.json`; use them as the source of truth over the host plan URI/UI.
35
+ 4. For each implement/code todo, require a PM Assignment with `Execute as`, `Delegation`, `Working branch` or `Branch policy`, and SSOT `Plan Path`.
36
+ 5. If the Assignment or SSOT state is missing, report **Blocked** and repair the harness state before implementation.
37
+
38
+ Allowed in the parent Build session: plan/status maintenance, routing decisions, Assignment writing, and host task dispatch.
39
+
40
+ Not allowed in the parent Build session by default: product implementation, test implementation, QC execution, QA execution, deployment, or ops changes. Those follow the normal PM dispatch rules unless the user explicitly overrides the harness.
41
+
42
+ ## CreatePlan: fixed bootstrap todos (prefix)
43
+
44
+ **Emit these three todos first**, in order, **before** any implement / code todos. Do **not** mark implement todos in progress until all three are **done**.
45
+
46
+ | Todo ID (use in title) | Goal | On-disk outcome |
47
+ |------------------------|------|-----------------|
48
+ | **`harness-init`** | Bootstrap harness tree | `{HARNESS_DIR}/`, `{PLAN_DIR}/`, process-artifact gitignore set, `status.json` (v2) initialized (`workflows/` / `projects/` created on demand by engine writers) |
49
+ | **`spec-register`** | Register plan in SSOT | New root `workflows[]` entry (`{HARNESS_DIR}/status.json` v2) + `plans[]` row in `{WORKFLOW_DIR}/<id>/snapshot.json` (`id`, `status`, `file`, `metadata`); spec stub in `{SPECS_DIR}` or plan frontmatter |
50
+ | **`mirror-plan`** | SSOT main plan file | `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes aligned to the host plan body |
51
+
52
+ After the host plan is created, keep the host plan body and mirror file **in sync** when scope changes (update both in the same coordination round).
53
+
54
+ ## Implement todo completion gate (every code todo)
55
+
56
+ **Before marking the todo done:**
57
+
58
+ 1. **Commit**: `git add` + `git commit` on the authorized **Working branch** for this **task id** (one commit per task unless PM explicitly allowed batched commits in Assignment).
59
+ 2. **Plan checkbox**: Set `- [x]` on the matching line in `{PLAN_DIR}/<plan-id>-<name>.md`.
60
+ 3. **status.json / snapshot** (when PM round requires): bump the snapshot plan row `plans[].status` (e.g. `InProgress`) or append coordination notes to `{WORKFLOW_DIR}/<id>/notes.jsonl` per `mstar-artifacts`.
61
+ 4. **Evidence**: Record real `git log -1 --oneline` in Completion Report **Git** (or the plan-mode status note if executing as PM in Plan mode).
62
+
63
+ **NEVER**
64
+
65
+ - Mark implement todos done without a commit when tracked files changed.
66
+ - Batch all work into one closing commit unless PM documented an exception.
67
+ - Mark plan-level `Done` in `status.json` without PM/QA authority and without recorded **`QA gate`** (`mandatory` fulfilled or `pm-acceptance` checklist per `qa-trigger-matrix.md`).
68
+
69
+ Dev-role NEVER rules also apply when executing as implementer: `mstar-roles/references/fullstack-dev-shared.md` (Git NEVER).
70
+
71
+ ## `mstar-iteration` Phase 1 in Plan mode (shared gate)
72
+
73
+ - **Single plan session**: use **one** plan file (host or SSOT draft); iterate the **same** file in place with feedback-driven edits. If a duplicate plan file was created by mistake: merge into the original, delete the duplicate.
74
+ - **Do not** run Review & Edit, commit, or create the integration branch until the user approves implementation (host approval gate: **Build** / **`ExitPlanMode`** / plan resolve). Plan mode ≠ executing todos — approval is the Phase 1 executable gate (Review chain, lock, branch).
75
+ - Prepare phase (`specify → clarify → plan`) still applies; the mirrored plan is the harness **`plan`** artifact, not a substitute for clarify.
76
+ - Branch policy in the plan session: write **recommended** `iteration_base_branch` / `target_branch` (+ short rationale) into the plan — do **not** silently default to `main`/`master`.
77
+ - Host plan approval is **not** Morning Star **Done**. Implementation still follows phase gates, per-task commits, QC, and QA per the SSOT plan.
78
+
79
+ ## Anti-patterns (shared)
80
+
81
+ | Anti-pattern | Fix |
82
+ |--------------|-----|
83
+ | Host plan only, no `{HARNESS_DIR}` files | Run bootstrap todos; write mirror plan + status.json/snapshot |
84
+ | Todo done, no commit | Commit per task; paste `git log -1` evidence |
85
+ | Drift between host plan and SSOT plan | Update both in same round |
86
+ | Host plan URI as Plan Path | Use `{PLAN_DIR}/...` path |
87
+ | Skip `spec-register` | Add the snapshot `plans[]` row + root `workflows[]` entry before implement |
88
+ | Build starts coding in the parent session | Resume PM context; dispatch implement work or block on missing Assignment |
89
+ | Host plan approval treated as Done authority | Check harness plan/status/QC/QA gates first |
90
+ | Resume starts coding from host chat summary | Reload harness context and SSOT plan/status first |
91
+ | Phase 1 Plan mode: Review / commit / branch before Build | Keep Pre-Build document-only; execute those todos after approval |
@@ -0,0 +1,61 @@
1
+ # Codex host reference
2
+
3
+ Load when **`mstar-host`** detection resolves **codex** (Codex app/CLI session, `/plan` / `/goal` slash commands, Goal tools, or Codex tool namespaces such as `functions.*`, `codex_app.*`, `tool_search`, `image_gen`, or Browser plugin tools).
4
+
5
+ Plan Mode: read **`references/_shared/plan-mode-bridge-core.md`** when Codex Plan Mode (`/plan`) is active. Goal Mode (`/goal`, goal tools, or goal progress controls) follows the host-agnostic **`/goal`** rule in `mstar-host` SKILL.md — applicability is by the `/goal` command, not host identity. Codex session plans, UI todos, and goal text are not durable harness SSOT.
6
+
7
+ Parallel PM dispatch: read **`parallel-dispatch.md`** only when Codex exposes an actual multi-agent / Task-style invocation tool. If no callable invoke tool exists, Assignment Markdown is coordination text only; do **not** claim subagent dispatch.
8
+
9
+ ## Codex-only context
10
+
11
+ - Plugin source: `.codex-plugin/plugin.json`.
12
+ - Runtime skills: repo `skills/` mounted by the Codex plugin (`"skills": "./skills/"`).
13
+ - Custom agent source: repo `codex/agents/*.toml`; CLI/manual install links these into `~/.codex/agents/` or project `.codex/agents/`.
14
+ - **`/pm`** or **`pm` skill**: force PM entry → `mstar-roles` → `project-manager.md` (Codex primary; Cursor/OpenCode for general per-plan work). **`commands/`** when running iteration Phase 1–5; project CLI install (`mstar-harness init --target codex --scope project`) materializes `iteration-start`, `iteration-drive`, and `iteration-loop` as `.agents/skills/<name>/SKILL.md` symlinks.
15
+ - Role files under root `agents/` are for hosts that load OpenCode/Cursor-style agent shells; Codex uses `codex/agents/*.toml` and still loads `mstar-roles` references directly.
16
+ - Tool and plugin availability can be lazy-loaded or session-dependent. Use the tools actually present in the current session; do not infer capability from documentation alone.
17
+
18
+ ## Skill loading
19
+
20
+ 1. Read `mstar-harness-core`.
21
+ 2. Read `mstar-host` and this Codex reference.
22
+ 3. If Plan Mode is active, read `references/_shared/plan-mode-bridge-core.md`; Goal Mode follows the `/goal` rule in `mstar-host` SKILL.md.
23
+ 4. Load `mstar-roles` and the active role reference.
24
+ 5. Load topic skills on demand per the role reference.
25
+
26
+ Use skill names in prompts and references. Avoid absolute local paths unless the user is maintaining this repository or the skill is not installed and must be read from the checkout. Skill-root resolve (plugin `skills/<name>/`, project `.agents/skills/<name>/`) → `mstar-host` § Resolve loaded skill root.
27
+
28
+ ## Clarify
29
+
30
+ - Codex does not imply an OpenCode-style `question` tool.
31
+ - If a structured user-input tool is available in the active mode, use it for concise 1-3 choice decisions.
32
+ - Otherwise ask one concise Markdown question only after codebase exploration cannot answer it.
33
+ - `update_plan` / local todo UI is session progress only; it does not replace `{PLAN_DIR}` plans or `{HARNESS_DIR}/status.json` (v2 root `workflows[]`) + `{WORKFLOW_DIR}/<id>/snapshot.json` (`plans[]` rows).
34
+ - Codex Goal Mode objective is completion criteria for the host thread, not Morning Star Done authority; mirror it into the SSOT plan when the work is implementation-sized.
35
+
36
+ ## Dispatch and role execution
37
+
38
+ - **No invoke tool / no linked custom agent = no dispatch**: printing `## Assignment` does not start another Codex worker.
39
+ - If Codex exposes custom-agent / multi-agent tools and matching Morning Star agents are linked, PM may dispatch through those tools and must follow `parallel-dispatch.md`.
40
+ - If no invoke tool is present when dispatch is required, return **`Blocked`** — report missing invoke capability to the user. Do not substitute single-session role execution in the PM thread unless the user explicitly overrides harness dispatch for this turn.
41
+ - QC: N rules → **`parallel-dispatch.md`** (**`Execution mode: sdd`** → N=3; **`inline`** → N=1) when a callable invoke tool exists. Cannot emit required **N** → **`Blocked`**.
42
+ - Leaf executors still follow `mstar-dispatch-gates`: no recursive Task/subagent calls unless Assignment says `Delegation: allowed (...)`.
43
+
44
+ ## Files, shell, and approvals
45
+
46
+ - Prefer `rg` / `rg --files` for search and `apply_patch` for manual edits.
47
+ - Respect Codex sandbox and approval prompts. If a required command fails because of sandbox or network restrictions, request escalation through the host approval mechanism.
48
+ - Do not edit global Codex plugin metadata, marketplace files, credentials, secrets, or user config without explicit user consent.
49
+ - Browser, image, document, spreadsheet, presentation, and automation capabilities are host tools. Use them only when the user request or verification need calls for them.
50
+
51
+ ## Git and final evidence
52
+
53
+ - Git work still follows `mstar-branch-worktree` and the Assignment `Working branch` / `Branch policy`.
54
+ - Codex app git directives, when available, are audit annotations only. Emit them only after the underlying git action succeeds; never use a directive as a substitute for staging, committing, pushing, or PR creation evidence.
55
+ - Completion reports should cite concrete commands, artifacts, and commit lines when required by the Assignment.
56
+
57
+ ## Gotchas
58
+
59
+ - Codex plugin install gives skills; Morning Star role subagents require custom agent TOML files linked from `codex/agents/`.
60
+ - Tool discovery (`tool_search`) can reveal capabilities, but availability is not authorization; Assignment `Delegation` still controls use.
61
+ - Session plans, Goal Mode text, chat summaries, and UI todos are not durable harness SSOT unless mirrored to `{HARNESS_DIR}`.