@smartergpt/lexrunner 1.4.0 → 1.4.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/cli.cjs CHANGED
@@ -1809,7 +1809,7 @@ function validateGateInput(gateName, input) {
1809
1809
  const schema = loadGateSchema(gateName);
1810
1810
  if (!schema) {
1811
1811
  console.warn(
1812
- "[lex-pr] validator: missing schema for gate; validation skipped (will be required in v1.0.0)"
1812
+ "[lexrunner] validator: missing schema for gate; validation skipped (will be required in v1.0.0)"
1813
1813
  );
1814
1814
  return;
1815
1815
  }
@@ -21043,18 +21043,18 @@ function readGovernanceLogs() {
21043
21043
  const [major] = rawLog.schemaVersion.split(".").map(Number);
21044
21044
  if (major > CURRENT_MAJOR_VERSION) {
21045
21045
  console.warn(
21046
- `[lex-pr] Skipping log ${file}: schema v${rawLog.schemaVersion} not supported (current: v${CURRENT_MAJOR_VERSION}.x.x)`
21046
+ `[lexrunner] Skipping log ${file}: schema v${rawLog.schemaVersion} not supported (current: v${CURRENT_MAJOR_VERSION}.x.x)`
21047
21047
  );
21048
21048
  continue;
21049
21049
  }
21050
21050
  } else {
21051
- console.warn(`[lex-pr] Skipping log ${file}: missing schemaVersion (legacy format)`);
21051
+ console.warn(`[lexrunner] Skipping log ${file}: missing schemaVersion (legacy format)`);
21052
21052
  continue;
21053
21053
  }
21054
21054
  const parsed = GovernanceComparisonLogSchema.parse(rawLog);
21055
21055
  logs.push(parsed);
21056
21056
  } catch (error) {
21057
- console.warn(`[lex-pr] Skipping invalid log ${file}:`, error);
21057
+ console.warn(`[lexrunner] Skipping invalid log ${file}:`, error);
21058
21058
  }
21059
21059
  }
21060
21060
  logs.sort((a, b) => new Date(b.timestamp).getTime() - new Date(a.timestamp).getTime());
@@ -21078,7 +21078,7 @@ function readGovernanceLogsWithLegacy() {
21078
21078
  const [major] = rawLog.schemaVersion.split(".").map(Number);
21079
21079
  if (major > CURRENT_MAJOR_VERSION) {
21080
21080
  console.warn(
21081
- `[lex-pr] Skipping log ${file}: schema v${rawLog.schemaVersion} not supported (current: v${CURRENT_MAJOR_VERSION}.x.x)`
21081
+ `[lexrunner] Skipping log ${file}: schema v${rawLog.schemaVersion} not supported (current: v${CURRENT_MAJOR_VERSION}.x.x)`
21082
21082
  );
21083
21083
  continue;
21084
21084
  }
@@ -21121,7 +21121,7 @@ function readGovernanceLogsWithLegacy() {
21121
21121
  normalizationWarnings: warnings
21122
21122
  });
21123
21123
  } catch (error) {
21124
- console.warn(`[lex-pr] Skipping invalid log ${file} (even with normalization):`, error);
21124
+ console.warn(`[lexrunner] Skipping invalid log ${file} (even with normalization):`, error);
21125
21125
  }
21126
21126
  }
21127
21127
  results.sort((a, b) => new Date(b.log.timestamp).getTime() - new Date(a.log.timestamp).getTime());
@@ -23634,7 +23634,7 @@ var init_emitter2 = __esm({
23634
23634
  const auditContext = await collectContext(contextTypes);
23635
23635
  this.context = auditContext;
23636
23636
  } catch (err) {
23637
- console.warn("[lex-pr] audit: context collection failed", err);
23637
+ console.warn("[lexrunner] audit: context collection failed", err);
23638
23638
  this.context = {};
23639
23639
  }
23640
23640
  } else {
@@ -23654,7 +23654,7 @@ var init_emitter2 = __esm({
23654
23654
  }
23655
23655
  this.ndjsonStream = fs47.createWriteStream(this.ndjsonPath, { flags: "a", autoClose: true });
23656
23656
  this.ndjsonStream.on("error", (err) => {
23657
- console.warn("[lex-pr] audit: ndjson stream error (ignored)", String(err));
23657
+ console.warn("[lexrunner] audit: ndjson stream error (ignored)", String(err));
23658
23658
  });
23659
23659
  const schemaPath = path36.join(this.auditDir, "audit.schema.json");
23660
23660
  const schema = {
@@ -23747,7 +23747,7 @@ var init_emitter2 = __esm({
23747
23747
  this.ndjsonStream.write(line);
23748
23748
  }
23749
23749
  } catch (e) {
23750
- console.warn("[lex-pr] audit: ndjson write failed (ignored)", String(e));
23750
+ console.warn("[lexrunner] audit: ndjson write failed (ignored)", String(e));
23751
23751
  }
23752
23752
  this.eventCount++;
23753
23753
  this.eventsByType[event] = (this.eventsByType[event] || 0) + 1;
@@ -23772,7 +23772,7 @@ var init_emitter2 = __esm({
23772
23772
  try {
23773
23773
  await this.ingestSidecar();
23774
23774
  } catch (e) {
23775
- console.warn("[lex-pr] audit: sidecar ingestion error (ignored)", String(e));
23775
+ console.warn("[lexrunner] audit: sidecar ingestion error (ignored)", String(e));
23776
23776
  }
23777
23777
  }, 5e3);
23778
23778
  try {
@@ -23809,11 +23809,14 @@ var init_emitter2 = __esm({
23809
23809
  this.eventsByType[event.event] = (this.eventsByType[event.event] || 0) + 1;
23810
23810
  }
23811
23811
  } catch (innerErr) {
23812
- console.warn("[lex-pr] audit: error ingesting sidecar event (ignored)", String(innerErr));
23812
+ console.warn(
23813
+ "[lexrunner] audit: error ingesting sidecar event (ignored)",
23814
+ String(innerErr)
23815
+ );
23813
23816
  }
23814
23817
  });
23815
23818
  } catch (err) {
23816
- console.warn("[lex-pr] audit: ingestSidecarFiles failed (ignored)", String(err));
23819
+ console.warn("[lexrunner] audit: ingestSidecarFiles failed (ignored)", String(err));
23817
23820
  }
23818
23821
  }
