@nerviq/cli 1.18.0 → 1.20.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.
Files changed (187) hide show
  1. package/LICENSE +23 -23
  2. package/README.md +2 -2
  3. package/bin/cli.js +131 -130
  4. package/package.json +2 -1
  5. package/src/activity.js +1039 -1039
  6. package/src/adoption-advisor.js +299 -299
  7. package/src/aider/config-parser.js +166 -166
  8. package/src/aider/context.js +158 -158
  9. package/src/aider/deep-review.js +316 -316
  10. package/src/aider/domain-packs.js +303 -303
  11. package/src/aider/freshness.js +93 -93
  12. package/src/aider/governance.js +253 -253
  13. package/src/aider/interactive.js +334 -334
  14. package/src/aider/mcp-packs.js +329 -329
  15. package/src/aider/patch.js +214 -214
  16. package/src/aider/plans.js +186 -186
  17. package/src/aider/premium.js +360 -360
  18. package/src/aider/setup.js +404 -404
  19. package/src/aider/techniques.js +16 -16
  20. package/src/analyze.js +951 -951
  21. package/src/anti-patterns.js +485 -485
  22. package/src/audit/instruction-files.js +180 -180
  23. package/src/audit/recommendations.js +577 -577
  24. package/src/auto-suggest.js +154 -154
  25. package/src/badge.js +13 -13
  26. package/src/behavioral-drift.js +801 -801
  27. package/src/benchmark.js +67 -67
  28. package/src/catalog.js +103 -103
  29. package/src/certification.js +128 -128
  30. package/src/codex/config-parser.js +183 -183
  31. package/src/codex/context.js +223 -223
  32. package/src/codex/deep-review.js +493 -493
  33. package/src/codex/domain-packs.js +394 -394
  34. package/src/codex/freshness.js +84 -84
  35. package/src/codex/governance.js +192 -192
  36. package/src/codex/interactive.js +618 -618
  37. package/src/codex/mcp-packs.js +914 -914
  38. package/src/codex/patch.js +209 -209
  39. package/src/codex/plans.js +251 -251
  40. package/src/codex/premium.js +614 -614
  41. package/src/codex/setup.js +591 -591
  42. package/src/context.js +320 -320
  43. package/src/continuous-ops.js +681 -681
  44. package/src/copilot/activity.js +309 -309
  45. package/src/copilot/deep-review.js +346 -346
  46. package/src/copilot/domain-packs.js +372 -372
  47. package/src/copilot/freshness.js +57 -57
  48. package/src/copilot/governance.js +222 -222
  49. package/src/copilot/interactive.js +406 -406
  50. package/src/copilot/mcp-packs.js +826 -826
  51. package/src/copilot/plans.js +253 -253
  52. package/src/copilot/premium.js +451 -451
  53. package/src/copilot/setup.js +488 -488
  54. package/src/cost-tracking.js +61 -61
  55. package/src/cursor/activity.js +301 -301
  56. package/src/cursor/config-parser.js +265 -265
  57. package/src/cursor/context.js +256 -256
  58. package/src/cursor/deep-review.js +334 -334
  59. package/src/cursor/domain-packs.js +368 -368
  60. package/src/cursor/freshness.js +65 -65
  61. package/src/cursor/governance.js +229 -229
  62. package/src/cursor/interactive.js +391 -391
  63. package/src/cursor/mcp-packs.js +828 -828
  64. package/src/cursor/plans.js +254 -254
  65. package/src/cursor/premium.js +469 -469
  66. package/src/cursor/setup.js +488 -488
  67. package/src/dashboard.js +493 -493
  68. package/src/deep-review.js +428 -428
  69. package/src/deprecation.js +98 -98
  70. package/src/diff-only.js +280 -280
  71. package/src/doctor.js +119 -119
  72. package/src/domain-pack-expansion.js +1033 -1033
  73. package/src/domain-packs.js +387 -387
  74. package/src/feedback.js +178 -178
  75. package/src/fix-engine.js +783 -783
  76. package/src/fix-prompts.js +122 -122
  77. package/src/formatters/sarif.js +115 -115
  78. package/src/freshness.js +74 -74
  79. package/src/gemini/config-parser.js +275 -275
  80. package/src/gemini/context.js +290 -221
  81. package/src/gemini/deep-review.js +559 -559
  82. package/src/gemini/domain-packs.js +393 -393
  83. package/src/gemini/freshness.js +66 -66
  84. package/src/gemini/governance.js +201 -201
  85. package/src/gemini/interactive.js +860 -860
  86. package/src/gemini/mcp-packs.js +915 -915
  87. package/src/gemini/plans.js +269 -269
  88. package/src/gemini/premium.js +760 -760
  89. package/src/gemini/setup.js +692 -692
  90. package/src/gemini/techniques.js +105 -33
  91. package/src/governance.js +72 -72
  92. package/src/harmony/add.js +68 -68
  93. package/src/harmony/advisor.js +333 -333
  94. package/src/harmony/canon.js +565 -565
  95. package/src/harmony/cli.js +591 -591
  96. package/src/harmony/drift.js +401 -401
  97. package/src/harmony/governance.js +313 -313
  98. package/src/harmony/memory.js +239 -239
  99. package/src/harmony/sync.js +475 -475
  100. package/src/harmony/watch.js +370 -370
  101. package/src/hook-validation.js +342 -342
  102. package/src/index.js +271 -271
  103. package/src/init.js +184 -184
  104. package/src/instruction-surfaces.js +185 -185
  105. package/src/integrations.js +144 -144
  106. package/src/interactive.js +118 -118
  107. package/src/locales/en.json +1 -1
  108. package/src/locales/es.json +1 -1
  109. package/src/mcp-packs.js +830 -830
  110. package/src/mcp-server.js +726 -726
  111. package/src/mcp-validation.js +337 -337
  112. package/src/nerviq-sync.json +7 -7
  113. package/src/opencode/config-parser.js +109 -109
  114. package/src/opencode/context.js +247 -247
  115. package/src/opencode/deep-review.js +313 -313
  116. package/src/opencode/domain-packs.js +262 -262
  117. package/src/opencode/freshness.js +66 -66
  118. package/src/opencode/governance.js +159 -159
  119. package/src/opencode/interactive.js +392 -392
  120. package/src/opencode/mcp-packs.js +705 -705
  121. package/src/opencode/patch.js +184 -184
  122. package/src/opencode/plans.js +231 -231
  123. package/src/opencode/premium.js +413 -413
  124. package/src/opencode/setup.js +449 -449
  125. package/src/opencode/techniques.js +27 -27
  126. package/src/operating-profile.js +574 -574
  127. package/src/org.js +152 -152
  128. package/src/permission-rules.js +218 -218
  129. package/src/plans.js +839 -839
  130. package/src/platform-change-manifest.js +86 -86
  131. package/src/plugins.js +110 -110
  132. package/src/policy-layers.js +210 -210
  133. package/src/profiles.js +124 -124
  134. package/src/prompt-injection.js +74 -74
  135. package/src/public-api.js +173 -173
  136. package/src/recommendation-rules.js +84 -84
  137. package/src/repo-archetype.js +386 -386
  138. package/src/secret-patterns.js +39 -39
  139. package/src/server.js +527 -527
  140. package/src/setup/analysis.js +607 -607
  141. package/src/setup/runtime.js +172 -172
  142. package/src/setup.js +677 -677
  143. package/src/shared/capabilities.js +194 -194
  144. package/src/source-urls.js +132 -132
  145. package/src/stack-checks.js +565 -565
  146. package/src/supplemental-checks.js +13 -13
  147. package/src/synergy/adaptive.js +261 -261
  148. package/src/synergy/compensation.js +137 -137
  149. package/src/synergy/evidence.js +193 -193
  150. package/src/synergy/learning.js +199 -199
  151. package/src/synergy/patterns.js +227 -227
  152. package/src/synergy/ranking.js +83 -83
  153. package/src/synergy/report.js +165 -165
  154. package/src/synergy/routing.js +146 -146
  155. package/src/techniques/api.js +407 -407
  156. package/src/techniques/automation.js +316 -316
  157. package/src/techniques/compliance.js +257 -257
  158. package/src/techniques/hygiene.js +294 -294
  159. package/src/techniques/instructions.js +243 -243
  160. package/src/techniques/observability.js +226 -226
  161. package/src/techniques/optimization.js +142 -142
  162. package/src/techniques/quality.js +318 -318
  163. package/src/techniques/security.js +237 -237
  164. package/src/techniques/shared.js +443 -443
  165. package/src/techniques/stacks.js +2294 -2294
  166. package/src/techniques/tools.js +106 -106
  167. package/src/techniques/workflow.js +413 -413
  168. package/src/techniques.js +81 -81
  169. package/src/terminology.js +73 -73
  170. package/src/token-estimate.js +35 -35
  171. package/src/usage-patterns.js +99 -99
  172. package/src/verification-metadata.js +145 -145
  173. package/src/watch.js +247 -247
  174. package/src/windsurf/activity.js +302 -302
  175. package/src/windsurf/config-parser.js +267 -267
  176. package/src/windsurf/context.js +249 -249
  177. package/src/windsurf/deep-review.js +337 -337
  178. package/src/windsurf/domain-packs.js +370 -370
  179. package/src/windsurf/freshness.js +36 -36
  180. package/src/windsurf/governance.js +231 -231
  181. package/src/windsurf/interactive.js +388 -388
  182. package/src/windsurf/mcp-packs.js +792 -792
  183. package/src/windsurf/plans.js +247 -247
  184. package/src/windsurf/premium.js +468 -468
  185. package/src/windsurf/setup.js +471 -471
  186. package/src/windsurf/techniques.js +17 -17
  187. package/src/workspace.js +375 -375
