diffowl 0.3.2 → 0.4.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 +129 -315
- package/dist/cli.js +6100 -4119
- package/dist/cli.js.map +1 -1
- package/package.json +1 -2
package/README.md
CHANGED
|
@@ -7,417 +7,240 @@
|
|
|
7
7
|
" "
|
|
8
8
|
```
|
|
9
9
|
|
|
10
|
-
|
|
11
|
-
>
|
|
12
|
-
> An independent reviewer that runs locally on every commit — on the model you already use, no matter which agent (or human) wrote the code.
|
|
13
|
-
|
|
14
|
-
Coding agents now write much of the code, but the agent that wrote a patch shouldn't be its only reviewer. DiffOwl is a separate, independent review pass: it builds bounded local context from your diff and asks a model for structured, durable findings. It works the same whether the change came from Claude Code, Cursor, OpenCode, or your own hands.
|
|
15
|
-
|
|
16
|
-
Under the hood it drives a headless [OpenCode](https://opencode.ai/docs/server/) session for model execution, so you bring your own provider and pay no one but them — no DiffOwl account, no service in the loop.
|
|
17
|
-
|
|
18
|
-
---
|
|
19
|
-
|
|
20
|
-
## Features
|
|
21
|
-
|
|
22
|
-
- **Agent-Agnostic**: Reviews code from any source — Claude Code, Cursor, OpenCode, or a human. The reviewer stays independent from whoever wrote the patch.
|
|
23
|
-
- **Provider-Neutral**: Runs on whatever model and provider you have configured in OpenCode (Copilot, OpenAI, local, and more). No separate keys, no DiffOwl account, no per-seat bill.
|
|
24
|
-
- **First-Class TypeScript Support**: Automatically extracts modified TypeScript AST nodes (functions, classes, interfaces, types, enums, methods, properties, and top-level const declarations) to feed rich, structured context to the AI reviewer.
|
|
25
|
-
- **Automatic Git Hooks**: Reviews run on every commit and stay out of your way — results land in `.diffowl/` when they are ready.
|
|
26
|
-
- **Review Chat Handoff**: Reopen the OpenCode session behind the latest or any selected review with `diffowl chat`.
|
|
27
|
-
- **Review Depth Profiles**: Choose `shallow` or `default` context strategies to match fast hooks or normal reviews.
|
|
28
|
-
- **Intelligent File Filtering**: Supports `include` and `exclude` glob patterns to focus reviews on source directories while skipping build artifacts, lockfiles, and node modules.
|
|
29
|
-
- **Project-Specific Rules**: Inject custom guidelines directly into the reviewer's system prompt (e.g., "Check for SQL injection", "Ensure TypeScript types are explicit").
|
|
30
|
-
- **Interactive Model Selector**: Automatically queries OpenCode to present a clean, interactive list of your connected providers and models.
|
|
31
|
-
- **Local Reports**: Generates markdown reviews under `.diffowl/reviews/`, including durable finding IDs and hidden session metadata that makes reports chat-capable.
|
|
32
|
-
- **Durable Findings (0.3)**: Persists reviews and findings in `.diffowl/state.db` with stable `fnd_*` IDs, occurrence tracking, and lifecycle commands for fix, dismiss, defer, and reopen.
|
|
33
|
-
- **Agent-Assisted Resolution**: Includes an optional portable skill that lets coding agents investigate findings, fix confirmed issues, record dismissals, and archive handled reports.
|
|
34
|
-
- **Hook Log Retention**: Bounds accumulated hook logs without deleting review history.
|
|
35
|
-
|
|
36
|
-
---
|
|
37
|
-
|
|
38
|
-
## Quick Start
|
|
39
|
-
|
|
40
|
-
### 1. Prerequisites
|
|
41
|
-
|
|
42
|
-
1. **Verify Node.js 22.14.0 or newer is installed**:
|
|
43
|
-
```bash
|
|
44
|
-
node --version
|
|
45
|
-
```
|
|
46
|
-
2. **Install OpenCode CLI**:
|
|
47
|
-
```bash
|
|
48
|
-
npm install --global opencode-ai
|
|
49
|
-
```
|
|
50
|
-
3. **Authenticate a provider and confirm a model is available**:
|
|
51
|
-
```bash
|
|
52
|
-
opencode
|
|
53
|
-
```
|
|
54
|
-
In OpenCode, connect or authenticate a provider such as GitHub Copilot, OpenAI, or Ollama. Confirm that at least one model is available before continuing.
|
|
55
|
-
|
|
56
|
-
### 2. Install DiffOwl
|
|
10
|
+
Review agent-written code with a second model before it ships.
|
|
57
11
|
|
|
58
|
-
|
|
59
|
-
npm install --global diffowl
|
|
60
|
-
```
|
|
12
|
+
DiffOwl is a local code review CLI. It builds focused context from a Git diff, sends that context to a model through [OpenCode](https://opencode.ai/docs/server/), and records actionable findings in your repository.
|
|
61
13
|
|
|
62
|
-
|
|
14
|
+
It works with changes from any coding agent or human. You choose the model and provider through OpenCode. DiffOwl does not require an account, another API key, or a hosted DiffOwl service.
|
|
63
15
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
```bash
|
|
67
|
-
diffowl init
|
|
68
|
-
```
|
|
16
|
+
## Why DiffOwl
|
|
69
17
|
|
|
70
|
-
|
|
18
|
+
The agent that wrote a change should not be its only reviewer. Asking it to review its own work can repeat the same assumptions that produced the bug.
|
|
71
19
|
|
|
72
|
-
|
|
73
|
-
2. Fetch your connected providers and active models.
|
|
74
|
-
3. Allow you to select a model interactively.
|
|
75
|
-
4. Generate a `.diffowl.yml` configuration file in the current project.
|
|
20
|
+
DiffOwl adds an independent pass between writing code and shipping it:
|
|
76
21
|
|
|
77
|
-
|
|
78
|
-
|
|
22
|
+
- Review the last commit, staged changes, a specific commit, or a whole branch.
|
|
23
|
+
- Use any model already connected to OpenCode, including local models.
|
|
24
|
+
- Give the reviewer bounded local context instead of dumping the entire repository into a prompt.
|
|
25
|
+
- Keep findings after the review ends, with stable IDs and lifecycle states.
|
|
26
|
+
- Reopen the review session when a finding needs more investigation.
|
|
27
|
+
- Run reviews automatically after commits without blocking them.
|
|
79
28
|
|
|
80
|
-
|
|
29
|
+
TypeScript reviews include changed AST symbols, related tests, file excerpts, and bounded call-flow context. Other languages still get diff-centered review with targeted repository exploration.
|
|
81
30
|
|
|
82
|
-
|
|
83
|
-
diffowl review
|
|
84
|
-
```
|
|
31
|
+
## How it works
|
|
85
32
|
|
|
86
|
-
|
|
33
|
+
1. DiffOwl reads the Git change you selected.
|
|
34
|
+
2. It filters files and assembles relevant local context.
|
|
35
|
+
3. A separate model reviews the change through a headless OpenCode session.
|
|
36
|
+
4. DiffOwl writes a Markdown report and persists findings in SQLite.
|
|
37
|
+
5. You inspect the findings, continue the review chat, or hand them to a coding agent for resolution.
|
|
87
38
|
|
|
88
|
-
|
|
39
|
+
The orchestration and state stay in your repository. Review context is sent to the provider you selected in OpenCode.
|
|
89
40
|
|
|
90
|
-
|
|
91
|
-
2. Connect or re-authenticate the provider and confirm the configured model is available.
|
|
92
|
-
3. Retry with `diffowl review`.
|
|
41
|
+
## Quick start
|
|
93
42
|
|
|
94
|
-
|
|
43
|
+
You need Node.js 22.14.0 or newer and an authenticated [OpenCode](https://opencode.ai/) provider.
|
|
95
44
|
|
|
96
45
|
```bash
|
|
97
|
-
|
|
46
|
+
npm install --global opencode-ai
|
|
47
|
+
opencode
|
|
98
48
|
```
|
|
99
49
|
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
## Resolve Findings With an Agent
|
|
103
|
-
|
|
104
|
-
DiffOwl can use an inexpensive model for review generation while a stronger coding agent verifies and resolves the resulting findings. The optional `diffowl-resolve` skill works with agents that support the open [Agent Skills](https://skills.sh/) format.
|
|
105
|
-
|
|
106
|
-
### Install the skill
|
|
107
|
-
|
|
108
|
-
Install the `diffowl-resolve` skill:
|
|
50
|
+
Connect a provider in OpenCode, then install and initialize DiffOwl:
|
|
109
51
|
|
|
110
52
|
```bash
|
|
111
|
-
|
|
53
|
+
npm install --global diffowl
|
|
54
|
+
cd your-repository
|
|
55
|
+
diffowl init
|
|
112
56
|
```
|
|
113
57
|
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
### Use the skill
|
|
58
|
+
`diffowl init` finds your available OpenCode models, lets you choose one, and writes `.diffowl.yml`.
|
|
117
59
|
|
|
118
|
-
|
|
60
|
+
Review the last commit:
|
|
119
61
|
|
|
120
62
|
```bash
|
|
121
|
-
diffowl
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
Then ask your coding agent in plain language:
|
|
125
|
-
|
|
126
|
-
```text
|
|
127
|
-
Resolve the latest DiffOwl review.
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
Other useful prompts:
|
|
131
|
-
|
|
132
|
-
```text
|
|
133
|
-
Investigate finding 2 in the latest DiffOwl review.
|
|
134
|
-
Resolve all open DiffOwl reviews.
|
|
135
|
-
Resolve the latest 3 DiffOwl reviews.
|
|
136
|
-
Check whether the older DiffOwl findings have already been fixed.
|
|
137
|
-
Archive fully resolved DiffOwl reviews.
|
|
63
|
+
diffowl
|
|
138
64
|
```
|
|
139
65
|
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
1. Treat findings as candidates and verify them against the current code.
|
|
143
|
-
2. Fix confirmed issues using the repository's normal workflow.
|
|
144
|
-
3. For durable findings (0.3+), record lifecycle status with `diffowl findings fix`, `dismiss`, or `defer`.
|
|
145
|
-
4. For legacy reports, mark findings as fixed, already fixed, agent dismissed, user dismissed, deferred, or open in a `## Resolution` checklist.
|
|
146
|
-
5. Append or merge resolution state without rewriting the generated review body.
|
|
147
|
-
6. Move fully handled timestamped reports into `.diffowl/reviews/resolved/` when every finding is complete.
|
|
148
|
-
|
|
149
|
-
`latest.md` is only a copy of the newest report and is overwritten by future reviews. Markdown reports from 0.3+ are immutable snapshots; SQLite is the authoritative backlog for durable findings.
|
|
150
|
-
|
|
151
|
-
For legacy pre-0.3 reports, resolution state is appended under `## Resolution`. To reopen the OpenCode session for an archived report, pass its explicit path:
|
|
66
|
+
Or review work before committing:
|
|
152
67
|
|
|
153
68
|
```bash
|
|
154
|
-
|
|
69
|
+
git add -p
|
|
70
|
+
diffowl review --staged
|
|
155
71
|
```
|
|
156
72
|
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
| Status | Meaning | Complete? |
|
|
160
|
-
| --------------- | ------------------------------------------------------------- | --------- |
|
|
161
|
-
| Fixed | The agent changed code or configuration and verified the fix. | Yes |
|
|
162
|
-
| Already fixed | Current code no longer exhibits the reported issue. | Yes |
|
|
163
|
-
| Agent dismissed | Investigation showed the finding was noise or incorrect. | Yes |
|
|
164
|
-
| User dismissed | You explicitly chose not to address the finding. | Yes |
|
|
165
|
-
| Deferred | The issue is valid but intentionally left for later. | No |
|
|
166
|
-
| Open | The finding has not been fully investigated. | No |
|
|
73
|
+
The latest report is written to `.diffowl/reviews/latest.md`.
|
|
167
74
|
|
|
168
|
-
|
|
75
|
+
## Choose what to review
|
|
169
76
|
|
|
170
|
-
|
|
77
|
+
| Command | Reviews |
|
|
78
|
+
| ------------------------------- | ------------------------------------------------- |
|
|
79
|
+
| `diffowl` | The last commit |
|
|
80
|
+
| `diffowl review --staged` | Staged changes |
|
|
81
|
+
| `diffowl review --commit <ref>` | One commit |
|
|
82
|
+
| `diffowl review --base` | Committed branch changes since the default branch |
|
|
83
|
+
| `diffowl review --base <ref>` | Committed branch changes since an explicit base |
|
|
171
84
|
|
|
172
|
-
|
|
173
|
-
- **The agent does not load the skill:** Verify project installation with `npx skills list` or global installation with `npx skills list --global`, then restart or reload the agent.
|
|
174
|
-
- **The skill is installed for the wrong agent:** Reinstall with `--agent <agent-name>`, or use `--agent '*'` to install for every detected agent.
|
|
175
|
-
- **A hook review timed out:** Run the retry command shown by the next foreground DiffOwl command, or retry manually with `diffowl review --commit <sha> --depth shallow`.
|
|
176
|
-
- **You prefer manual resolution:** Edit code normally; the skill is optional and does not affect the DiffOwl CLI.
|
|
85
|
+
Useful review options:
|
|
177
86
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
### `diffowl` (or `diffowl review`)
|
|
87
|
+
```bash
|
|
88
|
+
# Faster review with less context
|
|
89
|
+
diffowl review --staged --depth shallow
|
|
183
90
|
|
|
184
|
-
|
|
91
|
+
# Use a different model once
|
|
92
|
+
diffowl review --staged --model openai/gpt-5.6-luna
|
|
185
93
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
- `--commit <ref>`: Reviews a specific commit ref instead of the last commit.
|
|
189
|
-
- `--hook`: Runs in background, non-blocking mode (used by Git hook).
|
|
190
|
-
- `--depth <depth>`: Overrides configured review depth. Valid values: `shallow`, `default`.
|
|
191
|
-
- `--reasoning <effort>`: Overrides configured OpenCode reasoning variant. Valid values: `auto`, `none`, `minimal`, `low`, `medium`, `high`, `max`, `xhigh`.
|
|
192
|
-
- `--verbose`: Includes suppressed findings and extra review details in the report.
|
|
193
|
-
- `--format <format>`: Output format: `text` (default) or `json`. JSON writes a versioned document to stdout and persists SQLite state.
|
|
94
|
+
# Emit a versioned JSON document for scripts
|
|
95
|
+
diffowl review --base --format json
|
|
194
96
|
|
|
195
|
-
|
|
97
|
+
# Exit 1 when actionable findings remain
|
|
98
|
+
diffowl review --base --fail-on-findings
|
|
99
|
+
```
|
|
196
100
|
|
|
197
|
-
|
|
101
|
+
Branch review uses the merge base through `HEAD`, matching the committed diff in a pull request. It does not include staged or unstaged changes.
|
|
198
102
|
|
|
199
|
-
|
|
103
|
+
## Work with findings
|
|
200
104
|
|
|
201
|
-
|
|
202
|
-
- `default`: Normal review. Includes changed TypeScript AST symbols, small file excerpts, related tests, and bounded Potential Call Flow snippets from `git grep`. Permissionless read/search tools are enabled for targeted exploration when context is incomplete; permission prompts are rejected.
|
|
105
|
+
DiffOwl stores durable findings in `.diffowl/state.db`. A finding stays open until someone records what happened to it. A later model review that fails to mention it does not silently mark it fixed.
|
|
203
106
|
|
|
204
107
|
```bash
|
|
205
|
-
#
|
|
206
|
-
diffowl
|
|
207
|
-
|
|
208
|
-
# Review staged files
|
|
209
|
-
diffowl review --staged
|
|
210
|
-
|
|
211
|
-
# Review a specific commit
|
|
212
|
-
diffowl review --commit abc1234
|
|
108
|
+
# List unresolved findings
|
|
109
|
+
diffowl findings
|
|
213
110
|
|
|
214
|
-
#
|
|
215
|
-
diffowl
|
|
111
|
+
# Inspect a finding by ID, ID prefix, or latest:N
|
|
112
|
+
diffowl findings show fnd_abc
|
|
216
113
|
|
|
217
|
-
#
|
|
218
|
-
diffowl
|
|
114
|
+
# Record the outcome
|
|
115
|
+
diffowl findings fix fnd_abc --note "Added a null guard." --verified-by "pnpm run test"
|
|
116
|
+
diffowl findings dismiss fnd_abc --reason "The caller already validates this value."
|
|
117
|
+
diffowl findings defer fnd_abc --reason "Blocked by an upstream change."
|
|
118
|
+
diffowl findings reopen fnd_abc --reason "The bug returned in a new path."
|
|
219
119
|
```
|
|
220
120
|
|
|
221
|
-
|
|
121
|
+
Use `--format json` with `findings list`, `show`, or `summary` when another tool needs the backlog.
|
|
222
122
|
|
|
223
|
-
|
|
123
|
+
To continue the conversation behind a review:
|
|
224
124
|
|
|
225
125
|
```bash
|
|
226
|
-
|
|
227
|
-
diffowl
|
|
228
|
-
|
|
229
|
-
# Manually set a model
|
|
230
|
-
diffowl model opencode/big-pickle
|
|
126
|
+
diffowl chat
|
|
127
|
+
diffowl chat .diffowl/reviews/review-<timestamp>.md
|
|
231
128
|
```
|
|
232
129
|
|
|
233
|
-
|
|
130
|
+
## Resolve findings with a coding agent
|
|
234
131
|
|
|
235
|
-
|
|
132
|
+
The optional `diffowl-resolve` skill lets a coding agent investigate findings instead of accepting the review at face value. It verifies each candidate against the current code, fixes confirmed problems, records dismissals or deferrals, and preserves the report history.
|
|
236
133
|
|
|
237
134
|
```bash
|
|
238
|
-
|
|
239
|
-
|
|
135
|
+
npx skills add gutierrezje/diffowl --skill diffowl-resolve
|
|
136
|
+
```
|
|
240
137
|
|
|
241
|
-
|
|
242
|
-
diffowl chat review-2026-06-07T07-30-42-762Z.md
|
|
138
|
+
Restart or reload the agent, then ask:
|
|
243
139
|
|
|
244
|
-
|
|
245
|
-
|
|
140
|
+
```text
|
|
141
|
+
Resolve the latest DiffOwl review.
|
|
246
142
|
```
|
|
247
143
|
|
|
248
|
-
|
|
144
|
+
You can also ask it to investigate one finding, resolve every open review, or archive reports whose findings are fully handled.
|
|
249
145
|
|
|
250
|
-
|
|
146
|
+
## Run reviews automatically
|
|
251
147
|
|
|
252
|
-
|
|
148
|
+
Install the non-blocking post-commit hook:
|
|
253
149
|
|
|
254
150
|
```bash
|
|
255
|
-
# Install non-blocking post-commit review hook
|
|
256
151
|
diffowl hook install
|
|
257
|
-
|
|
258
|
-
# Check whether the hook is installed and up to date
|
|
259
|
-
diffowl hook status
|
|
260
|
-
|
|
261
|
-
# Uninstall the hook
|
|
262
|
-
diffowl hook uninstall
|
|
263
152
|
```
|
|
264
153
|
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
Only one hook review runs per project at a time. Each commit is recorded under `.diffowl/pending-reviews/`, and a background worker processes pending commits in order. Successful reviews remove their marker; failed reviews remain pending and are retried when a later commit triggers the hook. Review failures are recorded with their commit SHA in `.diffowl/last-hook-status.json` and reported on the next foreground review with commands to retry at default or shallow depth. Result files without a matching pending marker are removed automatically.
|
|
268
|
-
|
|
269
|
-
### `diffowl server start | stop | status`
|
|
270
|
-
|
|
271
|
-
Manually manage the OpenCode server lifecycle.
|
|
154
|
+
The hook queues each commit, returns control to the terminal, and writes output to `.diffowl/hook.log`. Failed reviews remain pending and retry after a later commit.
|
|
272
155
|
|
|
273
156
|
```bash
|
|
274
|
-
|
|
275
|
-
diffowl
|
|
276
|
-
|
|
277
|
-
# Start it manually
|
|
278
|
-
diffowl server start
|
|
279
|
-
|
|
280
|
-
# Stop the server
|
|
281
|
-
diffowl server stop
|
|
157
|
+
diffowl hook status
|
|
158
|
+
diffowl hook uninstall
|
|
282
159
|
```
|
|
283
160
|
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
Inspect and manage the durable findings backlog stored in the repo's shared `.diffowl/state.db`.
|
|
161
|
+
Claude Code users can also show the current finding summary when a session starts:
|
|
287
162
|
|
|
288
163
|
```bash
|
|
289
|
-
|
|
290
|
-
diffowl findings
|
|
291
|
-
|
|
292
|
-
# Inspect one finding by full id, id prefix, or latest:N
|
|
293
|
-
diffowl findings show fnd_abc --format json
|
|
294
|
-
|
|
295
|
-
# Mark fixed after verification
|
|
296
|
-
diffowl findings fix fnd_abc --note "Added null guard." --verified-by "pnpm run test"
|
|
297
|
-
|
|
298
|
-
# Dismiss a false positive
|
|
299
|
-
diffowl findings dismiss fnd_abc --reason "Guarded by caller."
|
|
300
|
-
|
|
301
|
-
# Defer intentionally
|
|
302
|
-
diffowl findings defer fnd_abc --reason "Needs upstream change."
|
|
303
|
-
|
|
304
|
-
# Reopen a previously fixed or dismissed finding
|
|
305
|
-
diffowl findings reopen fnd_abc --reason "Regression in new path."
|
|
164
|
+
diffowl agent-hook install --client claude
|
|
306
165
|
```
|
|
307
166
|
|
|
308
|
-
|
|
167
|
+
## Configuration
|
|
309
168
|
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
## Configuration (`.diffowl.yml`)
|
|
313
|
-
|
|
314
|
-
Your `.diffowl.yml` configures everything for DiffOwl in your project:
|
|
169
|
+
Project review policy lives in `.diffowl.yml`. Model selection is personal and stays in the shared, gitignored `.diffowl/preferences.yml`.
|
|
315
170
|
|
|
316
171
|
```yaml
|
|
317
|
-
# Model to use for reviews (provider/model)
|
|
318
|
-
model: opencode/big-pickle
|
|
319
|
-
|
|
320
|
-
# OpenCode server settings
|
|
321
|
-
server:
|
|
322
|
-
port: 4096
|
|
323
|
-
auto_start: true
|
|
324
|
-
|
|
325
|
-
# Local review context strategy: shallow or default
|
|
326
172
|
context:
|
|
327
173
|
depth: default
|
|
328
174
|
|
|
329
|
-
# OpenCode model variant for reasoning/thinking effort.
|
|
330
|
-
# auto leaves the selected model/provider default alone.
|
|
331
175
|
reasoning:
|
|
332
176
|
effort: auto
|
|
333
177
|
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
# Before each hook review, retain approximately this many KiB
|
|
337
|
-
# of previous hook.log output. The new run may exceed this target.
|
|
338
|
-
hook_log_kb: 1024
|
|
178
|
+
gate:
|
|
179
|
+
fail_on_findings: false
|
|
339
180
|
|
|
340
|
-
# Review timeout in seconds
|
|
341
181
|
timeout: 300
|
|
342
|
-
|
|
343
|
-
# Minimum confidence level of findings to report: low, medium, or high
|
|
344
182
|
min_confidence: medium
|
|
345
|
-
|
|
346
|
-
# Skip reviews when every changed file is documentation-like
|
|
347
183
|
skip_doc_only: false
|
|
348
184
|
|
|
349
|
-
# Include suppressed outside-file findings and extra details in reports
|
|
350
|
-
verbose: false
|
|
351
|
-
|
|
352
|
-
# Review scope
|
|
353
185
|
include:
|
|
354
186
|
- "src/**/*"
|
|
355
|
-
- "lib/**/*"
|
|
356
187
|
|
|
357
188
|
exclude:
|
|
358
189
|
- "**/*.test.*"
|
|
359
|
-
- "**/*.spec.*"
|
|
360
190
|
- "**/*.lock"
|
|
361
|
-
- "**/node_modules/**"
|
|
362
191
|
- "**/dist/**"
|
|
363
|
-
- "**/build/**"
|
|
364
192
|
|
|
365
|
-
# Custom project-specific review rules
|
|
366
193
|
rules:
|
|
367
|
-
- "
|
|
368
|
-
- "
|
|
369
|
-
- "Suggest readability and architectural improvements where relevant"
|
|
370
|
-
```
|
|
371
|
-
|
|
372
|
-
---
|
|
373
|
-
|
|
374
|
-
## Review Files
|
|
375
|
-
|
|
376
|
-
Each completed review starts with a timestamped report and an ephemeral `latest.md` copy. Durable state and reports are anchored to the repository's primary checkout, so linked Git worktrees share one backlog. Checkout-scoped runtime files such as hook status, hook logs, and `server.pid` stay in that checkout's local `.diffowl/`. The optional resolution skill moves fully handled timestamped reports into the resolved archive:
|
|
377
|
-
|
|
378
|
-
```text
|
|
379
|
-
.diffowl/state.db # Authoritative review and finding state (0.3+)
|
|
380
|
-
.diffowl/reviews/review-<timestamp>.md # Immutable markdown export snapshot
|
|
381
|
-
.diffowl/reviews/latest.md # Ephemeral copy of the newest report
|
|
382
|
-
.diffowl/reviews/resolved/review-<timestamp>.md # Fully handled report archived by the skill
|
|
194
|
+
- "Flag hardcoded secrets."
|
|
195
|
+
- "Check authorization at every write boundary."
|
|
383
196
|
```
|
|
384
197
|
|
|
385
|
-
|
|
198
|
+
Choose or change your model without editing project policy:
|
|
386
199
|
|
|
387
|
-
```
|
|
388
|
-
|
|
389
|
-
diffowl
|
|
390
|
-
|
|
391
|
-
review_id: rev_...
|
|
392
|
-
session_id: ses_...
|
|
393
|
-
project_root: /path/to/project
|
|
394
|
-
---
|
|
200
|
+
```bash
|
|
201
|
+
diffowl model
|
|
202
|
+
diffowl model provider/model
|
|
203
|
+
diffowl model --reset
|
|
395
204
|
```
|
|
396
205
|
|
|
397
|
-
|
|
206
|
+
Configuration is deep-merged with defaults, so the file only needs the settings your repository changes.
|
|
398
207
|
|
|
399
|
-
|
|
400
|
-
#### Finding 1 (`fnd_...`) — **new**
|
|
208
|
+
## Files DiffOwl creates
|
|
401
209
|
|
|
402
|
-
|
|
403
|
-
|
|
210
|
+
```text
|
|
211
|
+
.diffowl.yml # Committed project policy
|
|
212
|
+
.diffowl/preferences.yml # Gitignored personal model choice
|
|
213
|
+
.diffowl/state.db # Authoritative findings backlog
|
|
214
|
+
.diffowl/reviews/review-<timestamp>.md # Immutable review snapshot
|
|
215
|
+
.diffowl/reviews/latest.md # Copy of the newest report
|
|
216
|
+
.diffowl/reviews/resolved/ # Reports archived by the resolution skill
|
|
404
217
|
```
|
|
405
218
|
|
|
406
|
-
|
|
219
|
+
Linked Git worktrees share the durable backlog and review reports from the primary checkout. Runtime files such as hook logs and server state remain checkout-specific.
|
|
220
|
+
|
|
221
|
+
## Command reference
|
|
407
222
|
|
|
408
|
-
|
|
223
|
+
| Command | Purpose |
|
|
224
|
+
| -------------------- | ------------------------------------------- |
|
|
225
|
+
| `diffowl init` | Configure DiffOwl in the current repository |
|
|
226
|
+
| `diffowl review` | Run a review |
|
|
227
|
+
| `diffowl model` | View or change the selected model |
|
|
228
|
+
| `diffowl findings` | Inspect and update durable findings |
|
|
229
|
+
| `diffowl chat` | Reopen an OpenCode review session |
|
|
230
|
+
| `diffowl hook` | Manage the post-commit hook |
|
|
231
|
+
| `diffowl agent-hook` | Manage supported agent client hooks |
|
|
232
|
+
| `diffowl server` | Manage the local OpenCode server |
|
|
409
233
|
|
|
410
|
-
|
|
411
|
-
- **New reviews persist state**: After upgrading, each `diffowl review` writes both SQLite state and a markdown snapshot.
|
|
412
|
-
- **Backlog semantics change**: Use `diffowl findings` for the unresolved backlog. Markdown `### Status` reflects the review snapshot only.
|
|
413
|
-
- **Resolution workflow**: Prefer `diffowl findings fix|dismiss|defer` over editing report checklists when durable findings exist. Never mark fixed without recorded verification (`--verified-by`).
|
|
414
|
-
- **Not in 0.3**: Semantic deduplication beyond fingerprint matching, automatic resolution when findings disappear, legacy report migration, retention cleanup, and SARIF export.
|
|
234
|
+
Run `diffowl <command> --help` for every option.
|
|
415
235
|
|
|
416
|
-
|
|
236
|
+
## Troubleshooting
|
|
417
237
|
|
|
418
|
-
|
|
238
|
+
- No models found: run `opencode`, connect or re-authenticate a provider, then rerun `diffowl init`.
|
|
239
|
+
- Review timed out: retry with `diffowl review --depth shallow`.
|
|
240
|
+
- Hook review failed: run the retry command shown by the next foreground DiffOwl command, or inspect `.diffowl/hook.log`.
|
|
241
|
+
- Agent did not load `diffowl-resolve`: verify it with `npx skills list`, then restart or reload the agent.
|
|
419
242
|
|
|
420
|
-
|
|
243
|
+
## Develop locally
|
|
421
244
|
|
|
422
245
|
```bash
|
|
423
246
|
git clone https://github.com/gutierrezje/diffowl.git
|
|
@@ -427,23 +250,14 @@ pnpm run build
|
|
|
427
250
|
pnpm link --global
|
|
428
251
|
```
|
|
429
252
|
|
|
430
|
-
|
|
253
|
+
Run the checks:
|
|
431
254
|
|
|
432
255
|
```bash
|
|
433
|
-
pnpm run
|
|
434
|
-
|
|
435
|
-
diffowl review --staged
|
|
256
|
+
pnpm run lint
|
|
257
|
+
pnpm run test
|
|
436
258
|
```
|
|
437
259
|
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
```bash
|
|
441
|
-
DIFFOWL_INTEGRATION=1 pnpm exec vitest run src/opencode/models.integration.test.ts
|
|
442
|
-
```
|
|
443
|
-
|
|
444
|
-
Set `DIFFOWL_OPENCODE_PORT` when the server uses a different port. This live test is skipped during the normal test suite.
|
|
445
|
-
|
|
446
|
-
---
|
|
260
|
+
After changing `src/**`, rebuild before testing the globally linked `diffowl` command.
|
|
447
261
|
|
|
448
262
|
## License
|
|
449
263
|
|