23819
23822
  /**
@@ -23982,11 +23985,11 @@ var init_emitter2 = __esm({
23982
23985
  else if (status === "blocked") totalBlocked++;
23983
23986
  }
23984
23987
  } catch (parseError) {
23985
- console.warn("[lex-pr] audit: skipping malformed line in audit.ndjson");
23988
+ console.warn("[lexrunner] audit: skipping malformed line in audit.ndjson");
23986
23989
  }
23987
23990
  }
23988
23991
  } catch (e) {
23989
- console.warn("[lex-pr] audit: failed to read audit.ndjson (ignored)", String(e));
23992
+ console.warn("[lexrunner] audit: failed to read audit.ndjson (ignored)", String(e));
23990
23993
  return;
23991
23994
  }
23992
23995
  const gateMatrix = {
@@ -24029,11 +24032,11 @@ var init_emitter2 = __esm({
24029
24032
  vulnEvents.push(event);
24030
24033
  }
24031
24034
  } catch (parseError) {
24032
- console.warn("[lex-pr] audit: skipping malformed line in audit.ndjson");
24035
+ console.warn("[lexrunner] audit: skipping malformed line in audit.ndjson");
24033
24036
  }
24034
24037
  }
24035
24038
  } catch (e) {
24036
- console.warn("[lex-pr] audit: failed to read audit.ndjson for SARIF (ignored)", String(e));
24039
+ console.warn("[lexrunner] audit: failed to read audit.ndjson for SARIF (ignored)", String(e));
24037
24040
  return;
24038
24041
  }
24039
24042
  if (vulnEvents.length === 0) {
@@ -25586,7 +25589,7 @@ var import_config3 = require("dotenv/config");
25586
25589
  // package.json
25587
25590
  var package_default = {
25588
25591
  name: "@smartergpt/lexrunner",
25589
- version: "1.4.0",
25592
+ version: "1.4.1",
25590
25593
  type: "module",
25591
25594
  engines: {
25592
25595
  node: ">=24"
@@ -25614,6 +25617,7 @@ var package_default = {
25614
25617
  "LICENSE.md"
25615
25618
  ],
25616
25619
  bin: {
25620
+ lexrunner: "dist/cli.js",
25617
25621
  "lex-pr": "dist/cli.js",
25618
25622
  "lexrunner-mcp": "mcp-server.mjs"
25619
25623
  },
@@ -25663,7 +25667,7 @@ var package_default = {
25663
25667
  }
25664
25668
  },
25665
25669
  scripts: {
25666
- postinstall: `node -e "console.log('\\n\u{1F4E6} lexrunner installed! Run \\"npx lex-pr init\\" to set up your workspace.\\n')"`,
25670
+ postinstall: `node -e "console.log('\\n\u{1F4E6} lexrunner installed! Run \\"npx lexrunner init\\" to set up your workspace. The \\"lex-pr\\" compatibility alias remains supported.\\n')"`,
25667
25671
  dev: "tsx watch src/cli.ts",
25668
25672
  cli: "tsx src/cli.ts",
25669
25673
  "cli:built": "node dist/cli.js",
@@ -28645,18 +28649,18 @@ function boundedResult(value) {
28645
28649
  var fs24 = __toESM(require("fs"), 1);
28646
28650
  function registerStatusCommand(program2, jsonModeActive2) {
28647
28651
  program2.command("status").description(
28648
- "Show current execution status and merge eligibility (canonical: lex-pr weave status)"
28652
+ "Show current execution status and merge eligibility (canonical: lexrunner weave status)"
28649
28653
  ).option("--plan <file>", "Path to plan.json file", "plan.json").argument("[file]", "Path to plan.json file (alternative to --plan)").option("--json", "Output JSON format").addHelpText(
28650
28654
  "after",
28651
28655
  `
28652
28656
  Examples:
28653
- $ lex-pr status plan.json # Show plan status
28654
- $ lex-pr status --json # JSON output for dashboards
28655
- $ lex-pr status --json | jq '.mergeSummary' # Extract merge summary
28657
+ $ lexrunner status plan.json # Show plan status
28658
+ $ lexrunner status --json # JSON output for dashboards
28659
+ $ lexrunner status --json | jq '.mergeSummary' # Extract merge summary
28656
28660
 
28657
28661
  Common Issues:
28658
28662
  \u2022 "Plan file not found": Verify path to plan.json
28659
- \u2022 Missing execution state: Run 'lex-pr execute' first to populate status`
28663
+ \u2022 Missing execution state: Run 'lexrunner execute' first to populate status`
28660
28664
  ).action((file, opts) => {
28661
28665
  const planFile = opts.plan || file || "plan.json";
28662
28666
  try {
@@ -28721,7 +28725,7 @@ function writeJsonOutput(data) {
28721
28725
 
28722
28726
  // src/commands/report.ts
28723
28727
  function registerReportCommand(program2, deps) {
28724
- program2.command("report").description("Aggregate gate reports from directory (canonical: lex-pr weave report)").argument("<dir>", "Directory containing *.json gate result files").option("--json", "Output JSON format (alias for --out json)").option("--out <format>", "Output format: 'json' or 'md'", "json").action((dir, opts) => {
28728
+ program2.command("report").description("Aggregate gate reports from directory (canonical: lexrunner weave report)").argument("<dir>", "Directory containing *.json gate result files").option("--json", "Output JSON format (alias for --out json)").option("--out <format>", "Output format: 'json' or 'md'", "json").action((dir, opts) => {
28725
28729
  try {
28726
28730
  const report = readGateDir(dir);
28727
28731
  const outputFormat = opts.json || deps.jsonModeActive() ? "json" : opts.out;
@@ -31857,7 +31861,7 @@ async function registerAuditCommands(program2) {
31857
31861
 
31858
31862
  // src/commands/completion.ts
31859
31863
  var CompletionGenerator = class {
31860
- constructor(programName = "lex-pr") {
31864
+ constructor(programName = "lexrunner") {
31861
31865
  this.programName = programName;
31862
31866
  this.commands = [
31863
31867
  "init",
@@ -36161,13 +36165,13 @@ function registerMergeCommand(program2, jsonModeActive2, _getProgramOpts, deps =
36161
36165
  `
36162
36166
  Compatibility:
36163
36167
  "merge" is supported through the LexRunner 1.x line and reviewed at 2.0.0.
36164
- Use "lex-pr weave apply" for new automation.
36168
+ Use "lexrunner weave apply" for new automation.
36165
36169
 
36166
36170
  Examples:
36167
- $ lex-pr merge --plan plan.json
36168
- $ lex-pr merge --plan plan.json --execute
36169
- $ lex-pr weave apply --plan plan.json --dry-run
36170
- $ lex-pr weave apply --plan plan.json --execute
36171
+ $ lexrunner merge --plan plan.json
36172
+ $ lexrunner merge --plan plan.json --execute
36173
+ $ lexrunner weave apply --plan plan.json --dry-run
36174
+ $ lexrunner weave apply --plan plan.json --execute
36171
36175
  `
36172
36176
  ).action(async (opts) => {
36173
36177
  await runApply(
@@ -36506,7 +36510,7 @@ var fs42 = __toESM(require("fs"), 1);
36506
36510
  var path32 = __toESM(require("path"), 1);
36507
36511
  function registerPlanCommand(program2, deps) {
36508
36512
  program2.command("plan").description(
36509
- "Generate plan from configuration sources or GitHub PRs (canonical: lex-pr weave plan)"
36513
+ "Generate plan from configuration sources or GitHub PRs (canonical: lexrunner weave plan)"
36510
36514
  ).option("--out <dir>", "Output directory for artifacts (default: <profile>/runner)").option("--json", "Output canonical plan JSON to stdout only").option("--dry-run", "Validate inputs and show what would be written").option("--from-github", "Auto-discover PRs from GitHub API").option("--query <query>", "GitHub search query (e.g., 'is:open label:stack:*')").option("--labels <labels>", "Filter PRs by comma-separated labels").option("--include-drafts", "Include draft PRs in the plan").option("--exclude-prs <numbers>", "Exclude specific PRs by comma-separated PR numbers").option("--github-token <token>", "GitHub API token (or use GITHUB_TOKEN env var)").option("--owner <owner>", "GitHub repository owner (auto-detected from git remote)").option("--repo <repo>", "GitHub repository name (auto-detected from git remote)").option(
36511
36515
  "--required-gates <gates>",
36512
36516
  "Comma-separated list of required gates (default: lint,typecheck,test)"
@@ -36524,20 +36528,20 @@ function registerPlanCommand(program2, deps) {
36524
36528
  "after",
36525
36529
  `
36526
36530
  Examples:
36527
- $ lex-pr plan --from-github --json > plan.json # Generate plan from GitHub PRs
36528
- $ lex-pr plan --dry-run # Preview plan without writing
36529
- $ lex-pr plan --labels "feature,bugfix" # Filter by labels
36530
- $ lex-pr plan --exclude-prs 123,456 # Exclude specific PRs
36531
- $ lex-pr plan --target staging # Target different branch
36532
- $ lex-pr plan --required-gates lint,test,e2e # Custom gate requirements
36533
- $ lex-pr plan --from-github --suggest-deps # Review dependency suggestions
36534
- $ lex-pr plan --from-github --suggest-deps --format=json # JSON suggestions for tooling
36535
- $ lex-pr plan --from-github --suggest-deps --threshold=0.7 # High-confidence only
36531
+ $ lexrunner plan --from-github --json > plan.json # Generate plan from GitHub PRs
36532
+ $ lexrunner plan --dry-run # Preview plan without writing
36533
+ $ lexrunner plan --labels "feature,bugfix" # Filter by labels
36534
+ $ lexrunner plan --exclude-prs 123,456 # Exclude specific PRs
36535
+ $ lexrunner plan --target staging # Target different branch
36536
+ $ lexrunner plan --required-gates lint,test,e2e # Custom gate requirements
36537
+ $ lexrunner plan --from-github --suggest-deps # Review dependency suggestions
36538
+ $ lexrunner plan --from-github --suggest-deps --format=json # JSON suggestions for tooling
36539
+ $ lexrunner plan --from-github --suggest-deps --threshold=0.7 # High-confidence only
36536
36540
 
36537
36541
  Common Issues:
36538
36542
  \u2022 GitHub API errors: Set GITHUB_TOKEN environment variable
36539
36543
  \u2022 Cycle detection failures: Review dependencies in scope.yml or PR descriptions
36540
- \u2022 Missing configuration: Run 'lex-pr init' to set up workspace`
36544
+ \u2022 Missing configuration: Run 'lexrunner init' to set up workspace`
36541
36545
  ).action(async (opts) => {
36542
36546
  const previousJsonMode = deps.jsonModeActive();
36543
36547
  if (opts.json) {
@@ -36681,12 +36685,12 @@ async function executePlan(opts, deps) {
36681
36685
  }
36682
36686
  } catch (error) {
36683
36687
  if (error instanceof CycleError) {
36684
- const prefix = deps.jsonModeActive() ? "[lex-pr]" : "\u274C";
36688
+ const prefix = deps.jsonModeActive() ? "[lexrunner]" : "\u274C";
36685
36689
  console.error(`
36686
36690
  ${prefix} Plan validation failed: ${error.message}`);
36687
36691
  throwExit(1);
36688
36692
  } else if (error instanceof UnknownDependencyError) {
36689
- const prefix = deps.jsonModeActive() ? "[lex-pr]" : "\u274C";
36693
+ const prefix = deps.jsonModeActive() ? "[lexrunner]" : "\u274C";
36690
36694
  console.error(`
36691
36695
  ${prefix} Plan validation failed: ${error.message}`);
36692
36696
  throwExit(1);
@@ -37903,7 +37907,7 @@ async function finalizeAuditGuard(emitter, status) {
37903
37907
  if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
37904
37908
  throw e;
37905
37909
  }
37906
- console.warn("[lex-pr] audit: finalize failed (ignored)", String(e));
37910
+ console.warn("[lexrunner] audit: finalize failed (ignored)", String(e));
37907
37911
  }
37908
37912
  }
37909
37913
  function registerExecuteCommand(program2, deps, registration = {}) {
@@ -37914,16 +37918,16 @@ function registerExecuteCommand(program2, deps, registration = {}) {
37914
37918
  "after",
37915
37919
  `
37916
37920
  Examples:
37917
- $ lex-pr execute plan.json # Run all gates in plan
37918
- $ lex-pr execute --dry-run # Validate plan without running gates
37919
- $ lex-pr execute --json > results.json # JSON output for CI/CD integration
37920
- $ lex-pr execute --status-table # Generate PR comment-ready status table
37921
- $ lex-pr execute --timeout 60000 # Increase timeout to 60 seconds
37922
- $ lex-pr execute --artifact-dir ./build # Custom artifact location
37921
+ $ lexrunner execute plan.json # Run all gates in plan
37922
+ $ lexrunner execute --dry-run # Validate plan without running gates
37923
+ $ lexrunner execute --json > results.json # JSON output for CI/CD integration
37924
+ $ lexrunner execute --status-table # Generate PR comment-ready status table
37925
+ $ lexrunner execute --timeout 60000 # Increase timeout to 60 seconds
37926
+ $ lexrunner execute --artifact-dir ./build # Custom artifact location
37923
37927
 
37924
37928
  Common Issues:
37925
37929
  \u2022 Gates timing out: Increase --timeout or check gate commands
37926
- \u2022 Missing dependencies: Run 'lex-pr merge-order' to verify plan structure
37930
+ \u2022 Missing dependencies: Run 'lexrunner merge-order' to verify plan structure
37927
37931
  \u2022 Permission errors: Ensure artifact directory is writable`
37928
37932
  ).action(async (file, opts) => {
37929
37933
  const planFile = opts.plan ?? file ?? "plan.json";
@@ -38131,7 +38135,7 @@ Common Issues:
38131
38135
  if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
38132
38136
  deps.exitWith(e);
38133
38137
  }
38134
- console.warn("[lex-pr] audit: finalize on dry-run failed (ignored)", String(e));
38138
+ console.warn("[lexrunner] audit: finalize on dry-run failed (ignored)", String(e));
38135
38139
  }
38136
38140
  }
38137
38141
  return;
@@ -38315,15 +38319,15 @@ Common Issues:
38315
38319
  init_api();
38316
38320
  init_canonicalJson();
38317
38321
  function registerDiscoverCommand(program2, deps) {
38318
- program2.command("discover").description("Discover open pull requests from GitHub (canonical: lex-pr weave discover)").option("--owner <owner>", "GitHub repository owner").option("--repo <repo>", "GitHub repository name").option("--state <state>", "PR state filter", "open").option("--suggest", "Generate dependency/grouping suggestions using heuristics").option("--json", "Output JSON format").addHelpText(
38322
+ program2.command("discover").description("Discover open pull requests from GitHub (canonical: lexrunner weave discover)").option("--owner <owner>", "GitHub repository owner").option("--repo <repo>", "GitHub repository name").option("--state <state>", "PR state filter", "open").option("--suggest", "Generate dependency/grouping suggestions using heuristics").option("--json", "Output JSON format").addHelpText(
38319
38323
  "after",
38320
38324
  `
38321
38325
  Examples:
38322
- $ lex-pr discover # Discover PRs from current repo
38323
- $ lex-pr discover --suggest # Discover with dependency suggestions
38324
- $ lex-pr discover --json > prs.json # JSON output for processing
38325
- $ lex-pr discover --owner org --repo project # Specify repository explicitly
38326
- $ lex-pr discover --state all # Include closed PRs
38326
+ $ lexrunner discover # Discover PRs from current repo
38327
+ $ lexrunner discover --suggest # Discover with dependency suggestions
38328
+ $ lexrunner discover --json > prs.json # JSON output for processing
38329
+ $ lexrunner discover --owner org --repo project # Specify repository explicitly
38330
+ $ lexrunner discover --state all # Include closed PRs
38327
38331
 
38328
38332
  Common Issues:
38329
38333
  \u2022 "Could not detect repository": Set GITHUB_TOKEN or run from git repository
@@ -38345,9 +38349,9 @@ Common Issues:
38345
38349
  console.error(" 1. Run from a Git repository with GitHub remote:");
38346
38350
  console.error(" git remote -v");
38347
38351
  console.error("\n 2. Specify repository explicitly:");
38348
- console.error(" lex-pr discover --owner <owner> --repo <repo>\n");
38352
+ console.error(" lexrunner discover --owner <owner> --repo <repo>\n");
38349
38353
  console.error("\u{1F4A1} Tip: Initialize your workspace first:");
38350
- console.error(" lex-pr init\n");
38354
+ console.error(" lexrunner init\n");
38351
38355
  throwExit(1);
38352
38356
  }
38353
38357
  const resolvedAPI = githubAPI;
@@ -38709,7 +38713,7 @@ init_canonicalJson();
38709
38713
  var import_chalk5 = __toESM(require("chalk"), 1);
38710
38714
  var fs52 = __toESM(require("fs"), 1);
38711
38715
  function registerPlanBatchCommand(program2, jsonModeActive2) {
38712
- program2.command("orchestrate:plan-batch").description("Generate batch plan using Kahn's algorithm (canonical: lex-pr weave plan)").option("--issues <numbers>", "Comma-separated issue/PR numbers (e.g., 156,157,160)").option("--input <file>", "Input JSON file with analyzed issues").option("--json", "Output JSON format instead of human-readable").action(async (options) => {
38716
+ program2.command("orchestrate:plan-batch").description("Generate batch plan using Kahn's algorithm (canonical: lexrunner weave plan)").option("--issues <numbers>", "Comma-separated issue/PR numbers (e.g., 156,157,160)").option("--input <file>", "Input JSON file with analyzed issues").option("--json", "Output JSON format instead of human-readable").action(async (options) => {
38713
38717
  try {
38714
38718
  let nodes = [];
38715
38719
  if (options.input) {
@@ -38796,7 +38800,7 @@ function formatToolVersion(tool, useColor = true) {
38796
38800
  function registerPinToolchainCommand(program2) {
38797
38801
  const orchestrateCmd = program2.command("orchestrate").description("Orchestration commands for merge-weave operations");
38798
38802
  orchestrateCmd.command("pin-toolchain").description(
38799
- "Verify toolchain versions match pinned versions (canonical: lex-pr workspace doctor)"
38803
+ "Verify toolchain versions match pinned versions (canonical: lexrunner workspace doctor)"
38800
38804
  ).option("--verify", "Check if current versions match pinned versions (default: true)", true).action(async (opts, command) => {
38801
38805
  const globalOpts = command.optsWithGlobals();
38802
38806
  const jsonMode2 = globalOpts.json || opts.json || false;
@@ -39368,7 +39372,7 @@ function formatAssignmentLog(log, repo) {
39368
39372
  var import_chalk6 = __toESM(require("chalk"), 1);
39369
39373
  function registerPredictConflictsCommand(program2, jsonModeActive2) {
39370
39374
  program2.command("orchestrate:predict-conflicts").description(
39371
- "Predict merge conflicts using conflict graphs and MIS computation (canonical: lex-pr weave analyze)"
39375
+ "Predict merge conflicts using conflict graphs and MIS computation (canonical: lexrunner weave analyze)"
39372
39376
  ).option("--prs <numbers>", "Comma-separated list of PR numbers (e.g., 166,167,168)").option("--base <branch>", "Base branch for conflict analysis", "main").option("--skip-merge-tree", "Skip git merge-tree simulation").option("--enable-clustering", "Enable conflict clustering by file and symbol").option("--write-weave-conflicts", "Write clustered conflicts to .weave/conflicts.json").option("--json", "Output JSON format").action(async (options) => {
39373
39377
  try {
39374
39378
  const useJson = options.json || jsonModeActive2();
@@ -39845,13 +39849,13 @@ async function generateDeliverables(options) {
39845
39849
  // src/commands/orchestrate/generate-deliverables.ts
39846
39850
  function registerGenerateDeliverablesCommand(program2) {
39847
39851
  program2.command("orchestrate:generate-deliverables").description(
39848
- "Generate merge-weave deliverables with plan hash and toolchain manifest (canonical: lex-pr weave report)"
39852
+ "Generate merge-weave deliverables with plan hash and toolchain manifest (canonical: lexrunner weave report)"
39849
39853
  ).option("--batch <batchId>", "Batch identifier (e.g., batch3)").option("--plan <path>", "Path to plan.json file", "plan.json").option("--output-dir <path>", "Output directory for deliverables").action(async (options) => {
39850
39854
  try {
39851
39855
  if (!options.batch) {
39852
39856
  console.error("\u274C Error: --batch is required");
39853
39857
  console.error(
39854
- "Example: lex-pr orchestrate:generate-deliverables --batch batch3 --plan plan.json"
39858
+ "Example: lexrunner orchestrate:generate-deliverables --batch batch3 --plan plan.json"
39855
39859
  );
39856
39860
  process.exit(1);
39857
39861
  }
@@ -39930,7 +39934,7 @@ async function getRepository() {
39930
39934
  }
39931
39935
  function registerAssignBatchCommand(program2) {
39932
39936
  const assignBatch = program2.command("orchestrate:assign-batch").description(
39933
- "Bulk-assign GitHub Copilot agents to batched issues [DEPRECATED: Use 'lex-pr fanout assign']"
39937
+ "Bulk-assign GitHub Copilot agents to batched issues [DEPRECATED: Use 'lexrunner fanout assign']"
39934
39938
  ).option("--batch <file>", "Batch plan JSON file").option("--issues <numbers>", "Comma-separated issue numbers (e.g., 156,157,160)").option("--repo <owner/repo>", "GitHub repository (default: auto-detect)").option("--dry-run", "Show what would be assigned without actually doing it").option("--stagger <seconds>", "Wait N seconds between assignments (default: 5)", "5").action(async (options, command) => {
39935
39939
  const globalOpts = command.optsWithGlobals();
39936
39940
  const isJsonMode2 = globalOpts.json || false;
@@ -40390,7 +40394,7 @@ function formatTable2(result) {
40390
40394
  return lines.join("\n");
40391
40395
  }
40392
40396
  function registerAnalyzeIssuesCommand(program2, jsonModeActive2) {
40393
- program2.command("orchestrate:analyze-issues").description("Analyze GitHub issues for fanout [DEPRECATED: Use 'lex-pr fanout analyze']").option("--repo <owner/repo>", "Repository (format: owner/repo)").option("--labels <labels>", "Filter by labels (comma-separated)").option("--json", "Output JSON format").action(async (opts) => {
40397
+ program2.command("orchestrate:analyze-issues").description("Analyze GitHub issues for fanout [DEPRECATED: Use 'lexrunner fanout analyze']").option("--repo <owner/repo>", "Repository (format: owner/repo)").option("--labels <labels>", "Filter by labels (comma-separated)").option("--json", "Output JSON format").action(async (opts) => {
40394
40398
  try {
40395
40399
  let owner;
40396
40400
  let repo;
@@ -41103,7 +41107,7 @@ init_profileResolver();
41103
41107
  init_hostility();
41104
41108
  init_colorControl();
41105
41109
  function registerDoctorCommand(program2, jsonModeActive2) {
41106
- program2.command("doctor").description("Environment and config sanity checks (canonical: lex-pr workspace doctor)").option("--bootstrap", "Create minimal workspace configuration if missing").option("--json", "Output JSON format").option("--environment-quality", "Run environmental hostility scoring").action(async (options) => {
41110
+ program2.command("doctor").description("Environment and config sanity checks (canonical: lexrunner workspace doctor)").option("--bootstrap", "Create minimal workspace configuration if missing").option("--json", "Output JSON format").option("--environment-quality", "Run environmental hostility scoring").action(async (options) => {
41107
41111
  const json2 = options.json || (jsonModeActive2?.() ?? false);
41108
41112
  if (json2) initColorControl({ jsonMode: true });
41109
41113
  let result = await new WorkspaceDiagnosticsService().run({
@@ -60958,7 +60962,7 @@ function commandPath(command) {
60958
60962
  function aliasWarning(path72) {
60959
60963
  const policy = POLICY_BY_PATH.get(path72);
60960
60964
  if (!policy) return null;
60961
- return policy.disposition === "deprecated" ? `[lex-pr] deprecated alias "${path72}"; use "${policy.replacement}"; removal: ${policy.removeIn}.` : `[lex-pr] compatibility alias "${path72}"; use "${policy.replacement}"; supported through 1.x and reviewed at 2.0.0.`;
60965
+ return policy.disposition === "deprecated" ? `[lexrunner] deprecated alias "${path72}"; use "${policy.replacement}"; removal: ${policy.removeIn}.` : `[lexrunner] compatibility alias "${path72}"; use "${policy.replacement}"; supported through 1.x and reviewed at 2.0.0.`;
60962
60966
  }
60963
60967
  function emitAliasWarning(command, write = (message) => process.stderr.write(message)) {
60964
60968
  const warning = aliasWarning(commandPath(command));
@@ -63020,7 +63024,7 @@ async function finalizeAuditGuard2(emitter, status) {
63020
63024
  if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
63021
63025
  throw e;
63022
63026
  }
63023
- console.warn("[lex-pr] audit: finalize failed (ignored)", String(e));
63027
+ console.warn("[lexrunner] audit: finalize failed (ignored)", String(e));
63024
63028
  }
63025
63029
  }
63026
63030
  function exitWith(e, schemaCode = "ESCHEMA") {
@@ -63037,7 +63041,7 @@ function exitWith(e, schemaCode = "ESCHEMA") {
63037
63041
  throwExit(2);
63038
63042
  }
63039
63043
  if (e instanceof SchemaValidationError || e instanceof CycleError || e instanceof UnknownDependencyError || e instanceof WriteProtectionError || e instanceof AutopilotConfigError) {
63040
- const prefix2 = jsonModeActive ? "[lex-pr]" : "\u274C";
63044
+ const prefix2 = jsonModeActive ? "[lexrunner]" : "\u274C";
63041
63045
  if (e instanceof SchemaValidationError && !jsonModeActive) {
63042
63046
  console.error(
63043
63047
  `
@@ -63053,35 +63057,35 @@ ${prefix2} Error: ${String(err?.message ?? e)}
63053
63057
  if (!jsonModeActive) {
63054
63058
  if (e instanceof WriteProtectionError) {
63055
63059
  console.error("\u{1F4A1} Tip: Use a local profile directory for development:");
63056
- console.error(" lex-pr init --profile-dir .smartergpt.local\n");
63060
+ console.error(" lexrunner init --profile-dir .smartergpt.local\n");
63057
63061
  } else if (e instanceof CycleError) {
63058
63062
  console.error("\u{1F4A1} Tip: Check your dependency declarations in PR descriptions");
63059
63063
  console.error(" Look for circular dependencies like: A\u2192B\u2192C\u2192A\n");
63060
63064
  } else if (e instanceof UnknownDependencyError) {
63061
63065
  console.error("\u{1F4A1} Tip: Ensure all referenced PRs exist and are included in your plan");
63062
- console.error(" Run 'lex-pr discover' to find available PRs\n");
63066
+ console.error(" Run 'lexrunner discover' to find available PRs\n");
63063
63067
  } else if (e instanceof SchemaValidationError) {
63064
63068
  console.error("\u{1F4A1} Tip: Validate your configuration files:");
63065
- console.error(" lex-pr schema validate plan.json\n");
63069
+ console.error(" lexrunner schema validate plan.json\n");
63066
63070
  }
63067
63071
  }
63068
63072
  process.exitCode = 2;
63069
63073
  throwExit(2);
63070
63074
  }
63071
63075
  if (e instanceof Error && typeof e.message === "string" && e.message.startsWith("HIPAA:")) {
63072
- const prefix2 = jsonModeActive ? "[lex-pr]" : "\u274C";
63076
+ const prefix2 = jsonModeActive ? "[lexrunner]" : "\u274C";
63073
63077
  console.error(`
63074
63078
  ${prefix2} ${e.message.replace(/^HIPAA:\s*/, "")}
