@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/docs/shallow-risk.md
CHANGED
|
@@ -1,246 +1,246 @@
|
|
|
1
|
-
# Shallow Risk Mode (experimental)
|
|
2
|
-
|
|
3
|
-
`nerviq audit --shallow-risk` surfaces obvious problems at the
|
|
4
|
-
intersection of your AI agent configuration and your codebase.
|
|
5
|
-
It is opt-in, experimental, and deliberately narrow.
|
|
6
|
-
|
|
7
|
-
## When to turn this on
|
|
8
|
-
|
|
9
|
-
**You want this when:** your team runs one or more AI coding agents
|
|
10
|
-
(Claude Code, Cursor, Codex, Copilot, Gemini, Windsurf, Aider,
|
|
11
|
-
OpenCode) against a real repository and you want to catch the
|
|
12
|
-
"silent mismatch" class of problems where your agent's declared
|
|
13
|
-
context diverges from your actual code.
|
|
14
|
-
|
|
15
|
-
**You don't want this when:** your goal is general-purpose code
|
|
16
|
-
security. For that, pair NERVIQ with a dedicated tool (Semgrep,
|
|
17
|
-
CodeQL, gitleaks, Dependabot). NERVIQ is not a SAST tool and has
|
|
18
|
-
never claimed to be.
|
|
19
|
-
|
|
20
|
-
## What it catches - by example
|
|
21
|
-
|
|
22
|
-
### 1. Your agent config points at a file that doesn't exist
|
|
23
|
-
|
|
24
|
-
```markdown
|
|
25
|
-
<!-- CLAUDE.md -->
|
|
26
|
-
## Security model
|
|
27
|
-
|
|
28
|
-
See [docs/SECURITY.md](./docs/SECURITY.md) for how we handle
|
|
29
|
-
secrets and compliance.
|
|
30
|
-
```
|
|
31
|
-
|
|
32
|
-
But `docs/SECURITY.md` doesn't exist. Claude Code follows the link,
|
|
33
|
-
finds nothing, and quietly works with incomplete context. Every
|
|
34
|
-
session.
|
|
35
|
-
|
|
36
|
-
NERVIQ flags: `agent-config-missing-file: CLAUDE.md references
|
|
37
|
-
docs/SECURITY.md but the file is missing. Agent guidance is
|
|
38
|
-
incomplete.`
|
|
39
|
-
|
|
40
|
-
### 2. Your agent config contradicts your actual codebase
|
|
41
|
-
|
|
42
|
-
```markdown
|
|
43
|
-
<!-- CLAUDE.md -->
|
|
44
|
-
This is a Go microservice. Run `go test ./...` before committing.
|
|
45
|
-
```
|
|
46
|
-
|
|
47
|
-
The repo is actually Python. There is no `go.mod`. Claude
|
|
48
|
-
recommends Go tooling forever.
|
|
49
|
-
|
|
50
|
-
NERVIQ flags: `agent-config-stack-contradiction: CLAUDE.md declares
|
|
51
|
-
primary stack as "Go" but the repo contains Python signals
|
|
52
|
-
(pyproject.toml, 47 .py files) and no Go signals.`
|
|
53
|
-
|
|
54
|
-
### 3. Two agents get contradictory instructions
|
|
55
|
-
|
|
56
|
-
- `.cursor/rules/main.mdc`: "Use TypeScript strict mode."
|
|
57
|
-
- `CLAUDE.md`: "This is a pure JavaScript project."
|
|
58
|
-
|
|
59
|
-
Each agent does something slightly different. Teams hit drift
|
|
60
|
-
they can't explain.
|
|
61
|
-
|
|
62
|
-
NERVIQ flags: `agent-config-cross-platform-drift: CLAUDE.md and
|
|
63
|
-
.cursor/rules/main.mdc disagree on primary language.`
|
|
64
|
-
|
|
65
|
-
### 4. Your MCP server has no permission boundary
|
|
66
|
-
|
|
67
|
-
```json
|
|
68
|
-
// .claude/settings.json
|
|
69
|
-
{
|
|
70
|
-
"mcpServers": {
|
|
71
|
-
"shell": {
|
|
72
|
-
"command": "node",
|
|
73
|
-
"args": ["./scripts/shell-mcp.js"],
|
|
74
|
-
"permissions": []
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
```
|
|
79
|
-
|
|
80
|
-
`permissions: []` is empty. The MCP server can run anything.
|
|
81
|
-
|
|
82
|
-
NERVIQ flags: `mcp-server-no-allowlist: MCP server "shell" in
|
|
83
|
-
.claude/settings.json has empty permissions - full access, no
|
|
84
|
-
allowlist. Review and add an allow-list.`
|
|
85
|
-
|
|
86
|
-
### 5. Your hook script is referenced but missing
|
|
87
|
-
|
|
88
|
-
```json
|
|
89
|
-
// .claude/settings.json
|
|
90
|
-
{
|
|
91
|
-
"hooks": {
|
|
92
|
-
"PreToolUse": [{
|
|
93
|
-
"hooks": [{
|
|
94
|
-
"type": "command",
|
|
95
|
-
"command": ".claude/hooks/pre-commit.sh"
|
|
96
|
-
}]
|
|
97
|
-
}]
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
The file `.claude/hooks/pre-commit.sh` doesn't exist. Every pre-tool
|
|
103
|
-
hook silently fails and Claude proceeds anyway.
|
|
104
|
-
|
|
105
|
-
NERVIQ flags: `hook-script-missing: .claude/settings.json declares a
|
|
106
|
-
PreToolUse hook at .claude/hooks/pre-commit.sh, but the file is
|
|
107
|
-
missing. Hook is silently skipped.`
|
|
108
|
-
|
|
109
|
-
### 6. A secret ended up in an agent-config file
|
|
110
|
-
|
|
111
|
-
```markdown
|
|
112
|
-
<!-- CLAUDE.md -->
|
|
113
|
-
## Testing
|
|
114
|
-
|
|
1
|
+
# Shallow Risk Mode (experimental)
|
|
2
|
+
|
|
3
|
+
`nerviq audit --shallow-risk` surfaces obvious problems at the
|
|
4
|
+
intersection of your AI agent configuration and your codebase.
|
|
5
|
+
It is opt-in, experimental, and deliberately narrow.
|
|
6
|
+
|
|
7
|
+
## When to turn this on
|
|
8
|
+
|
|
9
|
+
**You want this when:** your team runs one or more AI coding agents
|
|
10
|
+
(Claude Code, Cursor, Codex, Copilot, Gemini, Windsurf, Aider,
|
|
11
|
+
OpenCode) against a real repository and you want to catch the
|
|
12
|
+
"silent mismatch" class of problems where your agent's declared
|
|
13
|
+
context diverges from your actual code.
|
|
14
|
+
|
|
15
|
+
**You don't want this when:** your goal is general-purpose code
|
|
16
|
+
security. For that, pair NERVIQ with a dedicated tool (Semgrep,
|
|
17
|
+
CodeQL, gitleaks, Dependabot). NERVIQ is not a SAST tool and has
|
|
18
|
+
never claimed to be.
|
|
19
|
+
|
|
20
|
+
## What it catches - by example
|
|
21
|
+
|
|
22
|
+
### 1. Your agent config points at a file that doesn't exist
|
|
23
|
+
|
|
24
|
+
```markdown
|
|
25
|
+
<!-- CLAUDE.md -->
|
|
26
|
+
## Security model
|
|
27
|
+
|
|
28
|
+
See [docs/SECURITY.md](./docs/SECURITY.md) for how we handle
|
|
29
|
+
secrets and compliance.
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
But `docs/SECURITY.md` doesn't exist. Claude Code follows the link,
|
|
33
|
+
finds nothing, and quietly works with incomplete context. Every
|
|
34
|
+
session.
|
|
35
|
+
|
|
36
|
+
NERVIQ flags: `agent-config-missing-file: CLAUDE.md references
|
|
37
|
+
docs/SECURITY.md but the file is missing. Agent guidance is
|
|
38
|
+
incomplete.`
|
|
39
|
+
|
|
40
|
+
### 2. Your agent config contradicts your actual codebase
|
|
41
|
+
|
|
42
|
+
```markdown
|
|
43
|
+
<!-- CLAUDE.md -->
|
|
44
|
+
This is a Go microservice. Run `go test ./...` before committing.
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The repo is actually Python. There is no `go.mod`. Claude
|
|
48
|
+
recommends Go tooling forever.
|
|
49
|
+
|
|
50
|
+
NERVIQ flags: `agent-config-stack-contradiction: CLAUDE.md declares
|
|
51
|
+
primary stack as "Go" but the repo contains Python signals
|
|
52
|
+
(pyproject.toml, 47 .py files) and no Go signals.`
|
|
53
|
+
|
|
54
|
+
### 3. Two agents get contradictory instructions
|
|
55
|
+
|
|
56
|
+
- `.cursor/rules/main.mdc`: "Use TypeScript strict mode."
|
|
57
|
+
- `CLAUDE.md`: "This is a pure JavaScript project."
|
|
58
|
+
|
|
59
|
+
Each agent does something slightly different. Teams hit drift
|
|
60
|
+
they can't explain.
|
|
61
|
+
|
|
62
|
+
NERVIQ flags: `agent-config-cross-platform-drift: CLAUDE.md and
|
|
63
|
+
.cursor/rules/main.mdc disagree on primary language.`
|
|
64
|
+
|
|
65
|
+
### 4. Your MCP server has no permission boundary
|
|
66
|
+
|
|
67
|
+
```json
|
|
68
|
+
// .claude/settings.json
|
|
69
|
+
{
|
|
70
|
+
"mcpServers": {
|
|
71
|
+
"shell": {
|
|
72
|
+
"command": "node",
|
|
73
|
+
"args": ["./scripts/shell-mcp.js"],
|
|
74
|
+
"permissions": []
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
`permissions: []` is empty. The MCP server can run anything.
|
|
81
|
+
|
|
82
|
+
NERVIQ flags: `mcp-server-no-allowlist: MCP server "shell" in
|
|
83
|
+
.claude/settings.json has empty permissions - full access, no
|
|
84
|
+
allowlist. Review and add an allow-list.`
|
|
85
|
+
|
|
86
|
+
### 5. Your hook script is referenced but missing
|
|
87
|
+
|
|
88
|
+
```json
|
|
89
|
+
// .claude/settings.json
|
|
90
|
+
{
|
|
91
|
+
"hooks": {
|
|
92
|
+
"PreToolUse": [{
|
|
93
|
+
"hooks": [{
|
|
94
|
+
"type": "command",
|
|
95
|
+
"command": ".claude/hooks/pre-commit.sh"
|
|
96
|
+
}]
|
|
97
|
+
}]
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
The file `.claude/hooks/pre-commit.sh` doesn't exist. Every pre-tool
|
|
103
|
+
hook silently fails and Claude proceeds anyway.
|
|
104
|
+
|
|
105
|
+
NERVIQ flags: `hook-script-missing: .claude/settings.json declares a
|
|
106
|
+
PreToolUse hook at .claude/hooks/pre-commit.sh, but the file is
|
|
107
|
+
missing. Hook is silently skipped.`
|
|
108
|
+
|
|
109
|
+
### 6. A secret ended up in an agent-config file
|
|
110
|
+
|
|
111
|
+
```markdown
|
|
112
|
+
<!-- CLAUDE.md -->
|
|
113
|
+
## Testing
|
|
114
|
+
|
|
115
115
|
For local smoke tests, use this Stripe test key:
|
|
116
116
|
sk_live_<redacted-example>
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
That key made it into Git history inside `CLAUDE.md` specifically.
|
|
120
|
-
NERVIQ catches secrets inside agent-config files because that's
|
|
121
|
-
where we uniquely see them - not as a general secret scanner,
|
|
122
|
-
which you should already be running.
|
|
123
|
-
|
|
124
|
-
NERVIQ flags: `agent-config-secret-literal: CLAUDE.md contains a
|
|
125
|
-
Stripe-live-key shape on line 42. Rotate the key and remove from
|
|
126
|
-
history.`
|
|
127
|
-
|
|
128
|
-
### 7. Your config uses keys the platform removed
|
|
129
|
-
|
|
130
|
-
```yaml
|
|
131
|
-
# .aider.conf.yml
|
|
132
|
-
auto-commit: true
|
|
133
|
-
weak-model: gpt-3.5-turbo
|
|
134
|
-
```
|
|
135
|
-
|
|
136
|
-
Aider 0.60 removed `auto-commit`. It is silently ignored. You
|
|
137
|
-
believe your repo has auto-commit, but it does not.
|
|
138
|
-
|
|
139
|
-
NERVIQ flags: `agent-config-deprecated-keys: .aider.conf.yml uses
|
|
140
|
-
"auto-commit" (removed in Aider 0.60+). Config key is silently
|
|
141
|
-
ignored.`
|
|
142
|
-
|
|
143
|
-
### 8. Auto-approval on a destructive pattern
|
|
144
|
-
|
|
145
|
-
```json
|
|
146
|
-
// .claude/settings.json
|
|
147
|
-
{
|
|
148
|
-
"permissions": {
|
|
149
|
-
"allow": [
|
|
150
|
-
"Bash(npm test *)",
|
|
151
|
-
"Bash(rm -rf *)"
|
|
152
|
-
]
|
|
153
|
-
}
|
|
154
|
-
}
|
|
155
|
-
```
|
|
156
|
-
|
|
157
|
-
`rm -rf *` is pre-approved. An agent loop deciding to "clean up"
|
|
158
|
-
can now do so without asking.
|
|
159
|
-
|
|
160
|
-
NERVIQ flags: `agent-config-dangerous-autoapprove: .claude/settings.json
|
|
161
|
-
allow-list contains "Bash(rm -rf *)". This pattern is pre-approved
|
|
162
|
-
and cannot be revoked per-invocation.`
|
|
163
|
-
|
|
164
|
-
## What this mode explicitly does not catch
|
|
165
|
-
|
|
166
|
-
For each of these, use the right tool. NERVIQ deliberately does
|
|
167
|
-
not try to be "everything."
|
|
168
|
-
|
|
169
|
-
| You need this | Use this, not NERVIQ |
|
|
170
|
-
|---|---|
|
|
171
|
-
| Find SQL injection, XSS, SSRF, open redirects in source | Semgrep, CodeQL |
|
|
172
|
-
| Language-level code smells, style, complexity | ESLint, Bandit, rubocop, etc. |
|
|
173
|
-
| Full secret scanning across repo + git history | gitleaks, truffleHog |
|
|
174
|
-
| Dependency CVEs | Dependabot, Snyk, OSV |
|
|
175
|
-
| Compliance (SOC 2 / PCI / HIPAA / ISO 27001) | a compliance platform |
|
|
176
|
-
| Runtime exploitation / DAST | a DAST tool |
|
|
177
|
-
|
|
178
|
-
NERVIQ's job is the agent-configuration <-> codebase bridge. That's
|
|
179
|
-
what we uniquely see. The 8 patterns above reflect the real trust
|
|
180
|
-
breaks we've observed in the 2026-04-08 UAT evaluations and across
|
|
181
|
-
the 61-repo PP-08 corpus.
|
|
182
|
-
|
|
183
|
-
## How to run it
|
|
184
|
-
|
|
185
|
-
```bash
|
|
186
|
-
# Full audit + shallow risk (recommended)
|
|
187
|
-
npx @nerviq/cli audit --shallow-risk
|
|
188
|
-
|
|
189
|
-
# Shallow risk only (fast precommit hook)
|
|
190
|
-
npx @nerviq/cli audit --shallow-risk-only
|
|
191
|
-
|
|
192
|
-
# Skip it entirely (default; no flag needed)
|
|
193
|
-
npx @nerviq/cli audit
|
|
194
|
-
|
|
195
|
-
# Emergency disable (overrides any flag):
|
|
196
|
-
NERVIQ_SHALLOW_RISK=off npx @nerviq/cli audit --shallow-risk
|
|
197
|
-
```
|
|
198
|
-
|
|
199
|
-
### In CI, as a PR comment
|
|
200
|
-
|
|
201
|
-
```yaml
|
|
202
|
-
- run: npx @nerviq/cli audit --shallow-risk --format=markdown --out audit.md
|
|
203
|
-
- uses: marocchino/sticky-pull-request-comment@v2
|
|
204
|
-
with:
|
|
205
|
-
path: audit.md
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
Shallow-risk findings are rendered in their own `### Shallow Risk`
|
|
209
|
-
section with the experimental banner - clearly distinguished from
|
|
210
|
-
the governance audit output so reviewers know what they're looking
|
|
211
|
-
at.
|
|
212
|
-
|
|
213
|
-
## Status: Experimental
|
|
214
|
-
|
|
215
|
-
The 2026-04-14 initial release ships with 8 patterns. We are
|
|
216
|
-
deliberately holding 2 of the 10 reserved slots empty until 30
|
|
217
|
-
days of real user telemetry tells us which patterns users most
|
|
218
|
-
wanted that we didn't anticipate.
|
|
219
|
-
|
|
220
|
-
The feature graduates:
|
|
221
|
-
- **Experimental -> Beta**: after 30 days of usage telemetry with
|
|
222
|
-
zero critical corpus-level false positives reported, and at
|
|
223
|
-
least one external user reporting that a pattern caught a real
|
|
224
|
-
issue.
|
|
225
|
-
- **Beta -> GA**: after 50+ weekly active audits across 5 or more
|
|
226
|
-
distinct repos by real users.
|
|
227
|
-
|
|
228
|
-
## Feedback
|
|
229
|
-
|
|
230
|
-
Run `nerviq feedback` to send us a short note if a shallow-risk
|
|
231
|
-
finding was wrong (false positive) or if we missed something
|
|
232
|
-
obvious we should catch. We read every one. The initial pattern
|
|
233
|
-
set was picked from real UAT evaluations; the reserved slots are
|
|
234
|
-
explicitly waiting for real-user signal to fill.
|
|
235
|
-
|
|
236
|
-
## Why "shallow"?
|
|
237
|
-
|
|
238
|
-
Because the patterns are deliberately simple - file existence,
|
|
239
|
-
key presence, regex match against agent-config files. No
|
|
240
|
-
dataflow, no control-flow, no runtime. If the patterns were
|
|
241
|
-
deep, we'd be Semgrep or CodeQL, and we're not.
|
|
242
|
-
|
|
243
|
-
NERVIQ is sharp on the agent-governance lane. Shallow-risk is
|
|
244
|
-
the opt-in extension that catches the obvious mismatches at the
|
|
245
|
-
edge of that lane - the places users have told us trust breaks
|
|
246
|
-
first.
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
That key made it into Git history inside `CLAUDE.md` specifically.
|
|
120
|
+
NERVIQ catches secrets inside agent-config files because that's
|
|
121
|
+
where we uniquely see them - not as a general secret scanner,
|
|
122
|
+
which you should already be running.
|
|
123
|
+
|
|
124
|
+
NERVIQ flags: `agent-config-secret-literal: CLAUDE.md contains a
|
|
125
|
+
Stripe-live-key shape on line 42. Rotate the key and remove from
|
|
126
|
+
history.`
|
|
127
|
+
|
|
128
|
+
### 7. Your config uses keys the platform removed
|
|
129
|
+
|
|
130
|
+
```yaml
|
|
131
|
+
# .aider.conf.yml
|
|
132
|
+
auto-commit: true
|
|
133
|
+
weak-model: gpt-3.5-turbo
|
|
134
|
+
```
|
|
135
|
+
|
|
136
|
+
Aider 0.60 removed `auto-commit`. It is silently ignored. You
|
|
137
|
+
believe your repo has auto-commit, but it does not.
|
|
138
|
+
|
|
139
|
+
NERVIQ flags: `agent-config-deprecated-keys: .aider.conf.yml uses
|
|
140
|
+
"auto-commit" (removed in Aider 0.60+). Config key is silently
|
|
141
|
+
ignored.`
|
|
142
|
+
|
|
143
|
+
### 8. Auto-approval on a destructive pattern
|
|
144
|
+
|
|
145
|
+
```json
|
|
146
|
+
// .claude/settings.json
|
|
147
|
+
{
|
|
148
|
+
"permissions": {
|
|
149
|
+
"allow": [
|
|
150
|
+
"Bash(npm test *)",
|
|
151
|
+
"Bash(rm -rf *)"
|
|
152
|
+
]
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
`rm -rf *` is pre-approved. An agent loop deciding to "clean up"
|
|
158
|
+
can now do so without asking.
|
|
159
|
+
|
|
160
|
+
NERVIQ flags: `agent-config-dangerous-autoapprove: .claude/settings.json
|
|
161
|
+
allow-list contains "Bash(rm -rf *)". This pattern is pre-approved
|
|
162
|
+
and cannot be revoked per-invocation.`
|
|
163
|
+
|
|
164
|
+
## What this mode explicitly does not catch
|
|
165
|
+
|
|
166
|
+
For each of these, use the right tool. NERVIQ deliberately does
|
|
167
|
+
not try to be "everything."
|
|
168
|
+
|
|
169
|
+
| You need this | Use this, not NERVIQ |
|
|
170
|
+
|---|---|
|
|
171
|
+
| Find SQL injection, XSS, SSRF, open redirects in source | Semgrep, CodeQL |
|
|
172
|
+
| Language-level code smells, style, complexity | ESLint, Bandit, rubocop, etc. |
|
|
173
|
+
| Full secret scanning across repo + git history | gitleaks, truffleHog |
|
|
174
|
+
| Dependency CVEs | Dependabot, Snyk, OSV |
|
|
175
|
+
| Compliance (SOC 2 / PCI / HIPAA / ISO 27001) | a compliance platform |
|
|
176
|
+
| Runtime exploitation / DAST | a DAST tool |
|
|
177
|
+
|
|
178
|
+
NERVIQ's job is the agent-configuration <-> codebase bridge. That's
|
|
179
|
+
what we uniquely see. The 8 patterns above reflect the real trust
|
|
180
|
+
breaks we've observed in the 2026-04-08 UAT evaluations and across
|
|
181
|
+
the 61-repo PP-08 corpus.
|
|
182
|
+
|
|
183
|
+
## How to run it
|
|
184
|
+
|
|
185
|
+
```bash
|
|
186
|
+
# Full audit + shallow risk (recommended)
|
|
187
|
+
npx @nerviq/cli audit --shallow-risk
|
|
188
|
+
|
|
189
|
+
# Shallow risk only (fast precommit hook)
|
|
190
|
+
npx @nerviq/cli audit --shallow-risk-only
|
|
191
|
+
|
|
192
|
+
# Skip it entirely (default; no flag needed)
|
|
193
|
+
npx @nerviq/cli audit
|
|
194
|
+
|
|
195
|
+
# Emergency disable (overrides any flag):
|
|
196
|
+
NERVIQ_SHALLOW_RISK=off npx @nerviq/cli audit --shallow-risk
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
### In CI, as a PR comment
|
|
200
|
+
|
|
201
|
+
```yaml
|
|
202
|
+
- run: npx @nerviq/cli audit --shallow-risk --format=markdown --out audit.md
|
|
203
|
+
- uses: marocchino/sticky-pull-request-comment@v2
|
|
204
|
+
with:
|
|
205
|
+
path: audit.md
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
Shallow-risk findings are rendered in their own `### Shallow Risk`
|
|
209
|
+
section with the experimental banner - clearly distinguished from
|
|
210
|
+
the governance audit output so reviewers know what they're looking
|
|
211
|
+
at.
|
|
212
|
+
|
|
213
|
+
## Status: Experimental
|
|
214
|
+
|
|
215
|
+
The 2026-04-14 initial release ships with 8 patterns. We are
|
|
216
|
+
deliberately holding 2 of the 10 reserved slots empty until 30
|
|
217
|
+
days of real user telemetry tells us which patterns users most
|
|
218
|
+
wanted that we didn't anticipate.
|
|
219
|
+
|
|
220
|
+
The feature graduates:
|
|
221
|
+
- **Experimental -> Beta**: after 30 days of usage telemetry with
|
|
222
|
+
zero critical corpus-level false positives reported, and at
|
|
223
|
+
least one external user reporting that a pattern caught a real
|
|
224
|
+
issue.
|
|
225
|
+
- **Beta -> GA**: after 50+ weekly active audits across 5 or more
|
|
226
|
+
distinct repos by real users.
|
|
227
|
+
|
|
228
|
+
## Feedback
|
|
229
|
+
|
|
230
|
+
Run `nerviq feedback` to send us a short note if a shallow-risk
|
|
231
|
+
finding was wrong (false positive) or if we missed something
|
|
232
|
+
obvious we should catch. We read every one. The initial pattern
|
|
233
|
+
set was picked from real UAT evaluations; the reserved slots are
|
|
234
|
+
explicitly waiting for real-user signal to fill.
|
|
235
|
+
|
|
236
|
+
## Why "shallow"?
|
|
237
|
+
|
|
238
|
+
Because the patterns are deliberately simple - file existence,
|
|
239
|
+
key presence, regex match against agent-config files. No
|
|
240
|
+
dataflow, no control-flow, no runtime. If the patterns were
|
|
241
|
+
deep, we'd be Semgrep or CodeQL, and we're not.
|
|
242
|
+
|
|
243
|
+
NERVIQ is sharp on the agent-governance lane. Shallow-risk is
|
|
244
|
+
the opt-in extension that catches the obvious mismatches at the
|
|
245
|
+
edge of that lane - the places users have told us trust breaks
|
|
246
|
+
first.
|
package/docs/why-nerviq.md
CHANGED
|
@@ -1,82 +1,82 @@
|
|
|
1
|
-
# Why Nerviq
|
|
2
|
-
|
|
3
|
-
> Vendors govern their own agent. Nerviq governs ALL your agents.
|
|
4
|
-
|
|
5
|
-
Nerviq is AI agent governance and configuration intelligence for repositories using modern coding agents. It does **not** replace SAST, secret scanning, or deep application code review.
|
|
6
|
-
|
|
7
|
-
---
|
|
8
|
-
|
|
9
|
-
## The Problem
|
|
10
|
-
|
|
11
|
-
Your team uses Claude Code, Cursor, and Copilot in the same repo. Each has its own config format, its own rules syntax, and its own way of handling permissions. Without governance:
|
|
12
|
-
|
|
13
|
-
- **Config drift** — CLAUDE.md says "never modify tests", .cursorrules says nothing about it
|
|
14
|
-
- **Security gaps** — Copilot has deny rules, but your Gemini setup doesn't
|
|
15
|
-
- **Invisible standards** — New team members don't know which agent is configured for what
|
|
16
|
-
- **No audit trail** — Nobody knows when configs changed or why scores dropped
|
|
17
|
-
|
|
18
|
-
## Why Not Just Manage It Manually?
|
|
19
|
-
|
|
20
|
-
| | Manual | Nerviq |
|
|
21
|
-
|---|---|---|
|
|
22
|
-
| Time to audit 8 platforms | Hours | 30 seconds |
|
|
23
|
-
| Drift detection | None | Automatic |
|
|
24
|
-
| Cross-platform sync | Copy-paste | `nerviq harmony-sync` |
|
|
25
|
-
| Rollback on mistake | Hope you have git stash | `nerviq rollback` |
|
|
26
|
-
| CI enforcement | Custom scripts | One-line GitHub Action |
|
|
27
|
-
| Score trending | Spreadsheet | `nerviq history` |
|
|
28
|
-
|
|
29
|
-
## Why Not Use Platform-Native Tools?
|
|
30
|
-
|
|
31
|
-
GitHub governs Copilot. Anthropic governs Claude. Google governs Gemini.
|
|
32
|
-
|
|
33
|
-
**None of them will govern their competitor's agent.**
|
|
34
|
-
|
|
35
|
-
Nerviq is the only tool that sits above all 8 platforms and provides:
|
|
36
|
-
- Unified scoring (0-100) across every platform
|
|
37
|
-
- Cross-platform drift detection (Harmony)
|
|
38
|
-
- Multi-agent synergy analysis (Synergy — Experimental)
|
|
39
|
-
- One config standard, 8 platform outputs
|
|
40
|
-
|
|
41
|
-
## Why Not Semgrep / Snyk / Security Scanners?
|
|
42
|
-
|
|
43
|
-
Different category entirely. Semgrep scans **code** for vulnerabilities. Nerviq scans **agent configurations** for governance gaps.
|
|
44
|
-
|
|
45
|
-
Semgrep won't tell you that your CLAUDE.md is missing verification commands, or that your .cursorrules conflict with your AGENTS.md, or that your Copilot setup lacks deny rules.
|
|
46
|
-
|
|
47
|
-
## Three Use Cases
|
|
48
|
-
|
|
49
|
-
### Solo Developer
|
|
50
|
-
```bash
|
|
51
|
-
npx @nerviq/cli audit # See your score
|
|
52
|
-
npx @nerviq/cli augment # Get improvement plan
|
|
53
|
-
npx @nerviq/cli benchmark # Measure the difference
|
|
54
|
-
```
|
|
55
|
-
**Result:** Better-configured AI agents → better code output → fewer mistakes.
|
|
56
|
-
|
|
57
|
-
### Team Lead / DevEx
|
|
58
|
-
```bash
|
|
59
|
-
npx @nerviq/cli governance # Set team policies
|
|
60
|
-
npx @nerviq/cli audit --json # Pipe to CI
|
|
61
|
-
```
|
|
62
|
-
**Result:** Consistent agent behavior across the team. No more "works on my machine" for AI configs.
|
|
63
|
-
|
|
64
|
-
### Enterprise / Platform Engineering
|
|
65
|
-
```bash
|
|
66
|
-
npx @nerviq/cli harmony-audit # Cross-platform health
|
|
67
|
-
npx @nerviq/cli harmony-drift # Detect drift
|
|
68
|
-
npx @nerviq/cli harmony-governance # Unified policies
|
|
69
|
-
```
|
|
70
|
-
**Result:** Governance, compliance, and audit trails for AI agent operations at scale.
|
|
71
|
-
|
|
72
|
-
## The Numbers
|
|
73
|
-
|
|
74
|
-
- **2,441 checks** across 8 platforms (~300 unique governance rules adapted per platform) and 10 languages
|
|
75
|
-
- **Every check** has a source URL, confidence score, and freshness date
|
|
76
|
-
- **90-day freshness cycle** — stale checks are re-verified or removed
|
|
77
|
-
- **Zero dependencies** — nothing to audit in the supply chain
|
|
78
|
-
- **Runs locally** — your code never leaves your machine
|
|
79
|
-
|
|
80
|
-
---
|
|
81
|
-
|
|
82
|
-
[Get started](https://github.com/nerviq/nerviq) | [Documentation](https://nerviq.net) | [Discord](https://discord.gg/nerviq)
|
|
1
|
+
# Why Nerviq
|
|
2
|
+
|
|
3
|
+
> Vendors govern their own agent. Nerviq governs ALL your agents.
|
|
4
|
+
|
|
5
|
+
Nerviq is AI agent governance and configuration intelligence for repositories using modern coding agents. It does **not** replace SAST, secret scanning, or deep application code review.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## The Problem
|
|
10
|
+
|
|
11
|
+
Your team uses Claude Code, Cursor, and Copilot in the same repo. Each has its own config format, its own rules syntax, and its own way of handling permissions. Without governance:
|
|
12
|
+
|
|
13
|
+
- **Config drift** — CLAUDE.md says "never modify tests", .cursorrules says nothing about it
|
|
14
|
+
- **Security gaps** — Copilot has deny rules, but your Gemini setup doesn't
|
|
15
|
+
- **Invisible standards** — New team members don't know which agent is configured for what
|
|
16
|
+
- **No audit trail** — Nobody knows when configs changed or why scores dropped
|
|
17
|
+
|
|
18
|
+
## Why Not Just Manage It Manually?
|
|
19
|
+
|
|
20
|
+
| | Manual | Nerviq |
|
|
21
|
+
|---|---|---|
|
|
22
|
+
| Time to audit 8 platforms | Hours | 30 seconds |
|
|
23
|
+
| Drift detection | None | Automatic |
|
|
24
|
+
| Cross-platform sync | Copy-paste | `nerviq harmony-sync` |
|
|
25
|
+
| Rollback on mistake | Hope you have git stash | `nerviq rollback` |
|
|
26
|
+
| CI enforcement | Custom scripts | One-line GitHub Action |
|
|
27
|
+
| Score trending | Spreadsheet | `nerviq history` |
|
|
28
|
+
|
|
29
|
+
## Why Not Use Platform-Native Tools?
|
|
30
|
+
|
|
31
|
+
GitHub governs Copilot. Anthropic governs Claude. Google governs Gemini.
|
|
32
|
+
|
|
33
|
+
**None of them will govern their competitor's agent.**
|
|
34
|
+
|
|
35
|
+
Nerviq is the only tool that sits above all 8 platforms and provides:
|
|
36
|
+
- Unified scoring (0-100) across every platform
|
|
37
|
+
- Cross-platform drift detection (Harmony)
|
|
38
|
+
- Multi-agent synergy analysis (Synergy — Experimental)
|
|
39
|
+
- One config standard, 8 platform outputs
|
|
40
|
+
|
|
41
|
+
## Why Not Semgrep / Snyk / Security Scanners?
|
|
42
|
+
|
|
43
|
+
Different category entirely. Semgrep scans **code** for vulnerabilities. Nerviq scans **agent configurations** for governance gaps.
|
|
44
|
+
|
|
45
|
+
Semgrep won't tell you that your CLAUDE.md is missing verification commands, or that your .cursorrules conflict with your AGENTS.md, or that your Copilot setup lacks deny rules.
|
|
46
|
+
|
|
47
|
+
## Three Use Cases
|
|
48
|
+
|
|
49
|
+
### Solo Developer
|
|
50
|
+
```bash
|
|
51
|
+
npx @nerviq/cli audit # See your score
|
|
52
|
+
npx @nerviq/cli augment # Get improvement plan
|
|
53
|
+
npx @nerviq/cli benchmark # Measure the difference
|
|
54
|
+
```
|
|
55
|
+
**Result:** Better-configured AI agents → better code output → fewer mistakes.
|
|
56
|
+
|
|
57
|
+
### Team Lead / DevEx
|
|
58
|
+
```bash
|
|
59
|
+
npx @nerviq/cli governance # Set team policies
|
|
60
|
+
npx @nerviq/cli audit --json # Pipe to CI
|
|
61
|
+
```
|
|
62
|
+
**Result:** Consistent agent behavior across the team. No more "works on my machine" for AI configs.
|
|
63
|
+
|
|
64
|
+
### Enterprise / Platform Engineering
|
|
65
|
+
```bash
|
|
66
|
+
npx @nerviq/cli harmony-audit # Cross-platform health
|
|
67
|
+
npx @nerviq/cli harmony-drift # Detect drift
|
|
68
|
+
npx @nerviq/cli harmony-governance # Unified policies
|
|
69
|
+
```
|
|
70
|
+
**Result:** Governance, compliance, and audit trails for AI agent operations at scale.
|
|
71
|
+
|
|
72
|
+
## The Numbers
|
|
73
|
+
|
|
74
|
+
- **2,441 checks** across 8 platforms (~300 unique governance rules adapted per platform) and 10 languages
|
|
75
|
+
- **Every check** has a source URL, confidence score, and freshness date
|
|
76
|
+
- **90-day freshness cycle** — stale checks are re-verified or removed
|
|
77
|
+
- **Zero dependencies** — nothing to audit in the supply chain
|
|
78
|
+
- **Runs locally** — your code never leaves your machine
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
[Get started](https://github.com/nerviq/nerviq) | [Documentation](https://nerviq.net) | [Discord](https://discord.gg/nerviq)
|