@mstar-harness/opencode 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,17 @@ The monorepo root [CHANGELOG.md](../../CHANGELOG.md) summarizes cross-surface re
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [2.0.6] - 2026-08-10
10
+
11
+ ### Harness
12
+
13
+ - Added a **host-agnostic full-flow goal rule** in `mstar-host`: any host exposing a `/goal` command (Codex Goal Mode, omp, future code agents) must set the goal to running the **complete flow to its end** — whether advancing an iteration (start → per-plan cycles → close → PR delivery → merge-ready loop) or non-iteration work (specify → clarify → plan → tasks → implement → plan QC tri + QA gate → Done) — never a sub-stage goal.
14
+ - Removed the Codex-specific `references/codex-plan-goal-mode-bridge.md`; goal text rules now live host-agnostically in `mstar-host` SKILL.md, and Codex Plan Mode reads `references/_shared/plan-mode-bridge-core.md` directly.
15
+
16
+ - Version alignment with harness **2.0.6** (no OpenCode package API change).
17
+
18
+ See root [CHANGELOG.md](../../CHANGELOG.md) **2.0.6**.
19
+
9
20
  ## [2.0.5] - 2026-08-10
10
21
 
11
22
  ### Harness
@@ -29,10 +29,10 @@ Detect from **session tool shapes and available commands** — not from plugin m
29
29
  |--------|------|-----------|
30
30
  | **`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` |
31
31
  | **`question`** tool, or **`task`** tool with **`subagent`** (singular) — no `tasks[]` batch | `opencode` | `references/opencode.md` |
32
- | **`task`** tool with **`agent`** / **`tasks[]`** batch, **`ask`**, **`hub`** | `omp` | `references/omp.md`; Plan mode also `references/omp-plan-mode-bridge.md` |
32
+ | **`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` |
33
33
  | **`Agent`** / **`AskUserQuestion`** / **`EnterPlanMode`** + **`AgentSwarm`** (Kimi-only) | `kimi` | `references/kimi.md`; Plan mode also `references/kimi-plan-mode-bridge.md` |
34
34
  | **`Agent`** / **`AskUserQuestion`** / **`EnterPlanMode`** / **`TodoWrite`**, **no `AgentSwarm`** | `zcode` | `references/zcode.md`; Plan mode also `references/zcode-plan-mode-bridge.md` |
35
- | `/plan`, `/goal` slash commands; **Goal tools**; `functions.*` / `codex_app.*` tool namespaces; `tool_search`; Browser plugin tools | `codex` | `references/codex.md`; Plan/Goal mode also `references/codex-plan-goal-mode-bridge.md` |
35
+ | `/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` |
36
36
  | Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, **`codex.md`**, **`kimi.md`**, **`zcode.md`**, and **`omp.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
37
37
 
38
38
  Order matters: check `cursor` → `opencode` → `omp` → `kimi` → `zcode` → `codex`. `subagent_type` (Cursor) vs `subagent` (OpenCode) vs `agent`/`tasks[]` (omp) is the sharpest split among the Task-based hosts.
@@ -43,6 +43,15 @@ Order matters: check `cursor` → `opencode` → `omp` → `kimi` → `zcode`
43
43
 
44
44
  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.
45
45
 
46
+ ## `/goal` directive (host-agnostic)
47
+
48
+ **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:
49
+
50
+ - **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").
51
+ - **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").
52
+
53
+ 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.
54
+
46
55
  ## Resolve loaded skill root
47
56
 
48
57
  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).
@@ -2,7 +2,7 @@
2
2
 
3
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-plan-conventions`** and **`mstar-plan-artifacts`** before creating or claiming any durable plan state. Path symbols `{HARNESS_DIR}`, `{PLAN_DIR}`, `{SPECS_DIR}` are defined in `mstar-plan-conventions`. On conflict, **`mstar-harness-core`** wins.
4
4
 