63075
63079
  `);
63076
63080
  process.exitCode = 2;
63077
63081
  throwExit(2);
63078
63082
  }
63079
- const prefix = jsonModeActive ? "[lex-pr]" : "\u274C";
63083
+ const prefix = jsonModeActive ? "[lexrunner]" : "\u274C";
63080
63084
  console.error(`
63081
63085
  ${prefix} Unexpected error: ${String(err?.message ?? e)}
63082
63086
  `);
63083
63087
  if (!jsonModeActive) {
63084
- console.error("\u{1F4A1} Tip: Run 'lex-pr doctor' to check your environment\n");
63088
+ console.error("\u{1F4A1} Tip: Run 'lexrunner doctor' to check your environment\n");
63085
63089
  }
63086
63090
  throwExit(1);
63087
63091
  }
@@ -63093,9 +63097,9 @@ program.configureOutput({
63093
63097
  writeOut: (str) => process.stdout.write(str),
63094
63098
  writeErr: (str) => process.stderr.write(str)
63095
63099
  });
63096
- program.name("lex-pr").description(
63097
- "Lex-PR Runner - Fan-out PRs, compute merge pyramid, run gates, and weave merges cleanly"
63098
- ).version(`LexRunner ${package_default.version} (lex-pr)`).option("--no-color", "Disable ANSI color codes in output").option("--audit-profile <profile>", "Audit logging profile: off|basic|soc2|hipaa-strict", "off").option("--audit-key <hex>", "Audit encryption key (64 hex chars) - overrides LEX_AUDIT_KEY_HEX").option("--json", "Enable JSON output mode (implies --no-color)").option(
63100
+ program.name("lexrunner").description(
63101
+ "LexRunner - Fan-out PRs, compute merge pyramid, run gates, and weave merges cleanly"
63102
+ ).version(`LexRunner ${package_default.version} (lexrunner)`).option("--no-color", "Disable ANSI color codes in output").option("--audit-profile <profile>", "Audit logging profile: off|basic|soc2|hipaa-strict", "off").option("--audit-key <hex>", "Audit encryption key (64 hex chars) - overrides LEX_AUDIT_KEY_HEX").option("--json", "Enable JSON output mode (implies --no-color)").option(
63099
63103
  "--log-format <format>",
63100
63104
  "Log output format: 'json' or 'human'",
63101
63105
  process.env.LOG_FORMAT || "human"
@@ -63117,57 +63121,57 @@ program.name("lex-pr").description(
63117
63121
  "after",
63118
63122
  `