package/LICENSE CHANGED
@@ -1,23 +1,23 @@
1
- GNU AFFERO GENERAL PUBLIC LICENSE
2
- Version 3, 19 November 2007
3
-
4
- Copyright (c) 2026 Nerviq (nerviq.net)
5
-
6
- Everyone is permitted to copy and distribute verbatim copies of this
7
- license document, but changing it is not allowed.
8
-
9
- This program is free software: you can redistribute it and/or modify
10
- it under the terms of the GNU Affero General Public License as
11
- published by the Free Software Foundation, either version 3 of the
12
- License, or (at your option) any later version.
13
-
14
- This program is distributed in the hope that it will be useful,
15
- but WITHOUT ANY WARRANTY; without even the implied warranty of
16
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
- GNU Affero General Public License for more details.
18
-
19
- You should have received a copy of the GNU Affero General Public License
20
- along with this program. If not, see <https://www.gnu.org/licenses/agpl-3.0.html>.
21
-
22
- For the full AGPL-3.0 license text, see:
23
- https://www.gnu.org/licenses/agpl-3.0.html
1
+ GNU AFFERO GENERAL PUBLIC LICENSE
2
+ Version 3, 19 November 2007
3
+
4
+ Copyright (c) 2026 Nerviq (nerviq.net)
5
+
6
+ Everyone is permitted to copy and distribute verbatim copies of this
7
+ license document, but changing it is not allowed.
8
+
9
+ This program is free software: you can redistribute it and/or modify
10
+ it under the terms of the GNU Affero General Public License as
11
+ published by the Free Software Foundation, either version 3 of the
12
+ License, or (at your option) any later version.
13
+
14
+ This program is distributed in the hope that it will be useful,
15
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17
+ GNU Affero General Public License for more details.
18
+
19
+ You should have received a copy of the GNU Affero General Public License
20
+ along with this program. If not, see <https://www.gnu.org/licenses/agpl-3.0.html>.
21
+
22
+ For the full AGPL-3.0 license text, see:
23
+ https://www.gnu.org/licenses/agpl-3.0.html
package/README.md CHANGED
@@ -223,8 +223,8 @@ All successful operational responses are wrapped in a JSON envelope:
223
223
  {
224
224
  "data": {},
225
225
  "meta": {
226
- "version": "1.18.0",
227
- "timestamp": "2026-04-12T12:00:00.000Z"
226
+ "version": "1.20.0",
227
+ "timestamp": "2026-04-13T12:00:00.000Z"
228
228
  }
229
229
  }
230
230
  ```
package/bin/cli.js CHANGED
@@ -576,12 +576,12 @@ const HELP = `
576
576
  Audit, align, and amplify every platform on every project.
577
577
  New here? Run: nerviq --beginner
578
578
 
579
- DISCOVER
580
- nerviq audit Quick scan: score + top 3 gaps (Harmony-first when 2+ platforms detected)
581
- nerviq audit --fix Audit, apply fixable critical fixes, then re-audit
582
- nerviq audit --fix --dry-run Show proposed autofix diff without writing
583
- nerviq audit --no-harmony-first Skip the cross-platform Harmony header
584
- nerviq audit --full Full audit with all checks, weakest areas, badge
579
+ DISCOVER
580
+ nerviq audit Quick scan: score + top 3 gaps (Harmony-first when 2+ platforms detected)
581
+ nerviq audit --fix Audit, apply fixable critical fixes, then re-audit
582
+ nerviq audit --fix --dry-run Show proposed autofix diff without writing
583
+ nerviq audit --no-harmony-first Skip the cross-platform Harmony header
584
+ nerviq audit --full Full audit with all checks, weakest areas, badge
585
585
  nerviq audit --platform X Audit specific platform (claude|codex|cursor|copilot|gemini|windsurf|aider|opencode)
586
586
  nerviq audit --json Machine-readable JSON output (for CI)
