@bilalimamoglu/sift 0.4.4 → 0.4.5

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 CHANGED
@@ -4,9 +4,9 @@
4
4
 
5
5
  # sift
6
6
 
7
- ### Turn noisy command output into actionable diagnoses for your coding agent
7
+ ### Turn noisy command output into a short, actionable first pass for your coding agent
8
8
 
9
- **Benchmark-backed test triage - Heuristic-first reductions - Agent-ready terminal workflows**
9
+ **Local heuristics first. Group repeated failures into likely root causes and next steps before your agent reads the full log.**
10
10
 
11
11
  [![npm version](https://img.shields.io/npm/v/@bilalimamoglu/sift)](https://www.npmjs.com/package/@bilalimamoglu/sift)
12
12
  [![license](https://img.shields.io/github/license/bilalimamoglu/sift)](LICENSE)
@@ -29,14 +29,14 @@ npm install -g @bilalimamoglu/sift
29
29
 
30
30
  ## Why Sift?
31
31
 
32
- When an agent hits noisy output, it burns budget reading logs instead of fixing the problem.
32
+ When an agent hits noisy output, it can eventually make sense of the log wall, but it wastes time and tokens getting there.
33
33
 
34
- `sift` sits in front of that output and reduces it into a small, actionable first pass. Your agent reads the diagnosis, not the wall of text.
34
+ `sift` narrows that output locally first. It groups repeated failures, surfaces likely root causes, and points to the next useful step so your agent starts from signal instead of raw noise.
35
35
 
36
36
  Turn 13,000 lines of test output into 2 root causes.
37
37
 
38
38
  <p align="center">
39
- <img src="assets/readme/test-status-demo.gif" alt="sift turning a pytest failure wall into a short diagnosis" width="960" />
39
+ <img src="assets/readme/test-status-demo.gif" alt="sift turning a pytest failure wall into a short, actionable first pass" width="960" />
40
40
  </p>
41
41
 
42
42
  With `sift`, the same run becomes:
@@ -59,7 +59,7 @@ In the largest benchmark fixture, sift compressed 198,026 raw output tokens to 1
59
59
 
60
60
  ## Benchmark Results
61
61
 
62
- The output reduction above measures a single command's raw output. The table below measures the full end-to-end debug session: how many tokens, tool calls, and seconds the agent spends to reach the same diagnosis.
62
+ The output reduction above measures a single command's raw output. The table below measures the full end-to-end debug session: how many tokens, tool calls, and seconds the agent spends to reach the same outcome.
63
63
 
64
64
  Real debug loop on a 640-test Python backend with 124 repeated setup errors, 3 contract failures, and 511 passing tests:
65
65
 
@@ -69,9 +69,9 @@ Real debug loop on a 640-test Python backend with 124 repeated setup errors, 3 c
69
69
  | Tool calls | 40.8 | 12 | 71% fewer |
70
70
  | Wall-clock time | 244s | 85s | 65% faster |
71
71
  | Commands | 15.5 | 6 | 61% fewer |
72
- | Diagnosis | Same | Same | Same outcome |
72
+ | Outcome | Same | Same | Same outcome |
73
73
 
74
- Same diagnosis, less agent thrash.
74
+ Same outcome, less agent thrash.
75
75
 
76
76
  Methodology and caveats: [BENCHMARK_NOTES.md](BENCHMARK_NOTES.md)
77
77
 
@@ -83,7 +83,7 @@ Methodology and caveats: [BENCHMARK_NOTES.md](BENCHMARK_NOTES.md)
83
83
 
84
84
  1. **Capture output.** Run the noisy command or accept already-existing piped output.
85
85
  2. **Run local heuristics.** Detect known failure shapes first so common cases stay cheap and deterministic.
86
- 3. **Return the diagnosis.** When heuristics are confident, `sift` gives the agent the root cause, anchor, and next step.
86
+ 3. **Return a useful first pass.** When heuristics are confident, `sift` gives the agent grouped failures, likely root causes, and the next step.
87
87
  4. **Fall back only when needed.** If heuristics are not enough, `sift` uses a cheaper model instead of spending your main agent budget.
88
88
 
89
89
  Your agent spends tokens fixing, not reading.
@@ -96,13 +96,13 @@ Your agent spends tokens fixing, not reading.
96
96
  <tr>
97
97
  <td width="33%" valign="top">
98
98
 
99
- ### Test Failure Triage
100
- Collapse repeated pytest, vitest, and jest failures into a short diagnosis with root-cause buckets, anchors, and fix hints.
99
+ ### Test Failure Guidance
100
+ Collapse repeated pytest, vitest, and jest failures into grouped issues with likely root causes, anchors, and fix hints.
101
101
 
102
102
  </td>
103
103
  <td width="33%" valign="top">
104
104
 
105
- ### Typecheck and Lint Reduction
105
+ ### Typecheck and Lint Guidance
106
106
  Group noisy `tsc` and ESLint output into the few issues that actually matter instead of dumping the whole log back into the model.
107
107
 
108
108
  </td>
@@ -139,21 +139,65 @@ Use `sift` in Codex, Claude, CI, hooks, or shell scripts so downstream tooling g
139
139
 
140
140
  ## Setup and Agent Integration
141
141
 
142
- Most built-in presets run entirely on local heuristics with no API key needed. For presets that fall back to a model (`diff-summary`, `log-errors`, or when heuristics are not confident enough), sift supports OpenAI-compatible and OpenRouter-compatible endpoints.
142
+ Most built-in presets run entirely on local heuristics with no API key required. If you want deeper fallback for ambiguous cases, `sift` also supports OpenAI-compatible and OpenRouter-compatible endpoints.
143
143
 
144
- Set up the provider first, then install the managed instruction block for the agent you want to steer:
144
+ Start with the guided installer:
145
+
146
+ ```bash
147
+ sift install
148
+ ```
149
+
150
+ During install, pick the mode that matches reality:
151
+ - `agent-escalation`: best if Codex or Claude is already open. `sift` gives the first answer, then your agent keeps going.
152
+ - `provider-assisted`: best if you want `sift` itself to ask a cheap fallback model when needed. This is the API-key path.
153
+ - `local-only`: best if `sift` is working alone and you want everything to stay local.
154
+
155
+ Then try the normal diagnosis loop:
156
+
157
+ ```bash
158
+ sift exec --preset test-status -- pytest -q
159
+ ```
160
+
161
+ If you choose `provider-assisted` during install, `sift` now continues directly into provider, model, and API-key setup instead of making you run a second command.
162
+
163
+ Use `sift config setup` later when you want to revisit or change those choices:
145
164
 
146
165
  ```bash
147
166
  sift config setup
148
167
  sift doctor
149
- sift agent install codex
150
- sift agent install claude
151
168
  ```
152
169
 
153
- You can also preview, inspect, or remove those blocks:
170
+ OpenAI setup defaults to `gpt-5-nano`, with `gpt-5.4-nano` and `gpt-5-mini` offered as backup choices during setup.
171
+
172
+ Before pushing release-sensitive changes, run the same shared gate used by CI and the release workflow:
173
+
174
+ ```bash
175
+ npm run verify:release
176
+ ```
177
+
178
+ That gate runs under a CI-like environment on purpose so wrapper-noise regressions show up locally before they embarrass the repo in publish.
179
+
180
+ If you want one extra paranoid pass before a release or risky push, use the clean-room variant too:
181
+
182
+ ```bash
183
+ npm run verify:release:clean
184
+ ```
185
+
186
+ That copies the repo into a temporary clean directory, runs `npm ci`, then executes the shared core gate there so warm local `node_modules` do not hide CI failures.
187
+
188
+ If you want pushes to enforce the same core gate automatically inside this repo:
189
+
190
+ ```bash
191
+ npm run setup:hooks
192
+ ```
193
+
194
+ That installs the tracked `.githooks/pre-push` hook, which runs `npm run verify:release:core` before every push.
195
+
196
+ If you want the older low-level controls, you can still preview, inspect, or remove the managed blocks directly:
154
197
 
155
198
  ```bash
156
199
  sift agent show codex
200
+ sift agent install codex --dry-run
157
201
  sift agent status
158
202
  sift agent remove codex
159
203
  ```
@@ -172,7 +216,7 @@ npm install -g @bilalimamoglu/sift
172
216
 
173
217
  Requires Node.js 20+.
174
218
 
175
- ### 2. Run Sift in front of a noisy command
219
+ ### 2. Get a useful first pass before your agent reads the full log
176
220
 
177
221
  ```bash
178
222
  sift exec --preset test-status -- pytest -q
@@ -199,7 +243,7 @@ sift rerun
199
243
  sift rerun --remaining --detail focused
200
244
  ```
201
245
 
202
- If `standard` already gives you the root cause, anchor, and fix, stop there and act.
246
+ If `standard` already gives you the likely root cause, anchor, and fix, stop there and act.
203
247
 
204
248
  ---
205
249
 
@@ -257,7 +301,7 @@ sift rerun --goal diagnose --format json
257
301
  - sift adds the most value when output is long, repetitive, and shaped by a small number of root causes. For short, obvious failures it may not save much.
258
302
  - The deepest local heuristic coverage is in test debugging (pytest, vitest, jest). Other presets have solid heuristics but less depth.
259
303
  - sift does not help with interactive or TUI-based commands.
260
- - When heuristics cannot explain the output confidently, sift falls back to a provider. If no provider is configured, it returns what the heuristics could extract and signals that raw output may still be needed.
304
+ - When heuristics cannot explain the output confidently, sift either falls back to a provider or returns the strongest local first pass it can, depending on how you choose to use it.
261
305
 
262
306
  ---
263
307
 
@@ -279,7 +323,7 @@ MIT
279
323
 
280
324
  <div align="center">
281
325
 
282
- Built for agent-first terminal workflows.
326
+ Local-first output guidance for coding agents.
283
327
 
284
328
  [Report Bug](https://github.com/bilalimamoglu/sift/issues) | [Request Feature](https://github.com/bilalimamoglu/sift/issues)
285
329