Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "github",
"version": "1.1.0",
"version": "1.2.0",
"description": "GitHub CI/CD automation plugin for auto-detecting, analyzing, and fixing CI/CD failures on any branch",
"author": {
"name": "Ladislav Martincik",
Expand All @@ -19,14 +19,22 @@
"fix-ci",
"devops",
"pull-request",
"pr"
"pr",
"code-review",
"review-comments",
"autonomous",
"ai-review",
"confidence-scoring"
],
"commands": {
"fix-ci": {
"description": "Auto-detect, analyze, and fix CI/CD failures on any branch"
},
"create-pr": {
"description": "Create GitHub Pull Request with proper formatting and context"
},
"address-pr-comments": {
"description": "Interactive or autonomous PR comment resolution with confidence scoring"
}
},
"agents": {
Expand Down
37 changes: 37 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,43 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.0] - 2025-10-31

### Added

- `/address-pr-comments` command for interactive or autonomous PR comment resolution
- **Dual-mode operation**: Interactive (terminal) and Autonomous (CI/CD)
- **AI-powered confidence scoring** (0-100) for comment prioritization
- Specificity scoring: file path + line number + concrete suggestions
- Language clarity: directive vs suggestive language detection
- Category confidence: STYLE (25) > DOCS (20) > CODE (15) > TEST (10)
- Reviewer authority: maintainer/owner weight higher than contributors
- Discussion status: blocking issues prioritized
- **Autonomous mode features**:
- Auto-detects CI/CD environment (GITHUB_ACTIONS, CI, JENKINS_URL, etc.)
- Filters high-confidence comments (score β‰₯ 80) for automatic resolution
- Creates git stash rollback point before any changes
- Detailed reporting of addressed and skipped items with reasoning
- **Interactive mode features**:
- User selects which comments to address
- Shows confidence scores for all comments
- Comprehensive explanations and diffs
- Fetches PR review comments and issue comments using gh CLI
- Analyzes and categorizes comments by type (CODE, STYLE, DOCS, TEST, QUESTIONS)
- Applies changes with Edit tool and shows diffs
- Safety features: no auto-commits, warns about uncommitted changes
- Support for mode override: `--autonomous`, `--auto`, or `--interactive` flags
- Keywords: "code-review", "review-comments", "autonomous", "ai-review", "confidence-scoring"

### Changed

- Plugin description updated to include code review and autonomous functionality
- README updated with comprehensive `/address-pr-comments` documentation
- Dual-mode operation explained
- Confidence scoring algorithm documented
- Interactive and autonomous mode examples
- Safety features and rollback instructions

## [1.1.0] - 2025-10-31

### Added
Expand Down
107 changes: 106 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# GitHub Plugin for Claude Code

GitHub CI/CD automation plugin that auto-detects, analyzes, and fixes CI/CD failures on any branch.
GitHub automation plugin for CI/CD, pull requests, and code review workflows.

## Features

Expand All @@ -10,6 +10,9 @@ GitHub CI/CD automation plugin that auto-detects, analyzes, and fixes CI/CD fail
- πŸ›‘οΈ **Safety checks** - Warns about main branch changes and uncommitted work
- 🎯 **Specialized agents** - Dedicated agents for log analysis and error fixing
- πŸ“ **PR creation** - Generate well-formatted pull requests from GitHub issues
- πŸ’¬ **PR comment resolution** - Interactive or autonomous review comment resolution
- πŸ€– **AI confidence scoring** - Smart prioritization of review comments (0-100 score)
- πŸ”„ **Rollback safety** - Auto-stash changes in autonomous mode for easy undo

## Installation

Expand Down Expand Up @@ -92,6 +95,108 @@ $ /create-pr 123 docs/implementation-plan.md
https://github.com/user/repo/pull/456
```

### `/address-pr-comments`

Interactive or autonomous workflow for addressing PR review comments with AI-powered confidence scoring.

**Modes:**

The command automatically detects the execution environment:
- **Interactive Mode** (terminal): User selects which comments to address
- **Autonomous Mode** (CI/CD): Auto-addresses high-confidence comments (score β‰₯ 80)

**Usage:**
```bash
# Interactive mode (default in terminal)
/address-pr-comments 18
/address-pr-comments https://github.com/owner/repo/pull/123

# Autonomous mode (auto-detected in CI/CD)
/address-pr-comments 18 --autonomous
/address-pr-comments 18 auto

# Force interactive mode
/address-pr-comments 18 --interactive
```

**What it does:**

1. **Fetches PR data**: Downloads PR details, review comments, and issue comments using `gh` CLI
2. **Analyzes & scores comments**: Filters actionable comments, categorizes by type, and assigns confidence scores (0-100)
3. **Presents or filters**: Interactive shows all comments; Autonomous filters for high-confidence (β‰₯80)
4. **Applies changes**: Reads files, explains changes, and uses Edit tool to apply fixes
5. **Reports results**: Shows detailed summary with addressed items and skipped items

**Confidence Scoring (0-100):**

Comments are scored based on:
- **Specificity** (30pts): File path + line number + concrete suggestion
- **Language clarity** (25pts): Directive ("must", "please") vs suggestive ("consider")
- **Category** (25pts): STYLE (25) > DOCS (20) > CODE (15) > TEST (10)
- **Reviewer authority** (10pts): Maintainer/owner (10) > contributor (3)
- **Discussion status** (10pts): Blocking (10) > unresolved (7)

**Thresholds:**
- **80-100 (High)**: Auto-addressed in autonomous mode
- **60-79 (Medium)**: Presented in interactive mode
- **0-59 (Low)**: Skipped or flagged for manual review

**Comment categories:**
- **CODE**: Logic changes, bug fixes, refactoring
- **STYLE**: Formatting, naming conventions
- **DOCS**: Documentation improvements
- **TEST**: Test coverage, test improvements
- **QUESTIONS**: Clarifications needed

**Safety features:**
- **Autonomous mode**: Creates git stash rollback point before changes
- No automatic commits or pushes
- Shows changes and confidence scores
- Skips ambiguous or low-confidence comments
- Detailed reporting of what was/wasn't addressed

**Interactive Mode Example:**
```bash
$ /address-pr-comments 42

Found 3 comments on PR #42: Add user authentication

1. [CODE] src/auth.ts:25 (Score: 90)
Comment: "Add null check before accessing user.email"

2. [STYLE] src/utils.ts:42 (Score: 95)
Comment: "Use const instead of let"

Which items would you like me to address? all

βœ“ Addressed item 1: Added null check
βœ“ Addressed item 2: Changed let to const

πŸ“Š Summary: 2 comments addressed, 2 files modified
```

**Autonomous Mode Example:**
```bash
$ /address-pr-comments 42 --auto

πŸ€– AUTONOMOUS MODE ACTIVE

Analyzing 5 comments on PR #42
Confidence threshold: 80/100

High-Confidence Items (2):
βœ“ [STYLE] src/utils.ts:42 (95) - Changed let to const
βœ“ [CODE] src/auth.ts:25 (90) - Added null check

Skipped Items (3):
⏭️ [CODE] src/api.ts:55 (65) - Vague suggestion
⏭️ [TEST] tests/auth.test.ts (45) - Question without action
⏭️ [QUESTIONS] src/models.ts (35) - Ambiguous feedback

πŸ”„ Rollback: git stash apply stash^{/pre-autonomous-pr-42-...}
πŸ“Š Summary: 2 addressed, 3 skipped, 2 files modified
```

## Agents

### `ci-log-analyzer`
Expand Down
Loading