@rigour-labs/cli 4.0.1 β 4.0.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/README.md +7 -0
- package/dist/commands/check.js +12 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -18,6 +18,13 @@ npx rigour check # Verify code quality
|
|
|
18
18
|
npx rigour run -- claude "Build feature X" # Agent loop
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
+
## πΊ Homebrew
|
|
22
|
+
|
|
23
|
+
```bash
|
|
24
|
+
brew tap rigour-labs/tap
|
|
25
|
+
brew install rigour
|
|
26
|
+
```
|
|
27
|
+
|
|
21
28
|
## π The Problem
|
|
22
29
|
|
|
23
30
|
AI agents often fall into **"Vibe Coding"**βclaiming success based on narrative, not execution:
|
package/dist/commands/check.js
CHANGED
|
@@ -63,6 +63,7 @@ export async function checkCommand(cwd, files = [], options = {}) {
|
|
|
63
63
|
// Build deep options if enabled
|
|
64
64
|
// Merges CLI flags with ~/.rigour/settings.json (CLI flags win)
|
|
65
65
|
let deepOpts;
|
|
66
|
+
let resolvedDeepMode;
|
|
66
67
|
if (isDeep) {
|
|
67
68
|
const resolved = resolveDeepOptions({
|
|
68
69
|
apiKey: options.apiKey,
|
|
@@ -86,6 +87,10 @@ export async function checkCommand(cwd, files = [], options = {}) {
|
|
|
86
87
|
process.stderr.write(msg + '\n');
|
|
87
88
|
},
|
|
88
89
|
};
|
|
90
|
+
resolvedDeepMode = {
|
|
91
|
+
isLocal: !hasApiKey || deepOpts.provider === 'local',
|
|
92
|
+
provider: deepOpts.provider || 'cloud',
|
|
93
|
+
};
|
|
89
94
|
}
|
|
90
95
|
const report = await runner.run(cwd, files.length > 0 ? files : undefined, deepOpts);
|
|
91
96
|
// Write machine report
|
|
@@ -101,7 +106,7 @@ export async function checkCommand(cwd, files = [], options = {}) {
|
|
|
101
106
|
if (db) {
|
|
102
107
|
const repoName = path.basename(cwd);
|
|
103
108
|
const scanId = insertScan(db, repoName, report, {
|
|
104
|
-
deepTier: options.pro ? 'pro' : (
|
|
109
|
+
deepTier: report.stats.deep?.tier || (options.pro ? 'pro' : (resolvedDeepMode?.isLocal ? 'deep' : 'cloud')),
|
|
105
110
|
deepModel: report.stats.deep?.model,
|
|
106
111
|
});
|
|
107
112
|
insertFindings(db, scanId, report.failures);
|
|
@@ -162,7 +167,7 @@ export async function checkCommand(cwd, files = [], options = {}) {
|
|
|
162
167
|
// βββ HUMAN-READABLE OUTPUT (with deep analysis dopamine engineering) βββ
|
|
163
168
|
if (isDeep) {
|
|
164
169
|
// Deep analysis output format (from product bible)
|
|
165
|
-
renderDeepOutput(report, config, options);
|
|
170
|
+
renderDeepOutput(report, config, options, resolvedDeepMode);
|
|
166
171
|
}
|
|
167
172
|
else {
|
|
168
173
|
// Standard AST-only output
|
|
@@ -221,9 +226,10 @@ export async function checkCommand(cwd, files = [], options = {}) {
|
|
|
221
226
|
* - Privacy badge and model info
|
|
222
227
|
* - Summary count at end
|
|
223
228
|
*/
|
|
224
|
-
function renderDeepOutput(report, config, options) {
|
|
229
|
+
function renderDeepOutput(report, config, options, resolvedDeepMode) {
|
|
225
230
|
const stats = report.stats;
|
|
226
|
-
const isLocal = !options.apiKey;
|
|
231
|
+
const isLocal = stats.deep?.tier ? stats.deep.tier !== 'cloud' : (resolvedDeepMode?.isLocal ?? !options.apiKey);
|
|
232
|
+
const provider = resolvedDeepMode?.provider || options.provider || 'cloud';
|
|
227
233
|
console.log('');
|
|
228
234
|
if (report.status === 'PASS') {
|
|
229
235
|
console.log(chalk.green.bold(' β¨ All quality gates passed.\n'));
|
|
@@ -242,11 +248,11 @@ function renderDeepOutput(report, config, options) {
|
|
|
242
248
|
console.log(chalk.green(' π 100% local. Your code never left this machine.'));
|
|
243
249
|
}
|
|
244
250
|
else {
|
|
245
|
-
console.log(chalk.yellow(` βοΈ Code was sent to ${
|
|
251
|
+
console.log(chalk.yellow(` βοΈ Code was sent to ${provider} API.`));
|
|
246
252
|
}
|
|
247
253
|
// Deep stats
|
|
248
254
|
if (stats.deep) {
|
|
249
|
-
const tier = stats.deep.tier === 'cloud' ?
|
|
255
|
+
const tier = stats.deep.tier === 'cloud' ? provider : stats.deep.tier;
|
|
250
256
|
const model = stats.deep.model || 'unknown';
|
|
251
257
|
const inferenceSec = stats.deep.total_ms ? (stats.deep.total_ms / 1000).toFixed(1) + 's' : '';
|
|
252
258
|
console.log(chalk.dim(` Model: ${model} (${tier}) ${inferenceSec}`));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rigour-labs/cli",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.2",
|
|
4
4
|
"description": "CLI quality gates for AI-generated code. Forces AI agents (Claude, Cursor, Copilot) to meet strict engineering standards with PASS/FAIL enforcement.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://rigour.run",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"inquirer": "9.2.16",
|
|
45
45
|
"ora": "^8.0.1",
|
|
46
46
|
"yaml": "^2.8.2",
|
|
47
|
-
"@rigour-labs/core": "4.0.
|
|
47
|
+
"@rigour-labs/core": "4.0.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@types/fs-extra": "^11.0.4",
|