@rigour-labs/core 6.10.1 → 6.11.0-rc.2
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/deep/pr-review.d.ts +3 -1
- package/dist/deep/pr-review.js +2 -1
- package/dist/gates/deep-analysis.js +2 -1
- package/dist/gates/runner.js +1 -1
- package/dist/index.d.ts +2 -0
- package/dist/index.js +2 -0
- package/dist/outcomes/run.d.ts +6 -1
- package/dist/outcomes/run.js +3 -3
- package/dist/review/check-outcomes.js +8 -0
- package/dist/review/learning-events.js +5 -0
- package/dist/review/quiet.js +1 -1
- package/dist/review/review.d.ts +3 -0
- package/dist/review/review.js +8 -2
- package/dist/review/reviewer/context.d.ts +12 -0
- package/dist/review/reviewer/context.js +7 -3
- package/dist/review/reviewer/settings.d.ts +2 -0
- package/dist/review/reviewer/settings.js +2 -1
- package/dist/review/reviewer/store.d.ts +2 -0
- package/dist/review/reviewer/tiering.d.ts +38 -0
- package/dist/review/reviewer/tiering.js +43 -0
- package/dist/review/reviewer/triage.d.ts +2 -0
- package/dist/review/reviewer/triage.js +4 -0
- package/dist/review/reviewer/usage.js +1 -0
- package/dist/review/reviewer.d.ts +6 -0
- package/dist/review/reviewer.js +20 -4
- package/dist/review/settled-checks.d.ts +13 -2
- package/dist/review/settled-checks.js +11 -3
- package/dist/review-learning/compiled-lessons.d.ts +62 -0
- package/dist/review-learning/compiled-lessons.js +249 -0
- package/dist/review-learning/lessons.d.ts +1 -1
- package/dist/switches.d.ts +21 -0
- package/dist/telemetry/check-ids.d.ts +2 -0
- package/dist/telemetry/check-ids.js +23 -0
- package/dist/telemetry/learning-usage.d.ts +7 -0
- package/dist/telemetry/learning-usage.js +33 -0
- package/dist/telemetry/telemetry.d.ts +8 -0
- package/dist/telemetry/telemetry.js +58 -4
- package/dist/templates/universal-config.js +5 -0
- package/dist/types/index.d.ts +83 -1
- package/dist/types/index.js +10 -0
- package/package.json +6 -6
package/dist/types/index.d.ts
CHANGED
|
@@ -503,6 +503,17 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
503
503
|
allow?: string[] | undefined;
|
|
504
504
|
block?: boolean | undefined;
|
|
505
505
|
}>>>;
|
|
506
|
+
/** Verified lessons a person compiled into checks (review-learning/compiled-lessons.ts): notes unless `block`. */
|
|
507
|
+
compiled_lessons: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
508
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
509
|
+
block: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
510
|
+
}, "strip", z.ZodTypeAny, {
|
|
511
|
+
enabled: boolean;
|
|
512
|
+
block: boolean;
|
|
513
|
+
}, {
|
|
514
|
+
enabled?: boolean | undefined;
|
|
515
|
+
block?: boolean | undefined;
|
|
516
|
+
}>>>;
|
|
506
517
|
migration_order: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
507
518
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
508
519
|
dirs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -897,6 +908,10 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
897
908
|
allow: string[];
|
|
898
909
|
block: boolean;
|
|
899
910
|
};
|
|
911
|
+
compiled_lessons: {
|
|
912
|
+
enabled: boolean;
|
|
913
|
+
block: boolean;
|
|
914
|
+
};
|
|
900
915
|
migration_order: {
|
|
901
916
|
enabled: boolean;
|
|
902
917
|
dirs: string[];
|
|
@@ -1136,6 +1151,10 @@ export declare const GatesSchema: z.ZodObject<{
|
|
|
1136
1151
|
allow?: string[] | undefined;
|
|
1137
1152
|
block?: boolean | undefined;
|
|
1138
1153
|
} | undefined;
|
|
1154
|
+
compiled_lessons?: {
|
|
1155
|
+
enabled?: boolean | undefined;
|
|
1156
|
+
block?: boolean | undefined;
|
|
1157
|
+
} | undefined;
|
|
1139
1158
|
migration_order?: {
|
|
1140
1159
|
enabled?: boolean | undefined;
|
|
1141
1160
|
dirs?: string[] | undefined;
|
|
@@ -1717,6 +1736,17 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
1717
1736
|
allow?: string[] | undefined;
|
|
1718
1737
|
block?: boolean | undefined;
|
|
1719
1738
|
}>>>;
|
|
1739
|
+
/** Verified lessons a person compiled into checks (review-learning/compiled-lessons.ts): notes unless `block`. */
|
|
1740
|
+
compiled_lessons: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
1741
|
+
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1742
|
+
block: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1743
|
+
}, "strip", z.ZodTypeAny, {
|
|
1744
|
+
enabled: boolean;
|
|
1745
|
+
block: boolean;
|
|
1746
|
+
}, {
|
|
1747
|
+
enabled?: boolean | undefined;
|
|
1748
|
+
block?: boolean | undefined;
|
|
1749
|
+
}>>>;
|
|
1720
1750
|
migration_order: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
1721
1751
|
enabled: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
1722
1752
|
dirs: z.ZodDefault<z.ZodOptional<z.ZodArray<z.ZodString, "many">>>;
|
|
@@ -2111,6 +2141,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2111
2141
|
allow: string[];
|
|
2112
2142
|
block: boolean;
|
|
2113
2143
|
};
|
|
2144
|
+
compiled_lessons: {
|
|
2145
|
+
enabled: boolean;
|
|
2146
|
+
block: boolean;
|
|
2147
|
+
};
|
|
2114
2148
|
migration_order: {
|
|
2115
2149
|
enabled: boolean;
|
|
2116
2150
|
dirs: string[];
|
|
@@ -2350,6 +2384,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2350
2384
|
allow?: string[] | undefined;
|
|
2351
2385
|
block?: boolean | undefined;
|
|
2352
2386
|
} | undefined;
|
|
2387
|
+
compiled_lessons?: {
|
|
2388
|
+
enabled?: boolean | undefined;
|
|
2389
|
+
block?: boolean | undefined;
|
|
2390
|
+
} | undefined;
|
|
2353
2391
|
migration_order?: {
|
|
2354
2392
|
enabled?: boolean | undefined;
|
|
2355
2393
|
dirs?: string[] | undefined;
|
|
@@ -2513,6 +2551,17 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2513
2551
|
escalate: z.ZodDefault<z.ZodOptional<z.ZodEnum<["always", "risk"]>>>;
|
|
2514
2552
|
/** A model per reviewer name for cross-examination (a narrow verification task), e.g. { claude: "haiku" }. */
|
|
2515
2553
|
cross_models: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
2554
|
+
/**
|
|
2555
|
+
* Cheap-model-first (reviewer/tiering.ts), off unless set: a cheaper model per reviewer name for a change with no
|
|
2556
|
+
* risk signal. Experimental: not to be recommended until a backtest shows what the cheap model misses.
|
|
2557
|
+
*/
|
|
2558
|
+
tiers: z.ZodDefault<z.ZodOptional<z.ZodObject<{
|
|
2559
|
+
cheap: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>>;
|
|
2560
|
+
}, "strip", z.ZodTypeAny, {
|
|
2561
|
+
cheap: Record<string, string>;
|
|
2562
|
+
}, {
|
|
2563
|
+
cheap?: Record<string, string> | undefined;
|
|
2564
|
+
}>>>;
|
|
2516
2565
|
/** Reasoning effort per reviewer name where the CLI or API takes one (codex, api): low, medium or high. */
|
|
2517
2566
|
reasoning: z.ZodDefault<z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEnum<["low", "medium", "high"]>>>>;
|
|
2518
2567
|
/**
|
|
@@ -2565,6 +2614,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2565
2614
|
judges: 2 | 3;
|
|
2566
2615
|
escalate: "always" | "risk";
|
|
2567
2616
|
cross_models: Record<string, string>;
|
|
2617
|
+
tiers: {
|
|
2618
|
+
cheap: Record<string, string>;
|
|
2619
|
+
};
|
|
2568
2620
|
reasoning: Record<string, "high" | "medium" | "low">;
|
|
2569
2621
|
judge_env: Record<string, {
|
|
2570
2622
|
unset: string[];
|
|
@@ -2597,6 +2649,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2597
2649
|
judges?: 2 | 3 | undefined;
|
|
2598
2650
|
escalate?: "always" | "risk" | undefined;
|
|
2599
2651
|
cross_models?: Record<string, string> | undefined;
|
|
2652
|
+
tiers?: {
|
|
2653
|
+
cheap?: Record<string, string> | undefined;
|
|
2654
|
+
} | undefined;
|
|
2600
2655
|
reasoning?: Record<string, "high" | "medium" | "low"> | undefined;
|
|
2601
2656
|
api?: {
|
|
2602
2657
|
model: string;
|
|
@@ -2628,6 +2683,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2628
2683
|
judges: 2 | 3;
|
|
2629
2684
|
escalate: "always" | "risk";
|
|
2630
2685
|
cross_models: Record<string, string>;
|
|
2686
|
+
tiers: {
|
|
2687
|
+
cheap: Record<string, string>;
|
|
2688
|
+
};
|
|
2631
2689
|
reasoning: Record<string, "high" | "medium" | "low">;
|
|
2632
2690
|
judge_env: Record<string, {
|
|
2633
2691
|
unset: string[];
|
|
@@ -2667,6 +2725,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2667
2725
|
judges?: 2 | 3 | undefined;
|
|
2668
2726
|
escalate?: "always" | "risk" | undefined;
|
|
2669
2727
|
cross_models?: Record<string, string> | undefined;
|
|
2728
|
+
tiers?: {
|
|
2729
|
+
cheap?: Record<string, string> | undefined;
|
|
2730
|
+
} | undefined;
|
|
2670
2731
|
reasoning?: Record<string, "high" | "medium" | "low"> | undefined;
|
|
2671
2732
|
api?: {
|
|
2672
2733
|
model: string;
|
|
@@ -2895,6 +2956,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2895
2956
|
allow: string[];
|
|
2896
2957
|
block: boolean;
|
|
2897
2958
|
};
|
|
2959
|
+
compiled_lessons: {
|
|
2960
|
+
enabled: boolean;
|
|
2961
|
+
block: boolean;
|
|
2962
|
+
};
|
|
2898
2963
|
migration_order: {
|
|
2899
2964
|
enabled: boolean;
|
|
2900
2965
|
dirs: string[];
|
|
@@ -2965,6 +3030,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
2965
3030
|
judges: 2 | 3;
|
|
2966
3031
|
escalate: "always" | "risk";
|
|
2967
3032
|
cross_models: Record<string, string>;
|
|
3033
|
+
tiers: {
|
|
3034
|
+
cheap: Record<string, string>;
|
|
3035
|
+
};
|
|
2968
3036
|
reasoning: Record<string, "high" | "medium" | "low">;
|
|
2969
3037
|
judge_env: Record<string, {
|
|
2970
3038
|
unset: string[];
|
|
@@ -3200,6 +3268,10 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
3200
3268
|
allow?: string[] | undefined;
|
|
3201
3269
|
block?: boolean | undefined;
|
|
3202
3270
|
} | undefined;
|
|
3271
|
+
compiled_lessons?: {
|
|
3272
|
+
enabled?: boolean | undefined;
|
|
3273
|
+
block?: boolean | undefined;
|
|
3274
|
+
} | undefined;
|
|
3203
3275
|
migration_order?: {
|
|
3204
3276
|
enabled?: boolean | undefined;
|
|
3205
3277
|
dirs?: string[] | undefined;
|
|
@@ -3274,6 +3346,9 @@ export declare const ConfigSchema: z.ZodObject<{
|
|
|
3274
3346
|
judges?: 2 | 3 | undefined;
|
|
3275
3347
|
escalate?: "always" | "risk" | undefined;
|
|
3276
3348
|
cross_models?: Record<string, string> | undefined;
|
|
3349
|
+
tiers?: {
|
|
3350
|
+
cheap?: Record<string, string> | undefined;
|
|
3351
|
+
} | undefined;
|
|
3277
3352
|
reasoning?: Record<string, "high" | "medium" | "low"> | undefined;
|
|
3278
3353
|
api?: {
|
|
3279
3354
|
model: string;
|
|
@@ -3784,10 +3859,17 @@ export interface DeepOptions {
|
|
|
3784
3859
|
independent?: boolean;
|
|
3785
3860
|
/** The change's unified diff (from reviewChange): a cloud agentic review reads the PR as a whole. */
|
|
3786
3861
|
diff?: string;
|
|
3787
|
-
/** What Rigour's checks already found on the change's lines (the runner
|
|
3862
|
+
/** What Rigour's checks already found on the change's lines (the review and the runner fill it): settled, never reported again. */
|
|
3788
3863
|
settled?: Array<{
|
|
3789
3864
|
file: string;
|
|
3790
3865
|
line?: number;
|
|
3791
3866
|
title: string;
|
|
3867
|
+
kind?: string;
|
|
3868
|
+
}>;
|
|
3869
|
+
/** The lessons the team's compiled checks covered on this change: the deep review is told so instead of the lesson. */
|
|
3870
|
+
covered?: Array<{
|
|
3871
|
+
checkId: string;
|
|
3872
|
+
lessonId: string;
|
|
3873
|
+
message: string;
|
|
3792
3874
|
}>;
|
|
3793
3875
|
}
|
package/dist/types/index.js
CHANGED
|
@@ -282,6 +282,11 @@ export const GatesSchema = z.object({
|
|
|
282
282
|
// Block on them. Off by default, like unused_exports.block: a team whose reviewers block on dead files turns it on.
|
|
283
283
|
block: z.boolean().optional().default(false),
|
|
284
284
|
}).optional().default({}),
|
|
285
|
+
/** Verified lessons a person compiled into checks (review-learning/compiled-lessons.ts): notes unless `block`. */
|
|
286
|
+
compiled_lessons: z.object({
|
|
287
|
+
enabled: z.boolean().optional().default(true),
|
|
288
|
+
block: z.boolean().optional().default(false),
|
|
289
|
+
}).optional().default({}),
|
|
285
290
|
migration_order: z.object({
|
|
286
291
|
enabled: z.boolean().optional().default(false),
|
|
287
292
|
dirs: z.array(z.string()).optional().default(['**/supabase/migrations']),
|
|
@@ -453,6 +458,11 @@ export const ConfigSchema = z.object({
|
|
|
453
458
|
escalate: z.enum(['always', 'risk']).optional().default('always'),
|
|
454
459
|
/** A model per reviewer name for cross-examination (a narrow verification task), e.g. { claude: "haiku" }. */
|
|
455
460
|
cross_models: z.record(ModelName).optional().default({}),
|
|
461
|
+
/**
|
|
462
|
+
* Cheap-model-first (reviewer/tiering.ts), off unless set: a cheaper model per reviewer name for a change with no
|
|
463
|
+
* risk signal. Experimental: not to be recommended until a backtest shows what the cheap model misses.
|
|
464
|
+
*/
|
|
465
|
+
tiers: z.object({ cheap: z.record(ModelName).optional().default({}) }).optional().default({}),
|
|
456
466
|
/** Reasoning effort per reviewer name where the CLI or API takes one (codex, api): low, medium or high. */
|
|
457
467
|
reasoning: z.record(z.enum(['low', 'medium', 'high'])).optional().default({}),
|
|
458
468
|
/**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigour-labs/core",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.11.0-rc.2",
|
|
4
4
|
"description": "Rigour's review engine: deterministic gates on changed lines, rules and lessons learned from your team's fixes, and per-check precision from what you fix versus dismiss, across TypeScript, JavaScript, Python, Go, Ruby and C#.",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=22.13"
|
|
@@ -75,11 +75,11 @@
|
|
|
75
75
|
"@anthropic-ai/sdk": "^0.132.1",
|
|
76
76
|
"pg": "^8.16.3",
|
|
77
77
|
"openai": "^5.23.2",
|
|
78
|
-
"@rigour-labs/brain-darwin-arm64": "6.
|
|
79
|
-
"@rigour-labs/brain-linux-
|
|
80
|
-
"@rigour-labs/brain-
|
|
81
|
-
"@rigour-labs/brain-
|
|
82
|
-
"@rigour-labs/brain-
|
|
78
|
+
"@rigour-labs/brain-darwin-arm64": "6.11.0-rc.2",
|
|
79
|
+
"@rigour-labs/brain-linux-x64": "6.11.0-rc.2",
|
|
80
|
+
"@rigour-labs/brain-linux-arm64": "6.11.0-rc.2",
|
|
81
|
+
"@rigour-labs/brain-win-x64": "6.11.0-rc.2",
|
|
82
|
+
"@rigour-labs/brain-darwin-x64": "6.11.0-rc.2"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@types/fs-extra": "^11.0.4",
|