pruneguard 0.6.2 → 0.6.4

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.
Files changed (2) hide show
  1. package/README.md +64 -1
  2. package/package.json +9 -9
package/README.md CHANGED
@@ -5,12 +5,59 @@
5
5
  [![npm version](https://img.shields.io/npm/v/pruneguard)](https://www.npmjs.com/package/pruneguard)
6
6
  [![license](https://img.shields.io/npm/l/pruneguard)](https://github.com/ferc/pruneguard/blob/main/LICENSE)
7
7
 
8
+ Built on [oxc](https://oxc.rs), pruneguard scans a 5,000+ file repository in under 6 seconds cold, and delivers sub-millisecond responses with the warm daemon. That is 10-50x faster than JS-based alternatives -- fast enough for an AI agent to call on every single code change.
9
+
10
+ ---
11
+
12
+ ## Use with AI agents
13
+
14
+ pruneguard was designed for AI agents: every command produces structured JSON, findings carry confidence scores, and remediation plans contain step-by-step instructions agents can execute directly. Because it runs in milliseconds, your agent can call it after every code change -- something that is impractical with slower JS-based tools.
15
+
16
+ ### Prompt: find and remove dead code
17
+
18
+ Copy-paste this into your agent configuration (`CLAUDE.md`, `.cursorrules`, Copilot instructions, etc.):
19
+
20
+ ````markdown
21
+ When asked to clean up dead code, or after making significant refactoring
22
+ changes, run `npx pruneguard --format json scan` to detect unused exports,
23
+ dead files, and phantom dependencies. For each finding with high confidence,
24
+ run `npx pruneguard --format json safe-delete <target>` to confirm it is safe
25
+ to remove. Only delete targets that pruneguard marks as safe. Follow the
26
+ deletionOrder array when removing multiple files. After all deletions, re-run
27
+ the scan with --no-cache to verify no new issues were introduced. Do not
28
+ delete anything with low confidence without asking the user first.
29
+ ````
30
+
31
+ ### Prompt: set up pruneguard and guard against new dead code
32
+
33
+ ````markdown
34
+ Add pruneguard as a dev dependency and configure it to catch dead code on
35
+ every change:
36
+
37
+ 1. Run `npm install -D pruneguard` (or the equivalent for the project's
38
+ package manager).
39
+ 2. Add these scripts to package.json:
40
+ - "review": "pruneguard --changed-since origin/main"
41
+ - "scan": "pruneguard scan"
42
+ - "prune:check": "pruneguard --changed-since origin/main --format json"
43
+ 3. Run `npx pruneguard init` to generate pruneguard.json with schema
44
+ reference.
45
+ 4. If the project uses CI (GitHub Actions), add a step that runs
46
+ `npx pruneguard --changed-since origin/main --format json` on pull
47
+ requests to block PRs that introduce new dead code.
48
+
49
+ pruneguard is a compiled Rust binary -- scanning takes milliseconds with the
50
+ warm daemon, so it adds no meaningful overhead to the development workflow or
51
+ CI pipeline.
52
+ ````
53
+
8
54
  ---
9
55
 
10
56
  ## Install
11
57
 
12
58
  ```sh
13
- npm install -D pruneguard # or: npx pruneguard scan
59
+ npx pruneguard # zero-install, scan your repo right now
60
+ npm install -D pruneguard # or add it as a dev dependency
14
61
  ```
15
62
 
16
63
  The package automatically installs the correct platform-specific native binary. No Rust toolchain, no compilation, no native addons -- just `npm install` and go.
@@ -381,6 +428,22 @@ Override with `"frameworks": { "next": "off" }` in config.
381
428
 
382
429
  ---
383
430
 
431
+ ## Performance
432
+
433
+ pruneguard is a compiled Rust binary powered by [oxc](https://oxc.rs) for parsing and module resolution. No V8 or Node.js runtime is on the hot path.
434
+
435
+ | Scenario | Latency |
436
+ |---|---|
437
+ | Warm daemon (`review`, `impact`, `explain`) on a small repo | < 10 ms |
438
+ | Warm daemon on a medium repo (1,000-2,000 files) | < 50 ms |
439
+ | Warm daemon on a large repo (5,000+ files) | < 150 ms |
440
+ | Cold one-shot scan, medium repo | < 2 s |
441
+ | Cold one-shot scan, 5,000+ file repo | < 6 s |
442
+
443
+ JS-based alternatives typically take 30-60 seconds on the same large repositories -- making them too slow for an AI agent to call on every code change or for a tight inner development loop. pruneguard's speed means you can treat dead-code detection as a routine check rather than a scheduled chore.
444
+
445
+ ---
446
+
384
447
  ## Requirements
385
448
 
386
449
  - Node.js >= 18
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pruneguard",
3
- "version": "0.6.2",
3
+ "version": "0.6.4",
4
4
  "description": "Repo truth engine for JS/TS monorepos",
5
5
  "keywords": [
6
6
  "javascript",
@@ -45,14 +45,14 @@
45
45
  }
46
46
  },
47
47
  "optionalDependencies": {
48
- "@pruneguard/cli-darwin-arm64": "0.6.2",
49
- "@pruneguard/cli-darwin-x64": "0.6.2",
50
- "@pruneguard/cli-linux-arm64-gnu": "0.6.2",
51
- "@pruneguard/cli-linux-arm64-musl": "0.6.2",
52
- "@pruneguard/cli-linux-x64-gnu": "0.6.2",
53
- "@pruneguard/cli-linux-x64-musl": "0.6.2",
54
- "@pruneguard/cli-win32-arm64-msvc": "0.6.2",
55
- "@pruneguard/cli-win32-x64-msvc": "0.6.2"
48
+ "@pruneguard/cli-darwin-arm64": "0.6.4",
49
+ "@pruneguard/cli-darwin-x64": "0.6.4",
50
+ "@pruneguard/cli-linux-arm64-gnu": "0.6.4",
51
+ "@pruneguard/cli-linux-arm64-musl": "0.6.4",
52
+ "@pruneguard/cli-linux-x64-gnu": "0.6.4",
53
+ "@pruneguard/cli-linux-x64-musl": "0.6.4",
54
+ "@pruneguard/cli-win32-arm64-msvc": "0.6.4",
55
+ "@pruneguard/cli-win32-x64-msvc": "0.6.4"
56
56
  },
57
57
  "engines": {
58
58
  "node": ">=18.0.0"