@whittlelabs/sifter 0.30.7 → 0.30.8

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 (4) hide show
  1. package/README.md +32 -4
  2. package/bin.js +1919 -1604
  3. package/bin.js.map +4 -4
  4. package/package.json +1 -1
package/README.md CHANGED
@@ -4,14 +4,30 @@ The Whittle Sifter is a paired AI reviewer for [Whittle Sift](https://sift.whitt
4
4
 
5
5
  ## Install
6
6
 
7
- `@whittlelabs/sifter` is published publicly to npmjs.com (released by the
8
- delivery pipeline on a version bump):
7
+ The Sifter runs on macOS, Linux, and Windows through WSL. Native Windows is not supported: install [WSL](https://learn.microsoft.com/windows/wsl/install) and run everything below inside it.
8
+
9
+ It needs three things on the machine first:
10
+
11
+ | Prerequisite | Version | How to get it |
12
+ |---|---|---|
13
+ | Node.js | 20 or newer | [nodejs.org](https://nodejs.org), or a version manager such as [nvm](https://github.com/nvm-sh/nvm) or [fnm](https://github.com/Schniz/fnm) |
14
+ | git | 2.20 or newer | macOS: `xcode-select --install` (or Homebrew). Linux and WSL: your package manager, e.g. `sudo apt install git` |
15
+ | Claude Code | 2.0 or newer, signed in | `npm install -g @anthropic-ai/claude-code`, then run `claude` once and sign in |
16
+
17
+ On a Mac without the Command Line Tools, `/usr/bin/git` is only a placeholder that asks for them. The Sifter treats that as git not working, so install them first.
18
+
19
+ Then install the Sifter from npm:
9
20
 
10
21
  ```bash
11
22
  npm install -g @whittlelabs/sifter
12
23
  ```
13
24
 
14
- Requires Node 20+.
25
+ If that fails with `EACCES`, do not reach for `sudo`. npm is trying to write into a system directory; install Node through a version manager (which puts global packages in your home directory), or point npm at a directory you own:
26
+
27
+ ```bash
28
+ npm config set prefix ~/.npm-global
29
+ export PATH="$HOME/.npm-global/bin:$PATH" # add this line to your shell profile too
30
+ ```
15
31
 
16
32
  ## Pair
17
33
 
@@ -21,6 +37,8 @@ Visit Sift's **Settings → Pair a Sifter**. Sift will display a pairing code an
21
37
  whittle-sifter init --pairing-code=ABCD-1234
22
38
  ```
23
39
 
40
+ Before it spends the code, `init` checks what `run` will need: git, Claude Code, and a config directory and run root it can write to. If anything is missing it says what and stops with the code unspent, so fix it and run the same command again. Nothing is saved on your machine unless pairing succeeds all the way through.
41
+
24
42
  The Sifter defaults to production. To pair against another Whittle Labs environment, name it with `--profile`: the name selects the backend as well as the directory the pairing lands in.
25
43
 
26
44
  ```bash
@@ -65,7 +83,7 @@ The Sifter subscribes to your job pool and waits for review jobs. Leave it runni
65
83
  whittle-sifter doctor
66
84
  ```
67
85
 
68
- Fifteen checks over everything the Sifter needs before it can review anything: your pairing, your config, `git`, the `claude` CLI and its login, a writable run root, free disk, and whether Sift can be reached. One line per check, with a remedy under anything that failed. It exits 4 if something is wrong and 0 otherwise, so it works in a script.
86
+ Sixteen checks over everything the Sifter needs before it can review anything: a supported platform and Node version, your pairing, your config, `git`, the `claude` CLI and its login, a writable run root, free disk, and whether Sift can be reached. One line per check, with a remedy under anything that failed, and each problem reported once: a check that depends on one that failed is skipped and points back at it. It exits 4 if something is wrong and 0 otherwise, so it works in a script.
69
87
 
70
88
  `init` and `run` run the relevant subset themselves, so `doctor` is for when the Sifter looks healthy and nothing is happening.
71
89
 
@@ -74,6 +92,16 @@ whittle-sifter doctor --deep # also spend one real turn proving the claude l
74
92
  whittle-sifter doctor --json # the verdicts as JSON, and nothing else
75
93
  ```
76
94
 
95
+ ## Exit codes
96
+
97
+ | Code | Meaning |
98
+ |---|---|
99
+ | 0 | Success |
100
+ | 1 | A fatal error; the message says what went wrong |
101
+ | 2 | This version is older than Sift accepts: `npm install -g @whittlelabs/sifter@latest` |
102
+ | 3 | The pairing was revoked (removed in Sift, or replaced by a newer pairing): pair again |
103
+ | 4 | A pre-flight check failed; the report above it names the remedy |
104
+
77
105
  ## Other commands
78
106
 
79
107
  ```bash