aislop 0.9.4 → 0.9.5
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 +50 -3
- package/dist/cli.js +1034 -62
- package/dist/{version-C45P3Q1N.js → engine-info-DCvIfZ0f.js} +1 -5
- package/dist/index.d.ts +6 -0
- package/dist/index.js +758 -51
- package/dist/{json-CXiEvR_M.js → json-CZU3lEfE.js} +2 -1
- package/dist/mcp.js +653 -39
- package/dist/sarif-CZVuavf_.js +61 -0
- package/dist/sarif-Cneulb6L.js +60 -0
- package/dist/version-ls3wZmOU.js +5 -0
- package/package.json +3 -2
- package/scripts/gen-config-schema.mjs +35 -0
- /package/dist/{expo-doctor-Bz0LZhQ6.js → expo-doctor-BcIkOte5.js} +0 -0
- /package/dist/{generic-BrcWMW7E.js → generic-D_T4cUaC.js} +0 -0
- /package/dist/{typecheck-XJMuCczG.js → typecheck-DQSzG8fX.js} +0 -0
package/README.md
CHANGED
|
@@ -77,6 +77,7 @@ npx aislop scan ./src # specific directory
|
|
|
77
77
|
npx aislop scan --changes # changed files from HEAD
|
|
78
78
|
npx aislop scan --staged # staged files only
|
|
79
79
|
npx aislop scan --json # JSON output
|
|
80
|
+
npx aislop scan --sarif # SARIF 2.1.0 output (GitHub code scanning)
|
|
80
81
|
```
|
|
81
82
|
|
|
82
83
|
**Exclude files**: `node_modules`, `.git`, `dist`, `build`, `coverage` excluded by default. Add more in `.aislop/config.yml`:
|
|
@@ -89,6 +90,18 @@ exclude:
|
|
|
89
90
|
|
|
90
91
|
Or via CLI: `npx aislop scan --exclude "**/*.test.ts,dist"`
|
|
91
92
|
|
|
93
|
+
**Per-rule severity**: Override the severity of any rule by id, or turn it off:
|
|
94
|
+
|
|
95
|
+
```yaml
|
|
96
|
+
# .aislop/config.yml
|
|
97
|
+
rules:
|
|
98
|
+
ai-slop/narrative-comment: warning # error | warning | off
|
|
99
|
+
ai-slop/trivial-comment: "off" # drop this rule entirely
|
|
100
|
+
security/hardcoded-secret: error
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
`off` drops matching diagnostics; `error`/`warning` rewrites severity before scoring and reporting. Absent map keeps default behavior.
|
|
104
|
+
|
|
92
105
|
**Extend config**: Project config can extend a parent:
|
|
93
106
|
|
|
94
107
|
```yaml
|
|
@@ -98,6 +111,8 @@ ci:
|
|
|
98
111
|
failBelow: 80 # override specific keys
|
|
99
112
|
```
|
|
100
113
|
|
|
114
|
+
**Editor validation**: Point your editor at the JSON Schema in [`schema/aislop.config.schema.json`](schema/aislop.config.schema.json) for autocomplete and validation of `.aislop/config.yml`. Regenerate it from the source config schema with `pnpm gen:schema`.
|
|
115
|
+
|
|
101
116
|
### Fix
|
|
102
117
|
|
|
103
118
|
Auto-fix what's mechanical (formatters, unused imports, dead code). For issues that need context, hand off to your agent with full diagnostic info.
|
|
@@ -116,7 +131,7 @@ npx aislop fix --claude # Claude Code
|
|
|
116
131
|
npx aislop fix --cursor # Cursor (copies to clipboard)
|
|
117
132
|
npx aislop fix --gemini # Gemini CLI
|
|
118
133
|
npx aislop fix --codex # Codex CLI
|
|
119
|
-
# Also: --windsurf, --amp, --aider, --goose, --opencode, --warp, --kimi, --antigravity, --deep-agents, --vscode
|
|
134
|
+
# Also: --windsurf, --amp, --aider, --goose, --pi, --crush, --opencode, --warp, --kimi, --antigravity, --deep-agents, --vscode
|
|
120
135
|
npx aislop fix --prompt # print prompt (agent-agnostic)
|
|
121
136
|
```
|
|
122
137
|
|
|
@@ -128,11 +143,12 @@ Runs after every agent edit. Feedback flows back immediately.
|
|
|
128
143
|
npx aislop hook install --claude # Claude Code
|
|
129
144
|
npx aislop hook install --cursor # Cursor
|
|
130
145
|
npx aislop hook install --gemini # Gemini CLI
|
|
146
|
+
npx aislop hook install --pi # pi
|
|
131
147
|
npx aislop hook install # all supported agents
|
|
132
148
|
npx aislop hook install claude cursor # specific agents
|
|
133
149
|
```
|
|
134
150
|
|
|
135
|
-
**Runtime adapters** (scan + feedback): `claude`, `cursor`, `gemini`.
|
|
151
|
+
**Runtime adapters** (scan + feedback): `claude`, `cursor`, `gemini`, `pi`.
|
|
136
152
|
**Rules-only** (agent reads rules): `codex`, `windsurf`, `cline`, `kilocode`, `antigravity`, `copilot`.
|
|
137
153
|
|
|
138
154
|
**Quality-gate mode**: Blocks if score regresses below baseline.
|
|
@@ -177,9 +193,12 @@ npx aislop init # create .aislop/config.yml
|
|
|
177
193
|
npx aislop init --strict # enterprise-grade gate: all engines, typecheck, failBelow 85
|
|
178
194
|
npx aislop rules # list rules
|
|
179
195
|
npx aislop badge # print badge URL
|
|
196
|
+
npx aislop trend # show score history over time
|
|
180
197
|
npx aislop # interactive menu
|
|
181
198
|
```
|
|
182
199
|
|
|
200
|
+
**Score history**: a normal (full-project, interactive) `scan` appends a compact record to `.aislop/history.jsonl` (timestamp, score, error/warning counts, file count, CLI version). `aislop trend` reads it and prints a table plus an ASCII sparkline of recent scores. History is a local side effect only: it is never written for `--json`/`--sarif` output, in CI, or when `AISLOP_NO_HISTORY=1` is set, so machine output stays clean.
|
|
201
|
+
|
|
183
202
|
Docs: [commands](docs/commands.md)
|
|
184
203
|
|
|
185
204
|
---
|
|
@@ -188,10 +207,23 @@ Docs: [commands](docs/commands.md)
|
|
|
188
207
|
|
|
189
208
|
### Pre-commit
|
|
190
209
|
|
|
210
|
+
Run directly on staged files:
|
|
211
|
+
|
|
191
212
|
```bash
|
|
192
213
|
npx aislop scan --staged
|
|
193
214
|
```
|
|
194
215
|
|
|
216
|
+
Or wire it into the [pre-commit](https://pre-commit.com) framework via the bundled hook:
|
|
217
|
+
|
|
218
|
+
```yaml
|
|
219
|
+
# .pre-commit-config.yaml
|
|
220
|
+
repos:
|
|
221
|
+
- repo: https://github.com/scanaislop/aislop
|
|
222
|
+
rev: v0.9.4
|
|
223
|
+
hooks:
|
|
224
|
+
- id: aislop
|
|
225
|
+
```
|
|
226
|
+
|
|
195
227
|
### GitHub Actions
|
|
196
228
|
|
|
197
229
|
Run `npx aislop init` and accept the workflow prompt, or add manually:
|
|
@@ -211,6 +243,15 @@ Run `npx aislop init` and accept the workflow prompt, or add manually:
|
|
|
211
243
|
- uses: scanaislop/aislop@v0.8
|
|
212
244
|
```
|
|
213
245
|
|
|
246
|
+
**GitHub code scanning (SARIF)**: emit a SARIF 2.1.0 report and upload it so findings appear in the Security tab:
|
|
247
|
+
|
|
248
|
+
```yaml
|
|
249
|
+
- run: npx aislop@latest scan . --sarif > aislop.sarif
|
|
250
|
+
- uses: github/codeql-action/upload-sarif@v3
|
|
251
|
+
with:
|
|
252
|
+
sarif_file: aislop.sarif
|
|
253
|
+
```
|
|
254
|
+
|
|
214
255
|
### Quality gate
|
|
215
256
|
|
|
216
257
|
Set minimum score in `.aislop/config.yml`:
|
|
@@ -263,9 +304,15 @@ See the full [rules reference](docs/rules.md).
|
|
|
263
304
|
|
|
264
305
|
---
|
|
265
306
|
|
|
307
|
+
## Research
|
|
308
|
+
|
|
309
|
+
aislop rules are shaped by public scans and benchmark-derived failure modes, not only local fixtures. The [research program](docs/research-program.md) defines how to run repeatable open-source scans: pin the cohort, store raw JSON, classify findings, fix noisy rules with regression tests, and publish the limits.
|
|
310
|
+
|
|
311
|
+
---
|
|
312
|
+
|
|
266
313
|
## Docs
|
|
267
314
|
|
|
268
|
-
[Installation](docs/installation.md) · [Commands](docs/commands.md) · [Rules](docs/rules.md) · [Config](docs/configuration.md) · [Scoring](docs/scoring.md) · [CI/CD](docs/ci.md) · [Telemetry](docs/telemetry.md)
|
|
315
|
+
[Installation](docs/installation.md) · [Commands](docs/commands.md) · [Rules](docs/rules.md) · [Config](docs/configuration.md) · [Scoring](docs/scoring.md) · [CI/CD](docs/ci.md) · [Telemetry](docs/telemetry.md) · [Research program](docs/research-program.md)
|
|
269
316
|
|
|
270
317
|
## Community
|
|
271
318
|
|