@xenonbyte/da-vinci-workflow 0.1.23 → 0.1.24

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/lib/cli.js CHANGED
@@ -42,6 +42,10 @@ const {
42
42
  loadIconAliases,
43
43
  expandQueryWithAliases
44
44
  } = require("./icon-aliases");
45
+ const {
46
+ runDesignSupervisorReview,
47
+ formatDesignSupervisorReviewReport
48
+ } = require("./supervisor-review");
45
49
 
46
50
  function getOption(args, name) {
47
51
  const direct = args.find((arg) => arg.startsWith(`${name}=`));
@@ -105,6 +109,7 @@ function printHelp() {
105
109
  " da-vinci audit [project-path]",
106
110
  " da-vinci icon-sync [--output <path>] [--timeout-ms <value>] [--strict]",
107
111
  " da-vinci icon-search --query <text> [--family <value>] [--top <value>] [--catalog <path>] [--aliases <path>] [--json]",
112
+ " da-vinci supervisor-review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status <PASS|WARN|BLOCK>] [--issue-list <text>] [--revision-outcome <text>] [--write] [--json]",
108
113
  " da-vinci preflight-pencil --ops-file <path>",
109
114
  " da-vinci ensure-pen --output <path>",
110
115
  " da-vinci write-pen --output <path> --nodes-file <path> [--variables-file <path>]",
@@ -125,8 +130,21 @@ function printHelp() {
125
130
  " --project <path> override project path for audit",
126
131
  " --catalog <path> icon catalog path for icon-search/icon-sync (default: ~/.da-vinci/icon-catalog.json)",
127
132
  " --aliases <path> icon alias mapping file for icon-search (default: ~/.da-vinci/icon-aliases.json)",
133
+ " --pencil-design <path> explicit pencil-design.md path for supervisor-review",
128
134
  " --query <text> icon-search query text",
129
135
  " --family <value> icon-search family filter: all, material, rounded, outlined, sharp, lucide, feather, phosphor",
136
+ " --status <value> PASS, WARN, or BLOCK for supervisor-review",
137
+ " --source <value> review source: skill, manual, inferred",
138
+ " --executed-reviewers <csv> reviewer skills that executed this review",
139
+ " --run-reviewers execute configured reviewer skills through codex exec",
140
+ " --review-concurrency <value> max parallel reviewer executions (default 2)",
141
+ " --review-retries <value> retry count per reviewer before failing (default 1)",
142
+ " --review-retry-delay-ms <value> initial retry delay in milliseconds (default 400, exponential backoff)",
143
+ " --codex-bin <path> codex executable path for --run-reviewers (default: codex)",
144
+ " --max-images <value> max screenshots attached to reviewer runs (default 6)",
145
+ " --review-timeout-ms <value> timeout per reviewer run in milliseconds",
146
+ " --issue-list <text> supervisor-review issue summary",
147
+ " --revision-outcome <text> supervisor-review revision result summary",
130
148
  " --top <value> icon-search result count (1-50, default 8)",
131
149
  " --timeout-ms <value> network timeout for icon-sync requests",
132
150
  " --strict fail icon-sync when any upstream source request fails",
@@ -162,6 +180,18 @@ async function runCli(argv) {
162
180
  "--top",
163
181
  "--catalog",
164
182
  "--aliases",
183
+ "--pencil-design",
184
+ "--status",
185
+ "--source",
186
+ "--executed-reviewers",
187
+ "--codex-bin",
188
+ "--max-images",
189
+ "--review-timeout-ms",
190
+ "--review-concurrency",
191
+ "--review-retries",
192
+ "--review-retry-delay-ms",
193
+ "--issue-list",
194
+ "--revision-outcome",
165
195
  "--timeout-ms",
166
196
  "--ops-file",
167
197
  "--input",
@@ -394,6 +424,73 @@ async function runCli(argv) {
394
424
  return;
395
425
  }
396
426
 
427
+ if (command === "supervisor-review") {
428
+ if (argv.includes("--help") || argv.includes("-h")) {
429
+ console.log(
430
+ [
431
+ "da-vinci supervisor-review",
432
+ "",
433
+ "Usage:",
434
+ " da-vinci supervisor-review --project <path> --change <id> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status <PASS|WARN|BLOCK>] [--issue-list <text>] [--revision-outcome <text>] [--write] [--json]",
435
+ " da-vinci supervisor-review --project <path> --pencil-design <path> [--run-reviewers] [--review-concurrency <value>] [--review-retries <value>] [--review-retry-delay-ms <value>] [--source <skill|manual|inferred>] [--executed-reviewers <csv>] [--status <PASS|WARN|BLOCK>] [--issue-list <text>] [--revision-outcome <text>] [--write] [--json]",
436
+ "",
437
+ "Notes:",
438
+ " - omit --status to infer a conservative review status from current design artifacts",
439
+ " - use --run-reviewers to execute configured reviewer skills automatically via codex exec",
440
+ " - `design-supervisor review` is a compatibility alias for this command"
441
+ ].join("\n")
442
+ );
443
+ return;
444
+ }
445
+
446
+ const projectPath = getOption(argv, "--project") || process.cwd();
447
+ const changeId = getOption(argv, "--change");
448
+ const pencilDesignPath = getOption(argv, "--pencil-design");
449
+ const status = getOption(argv, "--status");
450
+ const source = getOption(argv, "--source");
451
+ const executedReviewers = getOption(argv, "--executed-reviewers");
452
+ const codexBin = getOption(argv, "--codex-bin");
453
+ const maxImages = getOption(argv, "--max-images");
454
+ const reviewerTimeoutMs = getOption(argv, "--review-timeout-ms");
455
+ const reviewConcurrency = getOption(argv, "--review-concurrency");
456
+ const reviewerRetries = getOption(argv, "--review-retries");
457
+ const reviewerRetryDelayMs = getOption(argv, "--review-retry-delay-ms");
458
+ const issueList = getOption(argv, "--issue-list");
459
+ const revisionOutcome = getOption(argv, "--revision-outcome");
460
+ const write = argv.includes("--write");
461
+ const acceptWarn = argv.includes("--accept-warn");
462
+ const runReviewers = argv.includes("--run-reviewers");
463
+ const jsonOutput = argv.includes("--json");
464
+
465
+ const result = await runDesignSupervisorReview({
466
+ projectPath,
467
+ changeId,
468
+ pencilDesignPath,
469
+ status,
470
+ source,
471
+ executedReviewers,
472
+ codexBin,
473
+ maxImages,
474
+ reviewerTimeoutMs,
475
+ reviewConcurrency,
476
+ reviewerRetries,
477
+ reviewerRetryDelayMs,
478
+ issueList,
479
+ revisionOutcome,
480
+ write,
481
+ acceptWarn,
482
+ runReviewers
483
+ });
484
+
485
+ if (jsonOutput) {
486
+ console.log(JSON.stringify(result, null, 2));
487
+ return;
488
+ }
489
+
490
+ console.log(formatDesignSupervisorReviewReport(result));
491
+ return;
492
+ }
493
+
397
494
  if (command === "ensure-pen") {
398
495
  const outputPath = getOption(argv, "--output");
399
496
  const version = getOption(argv, "--version");