63119
63123
  Examples (Canonical Category-Action Pattern):
63120
- $ lex-pr workspace init Initialize workspace with interactive setup
63121
- $ lex-pr workspace doctor Validate environment and configuration
63122
- $ lex-pr idea Capture feature idea interactively
63123
- $ lex-pr idea --title "..." --description "..." --dry-run
63124
- $ lex-pr config show Display configuration with precedence chain
63125
- $ lex-pr config show --key scope.target Show specific configuration value
63126
- $ lex-pr config show --json Output configuration in JSON format
63127
- $ lex-pr config:inspect Display merged configuration with provenance map
63128
- $ lex-pr weave discover Find open PRs matching scope
63129
- $ lex-pr weave discover --suggest Generate dependency suggestions with heuristics
63130
- $ lex-pr weave plan --from-github Generate merge plan from GitHub PRs
63131
- $ lex-pr plan-review plan.json Interactively review and edit plan
63132
- $ lex-pr plan-diff plan1.json plan2.json Compare two plans
63133
- $ lex-pr gate run plan.json Run quality gates on plan
63134
- $ lex-pr orchestrate:analyze-issues Analyze issues for parallel work planning (fanout commands coming soon)
63135
- $ lex-pr orchestrate:analyze-issues --labels priority:P1 --json
63136
- $ lex-pr security check-rotation Check token rotation status
63137
- $ lex-pr security scan-plan Scan a plan file for secrets
63138
- $ lex-pr security validate-secrets GITHUB_TOKEN OTHER_SECRET
63124
+ $ lexrunner workspace init Initialize workspace with interactive setup
63125
+ $ lexrunner workspace doctor Validate environment and configuration
63126
+ $ lexrunner idea Capture feature idea interactively
63127
+ $ lexrunner idea --title "..." --description "..." --dry-run
63128
+ $ lexrunner config show Display configuration with precedence chain
63129
+ $ lexrunner config show --key scope.target Show specific configuration value
63130
+ $ lexrunner config show --json Output configuration in JSON format
63131
+ $ lexrunner config:inspect Display merged configuration with provenance map
63132
+ $ lexrunner weave discover Find open PRs matching scope
63133
+ $ lexrunner weave discover --suggest Generate dependency suggestions with heuristics
63134
+ $ lexrunner weave plan --from-github Generate merge plan from GitHub PRs
63135
+ $ lexrunner plan-review plan.json Interactively review and edit plan
63136
+ $ lexrunner plan-diff plan1.json plan2.json Compare two plans
63137
+ $ lexrunner gate run plan.json Run quality gates on plan
63138
+ $ lexrunner orchestrate:analyze-issues Analyze issues for parallel work planning (fanout commands coming soon)
63139
+ $ lexrunner orchestrate:analyze-issues --labels priority:P1 --json
63140
+ $ lexrunner security check-rotation Check token rotation status
63141
+ $ lexrunner security scan-plan Scan a plan file for secrets
63142
+ $ lexrunner security validate-secrets GITHUB_TOKEN OTHER_SECRET
63139
63143
 
