@mstar-harness/opencode 0.7.8 → 1.0.0

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 (46) hide show
  1. package/harness-commands/iteration-drive.md +2 -2
  2. package/harness-commands/iteration-start.md +9 -9
  3. package/harness-skills/mstar-branch-worktree/SKILL.md +10 -10
  4. package/harness-skills/mstar-coding-behavior/SKILL.md +1 -0
  5. package/harness-skills/mstar-dispatch-gates/SKILL.md +24 -13
  6. package/harness-skills/mstar-dispatch-gates/references/leaf-executor-checklist.md +1 -1
  7. package/harness-skills/mstar-harness-core/SKILL.md +9 -6
  8. package/harness-skills/mstar-host/SKILL.md +3 -3
  9. package/harness-skills/mstar-host/references/codex.md +1 -1
  10. package/harness-skills/mstar-host/references/cursor.md +18 -8
  11. package/harness-skills/mstar-host/references/opencode.md +35 -8
  12. package/harness-skills/mstar-host/references/parallel-dispatch.md +25 -7
  13. package/harness-skills/mstar-iteration/SKILL.md +19 -35
  14. package/harness-skills/mstar-phase-gates/SKILL.md +11 -46
  15. package/harness-skills/mstar-plan-artifacts/SKILL.md +1 -0
  16. package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +22 -10
  17. package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +3 -0
  18. package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
  19. package/harness-skills/mstar-plan-conventions/SKILL.md +6 -3
  20. package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +2 -1
  21. package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +1 -1
  22. package/harness-skills/mstar-review-qc/SKILL.md +5 -5
  23. package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +41 -0
  24. package/harness-skills/mstar-roles/SKILL.md +5 -1
  25. package/harness-skills/mstar-roles/references/architect.md +1 -1
  26. package/harness-skills/mstar-roles/references/frontend-dev.md +1 -1
  27. package/harness-skills/mstar-roles/references/fullstack-dev-shared.md +1 -1
  28. package/harness-skills/mstar-roles/references/ops-engineer.md +1 -1
  29. package/harness-skills/mstar-roles/references/product-manager.md +1 -1
  30. package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +11 -6
  31. package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +33 -24
  32. package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +2 -1
  33. package/harness-skills/mstar-roles/references/project-manager.md +23 -20
  34. package/harness-skills/mstar-roles/references/prompt-engineer.md +1 -1
  35. package/harness-skills/mstar-roles/references/qa-engineer.md +1 -1
  36. package/harness-skills/mstar-roles/references/qc-specialist-shared.md +6 -4
  37. package/harness-skills/mstar-roles/references/writing-specialist.md +1 -1
  38. package/harness-skills/mstar-sdd/SKILL.md +118 -0
  39. package/harness-skills/mstar-sdd/references/file-handoffs.md +73 -0
  40. package/harness-skills/mstar-sdd/references/implementer-prompt.md +53 -0
  41. package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +51 -0
  42. package/harness-skills/mstar-sdd/scripts/review-package +43 -0
  43. package/harness-skills/mstar-sdd/scripts/sdd-workspace +26 -0
  44. package/harness-skills/mstar-sdd/scripts/task-brief +40 -0
  45. package/harness-skills/pm/SKILL.md +7 -6
  46. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env bash