587
587
  nerviq audit --workspace packages/* Audit monorepo workspaces with stack-specific package profiles
@@ -602,9 +602,9 @@ const HELP = `
602
602
  nerviq check-health Detect regressions + platform format changes between snapshots
603
603
  nerviq doctor Self-diagnostics: Node, deps, freshness, MCP, hook runtime
604
604
 
605
- FIX
606
- nerviq fix Show fixable checks and manual-fix guidance
607
- nerviq fix <key> Auto-fix a specific check (with score impact)
605
+ FIX
606
+ nerviq fix Show fixable checks and manual-fix guidance
607
+ nerviq fix <key> Auto-fix a specific check (with score impact)
608
608
  nerviq fix <key> --prompt Show AI agent prompt for a check (no auto-fix)
609
609
  nerviq fix --all-critical Fix all critical issues at once
610
610
  nerviq fix --dry-run Preview fixes without writing
@@ -775,12 +775,12 @@ const BEGINNER_HELP = `
775
775
  nerviq augment Show an improvement plan without writing
776
776
  nerviq doctor Check install health, freshness, platform detection, MCP, and hook runtime
777
777
 
778
- SIMPLE PATH
779
- 1. nerviq audit
780
- 2. nerviq setup --auto
781
- 3. nerviq audit --fix --auto
782
- 4. nerviq augment
783
- 5. nerviq doctor
778
+ SIMPLE PATH
779
+ 1. nerviq audit
780
+ 2. nerviq setup --auto
781
+ 3. nerviq audit --fix --auto
782
+ 4. nerviq augment
783
+ 5. nerviq doctor
784
784
 
785
785
  WHEN YOU ARE READY
786
786
  nerviq --help Show the full command set
@@ -2095,34 +2095,34 @@ async function main() {
2095
2095
  });
2096
2096
  console.log(output);
2097
2097
  process.exit(0);
2098
- } else if (normalizedCommand === 'fix') {
2099
- // nerviq fix [key] [--all-critical] [--dry-run] [--auto] [--prompt]
2100
- const fixKey = parsed.extraArgs[0] || null;
2101
- const allCritical = flags.includes('--all-critical');
2102
- const promptOnly = flags.includes('--prompt');
2103
- const autoApply = options.auto;
2104
- const isDryRun = options.dryRun;
2105
- const { getFixableFailedResults, isFixableKey, applyFixes } = require('../src/fix-engine');
2106
-
2107
- // Step 1: Run silent audit to find failed checks (only actual failures, not skipped/null)
2108
- const auditResult = await audit({ dir: options.dir, silent: true, platform: options.platform });
2109
- const failedResults = (auditResult.results || []).filter(r => r.passed === false);
2098
+ } else if (normalizedCommand === 'fix') {
2099
+ // nerviq fix [key] [--all-critical] [--dry-run] [--auto] [--prompt]
2100
+ const fixKey = parsed.extraArgs[0] || null;
2101
+ const allCritical = flags.includes('--all-critical');
2102
+ const promptOnly = flags.includes('--prompt');
2103
+ const autoApply = options.auto;
2104
+ const isDryRun = options.dryRun;
2105
+ const { getFixableFailedResults, isFixableKey, applyFixes } = require('../src/fix-engine');
2106
+
2107
+ // Step 1: Run silent audit to find failed checks (only actual failures, not skipped/null)
2108
+ const auditResult = await audit({ dir: options.dir, silent: true, platform: options.platform });
2109
+ const failedResults = (auditResult.results || []).filter(r => r.passed === false);
2110
2110
 
2111
2111
  if (failedResults.length === 0) {
2112
2112
  console.log('\n ✅ All checks passing — nothing to fix.\n');
2113
2113
  process.exit(0);
2114
2114
  }
2115
2115
 
2116
- // Step 2: Determine which checks to fix
2117
- const { FIX_PROMPTS, formatFixPrompt } = require('../src/fix-prompts');
2118
-
2119
- let targetKeys = [];
2120
- const fixableFailedResults = getFixableFailedResults(failedResults, { mode: 'fix' });
2121
-
2122
- if (fixKey) {
2123
- // Fix a specific check
2124
- if (!failedResults.find(r => r.key === fixKey)) {
2125
- const passed = (auditResult.results || []).find(r => r.key === fixKey && r.passed);
2116
+ // Step 2: Determine which checks to fix
2117
+ const { FIX_PROMPTS, formatFixPrompt } = require('../src/fix-prompts');
2118
+
2119
+ let targetKeys = [];
2120
+ const fixableFailedResults = getFixableFailedResults(failedResults, { mode: 'fix' });
2121
+
2122
+ if (fixKey) {
2123
+ // Fix a specific check
2124
+ if (!failedResults.find(r => r.key === fixKey)) {
2125
+ const passed = (auditResult.results || []).find(r => r.key === fixKey && r.passed);
2126
2126
  if (passed) {
2127
2127
  console.log(`\n ✅ '${fixKey}' is already passing.\n`);
2128
2128
  } else {
@@ -2140,37 +2140,37 @@ async function main() {
2140
2140
  const failedCheck = failedResults.find(r => r.key === fixKey);
2141
2141
  console.log(`\n No AI prompt available for '${fixKey}'.`);
2142
2142
  console.log(` Manual fix: ${failedCheck ? failedCheck.fix : 'See nerviq audit --full.'}\n`);
2143
- }
2144
- process.exit(0);
2145
- }
2146
- if (!isFixableKey(fixKey, { mode: 'fix' })) {
2147
- const aiPrompt = FIX_PROMPTS[fixKey];
2148
- const failedCheck = failedResults.find(r => r.key === fixKey);
2149
- if (aiPrompt) {
2150
- console.log(formatFixPrompt(fixKey, aiPrompt));
2151
- } else {
2152
- console.log(`\n 📋 ${failedCheck.name} (manual fix needed)`);
2153
- console.log(` ${failedCheck.fix}\n`);
2154
- }
2155
- process.exit(0);
2156
- }
2157
- targetKeys = [fixKey];
2158
- } else if (allCritical) {
2159
- targetKeys = getFixableFailedResults(failedResults, { mode: 'fix', criticalOnly: true }).map(r => r.key);
2160
- if (targetKeys.length === 0) {
2161
- console.log('\n ✅ No critical issues found.\n');
2162
- process.exit(0);
2163
- }
2164
- } else {
2165
- // No key specified — show fixable checks and exit
2166
- const fixable = fixableFailedResults;
2167
- const fixableKeySet = new Set(fixable.map(r => r.key));
2168
- const nonFixable = failedResults.filter(r => !fixableKeySet.has(r.key));
2169
- console.log('');
2170
- console.log(` nerviq fix — ${failedResults.length} failed checks\n`);
2171
- if (fixable.length > 0) {
2172
- console.log(` Auto-fixable (${fixable.length}):`);
2173
- for (const r of fixable) {
2143
+ }
2144
+ process.exit(0);
2145
+ }
2146
+ if (!isFixableKey(fixKey, { mode: 'fix' })) {
2147
+ const aiPrompt = FIX_PROMPTS[fixKey];
2148
+ const failedCheck = failedResults.find(r => r.key === fixKey);
2149
+ if (aiPrompt) {
2150
+ console.log(formatFixPrompt(fixKey, aiPrompt));
2151
+ } else {
2152
+ console.log(`\n 📋 ${failedCheck.name} (manual fix needed)`);
2153
+ console.log(` ${failedCheck.fix}\n`);
2154
+ }
2155
+ process.exit(0);
2156
+ }
2157
+ targetKeys = [fixKey];
2158
+ } else if (allCritical) {
2159
+ targetKeys = getFixableFailedResults(failedResults, { mode: 'fix', criticalOnly: true }).map(r => r.key);
2160
+ if (targetKeys.length === 0) {
2161
+ console.log('\n ✅ No critical issues found.\n');
2162
+ process.exit(0);
2163
+ }
2164
+ } else {
2165
+ // No key specified — show fixable checks and exit
2166
+ const fixable = fixableFailedResults;
2167
+ const fixableKeySet = new Set(fixable.map(r => r.key));
2168
+ const nonFixable = failedResults.filter(r => !fixableKeySet.has(r.key));
2169
+ console.log('');
2170
+ console.log(` nerviq fix — ${failedResults.length} failed checks\n`);
2171
+ if (fixable.length > 0) {
2172
+ console.log(` Auto-fixable (${fixable.length}):`);
2173
+ for (const r of fixable) {
2174
2174
  const tier = r.impact === 'critical' ? '🔴' : r.impact === 'high' ? '🟡' : '🔵';
2175
2175
  console.log(` ${tier} nerviq fix ${r.key}`);
2176
2176
  }
@@ -2207,23 +2207,23 @@ async function main() {
2207
2207
  console.log(` nerviq fix ${fixable[0].key} Fix the first auto-fixable check`);
2208
2208
  console.log(` nerviq fix --all-critical Fix all critical issues at once`);
2209
2209
  }
2210
- console.log('');
2211
- process.exit(0);
2212
- }
2213
-
2214
- const outcome = await applyFixes({
2215
- dir: options.dir,
2216
- platform: options.platform,
2217
- auditResult,
2218
- targetKeys,
2219
- auto: autoApply,
2220
- dryRun: isDryRun,
2221
- mode: 'fix',
2222
- recordOutcomes: true,
2223
- });
2224
- process.exit(outcome.exitCode);
2225
-
2226
- } else if (normalizedCommand === 'init') {
2210
+ console.log('');
2211
+ process.exit(0);
2212
+ }
2213
+
2214
+ const outcome = await applyFixes({
2215
+ dir: options.dir,
2216
+ platform: options.platform,
2217
+ auditResult,
2218
+ targetKeys,
2219
+ auto: autoApply,
2220
+ dryRun: isDryRun,
2221
+ mode: 'fix',
2222
+ recordOutcomes: true,
2223
+ });
2224
+ process.exit(outcome.exitCode);
2225
+
2226
+ } else if (normalizedCommand === 'init') {
2227
2227
  const { runInit } = require('../src/init');
2228
2228
  await runInit(options.dir, flags);
2229
2229
  process.exit(0);
@@ -2273,11 +2273,11 @@ async function main() {
2273
2273
  }
2274
2274
  // MOAT-01: Harmony-first default — when 2+ platforms and platform not explicit
2275
2275
  let harmonyFirstResult = null;
2276
- if (!options.platformExplicit && !options.noHarmonyFirst && !options.diffOnly && !options.driftMode && !options.workspace) {
2277
- const detected = detectPlatforms(options.dir) || [];
2278
- if (detected.length >= 2) {
2279
- try {
2280
- const { harmonyAudit } = require('../src/harmony/audit');
2276
+ if (!options.platformExplicit && !options.noHarmonyFirst && !options.diffOnly && !options.driftMode && !options.workspace) {
2277
+ const detected = detectPlatforms(options.dir) || [];
2278
+ if (detected.length >= 2) {
2279
+ try {
2280
+ const { harmonyAudit } = require('../src/harmony/audit');
2281
2281
  harmonyFirstResult = await harmonyAudit({ dir: options.dir, silent: true });
2282
2282
  if (!options.json && harmonyFirstResult) {
2283
2283
  const hs = harmonyFirstResult.harmonyScore;
@@ -2291,46 +2291,46 @@ async function main() {
2291
2291
  }
2292
2292
  } catch {
2293
2293
  harmonyFirstResult = null;
2294
- }
2295
- }
2296
- }
2297
-
2298
- if (options.fix) {
2299
- if (options.diffOnly) {
2300
- console.error('\n Error: --diff-only cannot be combined with --fix.\n');
2301
- process.exit(2);
2302
- }
2303
-
2304
- const { getFixableFailedResults, applyFixes } = require('../src/fix-engine');
2305
- const auditResult = await audit({ ...options, silent: true });
2306
- const failedResults = (auditResult.results || []).filter((item) => item.passed === false);
2307
- const targetKeys = getFixableFailedResults(failedResults, { mode: 'audit', criticalOnly: true }).map((item) => item.key);
2308
-
2309
- if (targetKeys.length === 0) {
2310
- console.log('');
2311
- console.log(' אין תיקוני critical אוטומטיים זמינים למסלול audit --fix.');
2312
- console.log(' נסו `nerviq fix <key> --prompt` עבור תיקון ידני, או הריצו audit מלא כדי לראות את כל הפערים.');
2313
- console.log('');
2314
- process.exit(2);
2315
- }
2316
-
2317
- const outcome = await applyFixes({
2318
- dir: options.dir,
2319
- platform: options.platform,
2320
- auditResult,
2321
- targetKeys,
2322
- auto: options.auto,
2323
- dryRun: options.dryRun,
2324
- mode: 'audit',
2325
- });
2326
- process.exit(outcome.exitCode);
2327
- }
2328
-
2329
- let result;
2330
- const renderAuditJsonLocally = options.json && (Boolean(options.driftMode) || Boolean(harmonyFirstResult));
2331
- if (options.diffOnly) {
2332
- const { getChangedFiles, buildDiffOnlyAuditView, printDiffOnlyAudit } = require('../src/diff-only');
2333
- const fullResult = await audit({ ...options, silent: true });
2294
+ }
2295
+ }
2296
+ }
2297
+
2298
+ if (options.fix) {
2299
+ if (options.diffOnly) {
2300
+ console.error('\n Error: --diff-only cannot be combined with --fix.\n');
2301
+ process.exit(2);
2302
+ }
2303
+
2304
+ const { getFixableFailedResults, applyFixes } = require('../src/fix-engine');
2305
+ const auditResult = await audit({ ...options, silent: true });
2306
+ const failedResults = (auditResult.results || []).filter((item) => item.passed === false);
2307
+ const targetKeys = getFixableFailedResults(failedResults, { mode: 'audit', criticalOnly: true }).map((item) => item.key);
2308
+
2309
+ if (targetKeys.length === 0) {
2310
+ console.log('');
2311
+ console.log(' אין תיקוני critical אוטומטיים זמינים למסלול audit --fix.');
2312
+ console.log(' נסו `nerviq fix <key> --prompt` עבור תיקון ידני, או הריצו audit מלא כדי לראות את כל הפערים.');
2313
+ console.log('');
2314
+ process.exit(2);
2315
+ }
2316
+
2317
+ const outcome = await applyFixes({
2318
+ dir: options.dir,
2319
+ platform: options.platform,
2320
+ auditResult,
2321
+ targetKeys,
2322
+ auto: options.auto,
2323
+ dryRun: options.dryRun,
2324
+ mode: 'audit',
2325
+ });
2326
+ process.exit(outcome.exitCode);
2327
+ }
2328
+
2329
+ let result;
2330
+ const renderAuditJsonLocally = options.json && (Boolean(options.driftMode) || Boolean(harmonyFirstResult));
2331
+ if (options.diffOnly) {
2332
+ const { getChangedFiles, buildDiffOnlyAuditView, printDiffOnlyAudit } = require('../src/diff-only');
2333
+ const fullResult = await audit({ ...options, silent: true });
2334
2334
  const diffInfo = getChangedFiles(options.dir, {
2335
2335
  diffBase: options.diffBase,
2336
2336
  diffHead: options.diffHead,
@@ -2536,6 +2536,7 @@ async function main() {
2536
2536
  }
2537
2537
  } catch (err) {
2538
2538
  console.error(`\n Error: ${err.message}`);
2539
+ if (process.env.NERVIQ_DEBUG) console.error(err.stack);
2539
2540
  console.error(' Fix: Run `npx nerviq doctor` to diagnose common issues, or check https://github.com/nerviq/nerviq#troubleshooting');
2540
2541
  process.exit(2);
2541
2542
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nerviq/cli",
3
- "version": "1.18.0",
3
+ "version": "1.20.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": {
@@ -18,6 +18,7 @@
18
18
  "build": "npm pack --dry-run",
19
19
  "test": "node test/run.js",
20
20
  "verify:release-metadata": "node tools/validate-release-metadata.js",
21
+ "prepublish:check": "node tools/pre-publish.js",
21
22
  "test:jest": "jest",
22
23
  "test:coverage": "jest --coverage",
23
24
  "test:all": "npm test && npx jest && node test/check-matrix.js && node test/codex-check-matrix.js && node test/gemini-check-matrix.js && node test/copilot-check-matrix.js && node test/cursor-check-matrix.js && node test/windsurf-check-matrix.js && node test/aider-check-matrix.js && node test/opencode-check-matrix.js && node test/golden-matrix.js && node test/codex-golden-matrix.js && node test/gemini-golden-matrix.js && node test/copilot-golden-matrix.js && node test/cursor-golden-matrix.js && node test/windsurf-golden-matrix.js && node test/aider-golden-matrix.js && node test/opencode-golden-matrix.js",