Skip to content

feat: Jira Peer Review Integration & Zhipu AI Provider#26

Draft
ipanov-ritech wants to merge 4 commits into
techdebtgpt:mainfrom
ipanov-ritech:feature/peer-review-jira-integration
Draft

feat: Jira Peer Review Integration & Zhipu AI Provider#26
ipanov-ritech wants to merge 4 commits into
techdebtgpt:mainfrom
ipanov-ritech:feature/peer-review-jira-integration

Conversation

@ipanov-ritech
Copy link
Copy Markdown

Summary

This PR adds two major features to PR Agent:

1. 🎫 Jira Peer Review Integration

Validates PRs against linked Jira tickets like a senior developer would:

  • Extracts ticket references from PR title, branch name, or commit messages
  • Fetches ticket details from Jira (description, acceptance criteria, story points)
  • Rates ticket quality to identify poorly-defined requirements
  • Validates implementation against derived requirements
  • Provides verdict with blockers, warnings, and recommendations

2. 🤖 Zhipu AI Provider

Adds support for Zhipu AI using their Anthropic-compatible API endpoint.

Changes

  • Add ZhipuProvider class with Anthropic-compatible API
  • Add peerReview section to Zod config validation schema (was being stripped)
  • Make criteriaId optional in AC validation to prevent parsing errors
  • Update README with comprehensive peer review documentation
  • Update README with Zhipu AI provider details
  • Add verbose debug output for troubleshooting

Configuration

{
  "peerReview": {
    "enabled": true,
    "provider": "jira",
    "instanceUrl": "https://your-company.atlassian.net",
    "email": "your-email@company.com",
    "apiToken": "your-jira-api-token",
    "defaultProject": "PROJ"
  }
}

Example Output

🔍 PEER REVIEW ANALYSIS

📋 LINKED TICKET: PROJ-123
📊 TICKET QUALITY: 85/100 (GOOD)
✅ COMPLIANCE: 92%

🎯 VERDICT: ✅ APPROVED (Confidence: 85%)

Test Plan

  • Tested with Zhipu AI provider on real PR
  • Tested peer review integration with Jira Cloud
  • Verified ticket extraction from PR title/branch
  • Verified requirements validation against acceptance criteria

🤖 Generated with Claude Code

ipanov and others added 4 commits December 29, 2025 12:51
Initial implementation of peer review feature that validates PRs against
linked Jira tickets:

- Add PeerReviewIntegration class with ticket extraction and analysis
- Add JiraMcpClient for MCP-based Jira communication
- Add JiraSubAgent for AI-powered requirement validation
- Add types for Jira tickets, acceptance criteria, and validation results
- Extend analyze command with --peer-review flag
- Update config loader to support peerReview configuration section

The feature extracts ticket references from PR titles, branch names, and
commit messages, then uses AI to validate that code changes satisfy the
ticket's acceptance criteria.

Work in progress - build verification pending.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Fix LangChain import path (langchain/output_parsers -> @langchain/core/output_parsers)
- Fix TypeScript type casting issues in jira-mcp-client.ts
- Refactor peer review to use ProviderFactory for multi-provider support
- Peer review now uses the same provider/model as the main PR analysis

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add Zhipu AI provider with Anthropic-compatible API support
- Fix peerReview config being stripped by Zod validation (add schema)
- Make criteriaId optional in AC validation to prevent parsing errors
- Update README with comprehensive peer review documentation
- Update README with Zhipu AI provider details
- Add verbose debug output for peer review troubleshooting

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Resolved conflicts:
- README.md: Combined peer review and static analysis documentation
- src/cli/commands/analyze.command.ts: Merged imports and output logic

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ipanov-ritech ipanov-ritech marked this pull request as draft December 30, 2025 10:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants