@mstar-harness/opencode 0.7.9 → 1.0.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.
- package/harness-commands/iteration-drive.md +17 -7
- package/harness-commands/iteration-start.md +5 -6
- package/harness-commands/mstar-bootstrap.md +4 -5
- package/harness-skills/mstar-coding-behavior/SKILL.md +1 -0
- package/harness-skills/mstar-dispatch-gates/SKILL.md +20 -8
- package/harness-skills/mstar-harness-core/SKILL.md +7 -5
- package/harness-skills/mstar-host/SKILL.md +1 -1
- package/harness-skills/mstar-host/references/codex.md +2 -2
- package/harness-skills/mstar-host/references/cursor.md +35 -9
- package/harness-skills/mstar-host/references/opencode.md +3 -0
- package/harness-skills/mstar-host/references/parallel-dispatch.md +24 -6
- package/harness-skills/mstar-iteration/SKILL.md +40 -34
- package/harness-skills/mstar-phase-gates/SKILL.md +11 -46
- package/harness-skills/mstar-plan-artifacts/SKILL.md +1 -0
- package/harness-skills/mstar-plan-artifacts/references/plan-files-and-reports.md +16 -4
- package/harness-skills/mstar-plan-artifacts/references/status-and-residuals.md +3 -0
- package/harness-skills/mstar-plan-artifacts/templates/plan.main.md +54 -0
- package/harness-skills/mstar-plan-conventions/SKILL.md +6 -3
- package/harness-skills/mstar-plan-conventions/references/artifact-storage-paths.md +2 -1
- package/harness-skills/mstar-plan-conventions/references/harness-bootstrap-and-agents-layering.md +1 -1
- package/harness-skills/mstar-review-qc/SKILL.md +5 -5
- package/harness-skills/mstar-review-qc/references/review-responsibility-boundaries.md +41 -0
- package/harness-skills/mstar-roles/SKILL.md +5 -1
- package/harness-skills/mstar-roles/references/project-manager/dispatch-and-assignment.md +20 -0
- package/harness-skills/mstar-roles/references/project-manager/qc-and-residuals.md +33 -24
- package/harness-skills/mstar-roles/references/project-manager/routing-and-dev-allocation.md +2 -1
- package/harness-skills/mstar-roles/references/project-manager.md +20 -11
- package/harness-skills/mstar-roles/references/qc-specialist-shared.md +5 -3
- package/harness-skills/mstar-sdd/SKILL.md +126 -0
- package/harness-skills/mstar-sdd/references/file-handoffs.md +76 -0
- package/harness-skills/mstar-sdd/references/implementer-continuation-prompt.md +44 -0
- package/harness-skills/mstar-sdd/references/implementer-prompt.md +55 -0
- package/harness-skills/mstar-sdd/references/sticky-implementer-session.md +103 -0
- package/harness-skills/mstar-sdd/references/task-reviewer-prompt.md +51 -0
- package/harness-skills/mstar-sdd/scripts/review-package +43 -0
- package/harness-skills/mstar-sdd/scripts/sdd-workspace +26 -0
- package/harness-skills/mstar-sdd/scripts/task-brief +40 -0
- package/harness-skills/pm/SKILL.md +20 -44
- package/package.json +1 -1
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
# File handoffs (Morning Star SDD)
|
|
2
|
+
|
|
3
|
+
PM and subagents move artifacts as **files**, not pasted text. Pasted content stays in PM context for every later turn.
|
|
4
|
+
|
|
5
|
+
## Before implementer dispatch
|
|
6
|
+
|
|
7
|
+
1. `export SDD_DIR=$(skills/mstar-sdd/scripts/sdd-workspace <plan-id>)`
|
|
8
|
+
2. `skills/mstar-sdd/scripts/task-brief <plan-file> <N> "$SDD_DIR/task-N-brief.md"`
|
|
9
|
+
3. Record `BASE_SHA` (`git rev-parse HEAD` before dispatch).
|
|
10
|
+
4. Dispatch implementer with:
|
|
11
|
+
- One line scene-setting (where task fits)
|
|
12
|
+
- Brief path: read first — verbatim requirements
|
|
13
|
+
- Interfaces / decisions brief cannot know
|
|
14
|
+
- Report path: `$SDD_DIR/task-N-report.md`
|
|
15
|
+
- `Model tier` → host-specific model (required)
|
|
16
|
+
- **`SDD implementer session`**: `fresh` (new subagent) or `sticky` (resume — see **`sticky-implementer-session.md`**)
|
|
17
|
+
|
|
18
|
+
## Implementer report file
|
|
19
|
+
|
|
20
|
+
Implementer writes full report to `task-N-report.md`. Return to PM only:
|
|
21
|
+
|
|
22
|
+
- Status: `DONE` | `DONE_WITH_CONCERNS` | `NEEDS_CONTEXT` | `BLOCKED`
|
|
23
|
+
- Commits (SHAs)
|
|
24
|
+
- One-line test summary
|
|
25
|
+
- Concerns (if any)
|
|
26
|
+
|
|
27
|
+
## After implementer DONE
|
|
28
|
+
|
|
29
|
+
1. `HEAD_SHA=$(git rev-parse HEAD)`
|
|
30
|
+
2. `skills/mstar-sdd/scripts/review-package "$BASE_SHA" "$HEAD_SHA" "$SDD_DIR/review-....diff"`
|
|
31
|
+
3. Dispatch task reviewer with: brief path, report path, diff path, Global Constraints (verbatim from plan).
|
|
32
|
+
|
|
33
|
+
**Never use `HEAD~1` as BASE** — multi-commit tasks truncate.
|
|
34
|
+
|
|
35
|
+
## Fix loop
|
|
36
|
+
|
|
37
|
+
Fix subagent appends to same `task-N-report.md` with test evidence:
|
|
38
|
+
|
|
39
|
+
- Covering test file(s)
|
|
40
|
+
- Command run
|
|
41
|
+
- Output (pristine — warnings are findings)
|
|
42
|
+
|
|
43
|
+
Re-dispatch reviewer only when all three are present.
|
|
44
|
+
|
|
45
|
+
## Progress ledger
|
|
46
|
+
|
|
47
|
+
On clean task review, append to `$SDD_DIR/progress.md`:
|
|
48
|
+
|
|
49
|
+
```text
|
|
50
|
+
Task N: complete (<base>..<head>, review clean)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Minor findings: append under `## Minor (for plan QC)` in same file.
|
|
54
|
+
|
|
55
|
+
## Plan-level QC package
|
|
56
|
+
|
|
57
|
+
After all tasks:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
MERGE_BASE=$(git merge-base <target-branch> HEAD)
|
|
61
|
+
skills/mstar-sdd/scripts/review-package "$MERGE_BASE" HEAD "$SDD_DIR/branch-review-....diff"
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Pass **branch** diff path to QC dispatch — not task-level diffs.
|
|
65
|
+
|
|
66
|
+
## PM context hygiene
|
|
67
|
+
|
|
68
|
+
Do not paste:
|
|
69
|
+
|
|
70
|
+
- Full plan text
|
|
71
|
+
- Prior task summaries ("state after Tasks 1-3")
|
|
72
|
+
- Full diff content
|
|
73
|
+
|
|
74
|
+
Fresh subagent gets: brief + interfaces + constraints + file paths only.
|
|
75
|
+
|
|
76
|
+
**Sticky implementer** (task 2+): resume same session; read new brief path + `progress.md` — do not re-paste prior task summaries. PM updates `implementer-session.json`.
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
# Implementer continuation prompt (sticky session)
|
|
2
|
+
|
|
3
|
+
Use when PM continues **`SDD implementer session: sticky`** for Task N>1. Host: **resume** same agent when supported (`sticky-implementer-session.md`).
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Task / subagent:
|
|
7
|
+
resume: [HOST_AGENT_ID from implementer-session.json]
|
|
8
|
+
description: "SDD continue Task N: <name>"
|
|
9
|
+
model: [same tier as session start unless PM upgrades]
|
|
10
|
+
prompt: |
|
|
11
|
+
<SUBAGENT-STOP> Skip PM orchestration skills. You are a leaf implementer continuing a sticky SDD session.</SUBAGENT-STOP>
|
|
12
|
+
|
|
13
|
+
Continue as the same implementer on plan <plan-id>, Working branch: <branch>.
|
|
14
|
+
|
|
15
|
+
## Completed (do not redo)
|
|
16
|
+
|
|
17
|
+
Read: [SDD_DIR]/progress.md and [SDD_DIR]/implementer-session.json
|
|
18
|
+
|
|
19
|
+
## This task
|
|
20
|
+
|
|
21
|
+
Task N: <name>
|
|
22
|
+
|
|
23
|
+
Read first — your spec (verbatim): [BRIEF_FILE]
|
|
24
|
+
|
|
25
|
+
## Context not in the brief
|
|
26
|
+
|
|
27
|
+
[Interfaces from earlier tasks only if not already in your session]
|
|
28
|
+
|
|
29
|
+
## Report file
|
|
30
|
+
|
|
31
|
+
Write your full report to: [REPORT_FILE]
|
|
32
|
+
|
|
33
|
+
## Your job
|
|
34
|
+
|
|
35
|
+
1. Implement exactly what this brief specifies (prior tasks are done)
|
|
36
|
+
2. Run tests; commit on Working branch
|
|
37
|
+
3. Write report file; return short summary only
|
|
38
|
+
|
|
39
|
+
## When stuck
|
|
40
|
+
|
|
41
|
+
Report BLOCKED or NEEDS_CONTEXT — PM may reset session to fresh.
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
First task on a plan uses **`implementer-prompt.md`** (not this file).
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Implementer subagent prompt template
|
|
2
|
+
|
|
3
|
+
Use when PM dispatches an SDD implementer (`mstar-sdd`) — **first task** or **`SDD implementer session: fresh`**.
|
|
4
|
+
|
|
5
|
+
For **sticky** continuation (task 2+), use **`implementer-continuation-prompt.md`** instead.
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
Task / subagent:
|
|
9
|
+
description: "SDD implement Task N: <name>"
|
|
10
|
+
model: [REQUIRED — per Model tier in Assignment and mstar-sdd SKILL]
|
|
11
|
+
prompt: |
|
|
12
|
+
<SUBAGENT-STOP> Skip PM orchestration skills. You are a leaf implementer.</SUBAGENT-STOP>
|
|
13
|
+
|
|
14
|
+
You are implementing Task N: <name>
|
|
15
|
+
|
|
16
|
+
## Scene
|
|
17
|
+
|
|
18
|
+
[One line: where this task fits in the plan]
|
|
19
|
+
|
|
20
|
+
## Requirements
|
|
21
|
+
|
|
22
|
+
Read first — this is your spec (verbatim values): [BRIEF_FILE]
|
|
23
|
+
|
|
24
|
+
## Context not in the brief
|
|
25
|
+
|
|
26
|
+
[Interfaces from earlier tasks, PM resolutions]
|
|
27
|
+
|
|
28
|
+
## Report file
|
|
29
|
+
|
|
30
|
+
Write your full report to: [REPORT_FILE]
|
|
31
|
+
|
|
32
|
+
## Before you begin
|
|
33
|
+
|
|
34
|
+
Ask questions now about requirements, approach, or dependencies.
|
|
35
|
+
|
|
36
|
+
## Your job
|
|
37
|
+
|
|
38
|
+
1. Implement exactly what the brief specifies
|
|
39
|
+
2. Run tests (TDD if brief requires)
|
|
40
|
+
3. Commit on Working branch
|
|
41
|
+
4. Self-review
|
|
42
|
+
5. Write report file; return short summary only
|
|
43
|
+
|
|
44
|
+
## When stuck
|
|
45
|
+
|
|
46
|
+
Report BLOCKED or NEEDS_CONTEXT — never guess.
|
|
47
|
+
|
|
48
|
+
## Report format (in file)
|
|
49
|
+
|
|
50
|
+
- Status: DONE | DONE_WITH_CONCERNS | NEEDS_CONTEXT | BLOCKED
|
|
51
|
+
- Implemented / attempted
|
|
52
|
+
- Tests: command, output, red/green evidence if TDD
|
|
53
|
+
- Files changed
|
|
54
|
+
- Self-review notes
|
|
55
|
+
```
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
# Sticky implementer session (SDD token optimization)
|
|
2
|
+
|
|
3
|
+
Reuse the **same implementer subagent** across multiple tasks in one plan when tasks are tightly coupled, same `Execute as` role, and same `Working branch`. **L2 task reviewers stay fresh per task** — do not sticky reviewers.
|
|
4
|
+
|
|
5
|
+
SSOT for mode selection and host resume → this file. Per-task artifacts → **`file-handoffs.md`**.
|
|
6
|
+
|
|
7
|
+
## When to use
|
|
8
|
+
|
|
9
|
+
| `SDD implementer session` | Use |
|
|
10
|
+
|---------------------------|-----|
|
|
11
|
+
| **`fresh`** (default) | Independent tasks, module boundaries, different dev tracks, or first task on a plan |
|
|
12
|
+
| **`sticky`** | Same `fullstack-dev` (or same role id), sequential tasks on one branch, strong file/context continuity (e.g. T3+T4 daemon stderr + DB reset) |
|
|
13
|
+
|
|
14
|
+
**Prefer `sticky`** on iteration-drive Phase 2 when PM will dispatch many tasks to the same dev on one plan feature branch.
|
|
15
|
+
|
|
16
|
+
## Assignment fields (implement dispatch)
|
|
17
|
+
|
|
18
|
+
```markdown
|
|
19
|
+
**Execution mode**: sdd
|
|
20
|
+
**SDD implementer session**: sticky | fresh
|
|
21
|
+
**SDD dir**: `{HARNESS_DIR}/sdd/<plan-id>/`
|
|
22
|
+
**Model tier**: standard
|
|
23
|
+
**Execute as**: fullstack-dev
|
|
24
|
+
**Working branch**: <branch>
|
|
25
|
+
**Covers task**: N | N–M # single task id for this dispatch turn
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
- **Task 1** (or first task after `fresh` reset): `SDD implementer session: fresh` or `sticky` (starts sticky ledger).
|
|
29
|
+
- **Task 2+** with sticky: `SDD implementer session: sticky` + host **resume** (Cursor) or continuation prompt (fallback).
|
|
30
|
+
|
|
31
|
+
## Session ledger: `implementer-session.json`
|
|
32
|
+
|
|
33
|
+
PM writes/updates at `{SDD_DIR}/implementer-session.json` when starting or continuing sticky mode:
|
|
34
|
+
|
|
35
|
+
```json
|
|
36
|
+
{
|
|
37
|
+
"plan_id": "<plan-id>",
|
|
38
|
+
"execute_as": "fullstack-dev",
|
|
39
|
+
"session_mode": "sticky",
|
|
40
|
+
"host": "cursor",
|
|
41
|
+
"host_agent_id": "<agent-id from first Task return — required for resume>",
|
|
42
|
+
"working_branch": "feature/...",
|
|
43
|
+
"started_task": 1,
|
|
44
|
+
"last_task": 1,
|
|
45
|
+
"started_at": "2026-07-07T00:00:00Z"
|
|
46
|
+
}
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
After each completed task review, PM sets `last_task` to N. **Do not** resume if `host_agent_id` is missing — fall back to `fresh` for that task.
|
|
50
|
+
|
|
51
|
+
## Per-task loop (sticky implementer)
|
|
52
|
+
|
|
53
|
+
Same as default SDD for artifacts and L2 review; only implementer dispatch differs:
|
|
54
|
+
|
|
55
|
+
1. `task-brief` → `{SDD_DIR}/task-N-brief.md`
|
|
56
|
+
2. Record `BASE_SHA`
|
|
57
|
+
3. **Implementer dispatch**
|
|
58
|
+
- **First task** (`fresh` or sticky start): normal Task/subagent invoke → save `host_agent_id` to ledger
|
|
59
|
+
- **Next tasks** (`sticky`): host **resume** with same `host_agent_id` + continuation prompt (`implementer-prompt.md` § Continuation)
|
|
60
|
+
4. On `DONE` → `review-package` → **fresh** task reviewer (never resume reviewer)
|
|
61
|
+
5. Append `progress.md`; update ledger `last_task`
|
|
62
|
+
6. Next task
|
|
63
|
+
|
|
64
|
+
**Still required per task:** commit, `task-N-report.md`, task-level diff, task reviewer, `progress.md` line.
|
|
65
|
+
|
|
66
|
+
## When to reset to `fresh`
|
|
67
|
+
|
|
68
|
+
Start a **new** implementer session (`session_mode: fresh` or new ledger) when any:
|
|
69
|
+
|
|
70
|
+
- `BLOCKED` / `NEEDS_CONTEXT` not resolved in one continuation turn
|
|
71
|
+
- `Execute as` role changes (`fullstack-dev` → `fullstack-dev-2`)
|
|
72
|
+
- `Working branch` changes
|
|
73
|
+
- Host does not support resume (OpenCode without resume → use **micro-batch** or `fresh`)
|
|
74
|
+
- Context clearly degraded (implementer confuses prior tasks) — PM judgment
|
|
75
|
+
- Switching from another dev track mid-plan
|
|
76
|
+
|
|
77
|
+
Delete or archive `implementer-session.json` when resetting.
|
|
78
|
+
|
|
79
|
+
## Micro-batch fallback (no host resume)
|
|
80
|
+
|
|
81
|
+
When resume is unavailable, PM may dispatch **one** implementer for **2–3** tightly coupled tasks:
|
|
82
|
+
|
|
83
|
+
- Prompt lists `task-N-brief.md` … `task-M-brief.md` and matching report paths only
|
|
84
|
+
- Implementer completes tasks **in order** in one session
|
|
85
|
+
- PM still runs **per-task** `review-package` + **fresh** task reviewer after each task (or after batch if PM documents per-task SHAs in Assignment)
|
|
86
|
+
|
|
87
|
+
Max **3** tasks per micro-batch without user override. See `project-manager.md` batch sizing.
|
|
88
|
+
|
|
89
|
+
## Host mapping
|
|
90
|
+
|
|
91
|
+
| Host | Sticky implementer |
|
|
92
|
+
|------|-------------------|
|
|
93
|
+
| **Cursor** | `Task` with `resume: <host_agent_id>` — **`mstar-host/references/cursor.md`** § SDD sticky |
|
|
94
|
+
| **OpenCode** | Resume only if task tool supports it; else micro-batch or `fresh` per task |
|
|
95
|
+
| **Codex** | Thread resume only when callable multi-agent tool documents agent id; else micro-batch or `fresh` |
|
|
96
|
+
|
|
97
|
+
## PM NEVER (sticky)
|
|
98
|
+
|
|
99
|
+
- Resume task **reviewer** sessions — reviewers stay fresh per task
|
|
100
|
+
- Parallel sticky implementers on the same branch
|
|
101
|
+
- Resume without updating `implementer-session.json` / `progress.md`
|
|
102
|
+
- Skip per-task review because implementer "remembers" prior tasks
|
|
103
|
+
- Paste full plan into continuation prompt — only new brief path + report path
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Task reviewer subagent prompt template
|
|
2
|
+
|
|
3
|
+
One reviewer per task: spec compliance + code quality (`mstar-sdd`).
|
|
4
|
+
|
|
5
|
+
```
|
|
6
|
+
Task / subagent:
|
|
7
|
+
description: "SDD review Task N (spec + quality)"
|
|
8
|
+
model: [REQUIRED — standard tier default; capable if diff is large/subtle]
|
|
9
|
+
prompt: |
|
|
10
|
+
<SUBAGENT-STOP> Skip PM orchestration. Read-only review.</SUBAGENT-STOP>
|
|
11
|
+
|
|
12
|
+
Review one task implementation: spec compliance first, then quality.
|
|
13
|
+
Task-scoped gate — plan-level QC comes later on the whole branch.
|
|
14
|
+
|
|
15
|
+
## What was requested
|
|
16
|
+
|
|
17
|
+
Brief: [BRIEF_FILE]
|
|
18
|
+
|
|
19
|
+
Global constraints (verbatim):
|
|
20
|
+
[GLOBAL_CONSTRAINTS]
|
|
21
|
+
|
|
22
|
+
## Implementer report
|
|
23
|
+
|
|
24
|
+
[REPORT_FILE] — treat claims as unverified until checked against diff.
|
|
25
|
+
|
|
26
|
+
## Diff
|
|
27
|
+
|
|
28
|
+
Base: [BASE_SHA]
|
|
29
|
+
Head: [HEAD_SHA]
|
|
30
|
+
Diff file: [DIFF_FILE]
|
|
31
|
+
|
|
32
|
+
Read the diff file once. Do not re-run git. Do not mutate checkout.
|
|
33
|
+
Do not re-run full test suite — trust implementer evidence unless a
|
|
34
|
+
specific doubt needs one focused test.
|
|
35
|
+
|
|
36
|
+
## Output
|
|
37
|
+
|
|
38
|
+
### Spec Compliance
|
|
39
|
+
- ✅ Spec compliant | ❌ Issues found (file:line)
|
|
40
|
+
- ⚠️ Cannot verify from diff: [items for PM to check]
|
|
41
|
+
|
|
42
|
+
### Strengths
|
|
43
|
+
|
|
44
|
+
### Issues
|
|
45
|
+
#### Critical | Important | Minor
|
|
46
|
+
|
|
47
|
+
### Assessment
|
|
48
|
+
**Task quality:** Approved | Needs fixes
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
Re-review after fixes covers both verdicts. PM resolves all ⚠️ items before marking task complete.
|
|
@@ -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"
|
|
@@ -1,58 +1,34 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: pm
|
|
3
|
-
description: "
|
|
3
|
+
description: "PM entry shim — force project-manager orchestration when user invokes /pm or this skill (Codex and Cursor). General per-plan PM work: this skill + project-manager.md. Formal iteration lifecycle on Cursor/OpenCode: commands (iteration-start, iteration-drive, mstar-bootstrap). Boot, routing, dispatch SSOT → mstar-roles/references/project-manager.md and topic mstar-* skills — not here."
|
|
4
4
|
---
|
|
5
5
|
|
|
6
|
-
# PM
|
|
6
|
+
# PM (entry shim)
|
|
7
7
|
|
|
8
|
-
**
|
|
8
|
+
**Thin launcher only.** Boot lists, iteration phases, Assignment templates, and SDD loops are **not** maintained in this file.
|
|
9
9
|
|
|
10
|
-
## Host entry
|
|
10
|
+
## Host entry
|
|
11
11
|
|
|
12
|
-
| Host |
|
|
13
|
-
|
|
14
|
-
| **
|
|
15
|
-
| **
|
|
12
|
+
| Host | Use |
|
|
13
|
+
|------|-----|
|
|
14
|
+
| **Codex** | **`/pm`** or this skill → **`project-manager`** for the session |
|
|
15
|
+
| **Cursor** | **`/pm`** or this skill → general PM orchestration (single-plan, hotfix, QC waves, dispatch) **without** starting an iteration. Formal iteration → **`commands/`** below |
|
|
16
|
+
| **OpenCode** | Same as Cursor when no command: **`project-manager`** via `mstar-roles` → `references/project-manager.md` |
|
|
16
17
|
|
|
17
|
-
|
|
18
|
+
**Iteration commands** (optional; carry their own Boot): `iteration-start`, `iteration-drive`, `mstar-bootstrap` — use when running Phase 1–5 iteration lifecycle, not required for ordinary PM work.
|
|
18
19
|
|
|
19
|
-
|
|
20
|
+
Detect host → **`mstar-host`** → `references/codex.md` | `cursor.md` | `opencode.md`.
|
|
20
21
|
|
|
21
|
-
|
|
22
|
-
2. `mstar-roles` → `references/project-manager.md`
|
|
23
|
-
3. Before first **implement** dispatch: `mstar-dispatch-gates` + host reference
|
|
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
|
|
27
|
-
|
|
28
|
-
Prepare/Execute gates, routing, Assignment templates, Task Board, QC tri-review, residuals, compound → topic skills + PM references (not repeated here).
|
|
29
|
-
|
|
30
|
-
## Dispatch-first (`implement`)
|
|
31
|
-
|
|
32
|
-
| Do | Don't |
|
|
33
|
-
| --- | --- |
|
|
34
|
-
| **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/subagent (`mstar-dispatch-gates`) | Assignment markdown only, no matching invoke |
|
|
36
|
-
| Put merge/branch/handoff from **this thread** into Assignment | Skip subagent because context is "already here" |
|
|
37
|
-
|
|
38
|
-
- **NEVER** implement while staying PM — QC 3× comes later; **implement still delegates** dev roles.
|
|
39
|
-
- **Delegate scope / PM whitelist:** `mstar-roles` → PM Execution Boundary.
|
|
22
|
+
## Read next (in order)
|
|
40
23
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
Formal iteration(Phase 1 → Phase 2 → Phase 3)→ **`mstar-iteration`** only. Do not duplicate phase gates, branch policy, or close checklists here.
|
|
46
|
-
|
|
47
|
-
## Cursor Plan mode
|
|
48
|
-
|
|
49
|
-
CreatePlan / SwitchMode: Read **`mstar-host/references/cursor-plan-mode-bridge.md`**. Bootstrap todos `harness-init` → `spec-register` → `mirror-plan` before implement todos; evidence on **subagent** work.
|
|
24
|
+
1. `mstar-harness-core`
|
|
25
|
+
2. `mstar-roles` → **`references/project-manager.md`** — required reading list, routing, dispatch-first, iteration branch policy
|
|
26
|
+
3. Topic skills **on demand** per that file and the active workflow (`mstar-dispatch-gates`, `mstar-iteration`, `mstar-sdd`, `mstar-review-qc`, …)
|
|
50
27
|
|
|
51
|
-
##
|
|
28
|
+
## Three rules (everything else is a pointer)
|
|
52
29
|
|
|
53
|
-
1.
|
|
54
|
-
2.
|
|
55
|
-
3.
|
|
56
|
-
4. This skill
|
|
30
|
+
1. **Delegate** — PM does not implement, QC, or QA in-thread (`project-manager.md` Execution Boundary; hotfix → `mstar-phase-gates`).
|
|
31
|
+
2. **Dispatch** — when host has invoke/Task tools: **1 Assignment ⇒ 1 invoke** (`mstar-dispatch-gates`). Markdown alone is not dispatch.
|
|
32
|
+
3. **SSOT** — iteration lifecycle → **`mstar-iteration`** (or **`commands/`** on Cursor/OpenCode); Cursor Plan mode → **`mstar-host/references/cursor-plan-mode-bridge.md`**.
|
|
57
33
|
|
|
58
|
-
|
|
34
|
+
Conflict: user instructions → project `AGENTS.md` / `CLAUDE.md` → `mstar-harness-core` → this file.
|