5
- Each per-host bridge (`cursor-plan-mode-bridge.md`, `codex-plan-goal-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).
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
6
 
7
7
  ## Dual-write SSOT rule
8
8
 
@@ -2,7 +2,7 @@
2
2
 
3
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
4
 
5
- Plan / Goal Mode: read **`codex-plan-goal-mode-bridge.md`** when Codex Plan Mode (`/plan`) or Goal Mode (`/goal`, goal tools, or goal progress controls) is active. Codex session plans, UI todos, and goal text are not durable harness SSOT.
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
6
 
7
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
8
 
@@ -19,7 +19,7 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** only when Codex exposes an
19
19
 
20
20
  1. Read `mstar-harness-core`.
21
21
  2. Read `mstar-host` and this Codex reference.
22
- 3. If Plan Mode or Goal Mode is active, read `codex-plan-goal-mode-bridge.md`.
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
23
  4. Load `mstar-roles` and the active role reference.
24
24
  5. Load topic skills on demand per the role reference.
25
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "2.0.5",
3
+ "version": "2.0.6",
4
4
  "description": "Morning Star harness OpenCode plugin — skills bootstrap + engine-backed runtime hooks (status lint, dispatch validation, Enforcement: hard gates).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -36,6 +36,6 @@
36
36
  "access": "public"
37
37
  },
38
38
  "devDependencies": {
39
- "@mstar-harness/engine": "2.0.5"
39
+ "@mstar-harness/engine": "2.0.6"
40
40
  }
41
41
  }
@@ -1,98 +0,0 @@
1
- # Codex Plan / Goal Mode x Harness Bridge
2
-
3
- > **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/codex.md`**, then **`references/_shared/plan-mode-bridge-core.md`** (shared contract) + this bridge. When plan management is required, also read **`mstar-plan-conventions`** and **`mstar-plan-artifacts`** before creating or claiming any durable plan state. On conflict, **`mstar-harness-core`** wins.
4
-
5
- **Shared contract** (dual-write SSOT rule + priority, bootstrap init, Build resume contract, bootstrap todos, implement done-gate, Phase 1 gate, shared anti-patterns) → **`references/_shared/plan-mode-bridge-core.md`**. This bridge covers Codex **Plan Mode** (`/plan`) and **Goal Mode** (`/goal`) specifics only.
6
-
7
- ## Purpose
8
-
9
- Codex **Plan Mode** (`/plan`) and **Goal Mode** (`/goal`) are host collaboration surfaces:
10
-
11
- - **Plan Mode** helps shape a plan inside the active Codex conversation.
12
- - **Goal Mode** attaches a persistent objective and success criteria to the active thread.
13
-
14
- Morning Star durable state still lives under **`{HARNESS_DIR}`** (default `.mstar/`, legacy `.agents/`). This reference prevents Codex session plans, UI todos, goal text, or goal completion from replacing the harness SSOT.
15
-
16
- ## Priority (hard)
17
-
18
- 1–3 → core (user explicit → `AGENTS.md`/`CLAUDE.md` → **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** harness SSOT).
19
-
20
- 4. Codex Goal Mode objective / progress controls
21
- 5. Codex Plan Mode output, `update_plan`, UI todos, chat summaries
22
-
23
- **NEVER** cite only a Codex goal, session plan, UI todo, or chat summary in Assignment **Plan Path**, **Context Loaded**, or Completion Report when `{PLAN_DIR}/<plan-id>-<name>.md` should exist.
24
-
25
- ## When this applies
26
-
27
- - Codex Plan Mode is active (`/plan`, Plan collaboration mode, or host guidance says planning-only).
28
- - Codex Goal Mode is active (`/goal`, host goal controls, or goal tools such as `create_goal`, `get_goal`, `update_goal`).
29
- - Morning Star plugin or `/pm` is in use under Codex.
30
-
31
- ## Codex Plan Mode
32
-
33
- Use Plan Mode to clarify, inspect, compare approaches, and draft the harness plan. Do **not** treat Plan Mode output as a durable artifact.
34
-
35
- Bootstrap before implementation or PM dispatch (discover `{HARNESS_DIR}` / `{PLAN_DIR}`, ensure `status.json`, register a `plans[]` row, write `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes + roadmap; use the SSOT plan path in Assignment and Completion Report evidence) → core.
36
-
37
- Allowed in Plan Mode: exploration, clarify questions, spec/plan drafting, `.mstar/` initialization, SSOT plan/status edits, PM routing decisions.
38
-
39
- Not allowed by default in Plan Mode: product implementation, test implementation, QC execution, QA execution, deployment, or ops changes. Switch to normal execution or dispatch through an actual callable subagent/multi-agent tool first.
40
-
41
- ## Codex Goal Mode
42
-
43
- Goal text is useful as the top-level objective and success criteria, but it is **not** a Morning Star plan, status ledger, PM Assignment, QC report, or QA Done authority.
44
-
45
- When starting or receiving a Goal Mode objective:
46
-
47
- 1. If the goal is implementation-sized or long-running, create or update the harness SSOT (`status.json` + `{PLAN_DIR}` plan) before implementation.
48
- 2. Mirror the goal's success criteria into the SSOT plan as acceptance / verification criteria.
49
- 3. If the goal changes, update both Goal Mode text/progress and the SSOT plan/status in the same coordination round.
50
- 4. If the goal conflicts with the SSOT, pause or report **Blocked** until PM/user resolves scope.
51
-
52
- ### Goal completion gate
53
-
54
- Only mark a Codex goal complete when all applicable harness gates are satisfied:
55
-
56
- - Required plan checkboxes are complete in `{PLAN_DIR}`.
57
- - `status.json` reflects the current lifecycle state.
58
- - Required commits exist on the authorized branch.
59
- - Verification evidence is recorded.
60
- - QC/QA authority has passed when the plan requires InReview / Done gates.
61
-
62
- If the host asks to complete a goal but harness Done authority is missing, report **Blocked** and list the missing artifacts or gate decisions. Do not call a goal-completion tool as a substitute for PM/QC/QA evidence.
63
-
64
- ## Resume / compaction
65
-
66
- Codex can resume threads and compact context. On resume, before editing product code:
67
-
68
- 1. Reload `mstar-harness-core` -> `mstar-host` -> `references/codex.md` -> this bridge.
69
- 2. If Goal Mode is active, read the current goal and compare it with `{HARNESS_DIR}/status.json` and the active SSOT plan.
70
- 3. Treat `.mstar/` as durable truth over chat summaries or UI todos.
71
- 4. If the active role or Assignment is missing, resume as PM for coordination and dispatch only.
72
-
73
- ## `/pm` under Codex Plan / Goal Mode
74
-
75
- When `/pm` runs under Plan or Goal Mode:
76
-
77
- - `/pm` is still the force entry into Morning Star PM behavior.
78
- - Prepare phase (`specify -> clarify -> plan`) still applies unless the task qualifies for a documented hotfix path.
79
- - Goal Mode can hold the high-level objective, but PM must still write Assignment with `Execute as`, `Delegation`, branch policy, SSOT `Plan Path`, and evidence requirements.
80
- - Without an actual callable subagent/multi-agent tool, Assignment Markdown is coordination text only; execute serially in-session or report Blocked for rerouting.
81
-
82
- ## Anti-patterns
83
-
84
- | Anti-pattern | Fix |
85
- |--------------|-----|
86
- | `/plan` output only, no `{HARNESS_DIR}` files | Write SSOT plan + `status.json` entry before implementation |
87
- | `update_plan` todo done, no commit/evidence | Commit or record required evidence before completion |
88
- | Goal objective treated as Done authority | Check harness plan/status/QC/QA gates first |
89
- | Goal changed but `.mstar/` still has old scope | Update Goal Mode and SSOT in the same round |
90
- | Resume starts coding from chat summary | Reload harness context and SSOT plan/status first |
91
- | Assignment Plan Path points at Codex transcript/goal | Use `{PLAN_DIR}/...` path |
92
-
93
- ## Related skills
94
-
95
- - `mstar-plan-conventions` - discover `{HARNESS_DIR}`, `{PLAN_DIR}`, legacy layouts
96
- - `mstar-plan-artifacts` - `status.json`, plan checkboxes, reports, residuals
97
- - `mstar-phase-gates` - Prepare / Execute and Done authority
98
- - `mstar-dispatch-gates` - Assignment, Delegation, anti-recursion