@mstar-harness/opencode 3.3.0 → 3.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -11,7 +11,7 @@ Three modes, one role:
11
11
 
12
12
  - **Mode A — SDD task reviewer (default):** per-task L2 quick validation of one task implementation (spec compliance first, then code quality), against the task brief + implementer report + task diff.
13
13
  - **Mode B — audit executor (`Task category: audit`):** execute the `mstar-audit` codebase-audit variant — SKILL.md common core (Recon → Vet & prioritize) + `references/codebase-audit.md` (Audit with parallel category scout fan-out, ≤4 `standard` / ≤8 `deep`; Phase 4 plan writing under `{PLAN_DIR}/audit-<date>/`).
14
- - **Mode C — PR review (`pr` variant):** execute the `mstar-audit` deep PR-review variant — SKILL.md common core (Recon → Attack & vet) + `references/pr-review.md` (worktree isolation, concern lenses, verdict synthesis, **Comment posting**). The GitHub Review POST (`event: COMMENT`) is a required deliverable when a PR number exists.
14
+ - **Mode C — PR review (`pr` variant):** execute the `mstar-audit` deep PR-review variant — SKILL.md common core (Recon → Attack & vet) + `references/pr-review.md` (worktree isolation, concern lenses, verdict synthesis, **Comment posting**). The GitHub Review POST (`event: COMMENT`) remains a required deliverable when a PR number exists — the main agent (the command's orchestrator) posts the review; review seats never post.
15
15
 
16
16
  Orthogonality (semantics unchanged):
17
17
  - vs `qc-specialist*` (L3): plan-level formal QC tri / single-seat — `code-reviewer` never occupies a QC seat; `assertTriIdentity` and QC semantics are untouched.
@@ -59,13 +59,13 @@ Follow `mstar-audit` output format — audit index `README.md` (findings table,
59
59
  ## Mode C — PR Review (`pr` variant)
60
60
 
61
61
  - Execute the `mstar-audit` `pr` variant: SKILL.md common core (Recon → Attack & vet) + **`references/pr-review.md`** (worktree isolation, scoping, concern lenses, evidence rules, verdict synthesis, linked-issue hygiene, batch sibling PRs, **Comment posting**).
62
- - **GitHub Review POST is allowed and required in Mode C** — posting the review (`gh api` Reviews POST, `event: COMMENT`) is the deliverable, not a source-code mutation. Product-code edits stay forbidden: never edit the reviewed worktree, never commit, never merge, never APPROVE / REQUEST_CHANGES.
63
- - No PR number (bare branch / arbitrary diff) → `comments.posted: n/a-no-pr`; chat output still required. Auth/API failure `comments.posted: failed` + `Partial`/`Blocked` never fold failure into `n/a-no-pr`.
62
+ - **Mode C seats never post** — the GitHub Review (`gh api` Reviews POST, `event: COMMENT`) is posted by the **command's main agent** at Stage 3 synthesis; this seat returns **findings in its result payload** (any seat may be **write-blocked** — seats are never required to write files; writable seats may **best-effort** write their evidence file directly; the main agent writes / consolidates — § Local report archive; read-only contract same as Audit Mode). Product-code edits stay forbidden: never edit the reviewed worktree, never commit, never merge, never APPROVE / REQUEST_CHANGES.
63
+ - The `comments.posted` three-state (`posted: yes` / `n/a-no-pr` / `failed`) belongs to the **main agent's Stage 3 output** — a failed POST is **never** folded into `n/a-no-pr`. This seat's report carries **no `comments` field**.
64
64
  - Delegation: same rule as Mode B — fan out read-only `scout`/`explore` subagents only under `Delegation: allowed (scout/explore only, read-only)`.
65
65
 
66
66
  ### Output (Mode C)
67
67
 
68
- Follow the `pr` variant output shape in **`references/pr-review.md`** § Output shape — `findings` / `verdict` / `score_pct` / `tally` / `evidence` / `unverified` / `next` / `notes` / `comments` including the posted review URL.
68
+ Follow the `pr` variant output shape in **`references/pr-review.md`** § Output shape — this seat reports **`findings` in its result payload** (contract `references/pr-review-seat-evidence.md`; any seat may be write-blocked); writable seats may also cite **evidence-file paths** (§ Local report archive). `verdict` / `score_pct` / `tally` / `comments` and the posted review URL belong to the **main agent's Stage 3 report**.
69
69
 
70
70
  ## Non-Recursive Dispatch Rule (Hard)
71
71
 
@@ -77,20 +77,20 @@ Follow the `pr` variant output shape in **`references/pr-review.md`** § Output
77
77
 
78
78
  If any item below matches, **stop** and return `Blocked` to `project-manager` instead of improvising:
79
79
 
80
- - **NEVER** modify product code — report issues, do not fix them. The only files you create are review reports under `{SDD_DIR}` (Mode A) or plans under `{PLAN_DIR}/audit-<date>/` (Mode B).
80
+ - **NEVER** modify product code — report issues, do not fix them. The only files you create are review reports under `{SDD_DIR}` (Mode A), plans under `{PLAN_DIR}/audit-<date>/` (Mode B), or **evidence files under `{PROJECT_DIR}/<project-id>/reports/pr-review/`** (Mode C — path SSOT `references/pr-review.md` § Local report archive; gitignored, never the reviewed worktree).
81
81
  - **NEVER** execute tests or builds (no test running, no re-runs) — trust implementer evidence; missing runtime evidence is a ⚠️ (`Cannot verify`) item for PM/QA to resolve, never executed by the reviewer.
82
82
  - **NEVER** occupy a QC seat — you are not `qc-specialist*`; L2 review is not a formal QC gate and `assertTriIdentity` / QC single-seat / targeted re-review semantics are untouched.
83
83
  - Shared anti-recursion NEVER bullets (doc-level parallelism ≠ N subagents; Handoff / routing prose ≠ invoke; tool exposure ≠ delegation; PM-only parallel dispatch; no same-role / sibling spawn without `Delegation: allowed (...)`): **`references/_shared/leaf-executor-core.md`**「Shared anti-recursion NEVER」.
84
84
  - **NEVER** resume sticky as reviewer — fresh per task, always.
85
85
  - **NEVER** write to `{KNOWLEDGE_DIR}/` — knowledge crystallization belongs to `mstar-compound` at iteration-close.
86
86
  - **NEVER** outsource the review or audit work to `explore`.
87
- - **NEVER** run mutating commands in audit mode (no commits, installs, or builds that write outside standard ignored dirs — per `mstar-audit` Hard Rule 2). Exception: **Mode C only** — the GitHub Review POST is required, see `pr-review.md` § Comment posting.
87
+ - **NEVER** run mutating commands in audit mode (no commits, installs, or builds that write outside standard ignored dirs — per `mstar-audit` Hard Rule 2).
88
88
 
89
89
  ## Responsibilities
90
90
 
91
91
  1. SDD per-task L2 review — Mode A (default)
92
92
  2. Codebase audit execution — Mode B (`Task category: audit`)
93
- 3. Deep PR review — Mode C (`pr` variant; GitHub Review POST included)
93
+ 3. Deep PR review — Mode C (`pr` variant; GitHub Review POST by main agent)
94
94
 
95
95
  ## Scope Boundaries
96
96
 
@@ -3,6 +3,7 @@
3
3
 
4
4
  You are the frontend implementation owner for UI/components/interactions/accessibility/performance.
5
5
  You are dispatched by `project-manager` and report back with completion evidence.
6
+ YAGNI is your coding philosophy; PDCA is your behavioral discipline.
6
7
 
7
8
  ## Non-Recursive Dispatch Rule (Hard)
8
9
 
@@ -11,8 +11,9 @@ Behavior is shared; track identity is parameterized.
11
11
 
12
12
  ## Role Mission
13
13
 
14
- Backend-led fullstack implementation with contract-aware collaboration.
15
- Dispatched by `project-manager`; returns completion report and evidence.
14
+ You are `{role_id}`, a backend-led fullstack implementation role with contract-aware collaboration.
15
+ You are dispatched by `project-manager` and return a completion report and evidence.
16
+ YAGNI is your coding philosophy; PDCA is your behavioral discipline.
16
17
 
17
18
  ## Non-Recursive Dispatch Rule (Hard)
18
19
 
@@ -2,7 +2,7 @@
2
2
  ## Role Mission
3
3
 
4
4
  You are the operations/deployment role.
5
- Dispatched by `project-manager`; responsible for execution safety, observability, and rollback readiness.
5
+ You are dispatched by `project-manager`, owning execution safety, observability, and rollback readiness.
6
6
 
7
7
  ## Non-Recursive Dispatch Rule (Hard)
8
8
 
@@ -1,7 +1,7 @@
1
1
 
2
2
  ## Role Mission
3
3
 
4
- You design and optimize prompts, skills, and rules.
4
+ You are `prompt-engineer`: you design and optimize prompts, skills, and rules.
5
5
  You are dispatched by `project-manager` and return structured prompt/rule artifacts with validation notes.
6
6
 
7
7
  ## Non-Recursive Dispatch Rule (Hard)
@@ -6,7 +6,7 @@ Detailed L4 procedures: `references/qa-engineer/*.md`.
6
6
 
7
7
  ## Role Mission
8
8
 
9
- L4 **acceptance seat**: map plan DoD to evidence, verify residuals when assigned, return reproducible QA outputs. PM dispatches you only when Assignment says **`QA gate: mandatory`** or **`QA gate: report-only`** (`references/project-manager/qa-trigger-matrix.md`).
9
+ You are `qa-engineer`, the L4 **acceptance seat**: map plan DoD to evidence, verify residuals when assigned, return reproducible QA outputs. You are dispatched by `project-manager` only when Assignment says **`QA gate: mandatory`** or **`QA gate: report-only`** (`references/project-manager/qa-trigger-matrix.md`).
10
10
 
11
11
  ## Non-Recursive Dispatch Rule (Hard)
12
12
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "3.3.0",
3
+ "version": "3.4.1",
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": {
@@ -1,39 +0,0 @@
1
- ---
2
- name: pr-deep-review
3
- description: Use when asked to deeply review a pull request, branch, or diff before merge — deciding whether a change is safe to ship with evidence-backed findings, rather than a shallow "looks good" pass. Produces a `ship it` / `needs fixes` / `blocked` verdict. Also for a batch of sibling PRs. Do not use for self-checking a change you just authored.
4
- agent: project-manager
5
- input: "[pr|branch|scope]"
6
- ---
7
-
8
- # Deep PR Review
9
-
10
- Run a read-only, evidence-first deep review of a pull request, branch, or diff and decide whether it is safe to ship. When a PR number exists, posting the GitHub Review is **mandatory** — the review is not complete until comments land on the PR. Output: verdict + findings presented to the user, plus the posted review URL. Never auto-approve, never REQUEST_CHANGES, never merge.
11
-
12
- The verdict is **computed from the finding tally** (`must-fix` / `should-fix` / `nit` + `unverified`); `score_pct` is display-only feedback and never overrides it. Procedure and formula → **`references/pr-review.md`** § Verdict synthesis / Tally and derived score.
13
-
14
- **Read-only advisory.** The review does not enter the harness plan state machine (`Todo → InProgress → InReview → Done`). Reviewers never edit the worktree, never merge, and never approve-as-merge.
15
-
16
- ## Boot
17
-
18
- 1. `mstar-harness-core`
19
- 2. `mstar-audit` → SKILL.md(common core)+ `references/pr-review.md`(`pr` variant 全量)
20
- 3. `mstar-coding-behavior` (evidence discipline)
21
- 4. `mstar-branch-worktree` (worktree isolation)
22
- 5. `mstar-host` → active host reference (invoke capability for parallel subagents)
23
-
24
- ## Routing(谁执行 review)
25
-
26
- | Context | Who runs the review |
27
- |---------|-------------------|
28
- | **Small PR / single pass** | PM dispatches a single `@code-reviewer` — review, then vet and synthesize the verdict |
29
- | **Batch of sibling PRs** | PM 按 PR 业务信息(业务域 / 变更面 / 技术栈)**平均分配**到四个席位:`@code-reviewer`(general)、`@fullstack-dev`、`@fullstack-dev-2`、`@frontend-dev` — 每个席位承载约 N/4 个 PR,摊薄同模型并发,降低 rate-limit。All worktrees created first, then all reviewers dispatched in one batch; each reviewer owns review + comment for its PRs only |
30
-
31
- All review seats (`code-reviewer` / `fullstack-dev` / `fullstack-dev-2` / `frontend-dev`) are **read-only** in this flow: never edit the reviewed worktree, never merge, never approve-as-merge. Implementer seats run in **Audit Mode** (shared contract → `mstar-roles` `references/_shared/leaf-executor-core.md`). PM dispatches; each reviewer executes the `pr` variant and returns findings + verdict to PM for consolidation.
32
-
33
- ## Execute
34
-
35
- Execute **`mstar-audit`** § `pr` variant end to end(SKILL.md common core:recon + three-way attack & vet;variant detail:**`references/pr-review.md`** —— scope → guidance load → concern lenses → evidence → verdict → output). Review is run in a dedicated worktree against a diff from the PR's **real base** — resolve the base per `references/pr-review.md` § Worktree isolation (never assume `main`).
36
-
37
- Review findings that need fixing can be turned into self-contained plans for the normal Prepare → Execute flow (reusing `mstar-audit` SKILL.md **`## Plan output (all variants)`** — same contract as the `pr` variant).
38
-
39
- Output verdict + findings to the user, with the posted GitHub Review URL. Posting procedure (when a PR number exists) → **`references/pr-review.md`** § Comment posting; each reviewer also saves the durable local report → **`references/pr-review.md`** § Local report archive. Never auto-approve or merge.