2
+ # Write commit list, stat summary, and diff to a file for reviewer Read.
3
+ # Usage: review-package BASE HEAD [OUTFILE]
4
+ # Never use HEAD~1 as BASE for multi-commit tasks.
5
+ set -euo pipefail
6
+
7
+ if [ $# -lt 2 ] || [ $# -gt 3 ]; then
8
+ echo "usage: review-package BASE HEAD [OUTFILE]" >&2
9
+ exit 2
10
+ fi
11
+
12
+ base=$1
13
+ head=$2
14
+
15
+ git rev-parse --verify --quiet "$base" >/dev/null || { echo "bad BASE: $base" >&2; exit 2; }
16
+ git rev-parse --verify --quiet "$head" >/dev/null || { echo "bad HEAD: $head" >&2; exit 2; }
17
+
18
+ if [ $# -eq 3 ]; then
19
+ out=$3
20
+ else
21
+ if [ -z "${SDD_DIR:-}" ]; then
22
+ echo "review-package: set SDD_DIR or pass OUTFILE" >&2
23
+ exit 2
24
+ fi
25
+ mkdir -p "$SDD_DIR"
26
+ out="$SDD_DIR/review-$(git rev-parse --short "$base")..$(git rev-parse --short "$head").diff"
27
+ fi
28
+
29
+ {
30
+ echo "# Review package: ${base}..${head}"
31
+ echo
32
+ echo "## Commits"
33
+ git log --oneline "${base}..${head}"
34
+ echo
35
+ echo "## Files changed"
36
+ git diff --stat "${base}..${head}"
37
+ echo
38
+ echo "## Diff"
39
+ git diff -U10 "${base}..${head}"
40
+ } > "$out"
41
+
42
+ commits=$(git rev-list --count "${base}..${head}" 2>/dev/null || echo 0)
43
+ echo "wrote ${out}: ${commits} commit(s), $(wc -c < "$out" | tr -d ' ') bytes"
@@ -0,0 +1,26 @@
1
+ #!/usr/bin/env bash
2
+ # Resolve and ensure {SDD_DIR} for Morning Star SDD artifacts.
3
+ # Usage: sdd-workspace PLAN_ID
4
+ # Prints absolute path to {HARNESS_DIR}/sdd/<plan-id>/ (or legacy .agents/sdd/).
5
+ set -euo pipefail
6
+
7
+ if [ $# -ne 1 ]; then
8
+ echo "usage: sdd-workspace PLAN_ID" >&2
9
+ exit 2
10
+ fi
11
+
12
+ plan_id=$1
13
+ root=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
14
+
15
+ if [ -d "$root/.mstar" ]; then
16
+ harness="$root/.mstar"
17
+ elif [ -d "$root/.agents" ]; then
18
+ harness="$root/.agents"
19
+ else
20
+ harness="$root/.mstar"
21
+ fi
22
+
23
+ dir="$harness/sdd/$plan_id"
24
+ mkdir -p "$dir"
25
+ printf '*\n' > "$dir/.gitignore"
26
+ cd "$dir" && pwd
@@ -0,0 +1,40 @@
1
+ #!/usr/bin/env bash
2
+ # Extract one task's full text from a plan into a file for the implementer.
3
+ # Usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]
4
+ # Default OUTFILE: {SDD_DIR}/task-N-brief.md (SDD_DIR from env or second arg via sdd-workspace)
5
+ set -euo pipefail
6
+
7
+ if [ $# -lt 2 ] || [ $# -gt 3 ]; then
8
+ echo "usage: task-brief PLAN_FILE TASK_NUMBER [OUTFILE]" >&2
9
+ exit 2
10
+ fi
11
+
12
+ plan=$1
13
+ n=$2
14
+ [ -f "$plan" ] || { echo "no such plan file: $plan" >&2; exit 2; }
15
+
16
+ if [ $# -eq 3 ]; then
17
+ out=$3
18
+ else
19
+ if [ -z "${SDD_DIR:-}" ]; then
20
+ echo "task-brief: set SDD_DIR or pass OUTFILE (run sdd-workspace PLAN_ID first)" >&2
21
+ exit 2
22
+ fi
23
+ mkdir -p "$SDD_DIR"
24
+ out="$SDD_DIR/task-${n}-brief.md"
25
+ fi
26
+
27
+ awk -v n="$n" '
28
+ /^```/ { infence = !infence }
29
+ !infence && /^#+[ \t]+Task[ \t]+[0-9]+/ {
30
+ intask = ($0 ~ ("^#+[ \t]+Task[ \t]+" n "([^0-9]|$)"))
31
+ }
32
+ intask { print }
33
+ ' "$plan" > "$out"
34
+
35
+ if [ ! -s "$out" ]; then
36
+ echo "task ${n} not found in ${plan} (no heading matching Task ${n})" >&2
37
+ exit 3
38
+ fi
39
+
40
+ echo "wrote ${out}: $(wc -l < "$out" | tr -d ' ') lines"
@@ -12,7 +12,7 @@ description: "Morning Star PM orchestration entry. On Cursor/Codex, /pm launches
12
12
  | Host | Entry | PM role |
13
13
  | --- | --- | --- |
14
14
  | **Cursor / Codex** | User invokes **`/pm`** (or explicit "run as PM") | Force **`project-manager`** for the session |
15
- | **OpenCode** | User may already be on a configured agent | **If active role ≠ `project-manager`**: operate **only** as PM — load `mstar-roles` → `references/project-manager.md`; do **not** stay in dev/QC/architect voice for orchestration. Named invokes still use `@<agent-id>` per Assignment |
15
+ | **OpenCode** | User may already be on a configured agent | **If active role ≠ `project-manager`**: operate **only** as PM — load `mstar-roles` → `references/project-manager.md`; do **not** stay in dev/QC/architect voice for orchestration. Host invoke: task tool **`subagent`** matching Assignment `Execute as` (see `mstar-host` `opencode.md`); Assignment body uses **plain role ids** |
16
16
 
17
17
  Detect host → Read `mstar-host` → `references/cursor.md` | `opencode.md` | `codex.md`.
18
18
 
@@ -22,20 +22,21 @@ Detect host → Read `mstar-host` → `references/cursor.md` | `opencode.md` | `
22
22
  2. `mstar-roles` → `references/project-manager.md`
23
23
  3. Before first **implement** dispatch: `mstar-dispatch-gates` + host reference
24
24
  4. Before **QC**: `mstar-review-qc`
25
- 5. **Iteration flow** (start / Execute / close): **`mstar-iteration`** canonical SSOT for per-plan dispatch loop, integration branch, compound round. Do **not** re-describe the flow in this skill.
26
- 6. **On demand:** `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-plan-artifacts`, `mstar-branch-worktree`, `mstar-skill-authoring` for skill work
25
+ 5. **SDD implement** (`Execution mode: sdd`): `mstar-sdd` before first implement dispatch
26
+ 6. **Iteration flow** (start / Execute / close): **`mstar-iteration`** — canonical SSOT for per-plan dispatch loop, integration branch, compound round. Do **not** re-describe the flow in this skill.
27
+ 7. **On demand:** `mstar-phase-gates`, `mstar-plan-conventions`, `mstar-plan-artifacts`, `mstar-branch-worktree`, `mstar-skill-authoring` for skill work
27
28
 
28
- Prepare/Execute gates, routing, Assignment templates, Task Board, QC tri-review, residuals, compound → topic skills + PM references (not repeated here).
29
+ Prepare/Execute gates, routing, Assignment templates, Task Board, QC (SDD → tri; inline → single), residuals, compound → topic skills + PM references (not repeated here).
29
30
 
30
31
  ## Dispatch-first (`implement`)
31
32
 
32
33
  | Do | Don't |
33
34
  | --- | --- |
34
35
  | **Loop:** `## Assignment` → invoke → Completion Report v2 → report-to-status → next batch | Parent **Write/Edit/Shell** on product code to "move faster" |
35
- | **1 Assignment ⇒ 1 invoke** when host supports Task/@agent (`mstar-dispatch-gates`) | Assignment markdown only, no matching invoke |
36
+ | **1 Assignment ⇒ 1 invoke** when host supports Task/subagent (`mstar-dispatch-gates`) | Assignment markdown only, no matching invoke |
36
37
  | Put merge/branch/handoff from **this thread** into Assignment | Skip subagent because context is "already here" |
37
38
 
38
- - **NEVER** implement while staying PM — QC 3× comes later; **implement still delegates** dev roles.
39
+ - **NEVER** implement while staying PM — SDD ends with **plan QC tri** (N=3); **implement still delegates** dev + task reviewer subagents.
39
40
  - **Delegate scope / PM whitelist:** `mstar-roles` → PM Execution Boundary.
40
41
 
41
42
  **Exceptions:** user explicitly asks PM thread to implement; hotfix per `mstar-phase-gates`.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "0.7.8",
3
+ "version": "1.0.0",
4
4
  "description": "Morning Star harness OpenCode plugin (skills bootstrap and agent loading).",
5
5
  "license": "MIT",
6
6
  "repository": {