aislop 0.4.0 → 0.5.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 +74 -54
- package/dist/cli.js +3755 -1768
- package/dist/{expo-doctor-Cm5892Y8.js → expo-doctor-Bz0LZhQ6.js} +13 -76
- package/dist/generic-BrcWMW7E.js +109 -0
- package/dist/index.d.ts +72 -16
- package/dist/index.js +4549 -2839
- package/dist/{json-L5x3hQdy.js → json-B51etWTw.js} +2 -0
- package/dist/{json-CdzBXUbz.js → json-D_i2_5_-.js} +3 -1
- package/dist/rolldown-runtime-Cbj13DAv.js +20 -0
- package/dist/subprocess-CQUJDGgn.js +59 -0
- package/dist/{engine-info-s7Gy2StX.js → version-CIlgPf8Q.js} +11 -11
- package/package.json +4 -3
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# aislop
|
|
2
2
|
|
|
3
|
-
**
|
|
3
|
+
**The quality gate for agentic coding.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/aislop)
|
|
6
6
|
[](https://www.npmjs.com/package/aislop)
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
[](https://opensource.org/licenses/MIT)
|
|
9
9
|
[](https://nodejs.org)
|
|
10
10
|
|
|
11
|
-
`aislop`
|
|
11
|
+
`aislop` scans the code your agent wrote and gives you one score, 0–100. It rolls formatters, linters, complexity limits, dependency audits, and an AI-slop detector into a single command. It auto-fixes what's safely fixable and hands the rest to your coding agent with full context.
|
|
12
12
|
|
|
13
|
-
Every check is deterministic
|
|
14
|
-
|
|
15
|
-
`aislop` helps teams review AI-assisted code faster by combining formatting, linting, maintainability, pattern detection, architecture checks, and security checks into a single report.
|
|
13
|
+
Every check is deterministic. Regex patterns, AST analysis, and standard tooling (Biome, oxlint, knip, ruff). Same code in, same score out. No API calls, no LLMs, no network dependency (except optional dependency audits). The name refers to what it *catches*.
|
|
16
14
|
|
|
17
15
|
## See it in action
|
|
18
16
|
|
|
@@ -40,25 +38,31 @@ npx aislop ci
|
|
|
40
38
|
Sample output:
|
|
41
39
|
|
|
42
40
|
```text
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
41
|
+
[ok] Formatting: done (0 issues, 426ms)
|
|
42
|
+
[ok] Linting: done (0 issues, 396ms)
|
|
43
|
+
[!] Code Quality: done (2 warnings, 812ms)
|
|
44
|
+
[!] AI Slop: done (4 warnings, 455ms)
|
|
45
|
+
[ok] Security: done (0 issues, 1.3s)
|
|
46
|
+
aislop 0.5.0 · the quality gate for agentic coding
|
|
47
|
+
|
|
48
|
+
scan · my-app · typescript · 142 files
|
|
49
|
+
|
|
50
|
+
> Code Quality
|
|
51
|
+
[WARN] [auto] Unused export (2)
|
|
52
|
+
src/lib/format-bytes.ts:12
|
|
53
|
+
src/utils/retry.ts:8
|
|
54
|
+
|
|
55
|
+
> AI Slop
|
|
56
|
+
[WARN] [auto] Narrative comment block (2)
|
|
57
|
+
src/lib/auth.ts:86
|
|
58
|
+
[WARN] 'as any' bypasses type safety
|
|
59
|
+
src/api/normalize.ts:47
|
|
60
|
+
|
|
61
|
+
87 / 100 Healthy 0 errors · 6 warnings · 4 fixable
|
|
62
|
+
142 files · 5 engines · 1.9s
|
|
63
|
+
|
|
64
|
+
→ Run npx aislop fix to auto-fix 4 issues
|
|
65
|
+
→ Run npx aislop fix --claude to hand off the rest to an agent
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
---
|
|
@@ -67,17 +71,13 @@ Summary
|
|
|
67
71
|
|
|
68
72
|
AI coding tools generate code that compiles and passes tests but ships with patterns no engineer would write: trivial comments, swallowed exceptions, unused imports, `as any` casts, oversized functions, and leftover `console.log` calls. These problems are spread across many files and slip through review.
|
|
69
73
|
|
|
70
|
-
`aislop` gives you one view and one score
|
|
74
|
+
`aislop` gives you one view and one score. Fully deterministic, no AI in the loop.
|
|
71
75
|
|
|
72
|
-
- **One
|
|
73
|
-
- **
|
|
74
|
-
- **
|
|
75
|
-
- **
|
|
76
|
-
- **
|
|
77
|
-
- **Agent handoff**: when auto-fix can't solve it, one flag hands remaining issues to Claude Code, Codex, Cursor, Gemini, Windsurf, Amp, Aider, Goose, and more (14 agents supported)
|
|
78
|
-
- **Software engineering standards**: enforce function/file size limits, nesting limits, dead code cleanup, and safer patterns
|
|
79
|
-
- **Works across stacks**: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Expo/React Native
|
|
80
|
-
- **Zero-config start**: run `npx aislop scan` and get useful output immediately
|
|
76
|
+
- **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
|
+
- **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.
|
|
78
|
+
- **Deterministic**: regex, AST, and standard tooling. No LLMs, no API keys, no network dependency. Same repo in, same score out.
|
|
79
|
+
- **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
|
+
- **Works across stacks**: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Expo / React Native.
|
|
81
81
|
|
|
82
82
|
## What it catches
|
|
83
83
|
|
|
@@ -87,8 +87,8 @@ Six deterministic engines run in parallel:
|
|
|
87
87
|
|---|---|---|
|
|
88
88
|
| **Formatting** | Code style consistency | Biome, ruff, gofmt, cargo fmt, rubocop, php-cs-fixer |
|
|
89
89
|
| **Linting** | Language-specific issues | oxlint, ruff, golangci-lint, clippy, expo-doctor |
|
|
90
|
-
| **Code Quality** | Complexity and dead code | Function/file size limits, deep nesting, unused files/deps (knip) |
|
|
91
|
-
| **
|
|
90
|
+
| **Code Quality** | Complexity and dead code | Function/file size limits, deep nesting, unused files/deps (knip), AST-based unused-declaration removal |
|
|
91
|
+
| **AI Slop** | AI-authored code patterns | Narrative comments, trivial comments, dead patterns, unused imports, `as any`, `console.log` leftovers, TODO stubs, generic names |
|
|
92
92
|
| **Security** | Vulnerabilities and risky code | eval, innerHTML, SQL/shell injection, dependency audits (npm/pip/cargo/govulncheck) |
|
|
93
93
|
| **Architecture** | Structural rules (opt-in) | Custom import bans, layering rules, required patterns |
|
|
94
94
|
|
|
@@ -134,25 +134,21 @@ aislop scan --json # output JSON
|
|
|
134
134
|
### Fix issues automatically
|
|
135
135
|
|
|
136
136
|
```bash
|
|
137
|
-
aislop fix # auto-
|
|
138
|
-
aislop fix -f # aggressive: dependency audit, unused
|
|
139
|
-
aislop fix --claude # hand off remaining issues to Claude Code
|
|
140
|
-
aislop fix --cursor # open Cursor + copy prompt to clipboard
|
|
141
|
-
aislop fix -p # print prompt to paste into any coding agent
|
|
137
|
+
aislop fix # safe auto-fixes: unused imports, formatting, lint
|
|
138
|
+
aislop fix -f # aggressive: dependency audit, unused files, Expo alignment
|
|
142
139
|
```
|
|
143
140
|
|
|
144
141
|
### Hand off to your coding agent
|
|
145
142
|
|
|
146
|
-
When auto-fix can't solve it, aislop generates a prompt with full context and opens your agent:
|
|
143
|
+
When auto-fix can't solve it, aislop generates a prompt with full context and opens your agent. 14 supported:
|
|
147
144
|
|
|
148
145
|
```bash
|
|
149
146
|
aislop fix --claude # Claude Code
|
|
150
147
|
aislop fix --codex # Codex CLI
|
|
151
148
|
aislop fix --cursor # Cursor (copies prompt to clipboard)
|
|
152
|
-
aislop fix --windsurf # Windsurf (copies prompt to clipboard)
|
|
153
149
|
aislop fix --gemini # Gemini CLI
|
|
150
|
+
aislop fix --windsurf # Windsurf (copies prompt to clipboard)
|
|
154
151
|
aislop fix --amp # Amp
|
|
155
|
-
aislop fix --vscode # VS Code (copies prompt to clipboard)
|
|
156
152
|
aislop fix --aider # Aider
|
|
157
153
|
aislop fix --goose # Goose
|
|
158
154
|
aislop fix --opencode # OpenCode
|
|
@@ -160,7 +156,8 @@ aislop fix --warp # Warp
|
|
|
160
156
|
aislop fix --kimi # Kimi Code CLI
|
|
161
157
|
aislop fix --antigravity # Antigravity
|
|
162
158
|
aislop fix --deep-agents # Deep Agents
|
|
163
|
-
aislop fix --
|
|
159
|
+
aislop fix --vscode # VS Code Copilot (copies prompt to clipboard)
|
|
160
|
+
aislop fix --prompt # print the prompt (agent-agnostic)
|
|
164
161
|
```
|
|
165
162
|
|
|
166
163
|
### Use in CI pipelines
|
|
@@ -205,12 +202,23 @@ npx aislop scan --staged
|
|
|
205
202
|
|
|
206
203
|
### GitHub Actions
|
|
207
204
|
|
|
205
|
+
Fastest path: run `npx aislop init` and say yes to "Add a GitHub Actions workflow?". It drops a working `.github/workflows/aislop.yml` for you.
|
|
206
|
+
|
|
207
|
+
Manual form:
|
|
208
|
+
|
|
208
209
|
```yaml
|
|
209
|
-
- uses: actions/
|
|
210
|
+
- uses: actions/checkout@v4
|
|
211
|
+
- uses: actions/setup-node@v4
|
|
210
212
|
with:
|
|
211
213
|
node-version: 20
|
|
212
|
-
- run:
|
|
213
|
-
|
|
214
|
+
- run: npx aislop@latest ci .
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
Or use the composite action (one-liner):
|
|
218
|
+
|
|
219
|
+
```yaml
|
|
220
|
+
- uses: actions/checkout@v4
|
|
221
|
+
- uses: heavykenny/aislop@v0.5
|
|
214
222
|
```
|
|
215
223
|
|
|
216
224
|
### Quality gate
|
|
@@ -240,6 +248,18 @@ ci:
|
|
|
240
248
|
|
|
241
249
|
---
|
|
242
250
|
|
|
251
|
+
## For engineering teams
|
|
252
|
+
|
|
253
|
+
`aislop` runs locally and in your CI. [scanaislop](https://scanaislop.com) is the hosted platform built on top of it for teams that want enforcement without wiring every workflow themselves.
|
|
254
|
+
|
|
255
|
+
- **PR gates on every repo** with a score threshold and block-to-merge
|
|
256
|
+
- **Standards hierarchy**: org baseline, team overrides, project config
|
|
257
|
+
- **Per-team dashboards** and agent attribution over time
|
|
258
|
+
- **Visual rules manager** so engineering leads set standards without editing YAML
|
|
259
|
+
- **Same engines, same rule IDs, same score**. The CLI remains the source of truth.
|
|
260
|
+
|
|
261
|
+
The CLI is MIT-licensed and always will be. [Learn more about the platform →](https://scanaislop.com)
|
|
262
|
+
|
|
243
263
|
## Contributing
|
|
244
264
|
|
|
245
265
|
See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and how to add new rules. AI coding assistants can find project context in [AGENTS.md](AGENTS.md).
|
|
@@ -248,12 +268,12 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and how to add new
|
|
|
248
268
|
|
|
249
269
|
`aislop` is built on top of excellent open-source projects:
|
|
250
270
|
|
|
251
|
-
- [Biome](https://biomejs.dev/)
|
|
252
|
-
- [oxlint](https://oxc.rs/)
|
|
253
|
-
- [knip](https://knip.dev/)
|
|
254
|
-
- [ruff](https://docs.astral.sh/ruff/)
|
|
255
|
-
- [golangci-lint](https://golangci-lint.run/)
|
|
256
|
-
- [expo-doctor](https://docs.expo.dev/)
|
|
271
|
+
- [Biome](https://biomejs.dev/) for formatting and linting JS/TS
|
|
272
|
+
- [oxlint](https://oxc.rs/) for fast JS/TS linting
|
|
273
|
+
- [knip](https://knip.dev/) for unused files, exports, and dependencies
|
|
274
|
+
- [ruff](https://docs.astral.sh/ruff/) for Python linting and formatting
|
|
275
|
+
- [golangci-lint](https://golangci-lint.run/) for Go linting
|
|
276
|
+
- [expo-doctor](https://docs.expo.dev/) for Expo/React Native project health
|
|
257
277
|
|
|
258
278
|
## Contributors
|
|
259
279
|
|