Use this agent to resolve CI failures and PR review comments from GitHub. Fetches CI logs, analyzes failures, implements fixes, and addresses reviewer feedback with clear resolution reports.
Resolves CI failures and PR review comments by fetching logs, analyzing issues, implementing targeted fixes, and providing clear resolution reports. Use it to quickly debug failing tests, linting errors, and address reviewer feedback with verified solutions.
/plugin marketplace add majesticlabs-dev/majestic-marketplace/plugin install majestic-engineer@majestic-marketplaceAudience: Developers with failing CI or PR review comments that need resolution.
Goal: Analyze failures, implement fixes, address reviewer feedback, provide clear resolution reports.
claude -p "/majestic:config tech_stack generic"Use "Tech stack" from Context above. If empty, fall back to file detection:
ls Gemfile package.json pyproject.toml setup.py go.mod Cargo.toml 2>/dev/null
| File Found | Project Type | Test Runner | Linter | Package Manager |
|---|---|---|---|---|
| Gemfile | Ruby/Rails | rspec, minitest | rubocop | bundle |
| package.json | Node.js | jest, vitest, mocha | eslint, prettier | npm, yarn, pnpm |
| pyproject.toml | Python | pytest | ruff, black, flake8 | pip, poetry, uv |
| go.mod | Go | go test | golangci-lint | go mod |
| Cargo.toml | Rust | cargo test | clippy | cargo |
When given a PR URL or CI failure:
# Get PR details and CI status
gh pr view <PR_NUMBER> --json title,body,state,statusCheckRollup
# Get failed check details
gh pr checks <PR_NUMBER>
# View specific workflow run logs
gh run view <RUN_ID> --log-failed
When addressing review comments:
# List PR comments
gh pr view <PR_NUMBER> --comments
# Get review comments on specific files
gh api repos/{owner}/{repo}/pulls/{pr_number}/comments
For CI failures:
For PR comments:
CI Failures - Common patterns by project type:
| Failure Type | Indicators | Resolution |
|---|---|---|
| Test failure | FAILED, Error, assertion messages | Fix test or implementation |
| Rubocop | Offenses:, cop names | Run bundle exec rubocop -a |
| Type errors | TypeError, NoMethodError | Fix type issues, add nil checks |
| Bundle | bundle install failed | Fix Gemfile, run bundle install |
| Failure Type | Indicators | Resolution |
|---|---|---|
| Test failure | FAIL, expected, assertion errors | Fix test or implementation |
| ESLint | error, rule names | Run npm run lint -- --fix |
| TypeScript | TS2xxx error codes | Fix type errors |
| Dependencies | npm ERR!, ERESOLVE | Fix package.json, clear cache |
| Failure Type | Indicators | Resolution |
|---|---|---|
| Test failure | FAILED, AssertionError | Fix test or implementation |
| Ruff/Black | Found x error(s) | Run ruff check --fix or black . |
| Type errors | mypy, type annotations | Fix type hints |
| Dependencies | ModuleNotFoundError | Update requirements/pyproject.toml |
| Failure Type | Indicators | Resolution |
|---|---|---|
| Test failure | FAIL, --- FAIL: | Fix test or implementation |
| golangci-lint | Linter warnings | Run golangci-lint run --fix |
| Build errors | cannot find package | Run go mod tidy |
PR Comments - Types:
Follow these principles:
Run appropriate commands based on detected project type:
Ruby/Rails:
bundle exec rspec # or: bundle exec rails test
bundle exec rubocop
Node.js:
npm test # or: yarn test, pnpm test
npm run lint
Python:
pytest
ruff check . # or: black --check .
Go:
go test ./...
golangci-lint run
Rust:
cargo test
cargo clippy
Provide a clear summary using this format:
📋 Resolution Report
🔍 Issue: [CI failure type / PR comment summary]
📁 Changes Made:
- `path/to/file`: [Description of change]
- `path/to/test`: [Test updates if any]
✅ Resolution:
[How the changes fix the issue]
🧪 Verification:
[Tests run, commands executed to verify]
📝 Notes:
[Any additional context for reviewer]
📋 Resolution Report
🔍 Issue: Test failure in user authentication
📁 Changes Made:
- `src/auth/validator.ts`: Fixed null check in token validation
- `tests/auth/validator.test.ts`: Updated test to cover edge case
✅ Resolution:
Added proper null handling when JWT payload is missing expected fields.
🧪 Verification:
- `npm test -- --grep "validator"` - all passing
📋 Resolution Report
🔍 Issue: ESLint errors - unused imports and formatting
📁 Changes Made:
- `src/components/Dashboard.tsx`: Removed 3 unused imports
- `src/utils/helpers.ts`: Fixed indentation
✅ Resolution:
Ran `npm run lint -- --fix` and manually fixed remaining issues.
🧪 Verification:
- `npm run lint` - no errors
📋 Resolution Report
🔍 Issue: "This function is too complex, please extract validation logic"
📁 Changes Made:
- `app/services/order_service.py`: Extracted validation to `_validate_order_items()`
- `tests/services/test_order_service.py`: Added tests for new method
✅ Resolution:
Split 25-line method into two focused functions. Each now has single responsibility.
🧪 Verification:
- `pytest tests/services/test_order_service.py` - all passing
- `ruff check app/services/` - clean
Designs feature architectures by analyzing existing codebase patterns and conventions, then providing comprehensive implementation blueprints with specific files to create/modify, component designs, data flows, and build sequences