aislop 0.6.2 → 0.8.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 +76 -6
- package/dist/cli.js +1581 -110
- package/dist/expo-doctor-T4DswmX5.js +136 -0
- package/dist/index.d.ts +3 -0
- package/dist/index.js +1308 -67
- package/dist/{json-ZItDVIZL.js → json-BJGLCIK-.js} +1 -1
- package/dist/mcp.js +5115 -0
- package/dist/subprocess-CCnnN_oQ.js +60 -0
- package/dist/typecheck-B1MXNAy-.js +102 -0
- package/dist/typecheck-By967nny.js +102 -0
- package/dist/typecheck-XJMuCczG.js +101 -0
- package/dist/{version-AmNwcw_U.js → version-B9ZchFMv.js} +1 -1
- package/package.json +10 -3
- /package/dist/{json-B51etWTw.js → json-BbMwrgyd.js} +0 -0
package/README.md
CHANGED
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
# aislop
|
|
2
2
|
|
|
3
|
-
**The quality gate for
|
|
3
|
+
**The engineering standards layer and quality gate for AI-written code.**
|
|
4
4
|
|
|
5
5
|
[](https://www.npmjs.com/package/aislop)
|
|
6
6
|
[](https://www.npmjs.com/package/aislop)
|
|
7
7
|
[](https://github.com/scanaislop/aislop/actions/workflows/ci.yml)
|
|
8
|
+
[](https://scanaislop.com/scanaislop/aislop)
|
|
8
9
|
[](https://opensource.org/licenses/MIT)
|
|
9
10
|
[](https://nodejs.org)
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
Define your standard once in `.aislop/config.yml` + `.aislop/rules.yml`. Every change your agent makes is held to it automatically. `aislop` catches the slop they leave behind (narrative comments, `as any`, swallowed errors, hallucinated imports, todo stubs), enforces the rules your team sets, and scores every change 0–100. 8+ languages. Deterministic — no LLM at runtime.
|
|
13
|
+
|
|
14
|
+
### The killer feature: the per-edit hook
|
|
15
|
+
|
|
16
|
+
Install once into your coding agent:
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
npx aislop hook install --claude # also: --cursor, --codex, --gemini, --windsurf, --cline, --kilo, --antigravity, --copilot
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
After every `Edit` / `Write` your agent makes, `aislop` runs and feeds the diagnostics back into the agent's next turn as structured `additionalContext` (envelope: `aislop.hook.v1` — score, counts, findings, regression flag, suggested next steps). **The agent sees the score regression on the same turn it wrote the code, before you prompt again.** No more PR-time surprises; the slop never leaves the keystroke that produced it.
|
|
23
|
+
|
|
24
|
+
CI is the second gate: `aislop ci` exits non-zero when score drops below your threshold, so the same standard is enforced on every PR.
|
|
12
25
|
|
|
13
26
|
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*.
|
|
14
27
|
|
|
@@ -34,7 +47,7 @@ npx aislop fix
|
|
|
34
47
|
# CI mode (JSON output + quality gate)
|
|
35
48
|
npx aislop ci
|
|
36
49
|
|
|
37
|
-
# wire aislop into your agent so it runs on every edit
|
|
50
|
+
# wire aislop into your agent so it runs on every edit
|
|
38
51
|
npx aislop hook install --claude
|
|
39
52
|
```
|
|
40
53
|
|
|
@@ -46,7 +59,7 @@ Sample output:
|
|
|
46
59
|
[!] Code Quality: done (2 warnings, 812ms)
|
|
47
60
|
[!] AI Slop: done (4 warnings, 455ms)
|
|
48
61
|
[ok] Security: done (0 issues, 1.3s)
|
|
49
|
-
aislop 0.
|
|
62
|
+
aislop 0.8.0 · the quality gate for agentic coding
|
|
50
63
|
|
|
51
64
|
scan · my-app · typescript · 142 files
|
|
52
65
|
|
|
@@ -78,7 +91,7 @@ AI coding tools generate code that compiles and passes tests but ships with patt
|
|
|
78
91
|
|
|
79
92
|
- **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.
|
|
80
93
|
- **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
|
|
94
|
+
- **Wire it into your agent**: `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.
|
|
82
95
|
- **Deterministic**: regex, AST, and standard tooling. No LLMs, no API keys, no network dependency. Same repo in, same score out.
|
|
83
96
|
- **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.
|
|
84
97
|
- **Works across stacks**: TypeScript, JavaScript, Python, Go, Rust, Ruby, PHP, Expo / React Native.
|
|
@@ -154,6 +167,18 @@ aislop scan --exclude "src/generated" --exclude "**/*.spec.*"
|
|
|
154
167
|
|
|
155
168
|
CLI flags beat config; config beats defaults.
|
|
156
169
|
|
|
170
|
+
**Extend a shared config.** A project config can extend a parent and override specific keys. Useful for org-wide baselines: ship one strict config, let each repo soften or tighten as needed.
|
|
171
|
+
|
|
172
|
+
```yaml
|
|
173
|
+
# .aislop/config.yml
|
|
174
|
+
extends: ../../.aislop/base.yml # relative path to a parent config
|
|
175
|
+
|
|
176
|
+
ci:
|
|
177
|
+
failBelow: 80 # override just this key, inherit the rest
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
`extends:` accepts a single path or an array of paths. Later entries win. Deep-merged: nested objects (`scoring.weights`, `engines`) are merged key-by-key; arrays are replaced. Circular references and depths beyond 5 are rejected with a clear error.
|
|
181
|
+
|
|
157
182
|
### Fix issues automatically
|
|
158
183
|
|
|
159
184
|
```bash
|
|
@@ -212,6 +237,30 @@ aislop hook uninstall # remove every aislop entry, sentinel-ve
|
|
|
212
237
|
|
|
213
238
|
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
239
|
|
|
240
|
+
### Use as an MCP server
|
|
241
|
+
|
|
242
|
+
aislop ships an MCP (Model Context Protocol) server so any agent that speaks MCP — Claude Desktop, Claude Code, Cursor, Codex — can call it as a tool.
|
|
243
|
+
|
|
244
|
+
```jsonc
|
|
245
|
+
// ~/.cursor/mcp.json / Claude Desktop config / ~/.codex/config.toml equivalent
|
|
246
|
+
{
|
|
247
|
+
"mcpServers": {
|
|
248
|
+
"aislop": {
|
|
249
|
+
"command": "npx",
|
|
250
|
+
"args": ["-y", "aislop-mcp"]
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
Tools exposed:
|
|
257
|
+
- `aislop_scan({ path? })` — score + counts + top findings
|
|
258
|
+
- `aislop_fix({ path?, force? })` — apply mechanical fixes; returns before/after delta
|
|
259
|
+
- `aislop_why({ rule_id })` — engine + docs link for a rule
|
|
260
|
+
- `aislop_baseline({ path? })` — read the per-edit-hook baseline (score, lastScanAt, fileCount)
|
|
261
|
+
|
|
262
|
+
Same engines as the CLI; calling these from inside an agent session lets the model self-check before claiming work is done.
|
|
263
|
+
|
|
215
264
|
### Use in CI pipelines
|
|
216
265
|
|
|
217
266
|
```bash
|
|
@@ -237,6 +286,7 @@ aislop scan
|
|
|
237
286
|
aislop init # create .aislop/config.yml
|
|
238
287
|
aislop doctor # check which tools are available
|
|
239
288
|
aislop rules # list all built-in rules
|
|
289
|
+
aislop badge # print the public score badge URL + README snippet
|
|
240
290
|
aislop hook install # wire aislop into your coding agent
|
|
241
291
|
aislop # interactive menu
|
|
242
292
|
```
|
|
@@ -313,6 +363,18 @@ ci:
|
|
|
313
363
|
|
|
314
364
|
The CLI is MIT-licensed and always will be. [Learn more about the platform →](https://scanaislop.com)
|
|
315
365
|
|
|
366
|
+
## Public score badge
|
|
367
|
+
|
|
368
|
+
Show your aislop score on a README. Free for any project that opts in on [scanaislop.com](https://scanaislop.com).
|
|
369
|
+
|
|
370
|
+
```markdown
|
|
371
|
+
[](https://scanaislop.com)
|
|
372
|
+
```
|
|
373
|
+
|
|
374
|
+
Shields-compatible SVG, edge-cached on Cloudflare. Colour-coded: green ≥ 85, amber 70-84, red < 70, grey if no scans yet.
|
|
375
|
+
|
|
376
|
+
Run `aislop badge` to print the snippet pre-filled with your repo's owner/name, auto-detected from `git remote get-url origin`.
|
|
377
|
+
|
|
316
378
|
## Contributing
|
|
317
379
|
|
|
318
380
|
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).
|
|
@@ -330,7 +392,15 @@ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and how to add new
|
|
|
330
392
|
|
|
331
393
|
## Contributors
|
|
332
394
|
|
|
333
|
-
|
|
395
|
+
Thanks to everyone who has shipped code, ideas, docs, or bug reports.
|
|
396
|
+
|
|
397
|
+
<!-- CONTRIBUTORS-START -->
|
|
398
|
+
- [@heavykenny](https://github.com/heavykenny)
|
|
399
|
+
- [@myke-awoniran](https://github.com/myke-awoniran)
|
|
400
|
+
- [@yashrajoria](https://github.com/yashrajoria)
|
|
401
|
+
<!-- CONTRIBUTORS-END -->
|
|
402
|
+
|
|
403
|
+
This list is regenerated by `.github/workflows/contributors.yml` after every push to `develop` or `main`. The workflow reads git log, resolves each author's GitHub login, and opens a PR with any diff. If your commits aren't being credited, either link your commit email under [GitHub Settings → Emails](https://github.com/settings/emails) or add a mapping to [`.github/contributors-overrides.json`](.github/contributors-overrides.json).
|
|
334
404
|
|
|
335
405
|
## License
|
|
336
406
|
|