aislop 0.5.1 → 0.6.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/README.md +58 -5
- package/dist/cli.js +4337 -2982
- package/dist/index.d.ts +2 -0
- package/dist/index.js +516 -294
- package/dist/{json-D_i2_5_-.js → json-DIW4kCBS.js} +1 -1
- package/dist/{version-CIlgPf8Q.js → version-DukdnmKT.js} +1 -5
- package/package.json +7 -4
- package/scripts/postinstall-tools.mjs +2 -2
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/aislop)
|
|
6
6
|
[](https://www.npmjs.com/package/aislop)
|
|
7
|
-
[](https://github.com/scanaislop/aislop/actions/workflows/ci.yml)
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](https://nodejs.org)
|
|
10
10
|
|
|
@@ -33,6 +33,9 @@ npx aislop fix
|
|
|
33
33
|
|
|
34
34
|
# CI mode (JSON output + quality gate)
|
|
35
35
|
npx aislop ci
|
|
36
|
+
|
|
37
|
+
# wire aislop into your agent so it runs on every edit (new in 0.6.0)
|
|
38
|
+
npx aislop hook install --claude
|
|
36
39
|
```
|
|
37
40
|
|
|
38
41
|
Sample output:
|
|
@@ -43,7 +46,7 @@ Sample output:
|
|
|
43
46
|
[!] Code Quality: done (2 warnings, 812ms)
|
|
44
47
|
[!] AI Slop: done (4 warnings, 455ms)
|
|
45
48
|
[ok] Security: done (0 issues, 1.3s)
|
|
46
|
-
aislop 0.
|
|
49
|
+
aislop 0.6.1 · the quality gate for agentic coding
|
|
47
50
|
|
|
48
51
|
scan · my-app · typescript · 142 files
|
|
49
52
|
|
|
@@ -75,6 +78,7 @@ AI coding tools generate code that compiles and passes tests but ships with patt
|
|
|
75
78
|
|
|
76
79
|
- **One score, one gate**: a 0-100 number you can enforce in CI with `aislop ci`. Weighted so sloppy patterns (dead code, `as any`, swallowed errors) hit harder than style noise.
|
|
77
80
|
- **Auto-fix first, agent second**: `aislop fix` clears what's mechanically safe (formatters, unused imports, trivial comments, dead patterns). For the rest, one flag hands off to Claude Code, Codex, Cursor, Gemini, Windsurf, Amp, Aider, Goose, and 7 more, with full diagnostic context pre-filled.
|
|
81
|
+
- **Wire it into your agent (new in 0.6.0)**: `aislop hook install` plugs aislop into Claude Code, Cursor, Gemini CLI (runtime), plus Codex, Windsurf, Cline, Kilo Code, Antigravity, and Copilot (rules-only). The agent gets score + findings on the turn it wrote the code, not after.
|
|
78
82
|
- **Deterministic**: regex, AST, and standard tooling. No LLMs, no API keys, no network dependency. Same repo in, same score out.
|
|
79
83
|
- **Zero-config start**: `npx aislop scan` works on any repo. Add `.aislop/config.yml` when you want to tune thresholds or enable the architecture engine.
|
|
80
84
|
- **Works across stacks**: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Expo / React Native.
|
|
@@ -115,7 +119,7 @@ pnpm add -D aislop
|
|
|
115
119
|
npm install -g aislop
|
|
116
120
|
```
|
|
117
121
|
|
|
118
|
-
Also available as [`@
|
|
122
|
+
Also available as [`@scanaislop/aislop`](docs/installation.md) on GitHub Packages.
|
|
119
123
|
|
|
120
124
|
---
|
|
121
125
|
|
|
@@ -131,6 +135,25 @@ aislop scan --staged # only staged files (pre-commit)
|
|
|
131
135
|
aislop scan --json # output JSON
|
|
132
136
|
```
|
|
133
137
|
|
|
138
|
+
**Exclude files and directories.** `node_modules`, `.git`, `dist`, `build`, and `coverage` are excluded by default. Add more via `.aislop/config.yml`:
|
|
139
|
+
|
|
140
|
+
```yaml
|
|
141
|
+
exclude:
|
|
142
|
+
- "**/*.test.ts" # globs supported (micromatch)
|
|
143
|
+
- src/generated
|
|
144
|
+
- legacy
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
Or override per-run with `--exclude` (comma-separated or repeatable, stacks on top of the config):
|
|
148
|
+
|
|
149
|
+
```bash
|
|
150
|
+
aislop scan --exclude "**/*.test.ts"
|
|
151
|
+
aislop scan --exclude node_modules,dist,logs
|
|
152
|
+
aislop scan --exclude "src/generated" --exclude "**/*.spec.*"
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
CLI flags beat config; config beats defaults.
|
|
156
|
+
|
|
134
157
|
### Fix issues automatically
|
|
135
158
|
|
|
136
159
|
```bash
|
|
@@ -160,6 +183,35 @@ aislop fix --vscode # VS Code Copilot (copies prompt to clipboard)
|
|
|
160
183
|
aislop fix --prompt # print the prompt (agent-agnostic)
|
|
161
184
|
```
|
|
162
185
|
|
|
186
|
+
### Install as a native hook
|
|
187
|
+
|
|
188
|
+
One command and aislop runs automatically after every agent edit. Findings flow back to the agent as structured feedback (`aislop.hook.v1`) with score, counts, top-20 findings, and next steps, so the agent can self-correct on the same turn.
|
|
189
|
+
|
|
190
|
+
```bash
|
|
191
|
+
aislop hook install --claude # Claude Code PostToolUse
|
|
192
|
+
aislop hook install --cursor # Cursor afterFileEdit
|
|
193
|
+
aislop hook install --gemini # Gemini CLI AfterTool
|
|
194
|
+
aislop hook install # every supported agent at once
|
|
195
|
+
aislop hook install claude cursor # pick any subset as positional args
|
|
196
|
+
aislop hook install --agent claude,cursor # comma-list if you prefer one flag
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Runtime adapters (scan + feedback on every edit): `claude`, `cursor`, `gemini`.
|
|
200
|
+
|
|
201
|
+
Rules-only installers (agent reads rules on every turn): `codex`, `windsurf`, `cline`, `kilocode`, `antigravity`, `copilot`.
|
|
202
|
+
|
|
203
|
+
Opt-in quality-gate mode captures `.aislop/baseline.json` at install time and blocks the Claude Stop hook if the score regresses:
|
|
204
|
+
|
|
205
|
+
```bash
|
|
206
|
+
aislop hook install --claude --quality-gate
|
|
207
|
+
aislop hook baseline # re-capture baseline
|
|
208
|
+
aislop hook status # list installed hooks
|
|
209
|
+
aislop hook uninstall --claude # remove a specific agent
|
|
210
|
+
aislop hook uninstall # remove every aislop entry, sentinel-verified
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
Every install is sentinel-guarded (SHA-256 hash fence) for idempotent re-runs and exact uninstall. Full guide: [`/docs/hooks`](https://scanaislop.com/docs/hooks).
|
|
214
|
+
|
|
163
215
|
### Use in CI pipelines
|
|
164
216
|
|
|
165
217
|
```bash
|
|
@@ -185,6 +237,7 @@ aislop scan
|
|
|
185
237
|
aislop init # create .aislop/config.yml
|
|
186
238
|
aislop doctor # check which tools are available
|
|
187
239
|
aislop rules # list all built-in rules
|
|
240
|
+
aislop hook install # wire aislop into your coding agent
|
|
188
241
|
aislop # interactive menu
|
|
189
242
|
```
|
|
190
243
|
|
|
@@ -218,7 +271,7 @@ Or use the composite action (one-liner):
|
|
|
218
271
|
|
|
219
272
|
```yaml
|
|
220
273
|
- uses: actions/checkout@v4
|
|
221
|
-
- uses:
|
|
274
|
+
- uses: scanaislop/aislop@v0.5
|
|
222
275
|
```
|
|
223
276
|
|
|
224
277
|
### Quality gate
|
|
@@ -277,7 +330,7 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and how to add new
|
|
|
277
330
|
|
|
278
331
|
## Contributors
|
|
279
332
|
|
|
280
|
-
[](https://github.com/scanaislop/aislop/graphs/contributors)
|
|
281
334
|
|
|
282
335
|
## License
|
|
283
336
|
|