-
Notifications
You must be signed in to change notification settings - Fork 5
common/tasks: New dir, add AI-driven forge review workflow] #64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ../common/agents/tasks |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| # Skills | ||
|
|
||
| Reusable skill definitions for AI agents using the | ||
| [Agent Skills](https://agentskills.io/) format. | ||
|
|
||
| Each skill is a directory containing a `SKILL.md` file with YAML frontmatter | ||
| (`name`, `description`) followed by markdown instructions. Skills may also | ||
| include `scripts/`, `references/`, and `assets/` subdirectories. | ||
|
|
||
| ## Available Skills | ||
|
|
||
| - **[perform-forge-review](perform-forge-review/SKILL.md)** — Create AI-assisted | ||
| code reviews on GitHub, GitLab, or Forgejo. Builds review comments in a local | ||
| JSONL file for human inspection before submitting as a pending/draft review. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| --- | ||
| name: perform-forge-review | ||
| description: Create AI-assisted code reviews on GitHub, GitLab, or Forgejo. Use when asked to review a PR/MR, analyze code changes, or provide review feedback. | ||
| --- | ||
|
|
||
| # Perform Forge Review | ||
|
|
||
| Create code reviews on GitHub, GitLab, or Forgejo with human oversight. | ||
|
|
||
| ## Workflow | ||
|
|
||
| Use `scripts/reviewtool` for all operations. It requires Python 3 with no | ||
| external dependencies. | ||
|
|
||
| ### 1. Check out the PR | ||
|
|
||
| ```bash | ||
| scripts/reviewtool checkout 123 | ||
| ``` | ||
|
|
||
| This checks out the PR branch and shows the diff. For GitLab/Forgejo, set | ||
| the appropriate environment variables first. | ||
|
|
||
| ### 2. Review the code | ||
|
|
||
| Read the files, understand the changes. Use `git diff` and `git log` as needed. | ||
|
|
||
| ### 3. Build comments | ||
|
|
||
| Start a review, then add comments: | ||
|
|
||
| ```bash | ||
| scripts/reviewtool start --pr 123 --body "Assisted-by: OpenCode (Claude Sonnet 4) | ||
|
|
||
| AI-generated review. Comments prefixed with AI: are unedited." | ||
|
|
||
| scripts/reviewtool add --pr 123 \ | ||
| --file src/lib.rs --line 42 --match "fn process_data" \ | ||
| --body "AI: *Important*: Missing error handling" | ||
| ``` | ||
|
|
||
| The `--match` flag validates the line content to prevent misplaced comments. | ||
|
|
||
| ### 4. Submit | ||
|
|
||
| ```bash | ||
| scripts/reviewtool submit --pr 123 | ||
| ``` | ||
|
|
||
| The review is created as pending/draft. The human reviews in the forge UI | ||
| and submits when satisfied. | ||
|
|
||
| ## Comment conventions | ||
|
|
||
| **Prefixes:** | ||
| - `AI: ` — unedited AI output | ||
| - `@ai: ` — human question for AI to process | ||
| - No prefix — human reviewed/edited | ||
|
|
||
| **Priority markers:** | ||
| - `*Important*:` — must resolve before merge | ||
| - (none) — normal suggestion | ||
| - `(low)` — minor nit | ||
|
|
||
| ## Review body | ||
|
|
||
| Do not summarize the PR changes. The body should contain: | ||
| - Attribution (required) | ||
| - Concerns not tied to specific lines (optional) | ||
|
|
||
| Avoid positive-only inline comments — they create noise. | ||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.