@rigour-labs/cli 6.12.0 → 6.12.1-rc.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.js CHANGED
@@ -275,6 +275,7 @@ program
275
275
  .option('--no-panel', 'With --reviewer: no panel for this run (a team that requires one refuses this)')
276
276
  .option('--orchestrator', 'With --reviewer: only the parts of the review this change needs, picked without a model, usually in one pass (experimental)')
277
277
  .option('--no-orchestrator', 'With --reviewer: one judge for the whole review, for this run (a team that requires the orchestrator refuses this)')
278
+ .option('--blind', 'With --reviewer: review the change alone, with no pull request lookup, description or human reviews (no GitHub CLI needed; also RIGOUR_REVIEWER_BLIND=1)')
278
279
  .option('--status', 'What the background reviewer has done for this branch: running, last verdict, open items')
279
280
  .option('--all', 'Show every finding, not the first five')
280
281
  .option('--notes', 'List the notes that never block')
@@ -1,7 +1,12 @@
1
1
  import { type Config, type ReviewerResult, type ReviewResult, type RunChoice } from '@rigour-labs/core';
2
2
  /** The base a branch review runs against: the one named, else where the branch left main. */
3
3
  export declare function reviewerBase(cwd: string, named: string | undefined): string | undefined;
4
- export declare function reviewerFor(cwd: string, base: string | undefined, config: Config, full: boolean, choice: RunChoice, review: ReviewResult, goal?: boolean, orchestrator?: boolean): Promise<ReviewerResult>;
4
+ /** `run.blind` (or RIGOUR_REVIEWER_BLIND=1): the change alone, with no pull request lookup, description or human reviews (no GitHub CLI needed). */
5
+ export declare function reviewerFor(cwd: string, base: string | undefined, config: Config, full: boolean, choice: RunChoice, review: ReviewResult, run: {
6
+ goal: boolean | undefined;
7
+ orchestrator: boolean | undefined;
8
+ blind: boolean;
9
+ }): Promise<ReviewerResult>;
5
10
  export declare function printReviewer(result: ReviewerResult, options?: {
6
11
  notes?: boolean;
7
12
  }): void;
@@ -12,10 +12,13 @@ import { branchBase, itemLine, reviewerInputs, reviewStatus, runReviewer } from
12
12
  export function reviewerBase(cwd, named) {
13
13
  return named ?? branchBase(cwd)?.mainRef.replace(/^refs\/(remotes\/|heads\/)/, '');
14
14
  }
