opencode-review-helper 0.3.0 → 0.3.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 +72 -40
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -21,10 +21,9 @@ Restart opencode after setup to load the plugin. The plugin uses `@latest` so it
|
|
|
21
21
|
|
|
22
22
|
## Usage
|
|
23
23
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
The quickest way to use this plugin:
|
|
24
|
+
**Direct Slash Command Use**
|
|
27
25
|
|
|
26
|
+
Run the slash command:
|
|
28
27
|
```
|
|
29
28
|
/review-order
|
|
30
29
|
```
|
|
@@ -36,14 +35,74 @@ This runs the full workflow:
|
|
|
36
35
|
|
|
37
36
|
Output is a unified table showing all files to review, with changed files first (prioritized by dependencies and impact) followed by external files that may need attention.
|
|
38
37
|
|
|
39
|
-
|
|
38
|
+
**Agent Use**
|
|
39
|
+
|
|
40
|
+
Tab twice to go to Review-Helper mode:
|
|
41
|
+
<img width="1968" height="188" alt="image" src="https://github.com/user-attachments/assets/1a548c1a-b81d-4982-a2db-c2a1525a6d7a" />
|
|
42
|
+
|
|
43
|
+
Enter your prompt:
|
|
44
|
+
```
|
|
45
|
+
Take a look at everything since the 0.2.0 release as if it were a single PR. Guide me through how to review it.
|
|
46
|
+
```
|
|
40
47
|
|
|
41
|
-
|
|
48
|
+
Output:
|
|
49
|
+
```
|
|
50
|
+
Review Order for v0.2.0 → HEAD
|
|
51
|
+
| # | File | Reason | Score |
|
|
52
|
+
|---|------|--------|-------|
|
|
53
|
+
| 1 | src/tools/review-order.ts | Core scoring/sorting logic; foundation for all agents | 80 |
|
|
54
|
+
| 2 | src/agents/review-order.ts | Sub-agent wrapping review_order tool | 70 |
|
|
55
|
+
| 3 | src/agents/impact-explorer.ts | Sub-agent wrapping impact_analysis tool | 70 |
|
|
56
|
+
| 4 | src/agents/review-helper.ts | Orchestrator coordinating sub-agents | 60 |
|
|
57
|
+
| 5 | src/agents/index.ts | Barrel export for agent definitions | 50 |
|
|
58
|
+
| 6 | src/index.ts | Plugin entry point; command registration | 40 |
|
|
59
|
+
| 7 | package.json | Version bump 0.2.0 → 0.3.0 | 30 |
|
|
60
|
+
| 8 | AGENTS.md | Local testing/release docs | 20 |
|
|
61
|
+
| 9 | README.md | User-facing docs reorganization | 10 |
|
|
62
|
+
| 10 | agents/*.md (deleted) | Removed markdown agent files | 5 |
|
|
63
|
+
---
|
|
64
|
+
Summary of Changes
|
|
65
|
+
Theme: Subagent architecture for /review-order slash command
|
|
66
|
+
Structural Changes
|
|
67
|
+
- Added: src/agents/ directory with 4 new files
|
|
68
|
+
- Deleted: agents/*.md files (agent prompts moved to TypeScript)
|
|
69
|
+
- Refactored: src/index.ts significantly simplified (136 lines → ~30 lines of logic)
|
|
70
|
+
Key Review Points
|
|
71
|
+
| File | What to Check |
|
|
72
|
+
|------|---------------|
|
|
73
|
+
| src/tools/review-order.ts | +139 lines. New scoring algorithm? Dependency detection? |
|
|
74
|
+
| src/agents/review-helper.ts | Orchestration flow: review-order → impact → merge |
|
|
75
|
+
| src/index.ts | Verify plugin registration still works after major trim |
|
|
76
|
+
| agents/*.md deletion | Confirm prompts weren't lost, just moved to .ts |
|
|
77
|
+
Testing Gaps
|
|
78
|
+
⚠️ No test files for any changed code. Manual testing via /review-order command required.
|
|
79
|
+
---
|
|
80
|
+
Want me to read specific files for deeper analysis?
|
|
81
|
+
```
|
|
42
82
|
|
|
43
|
-
|
|
44
|
-
- `review-helper:impact-explorer` - Finds external code impacted by changes
|
|
83
|
+
## Agents
|
|
45
84
|
|
|
46
|
-
|
|
85
|
+
Three agents available for direct use or extension:
|
|
86
|
+
|
|
87
|
+
| Agent | Purpose |
|
|
88
|
+
|-------|---------|
|
|
89
|
+
| `review-helper` | Orchestrator - runs full `/review-order` workflow |
|
|
90
|
+
| `review-helper:review-order` | Determines optimal file review order |
|
|
91
|
+
| `review-helper:impact-explorer` | Finds external impacted code |
|
|
92
|
+
|
|
93
|
+
The orchestrator does NOT make up its own recommendations—it only presents what the subagents return. It also does NOT automatically run tests or apply fixes.
|
|
94
|
+
|
|
95
|
+
### Examples
|
|
96
|
+
|
|
97
|
+
Run impact analysis only:
|
|
98
|
+
```bash
|
|
99
|
+
opencode run --agent review-helper:impact-explorer "Analyze impact of current changes"
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
Get review order without impact merge:
|
|
103
|
+
```bash
|
|
104
|
+
opencode run --agent review-helper:review-order "Get review order for changed files"
|
|
105
|
+
```
|
|
47
106
|
|
|
48
107
|
## Configuration
|
|
49
108
|
|
|
@@ -57,12 +116,10 @@ Create `~/.config/opencode/review-helper.json` or `.opencode/review-helper.json`
|
|
|
57
116
|
"review_order": {
|
|
58
117
|
"type_priority": [
|
|
59
118
|
"migration",
|
|
60
|
-
"schema",
|
|
119
|
+
"schema",
|
|
61
120
|
"model",
|
|
62
121
|
"service",
|
|
63
|
-
"
|
|
64
|
-
"component",
|
|
65
|
-
"test"
|
|
122
|
+
"..."
|
|
66
123
|
],
|
|
67
124
|
"instructions": "Always review database changes before business logic"
|
|
68
125
|
},
|
|
@@ -74,44 +131,19 @@ Create `~/.config/opencode/review-helper.json` or `.opencode/review-helper.json`
|
|
|
74
131
|
}
|
|
75
132
|
```
|
|
76
133
|
|
|
134
|
+
*Default `type_priority` includes 18 keywords. See [src/config.ts](src/config.ts) for full list.*
|
|
135
|
+
|
|
77
136
|
### Configuration Options
|
|
78
137
|
|
|
79
138
|
| Option | Description | Default |
|
|
80
139
|
|--------|-------------|---------|
|
|
81
140
|
| `models.explorer` | Model for sub-agent exploration | `google/gemini-3-flash` |
|
|
82
|
-
| `review_order.type_priority` | File type keywords in priority order | See
|
|
141
|
+
| `review_order.type_priority` | File type keywords in priority order | See config.ts |
|
|
83
142
|
| `review_order.instructions` | Custom ordering instructions | - |
|
|
84
143
|
| `impact_analysis.max_depth` | Transitive analysis depth (1-3) | `2` |
|
|
85
144
|
| `impact_analysis.max_results_per_level` | Max results per category | `50` |
|
|
86
145
|
| `impact_analysis.exclude_patterns` | Glob patterns to skip | Test files |
|
|
87
146
|
|
|
88
|
-
## Tools
|
|
89
|
-
|
|
90
|
-
The plugin also exposes two tools directly:
|
|
91
|
-
|
|
92
|
-
### `review_order`
|
|
93
|
-
|
|
94
|
-
Suggests optimal order to review changed files.
|
|
95
|
-
|
|
96
|
-
Arguments:
|
|
97
|
-
- `files` (optional): Specific files to analyze. If omitted, uses git diff.
|
|
98
|
-
- `instructions` (optional): Custom ordering instructions
|
|
99
|
-
- `impact_data` (optional): Impact analysis results to merge external files into the list
|
|
100
|
-
|
|
101
|
-
Output:
|
|
102
|
-
- Prioritized file list with rationale
|
|
103
|
-
- Dependency graph showing import relationships
|
|
104
|
-
- Scores based on: type priority, dependents count, complexity, external impact
|
|
105
|
-
|
|
106
|
-
### `impact_analysis`
|
|
107
|
-
|
|
108
|
-
Finds code outside the changeset that could break.
|
|
109
|
-
|
|
110
|
-
Output:
|
|
111
|
-
- Direct consumers (files that import changed code)
|
|
112
|
-
- Transitive impact (files that use files that use changed code)
|
|
113
|
-
- Test coverage gaps (changed files without tests)
|
|
114
|
-
|
|
115
147
|
## License
|
|
116
148
|
|
|
117
149
|
MIT
|
package/package.json
CHANGED