63140
63144
  Governance (LexSona Shadow Mode):
63141
- $ lex-pr governance:report Analyze shadow governance logs
63142
- $ lex-pr governance:report --format markdown --disagreements-only
63143
- $ lex-pr governance:report --since 2025-12-01 --persona quality-first_engineering
63144
- $ lex-pr governance:cleanup Clean up old governance logs
63145
+ $ lexrunner governance:report Analyze shadow governance logs
63146
+ $ lexrunner governance:report --format markdown --disagreements-only
63147
+ $ lexrunner governance:report --since 2025-12-01 --persona quality-first_engineering
63148
+ $ lexrunner governance:cleanup Clean up old governance logs
63145
63149
 
63146
63150
  Power User Commands:
63147
- $ lex-pr view plan.json Interactive plan viewer
63148
- $ lex-pr query plan.json --stats Plan statistics and analysis
63149
- $ lex-pr query plan.json "level eq 1" Query items by criteria
63150
- $ lex-pr retry --filter failed Retry failed gates
63151
- $ lex-pr completion bash Generate bash completion script
63151
+ $ lexrunner view plan.json Interactive plan viewer
63152
+ $ lexrunner query plan.json --stats Plan statistics and analysis
63153
+ $ lexrunner query plan.json "level eq 1" Query items by criteria
63154
+ $ lexrunner retry --filter failed Retry failed gates
63155
+ $ lexrunner completion bash Generate bash completion script
63152
63156
 
