Skills and Agent file - #147
Conversation
…can use lola to adopt it to your coding agnet
📝 WalkthroughWalkthroughAdds FORGE coding guidance, a pre-commit review skill, a diff-gathering script, and documentation for installing and updating the module through Lola or manually. ChangesFORGE review workflow
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Agent
participant gather_diff_sh
participant AGENTS_md
Agent->>gather_diff_sh: Gather selected diff and repository status
gather_diff_sh-->>Agent: Return structured diff and untracked-file sections
Agent->>AGENTS_md: Load repository review rules
AGENTS_md-->>Agent: Return categorized guidance
Agent->>Agent: Analyze changes and produce verdict
Possibly related PRs
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@module/README.md`:
- Around line 111-118: Update the Cursor and Claude Code subsection headings
under Manual installation from level four to level three, preserving the
existing heading text and document hierarchy.
In `@module/skills/forge-review/scripts/gather-diff.sh`:
- Around line 39-55: Update the remote-branch detection flow around HAS_REMOTE
and BRANCH_DIFF to capture the git ls-remote exit status without allowing set -e
to abort, and distinguish probe failures from a genuinely absent remote branch.
Resolve and use the validated remote reference for the branch diff, tracking its
exit status separately; only emit DIFF_TYPE: none when the diff command succeeds
with empty output, while preserving failure information for unsuccessful probes
or diff resolution.
In `@module/skills/forge-review/SKILL.md`:
- Around line 19-25: Update Step 1 in the forge-review skill instructions to
invoke gather-diff.sh from the installed skill directory under
.cursor/skills/forge-review/scripts or .claude/skills/forge-review/scripts,
rather than assuming a project-root ./scripts path. Keep the documented
installation locations consistent with the command so diff gathering works after
installation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 83b3bad0-cc2d-4745-85d8-f61a877d1bbc
📒 Files selected for processing (4)
AGENTS.mdmodule/README.mdmodule/skills/forge-review/SKILL.mdmodule/skills/forge-review/scripts/gather-diff.sh
|
/lgtm |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@module/skills/forge-review/scripts/gather-diff.sh`:
- Line 9: Update the base-resolution logic around BASE_BRANCH and MERGE_BASE to
try a verified local or remote-tracking reference before calling git merge-base,
and remove the fallback that silently converts failures into an empty base. When
no usable base ref can be resolved, emit DIFF_TYPE: error; only emit DIFF_TYPE:
none after successful base resolution confirms the diff is empty.
🪄 Autofix
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 1d29c1de-0905-40a7-b672-c0a08f3b4c03
📒 Files selected for processing (4)
AGENTS.mdmodule/README.mdmodule/skills/forge-review/SKILL.mdmodule/skills/forge-review/scripts/gather-diff.sh
🚧 Files skipped from review as they are similar to previous changes (3)
- AGENTS.md
- module/README.md
- module/skills/forge-review/SKILL.md
| # Outputs structured sections so the reviewing agent can parse reliably. | ||
|
|
||
| BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "HEAD") | ||
| BASE_BRANCH="main" |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
Report an unavailable base as an error.
At Line 39, git merge-base "${BASE_BRANCH}" HEAD can fail when the checkout has no local main ref. The || true then leaves MERGE_BASE empty, and Lines 40-43 emit DIFF_TYPE: none even when HEAD contains branch changes. This can skip the review.
Resolve a verified local or remote-tracking base ref. Emit DIFF_TYPE: error when base resolution fails. Reserve DIFF_TYPE: none for a successful empty diff.
Suggested fix
+ BASE_REF="${BASE_BRANCH}"
+ if ! git rev-parse --verify --quiet "${BASE_REF}^{commit}" >/dev/null; then
+ BASE_REF="origin/${BASE_BRANCH}"
+ fi
- MERGE_BASE=$(git merge-base "${BASE_BRANCH}" HEAD 2>/dev/null || true)
- if [[ -z "${MERGE_BASE}" ]]; then
+ if ! MERGE_BASE=$(git merge-base "${BASE_REF}" HEAD 2>/dev/null); then
echo ""
- echo "=== DIFF_TYPE: none ==="
+ echo "=== DIFF_TYPE: error ==="Also applies to: 39-43
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@module/skills/forge-review/scripts/gather-diff.sh` at line 9, Update the
base-resolution logic around BASE_BRANCH and MERGE_BASE to try a verified local
or remote-tracking reference before calling git merge-base, and remove the
fallback that silently converts failures into an empty base. When no usable base
ref can be resolved, emit DIFF_TYPE: error; only emit DIFF_TYPE: none after
successful base resolution confirms the diff is empty.
|
approve |
|
/approve |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: ashtarkb The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
add more instructions in the agent.md file and a reviewer skill, you can use lola to adopt it to your coding agnet
Summary by CodeRabbit
New Features
Documentation