opencode-azure-devops-pr-review 0.3.1 → 0.3.2

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 (48) hide show
  1. package/CHANGELOG.md +21 -0
  2. package/README.md +122 -80
  3. package/package.json +2 -11
  4. package/src/attribution.mjs +2 -2
  5. package/AGENTS.md +0 -164
  6. package/CODE_OF_CONDUCT.md +0 -83
  7. package/CONTRIBUTING.md +0 -84
  8. package/SECURITY.md +0 -38
  9. package/config/settings.example.json +0 -55
  10. package/config/settings.schema.json +0 -316
  11. package/docs/ARCHITECTURE.md +0 -414
  12. package/docs/AZURE_DEVOPS.md +0 -217
  13. package/docs/COMMENTING.md +0 -399
  14. package/docs/DEBUGGING.md +0 -146
  15. package/docs/DEMO.md +0 -195
  16. package/docs/ENTERPRISE.md +0 -236
  17. package/docs/QUICKSTART.md +0 -238
  18. package/docs/RELEASING.md +0 -95
  19. package/docs/ROADMAP.md +0 -241
  20. package/docs/VALIDATION.md +0 -2127
  21. package/docs/VALIDATION_HISTORY.md +0 -1845
  22. package/docs/VERIFICATION.md +0 -42
  23. package/docs/assets/RECORDING.md +0 -131
  24. package/docs/assets/adjust-findings-teaser.gif +0 -0
  25. package/docs/assets/adjust-preview.png +0 -0
  26. package/docs/assets/adjust-publication.png +0 -0
  27. package/docs/assets/example-comments.md +0 -38
  28. package/docs/assets/generate-demo-gif.py +0 -25
  29. package/docs/assets/generate-demo.mjs +0 -141
  30. package/docs/assets/live-azure-readback.png +0 -0
  31. package/docs/assets/live-preview.png +0 -0
  32. package/docs/assets/live-review-teaser.gif +0 -0
  33. package/docs/assets/live-review.png +0 -0
  34. package/docs/assets/quick-review-demo.gif +0 -0
  35. package/docs/assets/record-terminal.py +0 -124
  36. package/docs/assets/render-terminal-demo.py +0 -168
  37. package/docs/assets/review-example.svg +0 -1
  38. package/docs/assets/walkthrough.svg +0 -1
  39. package/docs/releases/v0.1.0.md +0 -74
  40. package/docs/releases/v0.2.0.md +0 -107
  41. package/docs/releases/v0.2.1.md +0 -65
  42. package/docs/releases/v0.2.2.md +0 -76
  43. package/docs/releases/v0.2.3.md +0 -93
  44. package/docs/releases/v0.3.0.md +0 -125
  45. package/docs/releases/v0.3.1.md +0 -87
  46. package/install.sh +0 -171
  47. package/scripts/merge-settings.py +0 -120
  48. package/uninstall.sh +0 -50
package/CHANGELOG.md CHANGED
@@ -1,5 +1,26 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.3.2 — 2026-10-30
4
+
5
+ - The README starts with actual Azure DevOps output: an inline comment with its
6
+ code context and, in an expandable section, the complete PR summary from the
7
+ same review. The first-review steps come before the 15-second recording, and
8
+ a documentation table points to the guide for each task. The demo records how
9
+ the screenshots were captured and edited, and lists the pictured comment
10
+ bodies as text.
11
+ - Receipts say that COMPLETE means no source-commit change was detected. A
12
+ final version recheck that fails adds a warning and leaves the review
13
+ COMPLETE; publication still rechecks the PR before posting.
14
+ - The npm package contains only the runtime, README, changelog and license:
15
+ 32 files and about 170 KB instead of 76 files and 1.35 MB. Documentation,
16
+ media, installers, the settings example and schema and the repository guides
17
+ remain in the repository and the source archive; npmjs.com shows the
18
+ README's links and images from GitHub.
19
+ - The README and architecture guide list the commands that answer without a
20
+ background run, the README and commenting guide state that repeating the
21
+ saved adjustments plans nothing, and the architecture guide counts AZPR's
22
+ six tools.
23
+
3
24
  ## 0.3.1 — 2026-10-27
4
25
 
5
26
  - Installation and upgrades are documented as they behave on OpenCode 2.1.4:
package/README.md CHANGED
@@ -7,54 +7,38 @@
7
7
 
8
8
  **Review Azure DevOps pull requests from a URL. No checkout required.**
9
9
 
10
- Review pull requests across your configured Azure DevOps organization with your
11
- own OpenCode models, without cloning each repository. Preview the comments,
12
- leave out findings or change their severity, and publish when you are ready.
13
- No MCP server or CI pipeline setup is required.
10
+ Use your own OpenCode models to review code, inspect the proposed comments,
11
+ and choose what gets published. No MCP server or CI pipeline setup is required.
14
12
 
