aislop 0.3.1 → 0.4.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 +48 -19
- package/dist/cli.js +607 -161
- package/dist/{engine-info-D19chfzD.js → engine-info-s7Gy2StX.js} +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.js +596 -175
- package/dist/{json-DD60WkDS.js → json-CdzBXUbz.js} +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -10,7 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
`aislop` is a unified code-quality CLI that catches the lazy patterns AI coding tools leave behind. One command, one score out of 100.
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Every check is deterministic — regex patterns, AST analysis, and standard tooling (Biome, oxlint, knip, ruff). It runs the same way every time, with no API calls, no LLMs, and no network requests (except dependency audits). The name refers to what it *catches*.
|
|
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.
|
|
14
16
|
|
|
15
17
|
## See it in action
|
|
16
18
|
|
|
@@ -38,7 +40,7 @@ npx aislop ci
|
|
|
38
40
|
Sample output:
|
|
39
41
|
|
|
40
42
|
```text
|
|
41
|
-
aislop scan v0.
|
|
43
|
+
aislop scan v0.4.0
|
|
42
44
|
|
|
43
45
|
✓ Project my-app (typescript)
|
|
44
46
|
Source files: 142
|
|
@@ -63,30 +65,32 @@ Summary
|
|
|
63
65
|
|
|
64
66
|
## Why aislop
|
|
65
67
|
|
|
66
|
-
AI
|
|
67
|
-
|
|
68
|
+
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
|
+
|
|
70
|
+
`aislop` gives you one view and one score — fully deterministic, no AI involved.
|
|
68
71
|
|
|
69
|
-
- **One command, full picture**: formatting + lint + maintainability +
|
|
72
|
+
- **One command, full picture**: formatting + lint + maintainability + pattern detection + security (+ architecture)
|
|
73
|
+
- **Deterministic and fast**: regex, AST analysis, and standard tooling — no LLMs, no API keys, no network dependency
|
|
70
74
|
- **Score-based quality gate**: use a single 0-100 score in CI and PR checks
|
|
71
|
-
- **
|
|
72
|
-
- **Auto-fix support**: remove unused imports, apply lint suggestions, and format in one pass
|
|
73
|
-
- **
|
|
74
|
-
- **Software engineering
|
|
75
|
+
- **Weighted scoring**: defaults weight sloppy patterns (dead code, type abuse, swallowed errors) more than style noise
|
|
76
|
+
- **Auto-fix support**: remove unused imports, apply lint suggestions, fix deps, and format in one pass
|
|
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
|
|
75
79
|
- **Works across stacks**: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Expo/React Native
|
|
76
80
|
- **Zero-config start**: run `npx aislop scan` and get useful output immediately
|
|
77
81
|
|
|
78
82
|
## What it catches
|
|
79
83
|
|
|
80
|
-
Six engines run in parallel:
|
|
84
|
+
Six deterministic engines run in parallel:
|
|
81
85
|
|
|
82
|
-
| Engine |
|
|
83
|
-
|
|
84
|
-
| Formatting | Biome, ruff, gofmt, cargo fmt, rubocop, php-cs-fixer |
|
|
85
|
-
| Linting | oxlint, ruff, golangci-lint, clippy, expo-doctor |
|
|
86
|
-
| Code Quality | Function/file size limits, deep nesting,
|
|
87
|
-
|
|
|
88
|
-
| Security |
|
|
89
|
-
| Architecture | Custom import bans, layering rules, required patterns |
|
|
86
|
+
| Engine | What it checks | How |
|
|
87
|
+
|---|---|---|
|
|
88
|
+
| **Formatting** | Code style consistency | Biome, ruff, gofmt, cargo fmt, rubocop, php-cs-fixer |
|
|
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
|
+
| **Pattern Detection** | Sloppy code patterns | Trivial comments, swallowed exceptions, unused imports, console leftovers, type assertion abuse, TODO stubs |
|
|
92
|
+
| **Security** | Vulnerabilities and risky code | eval, innerHTML, SQL/shell injection, dependency audits (npm/pip/cargo/govulncheck) |
|
|
93
|
+
| **Architecture** | Structural rules (opt-in) | Custom import bans, layering rules, required patterns |
|
|
90
94
|
|
|
91
95
|
See the full [rules reference](docs/rules.md).
|
|
92
96
|
|
|
@@ -131,7 +135,32 @@ aislop scan --json # output JSON
|
|
|
131
135
|
|
|
132
136
|
```bash
|
|
133
137
|
aislop fix # auto-fix unused imports, formatting, and lint fixes
|
|
134
|
-
aislop fix
|
|
138
|
+
aislop fix -f # aggressive: dependency audit, unused file removal, Expo alignment
|
|
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
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
### Hand off to your coding agent
|
|
145
|
+
|
|
146
|
+
When auto-fix can't solve it, aislop generates a prompt with full context and opens your agent:
|
|
147
|
+
|
|
148
|
+
```bash
|
|
149
|
+
aislop fix --claude # Claude Code
|
|
150
|
+
aislop fix --codex # Codex CLI
|
|
151
|
+
aislop fix --cursor # Cursor (copies prompt to clipboard)
|
|
152
|
+
aislop fix --windsurf # Windsurf (copies prompt to clipboard)
|
|
153
|
+
aislop fix --gemini # Gemini CLI
|
|
154
|
+
aislop fix --amp # Amp
|
|
155
|
+
aislop fix --vscode # VS Code (copies prompt to clipboard)
|
|
156
|
+
aislop fix --aider # Aider
|
|
157
|
+
aislop fix --goose # Goose
|
|
158
|
+
aislop fix --opencode # OpenCode
|
|
159
|
+
aislop fix --warp # Warp
|
|
160
|
+
aislop fix --kimi # Kimi Code CLI
|
|
161
|
+
aislop fix --antigravity # Antigravity
|
|
162
|
+
aislop fix --deep-agents # Deep Agents
|
|
163
|
+
aislop fix --prompt # print prompt to paste into any agent
|
|
135
164
|
```
|
|
136
165
|
|
|
137
166
|
### Use in CI pipelines
|