@nerviq/cli 1.29.0 → 1.29.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/CHANGELOG.md +1527 -1493
- package/README.md +550 -538
- package/SECURITY.md +82 -82
- package/bin/cli.js +2562 -2558
- package/docs/api-reference.md +356 -356
- package/docs/audit-fix.md +109 -0
- package/docs/autofix.md +3 -62
- package/docs/getting-started.md +1 -1
- package/docs/index.html +592 -592
- package/docs/integration-contracts.md +287 -287
- package/docs/maintenance.md +128 -128
- package/docs/new-platform-guide.md +202 -202
- package/docs/release-process.md +63 -0
- package/docs/shallow-risk.md +244 -244
- package/docs/why-nerviq.md +82 -82
- package/package.json +67 -67
- package/src/aider/activity.js +226 -226
- package/src/aider/context.js +162 -162
- package/src/aider/freshness.js +123 -123
- package/src/aider/techniques.js +3465 -3465
- package/src/audit/layers.js +180 -180
- package/src/audit.js +1032 -1032
- package/src/benchmark.js +299 -299
- package/src/codex/activity.js +324 -324
- package/src/codex/freshness.js +142 -142
- package/src/codex/techniques.js +4895 -4895
- package/src/context.js +326 -326
- package/src/continuous-ops.js +11 -1
- package/src/convert.js +340 -340
- package/src/copilot/config-parser.js +280 -280
- package/src/copilot/context.js +218 -218
- package/src/copilot/freshness.js +177 -177
- package/src/copilot/patch.js +238 -238
- package/src/copilot/techniques.js +3578 -3578
- package/src/cursor/freshness.js +194 -194
- package/src/cursor/patch.js +243 -243
- package/src/cursor/techniques.js +3735 -3735
- package/src/doctor.js +201 -201
- package/src/fix-engine.js +511 -8
- package/src/formatters/csv.js +86 -86
- package/src/formatters/junit.js +123 -123
- package/src/formatters/markdown.js +164 -164
- package/src/formatters/otel.js +151 -151
- package/src/freshness.js +156 -156
- package/src/gemini/activity.js +402 -402
- package/src/gemini/context.js +290 -290
- package/src/gemini/freshness.js +183 -183
- package/src/gemini/patch.js +229 -229
- package/src/gemini/techniques.js +3811 -3811
- package/src/governance.js +533 -533
- package/src/harmony/audit.js +306 -306
- package/src/i18n.js +63 -63
- package/src/insights.js +119 -119
- package/src/integrations.js +134 -134
- package/src/locales/en.json +33 -33
- package/src/locales/es.json +33 -33
- package/src/migrate.js +354 -354
- package/src/opencode/activity.js +286 -286
- package/src/opencode/freshness.js +137 -137
- package/src/opencode/techniques.js +3450 -3450
- package/src/setup/analysis.js +12 -12
- package/src/setup.js +7 -6
- package/src/shallow-risk/index.js +56 -56
- package/src/shallow-risk/patterns/agent-config-cross-platform-drift.js +50 -50
- package/src/shallow-risk/patterns/agent-config-dangerous-autoapprove.js +46 -46
- package/src/shallow-risk/patterns/agent-config-deprecated-keys.js +46 -46
- package/src/shallow-risk/patterns/agent-config-missing-file.js +317 -317
- package/src/shallow-risk/patterns/agent-config-secret-literal.js +49 -49
- package/src/shallow-risk/patterns/agent-config-stack-contradiction.js +34 -34
- package/src/shallow-risk/patterns/hook-script-missing.js +70 -70
- package/src/shallow-risk/patterns/mcp-server-no-allowlist.js +52 -52
- package/src/shallow-risk/shared.js +648 -648
- package/src/source-urls.js +295 -295
- package/src/state-paths.js +85 -85
- package/src/supplemental-checks.js +805 -805
- package/src/telemetry.js +160 -160
- package/src/windsurf/context.js +359 -359
- package/src/windsurf/freshness.js +194 -194
- package/src/windsurf/patch.js +231 -231
- package/src/windsurf/techniques.js +3779 -3779
package/README.md
CHANGED
|
@@ -1,538 +1,550 @@
|
|
|
1
|
-
# Nerviq
|
|
2
|
-
|
|
3
|
-
> Standardize and govern your AI coding agent setup — score, fix, and align across 8 platforms.
|
|
4
|
-
|
|
5
|
-
[](https://www.npmjs.com/package/@nerviq/cli)
|
|
6
|
-
[](LICENSE)
|
|
7
|
-
[](https://github.com/nerviq/nerviq)
|
|
8
|
-
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
### 8 Platforms Supported
|
|
12
|
-
|
|
13
|
-
Nerviq audits, sets up, and governs AI coding agent configurations for **8 platforms**:
|
|
14
|
-
|
|
15
|
-
| Platform | Checks | Status |
|
|
16
|
-
|----------|--------|--------|
|
|
17
|
-
| Claude Code | 400 | Full |
|
|
18
|
-
| Codex (OpenAI) | 272 | Full |
|
|
19
|
-
| Gemini CLI (Google) | 300 | Full |
|
|
20
|
-
| GitHub Copilot | 299 | Full |
|
|
21
|
-
| Cursor | 301 | Full |
|
|
22
|
-
| Windsurf | 297 | Full |
|
|
23
|
-
| Aider | 283 | Full |
|
|
24
|
-
| OpenCode | 286 | Full |
|
|
25
|
-
|
|
26
|
-
### 10 Stack-Specific Languages
|
|
27
|
-
|
|
28
|
-
| Language | Checks | Key Areas |
|
|
29
|
-
|----------|--------|-----------|
|
|
30
|
-
| Python | 26 | pyproject, typing, pytest, linting, async, security |
|
|
31
|
-
| Go | 21 | go.mod, vet, fmt, error wrapping, interfaces |
|
|
32
|
-
| Rust | 21 | Cargo, clippy, unsafe docs, editions, cross-compile |
|
|
33
|
-
| Java/Spring | 21 | Maven/Gradle, JUnit, Spring Boot, migrations |
|
|
34
|
-
| Ruby | 16 | Gemfile, RSpec, Rubocop, Rails |
|
|
35
|
-
| PHP | 16 | Composer, PHPUnit, Laravel, PSR |
|
|
36
|
-
| .NET | 16 | csproj, NuGet, xUnit, EF Core |
|
|
37
|
-
| Flutter | 15 | pubspec, analysis, state management, l10n |
|
|
38
|
-
| Swift | 10 | SPM, SwiftLint, async/await, doc comments |
|
|
39
|
-
| Kotlin | 10 | Gradle, ktlint, coroutines, Compose, KMP |
|
|
40
|
-
|
|
41
|
-
---
|
|
42
|
-
|
|
43
|
-
## What Nerviq Does
|
|
44
|
-
|
|
45
|
-
Most repos use **more than one** AI coding agent — Claude and Cursor, Copilot and Codex, Gemini and Windsurf. Their configs drift silently. Nerviq is the neutral control plane that detects that drift, scores it, and helps align it.
|
|
46
|
-
|
|
47
|
-
When your repo has 2+ platforms configured, `nerviq audit` leads with the Harmony Score — cross-platform alignment — before any single-platform results. Single-platform repos still get a normal per-platform audit.
|
|
48
|
-
|
|
49
|
-
```
|
|
50
|
-
$ nerviq audit
|
|
51
|
-
Detected: Next.js + TypeScript + Claude + Cursor
|
|
52
|
-
|
|
53
|
-
Harmony Score: 78/100 — 3 drift issues across 2 platforms (Claude Code + Cursor)
|
|
54
|
-
Run `nerviq harmony-audit` for the full cross-platform report.
|
|
55
|
-
|
|
56
|
-
Platform: Claude Code
|
|
57
|
-
CLAUDE.md .............. 23/25 checks passed
|
|
58
|
-
.claude/settings.json .. 6/9 checks passed
|
|
59
|
-
|
|
60
|
-
Platform: Cursor
|
|
61
|
-
.cursor/rules/ ......... 14/16 checks passed
|
|
62
|
-
.cursorrules ........... 4/7 checks passed
|
|
63
|
-
|
|
64
|
-
Drift: trust-mode mismatch (Claude relaxed / Cursor strict)
|
|
65
|
-
MCP coverage gap — 3 servers in Claude, 1 in Cursor
|
|
66
|
-
format-on-save hook missing from Cursor
|
|
67
|
-
|
|
68
|
-
3 suggestions → `nerviq harmony-sync` to align.
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
Single-platform repos still work the same way — the Harmony Score only appears when 2+ platforms are detected. Use `--no-harmony-first` to suppress it even on multi-platform repos.
|
|
72
|
-
|
|
73
|
-
### Scope — the 4 layers
|
|
74
|
-
|
|
75
|
-
Every Nerviq check is tagged with one of four explicit layers so you know exactly what the tool claims (and does not claim) to cover:
|
|
76
|
-
|
|
77
|
-
- **governance** — agent configuration posture: presence, content, and quality of agent-instruction files and platform settings.
|
|
78
|
-
- **drift** — cross-platform consistency: do your configured platforms agree, and does declared state match repo reality?
|
|
79
|
-
- **hygiene** — repo-level cleanliness adjacent to agents (gitignore, CHANGELOG, SECURITY.md, LICENSE, Node version pinning, etc.).
|
|
80
|
-
- **shallow-risk** — obvious agent-config ↔ codebase boundary issues emitted through the experimental `--shallow-risk` lane.
|
|
81
|
-
|
|
82
|
-
There is deliberately no "deep-review" or general-security-scanning layer — Nerviq is an agent-configuration audit tool, not a code-review tool. The experimental `nerviq audit --shallow-risk` pass now adds an opt-in, non-scoring boundary scan on top of the four-layer model. The full taxonomy and disambiguation rules live in `docs/integration-contracts.md §8`, and the `layer` field is surfaced in every output format (JSON, CSV, JUnit, Markdown, text).
|
|
83
|
-
|
|
84
|
-
## Quick Start
|
|
85
|
-
|
|
86
|
-
```bash
|
|
87
|
-
npx @nerviq/cli --beginner # Show only the 5 starter commands
|
|
88
|
-
npx @nerviq/cli audit # Quick scan: score + top 3 actions
|
|
89
|
-
npx @nerviq/cli audit --
|
|
90
|
-
npx @nerviq/cli audit --
|
|
91
|
-
npx @nerviq/cli audit --
|
|
92
|
-
npx @nerviq/cli
|
|
93
|
-
npx @nerviq/cli
|
|
94
|
-
npx @nerviq/cli audit --
|
|
95
|
-
npx @nerviq/cli
|
|
96
|
-
npx @nerviq/cli
|
|
97
|
-
npx @nerviq/cli
|
|
98
|
-
npx @nerviq/cli
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
|
127
|
-
|
|
128
|
-
|
|
|
129
|
-
|
|
|
130
|
-
|
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
|
135
|
-
|
|
136
|
-
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
npx @nerviq/cli
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
See [
|
|
205
|
-
|
|
206
|
-
##
|
|
207
|
-
|
|
208
|
-
Nerviq
|
|
209
|
-
|
|
210
|
-
-
|
|
211
|
-
-
|
|
212
|
-
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
```
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
```
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
##
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
|
339
|
-
|
|
340
|
-
| `nerviq
|
|
341
|
-
| `nerviq
|
|
342
|
-
| `nerviq
|
|
343
|
-
| `nerviq
|
|
344
|
-
| `nerviq
|
|
345
|
-
| `nerviq
|
|
346
|
-
| `nerviq
|
|
347
|
-
| `nerviq
|
|
348
|
-
| `nerviq
|
|
349
|
-
| `nerviq
|
|
350
|
-
| `nerviq
|
|
351
|
-
| `nerviq
|
|
352
|
-
| `nerviq
|
|
353
|
-
| `nerviq
|
|
354
|
-
| `nerviq
|
|
355
|
-
| `nerviq
|
|
356
|
-
| `nerviq
|
|
357
|
-
| `nerviq
|
|
358
|
-
| `nerviq
|
|
359
|
-
| `nerviq
|
|
360
|
-
| `nerviq
|
|
361
|
-
| `nerviq
|
|
362
|
-
| `nerviq
|
|
363
|
-
| `nerviq
|
|
364
|
-
| `nerviq
|
|
365
|
-
| `nerviq
|
|
366
|
-
| `nerviq
|
|
367
|
-
| `nerviq
|
|
368
|
-
| `nerviq
|
|
369
|
-
| `nerviq
|
|
370
|
-
| `nerviq
|
|
371
|
-
| `nerviq
|
|
372
|
-
| `nerviq
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
|
377
|
-
|
|
378
|
-
|
|
|
379
|
-
|
|
|
380
|
-
|
|
|
381
|
-
|
|
|
382
|
-
|
|
|
383
|
-
|
|
|
384
|
-
|
|
|
385
|
-
|
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
|
390
|
-
|
|
391
|
-
| `--
|
|
392
|
-
| `--
|
|
393
|
-
| `--
|
|
394
|
-
| `--
|
|
395
|
-
| `--
|
|
396
|
-
| `--
|
|
397
|
-
| `--
|
|
398
|
-
| `--
|
|
399
|
-
| `--
|
|
400
|
-
| `--
|
|
401
|
-
| `--
|
|
402
|
-
| `--
|
|
403
|
-
| `--
|
|
404
|
-
| `--
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
```bash
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
For
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
-
|
|
484
|
-
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
**
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
1
|
+
# Nerviq
|
|
2
|
+
|
|
3
|
+
> Standardize and govern your AI coding agent setup — score, fix, and align across 8 platforms.
|
|
4
|
+
|
|
5
|
+
[](https://www.npmjs.com/package/@nerviq/cli)
|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://github.com/nerviq/nerviq)
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
### 8 Platforms Supported
|
|
12
|
+
|
|
13
|
+
Nerviq audits, sets up, and governs AI coding agent configurations for **8 platforms**:
|
|
14
|
+
|
|
15
|
+
| Platform | Checks | Status |
|
|
16
|
+
|----------|--------|--------|
|
|
17
|
+
| Claude Code | 400 | Full |
|
|
18
|
+
| Codex (OpenAI) | 272 | Full |
|
|
19
|
+
| Gemini CLI (Google) | 300 | Full |
|
|
20
|
+
| GitHub Copilot | 299 | Full |
|
|
21
|
+
| Cursor | 301 | Full |
|
|
22
|
+
| Windsurf | 297 | Full |
|
|
23
|
+
| Aider | 283 | Full |
|
|
24
|
+
| OpenCode | 286 | Full |
|
|
25
|
+
|
|
26
|
+
### 10 Stack-Specific Languages
|
|
27
|
+
|
|
28
|
+
| Language | Checks | Key Areas |
|
|
29
|
+
|----------|--------|-----------|
|
|
30
|
+
| Python | 26 | pyproject, typing, pytest, linting, async, security |
|
|
31
|
+
| Go | 21 | go.mod, vet, fmt, error wrapping, interfaces |
|
|
32
|
+
| Rust | 21 | Cargo, clippy, unsafe docs, editions, cross-compile |
|
|
33
|
+
| Java/Spring | 21 | Maven/Gradle, JUnit, Spring Boot, migrations |
|
|
34
|
+
| Ruby | 16 | Gemfile, RSpec, Rubocop, Rails |
|
|
35
|
+
| PHP | 16 | Composer, PHPUnit, Laravel, PSR |
|
|
36
|
+
| .NET | 16 | csproj, NuGet, xUnit, EF Core |
|
|
37
|
+
| Flutter | 15 | pubspec, analysis, state management, l10n |
|
|
38
|
+
| Swift | 10 | SPM, SwiftLint, async/await, doc comments |
|
|
39
|
+
| Kotlin | 10 | Gradle, ktlint, coroutines, Compose, KMP |
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## What Nerviq Does
|
|
44
|
+
|
|
45
|
+
Most repos use **more than one** AI coding agent — Claude and Cursor, Copilot and Codex, Gemini and Windsurf. Their configs drift silently. Nerviq is the neutral control plane that detects that drift, scores it, and helps align it.
|
|
46
|
+
|
|
47
|
+
When your repo has 2+ platforms configured, `nerviq audit` leads with the Harmony Score — cross-platform alignment — before any single-platform results. Single-platform repos still get a normal per-platform audit.
|
|
48
|
+
|
|
49
|
+
```
|
|
50
|
+
$ nerviq audit
|
|
51
|
+
Detected: Next.js + TypeScript + Claude + Cursor
|
|
52
|
+
|
|
53
|
+
Harmony Score: 78/100 — 3 drift issues across 2 platforms (Claude Code + Cursor)
|
|
54
|
+
Run `nerviq harmony-audit` for the full cross-platform report.
|
|
55
|
+
|
|
56
|
+
Platform: Claude Code
|
|
57
|
+
CLAUDE.md .............. 23/25 checks passed
|
|
58
|
+
.claude/settings.json .. 6/9 checks passed
|
|
59
|
+
|
|
60
|
+
Platform: Cursor
|
|
61
|
+
.cursor/rules/ ......... 14/16 checks passed
|
|
62
|
+
.cursorrules ........... 4/7 checks passed
|
|
63
|
+
|
|
64
|
+
Drift: trust-mode mismatch (Claude relaxed / Cursor strict)
|
|
65
|
+
MCP coverage gap — 3 servers in Claude, 1 in Cursor
|
|
66
|
+
format-on-save hook missing from Cursor
|
|
67
|
+
|
|
68
|
+
3 suggestions → `nerviq harmony-sync` to align.
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Single-platform repos still work the same way — the Harmony Score only appears when 2+ platforms are detected. Use `--no-harmony-first` to suppress it even on multi-platform repos.
|
|
72
|
+
|
|
73
|
+
### Scope — the 4 layers
|
|
74
|
+
|
|
75
|
+
Every Nerviq check is tagged with one of four explicit layers so you know exactly what the tool claims (and does not claim) to cover:
|
|
76
|
+
|
|
77
|
+
- **governance** — agent configuration posture: presence, content, and quality of agent-instruction files and platform settings.
|
|
78
|
+
- **drift** — cross-platform consistency: do your configured platforms agree, and does declared state match repo reality?
|
|
79
|
+
- **hygiene** — repo-level cleanliness adjacent to agents (gitignore, CHANGELOG, SECURITY.md, LICENSE, Node version pinning, etc.).
|
|
80
|
+
- **shallow-risk** — obvious agent-config ↔ codebase boundary issues emitted through the experimental `--shallow-risk` lane.
|
|
81
|
+
|
|
82
|
+
There is deliberately no "deep-review" or general-security-scanning layer — Nerviq is an agent-configuration audit tool, not a code-review tool. The experimental `nerviq audit --shallow-risk` pass now adds an opt-in, non-scoring boundary scan on top of the four-layer model. The full taxonomy and disambiguation rules live in `docs/integration-contracts.md §8`, and the `layer` field is surfaced in every output format (JSON, CSV, JUnit, Markdown, text).
|
|
83
|
+
|
|
84
|
+
## Quick Start
|
|
85
|
+
|
|
86
|
+
```bash
|
|
87
|
+
npx @nerviq/cli --beginner # Show only the 5 starter commands
|
|
88
|
+
npx @nerviq/cli audit # Quick scan: score + top 3 actions
|
|
89
|
+
npx @nerviq/cli audit --fix # Dry-run deterministic autofix plan + audit-fix.patch
|
|
90
|
+
npx @nerviq/cli audit --full # Full audit with all checks + badge
|
|
91
|
+
npx @nerviq/cli audit --snapshot --tag "pre-refactor" # Save a named snapshot for history/compare/trend
|
|
92
|
+
npx @nerviq/cli audit --diff-only # PR/working-tree audit: changed files + linked governance/config surfaces only
|
|
93
|
+
npx @nerviq/cli compare # Detailed per-check diff between latest 2 audit snapshots
|
|
94
|
+
npx @nerviq/cli audit --webhook https://hooks.slack.com/services/... # Push audit results to Slack/Discord/generic HTTP
|
|
95
|
+
npx @nerviq/cli audit --workspace packages/* # Monorepo: root governance + stack-specific workspace profiles
|
|
96
|
+
npx @nerviq/cli setup # Generate starter-safe baseline
|
|
97
|
+
npx @nerviq/cli augment # Improvement plan, no writes
|
|
98
|
+
npx @nerviq/cli governance # Permission profiles + policy packs
|
|
99
|
+
npx @nerviq/cli benchmark # Baseline vs projected score in isolated copy
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
No install required. Zero dependencies.
|
|
103
|
+
|
|
104
|
+
Text-mode CLI output explains terms like `MCP`, `hooks`, `deny rules`, and `governance` inline when they appear, so a first audit is easier to read.
|
|
105
|
+
|
|
106
|
+
If you want the shortest possible command list inside the terminal, start with:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npx @nerviq/cli --beginner
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
### Safe Autofix with `--fix`
|
|
113
|
+
|
|
114
|
+
`nerviq audit --fix` now defaults to a safe dry-run. Nerviq only plans deterministic file-level fixes on an allowlist of governance and hygiene files such as `CLAUDE.md`, `AGENTS.md`, `.claude/settings.json`, `.gitignore`, `.editorconfig`, `CHANGELOG.md`, `CONTRIBUTING.md`, and `LICENSE`.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
npx @nerviq/cli audit --fix # Preview changes and write audit-fix.patch
|
|
118
|
+
npx @nerviq/cli audit --fix --apply --auto # Apply deterministic fixes
|
|
119
|
+
npx @nerviq/cli audit --fix --pr # Create a local branch and stage the autofix files
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
Checks that need judgment stay advisory-only and are listed as manual follow-ups. See [`docs/audit-fix.md`](docs/audit-fix.md) for the full contract.
|
|
123
|
+
|
|
124
|
+
## Get Started by Role
|
|
125
|
+
|
|
126
|
+
| You are a... | Start here | Then |
|
|
127
|
+
|--------------|------------|------|
|
|
128
|
+
| **Solo developer** | `nerviq audit` → `nerviq augment` | `nerviq benchmark` |
|
|
129
|
+
| **Team lead / DevEx** | `nerviq governance` → `nerviq audit --json` | CI threshold + `nerviq watch` |
|
|
130
|
+
| **Enterprise / Platform** | `nerviq harmony-audit` → `nerviq harmony-drift` | Policy packs + `nerviq certify` |
|
|
131
|
+
|
|
132
|
+
## 2,441 Checks Across 96 Categories (8 Platforms × ~300 Governance Rules)
|
|
133
|
+
|
|
134
|
+
| Category Group | Checks | Examples |
|
|
135
|
+
|----------------|--------|---------|
|
|
136
|
+
| Stack-Specific (10 languages) | 172 | Python, Go, Rust, Java, Ruby, PHP, .NET, Flutter, Swift, Kotlin |
|
|
137
|
+
| Platform Config & Instructions | ~150 | CLAUDE.md, AGENTS.md, rules, managed blocks |
|
|
138
|
+
| Security & Trust | ~80 | permissions, deny rules, secrets, trust posture |
|
|
139
|
+
| Quality & Testing | ~70 | verification loops, lint/test/build, coverage |
|
|
140
|
+
| Automation & Hooks | ~60 | PreToolUse, PostToolUse, notification hooks |
|
|
141
|
+
| Workflow & Commands | ~50 | skills, commands, agents, snapshots |
|
|
142
|
+
| Git & Hygiene | ~40 | .gitignore, env protection, changelog |
|
|
143
|
+
| Tools & MCP | ~40 | .mcp.json, multi-server, Context7 |
|
|
144
|
+
| Governance & Compliance | ~30 | permission profiles, audit trails |
|
|
145
|
+
| DevOps & Infrastructure | ~30 | Docker, CI, Terraform, monitoring |
|
|
146
|
+
| Cross-Platform Intelligence | ~25 | harmony (GA), synergy (Experimental), drift detection |
|
|
147
|
+
| Enterprise & Freshness | ~20 | freshness tracking, deprecation, SBOM |
|
|
148
|
+
| Memory & Context | ~15 | context management, compaction, @path |
|
|
149
|
+
| Prompting & Design | ~10 | XML tags, constraints, frontend patterns |
|
|
150
|
+
|
|
151
|
+
## Harmony — Cross-Platform Alignment `GA`
|
|
152
|
+
|
|
153
|
+
Harmony detects drift between your AI coding platforms and keeps them in sync.
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
npx @nerviq/cli harmony-audit # Cross-platform DX audit (0-100 harmony score)
|
|
157
|
+
npx @nerviq/cli harmony-sync # Sync shared config across platforms
|
|
158
|
+
npx @nerviq/cli harmony-drift # Detect drift between platform configs
|
|
159
|
+
npx @nerviq/cli harmony-advise # Cross-platform improvement advice
|
|
160
|
+
npx @nerviq/cli harmony-watch # Live monitoring for config drift
|
|
161
|
+
npx @nerviq/cli harmony-governance # Unified governance across platforms
|
|
162
|
+
npx @nerviq/cli harmony-add <platform> # Add a new platform to your project
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
## Synergy — Multi-Agent Amplification `EXPERIMENTAL`
|
|
166
|
+
|
|
167
|
+
Synergy analyzes how your platforms work together and finds amplification opportunities. Currently uses static routing rules — learned routing is planned for v2.0.
|
|
168
|
+
|
|
169
|
+
```bash
|
|
170
|
+
npx @nerviq/cli synergy-report # Multi-agent synergy analysis
|
|
171
|
+
```
|
|
172
|
+
|
|
173
|
+
Synergy evaluates compound audit results, discovers compensation patterns (where one platform covers another's gaps), and ranks recommendations by cross-platform impact.
|
|
174
|
+
|
|
175
|
+
## SDK — `@nerviq/sdk` `BETA`
|
|
176
|
+
|
|
177
|
+
Programmatic access to all Nerviq capabilities:
|
|
178
|
+
|
|
179
|
+
```js
|
|
180
|
+
const { audit, harmonyAudit, detectPlatforms } = require('@nerviq/sdk');
|
|
181
|
+
|
|
182
|
+
async function main() {
|
|
183
|
+
try {
|
|
184
|
+
const result = await audit('.', 'claude');
|
|
185
|
+
console.log(`Score: ${result.score}/100`);
|
|
186
|
+
|
|
187
|
+
const platforms = detectPlatforms('.');
|
|
188
|
+
console.log(`Active platforms: ${platforms.join(', ') || 'none detected'}`);
|
|
189
|
+
|
|
190
|
+
const harmony = await harmonyAudit('.');
|
|
191
|
+
console.log(`Harmony score: ${harmony.harmonyScore}/100`);
|
|
192
|
+
} catch (error) {
|
|
193
|
+
console.error(error instanceof Error ? error.message : 'Unknown SDK error');
|
|
194
|
+
process.exitCode = 1;
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
main();
|
|
199
|
+
```
|
|
200
|
+
|
|
201
|
+
Stable SDK surfaces: `audit`, `harmonyAudit`, `detectPlatforms`, `getCatalog`
|
|
202
|
+
Experimental SDK surfaces: `synergyReport`, `routeTask`
|
|
203
|
+
|
|
204
|
+
See [sdk/README.md](sdk/README.md) for full JavaScript examples, error handling guidance, and TypeScript usage.
|
|
205
|
+
|
|
206
|
+
## Integration Contract Pack
|
|
207
|
+
|
|
208
|
+
Nerviq publishes a compact integration pack so external systems do not need to scrape CLI text:
|
|
209
|
+
|
|
210
|
+
- OpenAPI 3.1 contract from `nerviq serve` via `GET /api/openapi.json`
|
|
211
|
+
- Separate `nerviq-mcp` stdio JSON-RPC 2.0 transport for MCP hosts
|
|
212
|
+
- Generic audit webhook schema at [`contracts/audit-webhook-event.schema.json`](contracts/audit-webhook-event.schema.json)
|
|
213
|
+
- CI reference patterns in [`docs/ci-integration.md`](docs/ci-integration.md)
|
|
214
|
+
- SDK usage guide in [`sdk/README.md`](sdk/README.md)
|
|
215
|
+
- First-tier release gate in [`docs/first-tier-integration-gate.md`](docs/first-tier-integration-gate.md)
|
|
216
|
+
|
|
217
|
+
See [`docs/integration-contracts.md`](docs/integration-contracts.md) for the full pack.
|
|
218
|
+
|
|
219
|
+
## Category Definition Kit
|
|
220
|
+
|
|
221
|
+
Nerviq is positioned as the control plane for AI-enabled development:
|
|
222
|
+
|
|
223
|
+
- a repo-native governance layer for AI coding agents
|
|
224
|
+
- a cross-platform drift detector and operating model
|
|
225
|
+
- not a full SAST scanner, prompt library, or single-vendor IDE plugin
|
|
226
|
+
|
|
227
|
+
See [`docs/category-definition-kit.md`](docs/category-definition-kit.md) for the category language, comparison matrix, operating model, and adoption playbook.
|
|
228
|
+
|
|
229
|
+
## HTTP API — `nerviq serve`
|
|
230
|
+
|
|
231
|
+
Nerviq ships with a built-in local HTTP API for dashboards, wrappers, scripts, and language-neutral integrations:
|
|
232
|
+
|
|
233
|
+
```bash
|
|
234
|
+
npx @nerviq/cli serve --port 3000
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Endpoints:
|
|
238
|
+
- `GET /api/openapi.json` — Live OpenAPI 3.1 contract for this `serve` instance
|
|
239
|
+
- `GET /api/health` — Server health check
|
|
240
|
+
- `GET /api/catalog` — Full check catalog
|
|
241
|
+
- `GET /api/audit` — Run audit on a directory and platform via query params
|
|
242
|
+
- `GET /api/harmony` — Cross-platform harmony data
|
|
243
|
+
|
|
244
|
+
All successful operational responses are wrapped in a JSON envelope:
|
|
245
|
+
|
|
246
|
+
```json
|
|
247
|
+
{
|
|
248
|
+
"data": {},
|
|
249
|
+
"meta": {
|
|
250
|
+
"version": "1.29.1",
|
|
251
|
+
"timestamp": "2026-04-16T08:00:00.000Z"
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Pull the contract directly into Swagger UI, Postman, or internal tooling:
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
curl http://127.0.0.1:3000/api/openapi.json > nerviq-openapi.json
|
|
260
|
+
```
|
|
261
|
+
|
|
262
|
+
This HTTP surface is separate from the MCP transport. If your host expects Model Context Protocol over stdio, register the `nerviq-mcp` binary instead of pointing it at `nerviq serve`:
|
|
263
|
+
|
|
264
|
+
```json
|
|
265
|
+
{
|
|
266
|
+
"mcpServers": {
|
|
267
|
+
"nerviq": {
|
|
268
|
+
"command": "npx",
|
|
269
|
+
"args": ["-y", "-p", "@nerviq/cli", "nerviq-mcp"]
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Plugin System — `nerviq.config.js`
|
|
276
|
+
|
|
277
|
+
Extend Nerviq with custom checks via a config file in your project root:
|
|
278
|
+
|
|
279
|
+
```js
|
|
280
|
+
// nerviq.config.js
|
|
281
|
+
module.exports = {
|
|
282
|
+
plugins: [
|
|
283
|
+
{
|
|
284
|
+
name: 'my-company-checks',
|
|
285
|
+
checks: {
|
|
286
|
+
internalDocs: {
|
|
287
|
+
id: 'internalDocs',
|
|
288
|
+
name: 'Internal docs present',
|
|
289
|
+
check: (dir) => require('fs').existsSync(`${dir}/docs/internal.md`),
|
|
290
|
+
impact: 'medium',
|
|
291
|
+
category: 'Quality',
|
|
292
|
+
fix: 'Add docs/internal.md with team-specific guidelines',
|
|
293
|
+
},
|
|
294
|
+
},
|
|
295
|
+
},
|
|
296
|
+
],
|
|
297
|
+
};
|
|
298
|
+
```
|
|
299
|
+
|
|
300
|
+
See [docs/plugins.md](docs/plugins.md) for full plugin API reference.
|
|
301
|
+
|
|
302
|
+
## GitHub Action
|
|
303
|
+
|
|
304
|
+
Add Nerviq to your CI pipeline:
|
|
305
|
+
|
|
306
|
+
```yaml
|
|
307
|
+
# .github/workflows/nerviq.yml
|
|
308
|
+
name: Nerviq Audit
|
|
309
|
+
on: [push, pull_request]
|
|
310
|
+
|
|
311
|
+
jobs:
|
|
312
|
+
audit:
|
|
313
|
+
runs-on: ubuntu-latest
|
|
314
|
+
steps:
|
|
315
|
+
- uses: actions/checkout@v4
|
|
316
|
+
- uses: nerviq/nerviq@v1
|
|
317
|
+
with:
|
|
318
|
+
threshold: 60
|
|
319
|
+
```
|
|
320
|
+
|
|
321
|
+
The action outputs `score`, `passed`, and `total` for use in downstream steps. Fails the workflow if the score is below the configured threshold.
|
|
322
|
+
|
|
323
|
+
## Certification
|
|
324
|
+
|
|
325
|
+
Earn a Nerviq certification badge for your project:
|
|
326
|
+
|
|
327
|
+
```bash
|
|
328
|
+
npx @nerviq/cli certify # Run certification and display badge
|
|
329
|
+
```
|
|
330
|
+
|
|
331
|
+
Levels:
|
|
332
|
+
- **Gold** — Harmony score >= 80, all platforms >= 70
|
|
333
|
+
- **Silver** — Harmony score >= 60, all platforms >= 50
|
|
334
|
+
- **Bronze** — Any platform >= 40
|
|
335
|
+
|
|
336
|
+
## All Commands
|
|
337
|
+
|
|
338
|
+
| Command | What it does |
|
|
339
|
+
|---------|-------------|
|
|
340
|
+
| `nerviq audit` | Score 0-100 — quick scan with top 3 actions and milestone coaching (default) |
|
|
341
|
+
| `nerviq audit --full` | Full audit with all checks, weakest areas, confidence labels, and milestone coaching |
|
|
342
|
+
| `nerviq audit --diff-only` | Analyze only changed files plus linked governance/config surfaces from git diff / working tree |
|
|
343
|
+
| `nerviq fix <key>` | Auto-fix a specific check (shows score impact) |
|
|
344
|
+
| `nerviq fix --all-critical` | Fix all critical issues at once |
|
|
345
|
+
| `nerviq rollback` | Undo the most recent apply (delete created files) |
|
|
346
|
+
| `nerviq rollback --list` | Show available rollback points |
|
|
347
|
+
| `nerviq setup` | Generate starter-safe CLAUDE.md + hooks + commands |
|
|
348
|
+
| `nerviq augment` | Repo-aware improvement plan with archetype profiling, operating profile, and adopt/defer/ignore guidance (no writes) |
|
|
349
|
+
| `nerviq suggest-only` | Structured report for sharing, including repo archetype, operating profile, and adopt/defer/ignore guidance |
|
|
350
|
+
| `nerviq plan` | Export proposal bundles with previews |
|
|
351
|
+
| `nerviq apply` | Apply proposals with rollback |
|
|
352
|
+
| `nerviq governance` | Permission profiles, hooks, policy packs |
|
|
353
|
+
| `nerviq benchmark` | Baseline vs projected score in isolated temp copy |
|
|
354
|
+
| `nerviq check-health` | Detect regressions between audit snapshots |
|
|
355
|
+
| `nerviq deep-review` | AI-powered config review (opt-in) |
|
|
356
|
+
| `nerviq deep-review --behavioral` | Local behavioral drift review with outcome-layer heuristics |
|
|
357
|
+
| `nerviq interactive` | Step-by-step guided wizard |
|
|
358
|
+
| `nerviq watch` | Live monitoring with score delta |
|
|
359
|
+
| `nerviq history` | Audit snapshot history from saved snapshots |
|
|
360
|
+
| `nerviq compare` | Compare latest vs previous audit snapshot |
|
|
361
|
+
| `nerviq trend` | Export audit snapshot trend report |
|
|
362
|
+
| `nerviq feedback` | Record recommendation outcomes |
|
|
363
|
+
| `nerviq anti-patterns` | Detect anti-patterns in current project |
|
|
364
|
+
| `nerviq freshness` | Show verification freshness for all checks |
|
|
365
|
+
| `nerviq rules-export` | Export recommendation rules (human summary or --json) |
|
|
366
|
+
| `nerviq badge` | shields.io badge for README |
|
|
367
|
+
| `nerviq certify` | Certification level + badge |
|
|
368
|
+
| `nerviq scan dir1 dir2` | Compare multiple repos |
|
|
369
|
+
| `nerviq org scan dir1 dir2` | Aggregate multiple repos into one score table |
|
|
370
|
+
| `nerviq org policy` | Inspect resolved org/team/repo policy layers |
|
|
371
|
+
| `nerviq harmony-audit` | Cross-platform DX audit |
|
|
372
|
+
| `nerviq harmony-score` | Standalone Harmony Score (0-100) with badge + CI gate |
|
|
373
|
+
| `nerviq harmony-demo` | Zero-setup demo — see Harmony in action instantly |
|
|
374
|
+
| `nerviq harmony-sync` | Sync config across platforms |
|
|
375
|
+
| `nerviq harmony-drift` | Detect platform drift |
|
|
376
|
+
| `nerviq harmony-advise` | Cross-platform advice |
|
|
377
|
+
| `nerviq harmony-watch` | Live drift monitoring |
|
|
378
|
+
| `nerviq harmony-governance` | Unified platform governance |
|
|
379
|
+
| `nerviq harmony-add <platform>` | Add a new platform to your project |
|
|
380
|
+
| `nerviq synergy-report` | Multi-agent synergy analysis (Experimental) |
|
|
381
|
+
| `nerviq catalog` | Show check catalog for all 8 platforms |
|
|
382
|
+
| `nerviq doctor` | Self-diagnostics for install health, freshness, platform detection, declared MCP servers, and hook runtime |
|
|
383
|
+
| `nerviq convert` | Convert config between platforms |
|
|
384
|
+
| `nerviq migrate` | Migrate platform config versions |
|
|
385
|
+
| `nerviq serve` | Start local HTTP API + OpenAPI contract |
|
|
386
|
+
|
|
387
|
+
## Options
|
|
388
|
+
|
|
389
|
+
| Flag | Effect |
|
|
390
|
+
|------|--------|
|
|
391
|
+
| `--full` | Full audit output (all checks, weakest areas, confidence labels, milestone coaching) |
|
|
392
|
+
| `--verbose` | Full audit + medium-priority recommendations |
|
|
393
|
+
| `--threshold N` | Exit 1 if score < N (for CI) |
|
|
394
|
+
| `--json` | Machine-readable JSON output |
|
|
395
|
+
| `--out FILE` | Write output to file |
|
|
396
|
+
| `--webhook URL` | POST audit results to Slack, Discord, or a generic JSON endpoint |
|
|
397
|
+
| `--webhook-header NAME:VALUE` | Add a custom webhook header; repeat the flag for multiple headers |
|
|
398
|
+
| `--webhook-retries N` | Retry transient webhook failures (`429`, `5xx`, timeouts) up to `N` extra times |
|
|
399
|
+
| `--snapshot` | Save audit snapshot for trending |
|
|
400
|
+
| `--tag LABEL` | Label a saved snapshot (repeat the flag for multiple tags) |
|
|
401
|
+
| `--behavioral` | Run the opt-in local behavioral drift review via `deep-review` |
|
|
402
|
+
| `--history` | With `deep-review --behavioral`, show behavioral snapshot history |
|
|
403
|
+
| `--compare` | With `deep-review --behavioral`, compare the latest two behavioral snapshots |
|
|
404
|
+
| `--diff-only` | Run a changed-file audit instead of a full repo audit |
|
|
405
|
+
| `--diff-base SHA` | Base SHA for `--diff-only` PR comparisons (defaults to CI env vars when present) |
|
|
406
|
+
| `--diff-head SHA` | Head SHA for `--diff-only` PR comparisons (defaults to `GITHUB_SHA` or `HEAD`) |
|
|
407
|
+
| `--dry-run` | Preview changes without writing files |
|
|
408
|
+
| `--config-only` | Only write config files, never source code |
|
|
409
|
+
| `--auto` | Apply without prompts |
|
|
410
|
+
| `--only A,B` | Limit apply to selected proposal IDs |
|
|
411
|
+
| `--format sarif` | SARIF output for code scanning |
|
|
412
|
+
| `--format markdown` | GitHub-flavoured PR-comment report |
|
|
413
|
+
| `--format junit` | JUnit XML for CI test reporters (GitHub Actions, Jenkins, GitLab) |
|
|
414
|
+
| `--format csv` | RFC 4180 CSV, one row per check |
|
|
415
|
+
| `--platform NAME` | Target platform (claude, codex, gemini, copilot, cursor, windsurf, aider, opencode) |
|
|
416
|
+
| `--workspace GLOB` | Audit workspaces separately as package-level live audits with summary-only JSON rows (e.g. packages/*) |
|
|
417
|
+
| `--external PATH` | Benchmark an external repo |
|
|
418
|
+
|
|
419
|
+
### CI output formats
|
|
420
|
+
|
|
421
|
+
Pipe audit output straight into the standard CI surfaces:
|
|
422
|
+
|
|
423
|
+
```bash
|
|
424
|
+
# PR comment (GitHub-flavoured markdown)
|
|
425
|
+
npx @nerviq/cli audit --format=markdown --out audit.md
|
|
426
|
+
|
|
427
|
+
# CI test report (JUnit XML — Jenkins, GitLab, GitHub Actions reporter)
|
|
428
|
+
npx @nerviq/cli audit --format=junit --out junit.xml
|
|
429
|
+
|
|
430
|
+
# Spreadsheet / dashboard ingestion (RFC 4180 CSV)
|
|
431
|
+
npx @nerviq/cli audit --format=csv --out audit.csv
|
|
432
|
+
```
|
|
433
|
+
|
|
434
|
+
Webhook delivery automatically retries transient failures twice by default. For authenticated internal endpoints, you can add custom headers such as:
|
|
435
|
+
|
|
436
|
+
```bash
|
|
437
|
+
npx @nerviq/cli audit \
|
|
438
|
+
--webhook https://ops.example.com/nerviq/audit \
|
|
439
|
+
--webhook-header "Authorization: Bearer $NERVIQ_WEBHOOK_TOKEN" \
|
|
440
|
+
--webhook-header "X-Nerviq-Environment: production" \
|
|
441
|
+
--webhook-retries 4
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
Generic webhook endpoints now receive a stable `nerviq.audit.completed` event envelope with:
|
|
445
|
+
|
|
446
|
+
- backward-compatible top-level `platform`, `score`, `passed`, `failed`, and `results`
|
|
447
|
+
- nested `data` and `meta` blocks for new consumers
|
|
448
|
+
- schema versioning through `schemaVersion`
|
|
449
|
+
|
|
450
|
+
For PR-focused audits, you can scope Nerviq to the working tree or an explicit base/head range:
|
|
451
|
+
|
|
452
|
+
```bash
|
|
453
|
+
npx @nerviq/cli audit --diff-only
|
|
454
|
+
npx @nerviq/cli audit --diff-only --diff-base origin/main --diff-head HEAD
|
|
455
|
+
```
|
|
456
|
+
|
|
457
|
+
`--diff-only` is intentionally a scoped review surface. It reports a `diff-only changed-file audit` score, lists the changed files it considered, and reminds you to run a full `nerviq audit` for the complete repo posture. Because diff-only scores are not directly comparable to full audit history, Nerviq blocks `--diff-only --snapshot`.
|
|
458
|
+
|
|
459
|
+
For multi-repo governance, Nerviq also supports inherited policy layers:
|
|
460
|
+
|
|
461
|
+
- `.nerviq/org-policy.json` in an ancestor directory for org defaults
|
|
462
|
+
- `.nerviq/team-policy.json` in the repo for team overrides
|
|
463
|
+
- `.nerviq/repo-policy.json` in the repo for repo-specific overrides
|
|
464
|
+
|
|
465
|
+
Inspect the resolved contract with:
|
|
466
|
+
|
|
467
|
+
```bash
|
|
468
|
+
npx @nerviq/cli org policy
|
|
469
|
+
npx @nerviq/cli org scan ./app ./api ./infra --json
|
|
470
|
+
```
|
|
471
|
+
|
|
472
|
+
For opt-in outcome-layer inspection, Nerviq can also run a local behavioral drift review:
|
|
473
|
+
|
|
474
|
+
```bash
|
|
475
|
+
npx @nerviq/cli deep-review --behavioral
|
|
476
|
+
npx @nerviq/cli deep-review --behavioral --snapshot --milestone baseline --tag "behavioral-baseline"
|
|
477
|
+
npx @nerviq/cli deep-review --behavioral --history
|
|
478
|
+
npx @nerviq/cli deep-review --behavioral --compare
|
|
479
|
+
```
|
|
480
|
+
|
|
481
|
+
Behavioral drift mode is intentionally guarded:
|
|
482
|
+
|
|
483
|
+
- It analyzes repository structure and instruction-vs-outcome mismatch heuristics
|
|
484
|
+
- It does not claim agent attribution without explicit evidence
|
|
485
|
+
- It is not marketed as SAST, semantic code review, or runtime analysis
|
|
486
|
+
|
|
487
|
+
`nerviq setup` now seeds a trust-boundary section in `CLAUDE.md` and an `injection-defense` starter hook for `WebFetch`, `WebSearch`, `Read`, `Grep`, `Glob`, and MCP-backed external-content flows. `nerviq doctor` validates that the declared starter hook still runs and logs suspicious prompt-injection patterns correctly.
|
|
488
|
+
|
|
489
|
+
## Backed by Research
|
|
490
|
+
|
|
491
|
+
Nerviq is built on the NERVIQ knowledge engine — the largest verified catalog of AI coding agent techniques:
|
|
492
|
+
|
|
493
|
+
- **540+ research documents** covering all 8 platforms
|
|
494
|
+
- **400+ experiments** with tested, rated results
|
|
495
|
+
- **2,441 checks** across 8 platforms (~300 unique governance rules × 8 platform adaptations), each with `sourceUrl` and `confidence` level (0.0-1.0)
|
|
496
|
+
- Every check is traceable to primary documentation or verified experiment
|
|
497
|
+
- **Freshness:** daily changelog scanning across all 8 platforms, weekly liveness sweep (6 automated checks), monthly quality review, quarterly cross-validation — items older than 90 days are confidence-weighted
|
|
498
|
+
|
|
499
|
+
## Safety Modes
|
|
500
|
+
|
|
501
|
+
Nerviq provides explicit safety controls so you decide what it can touch:
|
|
502
|
+
|
|
503
|
+
| Mode | Flag | What it does |
|
|
504
|
+
|------|------|-------------|
|
|
505
|
+
| **Read-only** | `nerviq audit` | Reads files, writes nothing. Default command. |
|
|
506
|
+
| **Suggest-only** | `nerviq suggest-only` | Generates markdown report, no file writes. |
|
|
507
|
+
| **Dry-run** | `--dry-run` | Previews setup/fix/apply changes without writing. |
|
|
508
|
+
| **Config-only** | `--config-only` | Only writes config files (.claude/, rules, hooks). Never touches source code. |
|
|
509
|
+
| **Safe-write** | `--profile safe-write` | Default write profile. Creates new files, never overwrites existing ones. |
|
|
510
|
+
| **Power-user** | `--profile power-user` | Overwrites existing files (use with `--snapshot` for rollback). |
|
|
511
|
+
|
|
512
|
+
Every write command supports `--snapshot` for automatic backup before changes.
|
|
513
|
+
|
|
514
|
+
## Privacy
|
|
515
|
+
|
|
516
|
+
- **Zero dependencies** — nothing to audit
|
|
517
|
+
- **Runs locally** — audit, setup, plan, apply, governance, benchmark all run on your machine
|
|
518
|
+
- **Deep review is opt-in** — `deep-review` sends selected config for AI analysis, while `deep-review --behavioral` stays local and uses heuristic outcome-layer analysis only
|
|
519
|
+
- **AGPL-3.0 Licensed** — open source
|
|
520
|
+
|
|
521
|
+
## Links
|
|
522
|
+
|
|
523
|
+
- **npm**: [@nerviq/cli](https://www.npmjs.com/package/@nerviq/cli)
|
|
524
|
+
- **GitHub**: [github.com/nerviq/nerviq](https://github.com/nerviq/nerviq)
|
|
525
|
+
- **Website**: [nerviq.net](https://nerviq.net)
|
|
526
|
+
- **Discord**: [Join the community](https://discord.gg/nerviq)
|
|
527
|
+
|
|
528
|
+
---
|
|
529
|
+
|
|
530
|
+
If Nerviq helped you, consider giving it a ⭐ on [GitHub](https://github.com/nerviq/nerviq) — it helps others discover the project.
|
|
531
|
+
|
|
532
|
+
## What Nerviq Is — and Isn't
|
|
533
|
+
|
|
534
|
+
**Best for:** Teams going from zero governance to a strong baseline — fast. If you're starting with AI coding agents or have a few platforms running without consistent configuration, Nerviq gets you to a governed setup quickly.
|
|
535
|
+
|
|
536
|
+
**Not designed for:** Deeply customized setups with 20+ skills, agent teams, and bespoke MCP integrations. If you've already built advanced agent workflows, you may not need this.
|
|
537
|
+
|
|
538
|
+
**Strongest at:** AI agent governance, configuration intelligence, workflow policy hygiene, cross-platform alignment, and setup standardization.
|
|
539
|
+
|
|
540
|
+
**Not a replacement for:** Deep architectural review of business logic, runtime performance profiling, full SAST coverage, secret scanning, or security penetration testing. Nerviq focuses on how your AI coding agents are configured and governed — not on what your application code does.
|
|
541
|
+
|
|
542
|
+
**Confidence levels:** Every check includes a `confidence` score (0.0–1.0) and a `sourceUrl` linking to primary documentation. Checks marked `heuristic` are pattern-based and may produce false positives on non-standard project structures.
|
|
543
|
+
|
|
544
|
+
**Feature maturity:**
|
|
545
|
+
|
|
546
|
+
| Label | Meaning |
|
|
547
|
+
|-------|---------|
|
|
548
|
+
| `GA` | Stable, tested on real repos, safe for production use |
|
|
549
|
+
| `BETA` | Works but has limited real-world testing. API may change |
|
|
550
|
+
| `EXPERIMENTAL` | Early stage, static rules, results may vary |
|