@mstar-harness/engine 2.1.0 → 2.1.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/dist/engine.js CHANGED
@@ -158,28 +158,27 @@ function scaffoldHarness(root) {
158
158
  }
159
159
  var GITIGNORE_SNIPPET = `# Morning Star harness (.mstar/)
160
160
  # Principle: process stays local; results are shared with the team.
161
- # Ignored (process / coordination):
162
- .mstar/archived/
163
- .mstar/iterations/
164
- .mstar/plans/
165
- .mstar/sdd/
166
- .mstar/notes.json
167
- .mstar/status.json
168
- # Tracked (results): .mstar/AGENTS.md, .mstar/knowledge/, .mstar/specs/
161
+ # Default-ignore everything under .mstar/, then re-include the tracked results.
162
+ .mstar/**
163
+ !.mstar/AGENTS.md
164
+ !.mstar/knowledge/
165
+ !.mstar/knowledge/**
166
+ !.mstar/specs/
167
+ !.mstar/specs/**
169
168
  `;
170
169
  var GITIGNORE_SNIPPET_AGENTS = `# Morning Star harness (.agents/) — legacy
171
- .agents/archived/
172
- .agents/iterations/
173
- .agents/plans/
174
- .agents/sdd/
175
- .agents/notes.json
176
- .agents/status.json
177
- # Tracked (results): .agents/AGENTS.md, .agents/knowledge/, .agents/specs/
170
+ # Default-ignore everything under .agents/, then re-include the tracked results.
171
+ .agents/**
172
+ !.agents/AGENTS.md
173
+ !.agents/knowledge/
174
+ !.agents/knowledge/**
175
+ !.agents/specs/
176
+ !.agents/specs/**
178
177
  `;
179
178
  var GITIGNORE_PROCESS_ENTRIES = GITIGNORE_SNIPPET.split(`
180
- `).filter((line) => line.startsWith(".mstar/")).map((line) => line.trim());
179
+ `).filter((line) => line.startsWith(".mstar/") || line.startsWith("!.mstar/")).map((line) => line.trim());
181
180
  var GITIGNORE_PROCESS_ENTRIES_AGENTS = GITIGNORE_SNIPPET_AGENTS.split(`
182
- `).filter((line) => line.startsWith(".agents/")).map((line) => line.trim());
181
+ `).filter((line) => line.startsWith(".agents/") || line.startsWith("!.agents/")).map((line) => line.trim());
183
182
  function emitGitignoreSnippet(kind) {
184
183
  if (kind === "agents")
185
184
  return GITIGNORE_SNIPPET_AGENTS;
@@ -230,7 +229,7 @@ function validateGitignore(root) {
230
229
  ok: true,
231
230
  severity: "low",
232
231
  code: "gitignore.ok",
233
- message: `.gitignore at ${gitignorePath} contains a complete canonical harness process-artifact ignore set (${label})`
232
+ message: `.gitignore at ${gitignorePath} contains a complete canonical harness ignore set — default-ignore + tracked re-includes (${label})`
234
233
  };
235
234
  }
236
235
  function detectHarnessKind(harnessDir) {
package/dist/path.d.ts CHANGED
@@ -86,15 +86,17 @@ export declare function scaffoldHarness(root: string): string;
86
86
  export type HarnessKind = "mstar" | "agents";
87
87
  /**
88
88
  * Emit the canonical `.gitignore` snippet for `kind` (plan-conventions
89
- * § Git 跟踪策略): the process-artifact ignore set (`archived/`,
90
- * `iterations/`, `plans/`, `sdd/`, `notes.json`, `status.json` under the
91
- * harness dir) with the tracked/results note. When the kind is unknown
92
- * (omitted), both snippets are emitted so either fence can be applied.
89
+ * § Git 跟踪策略): default-ignore the whole harness dir (`<dir>/**`) and
90
+ * re-include only the tracked results (AGENTS.md, knowledge/, specs/).
91
+ * When the kind is unknown (omitted), both snippets are emitted so either
92
+ * fence can be applied.
93
93
  */
94
94
  export declare function emitGitignoreSnippet(kind?: HarnessKind): string;
95
95
  /**
96
96
  * Validate that `<root>/.gitignore` contains a complete canonical
97
- * process-artifact ignore set (plan-conventions § Git 跟踪策略). Rule
97
+ * harness ignore set — default-ignore `<dir>/**` plus the tracked
98
+ * re-includes (AGENTS.md, knowledge/, specs/) per plan-conventions
99
+ * § Git 跟踪策略. Rule
98
100
  * (chosen alignment): the gate passes when the repo's .gitignore holds ONE
99
101
  * complete set for the DETECTED harness kind — `.mstar/` for a `.mstar`
100
102
  * harness, `.agents/` for a legacy `.agents` harness; layouts without a
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/engine",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "description": "Morning Star Harness Workflow Engine — deterministic workflow enforcement library (path, status, lease, dispatch, sdd, iteration, lint gates).",
5
5
  "license": "MIT",
6
6
  "repository": {