@nerviq/cli 1.15.0 → 1.16.0
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 +1 -1
- package/bin/cli.js +36 -2
- package/package.json +1 -1
package/README.md
CHANGED
package/bin/cli.js
CHANGED
|
@@ -568,7 +568,8 @@ const HELP = `
|
|
|
568
568
|
New here? Run: nerviq --beginner
|
|
569
569
|
|
|
570
570
|
DISCOVER
|
|
571
|
-
nerviq audit Quick scan: score + top 3 gaps (
|
|
571
|
+
nerviq audit Quick scan: score + top 3 gaps (Harmony-first when 2+ platforms detected)
|
|
572
|
+
nerviq audit --no-harmony-first Skip the cross-platform Harmony header
|
|
572
573
|
nerviq audit --full Full audit with all checks, weakest areas, badge
|
|
573
574
|
nerviq audit --platform X Audit specific platform (claude|codex|cursor|copilot|gemini|windsurf|aider|opencode)
|
|
574
575
|
nerviq audit --json Machine-readable JSON output (for CI)
|
|
@@ -846,6 +847,7 @@ async function main() {
|
|
|
846
847
|
historyView: flags.includes('--history'),
|
|
847
848
|
compareView: flags.includes('--compare'),
|
|
848
849
|
diffOnly: flags.includes('--diff-only'),
|
|
850
|
+
noHarmonyFirst: flags.includes('--no-harmony-first'),
|
|
849
851
|
diffBase: parsed.diffBase || null,
|
|
850
852
|
diffHead: parsed.diffHead || null,
|
|
851
853
|
driftMode: parsed.driftMode || null,
|
|
@@ -2504,8 +2506,32 @@ async function main() {
|
|
|
2504
2506
|
}
|
|
2505
2507
|
process.exit(0);
|
|
2506
2508
|
}
|
|
2509
|
+
// MOAT-01: Harmony-first default — when 2+ platforms and platform not explicit
|
|
2510
|
+
let harmonyFirstResult = null;
|
|
2511
|
+
if (!options.platformExplicit && !options.noHarmonyFirst && !options.diffOnly && !options.driftMode && !options.workspace) {
|
|
2512
|
+
const detected = detectPlatforms(options.dir) || [];
|
|
2513
|
+
if (detected.length >= 2) {
|
|
2514
|
+
try {
|
|
2515
|
+
const { harmonyAudit } = require('../src/harmony/audit');
|
|
2516
|
+
harmonyFirstResult = await harmonyAudit({ dir: options.dir, silent: true });
|
|
2517
|
+
if (!options.json && harmonyFirstResult) {
|
|
2518
|
+
const hs = harmonyFirstResult.harmonyScore;
|
|
2519
|
+
const driftCount = (harmonyFirstResult.drift && harmonyFirstResult.drift.drifts) ? harmonyFirstResult.drift.drifts.length : 0;
|
|
2520
|
+
const platformLabels = (harmonyFirstResult.activePlatforms || []).map(p => p.label || p.platform).join(' + ');
|
|
2521
|
+
const color = hs >= 70 ? '\x1b[32m' : hs >= 40 ? '\x1b[33m' : '\x1b[31m';
|
|
2522
|
+
const issueWord = driftCount === 1 ? 'issue' : 'issues';
|
|
2523
|
+
console.log('');
|
|
2524
|
+
console.log(`\x1b[1m Harmony Score: ${color}${hs}/100\x1b[0m — ${driftCount} drift ${issueWord} across ${detected.length} platforms (${platformLabels})`);
|
|
2525
|
+
console.log('\x1b[2m Run `nerviq harmony-audit` for the full cross-platform report. Use --no-harmony-first to hide.\x1b[0m');
|
|
2526
|
+
}
|
|
2527
|
+
} catch {
|
|
2528
|
+
harmonyFirstResult = null;
|
|
2529
|
+
}
|
|
2530
|
+
}
|
|
2531
|
+
}
|
|
2532
|
+
|
|
2507
2533
|
let result;
|
|
2508
|
-
const renderAuditJsonLocally = options.json && Boolean(options.driftMode);
|
|
2534
|
+
const renderAuditJsonLocally = options.json && (Boolean(options.driftMode) || Boolean(harmonyFirstResult));
|
|
2509
2535
|
if (options.diffOnly) {
|
|
2510
2536
|
const { getChangedFiles, buildDiffOnlyAuditView, printDiffOnlyAudit } = require('../src/diff-only');
|
|
2511
2537
|
const fullResult = await audit({ ...options, silent: true });
|
|
@@ -2580,9 +2606,17 @@ async function main() {
|
|
|
2580
2606
|
}
|
|
2581
2607
|
}
|
|
2582
2608
|
} else if (renderAuditJsonLocally) {
|
|
2609
|
+
const harmonyEnvelope = harmonyFirstResult ? {
|
|
2610
|
+
harmony: {
|
|
2611
|
+
score: harmonyFirstResult.harmonyScore,
|
|
2612
|
+
driftCount: (harmonyFirstResult.drift && harmonyFirstResult.drift.drifts) ? harmonyFirstResult.drift.drifts.length : 0,
|
|
2613
|
+
platforms: (harmonyFirstResult.activePlatforms || []).map(p => p.platform),
|
|
2614
|
+
},
|
|
2615
|
+
} : {};
|
|
2583
2616
|
console.log(JSON.stringify({
|
|
2584
2617
|
version,
|
|
2585
2618
|
timestamp: new Date().toISOString(),
|
|
2619
|
+
...harmonyEnvelope,
|
|
2586
2620
|
...result,
|
|
2587
2621
|
}, null, 2));
|
|
2588
2622
|
} else {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nerviq/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "The intelligent nervous system for AI coding agents — 2,441 checks (8 platforms × ~300 governance rules), 10 languages, 62 domain packs. Audit, align, and amplify.",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|