@mstar-harness/opencode 0.6.6 → 0.6.7
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,6 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: mstar-host
|
|
3
|
-
description: Morning Star host adapter (OpenCode, Cursor, Codex). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/@agent-id invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus sandboxed tools
|
|
3
|
+
description: Morning Star host adapter (OpenCode, Cursor, Codex). Use after mstar-harness-core whenever host entry, clarify, dispatch, or plan UX differs by platform - OpenCode question/@agent-id invoke, Cursor /pm and CreatePlan/SwitchMode dual-write and Task parallel QC, Codex plugin skills plus Plan/Goal Mode, sandboxed tools, and tool discovery. Auto-detect host from session tools; then Read references/<host>.md. Always load after mstar-harness-core.
|
|
4
4
|
---
|
|
5
5
|
|
|
6
6
|
# Morning Star Host Adapter
|
|
@@ -30,7 +30,7 @@ Use **capability signals** (not filesystem paths):
|
|
|
30
30
|
| **CreatePlan** / **SwitchMode** available | `cursor` | `references/cursor.md`; Plan mode also `references/cursor-plan-mode-bridge.md` |
|
|
31
31
|
| **`question`** tool or PM **`@<agent-id>`** subagent invoke | `opencode` | `references/opencode.md` |
|
|
32
32
|
| **Task** + `subagent_type`, no CreatePlan | `cursor` | `references/cursor.md` |
|
|
33
|
-
| **Codex app/CLI/plugin context**, `functions.*`, `codex_app.*`, `tool_search`, Browser plugin tools | `codex` | `references/codex.md` |
|
|
33
|
+
| **Codex app/CLI/plugin context**, `/plan`, `/goal`, Goal tools, `functions.*`, `codex_app.*`, `tool_search`, Browser plugin tools | `codex` | `references/codex.md`; Plan/Goal mode also `references/codex-plan-goal-mode-bridge.md` |
|
|
34
34
|
| Still ambiguous | - | Read sections in **`cursor.md`**, **`opencode.md`**, and **`codex.md`** that match tools you have; **`mstar-harness-core` wins** on conflict |
|
|
35
35
|
|
|
36
36
|
## Parallel dispatch (invoke-capable hosts)
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Codex Plan / Goal Mode x Harness Bridge
|
|
2
|
+
|
|
3
|
+
> **Load order**: Read **`mstar-harness-core`** first, then **`mstar-host`** and **`references/codex.md`**. 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
|
+
## Purpose
|
|
6
|
+
|
|
7
|
+
Codex **Plan Mode** (`/plan`) and **Goal Mode** (`/goal`) are host collaboration surfaces:
|
|
8
|
+
|
|
9
|
+
- **Plan Mode** helps shape a plan inside the active Codex conversation.
|
|
10
|
+
- **Goal Mode** attaches a persistent objective and success criteria to the active thread.
|
|
11
|
+
|
|
12
|
+
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.
|
|
13
|
+
|
|
14
|
+
## Priority (hard)
|
|
15
|
+
|
|
16
|
+
1. User explicit instructions (this turn)
|
|
17
|
+
2. Project `AGENTS.md` / `CLAUDE.md`
|
|
18
|
+
3. **`{HARNESS_DIR}` / `{PLAN_DIR}` / `status.json`** (harness SSOT)
|
|
19
|
+
4. Codex Goal Mode objective / progress controls
|
|
20
|
+
5. Codex Plan Mode output, `update_plan`, UI todos, chat summaries
|
|
21
|
+
|
|
22
|
+
**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.
|
|
23
|
+
|
|
24
|
+
## When this applies
|
|
25
|
+
|
|
26
|
+
- Codex Plan Mode is active (`/plan`, Plan collaboration mode, or host guidance says planning-only).
|
|
27
|
+
- Codex Goal Mode is active (`/goal`, host goal controls, or goal tools such as `create_goal`, `get_goal`, `update_goal`).
|
|
28
|
+
- Morning Star plugin or `/pm` is in use under Codex.
|
|
29
|
+
|
|
30
|
+
## Codex Plan Mode
|
|
31
|
+
|
|
32
|
+
Use Plan Mode to clarify, inspect, compare approaches, and draft the harness plan. Do **not** treat Plan Mode output as a durable artifact.
|
|
33
|
+
|
|
34
|
+
Before implementation or PM dispatch:
|
|
35
|
+
|
|
36
|
+
1. Discover `{HARNESS_DIR}` / `{PLAN_DIR}` per `mstar-plan-conventions`.
|
|
37
|
+
2. Ensure `{HARNESS_DIR}/status.json` exists or initialize it via `mstar-plan-artifacts` templates.
|
|
38
|
+
3. Register a `plans[]` row in `status.json` when a Morning Star plan is needed.
|
|
39
|
+
4. Write `{PLAN_DIR}/<plan-id>-<name>.md` with task checkboxes, branch policy, verification, and roadmap / deferred scope when applicable.
|
|
40
|
+
5. Use the SSOT plan path in Assignment and Completion Report evidence.
|
|
41
|
+
|
|
42
|
+
Allowed in Plan Mode: exploration, clarify questions, spec/plan drafting, `.mstar/` initialization, SSOT plan/status edits, PM routing decisions.
|
|
43
|
+
|
|
44
|
+
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.
|
|
45
|
+
|
|
46
|
+
## Codex Goal Mode
|
|
47
|
+
|
|
48
|
+
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.
|
|
49
|
+
|
|
50
|
+
When starting or receiving a Goal Mode objective:
|
|
51
|
+
|
|
52
|
+
1. If the goal is implementation-sized or long-running, create or update the harness SSOT (`status.json` + `{PLAN_DIR}` plan) before implementation.
|
|
53
|
+
2. Mirror the goal's success criteria into the SSOT plan as acceptance / verification criteria.
|
|
54
|
+
3. If the goal changes, update both Goal Mode text/progress and the SSOT plan/status in the same coordination round.
|
|
55
|
+
4. If the goal conflicts with the SSOT, pause or report **Blocked** until PM/user resolves scope.
|
|
56
|
+
|
|
57
|
+
### Goal completion gate
|
|
58
|
+
|
|
59
|
+
Only mark a Codex goal complete when all applicable harness gates are satisfied:
|
|
60
|
+
|
|
61
|
+
- Required plan checkboxes are complete in `{PLAN_DIR}`.
|
|
62
|
+
- `status.json` reflects the current lifecycle state.
|
|
63
|
+
- Required commits exist on the authorized branch.
|
|
64
|
+
- Verification evidence is recorded.
|
|
65
|
+
- QC/QA authority has passed when the plan requires InReview / Done gates.
|
|
66
|
+
|
|
67
|
+
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.
|
|
68
|
+
|
|
69
|
+
## Resume / compaction
|
|
70
|
+
|
|
71
|
+
Codex can resume threads and compact context. On resume, before editing product code:
|
|
72
|
+
|
|
73
|
+
1. Reload `mstar-harness-core` -> `mstar-host` -> `references/codex.md` -> this bridge.
|
|
74
|
+
2. If Goal Mode is active, read the current goal and compare it with `{HARNESS_DIR}/status.json` and the active SSOT plan.
|
|
75
|
+
3. Treat `.mstar/` as durable truth over chat summaries or UI todos.
|
|
76
|
+
4. If the active role or Assignment is missing, resume as PM for coordination and dispatch only.
|
|
77
|
+
|
|
78
|
+
## `/pm` under Codex Plan / Goal Mode
|
|
79
|
+
|
|
80
|
+
When `/pm` runs under Plan or Goal Mode:
|
|
81
|
+
|
|
82
|
+
- `/pm` is still the force entry into Morning Star PM behavior.
|
|
83
|
+
- Prepare phase (`specify -> clarify -> plan`) still applies unless the task qualifies for a documented hotfix path.
|
|
84
|
+
- 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.
|
|
85
|
+
- Without an actual callable subagent/multi-agent tool, Assignment Markdown is coordination text only; execute serially in-session or report Blocked for rerouting.
|
|
86
|
+
|
|
87
|
+
## Anti-patterns
|
|
88
|
+
|
|
89
|
+
| Anti-pattern | Fix |
|
|
90
|
+
|--------------|-----|
|
|
91
|
+
| `/plan` output only, no `{HARNESS_DIR}` files | Write SSOT plan + `status.json` entry before implementation |
|
|
92
|
+
| `update_plan` todo done, no commit/evidence | Commit or record required evidence before completion |
|
|
93
|
+
| Goal objective treated as Done authority | Check harness plan/status/QC/QA gates first |
|
|
94
|
+
| Goal changed but `.mstar/` still has old scope | Update Goal Mode and SSOT in the same round |
|
|
95
|
+
| Resume starts coding from chat summary | Reload harness context and SSOT plan/status first |
|
|
96
|
+
| Assignment Plan Path points at Codex transcript/goal | Use `{PLAN_DIR}/...` path |
|
|
97
|
+
|
|
98
|
+
## Related skills
|
|
99
|
+
|
|
100
|
+
- `mstar-plan-conventions` - discover `{HARNESS_DIR}`, `{PLAN_DIR}`, legacy layouts
|
|
101
|
+
- `mstar-plan-artifacts` - `status.json`, plan checkboxes, reports, residuals
|
|
102
|
+
- `mstar-phase-gates` - Prepare / Execute and Done authority
|
|
103
|
+
- `mstar-dispatch-gates` - Assignment, Delegation, anti-recursion
|
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
Load when **`mstar-host`** detection resolves **codex** (Codex app/CLI session, Codex plugin installed from `.codex-plugin/plugin.json`, Codex custom agents linked from `codex/agents/*.toml`, 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.
|
|
6
|
+
|
|
5
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.
|
|
6
8
|
|
|
7
9
|
## Codex-only context
|
|
@@ -17,8 +19,9 @@ Parallel PM dispatch: read **`parallel-dispatch.md`** only when Codex exposes an
|
|
|
17
19
|
|
|
18
20
|
1. Read `mstar-harness-core`.
|
|
19
21
|
2. Read `mstar-host` and this Codex reference.
|
|
20
|
-
3.
|
|
21
|
-
4. Load
|
|
22
|
+
3. If Plan Mode or Goal Mode is active, read `codex-plan-goal-mode-bridge.md`.
|
|
23
|
+
4. Load `mstar-roles` and the active role reference.
|
|
24
|
+
5. Load topic skills on demand per the role reference.
|
|
22
25
|
|
|
23
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.
|
|
24
27
|
|
|
@@ -28,6 +31,7 @@ Use skill names in prompts and references. Avoid absolute local paths unless the
|
|
|
28
31
|
- If a structured user-input tool is available in the active mode, use it for concise 1-3 choice decisions.
|
|
29
32
|
- Otherwise ask one concise Markdown question only after codebase exploration cannot answer it.
|
|
30
33
|
- `update_plan` / local todo UI is session progress only; it does not replace `{PLAN_DIR}` plans or `{HARNESS_DIR}/status.json`.
|
|
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.
|
|
31
35
|
|
|
32
36
|
## Dispatch and role execution
|
|
33
37
|
|
|
@@ -54,4 +58,4 @@ Use skill names in prompts and references. Avoid absolute local paths unless the
|
|
|
54
58
|
|
|
55
59
|
- Codex plugin install gives skills; Morning Star role subagents require custom agent TOML files linked from `codex/agents/`.
|
|
56
60
|
- Tool discovery (`tool_search`) can reveal capabilities, but availability is not authorization; Assignment `Delegation` still controls use.
|
|
57
|
-
- Session plans, chat summaries, and UI todos are not durable harness SSOT unless mirrored to `{HARNESS_DIR}`.
|
|
61
|
+
- Session plans, Goal Mode text, chat summaries, and UI todos are not durable harness SSOT unless mirrored to `{HARNESS_DIR}`.
|