From 2c6bf9bb727602b2c78b1d8e3990b8dfda8f85bc Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 09:39:00 -0300 Subject: [PATCH 01/10] add: add workspace workflows for PRs --- memories/llombardi/README.md | 75 ++++++++++ .../pr-workflows/pr-review.md | 139 ++++++++++++++++++ .../pr-workflows/pr-summary.md | 55 +++++++ 3 files changed, 269 insertions(+) create mode 100644 memories/llombardi/README.md create mode 100644 memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md create mode 100644 memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md diff --git a/memories/llombardi/README.md b/memories/llombardi/README.md new file mode 100644 index 0000000..8cd1c07 --- /dev/null +++ b/memories/llombardi/README.md @@ -0,0 +1,75 @@ +# PR Workflows for Windsurf + +This contribution provides comprehensive PR (Pull Request) **workflows** for Windsurf that help with code review and PR summary generation. + +## What's Included + +### PR Review Workflow (`pr-review.md`) + +A comprehensive workflow that: + +- Generates diffs against main/master branch automatically +- Collects PR context from users +- Performs multi-dimensional code analysis including: + - Algorithmic complexity analysis + - Testing coverage review + - Code consistency checks + - Security analysis + - Error handling evaluation + - Architecture pattern validation + - Performance considerations + - Documentation assessment +- Provides structured review summaries with actionable feedback + +### PR Summary Workflow (`pr-summary.md`) + +A technical summary generator that: + +- Analyzes changes from conversation context +- Extracts file modifications and code metrics +- Identifies architecture impacts and dependencies +- Generates structured PR summaries for developers and DevOps (or any technical) teams + +## Why I Created This + +These workflows solve common pain points in code review processes: + +- **Consistency**: Ensures all PRs are reviewed against the same comprehensive criteria +- **Efficiency**: Automates diff generation and context collection +- **Quality**: Covers security, performance, testing, and architectural concerns +- **Documentation**: Generates professional PR summaries from conversation context + +## Usage + +Use the slash commands in Windsurf: + +- `/pr-review` - Comprehensive PR analysis and review +- `/pr-summary` - Generate technical PR summary from conversation context + +## Setup + +Simply copy these workflow files to your project's `.windsurf/workflows/` directory: + +- `pr-review.md` +- `pr-summary.md` + +## Tips and Tricks + +1. **Context Matters**: The more context you provide about the PR (business requirements, testing strategy), the better the review quality +2. **Iterative Reviews**: Use the workflow multiple times as you address feedback +3. **Learning Tool**: The workflow occasionally leaves open questions to help you learn to spot issues independently +4. **Complementary**: Use `/pr-review` for detailed analysis, then `/pr-summary` for documentation + +## Real-World Examples + +Perfect for: + +- **Enterprise Development**: Consistent review standards across teams +- **Open Source Projects**: Thorough review process for contributors +- **DevOps Teams**: Technical summaries for deployment planning +- **Code Quality Gates**: Automated quality checks before merge + +## Current Limitations + +- Requires Git repository with main/master branch. Indicate the base branch as context in the command if it's different from main/master. +- Manual context collection step in PR review. You may provide context in the command if you want to skip this step. diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md new file mode 100644 index 0000000..bfb4223 --- /dev/null +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -0,0 +1,139 @@ +--- +description: This workflow helps review Pull Requests by generating a diff against the main/master branch and collecting context from the user. +auto_execution_mode: 3 +--- + +# PR Review Workflow + +This workflow provides a comprehensive review of Pull Requests by analyzing code changes, collecting context, and evaluating multiple aspects of the implementation. You may also occasionally leave open questions to the user if you spot some issue and let the user guess what the issue is, as a learning experience. + +## Step 1: Generate Diff Against Base Branch + +First, we'll generate a diff against the main/master branch to understand what changes are being proposed. + +```bash +# Check if main branch exists, fallback to master +echo "Checking for available base branches..." + +if git show-ref --verify --quiet refs/heads/main; then + BASE_BRANCH="main" +elif git show-ref --verify --quiet refs/remotes/origin/main; then + BASE_BRANCH="origin/main" +elif git show-ref --verify --quiet refs/heads/master; then + BASE_BRANCH="master" +else + BASE_BRANCH="origin/master" +fi + +echo "Selected base branch: $BASE_BRANCH" + +# Get current branch name +CURRENT_BRANCH=$(git branch --show-current) + +# Find merge base +MERGE_BASE=$(git merge-base $BASE_BRANCH $CURRENT_BRANCH) +echo "Merge base commit: $MERGE_BASE" + +# Generate diff against base branch +git diff $MERGE_BASE $CURRENT_BRANCH +``` + +## Step 2: Collect PR Context if not already provided by user. Skip if provided already + +Please provide any of the following context about this Pull Request: + +1. **PR Summary**: Brief description of what this PR accomplishes +2. **Ticket/Issue Description**: Link to or description of the related ticket/issue +3. **Business Context**: Why is this change needed? +4. **Breaking Changes**: Are there any breaking changes in this PR? +5. **Testing Strategy**: How was this change tested? + +## Step 3: Analyze Code Changes + +Based on the diff and context provided, analyze the PR across multiple dimensions: + +### 3.1 Algorithmic Complexity Analysis + +- Review time and space complexity of new algorithms +- Identify potential performance bottlenecks +- Check for inefficient loops, nested operations, or recursive calls +- Evaluate database query efficiency and N+1 problems + +### 3.2 Testing Coverage Analysis + +- Verify adequate unit test coverage for new code +- Check for integration tests where appropriate +- Evaluate test quality and edge case coverage +- Ensure mocks and fixtures are properly implemented +- Validate table-driven tests for comprehensive scenarios + +### 3.3 Code Consistency Review + +- Check adherence to existing code patterns and conventions +- Verify consistent error handling patterns +- Evaluate logging consistency and appropriate log levels +- Review naming conventions and code organization +- Ensure proper dependency injection patterns + +### 3.4 Security Analysis + +- Identify potential security vulnerabilities +- Check for proper input validation and sanitization +- Review authentication and authorization implementations +- Evaluate data exposure risks +- Check for hardcoded secrets or credentials +- Assess SQL injection and other injection attack vectors + +### 3.5 Error Handling & Reliability + +- Verify comprehensive error handling +- Check for proper context propagation +- Evaluate graceful degradation scenarios +- Review timeout and retry mechanisms +- Assess potential race conditions or concurrency issues + +### 3.6 Architecture & Design Patterns + +- Evaluate adherence to established architectural patterns +- Check for proper separation of concerns +- Review interface design and abstraction levels +- Assess maintainability and extensibility +- Validate dependency management and coupling + +### 3.7 Performance Considerations + +- Review memory usage patterns +- Check for potential memory leaks +- Evaluate concurrency management and lifecycle +- Assess database connection pooling +- Review caching strategies where applicable + +### 3.8 Documentation & Maintainability + +- Check for adequate code comments (without over-commenting) +- Verify API documentation updates +- Evaluate code readability and self-documentation +- Review configuration changes and documentation + +## Step 4: Generate Review Summary + +Based on the analysis, I'll provide: + +1. **Overall Assessment**: High-level evaluation of the PR quality +2. **Critical Issues**: Must-fix issues that block merge +3. **Recommendations**: Suggested improvements for code quality +4. **Positive Highlights**: Well-implemented aspects worth noting +5. **Risk Assessment**: Potential risks and mitigation strategies + +## Step 5: Action Items + +I'll categorize findings into: + +- **Blocking Issues**: Must be addressed before merge +- **High Priority**: Should be addressed before merge +- **Medium Priority**: Consider addressing in this PR or follow-up +- **Low Priority**: Nice-to-have improvements for future consideration + +--- + +**Note**: This workflow focuses on code review and suggestions only. No changes will be applied to the codebase during the review process. diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md new file mode 100644 index 0000000..48fb1d3 --- /dev/null +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md @@ -0,0 +1,55 @@ +--- +description: Generate technical PR summary using conversation context +--- + +# PR Summary Generation Workflow + +This workflow generates a technical PR summary by analyzing changes from the current conversation context for developers and DevOps teams. + +## Step 1: Analyze Changes from Context + +Extract technical information from conversation history: + +- **Files Modified**: Source code, tests, config, documentation changes +- **Code Metrics**: Lines added/removed, functions/methods modified +- **Architecture Impact**: New packages, interface changes, breaking changes +- **Dependencies**: go.mod updates, new libraries + +## Step 2: Generate Technical PR Summary + +## PR Summary: [Title] + +### What Changed + +Brief technical description of the implementation. + +### Files Modified + +- **Core Changes**: X files (+Y, -Z lines) +- **Tests**: Unit/integration tests added/modified +- **Config**: Configuration or deployment changes +- **Dependencies**: Package updates or additions + +### Technical Impact + +- **Breaking Changes**: API/interface modifications +- **Performance**: Expected impact on system performance +- **Security**: Security considerations or improvements +- **Architecture**: Design pattern or structural changes + +### Testing + +- **Coverage**: New tests added, existing tests modified +- **Manual Testing**: Key scenarios verified +- **Edge Cases**: Boundary conditions tested + +### Notes + +- **Migration**: Database or config migrations required +- **Environment**: New environment variables or settings +- **Breaking Changes**: API/interface modifications +- **Performance**: Expected impact on system performance +- **Security**: Security considerations or improvements +- **Architecture**: Design pattern or structural changes + +**Note**: Use `/pr-review` for detailed code analysis and feedback. From c44fd7c82aed6261493f257695929891678e379b Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 09:40:03 -0300 Subject: [PATCH 02/10] fix: add elif to cspell dictionary for bash scripts --- cspell.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cspell.json b/cspell.json index 975e199..e6704d0 100644 --- a/cspell.json +++ b/cspell.json @@ -17,7 +17,8 @@ "RAII", "mcpservers", "kinopeee", - "kamusis" + "kamusis", + "elif" ], "ignorePaths": ["node_modules/**", "package.json", "package-lock.json"], "allowCompoundWords": true, From 9de7476b40f8e95815565b0fe1371057f4af46c6 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 09:48:02 -0300 Subject: [PATCH 03/10] Update memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md delete duplicate lines Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- .../llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md | 4 ---- 1 file changed, 4 deletions(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md index 48fb1d3..9ad1452 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md @@ -47,9 +47,5 @@ Brief technical description of the implementation. - **Migration**: Database or config migrations required - **Environment**: New environment variables or settings -- **Breaking Changes**: API/interface modifications -- **Performance**: Expected impact on system performance -- **Security**: Security considerations or improvements -- **Architecture**: Design pattern or structural changes **Note**: Use `/pr-review` for detailed code analysis and feedback. From 0a4db8b5e22ac7f9927d4d665a380d31dc77d6d4 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 10:14:04 -0300 Subject: [PATCH 04/10] update: enhancements to workflows Includes citations, improves instructions and docs, optional machine-friendly tokens, hardened bash script, and other suggestions --- cspell.json | 4 +- memories/llombardi/README.md | 30 ++++++++----- .../pr-workflows/pr-review.md | 43 ++++++++++++------- .../pr-workflows/pr-summary.md | 9 ++++ 4 files changed, 60 insertions(+), 26 deletions(-) diff --git a/cspell.json b/cspell.json index e6704d0..6c988a3 100644 --- a/cspell.json +++ b/cspell.json @@ -18,7 +18,9 @@ "mcpservers", "kinopeee", "kamusis", - "elif" + "elif", + "llombardi", + "unshallow" ], "ignorePaths": ["node_modules/**", "package.json", "package-lock.json"], "allowCompoundWords": true, diff --git a/memories/llombardi/README.md b/memories/llombardi/README.md index 8cd1c07..980d779 100644 --- a/memories/llombardi/README.md +++ b/memories/llombardi/README.md @@ -4,11 +4,11 @@ This contribution provides comprehensive PR (Pull Request) **workflows** for Win ## What's Included -### PR Review Workflow (`pr-review.md`) +### PR Review Workflow ([`pr-review.md`](./Workspace-AI-rules/pr-workflows/pr-review.md)) A comprehensive workflow that: -- Generates diffs against main/master branch automatically +- Generates diffs against the detected base branch (main/master or origin/\*) automatically - Collects PR context from users - Performs multi-dimensional code analysis including: - Algorithmic complexity analysis @@ -21,7 +21,7 @@ A comprehensive workflow that: - Documentation assessment - Provides structured review summaries with actionable feedback -### PR Summary Workflow (`pr-summary.md`) +### PR Summary Workflow ([`pr-summary.md`](./Workspace-AI-rules/pr-workflows/pr-summary.md)) A technical summary generator that: @@ -48,10 +48,18 @@ Use the slash commands in Windsurf: ## Setup -Simply copy these workflow files to your project's `.windsurf/workflows/` directory: +Create the workflows directory and copy the workflow files to your project: -- `pr-review.md` -- `pr-summary.md` +```bash +# Create the workflows directory if it doesn't exist +mkdir -p .windsurf/workflows/ + +# Copy the workflow files (files are copied, not moved or renamed) +cp memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md .windsurf/workflows/ +cp memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md .windsurf/workflows/ +``` + +**Note**: These commands copy the files safely without modifying the originals. ## Tips and Tricks @@ -64,12 +72,14 @@ Simply copy these workflow files to your project's `.windsurf/workflows/` direct Perfect for: -- **Enterprise Development**: Consistent review standards across teams -- **Open Source Projects**: Thorough review process for contributors -- **DevOps Teams**: Technical summaries for deployment planning -- **Code Quality Gates**: Automated quality checks before merge +- **Enterprise development**: Consistent review standards across teams +- **Open-source projects**: Thorough review process for contributors +- **DevOps teams**: Technical summaries for deployment planning +- **Code-quality gates**: Automated quality checks before merge ## Current Limitations - Requires Git repository with main/master branch. Indicate the base branch as context in the command if it's different from main/master. +- Git must be installed and reachable (commands assume `git` in PATH) +- Repository refs must be fetchable (CI or shallow clones may need `git fetch --unshallow` or full fetch of refs) - Manual context collection step in PR review. You may provide context in the command if you want to skip this step. diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index bfb4223..4c55bad 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -12,35 +12,48 @@ This workflow provides a comprehensive review of Pull Requests by analyzing code First, we'll generate a diff against the main/master branch to understand what changes are being proposed. ```bash -# Check if main branch exists, fallback to master -echo "Checking for available base branches..." +# Enable safe shell options +set -euo pipefail -if git show-ref --verify --quiet refs/heads/main; then - BASE_BRANCH="main" +# Fetch origin refs quietly to handle shallow/remote-only cases +git fetch origin --quiet 2>/dev/null || echo "Warning: Could not fetch from origin" + +# Detect repository default remote branch via refs/remotes/origin/HEAD with fallbacks +if git symbolic-ref refs/remotes/origin/HEAD >/dev/null 2>&1; then + BASE_BRANCH=$(git symbolic-ref refs/remotes/origin/HEAD | sed 's@^refs/remotes/@@') elif git show-ref --verify --quiet refs/remotes/origin/main; then BASE_BRANCH="origin/main" +elif git show-ref --verify --quiet refs/remotes/origin/master; then + BASE_BRANCH="origin/master" +elif git show-ref --verify --quiet refs/heads/main; then + BASE_BRANCH="main" elif git show-ref --verify --quiet refs/heads/master; then BASE_BRANCH="master" else - BASE_BRANCH="origin/master" + echo "Error: No suitable base branch found (main/master)" + exit 1 fi -echo "Selected base branch: $BASE_BRANCH" - -# Get current branch name -CURRENT_BRANCH=$(git branch --show-current) +# Determine current branch robustly (handles detached HEAD) +CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD) +if [[ "${CURRENT_BRANCH}" == "HEAD" ]]; then + CURRENT_BRANCH=$(git rev-parse HEAD) +fi -# Find merge base -MERGE_BASE=$(git merge-base $BASE_BRANCH $CURRENT_BRANCH) -echo "Merge base commit: $MERGE_BASE" +# Optionally compute and log merge-base if available +if MERGE_BASE=$(git merge-base "${BASE_BRANCH}" "${CURRENT_BRANCH}" 2>/dev/null); then + echo "Merge base commit: ${MERGE_BASE}" +else + echo "Warning: Could not determine merge base" +fi -# Generate diff against base branch -git diff $MERGE_BASE $CURRENT_BRANCH +# Generate diff using triple-dot syntax (git picks correct merge-base implicitly) +git diff --no-color "${BASE_BRANCH}...${CURRENT_BRANCH}" ``` ## Step 2: Collect PR Context if not already provided by user. Skip if provided already -Please provide any of the following context about this Pull Request: +You may provide any of the following context inline when invoking the slash command, or provide it now if not already given: 1. **PR Summary**: Brief description of what this PR accomplishes 2. **Ticket/Issue Description**: Link to or description of the related ticket/issue diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md index 9ad1452..aeb9e2c 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md @@ -30,6 +30,15 @@ Brief technical description of the implementation. - **Config**: Configuration or deployment changes - **Dependencies**: Package updates or additions + + ### Technical Impact - **Breaking Changes**: API/interface modifications From d152fbdb6338dbfbef026c0eeb0ba71871507b99 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 10:24:25 -0300 Subject: [PATCH 05/10] update: improvements for safer script and language agnostic instructions --- .../Workspace-AI-rules/pr-workflows/pr-review.md | 8 ++++++-- .../Workspace-AI-rules/pr-workflows/pr-summary.md | 15 ++++++++++++--- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index 4c55bad..05dd7de 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -47,8 +47,12 @@ else echo "Warning: Could not determine merge base" fi -# Generate diff using triple-dot syntax (git picks correct merge-base implicitly) -git diff --no-color "${BASE_BRANCH}...${CURRENT_BRANCH}" +# Disable git pager to prevent interactive mode +export GIT_PAGER=cat +git config --global --replace-all core.pager cat >/dev/null 2>&1 || true + +# Generate diff using triple-dot syntax with rename detection (git picks correct merge-base implicitly) +git diff --no-color -M "${BASE_BRANCH}...${CURRENT_BRANCH}" ``` ## Step 2: Collect PR Context if not already provided by user. Skip if provided already diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md index aeb9e2c..5e28aa2 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-summary.md @@ -12,8 +12,8 @@ Extract technical information from conversation history: - **Files Modified**: Source code, tests, config, documentation changes - **Code Metrics**: Lines added/removed, functions/methods modified -- **Architecture Impact**: New packages, interface changes, breaking changes -- **Dependencies**: go.mod updates, new libraries +- **Architecture Impact**: New modules, interface changes, breaking changes +- **Dependencies**: Package manager updates, new libraries ## Step 2: Generate Technical PR Summary @@ -21,7 +21,16 @@ Extract technical information from conversation history: ### What Changed -Brief technical description of the implementation. +**One-line technical summary**: [Brief description of the core change] + +**Concrete deltas** (2-4 bullets): + +- Added: [specific functionality/files added] +- Modified: [specific components changed] +- Removed: [specific items deleted] +- Fixed: [specific issues resolved] + +**Rationale**: [One sentence explaining why this change was made and any scope/rollout considerations] ### Files Modified From edb5438759811050f7cc1f18ea1923124e380b00 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 11:12:59 -0300 Subject: [PATCH 06/10] update: update pr-review.md For deterministic workflows, prefer actionable findings over Socratic prompts. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../llombardi/Workspace-AI-rules/pr-workflows/pr-review.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index 05dd7de..59ec6a7 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -5,8 +5,7 @@ auto_execution_mode: 3 # PR Review Workflow -This workflow provides a comprehensive review of Pull Requests by analyzing code changes, collecting context, and evaluating multiple aspects of the implementation. You may also occasionally leave open questions to the user if you spot some issue and let the user guess what the issue is, as a learning experience. - +This workflow provides a comprehensive review of Pull Requests by analyzing code changes, collecting context, and evaluating multiple aspects of the implementation. Prefer concise, actionable findings; use clarifying questions only when essential to resolve ambiguity. ## Step 1: Generate Diff Against Base Branch First, we'll generate a diff against the main/master branch to understand what changes are being proposed. From 08e3db9e57a1242878139b6a8657ca8424c84ce0 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 11:14:07 -0300 Subject: [PATCH 07/10] =?UTF-8?q?update:=20say=20=E2=80=9Cdefault=20branch?= =?UTF-8?q?=E2=80=9D=20(not=20=E2=80=9Cmain/master=E2=80=9D).?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../llombardi/Workspace-AI-rules/pr-workflows/pr-review.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index 59ec6a7..aa1349a 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -8,8 +8,7 @@ auto_execution_mode: 3 This workflow provides a comprehensive review of Pull Requests by analyzing code changes, collecting context, and evaluating multiple aspects of the implementation. Prefer concise, actionable findings; use clarifying questions only when essential to resolve ambiguity. ## Step 1: Generate Diff Against Base Branch -First, we'll generate a diff against the main/master branch to understand what changes are being proposed. - +First, we'll generate a diff against the repository's default branch (with fallbacks) to understand what changes are being proposed. ```bash # Enable safe shell options set -euo pipefail From cfa491e818974cb0bea118a24d2332ca624a1531 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 11:15:51 -0300 Subject: [PATCH 08/10] update:Do not mutate global git config force no-pager per-command. Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../llombardi/Workspace-AI-rules/pr-workflows/pr-review.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index aa1349a..b3b8431 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -47,11 +47,9 @@ fi # Disable git pager to prevent interactive mode export GIT_PAGER=cat -git config --global --replace-all core.pager cat >/dev/null 2>&1 || true # Generate diff using triple-dot syntax with rename detection (git picks correct merge-base implicitly) -git diff --no-color -M "${BASE_BRANCH}...${CURRENT_BRANCH}" -``` +git --no-pager diff --no-color -M "${BASE_BRANCH}...${CURRENT_BRANCH}" ## Step 2: Collect PR Context if not already provided by user. Skip if provided already From 8f5c5a126ff26560709922f9fbd64fceb612fe56 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 11:25:28 -0300 Subject: [PATCH 09/10] fix: satisfy md lint and minor suggestions --- .../llombardi/Workspace-AI-rules/pr-workflows/pr-review.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index b3b8431..c674e77 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -6,9 +6,11 @@ auto_execution_mode: 3 # PR Review Workflow This workflow provides a comprehensive review of Pull Requests by analyzing code changes, collecting context, and evaluating multiple aspects of the implementation. Prefer concise, actionable findings; use clarifying questions only when essential to resolve ambiguity. + ## Step 1: Generate Diff Against Base Branch First, we'll generate a diff against the repository's default branch (with fallbacks) to understand what changes are being proposed. + ```bash # Enable safe shell options set -euo pipefail @@ -50,8 +52,9 @@ export GIT_PAGER=cat # Generate diff using triple-dot syntax with rename detection (git picks correct merge-base implicitly) git --no-pager diff --no-color -M "${BASE_BRANCH}...${CURRENT_BRANCH}" +``` -## Step 2: Collect PR Context if not already provided by user. Skip if provided already +## Step 2: Collect PR Context (skip if already provided) You may provide any of the following context inline when invoking the slash command, or provide it now if not already given: From 50cae2408750a2d1fb1876613adac950ea5d9624 Mon Sep 17 00:00:00 2001 From: Lautaro Lombardi Date: Tue, 26 Aug 2025 17:37:32 -0300 Subject: [PATCH 10/10] update: enhance wording in error message for consistency Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md index c674e77..7326f30 100644 --- a/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md +++ b/memories/llombardi/Workspace-AI-rules/pr-workflows/pr-review.md @@ -30,7 +30,7 @@ elif git show-ref --verify --quiet refs/heads/main; then elif git show-ref --verify --quiet refs/heads/master; then BASE_BRANCH="master" else - echo "Error: No suitable base branch found (main/master)" + echo "Error: No suitable default base branch found" exit 1 fi