diffowl 0.4.0 → 0.5.1
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 +46 -23
- package/dist/cli.js +9037 -1960
- package/dist/cli.js.map +1 -1
- package/package.json +14 -5
package/README.md
CHANGED
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
|
|
10
10
|
Review agent-written code with a second model before it ships.
|
|
11
11
|
|
|
12
|
-
DiffOwl is a local code review CLI. It builds focused context from a Git diff,
|
|
12
|
+
DiffOwl is a local code review CLI. It builds focused context from a Git diff, runs a model through OpenCode or Codex, and records actionable findings in your repository.
|
|
13
13
|
|
|
14
|
-
It works with changes from any coding agent or human. You choose the
|
|
14
|
+
It works with changes from any coding agent or human. You choose the backend and model on your machine. DiffOwl does not require a hosted DiffOwl account.
|
|
15
15
|
|
|
16
16
|
## Why DiffOwl
|
|
17
17
|
|
|
@@ -20,27 +20,27 @@ The agent that wrote a change should not be its only reviewer. Asking it to revi
|
|
|
20
20
|
DiffOwl adds an independent pass between writing code and shipping it:
|
|
21
21
|
|
|
22
22
|
- Review the last commit, staged changes, a specific commit, or a whole branch.
|
|
23
|
-
-
|
|
23
|
+
- Review through OpenCode or a local Codex CLI authenticated with ChatGPT.
|
|
24
24
|
- Give the reviewer bounded local context instead of dumping the entire repository into a prompt.
|
|
25
25
|
- Keep findings after the review ends, with stable IDs and lifecycle states.
|
|
26
|
-
-
|
|
26
|
+
- Inspect and disposition durable findings after the review ends.
|
|
27
27
|
- Run reviews automatically after commits without blocking them.
|
|
28
28
|
|
|
29
|
-
TypeScript reviews include changed AST symbols, related tests, file excerpts, and bounded
|
|
29
|
+
TypeScript reviews can include changed AST symbols, related tests, file excerpts, and bounded import references. The structured import-reference section is TypeScript-only; non-TypeScript changes still get diff-centered review with targeted repository exploration.
|
|
30
30
|
|
|
31
31
|
## How it works
|
|
32
32
|
|
|
33
33
|
1. DiffOwl reads the Git change you selected.
|
|
34
34
|
2. It filters files and assembles relevant local context.
|
|
35
|
-
3. A separate model reviews the change through
|
|
35
|
+
3. A separate model reviews the change through your selected local backend.
|
|
36
36
|
4. DiffOwl writes a Markdown report and persists findings in SQLite.
|
|
37
|
-
5. You inspect the findings,
|
|
37
|
+
5. You inspect the findings, record their disposition, or hand them to a coding agent for resolution.
|
|
38
38
|
|
|
39
|
-
The orchestration and state stay in your repository. Review context
|
|
39
|
+
The orchestration and state stay in your repository. Review context goes only to the backend and model you selected.
|
|
40
40
|
|
|
41
41
|
## Quick start
|
|
42
42
|
|
|
43
|
-
You need Node.js 22.14.0 or newer
|
|
43
|
+
You need Node.js 22.14.0 or newer. OpenCode is the default backend for existing installations.
|
|
44
44
|
|
|
45
45
|
```bash
|
|
46
46
|
npm install --global opencode-ai
|
|
@@ -55,7 +55,15 @@ cd your-repository
|
|
|
55
55
|
diffowl init
|
|
56
56
|
```
|
|
57
57
|
|
|
58
|
-
`diffowl init`
|
|
58
|
+
`diffowl init` reports the selected runtime and the gitignored preference path. With OpenCode selected, it lists the models from your connected providers. Use `diffowl backend codex` before initialization if you want Codex, then choose a bare Codex model ID. The committed `.diffowl.yml` contains review policy, never your backend or model choice.
|
|
59
|
+
|
|
60
|
+
Codex reviews use an existing ChatGPT login from the local Codex CLI:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
codex
|
|
64
|
+
diffowl backend codex
|
|
65
|
+
diffowl model gpt-5-codex
|
|
66
|
+
```
|
|
59
67
|
|
|
60
68
|
Review the last commit:
|
|
61
69
|
|
|
@@ -91,6 +99,9 @@ diffowl review --staged --depth shallow
|
|
|
91
99
|
# Use a different model once
|
|
92
100
|
diffowl review --staged --model openai/gpt-5.6-luna
|
|
93
101
|
|
|
102
|
+
# Use Codex once without changing saved preferences
|
|
103
|
+
diffowl review --staged --backend codex --model gpt-5-codex
|
|
104
|
+
|
|
94
105
|
# Emit a versioned JSON document for scripts
|
|
95
106
|
diffowl review --base --format json
|
|
96
107
|
|
|
@@ -120,12 +131,7 @@ diffowl findings reopen fnd_abc --reason "The bug returned in a new path."
|
|
|
120
131
|
|
|
121
132
|
Use `--format json` with `findings list`, `show`, or `summary` when another tool needs the backlog.
|
|
122
133
|
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
```bash
|
|
126
|
-
diffowl chat
|
|
127
|
-
diffowl chat .diffowl/reviews/review-<timestamp>.md
|
|
128
|
-
```
|
|
134
|
+
Inspect a finding with `diffowl findings show`, then record its disposition with `fix`, `dismiss`, `defer`, or `reopen`. Run a new review when you need new model analysis.
|
|
129
135
|
|
|
130
136
|
## Resolve findings with a coding agent
|
|
131
137
|
|
|
@@ -166,15 +172,12 @@ diffowl agent-hook install --client claude
|
|
|
166
172
|
|
|
167
173
|
## Configuration
|
|
168
174
|
|
|
169
|
-
Project review policy lives in `.diffowl.yml`.
|
|
175
|
+
Project review policy lives in `.diffowl.yml`. Backend, model, and model-specific reasoning choices stay in the shared, gitignored `.diffowl/preferences.yml`. Linked worktrees use the same preference file.
|
|
170
176
|
|
|
171
177
|
```yaml
|
|
172
178
|
context:
|
|
173
179
|
depth: default
|
|
174
180
|
|
|
175
|
-
reasoning:
|
|
176
|
-
effort: auto
|
|
177
|
-
|
|
178
181
|
gate:
|
|
179
182
|
fail_on_findings: false
|
|
180
183
|
|
|
@@ -195,21 +198,38 @@ rules:
|
|
|
195
198
|
- "Check authorization at every write boundary."
|
|
196
199
|
```
|
|
197
200
|
|
|
198
|
-
|
|
201
|
+
Inspect or change the local backend and its model without editing project policy:
|
|
199
202
|
|
|
200
203
|
```bash
|
|
204
|
+
diffowl backend
|
|
205
|
+
diffowl backend opencode
|
|
206
|
+
diffowl backend codex
|
|
207
|
+
diffowl backend --reset
|
|
208
|
+
|
|
201
209
|
diffowl model
|
|
202
210
|
diffowl model provider/model
|
|
203
211
|
diffowl model --reset
|
|
212
|
+
|
|
213
|
+
diffowl reasoning
|
|
214
|
+
diffowl reasoning thinking
|
|
215
|
+
diffowl reasoning --reset
|
|
204
216
|
```
|
|
205
217
|
|
|
218
|
+
Reasoning names are backend-native identifiers, not a shared DiffOwl scale. A model might advertise `low` and `high`, `thinking`, only one value, or no selectable value. An absent preference means the backend default; DiffOwl never translates one backend's names into another's. Changing a model clears its old reasoning preference so a stale value cannot carry over. Use `diffowl review --reasoning <variant>` for a one-review override.
|
|
219
|
+
|
|
220
|
+
When model metadata rejects a variant, DiffOwl uses the backend default and
|
|
221
|
+
prints the model's advertised choices. If the model advertises no selectable
|
|
222
|
+
variants, the warning says so explicitly.
|
|
223
|
+
|
|
224
|
+
Each backend keeps its own model choice. Switching backends does not erase the other model. A legacy preference containing only `model: provider/model` still selects OpenCode. Legacy `.diffowl.yml` `reasoning.effort` values remain readable for migration and produce an exact cleanup warning; DiffOwl no longer writes them to project config.
|
|
225
|
+
|
|
206
226
|
Configuration is deep-merged with defaults, so the file only needs the settings your repository changes.
|
|
207
227
|
|
|
208
228
|
## Files DiffOwl creates
|
|
209
229
|
|
|
210
230
|
```text
|
|
211
231
|
.diffowl.yml # Committed project policy
|
|
212
|
-
.diffowl/preferences.yml # Gitignored
|
|
232
|
+
.diffowl/preferences.yml # Gitignored backend, model, and reasoning choices
|
|
213
233
|
.diffowl/state.db # Authoritative findings backlog
|
|
214
234
|
.diffowl/reviews/review-<timestamp>.md # Immutable review snapshot
|
|
215
235
|
.diffowl/reviews/latest.md # Copy of the newest report
|
|
@@ -224,9 +244,10 @@ Linked Git worktrees share the durable backlog and review reports from the prima
|
|
|
224
244
|
| -------------------- | ------------------------------------------- |
|
|
225
245
|
| `diffowl init` | Configure DiffOwl in the current repository |
|
|
226
246
|
| `diffowl review` | Run a review |
|
|
247
|
+
| `diffowl backend` | Inspect or change the local review backend |
|
|
227
248
|
| `diffowl model` | View or change the selected model |
|
|
249
|
+
| `diffowl reasoning` | View or change model-specific reasoning |
|
|
228
250
|
| `diffowl findings` | Inspect and update durable findings |
|
|
229
|
-
| `diffowl chat` | Reopen an OpenCode review session |
|
|
230
251
|
| `diffowl hook` | Manage the post-commit hook |
|
|
231
252
|
| `diffowl agent-hook` | Manage supported agent client hooks |
|
|
232
253
|
| `diffowl server` | Manage the local OpenCode server |
|
|
@@ -236,6 +257,8 @@ Run `diffowl <command> --help` for every option.
|
|
|
236
257
|
## Troubleshooting
|
|
237
258
|
|
|
238
259
|
- No models found: run `opencode`, connect or re-authenticate a provider, then rerun `diffowl init`.
|
|
260
|
+
- Codex runtime missing: install the Codex CLI and make sure `codex` is on `PATH`.
|
|
261
|
+
- Codex authentication missing: run `codex` and sign in with ChatGPT.
|
|
239
262
|
- Review timed out: retry with `diffowl review --depth shallow`.
|
|
240
263
|
- Hook review failed: run the retry command shown by the next foreground DiffOwl command, or inspect `.diffowl/hook.log`.
|
|
241
264
|
- Agent did not load `diffowl-resolve`: verify it with `npx skills list`, then restart or reload the agent.
|