15
- export async function reviewerFor(cwd, base, config, full, choice, review, goal, orchestrator) {
15
+ /** `run.blind` (or RIGOUR_REVIEWER_BLIND=1): the change alone, with no pull request lookup, description or human reviews (no GitHub CLI needed). */
16
+ export async function reviewerFor(cwd, base, config, full, choice, review, run) {
17
+ const { goal, orchestrator, blind } = run;
16
18
  if (!base)
17
19
  return { outcome: 'unavailable', items: [], unverified: [], resolved: [], answerInReply: [], notes: [], advisory: [], disputed: [], dropped: [], dismissed: [], reason: 'no base to review against: pass --base, or fetch the main branch', reviewers: [], cached: false };
18
- return runReviewer(cwd, base, config, undefined, undefined, { trigger: 'review', full, choice, ...(goal !== undefined ? { goal } : {}), ...(orchestrator !== undefined ? { orchestrator } : {}), ...reviewerInputs(review) });
20
+ const withoutPr = blind || process.env.RIGOUR_REVIEWER_BLIND === '1';
21
+ return runReviewer(cwd, base, config, undefined, undefined, { trigger: 'review', full, choice, ...(withoutPr ? { blind: true } : {}), ...(goal !== undefined ? { goal } : {}), ...(orchestrator !== undefined ? { orchestrator } : {}), ...reviewerInputs(review) });
19
22
  }
20
23
  /** Verified should-fixes shown in full before the rest fold into a count. */
21
24
  const ADVISORY_SHOWN = 5;
@@ -23,6 +26,8 @@ export function printReviewer(result, options = {}) {
23
26
  const who = result.reviewers.length ? result.reviewers.join(' + ') : 'no reviewer';
24
27
  console.log(chalk.bold('\n Reviewer') + chalk.dim(` ${who}${result.scope ? `, ${result.scope}${result.why ? ` (${result.why})` : ''}` : ''}${result.previousReview ? `; previous review: ${result.previousReview}` : '; no previous human review'}`));
25
28
  printMode(result);
29
+ if (result.blind)
30
+ console.log(chalk.dim(' reviewed without pull request context: no pull request, description or human reviews read (--blind)'));
26
31
  if (result.outcome === 'unavailable') {
27
32
  console.log(chalk.red(` No verdict: ${result.reason}. Treated as a fail.`));
28
33
  return;
@@ -88,6 +93,7 @@ export function reviewerJson(result) {
88
93
  outcome: result.outcome,
89
94
  blocks: result.outcome === 'findings' || result.outcome === 'unavailable',
90
95
  reason: result.reason ?? null,
96
+ blind: !!result.blind,
91
97
  reviewers: result.reviewers,
92
98
  scope: result.scope ?? null,
93
99
  items: result.items,
@@ -24,6 +24,7 @@ export interface ReviewOptions {
24
24
  single?: boolean;
25
25
  panel?: boolean;
26
26
  orchestrator?: boolean;
27
+ blind?: boolean;
27
28
  status?: boolean;
28
29
  all?: boolean;
29
30
  notes?: boolean;
@@ -62,7 +62,7 @@ export async function reviewCommand(cwd, options = {}) {
62
62
  if (options.base)
63
63
  recordPrCatches(cwd, result.findings);
64
64
  const receipt = receiptFor(cwd, diff ?? changeDiff(cwd, source), config, !!options.independent);
65
- const reviewer = options.reviewer ? await reviewerFor(cwd, reviewerBase(cwd, options.base), config, !!options.full, { ...(options.single ? { mode: 'single' } : {}), ...(options.panel !== undefined ? { panel: options.panel } : {}) }, result, options.goal, options.orchestrator) : undefined;
65
+ const reviewer = options.reviewer ? await reviewerFor(cwd, reviewerBase(cwd, options.base), config, !!options.full, { ...(options.single ? { mode: 'single' } : {}), ...(options.panel !== undefined ? { panel: options.panel } : {}) }, result, { goal: options.goal, orchestrator: options.orchestrator, blind: !!options.blind }) : undefined;
66
66
  const checked = options.json ? whatWasChecked(cwd, options, trustedRef, result) : undefined;
67
67
  await print(result, options, receipt, reviewer, { cwd, scope: scopeOf(options), commits: commitsOf(cwd, options.base), ms: Date.now() - started }, checked, goalReport(goal, goalDescription, result));
68
68
  if (!isDeep && !receipt && !options.ci && !options.json && !options.githubSummary) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rigour-labs/cli",
3
- "version": "6.12.0",
3
+ "version": "6.12.1-rc.1",
4
4
  "description": "Code review that happens while your agent writes: deterministic checks on the lines it changed, quiet unless it can prove a defect, and learning from your team's fixes and dismissals. Works with Claude Code, Cursor, Codex, Cline and Windsurf.",
5
5
  "engines": {
6
6
  "node": ">=22.13"
@@ -59,13 +59,13 @@
59
59
  "inquirer": "9.2.16",
60
60
  "ora": "^8.0.1",
61
61
  "yaml": "^2.8.2",
62
- "@rigour-labs/core": "6.12.0"
62
+ "@rigour-labs/core": "6.12.1-rc.1"
63
63
  },
64
64
  "devDependencies": {
65
65
  "@types/fs-extra": "^11.0.4",
66
66
  "@types/inquirer": "9.0.7",
67
67
  "@types/node": "^25.0.3",
68
- "@rigour-labs/studio": "6.12.0"
68
+ "@rigour-labs/studio": "6.12.1-rc.1"
69
69
  },
70
70
  "scripts": {
71
71
  "build": "tsc && pnpm bundle-studio",