@mstar-harness/opencode 0.6.14 → 0.6.15

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/dist/mstar.js CHANGED
@@ -7,6 +7,7 @@ var __dirname2 = path.dirname(fileURLToPath(import.meta.url));
7
7
  var packageRoot = path.resolve(__dirname2, "..");
8
8
  var bundledSkillsDir = path.join(packageRoot, "harness-skills");
9
9
  var bundledAgentsDir = path.join(packageRoot, "harness-agents");
10
+ var bundledCommandsDir = path.join(packageRoot, "harness-commands");
10
11
  var bootstrapAgentsPath = path.join(packageRoot, "AGENTS.md");
11
12
  var BOOTSTRAP_MARKER = "IMPORTANT_FOR_HARNESS";
12
13
  function resolveSkillPathCandidates() {
@@ -121,6 +122,33 @@ var loadAgentsFromDir = (agentsDirPath) => {
121
122
  return result;
122
123
  };
123
124
  var loadBundledAgents = () => loadAgentsFromDir(bundledAgentsDir);
125
+ var loadBundledCommands = () => {
126
+ if (!fs.existsSync(bundledCommandsDir))
127
+ return {};
128
+ const files = fs.readdirSync(bundledCommandsDir).filter((name) => /\.(?:md|mdc|markdown|txt)$/.test(name)).sort((a, b) => a.localeCompare(b));
129
+ const result = {};
130
+ for (const file of files) {
131
+ const filePath = path.join(bundledCommandsDir, file);
132
+ const content = fs.readFileSync(filePath, "utf8");
133
+ const { frontmatter, body } = extractFrontmatterAndBody(content);
134
+ const parsed = parseSimpleFrontmatter(frontmatter);
135
+ const parsedName = typeof parsed.name === "string" ? parsed.name : file.replace(/\.(?:md|mdc|markdown|txt)$/, "");
136
+ const commandDef = {
137
+ template: body.trim()
138
+ };
139
+ if (typeof parsed.description === "string") {
140
+ commandDef.description = parsed.description;
141
+ }
142
+ if (typeof parsed.agent === "string") {
143
+ commandDef.agent = parsed.agent;
144
+ }
145
+ if (typeof parsed.model === "string") {
146
+ commandDef.model = parsed.model;
147
+ }
148
+ result[parsedName] = commandDef;
149
+ }
150
+ return result;
151
+ };
124
152
  var MorningStarHarnessPlugin = async () => {
125
153
  const homeDir = os.homedir();
126
154
  const envConfigDir = normalizePath(process.env.OPENCODE_CONFIG_DIR, homeDir);
@@ -146,6 +174,14 @@ var MorningStarHarnessPlugin = async () => {
146
174
  ...definition
147
175
  };
148
176
  }
177
+ const markdownCommands = loadBundledCommands();
178
+ runtimeConfig.command = runtimeConfig.command || {};
179
+ for (const [commandId, definition] of Object.entries(markdownCommands)) {
180
+ runtimeConfig.command[commandId] = {
181
+ ...runtimeConfig.command[commandId] || {},
182
+ ...definition
183
+ };
184
+ }
149
185
  },
150
186
  "experimental.chat.messages.transform": async (_input, output) => {
151
187
  const bootstrap = loadBootstrapContent();
@@ -0,0 +1,65 @@
1
+ ---
2
+ name: iteration-start
3
+ description: Start a new harness iteration — research backlog, lock direction with grill-me, produce compass/plans, run review chain (product-manager → architect → writing-specialist → PM lock), submit to integration branch
4
+ agent: project-manager
5
+ ---
6
+
7
+ # Start Iteration
8
+
9
+ Start a new Morning Star harness iteration. Follow Prepare gates from `mstar-phase-gates` (specify → clarify → plan).
10
+
11
+ ## 1. Research
12
+
13
+ Load harness entry, then survey structured and unstructured sources:
14
+
15
+ **Structured harness dirs:**
16
+ - `{HARNESS_DIR}/status.json` → active plans, deferred features, residuals
17
+ - `{ITERATION_DIR}/` → previous iteration compasses, roadmap batches
18
+ - `{KNOWLEDGE_DIR}/` → design knowledge, architecture notes
19
+ - `{SPECS_DIR}/` → existing specs, gaps
20
+
21
+ **Unstructured discovery — search the repo for planning artifacts by name:**
22
+ - Glob for `**/roadmap*.md`, `**/ROADMAP*.md`, `**/*-roadmap.md`
23
+ - Glob for `**/deferred*.md`, `**/DEFERRED*.md`
24
+ - Glob for `**/features*.md`, `**/FEATURES*.md`
25
+ - Also search for `**/backlog*.md`, `**/TODO*.md`, `**/todo*.md`, `**/*.plan.md`
26
+ - Open and read any matches that carry iteration-level or deferred-scope information
27
+
28
+ Identify deferred or incomplete items from prior iterations as priority candidates for this iteration.
29
+
30
+ ## 2. Explore Directions
31
+
32
+ Explore candidate directions targeting **product completeness**:
33
+
34
+ - Default to completing deferred items from previous iterations
35
+ - Allow substantive refactoring where it accelerates product maturity
36
+ - Scope 2–4 candidates, each with clear product-completeness goals and trade-offs
37
+
38
+ ## 3. Lock Direction — grill-me
39
+
40
+ Run the **grill-me skill** to stress-test candidate directions with the user:
41
+
42
+ - Walk through trade-offs for each candidate
43
+ - Converge on a **single iteration direction** with shared understanding
44
+ - Document: locked direction, success criteria, non-goals
45
+
46
+ ## 4. Write Compass & Plans
47
+
48
+ Produce harness artifacts:
49
+
50
+ - `{ITERATION_DIR}/<iteration-id>-compass.md` — iteration vision, scope, roadmap batches, deferred items
51
+ - `{PLAN_DIR}/<plan-id>-<name>.md` for each plan in this iteration
52
+ - Register all plans in `{HARNESS_DIR}/status.json`
53
+
54
+ ## 5. Review Chain
55
+
56
+ 1. **@product-manager** — review compass; adjust scope and user-facing details; write or update specs in `{SPECS_DIR}/`
57
+ 2. **@architect** — review compass and specs; adjust technical architecture, interface contracts, and module boundaries
58
+ 3. **@writing-specialist** — full review of all documents for clarity, consistency, and completeness
59
+ 4. **PM** — final review; lock all documents; confirm Prepare phase gates pass
60
+
61
+ ## 6. Integration Branch
62
+
63
+ - Create `iteration/<iteration-id>` from `main`
64
+ - Register `spec_integration_branch` in `{HARNESS_DIR}/status.json`
65
+ - Commit all documents to the integration branch and push to remote
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/opencode",
3
- "version": "0.6.14",
3
+ "version": "0.6.15",
4
4
  "description": "Morning Star harness OpenCode plugin (skills bootstrap and agent loading).",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -14,6 +14,7 @@
14
14
  "dist",
15
15
  "harness-skills",
16
16
  "harness-agents",
17
+ "harness-commands",
17
18
  "AGENTS.md",
18
19
  "INSTALL.md"
19
20
  ],