@mstar-harness/cli 3.8.2 → 3.8.3

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.
@@ -8216,18 +8216,62 @@ function findEphemeralCitations(skillText) {
8216
8216
  return citations;
8217
8217
  }
8218
8218
  var TEST_FILE_PATH_RE = /[\w./-]+\.(?:test|spec)\.[a-z0-9]+/i;
8219
- var TEST_FILE_PHRASE_RE = /\btest files?\b/i;
8219
+ var TEST_FILE_PHRASE_RE = /\btest file(?:s|\(s\))?\s*:[ \t]*(.+)/i;
8220
8220
  var COMMAND_PROMPT_RE = /^\s*[$>]\s*\S/;
8221
8221
  var RUNNER_RE = /\b(?:bun|pnpm|npm|yarn|npx|bunx)\s+(?:test|run|exec)\b|\b(?:npx|bunx)\s+[\w./-]+\b|\b(?:tsc|vitest|jest|mocha|pytest)\b|\bgo\s+test\b|\bcargo\s+test\b/i;
8222
8222
  var OUTPUT_TOKEN_RE = /[\u2713\u2714\u2717\u2718]|\b(?:PASS|FAIL)\b|\b\d+\s+(?:pass(?:es|ed)?|fail(?:s|ed|ing)?|skipped|tests?|ok)\b|\bok\s+\d+\b|\ball\s+ok\b|exit(?:ed)?\s+(?:with\s+)?(?:code\s+)?\d+/i;
