opencode-review-helper 0.1.2 → 0.1.4
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 +23 -32
- package/agents/code-reviewer.md +4 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,34 +21,13 @@ Restart opencode after setup to load the plugin.
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
The plugin provides a `review-helper:code-reviewer` agent that combines both tools. It:
|
|
25
25
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
```
|
|
31
|
-
Use review_order to analyze the changed files
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
Output:
|
|
35
|
-
- Prioritized file list with rationale
|
|
36
|
-
- Dependency graph showing import relationships
|
|
37
|
-
- Scores based on: type priority, dependents count, complexity
|
|
38
|
-
|
|
39
|
-
### `impact_analysis`
|
|
40
|
-
|
|
41
|
-
Finds code outside the changeset that could break.
|
|
42
|
-
|
|
43
|
-
```
|
|
44
|
-
Use impact_analysis on these files: ["src/models/user.ts", "src/api/auth.ts"]
|
|
45
|
-
```
|
|
26
|
+
1. Runs `review_order` to determine file review sequence
|
|
27
|
+
2. Runs `impact_analysis` to find affected external code
|
|
28
|
+
3. Formats the tool outputs into a combined report
|
|
46
29
|
|
|
47
|
-
|
|
48
|
-
- Direct consumers (files that import changed code)
|
|
49
|
-
- Transitive impact (files that use files that use changed code)
|
|
50
|
-
- Test coverage gaps (changed files without tests)
|
|
51
|
-
- Recommendations
|
|
30
|
+
The agent does NOT make up its own recommendations or analysis—it only presents what the tools return. It also does NOT automatically run tests or apply fixes.
|
|
52
31
|
|
|
53
32
|
## Configuration
|
|
54
33
|
|
|
@@ -90,15 +69,27 @@ Create `~/.config/opencode/review-helper.json` or `.opencode/review-helper.json`
|
|
|
90
69
|
| `impact_analysis.max_results_per_level` | Max results per category | `50` |
|
|
91
70
|
| `impact_analysis.exclude_patterns` | Glob patterns to skip | Test files |
|
|
92
71
|
|
|
93
|
-
##
|
|
72
|
+
## Tools
|
|
94
73
|
|
|
95
|
-
The plugin
|
|
74
|
+
The plugin also exposes two tools directly:
|
|
96
75
|
|
|
97
|
-
|
|
98
|
-
2. Runs `impact_analysis` to find affected external code
|
|
99
|
-
3. Generates a combined report with recommendations
|
|
76
|
+
### `review_order`
|
|
100
77
|
|
|
101
|
-
|
|
78
|
+
Suggests optimal order to review changed files.
|
|
79
|
+
|
|
80
|
+
Output:
|
|
81
|
+
- Prioritized file list with rationale
|
|
82
|
+
- Dependency graph showing import relationships
|
|
83
|
+
- Scores based on: type priority, dependents count, complexity
|
|
84
|
+
|
|
85
|
+
### `impact_analysis`
|
|
86
|
+
|
|
87
|
+
Finds code outside the changeset that could break.
|
|
88
|
+
|
|
89
|
+
Output:
|
|
90
|
+
- Direct consumers (files that import changed code)
|
|
91
|
+
- Transitive impact (files that use files that use changed code)
|
|
92
|
+
- Test coverage gaps (changed files without tests)
|
|
102
93
|
|
|
103
94
|
## License
|
|
104
95
|
|
package/agents/code-reviewer.md
CHANGED
|
@@ -61,9 +61,9 @@ Use the `impact_analysis` tool:
|
|
|
61
61
|
- Flags files without test coverage
|
|
62
62
|
- Reports potential breaking changes
|
|
63
63
|
|
|
64
|
-
### Step 3:
|
|
64
|
+
### Step 3: Present Findings
|
|
65
65
|
|
|
66
|
-
|
|
66
|
+
Format and present the tool outputs clearly:
|
|
67
67
|
|
|
68
68
|
```
|
|
69
69
|
## Review Order
|
|
@@ -81,13 +81,10 @@ Present findings clearly:
|
|
|
81
81
|
|
|
82
82
|
### Test Coverage Gaps
|
|
83
83
|
- `src/models/user.ts` has no corresponding test file
|
|
84
|
-
|
|
85
|
-
## Recommendations
|
|
86
|
-
- Review migrations first - they affect all downstream code
|
|
87
|
-
- Check `src/api/auth.ts` for compatibility with User changes
|
|
88
|
-
- Consider adding tests for `src/models/user.ts`
|
|
89
84
|
```
|
|
90
85
|
|
|
86
|
+
Do NOT add your own recommendations or analysis beyond what the tools return.
|
|
87
|
+
|
|
91
88
|
## Key Principles
|
|
92
89
|
|
|
93
90
|
- **Focus on integration boundaries** - where AI often misses issues
|
package/package.json
CHANGED