@nerviq/cli 1.12.0 → 1.14.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 CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  [![npm version](https://img.shields.io/npm/v/@nerviq/cli)](https://www.npmjs.com/package/@nerviq/cli)
6
6
  [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](LICENSE)
7
- [![Checks: 2441](https://img.shields.io/badge/checks-2441-brightgreen)](https://github.com/nerviq/nerviq)
7
+ [![Checks: 2441](https://img.shields.io/badge/checks-2441-brightgreen)](https://github.com/nerviq/nerviq)
8
8
 
9
9
  ---
10
10
 
@@ -64,32 +64,32 @@ Nerviq scores your AI coding agent setup from 0 to 100, finds what's missing, an
64
64
  Next: nerviq setup
65
65
  ```
66
66
 
67
- ## Quick Start
68
-
69
- ```bash
70
- npx @nerviq/cli --beginner # Show only the 5 starter commands
71
- npx @nerviq/cli audit # Quick scan: score + top 3 actions
72
- npx @nerviq/cli audit --full # Full audit with all checks + badge
73
- npx @nerviq/cli audit --snapshot --tag "pre-refactor" # Save a named snapshot for history/compare/trend
74
- npx @nerviq/cli audit --diff-only # PR/working-tree audit: changed files + linked governance/config surfaces only
75
- npx @nerviq/cli compare # Detailed per-check diff between latest 2 audit snapshots
76
- npx @nerviq/cli audit --webhook https://hooks.slack.com/services/... # Push audit results to Slack/Discord/generic HTTP
77
- npx @nerviq/cli audit --workspace packages/* # Monorepo: root governance + stack-specific workspace profiles
78
- npx @nerviq/cli setup # Generate starter-safe baseline
79
- npx @nerviq/cli augment # Improvement plan, no writes
80
- npx @nerviq/cli governance # Permission profiles + policy packs
81
- npx @nerviq/cli benchmark # Baseline vs projected score in isolated copy
82
- ```
83
-
84
- No install required. Zero dependencies.
85
-
86
- 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.
87
-
88
- If you want the shortest possible command list inside the terminal, start with:
89
-
90
- ```bash
91
- npx @nerviq/cli --beginner
92
- ```
67
+ ## Quick Start
68
+
69
+ ```bash
70
+ npx @nerviq/cli --beginner # Show only the 5 starter commands
71
+ npx @nerviq/cli audit # Quick scan: score + top 3 actions
72
+ npx @nerviq/cli audit --full # Full audit with all checks + badge
73
+ npx @nerviq/cli audit --snapshot --tag "pre-refactor" # Save a named snapshot for history/compare/trend
74
+ npx @nerviq/cli audit --diff-only # PR/working-tree audit: changed files + linked governance/config surfaces only
75
+ npx @nerviq/cli compare # Detailed per-check diff between latest 2 audit snapshots
76
+ npx @nerviq/cli audit --webhook https://hooks.slack.com/services/... # Push audit results to Slack/Discord/generic HTTP
77
+ npx @nerviq/cli audit --workspace packages/* # Monorepo: root governance + stack-specific workspace profiles
78
+ npx @nerviq/cli setup # Generate starter-safe baseline
79
+ npx @nerviq/cli augment # Improvement plan, no writes
80
+ npx @nerviq/cli governance # Permission profiles + policy packs
81
+ npx @nerviq/cli benchmark # Baseline vs projected score in isolated copy
82
+ ```
83
+
84
+ No install required. Zero dependencies.
85
+
86
+ 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.
87
+
88
+ If you want the shortest possible command list inside the terminal, start with:
89
+
90
+ ```bash
91
+ npx @nerviq/cli --beginner
92
+ ```
93
93
 
94
94
  ## Get Started by Role
95
95
 
@@ -99,7 +99,7 @@ npx @nerviq/cli --beginner
99
99
  | **Team lead / DevEx** | `nerviq governance` → `nerviq audit --json` | CI threshold + `nerviq watch` |
100
100
  | **Enterprise / Platform** | `nerviq harmony-audit` → `nerviq harmony-drift` | Policy packs + `nerviq certify` |
101
101
 
102
- ## 2,441 Checks Across 96 Categories (8 Platforms × ~300 Governance Rules)
102
+ ## 2,441 Checks Across 96 Categories (8 Platforms × ~300 Governance Rules)
103
103
 
104
104
  | Category Group | Checks | Examples |
105
105
  |----------------|--------|---------|
@@ -142,91 +142,105 @@ npx @nerviq/cli synergy-report # Multi-agent synergy analysis
142
142
 
143
143
  Synergy evaluates compound audit results, discovers compensation patterns (where one platform covers another's gaps), and ranks recommendations by cross-platform impact.
144
144
 
145
- ## SDK — `@nerviq/sdk` `BETA`
146
-
147
- Programmatic access to all Nerviq capabilities:
148
-
149
- ```js
150
- const { audit, harmonyAudit, detectPlatforms } = require('@nerviq/sdk');
151
-
152
- async function main() {
153
- try {
154
- const result = await audit('.', 'claude');
155
- console.log(`Score: ${result.score}/100`);
156
-
157
- const platforms = detectPlatforms('.');
158
- console.log(`Active platforms: ${platforms.join(', ') || 'none detected'}`);
159
-
160
- const harmony = await harmonyAudit('.');
161
- console.log(`Harmony score: ${harmony.harmonyScore}/100`);
162
- } catch (error) {
163
- console.error(error instanceof Error ? error.message : 'Unknown SDK error');
164
- process.exitCode = 1;
165
- }
166
- }
167
-
168
- main();
169
- ```
170
-
171
- Stable SDK surfaces: `audit`, `harmonyAudit`, `detectPlatforms`, `getCatalog`
172
- Experimental SDK surfaces: `synergyReport`, `routeTask`
173
-
174
- See [sdk/README.md](sdk/README.md) for full JavaScript examples, error handling guidance, and TypeScript usage.
175
-
176
- ## Integration Contract Pack
177
-
178
- Nerviq publishes a compact integration pack so external systems do not need to scrape CLI text:
179
-
180
- - OpenAPI 3.1 contract from `nerviq serve` via `GET /api/openapi.json`
181
- - Generic audit webhook schema at [`contracts/audit-webhook-event.schema.json`](contracts/audit-webhook-event.schema.json)
182
- - CI reference patterns in [`docs/ci-integration.md`](docs/ci-integration.md)
183
- - SDK usage guide in [`sdk/README.md`](sdk/README.md)
184
- - First-tier release gate in [`docs/first-tier-integration-gate.md`](docs/first-tier-integration-gate.md)
185
-
186
- See [`docs/integration-contracts.md`](docs/integration-contracts.md) for the full pack.
187
-
188
- ## Category Definition Kit
189
-
190
- Nerviq is positioned as the control plane for AI-enabled development:
191
-
192
- - a repo-native governance layer for AI coding agents
193
- - a cross-platform drift detector and operating model
194
- - not a full SAST scanner, prompt library, or single-vendor IDE plugin
195
-
196
- See [`docs/category-definition-kit.md`](docs/category-definition-kit.md) for the category language, comparison matrix, operating model, and adoption playbook.
197
-
198
- ## MCP Server — `nerviq serve`
199
-
200
- Nerviq ships with a built-in MCP-compatible HTTP server for integration with AI agents:
145
+ ## SDK — `@nerviq/sdk` `BETA`
146
+
147
+ Programmatic access to all Nerviq capabilities:
148
+
149
+ ```js
150
+ const { audit, harmonyAudit, detectPlatforms } = require('@nerviq/sdk');
151
+
152
+ async function main() {
153
+ try {
154
+ const result = await audit('.', 'claude');
155
+ console.log(`Score: ${result.score}/100`);
156
+
157
+ const platforms = detectPlatforms('.');
158
+ console.log(`Active platforms: ${platforms.join(', ') || 'none detected'}`);
159
+
160
+ const harmony = await harmonyAudit('.');
161
+ console.log(`Harmony score: ${harmony.harmonyScore}/100`);
162
+ } catch (error) {
163
+ console.error(error instanceof Error ? error.message : 'Unknown SDK error');
164
+ process.exitCode = 1;
165
+ }
166
+ }
167
+
168
+ main();
169
+ ```
170
+
171
+ Stable SDK surfaces: `audit`, `harmonyAudit`, `detectPlatforms`, `getCatalog`
172
+ Experimental SDK surfaces: `synergyReport`, `routeTask`
173
+
174
+ See [sdk/README.md](sdk/README.md) for full JavaScript examples, error handling guidance, and TypeScript usage.
175
+
176
+ ## Integration Contract Pack
177
+
178
+ Nerviq publishes a compact integration pack so external systems do not need to scrape CLI text:
179
+
180
+ - OpenAPI 3.1 contract from `nerviq serve` via `GET /api/openapi.json`
181
+ - Separate `nerviq-mcp` stdio JSON-RPC 2.0 transport for MCP hosts
182
+ - Generic audit webhook schema at [`contracts/audit-webhook-event.schema.json`](contracts/audit-webhook-event.schema.json)
183
+ - CI reference patterns in [`docs/ci-integration.md`](docs/ci-integration.md)
184
+ - SDK usage guide in [`sdk/README.md`](sdk/README.md)
185
+ - First-tier release gate in [`docs/first-tier-integration-gate.md`](docs/first-tier-integration-gate.md)
186
+
187
+ See [`docs/integration-contracts.md`](docs/integration-contracts.md) for the full pack.
188
+
189
+ ## Category Definition Kit
190
+
191
+ Nerviq is positioned as the control plane for AI-enabled development:
192
+
193
+ - a repo-native governance layer for AI coding agents
194
+ - a cross-platform drift detector and operating model
195
+ - not a full SAST scanner, prompt library, or single-vendor IDE plugin
196
+
197
+ See [`docs/category-definition-kit.md`](docs/category-definition-kit.md) for the category language, comparison matrix, operating model, and adoption playbook.
198
+
199
+ ## HTTP API — `nerviq serve`
200
+
201
+ Nerviq ships with a built-in local HTTP API for dashboards, wrappers, scripts, and language-neutral integrations:
201
202
 
202
203
  ```bash
203
204
  npx @nerviq/cli serve --port 3000
204
205
  ```
205
206
 
206
- Endpoints:
207
- - `GET /api/openapi.json` — Live OpenAPI 3.1 contract for this `serve` instance
208
- - `GET /api/health` — Server health check
209
- - `GET /api/catalog` — Full check catalog
210
- - `GET /api/audit` — Run audit on a directory and platform via query params
211
- - `GET /api/harmony` — Cross-platform harmony data
212
-
213
- All successful operational responses are wrapped in a JSON envelope:
214
-
215
- ```json
216
- {
217
- "data": {},
218
- "meta": {
219
- "version": "1.12.0",
220
- "timestamp": "2026-04-09T12:00:00.000Z"
221
- }
222
- }
223
- ```
224
-
225
- Pull the contract directly into Swagger UI, Postman, or internal tooling:
226
-
227
- ```bash
228
- curl http://127.0.0.1:3000/api/openapi.json > nerviq-openapi.json
229
- ```
207
+ Endpoints:
208
+ - `GET /api/openapi.json` — Live OpenAPI 3.1 contract for this `serve` instance
209
+ - `GET /api/health` — Server health check
210
+ - `GET /api/catalog` — Full check catalog
211
+ - `GET /api/audit` — Run audit on a directory and platform via query params
212
+ - `GET /api/harmony` — Cross-platform harmony data
213
+
214
+ All successful operational responses are wrapped in a JSON envelope:
215
+
216
+ ```json
217
+ {
218
+ "data": {},
219
+ "meta": {
220
+ "version": "1.14.0",
221
+ "timestamp": "2026-04-11T12:00:00.000Z"
222
+ }
223
+ }
224
+ ```
225
+
226
+ Pull the contract directly into Swagger UI, Postman, or internal tooling:
227
+
228
+ ```bash
229
+ curl http://127.0.0.1:3000/api/openapi.json > nerviq-openapi.json
230
+ ```
231
+
232
+ 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`:
233
+
234
+ ```json
235
+ {
236
+ "mcpServers": {
237
+ "nerviq": {
238
+ "command": "npx",
239
+ "args": ["-y", "-p", "@nerviq/cli", "nerviq-mcp"]
240
+ }
241
+ }
242
+ }
243
+ ```
230
244
 
231
245
  ## Plugin System — `nerviq.config.js`
232
246
 
@@ -293,143 +307,146 @@ Levels:
293
307
 
294
308
  | Command | What it does |
295
309
  |---------|-------------|
296
- | `nerviq audit` | Score 0-100 — quick scan with top 3 actions and milestone coaching (default) |
297
- | `nerviq audit --full` | Full audit with all checks, weakest areas, confidence labels, and milestone coaching |
298
- | `nerviq audit --diff-only` | Analyze only changed files plus linked governance/config surfaces from git diff / working tree |
299
- | `nerviq fix <key>` | Auto-fix a specific check (shows score impact) |
300
- | `nerviq fix --all-critical` | Fix all critical issues at once |
310
+ | `nerviq audit` | Score 0-100 — quick scan with top 3 actions and milestone coaching (default) |
311
+ | `nerviq audit --full` | Full audit with all checks, weakest areas, confidence labels, and milestone coaching |
312
+ | `nerviq audit --diff-only` | Analyze only changed files plus linked governance/config surfaces from git diff / working tree |
313
+ | `nerviq fix <key>` | Auto-fix a specific check (shows score impact) |
314
+ | `nerviq fix --all-critical` | Fix all critical issues at once |
301
315
  | `nerviq rollback` | Undo the most recent apply (delete created files) |
302
316
  | `nerviq rollback --list` | Show available rollback points |
303
- | `nerviq setup` | Generate starter-safe CLAUDE.md + hooks + commands |
304
- | `nerviq augment` | Repo-aware improvement plan with archetype profiling, operating profile, and adopt/defer/ignore guidance (no writes) |
305
- | `nerviq suggest-only` | Structured report for sharing, including repo archetype, operating profile, and adopt/defer/ignore guidance |
317
+ | `nerviq setup` | Generate starter-safe CLAUDE.md + hooks + commands |
318
+ | `nerviq augment` | Repo-aware improvement plan with archetype profiling, operating profile, and adopt/defer/ignore guidance (no writes) |
319
+ | `nerviq suggest-only` | Structured report for sharing, including repo archetype, operating profile, and adopt/defer/ignore guidance |
306
320
  | `nerviq plan` | Export proposal bundles with previews |
307
321
  | `nerviq apply` | Apply proposals with rollback |
308
322
  | `nerviq governance` | Permission profiles, hooks, policy packs |
309
- | `nerviq benchmark` | Baseline vs projected score in isolated temp copy |
323
+ | `nerviq benchmark` | Baseline vs projected score in isolated temp copy |
310
324
  | `nerviq check-health` | Detect regressions between audit snapshots |
311
- | `nerviq deep-review` | AI-powered config review (opt-in) |
312
- | `nerviq deep-review --behavioral` | Local behavioral drift review with outcome-layer heuristics |
325
+ | `nerviq deep-review` | AI-powered config review (opt-in) |
326
+ | `nerviq deep-review --behavioral` | Local behavioral drift review with outcome-layer heuristics |
313
327
  | `nerviq interactive` | Step-by-step guided wizard |
314
328
  | `nerviq watch` | Live monitoring with score delta |
315
- | `nerviq history` | Audit snapshot history from saved snapshots |
316
- | `nerviq compare` | Compare latest vs previous audit snapshot |
317
- | `nerviq trend` | Export audit snapshot trend report |
329
+ | `nerviq history` | Audit snapshot history from saved snapshots |
330
+ | `nerviq compare` | Compare latest vs previous audit snapshot |
331
+ | `nerviq trend` | Export audit snapshot trend report |
318
332
  | `nerviq feedback` | Record recommendation outcomes |
319
333
  | `nerviq anti-patterns` | Detect anti-patterns in current project |
320
334
  | `nerviq freshness` | Show verification freshness for all checks |
321
335
  | `nerviq rules-export` | Export recommendation rules (human summary or --json) |
322
- | `nerviq badge` | shields.io badge for README |
323
- | `nerviq certify` | Certification level + badge |
324
- | `nerviq scan dir1 dir2` | Compare multiple repos |
325
- | `nerviq org scan dir1 dir2` | Aggregate multiple repos into one score table |
326
- | `nerviq org policy` | Inspect resolved org/team/repo policy layers |
336
+ | `nerviq badge` | shields.io badge for README |
337
+ | `nerviq certify` | Certification level + badge |
338
+ | `nerviq scan dir1 dir2` | Compare multiple repos |
339
+ | `nerviq org scan dir1 dir2` | Aggregate multiple repos into one score table |
340
+ | `nerviq org policy` | Inspect resolved org/team/repo policy layers |
327
341
  | `nerviq harmony-audit` | Cross-platform DX audit |
342
+ | `nerviq harmony-score` | Standalone Harmony Score (0-100) with badge + CI gate |
343
+ | `nerviq harmony-demo` | Zero-setup demo — see Harmony in action instantly |
328
344
  | `nerviq harmony-sync` | Sync config across platforms |
329
345
  | `nerviq harmony-drift` | Detect platform drift |
330
346
  | `nerviq harmony-advise` | Cross-platform advice |
331
347
  | `nerviq harmony-watch` | Live drift monitoring |
332
348
  | `nerviq harmony-governance` | Unified platform governance |
349
+ | `nerviq harmony-add <platform>` | Add a new platform to your project |
333
350
  | `nerviq synergy-report` | Multi-agent synergy analysis |
334
351
  | `nerviq catalog` | Show check catalog for all 8 platforms |
335
- | `nerviq doctor` | Self-diagnostics for install health, freshness, platform detection, declared MCP servers, and hook runtime |
352
+ | `nerviq doctor` | Self-diagnostics for install health, freshness, platform detection, declared MCP servers, and hook runtime |
336
353
  | `nerviq convert` | Convert config between platforms |
337
354
  | `nerviq migrate` | Migrate platform config versions |
338
- | `nerviq serve` | Start local MCP-compatible HTTP API |
355
+ | `nerviq serve` | Start local HTTP API + OpenAPI contract |
339
356
 
340
357
  ## Options
341
358
 
342
359
  | Flag | Effect |
343
360
  |------|--------|
344
- | `--full` | Full audit output (all checks, weakest areas, confidence labels, milestone coaching) |
361
+ | `--full` | Full audit output (all checks, weakest areas, confidence labels, milestone coaching) |
345
362
  | `--verbose` | Full audit + medium-priority recommendations |
346
363
  | `--threshold N` | Exit 1 if score < N (for CI) |
347
364
  | `--json` | Machine-readable JSON output |
348
- | `--out FILE` | Write output to file |
349
- | `--webhook URL` | POST audit results to Slack, Discord, or a generic JSON endpoint |
350
- | `--webhook-header NAME:VALUE` | Add a custom webhook header; repeat the flag for multiple headers |
351
- | `--webhook-retries N` | Retry transient webhook failures (`429`, `5xx`, timeouts) up to `N` extra times |
352
- | `--snapshot` | Save audit snapshot for trending |
353
- | `--tag LABEL` | Label a saved snapshot (repeat the flag for multiple tags) |
354
- | `--behavioral` | Run the opt-in local behavioral drift review via `deep-review` |
355
- | `--history` | With `deep-review --behavioral`, show behavioral snapshot history |
356
- | `--compare` | With `deep-review --behavioral`, compare the latest two behavioral snapshots |
357
- | `--diff-only` | Run a changed-file audit instead of a full repo audit |
358
- | `--diff-base SHA` | Base SHA for `--diff-only` PR comparisons (defaults to CI env vars when present) |
359
- | `--diff-head SHA` | Head SHA for `--diff-only` PR comparisons (defaults to `GITHUB_SHA` or `HEAD`) |
360
- | `--dry-run` | Preview changes without writing files |
361
- | `--config-only` | Only write config files, never source code |
362
- | `--auto` | Apply without prompts |
365
+ | `--out FILE` | Write output to file |
366
+ | `--webhook URL` | POST audit results to Slack, Discord, or a generic JSON endpoint |
367
+ | `--webhook-header NAME:VALUE` | Add a custom webhook header; repeat the flag for multiple headers |
368
+ | `--webhook-retries N` | Retry transient webhook failures (`429`, `5xx`, timeouts) up to `N` extra times |
369
+ | `--snapshot` | Save audit snapshot for trending |
370
+ | `--tag LABEL` | Label a saved snapshot (repeat the flag for multiple tags) |
371
+ | `--behavioral` | Run the opt-in local behavioral drift review via `deep-review` |
372
+ | `--history` | With `deep-review --behavioral`, show behavioral snapshot history |
373
+ | `--compare` | With `deep-review --behavioral`, compare the latest two behavioral snapshots |
374
+ | `--diff-only` | Run a changed-file audit instead of a full repo audit |
375
+ | `--diff-base SHA` | Base SHA for `--diff-only` PR comparisons (defaults to CI env vars when present) |
376
+ | `--diff-head SHA` | Head SHA for `--diff-only` PR comparisons (defaults to `GITHUB_SHA` or `HEAD`) |
377
+ | `--dry-run` | Preview changes without writing files |
378
+ | `--config-only` | Only write config files, never source code |
379
+ | `--auto` | Apply without prompts |
363
380
  | `--only A,B` | Limit apply to selected proposal IDs |
364
381
  | `--format sarif` | SARIF output for code scanning |
365
382
  | `--platform NAME` | Target platform (claude, codex, gemini, copilot, cursor, windsurf, aider, opencode) |
366
- | `--workspace GLOB` | Audit workspaces separately as package-level live audits with summary-only JSON rows (e.g. packages/*) |
367
- | `--external PATH` | Benchmark an external repo |
368
-
369
- Webhook delivery automatically retries transient failures twice by default. For authenticated internal endpoints, you can add custom headers such as:
370
-
371
- ```bash
372
- npx @nerviq/cli audit \
373
- --webhook https://ops.example.com/nerviq/audit \
374
- --webhook-header "Authorization: Bearer $NERVIQ_WEBHOOK_TOKEN" \
375
- --webhook-header "X-Nerviq-Environment: production" \
376
- --webhook-retries 4
377
- ```
378
-
379
- Generic webhook endpoints now receive a stable `nerviq.audit.completed` event envelope with:
380
-
381
- - backward-compatible top-level `platform`, `score`, `passed`, `failed`, and `results`
382
- - nested `data` and `meta` blocks for new consumers
383
- - schema versioning through `schemaVersion`
384
-
385
- For PR-focused audits, you can scope Nerviq to the working tree or an explicit base/head range:
386
-
387
- ```bash
388
- npx @nerviq/cli audit --diff-only
389
- npx @nerviq/cli audit --diff-only --diff-base origin/main --diff-head HEAD
390
- ```
391
-
392
- `--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`.
393
-
394
- For multi-repo governance, Nerviq also supports inherited policy layers:
395
-
396
- - `.nerviq/org-policy.json` in an ancestor directory for org defaults
397
- - `.nerviq/team-policy.json` in the repo for team overrides
398
- - `.nerviq/repo-policy.json` in the repo for repo-specific overrides
399
-
400
- Inspect the resolved contract with:
401
-
402
- ```bash
403
- npx @nerviq/cli org policy
404
- npx @nerviq/cli org scan ./app ./api ./infra --json
405
- ```
406
-
407
- For opt-in outcome-layer inspection, Nerviq can also run a local behavioral drift review:
408
-
409
- ```bash
410
- npx @nerviq/cli deep-review --behavioral
411
- npx @nerviq/cli deep-review --behavioral --snapshot --milestone baseline --tag "behavioral-baseline"
412
- npx @nerviq/cli deep-review --behavioral --history
413
- npx @nerviq/cli deep-review --behavioral --compare
414
- ```
415
-
416
- Behavioral drift mode is intentionally guarded:
417
-
418
- - It analyzes repository structure and instruction-vs-outcome mismatch heuristics
419
- - It does not claim agent attribution without explicit evidence
420
- - It is not marketed as SAST, semantic code review, or runtime analysis
421
-
422
- `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.
383
+ | `--workspace GLOB` | Audit workspaces separately as package-level live audits with summary-only JSON rows (e.g. packages/*) |
384
+ | `--external PATH` | Benchmark an external repo |
385
+
386
+ Webhook delivery automatically retries transient failures twice by default. For authenticated internal endpoints, you can add custom headers such as:
387
+
388
+ ```bash
389
+ npx @nerviq/cli audit \
390
+ --webhook https://ops.example.com/nerviq/audit \
391
+ --webhook-header "Authorization: Bearer $NERVIQ_WEBHOOK_TOKEN" \
392
+ --webhook-header "X-Nerviq-Environment: production" \
393
+ --webhook-retries 4
394
+ ```
395
+
396
+ Generic webhook endpoints now receive a stable `nerviq.audit.completed` event envelope with:
397
+
398
+ - backward-compatible top-level `platform`, `score`, `passed`, `failed`, and `results`
399
+ - nested `data` and `meta` blocks for new consumers
400
+ - schema versioning through `schemaVersion`
401
+
402
+ For PR-focused audits, you can scope Nerviq to the working tree or an explicit base/head range:
403
+
404
+ ```bash
405
+ npx @nerviq/cli audit --diff-only
406
+ npx @nerviq/cli audit --diff-only --diff-base origin/main --diff-head HEAD
407
+ ```
408
+
409
+ `--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`.
410
+
411
+ For multi-repo governance, Nerviq also supports inherited policy layers:
412
+
413
+ - `.nerviq/org-policy.json` in an ancestor directory for org defaults
414
+ - `.nerviq/team-policy.json` in the repo for team overrides
415
+ - `.nerviq/repo-policy.json` in the repo for repo-specific overrides
416
+
417
+ Inspect the resolved contract with:
418
+
419
+ ```bash
420
+ npx @nerviq/cli org policy
421
+ npx @nerviq/cli org scan ./app ./api ./infra --json
422
+ ```
423
+
424
+ For opt-in outcome-layer inspection, Nerviq can also run a local behavioral drift review:
425
+
426
+ ```bash
427
+ npx @nerviq/cli deep-review --behavioral
428
+ npx @nerviq/cli deep-review --behavioral --snapshot --milestone baseline --tag "behavioral-baseline"
429
+ npx @nerviq/cli deep-review --behavioral --history
430
+ npx @nerviq/cli deep-review --behavioral --compare
431
+ ```
432
+
433
+ Behavioral drift mode is intentionally guarded:
434
+
435
+ - It analyzes repository structure and instruction-vs-outcome mismatch heuristics
436
+ - It does not claim agent attribution without explicit evidence
437
+ - It is not marketed as SAST, semantic code review, or runtime analysis
438
+
439
+ `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.
423
440
 
424
441
  ## Backed by Research
425
442
 
426
443
  Nerviq is built on the NERVIQ knowledge engine — the largest verified catalog of AI coding agent techniques:
427
444
 
428
- - **448+ research documents** covering all 8 platforms
429
- - **332+ experiments** with tested, rated results
430
- - **2,441 checks** across 8 platforms (~300 unique governance rules × 8 platform adaptations), each with `sourceUrl` and `confidence` level (0.0-1.0)
445
+ - **540+ research documents** covering all 8 platforms
446
+ - **400+ experiments** with tested, rated results
447
+ - **2,441 checks** across 8 platforms (~300 unique governance rules × 8 platform adaptations), each with `sourceUrl` and `confidence` level (0.0-1.0)
431
448
  - Every check is traceable to primary documentation or verified experiment
432
- - 90-day freshness cycle: stale findings are re-verified or pruned
449
+ - **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
433
450
 
434
451
  ## Safety Modes
435
452
 
@@ -450,7 +467,7 @@ Every write command supports `--snapshot` for automatic backup before changes.
450
467
 
451
468
  - **Zero dependencies** — nothing to audit
452
469
  - **Runs locally** — audit, setup, plan, apply, governance, benchmark all run on your machine
453
- - **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
470
+ - **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
454
471
  - **AGPL-3.0 Licensed** — open source
455
472
 
456
473
  ## Links
@@ -470,9 +487,9 @@ If Nerviq helped you, consider giving it a ⭐ on [GitHub](https://github.com/ne
470
487
 
471
488
  **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.
472
489
 
473
- **Strongest at:** AI agent governance, configuration intelligence, workflow policy hygiene, cross-platform alignment, and setup standardization.
474
-
475
- **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.
490
+ **Strongest at:** AI agent governance, configuration intelligence, workflow policy hygiene, cross-platform alignment, and setup standardization.
491
+
492
+ **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.
476
493
 
477
494
  **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.
478
495