15
13
  AZPR is an independent community project. It is not built by or affiliated with
16
14
  the OpenCode team.
17
15
 
18
- [Get started](docs/QUICKSTART.md) · [See the demo](docs/DEMO.md) ·
19
- [Team setup and data handling](docs/ENTERPRISE.md) ·
20
- [Validation and limitations](docs/VALIDATION.md) ·
21
- [Download v0.3.1](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.3.1)
16
+ [Get started](#your-first-review) · [15-second recording](#watch-the-workflow) ·
17
+ [Full demo](docs/DEMO.md) · [Documentation](#documentation)
22
18
 
23
- [![Real OpenCode run on a dedicated Azure DevOps test PR: a preview with three verified findings, one finding excluded and one lowered to low, the new preview, and publication read back from Azure DevOps.](docs/assets/adjust-findings-teaser.gif)](docs/DEMO.md)
19
+ ## See the review in Azure DevOps
24
20
 
25
- *A 15-second edit of a real OpenCode 2.1.4 run: exclude one finding, lower
26
- another to low, read the new preview, then publish. Waiting time is shortened.
27
- Read the [demo and recording details](docs/DEMO.md), or watch the earlier
28
- [73-second walkthrough](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/download/v0.2.0/azpr-live-demo.mp4)
29
- of a review, preview and publication.*
21
+ Findings include a source location, evidence and a suggested fix. Preview the
22
+ planned comments in OpenCode, then publish them as inline comments and a PR
23
+ summary.
30
24
 
31
- ## Why AZPR?
25
+ [![Actual Azure DevOps inline comment on fulfillment.py: the changed line replaces a deep copy with a shallow copy; the review explains the shared-state defect, cites evidence and suggests a fix.](docs/assets/azure-inline-review.png)](docs/assets/azure-inline-review.png)
32
26
 
33
- - **You decide what gets posted.** Preview the AI's comments, exclude findings
34
- you don't want to publish, and adjust severity. AZPR prepares a new preview
35
- without rerunning the review. Read it, then publish when ready. Your original
36
- review stays intact.
37
- - **Publish safely.** AZPR rechecks the PR head, skips matching comments it
38
- already posted, and reads new comments back. Automatic publication is opt-in.
39
- - **Follow the code beyond the diff.** Reviewers can look up definitions,
40
- callers and tests using file reads and text search at the selected PR commit,
41
- without depending on an Azure Code Search index.
42
- - **Give findings a separate check.** Functional and risk reviewers propose
43
- findings; independent verifier sessions re-read the source and look for
44
- counterevidence. Quick mode skips this second check when you want a lighter
45
- pass.
46
- - **Choose where to spend model effort.** Assign different OpenCode models to
47
- functional review, risk review and verification, or use one model for all
48
- roles. Keep a stronger model profile for selected PRs with `/pr-deep`.
49
- - **Configure the Azure connection for your network.** Set a forward proxy and
50
- additional CA certificates for AZPR's Azure DevOps requests. Model-provider
51
- connections remain configured in OpenCode.
52
-
53
- Content search downloads a bounded repository archive into memory; source
54
- context is sent through your selected model providers, and review records are
55
- saved locally. See [content-search limits](docs/AZURE_DEVOPS.md#who-calls-what)
56
- for archive and file-size bounds, and [team setup and data handling](docs/ENTERPRISE.md)
57
- for proxy authentication and retention.
27
+ *Actual output on a dedicated test PR with seeded defects, from a different run
28
+ than the recording below. The image joins cropped excerpts of the diff and the
29
+ comment, with identifying UI removed; code and review text are unchanged. It
30
+ shows the output format, not review accuracy. Click the image to enlarge, or
31
+ [read the pictured comments and capture details](docs/DEMO.md#actual-azure-devops-comments).*
32
+
33
+ <details>
34
+ <summary>See the complete PR summary from the same review</summary>
35
+
36
+ [![Actual Azure DevOps PR summary: zero high, three medium and zero low findings, with a review note and a finding index pointing to fulfillment.py lines 24, 29 and 37.](docs/assets/azure-review-summary.png)](docs/assets/azure-review-summary.png)
37
+
38
+ The summary keeps the full finding index in one place. Like the image above, it
39
+ is an actual capture excerpt with identifying UI removed and its text unchanged.
40
+
41
+ </details>
58
42
 
59
43
  ## Your first review
60
44
 
@@ -63,7 +47,7 @@ for proxy authentication and retention.
63
47
  [company networks](docs/ENTERPRISE.md#company-networks) first):
64
48
 
65
49
  ```sh
66
- opencode plugin add opencode-azure-devops-pr-review@0.3.1
50
+ opencode plugin add opencode-azure-devops-pr-review@0.3.2
67
51
  ```
68
52
 
69
53
  2. Follow the [quickstart](docs/QUICKSTART.md) to save your PAT in a private
@@ -81,6 +65,11 @@ before starting the review; it uses no model. The review runs functional and ris
81
65
  reviewers, then separate verification. If the completed review has findings to
82
66
  comment on, `--preview` prepares their comments in a separate, cancellable run.
83
67
  **Nothing is posted by these commands.** Previewing comments also uses a model.
68
+ For a lighter first pass, use `/pr-quick <PR URL> --preview`; its findings are
69
+ not independently verified.
70
+
71
+ <details>
72
+ <summary>Optional: adjust findings and publish after reading the preview</summary>
84
73
 
85
74
  Read the report and preview. Before publishing, you can exclude a finding or
86
75
  change its severity using IDs from your report, for example:
@@ -102,8 +91,39 @@ preview as the PAT owner and skips matching comments AZPR already posted. It
102
91
  never edits them; for an adjusted review, the receipt identifies those whose
103
92
  text differs from the new preview. See
104
93
  [adjusting findings](#adjusting-findings-after-a-preview) for how repeating an
105
- option replaces its earlier list. For a lighter first pass, use
106
- `/pr-quick <PR URL> --preview`; its findings are not independently verified.
94
+ option replaces its earlier list.
95
+
96
+ </details>
97
+
98
+ ## Why AZPR?
99
+
100
+ - **Control what gets posted.** Read a preview, exclude findings or change
101
+ severity, then inspect the newly planned comments. The original review stays
102
+ intact. Publication rechecks the PR head, skips matching comments and reads
103
+ new comments back; automatic publication is opt-in.
104
+ - **Read beyond the diff.** Reviewers can follow definitions, callers and
105
+ tests at the selected PR commit, without a local checkout or an Azure Code
106
+ Search index.
107
+ - **Give findings a separate check.** Functional and risk reviewers propose
108
+ findings; verifier sessions re-read the source and look for counterevidence.
109
+ Quick mode skips that independent check for a lighter pass.
110
+ - **Use the models you already have.** Assign models per role, use one model
111
+ for all roles, or configure stronger models for selected PRs with `/pr-deep`.
112
+
113
+ For company networks, configure a proxy and additional CA certificates for
114
+ AZPR's Azure requests; model-provider connections stay in OpenCode. Content
115
+ search downloads a bounded repository archive into memory, source context goes
116
+ to your selected model providers, and review records are saved locally. See
117
+ [team setup and data handling](docs/ENTERPRISE.md) and
118
+ [content-search limits](docs/AZURE_DEVOPS.md#who-calls-what).
119
+
120
+ ## Watch the workflow
121
+
122
+ [![Real OpenCode run: exclude one finding, lower another to low, inspect the new preview, then publish and read the comments back from Azure DevOps.](docs/assets/adjust-findings-teaser.gif)](docs/DEMO.md#adjust-findings-before-publishing)
123
+
124
+ *A 15-second edit of a real OpenCode 2.1.4 session on a dedicated test PR.
125
+ Waiting time is shortened, so the length is not the review duration.
126
+ [Recording details and longer walkthrough](docs/DEMO.md).*
107
127
 
108
128
  ## Choose a review
109
129
 
@@ -162,6 +182,18 @@ same runtime. A fresh installation exposes `/pr-setup` before
162
182
  reviewing is enabled; the [quickstart](docs/QUICKSTART.md) configures one model
163
183
  for both quick and verified reviews.
164
184
 
185
+ ## Documentation
186
+
187
+ | I want to… | Start here |
188
+ | --- | --- |
189
+ | Install AZPR and run a first review | [Step-by-step quickstart](docs/QUICKSTART.md) |
190
+ | Upgrade an existing installation | [Upgrade instructions](#upgrading) |
191
+ | Choose models, language or settings | [Configuration](#configuration) |
192
+ | Adjust, preview or publish comments | [Commenting guide](docs/COMMENTING.md) |
193
+ | Set up a company proxy or understand data handling | [Team setup](docs/ENTERPRISE.md) |
194
+ | Understand what has been tested | [Validation and limitations](docs/VALIDATION.md) |
195
+ | Troubleshoot or contribute | [Debugging](docs/DEBUGGING.md) · [Contributing](CONTRIBUTING.md) |
196
+
165
197
  ## How reviews work
166
198
 
167
199
  <details>
@@ -207,9 +239,12 @@ regressions that the everyday model missed, at many times its cost and time
207
239
  (see [deep versus review](docs/VALIDATION.md#deep-versus-review-2026-10-19)).
208
240
  `/pr-check` says when `/pr-deep` is off or its models repeat the review models.
209
241
 
210
- Every command acknowledges `STARTED` immediately and continues in the current
211
- OpenCode process; short `PROGRESS` notices and a final receipt return to the
212
- invoking conversation. Use the displayed `/pr-stop <run-id>` to cancel.
242
+ Readiness checks, reviews, comment planning, adjustments and publication
243
+ acknowledge `STARTED` and continue in the current OpenCode process; short
244
+ `PROGRESS` notices and a final receipt return to the invoking conversation. Use
245
+ the displayed `/pr-stop <run-id>` to cancel. `/pr-setup` (including `--help`),
246
+ `/pr-stop`, `/pr-comment --show`, an adjustment that changes nothing and a
247
+ refused command answer directly, without a background run.
213
248
  Completed reviews, previews and publication ledgers are saved privately and
214
249
  survive an OpenCode restart.
215
250
 
@@ -228,14 +263,14 @@ Azure DevOps REST API with the runtime's built-in `fetch`.
228
263
  Install the npm package with OpenCode's plugin manager:
229
264
 
230
265
  ```sh
231
- opencode plugin add opencode-azure-devops-pr-review@0.3.1
266
+ opencode plugin add opencode-azure-devops-pr-review@0.3.2
232
267
  ```
233
268
 
234
269
  The same release is also a versioned Git package, which needs Git but not the
235
270
  npm registry:
236
271
 
237
272
  ```sh
238
- opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.1'
273
+ opencode plugin add 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.2'
239
274
  ```
240
275
 
241
276
  Add only one of them. OpenCode 2.1.4 loads the plugin into a running OpenCode
@@ -249,7 +284,7 @@ To select another configuration file, use an absolute path in the host config:
249
284
  ```json
250
285
  {
251
286
  "plugins": [{
252
- "package": "opencode-azure-devops-pr-review@0.3.1",
287
+ "package": "opencode-azure-devops-pr-review@0.3.2",
253
288
  "options": { "settingsFile": "/absolute/path/to/azpr/settings.json" }
254
289
  }]
255
290
  }
@@ -274,7 +309,7 @@ For an entry that `opencode plugin add` created, add the new version and,
274
309
  only when that succeeds, remove the previous one:
275
310
 
276
311
  ```sh
277
- opencode plugin add opencode-azure-devops-pr-review@0.3.1 &&
312
+ opencode plugin add opencode-azure-devops-pr-review@0.3.2 &&
278
313
  opencode plugin remove opencode-azure-devops-pr-review@PREVIOUS_VERSION
279
314
  ```
280
315
 
@@ -297,7 +332,7 @@ configuration needs no new `/pr-setup`. `opencode plugin list` should then
297
332
  show a single `azpr` row with the new version (from 0.3.1, `/pr-check` names
298
333
  it too); if it still shows the previous one, run `opencode service restart`.
299
334
  Exact versions stay pinned, so `opencode plugin update` leaves them unchanged.
300
- See the [0.3.1 release notes](docs/releases/v0.3.1.md) for what changed and the
335
+ See the [0.3.2 release notes](docs/releases/v0.3.2.md) for what changed and the
301
336
  [0.2.0 release notes](docs/releases/v0.2.0.md) for automatic comments, which
302
337
  remain disabled unless you configure `afterReview` or request them with a
303
338
  review command flag.
@@ -307,8 +342,8 @@ review command flag.
307
342
  <details>
308
343
  <summary>Source installation and replacement</summary>
309
344
 
310
- Download the [v0.3.1 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.3.1.tar.gz)
311
- and extract it, or check out tag `v0.3.1`. The installer needs POSIX `sh` and
345
+ Download the [v0.3.2 source archive](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/archive/refs/tags/v0.3.2.tar.gz)
346
+ and extract it, or check out tag `v0.3.2`. The installer needs POSIX `sh` and
312
347
  Python 3's standard library. From that source directory:
313
348
 
314
349
  ```sh
@@ -546,9 +581,9 @@ only. PR content, comments and tool responses are untrusted data.
546
581
 
547
582
  Status meanings:
548
583
 
549
- - **COMPLETE**: verification produced structured decisions and the PR source did
550
- not change. Findings without a usable decision are listed as UNREVIEWED and
551
- are never posted. Only COMPLETE reviews can be commented on.
584
+ - **COMPLETE**: verification produced structured decisions and no source-commit
585
+ change was detected. Findings without a usable decision are listed as
586
+ UNREVIEWED and are never posted. Only COMPLETE reviews can be commented on.
552
587
  - **STALE**: the PR source commit changed during the review; run a new one.
553
588
  - **PARTIAL**: no verification session produced a structured result; initial
554
589
  observations are shown for reference only.
@@ -558,19 +593,24 @@ Status meanings:
558
593
  A quick review states its status, coverage and verification separately; its
559
594
  receipt starts like `[AZPR 1a2b3c4d] COMPLETE; coverage incomplete;
560
595
  verification none (quick review)`. COMPLETE means at least one shard produced a
561
- usable result (a parsed answer is not enough) and the source did not change;
562
- its findings are REPORTED when they passed the runtime's checks (fields, a
563
- location that exists at that commit, a file the session read) and NEEDS_INFO
564
- otherwise, and only REPORTED ones can be commented on. Coverage says whether
565
- every changed file was reviewed, so zero findings never hide unreviewed files.
566
- A quick reviewer whose answer is PARTIAL and names unfinished work is asked
567
- once, in the same session, to continue (receipt `follow-up=completed`,
596
+ usable result (a parsed answer is not enough) and no source-commit change was
597
+ detected; its findings are REPORTED when they passed the runtime's checks
598
+ (fields, a location that exists at that commit, a file the session read) and
599
+ NEEDS_INFO otherwise, and only REPORTED ones can be commented on. Coverage says
600
+ whether every changed file was reviewed, so zero findings never hide unreviewed
601
+ files. A quick reviewer whose answer is PARTIAL and names unfinished work is
602
+ asked once, in the same session, to continue (receipt `follow-up=completed`,
568
603
  `still-partial`, `unusable` or `failed`); a follow-up that fails or gives no
569
604
  usable answer keeps the answer it followed. When the quick review found a
570
605
  high-severity issue or left coverage incomplete, the receipt suggests
571
606
  `/pr-review` before publishing; the hint is advisory, also when automatic
572
607
  publication follows (see [automatic comments](#automatic-comments)).
573
608
 
609
+ A failed final version recheck adds a warning; it does not by itself prevent
610
+ COMPLETE in any review mode. Read the receipt warnings. Publication separately
611
+ rechecks that the PR is active and its source commit is unchanged before
612
+ posting.
613
+
574
614
  ## Comments
575
615
 
576
616
  `/pr-comment` plans one general summary plus inline comments for confirmed high
@@ -597,20 +637,22 @@ its severity, then read the new preview:
597
637
  /pr-comment <review-id> --exclude F-1 --severity F-2=low
598
638
  ```
599
639
 
600
- Each command plans the comments again with a model, so combine both options in
601
- one command when you use both. The comments are planned without the excluded
602
- findings and with the new severities, so their wording may change; the summary
603
- index follows them, and nothing on the PR mentions the adjustment. Each option
604
- replaces its whole saved list: `--exclude F-1` and then `--exclude F-2` excludes
605
- only F-2. A changed severity changes how a finding is published, not the finding
606
- itself; when a finding is wrong, exclude it. Excluding every finding posts
607
- nothing. `--reset` clears the adjustments, and `/pr-comment <review-id> --show`
608
- shows the saved preview without a model. An adjusted review is posted only
609
- from the preview planned after its latest adjustment; once its publication has
610
- started, it is neither adjusted nor planned again. Comments that an earlier
611
- publication put on the PR are never changed: they are skipped as always, and
612
- the receipt of an adjusted review names those whose text differs from the
613
- preview. See [adjusting findings](docs/COMMENTING.md#adjusting-findings-after-a-preview).
640
+ Changed adjustments trigger new model planning when findings remain, so
641
+ combine both options in one command when you use both. Repeating the saved
642
+ adjustments changes nothing and does not plan again. Comments are planned
643
+ without the excluded findings and with the new severities, so their wording
644
+ may change; the summary index follows them, and nothing on the PR mentions the
645
+ adjustment. Each option replaces its whole saved list: `--exclude F-1` and then
646
+ `--exclude F-2` excludes only F-2. A changed severity changes how a finding is
647
+ published, not the finding itself; when a finding is wrong, exclude it.
648
+ Excluding every finding posts nothing. `--reset` clears the adjustments, and
649
+ `/pr-comment <review-id> --show` shows the saved preview without a model. An
650
+ adjusted review is posted only from the preview planned after its latest
651
+ adjustment; once its publication has started, it is neither adjusted nor
652
+ planned again. Comments that an earlier publication put on the PR are never
653
+ changed: they are skipped as always, and the receipt of an adjusted review
654
+ names those whose text differs from the preview. See
655
+ [adjusting findings](docs/COMMENTING.md#adjusting-findings-after-a-preview).
614
656
 
615
657
  ### Automatic comments
616
658
 
@@ -719,8 +761,8 @@ and a loopback fake Azure DevOps REST service in disposable directories under
719
761
  Uninstall without `--apply` previews; `--apply` archives only this package under
720
762
  `azpr-v2-backups` and leaves the private state directory for you to delete.
721
763
  For a native installation, remove the entry you added, for example
722
- `opencode plugin remove opencode-azure-devops-pr-review@0.3.1` or
723
- `opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.1'`;
764
+ `opencode plugin remove opencode-azure-devops-pr-review@0.3.2` or
765
+ `opencode plugin remove 'github:WTLAIB/opencode-azure-devops-pr-review-v2#v0.3.2'`;
724
766
  the external settings, PAT file and private review state remain available.
725
767
 
726
768
  [Architecture](docs/ARCHITECTURE.md), [commenting](docs/COMMENTING.md),
@@ -733,7 +775,7 @@ or personal model selections.
733
775
  ## License and releases
734
776
 
735
777
  [MIT](LICENSE), copyright 2026 WTLAIB. See the [changelog](CHANGELOG.md) for the
736
- release scope, [v0.3.1](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.3.1)
778
+ release scope, [v0.3.2](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.3.2)
737
779
  for downloads, the [npm package](https://www.npmjs.com/package/opencode-azure-devops-pr-review),
738
780
  [v0.2.0](https://github.com/WTLAIB/opencode-azure-devops-pr-review-v2/releases/tag/v0.2.0)
739
781
  for the recorded demonstration, and [releasing](docs/RELEASING.md) for the
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "opencode-azure-devops-pr-review",
3
- "version": "0.3.1",
3
+ "version": "0.3.2",
4
4
  "type": "module",
5
5
  "description": "Azure DevOps PR reviews from a URL in OpenCode, with no checkout, configurable models, separate verification, and comment previews you can adjust before posting",
6
6
  "scripts": {
@@ -34,18 +34,9 @@
34
34
  "files": [
35
35
  "server.js",
36
36
  "src/",
37
- "config/",
38
- "scripts/merge-settings.py",
39
- "install.sh",
40
- "uninstall.sh",
41
37
  "README.md",
42
38
  "CHANGELOG.md",
43
- "LICENSE",
44
- "docs/",
45
- "AGENTS.md",
46
- "CONTRIBUTING.md",
47
- "CODE_OF_CONDUCT.md",
48
- "SECURITY.md"
39
+ "LICENSE"
49
40
  ],
50
41
  "publishConfig": {
51
42
  "access": "public"
@@ -279,8 +279,8 @@ export function renderReceipt(run, report, status, error, settings) {
279
279
  : run.mode === 'comment'
280
280
  ? ''
281
281
  : run.mode === 'quick'
282
- ? '\nStatus: COMPLETE means at least one quick review session produced a usable result and the PR source did not change. Quick findings are not independently verified: the runtime checked only their form and source, and findings that failed those checks are NEEDS_INFO. Coverage says whether every changed file was reviewed. STALE means the source changed during the review. PARTIAL means no session produced a usable result. None of these approves the PR.\n'
283
- : '\nStatus: COMPLETE means verification produced structured decisions and the PR source did not change; findings without a usable decision are listed as UNREVIEWED. STALE means the source changed during the review. PARTIAL keeps unverified results. None of these approves the PR.\n';
282
+ ? '\nStatus: COMPLETE means at least one quick review session produced a usable result and no source-commit change was detected. Quick findings are not independently verified: the runtime checked only their form and source, and findings that failed those checks are NEEDS_INFO. Coverage says whether every changed file was reviewed. STALE means the PR source commit changed during the review. PARTIAL means no session produced a usable result. None of these approves the PR.\n'
283
+ : '\nStatus: COMPLETE means verification produced structured decisions and no source-commit change was detected; findings without a usable decision are listed as UNREVIEWED. STALE means the PR source commit changed during the review. PARTIAL keeps unverified results. None of these approves the PR.\n';
284
284
  if (run.mode === 'quick' && status === 'COMPLETE' && run.quickSummary && (run.quickSummary.high > 0 || !run.quickSummary.coverage?.complete)) {
285
285
  const hint = [run.quickSummary.high > 0 ? `${run.quickSummary.high} high-severity finding(s)` : '', !run.quickSummary.coverage?.complete ? 'incomplete coverage' : ''].filter(Boolean).join(' and ');
286
286
  // Automatic publication follows the user's explicit choice; the hint stays advisory.
package/AGENTS.md DELETED
@@ -1,164 +0,0 @@
1
- # AI development guide
2
-
3
- This repository targets the OpenCode V2 plugin API (tested with
4
- `@opencode/cli@2.1.4`), the Azure DevOps Services REST API (api-version 7.1)
5
- and Ubuntu 22.04. Public source and documentation use English. Follow the user's
6
- conversation language and current authorization scope.
7
-
8
- ## Before changing anything
9
-
10
- Confirm the Git root, branch, HEAD, working tree and installed paths. Read
11
- README, architecture, roadmap and the task-relevant docs. Local handover notes
12
- under `.local/` (their file name differs between checkouts) give background
13
- and hand-off state, never new authorization; check what they say against Git
14
- and the actual environment. Preserve unrelated changes, credentials, private
15
- settings, backups and failure records. Never upload `.local/`.
16
-
17
- ## Design rules
18
-
19
- **Deterministic facts are code; judgment is model work.**
20
- - PR identity, commit SHAs, the changed-file list, version rechecks, existing
21
- threads and all Azure DevOps writes go through `azure.mjs`, which calls the
22
- REST API with `azure.organization` and the PAT from AZPR's settings
23
- (`azure.pat`, or the owner-only file named by `azure.patFile`, which is read
24
- only through its symbolic-link, owner and mode checks). Keep
25
- REST paths and the pinned api-version in `azure.mjs` only; never log, echo or
26
- persist the PAT, and send it only to the organization's REST endpoint.
27
- `azure.proxy`, `azure.caFile` and `azure.verifyTls` shape only that
28
- connection; never show proxy credentials.
29
- - Models read the repository only through the read-only tools in
30
- `review-tools.mjs`, registered with `codemode: false`; private roles see an
31
- explicit tool allowlist and ordinary sessions never see AZPR's tools.
32
- - Models review, verify and plan comment text. They never echo identity or SHAs
33
- and never write to Azure DevOps.
34
-
35
- **Quick reviews are not verified, and say so.**
36
- - `/pr-quick` runs one reviewer per shard and no verifier or duplicate check.
37
- The runtime checks only the form and source of its findings (fields, a
38
- location that exists at that commit, a file this session's own tools read);
39
- it never judges whether a defect is real. Passing findings are `REPORTED`,
40
- the rest `NEEDS_INFO`, and the review records `verification: "none"`.
41
- - Never present quick findings as verified: shared prompts carry
42
- `<!-- azpr:verified -->` / `<!-- azpr:quick -->` variants for the passages
43
- about where findings come from, the report and receipt state status,
44
- coverage and verification separately, and the comment disclosure line names
45
- the quick method. The review system prompts, which deep shares, stay
46
- byte-identical unless a change to them is deliberate (a hash test locks them).
47
- - Only records identical in every field are merged as duplicates; findings on
48
- the same lines stay separate. A parsed answer without a usable review never
49
- makes a commentable COMPLETE, and zero findings never hide unreviewed files.
50
-
51
- **Deep reviews differ only in their models.**
52
- - `/pr-deep` runs the review's stages and system prompts with the models of
53
- `models.deep`, which are meant to be stronger than the review models, and
54
- never falls back to the review models. Deep-only prompt text was removed
55
- after live runs showed it changed neither model's results; add
56
- mode-specific instructions only with a measured benefit.
57
-
58
- **Keep useful work; degrade per item.**
59
- - Answers that break the output contract get a correction turn in the same
60
- session (`workflow.repairAttempts`) listing concrete problems. After that,
61
- degrade the affected item (UNREVIEWED, NEEDS_INFO, skipped comment) and keep the
62
- rest. Never discard a whole review for one bad item, and never invent a
63
- decision, evidence or a location.
64
- - A quick reviewer whose usable answer is PARTIAL with named unfinished work
65
- gets one follow-up turn in the same session, within the same budget; a
66
- follow-up that fails or gives no usable answer never replaces the answer it
67
- followed.
68
- - Transient execution failures retry once in a new session; overflow splits the
69
- shard. Permanent failures and cancellations are not retried.
70
- - Only a changed source commit makes a review STALE.
71
-
72
- **Bounded, recoverable execution.**
73
- - All AZPR Azure DevOps traffic shares the queue in `tool-queue.mjs` (concurrency and
74
- per-call timeout). Release slots in `finally`; never depend on a hook running.
75
- - Large PRs are handled by sharding, not by compaction: private sessions may not
76
- compact, and a compaction the host attempts in a reviewer's turn means "split
77
- this shard". A refused background summary (`experimental.background_compaction`)
78
- ends nothing, so the turn's own failure decides its class.
79
- - There is deliberately no default whole-run timeout and no per-stage step cap;
80
- see the roadmap's Deferred section before adding either.
81
-
82
- **Authorization.**
83
- - Only explicit commands start private sessions, and the comment step a
84
- COMPLETE review hands on when `afterReview` or the review command's flag
85
- (`--preview`, `--publish`) asks for it; that step is a run of its own with a
86
- STARTED notice and a receipt. Every private prompt is the
87
- exact runtime-pending text with a fresh nonce; private agents cannot be
88
- mentioned, delegated, compacted or used for auxiliary requests.
89
- - Settings are read once; a changed file blocks new runs only. Hooks check the
90
- grant, not files or catalogs.
91
- - Pin private agent definitions at first use and refuse later host changes.
92
- - Shell for private roles follows the `shell` setting (default deny), enforced
93
- through the `permission` hook and by hiding the tool. Native edit, write,
94
- patch, delegation, web, question, session/model control and CodeMode execute
95
- stay denied. Allowed shell has real host authority; never call it a sandbox.
96
- - `/pr-comment` and `/pr-stop` act only within the caller's conversation (or a
97
- session of that review).
98
-
99
- **Publication is idempotent.**
100
- - Recheck the PR (active, unchanged head) before writing; skip existing markers;
101
- save each result immediately; read markers back. Re-running is always safe.
102
- - Automatic publication (`afterReview: publish` or `--publish` after the PR
103
- URL) follows only a COMPLETE review with findings to comment on that nothing
104
- stopped. It posts item by item: an item whose text has an `@<…>` mention,
105
- an image, HTML that embeds content, runs a script or hides text, or a `javascript:`,
106
- `vbscript:`, `data:` or `file://` link (mentions and script links also after
107
- decoding escapes and character references, script links also without tabs
108
- and line breaks) waits for a person, and the
109
- receipt names it; ordinary links are posted, and literal code is skipped
110
- (except for mentions) only where every reading of the Markdown agrees. A
111
- plan that would post only a
112
- repeated summary (every finding skipped as already discussed on the PR) is
113
- `NOTHING_TO_POST`. Its checks are deterministic and prefer a false alarm;
114
- never relax them to model judgment. Commands the user types keep their
115
- behavior.
116
- - Inline markers are stable (PR, path, normalized anchor, ordinal); do not put a
117
- review ID or model wording into them.
118
- - A person's adjustments (`/pr-comment <review-id> --exclude`, `--severity`,
119
- `--reset`) change only the findings handed to comment planning, never the
120
- review record or a prompt file; the planner input carries `adjustments` only
121
- when some exist, so unadjusted reviews plan exactly as before. A review
122
- adjusted once is posted only from a preview planned after its latest
123
- adjustment (an adjustment drops the earlier preview in the same save) and is
124
- neither adjusted nor planned again once its publication started. That save
125
- and the new preview's save must succeed; never let a failed save report an
126
- adjustment as applied. Text the runtime renders that names an excluded
127
- finding holds publication. Items an earlier publication already put on the
128
- PR are skipped as always; its receipt names those whose text differs, since
129
- posted comments are never changed.
130
- - Comment planning pages run side by side, so nothing a page sees or produces
131
- may depend on which page finishes first: only the first page writes the
132
- summary note, each page keeps its own continuation state and evidence, and
133
- pages are assembled in page order (ordinals follow page order).
134
-
135
- **Persistence and privacy.**
136
- - Completed reviews, plans and ledgers persist under the private state directory
137
- (owner-only permissions, newest 20). Clean only stale, unreferenced data.
138
- - Diagnostics are opt-in and never record reasoning, headers or provider
139
- configuration.
140
-
141
- **Compatibility.** Host response shapes and constants belong in `host.mjs`.
142
- Detect capabilities; do not assume them.
143
-
144
- ## Verification and delivery
145
-
146
- Run `npm run check` and `npm test`. For changes touching hooks, sessions, tools, Azure access or
147
- publication, also run `node tests/host-v2-smoke.mjs <opencode binary>` (fresh and
148
- `--replace`), `node tests/host-v2-comment-scale.mjs <opencode binary>` and
149
- `node tests/host-v2-background-compaction.mjs <opencode binary>`.
150
- For package entry points, first-run setup or settings-path changes, also run
151
- `node tests/host-v2-smoke.mjs <opencode binary> --native`; this installs the
152
- packed artifact through OpenCode's plugin manager in an isolated profile.
153
- Installer tests must preserve unrelated files and private settings, reject
154
- conflicts and test rollback and archival uninstall. Keep the README manual-copy
155
- list exact.
156
-
157
- Fake-service fixtures and live Azure/model runs establish different claims;
158
- record exact versions, environment and limitations in `docs/VALIDATION.md`, and
159
- move superseded validation pages to `docs/VALIDATION_HISTORY.md` instead of
160
- rewriting earlier results.
161
-
162
- Do not start live models, publish PR comments, change personal settings,
163
- upgrade installed tools or publish a repository or package without authorization
164
- for that action. Authorization applies to the current request only.