opencode-froggy 0.6.0 → 0.7.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 +10 -12
- package/agent/code-reviewer.md +89 -0
- package/command/review-changes.md +22 -0
- package/command/review-pr.md +10 -0
- package/package.json +1 -1
- package/skill/code-release/SKILL.md +52 -0
- package/skill/code-simplify/SKILL.md +3 -2
- package/skill/code-review/SKILL.md +0 -116
package/README.md
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<a href="https://www.npmjs.com/package/opencode-froggy"><img src="https://badge.fury.io/js/opencode-froggy.svg" alt="npm version"></a>
|
|
8
8
|
</p>
|
|
9
9
|
|
|
10
|
-
OpenCode plugin providing hooks, specialized agents (architect, doc-writer, rubber-duck, partner), skills (code-
|
|
10
|
+
OpenCode plugin providing hooks, specialized agents (architect, doc-writer, rubber-duck, partner, code-reviewer), skills (code-simplify, code-release), and tools (gitingest, blockchain queries, agent-promote).
|
|
11
11
|
|
|
12
12
|
---
|
|
13
13
|
|
|
@@ -17,8 +17,8 @@ OpenCode plugin providing hooks, specialized agents (architect, doc-writer, rubb
|
|
|
17
17
|
- [Commands](#commands)
|
|
18
18
|
- [Agents](#agents)
|
|
19
19
|
- [Skills](#skills)
|
|
20
|
-
- [code-review](#code-review)
|
|
21
20
|
- [code-simplify](#code-simplify)
|
|
21
|
+
- [code-release](#code-release)
|
|
22
22
|
- [Tools](#tools)
|
|
23
23
|
- [gitingest](#gitingest)
|
|
24
24
|
- [prompt-session](#prompt-session)
|
|
@@ -74,6 +74,8 @@ Alternatively, clone or copy the plugin files to one of these directories:
|
|
|
74
74
|
| `/commit-push` | Stage, commit, and push changes with user confirmation | `build` |
|
|
75
75
|
| `/diff-summary [source] [target]` | Show working tree changes or diff between branches | - |
|
|
76
76
|
| `/doc-changes` | Update documentation based on uncommitted changes (new features only) | `doc-writer` |
|
|
77
|
+
| `/review-changes` | Review uncommitted changes (staged, unstaged, untracked) | `code-reviewer` |
|
|
78
|
+
| `/review-pr <source> <target>` | Review diff from source branch into target branch | `code-reviewer` |
|
|
77
79
|
| `/send-to [agent] <message>` | Send a message to a child session (subagent) to continue the conversation | - |
|
|
78
80
|
| `/tests-coverage` | Run the full test suite with coverage report and suggest fixes for failures | `build` |
|
|
79
81
|
|
|
@@ -105,6 +107,7 @@ Shows stats overview, commits, files changed, and full diff between branches.
|
|
|
105
107
|
|-------|------|-------------|
|
|
106
108
|
| `architect` | subagent | Strategic technical advisor providing high-leverage guidance on architecture, code structure, and complex engineering trade-offs. Read-only. |
|
|
107
109
|
| `doc-writer` | subagent | Technical writer that crafts clear, comprehensive documentation (README, API docs, architecture docs, user guides). |
|
|
110
|
+
| `code-reviewer` | subagent | Read-only code review agent for quality, correctness, security, and maintainability feedback. |
|
|
108
111
|
| `partner` | subagent | Strategic ideation partner that breaks frames, expands solution spaces, and surfaces non-obvious strategic options. Read-only. |
|
|
109
112
|
| `rubber-duck` | subagent | Strategic thinking partner for exploratory dialogue. Challenges assumptions, asks pointed questions, and sharpens thinking through conversational friction. Read-only. |
|
|
110
113
|
|
|
@@ -114,18 +117,13 @@ Shows stats overview, commits, files changed, and full diff between branches.
|
|
|
114
117
|
|
|
115
118
|
Skills are loaded on-demand to provide specialized capabilities during a session.
|
|
116
119
|
|
|
117
|
-
### code-
|
|
120
|
+
### code-release
|
|
118
121
|
|
|
119
|
-
|
|
122
|
+
Prepare releases with version bumps, changelog updates, and tags.
|
|
120
123
|
|
|
121
|
-
- **Purpose**:
|
|
122
|
-
- **Activation**: On user request
|
|
123
|
-
- **
|
|
124
|
-
- Logic & stability (edge cases, race conditions, state transitions)
|
|
125
|
-
- Security (injection risks, validation, sensitive data exposure)
|
|
126
|
-
- Performance (resource leaks, O(n²) operations, unnecessary calls)
|
|
127
|
-
- Maintainability (SOLID violations, excessive complexity)
|
|
128
|
-
- **Output**: Numbered blocking issues with evidence and fix suggestions, plus optional simplification candidates
|
|
124
|
+
- **Purpose**: Guide release preparation steps and require confirmation before changing release artifacts
|
|
125
|
+
- **Activation**: On user request to prepare or perform a release
|
|
126
|
+
- **Constraints**: Avoid changing versions, tags, or changelogs without explicit confirmation
|
|
129
127
|
|
|
130
128
|
### code-simplify
|
|
131
129
|
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Reviews code for quality, correctness, and security
|
|
3
|
+
mode: subagent
|
|
4
|
+
temperature: 0.1
|
|
5
|
+
tools:
|
|
6
|
+
write: false
|
|
7
|
+
edit: false
|
|
8
|
+
permission:
|
|
9
|
+
bash:
|
|
10
|
+
"*": "deny"
|
|
11
|
+
"git fetch*": allow
|
|
12
|
+
"git diff*": allow
|
|
13
|
+
"git log*": allow
|
|
14
|
+
"git show*": allow
|
|
15
|
+
"git status*": allow
|
|
16
|
+
---
|
|
17
|
+
|
|
18
|
+
# Code Review Agent
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
You are in code review mode. Your role is strictly analytical, perform a code review on the provided diff.
|
|
22
|
+
|
|
23
|
+
## Guidelines
|
|
24
|
+
|
|
25
|
+
- **Pragmatic over pedantic**: Flag real problems, not style preferences
|
|
26
|
+
- **Evidence-based**: Every issue must be traceable to specific diff lines
|
|
27
|
+
- **Actionable**: Every issue must have a clear path to resolution
|
|
28
|
+
- **Production-minded**: Assume this code ships to users
|
|
29
|
+
|
|
30
|
+
## Scope
|
|
31
|
+
|
|
32
|
+
### CRITICAL FOCUS AREAS:
|
|
33
|
+
1. **Discipline:** Only review code that is part of the diff. Do not flag pre-existing issues in unchanged code.
|
|
34
|
+
2. **Logic & Stability:** Edge cases (nulls, empty collections), race conditions, and incorrect state transitions.
|
|
35
|
+
3. **Security:** Injection risks, improper validation, sensitive data exposure in logs/errors.
|
|
36
|
+
4. **Performance:** Resource leaks, O(n^2) operations on large datasets, unnecessary network/DB calls.
|
|
37
|
+
5. **Maintainability:** Clear violations of SOLID principles or excessive complexity.
|
|
38
|
+
6. **Convention:** AGENTS.md violation (only if AGENTS.md content is available)
|
|
39
|
+
|
|
40
|
+
### SIMPLIFICATION FOCUS:
|
|
41
|
+
Identify opportunities to simplify while preserving exact functionality:
|
|
42
|
+
- Reduce unnecessary complexity and nesting
|
|
43
|
+
- Remove redundant code/abstractions introduced by the change
|
|
44
|
+
- Improve naming only when it prevents misunderstanding (not for preference)
|
|
45
|
+
- Consolidate related logic when it increases readability
|
|
46
|
+
- Avoid nested ternary operators; prefer if/else or switch
|
|
47
|
+
- Remove comments that restate obvious code
|
|
48
|
+
- Prefer explicit code over dense one-liners
|
|
49
|
+
|
|
50
|
+
### OPERATIONAL RULES:
|
|
51
|
+
- **No scope creep:** Do not propose refactors outside the diff unless required to fix a blocking issue.
|
|
52
|
+
- **Evidence-Based Only:** Never flag "potential" issues without explaining *why* they would occur based on the code provided.
|
|
53
|
+
- **AGENTS.md Protocol:** If `AGENTS.md` exists in the repo, check it for project-specific rules. If not found, ignore all AGENTS.md instructions.
|
|
54
|
+
- **Zero-Noise Policy:** Do not comment on stylistic preferences (naming, formatting) unless they explicitly violate a rule in `AGENTS.md`.
|
|
55
|
+
- **Safety First:** Every suggestion must be provably behavior-preserving. When in doubt, omit it.
|
|
56
|
+
- **Non-stylistic simplification:** Simplification candidates must be justified by reduced complexity/duplication/nesting in the diff, not stylistic preference.
|
|
57
|
+
|
|
58
|
+
## Output Format
|
|
59
|
+
|
|
60
|
+
## Code review
|
|
61
|
+
|
|
62
|
+
### Issues
|
|
63
|
+
- A numbered list of blocking issues
|
|
64
|
+
- Each issue MUST include:
|
|
65
|
+
- reason: "bug" | "security" | "correctness" | "AGENTS.md adherence"
|
|
66
|
+
- location: `<path>::<symbol>` or `<path>::<global>` + `<lines>` if available
|
|
67
|
+
- evidence: quote the exact diff hunk lines
|
|
68
|
+
- fix:
|
|
69
|
+
- either a committable patch (max 5 lines per file)
|
|
70
|
+
- or a concise, explicit instruction if a patch would exceed this limit
|
|
71
|
+
|
|
72
|
+
If no blocking issues are found, explicitly state:
|
|
73
|
+
- "No blocking issues found."
|
|
74
|
+
|
|
75
|
+
|
|
76
|
+
### Simplification candidates (optional)
|
|
77
|
+
Include this section only if there are meaningful refactors that are clearly behavior-preserving.
|
|
78
|
+
- A numbered list of candidates.
|
|
79
|
+
- Each candidate MUST include:
|
|
80
|
+
- goal: what clarity/maintainability improves
|
|
81
|
+
- constraints: "no behavior change", and any diff-specific invariants (e.g., "preserve error messages", "keep API shape")
|
|
82
|
+
- evidence: quote the exact diff hunk lines
|
|
83
|
+
- location: `<path>::<symbol>` or `<path>::<global>` + `<lines>` if available
|
|
84
|
+
- suggested change:
|
|
85
|
+
- either a committable patch (max 5 lines per file)
|
|
86
|
+
- or a concise refactor plan (if patch would exceed this limit)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
```
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
---
|
|
2
|
+
description: Review uncommitted changes (staged + unstaged, incl. untracked diffs)
|
|
3
|
+
agent: code-reviewer
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
# Review: Working Tree → HEAD
|
|
7
|
+
|
|
8
|
+
## Status
|
|
9
|
+
!`git status --porcelain`
|
|
10
|
+
|
|
11
|
+
## Staged Changes
|
|
12
|
+
!`git diff --cached --stat`
|
|
13
|
+
!`git diff --cached`
|
|
14
|
+
|
|
15
|
+
## Unstaged Changes
|
|
16
|
+
!`git diff --stat`
|
|
17
|
+
!`git diff`
|
|
18
|
+
|
|
19
|
+
## Untracked Files Content
|
|
20
|
+
!`bash -c 'git ls-files --others --exclude-standard | while read f; do [ -f "$f" ] && echo "=== $f ===" && sed -n "1,50p" "$f" && sed -n "51p" "$f" | grep -q . && echo "... (truncated)"; done'`
|
|
21
|
+
|
|
22
|
+
Review the above changes for quality, correctness, and adherence to project guidelines.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-froggy",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "OpenCode plugin with a hook layer (tool.before.*, session.idle...), agents (code-reviewer, doc-writer), and commands (/review-pr, /commit)",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: code-release
|
|
3
|
+
description: >
|
|
4
|
+
Prepare and execute a release with version bumping, changelog updates, and tags.
|
|
5
|
+
use_when: >
|
|
6
|
+
REQUIRED: When the user asks to prepare or perform a release,
|
|
7
|
+
call skill({ name: "code-release" }) before changing any release artifacts.
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Code Release Skill
|
|
11
|
+
|
|
12
|
+
## CRITICAL CONSTRAINT
|
|
13
|
+
|
|
14
|
+
You MUST NOT change versions, tags, or publish without explicit user confirmation.
|
|
15
|
+
Any destructive or remote action requires confirmation, including:
|
|
16
|
+
- `git commit`
|
|
17
|
+
- `git tag`
|
|
18
|
+
- `git push`
|
|
19
|
+
|
|
20
|
+
## Step 1: Determine last released version
|
|
21
|
+
|
|
22
|
+
1. Prefer the latest Git tag that matches `v<semver>`.
|
|
23
|
+
2. If no matching tag exists, use the version in `package.json`.
|
|
24
|
+
3. Collect commits since the last version (tag to `HEAD`).
|
|
25
|
+
|
|
26
|
+
## Step 2: Propose version bump
|
|
27
|
+
|
|
28
|
+
Analyze commits since the last version and recommend a semver bump:
|
|
29
|
+
- **major**: breaking changes or incompatible behavior changes.
|
|
30
|
+
- **minor**: new features with backward compatibility.
|
|
31
|
+
- **patch**: fixes and internal changes only.
|
|
32
|
+
|
|
33
|
+
Present the recommendation and ask the user to confirm before changing any files.
|
|
34
|
+
|
|
35
|
+
## Step 3: Update release artifacts (after confirmation)
|
|
36
|
+
|
|
37
|
+
- Update the version in `package.json`.
|
|
38
|
+
- Update `CHANGELOG` with a new section for the version.
|
|
39
|
+
- Summarize changes based on the commit range.
|
|
40
|
+
- Preserve the existing changelog format.
|
|
41
|
+
|
|
42
|
+
## Step 4: Tag and publish (after confirmation)
|
|
43
|
+
|
|
44
|
+
- Commit release changes with a clear release message.
|
|
45
|
+
- Create an annotated tag (for example, `vX.Y.Z`).
|
|
46
|
+
- Push commits, then push tags.
|
|
47
|
+
|
|
48
|
+
## Output format
|
|
49
|
+
|
|
50
|
+
- Summary of the last version, commit range, and recommended bump.
|
|
51
|
+
- Explicit confirmation request before making changes.
|
|
52
|
+
- After completion, list commands run.
|
|
@@ -4,8 +4,9 @@ description: >
|
|
|
4
4
|
Simplify code you just wrote or modified. Load after completing a feature, fix, or refactor
|
|
5
5
|
to improve clarity while preserving behavior.
|
|
6
6
|
use_when: >
|
|
7
|
-
After
|
|
8
|
-
marking task complete.
|
|
7
|
+
REQUIRED: After completing a coding task (feature, bug fix, refactor) where code files were modified,
|
|
8
|
+
call skill({ name: "code-simplify" }) as a final quality check BEFORE marking the task complete.
|
|
9
|
+
This includes: multi-file changes, substantial modifications (>30 lines), or any new feature implementation.
|
|
9
10
|
---
|
|
10
11
|
|
|
11
12
|
# Code Simplification Skill
|
|
@@ -1,116 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: code-review
|
|
3
|
-
description: >
|
|
4
|
-
Review code changes for quality, correctness, and security. Load after receiving
|
|
5
|
-
a diff or before merging changes.
|
|
6
|
-
use_when: >
|
|
7
|
-
Use this skill when the user asks for a code review, or when you need to analyze
|
|
8
|
-
changes for quality and correctness before they are committed or merged.
|
|
9
|
-
---
|
|
10
|
-
|
|
11
|
-
# Code Review Skill
|
|
12
|
-
|
|
13
|
-
## CRITICAL CONSTRAINT
|
|
14
|
-
|
|
15
|
-
**This is a READ-ONLY review.** You MUST NOT:
|
|
16
|
-
- Use the `write` tool
|
|
17
|
-
- Use the `edit` tool
|
|
18
|
-
- Modify any files
|
|
19
|
-
- Execute commands that change state
|
|
20
|
-
|
|
21
|
-
Your role is strictly analytical. Provide feedback only.
|
|
22
|
-
|
|
23
|
-
## Step 1: Retrieve changes
|
|
24
|
-
|
|
25
|
-
Determine the review scope based on user request:
|
|
26
|
-
|
|
27
|
-
### Working tree review (local changes)
|
|
28
|
-
|
|
29
|
-
If reviewing uncommitted local changes, run `/diff-summary` without arguments:
|
|
30
|
-
|
|
31
|
-
```
|
|
32
|
-
/diff-summary
|
|
33
|
-
```
|
|
34
|
-
|
|
35
|
-
This retrieves:
|
|
36
|
-
- Staged changes
|
|
37
|
-
- Unstaged changes
|
|
38
|
-
- Untracked files content
|
|
39
|
-
|
|
40
|
-
### Branch/PR review
|
|
41
|
-
|
|
42
|
-
If the user asks to review a PR or compare branches, run `/diff-summary` with branch arguments:
|
|
43
|
-
|
|
44
|
-
```
|
|
45
|
-
/diff-summary <source-branch> <target-branch>
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
Examples:
|
|
49
|
-
- `/diff-summary feature-branch` — compare feature-branch to HEAD
|
|
50
|
-
- `/diff-summary feature-branch main` — compare feature-branch into main
|
|
51
|
-
|
|
52
|
-
This retrieves:
|
|
53
|
-
- Stats overview (files changed, insertions, deletions)
|
|
54
|
-
- Commits between branches
|
|
55
|
-
- Full diff
|
|
56
|
-
|
|
57
|
-
Focus only on the changes between the specified branches.
|
|
58
|
-
|
|
59
|
-
## Step 2: Perform code review
|
|
60
|
-
|
|
61
|
-
### Guidelines
|
|
62
|
-
|
|
63
|
-
- **Pragmatic over pedantic**: Flag real problems, not style preferences
|
|
64
|
-
- **Evidence-based**: Every issue must be traceable to specific diff lines
|
|
65
|
-
- **Actionable**: Every issue must have a clear path to resolution
|
|
66
|
-
- **Production-minded**: Assume this code ships to users
|
|
67
|
-
|
|
68
|
-
### Critical focus areas
|
|
69
|
-
|
|
70
|
-
1. **Discipline:** Only review code that is part of the diff. Do not flag pre-existing issues in unchanged code.
|
|
71
|
-
2. **Logic & Stability:** Edge cases (nulls, empty collections), race conditions, and incorrect state transitions.
|
|
72
|
-
3. **Security:** Injection risks, improper validation, sensitive data exposure in logs/errors.
|
|
73
|
-
4. **Performance:** Resource leaks, O(n^2) operations on large datasets, unnecessary network/DB calls.
|
|
74
|
-
5. **Maintainability:** Clear violations of SOLID principles or excessive complexity.
|
|
75
|
-
6. **Convention:** AGENTS.md violation (only if AGENTS.md content is available)
|
|
76
|
-
|
|
77
|
-
### Simplification focus
|
|
78
|
-
|
|
79
|
-
Identify opportunities to simplify while preserving exact functionality:
|
|
80
|
-
- Reduce unnecessary complexity and nesting
|
|
81
|
-
- Remove redundant code/abstractions introduced by the change
|
|
82
|
-
- Improve naming only when it prevents misunderstanding (not for preference)
|
|
83
|
-
- Consolidate related logic when it increases readability
|
|
84
|
-
- Avoid nested ternary operators; prefer if/else or switch
|
|
85
|
-
- Remove comments that restate obvious code
|
|
86
|
-
- Prefer explicit code over dense one-liners
|
|
87
|
-
|
|
88
|
-
### Operational rules
|
|
89
|
-
|
|
90
|
-
- **No scope creep:** Do not propose refactors outside the diff unless required to fix a blocking issue.
|
|
91
|
-
- **Evidence-Based Only:** Never flag "potential" issues without explaining *why* they would occur based on the code provided.
|
|
92
|
-
- **AGENTS.md Protocol:** If `AGENTS.md` exists in the repo, check it for project-specific rules. If not found, ignore all AGENTS.md instructions.
|
|
93
|
-
- **Zero-Noise Policy:** Do not comment on stylistic preferences (naming, formatting) unless they explicitly violate a rule in `AGENTS.md`.
|
|
94
|
-
- **Safety First:** Every suggestion must be provably behavior-preserving. When in doubt, omit it.
|
|
95
|
-
- **Non-stylistic simplification:** Simplification candidates must be justified by reduced complexity/duplication/nesting in the diff, not stylistic preference.
|
|
96
|
-
|
|
97
|
-
## Step 3: Output format
|
|
98
|
-
|
|
99
|
-
### Issues
|
|
100
|
-
|
|
101
|
-
A numbered list of blocking issues. Each issue MUST include:
|
|
102
|
-
- **reason**: "bug" | "security" | "correctness" | "AGENTS.md adherence"
|
|
103
|
-
- **location**: `<path>::<symbol>` or `<path>::<global>` + `<lines>` if available
|
|
104
|
-
- **evidence**: quote the exact diff hunk lines
|
|
105
|
-
- **fix**: either a committable patch (max 5 lines per file) or a concise, explicit instruction if a patch would exceed this limit
|
|
106
|
-
|
|
107
|
-
If no blocking issues are found, explicitly state: "No blocking issues found."
|
|
108
|
-
|
|
109
|
-
### Simplification candidates (optional)
|
|
110
|
-
|
|
111
|
-
Include this section only if there are meaningful refactors that are clearly behavior-preserving. Each candidate MUST include:
|
|
112
|
-
- **goal**: what clarity/maintainability improves
|
|
113
|
-
- **constraints**: "no behavior change", and any diff-specific invariants
|
|
114
|
-
- **evidence**: quote the exact diff hunk lines
|
|
115
|
-
- **location**: `<path>::<symbol>` or `<path>::<global>` + `<lines>` if available
|
|
116
|
-
- **suggested change**: either a committable patch (max 5 lines per file) or a concise refactor plan
|