63153
63157
  Canonical Workflow:
63154
- 1. Ideate: lex-pr idea (capture feature ideas as GitHub Issues)
63155
- 2. Discover: lex-pr weave discover (optionally add --suggest for dependencies)
63156
- 3. Plan: lex-pr weave plan --from-github --json > plan.json
63157
- 4. Review: lex-pr plan-review plan.json
63158
- 5. Execute: lex-pr gate run plan.json
63159
- 6. Report: lex-pr weave report artifacts --out md
63158
+ 1. Ideate: lexrunner idea (capture feature ideas as GitHub Issues)
63159
+ 2. Discover: lexrunner weave discover (optionally add --suggest for dependencies)
63160
+ 3. Plan: lexrunner weave plan --from-github --json > plan.json
63161
+ 4. Review: lexrunner plan-review plan.json
63162
+ 5. Execute: lexrunner gate run plan.json
63163
+ 6. Report: lexrunner weave report artifacts --out md
63160
63164
 
63161
63165
  Legacy Commands (Deprecated, use canonical forms above):
63162
- $ lex-pr init \u2192 lex-pr workspace init
63163
- $ lex-pr doctor \u2192 lex-pr workspace doctor
63164
- $ lex-pr discover \u2192 lex-pr weave discover
63165
- $ lex-pr plan \u2192 lex-pr weave plan
63166
- $ lex-pr status \u2192 lex-pr weave status
63167
- $ lex-pr report \u2192 lex-pr weave report
63168
- $ lex-pr execute \u2192 lex-pr gate run
63169
- $ lex-pr orchestrate:analyze-issues \u2192 lex-pr fanout analyze
63170
- $ lex-pr orchestrate:assign-batch \u2192 lex-pr fanout assign
63166
+ $ lexrunner init \u2192 lexrunner workspace init
63167
+ $ lexrunner doctor \u2192 lexrunner workspace doctor
63168
+ $ lexrunner discover \u2192 lexrunner weave discover
63169
+ $ lexrunner plan \u2192 lexrunner weave plan
63170
+ $ lexrunner status \u2192 lexrunner weave status
63171
+ $ lexrunner report \u2192 lexrunner weave report
63172
+ $ lexrunner execute \u2192 lexrunner gate run
63173
+ $ lexrunner orchestrate:analyze-issues \u2192 lexrunner fanout analyze
63174
+ $ lexrunner orchestrate:assign-batch \u2192 lexrunner fanout assign
63171
63175
  `
63172
63176
  );
63173
63177
  registerGateReportCommand(program);
@@ -63503,7 +63507,7 @@ program.command("bootstrap").description("Create minimal workspace configuration
63503
63507
  console.log("1. Edit .smartergpt/intent.md to describe your project goals");
63504
63508
  console.log("2. Update .smartergpt/scope.yml for PR discovery rules");
63505
63509
  console.log("3. Configure .smartergpt/gates.yml for quality gates");
63506
- console.log("4. Run 'lex-pr doctor' to verify configuration");
63510
+ console.log("4. Run 'lexrunner doctor' to verify configuration");
63507
63511
  }
63508
63512
  }
63509
63513
  } catch (error) {
@@ -63565,7 +63569,7 @@ program.command("init-local").description("Initialize local overlay directory wi
63565
63569
  throwExit(1);
63566
63570
  }
63567
63571
  });
63568
- program.command("migrate-profile").description("Migrate profile configuration structure (canonical: lex-pr workspace migrate)").option("--from-flat", "Migrate from flat structure to runner/ subdirectory").option("--dry-run", "Show what would be migrated without making changes").option("--profile-dir <path>", "Profile directory to migrate (default: auto-detect)").action(async (opts) => {
63572
+ program.command("migrate-profile").description("Migrate profile configuration structure (canonical: lexrunner workspace migrate)").option("--from-flat", "Migrate from flat structure to runner/ subdirectory").option("--dry-run", "Show what would be migrated without making changes").option("--profile-dir <path>", "Profile directory to migrate (default: auto-detect)").action(async (opts) => {
63569
63573
  try {
63570
63574
  const result = await runMigrateProfile({
63571
63575
  fromFlat: opts.fromFlat,
@@ -63807,7 +63811,7 @@ async function main(argv = process.argv) {
63807
63811
  return;
63808
63812
  }
63809
63813
  const message = error instanceof Error ? error.message : String(error);
63810
- const prefix = jsonModeActive ? "[lex-pr]" : "\u274C";
63814
+ const prefix = jsonModeActive ? "[lexrunner]" : "\u274C";
63811
63815
  process.stderr.write(`${prefix} ${message}
63812
63816
  `);
63813
63817
  process.exitCode = 1;
@@ -63829,7 +63833,7 @@ if (isDirectExec) {
63829
63833
  installUnhandledRejectionHandler();
63830
63834
  void main().catch((error) => {
63831
63835
  const message = error instanceof Error ? error.message : String(error);
63832
- process.stderr.write(`[lex-pr] fatal: ${message}
63836
+ process.stderr.write(`[lexrunner] fatal: ${message}
63833
63837
  `);
63834
63838
  process.exitCode = process.exitCode ?? 1;
63835
63839
  });