8223
+ function hasEvidenceDetail(value) {
8224
+ const detail = value.trim().replace(/^`+|`+$/g, "").trim();
8225
+ return detail.length > 0 && !/^(?:n\/a|none|tbd|todo|tba|unknown|skipped|not[- ]run|\.\.\.|\u2026|<[^>]+>)$/i.test(detail);
8226
+ }
8223
8227
  function assertSddTddTriple(reportText) {
8224
8228
  const violations = [];
8225
- const lines = reportText.split(/\r?\n/);
8229
+ const activeRound = [...reportText.matchAll(/^## Verification round:[ \t]*(.*)$/gm)].at(-1);
8230
+ if (activeRound && !hasEvidenceDetail(activeRound[1])) {
8231
+ return {
8232
+ ok: false,
8233
+ violations: [violation11("medium", "lint.sdd-evidence.invalid-round", "Verification round requires a concrete label.")]
8234
+ };
8235
+ }
8236
+ const activeText = activeRound ? reportText.slice(activeRound.index + activeRound[0].length) : reportText;
8237
+ const lines = activeText.split(/\r?\n/);
8238
+ const fields = new Map;
8239
+ for (const line of lines) {
8240
+ const match = line.match(/^\s*(Verification mode|Changed files|Tests|Reason|Check command|Check result):[ \t]*(.*)$/i);
8241
+ if (match) {
8242
+ const key = match[1].toLowerCase();
8243
+ fields.set(key, [...fields.get(key) ?? [], match[2].trim()]);
8244
+ }
8245
+ }
8246
+ const modes = fields.get("verification mode");
8247
+ if (modes) {
8248
+ if (modes.length !== 1 || modes[0] !== "scoped-check") {
8249
+ return {
8250
+ ok: false,
8251
+ violations: [violation11("medium", "lint.sdd-evidence.invalid-mode", "Use exactly one Verification mode: scoped-check declaration in the active round; unknown or duplicate modes are invalid.")]
8252
+ };
8253
+ }
8254
+ for (const key of ["changed files", "tests", "reason", "check command", "check result"]) {
8255
+ const values = fields.get(key) ?? [];
8256
+ const value = values[0] ?? "";
8257
+ const valid = values.length === 1 && (key === "tests" ? value === "N/A" : hasEvidenceDetail(value));
8258
+ if (!valid) {
8259
+ violations.push(violation11("medium", `lint.sdd-evidence.${key.replaceAll(" ", "-")}`, `scoped-check requires one concrete ${key} field${key === "tests" ? " with value N/A" : ""}; missing, duplicate, or placeholder evidence is invalid.`));
8260
+ }
8261
+ }
8262
+ return { ok: violations.length === 0, violations };
8263
+ }
8264
+ if (lines.some((line) => /^\s*(?:Tests|(?:Covering )?test file(?:s|\(s\))?):\s*`?N\/A`?\s*$/i.test(line))) {
8265
+ return {
8266
+ ok: false,
8267
+ violations: [violation11("medium", "lint.sdd-tdd.missing-tests", "Bare N/A is not test evidence; document/policy checks need an explicit, complete scoped-check declaration.")]
8268
+ };
8269
+ }
8226
8270
  let hasTests = false;
8227
8271
  let hasCommand = false;
8228
8272
  let hasOutput = false;
8229
8273
  for (const line of lines) {
8230
- if (!hasTests && (TEST_FILE_PATH_RE.test(line) || TEST_FILE_PHRASE_RE.test(line)))
8274
+ if (!hasTests && (TEST_FILE_PATH_RE.test(line) || hasEvidenceDetail(line.match(TEST_FILE_PHRASE_RE)?.[1] ?? "")))
8231
8275
  hasTests = true;
8232
8276
  if (!hasCommand && (COMMAND_PROMPT_RE.test(line) || RUNNER_RE.test(line)))
8233
8277
  hasCommand = true;
@@ -11822,9 +11866,10 @@ var CODEX_PROJECT_COMMAND_NAMES = [
11822
11866
  "iteration-drive",
11823
11867
  "iteration-loop",
11824
11868
  "codebase-audit",
11825
- "amazing-pr-review"
11869
+ "amazing-pr-review",
11870
+ "amazing-e2e-check"
11826
11871
  ];
11827
- var GLOBAL_ITERATION_SKILLS_WARNING = "Codex project-scoped commands (iteration-start / iteration-drive / iteration-loop / codebase-audit / amazing-pr-review) are installed as project-local skills under .agents/skills/ only. Global install skips them to avoid polluting other code agents. Re-run with --scope project to enable.";
11872
+ var GLOBAL_ITERATION_SKILLS_WARNING = "Codex project-scoped commands (iteration-start / iteration-drive / iteration-loop / codebase-audit / amazing-pr-review / amazing-e2e-check) are installed as project-local skills under .agents/skills/ only. Global install skips them to avoid polluting other code agents. Re-run with --scope project to enable.";
11828
11873
  function runCodex(args, dryRun, timeoutMs) {
11829
11874
  return runCliCommand([CODEX_BIN, ...args], { dryRun, timeoutMs, env: process.env });
11830
11875
  }
@@ -11931,7 +11976,7 @@ function ensureIterationSkillLinks(dryRun) {
11931
11976
  }
11932
11977
  const gitignoreEntries = CODEX_PROJECT_COMMAND_NAMES.map(iterationSkillGitignoreEntry);
11933
11978
  notes.push(...appendGitignore(projectRoot, gitignoreEntries, dryRun));
11934
- notes.push("Installed Codex project-scoped command skills under .agents/skills/ (iteration-start, iteration-drive, iteration-loop, codebase-audit, amazing-pr-review) \u2014 symlinked to harness commands/*.md.");
11979
+ notes.push("Installed Codex project-scoped command skills under .agents/skills/ (iteration-start, iteration-drive, iteration-loop, codebase-audit, amazing-pr-review, amazing-e2e-check) \u2014 symlinked to harness commands/*.md.");
11935
11980
  return notes;
11936
11981
  }
11937
11982
  function validateIterationSkillLinks() {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mstar-harness/cli",
3
- "version": "3.8.2",
3
+ "version": "3.8.3",
4
4
  "description": "Morning Star harness CLI — installer bootstrap + mstar workflow verbs (path/status/lease/sdd/iteration/dispatch/worktree/lint/design-md/audit/compound/host/skill).",
5
5
  "license": "MIT",
6
6
  "repository": {