mirror of
https://github.com/aaif-goose/goose.git
synced 2026-07-03 14:10:03 +02:00
feat: add PR Impact Analyzer prompt (#5375)
Signed-off-by: Shivam Gawali <shivamgawali585@gmail.com>
This commit is contained in:
@@ -0,0 +1,37 @@
|
||||
{
|
||||
"id": "github-dev-pr-impact-analyzer",
|
||||
"title": "PR Impact Analysis Report",
|
||||
"description": "Analyzes pull requests using GitHub to fetch PR data and Developer to examine code changes, generating structured impact reports with risk assessment and review priorities",
|
||||
"category": "technical",
|
||||
"job": "engineering",
|
||||
"example_prompt": "Analyze PR #247 in myorg/backend-api. Use GitHub to fetch the PR details, diff, and commits. Then use Developer to analyze the code changes and identify: (1) what systems are affected, (2) potential risks or breaking changes, (3) missing tests, and (4) what reviewers should prioritize. Format as a structured report with actionable items.",
|
||||
"example_result": "# PR #247 Impact Analysis: Rate Limiting Implementation\n\n## Extension Integration\n1. **GitHub Extension** → Fetched PR metadata, file diffs, and commit history\n2. **Developer Extension** → Analyzed code changes, dependencies, and test coverage\n\n---\n\n## 📊 Quick Summary\n- **Files Changed:** 12 (+456 / -89 lines)\n- **Author:** @sarah-dev\n- **Commits:** 8\n- **Overall Risk:** 🟡 MEDIUM\n\n## 🎯 Systems Affected\n\n### Critical Impact\n**Authentication System** 🔴 HIGH RISK\n- Files: `src/auth/middleware.ts`, `src/auth/rate-limiter.ts`\n- Impact: All 40+ authenticated endpoints\n- Risk: Core auth flow modification\n\n**Database Schema** 🟡 MEDIUM RISK\n- Files: `migrations/2024_add_rate_limit_tracking.sql`\n- Impact: New table, affects backups\n- Risk: Requires migration coordination\n\n### Moderate Impact\n**API Responses** 🟢 LOW RISK\n- Files: `src/utils/response-formatter.ts`\n- Impact: New 429 status code handling\n- Risk: Isolated, backward compatible\n\n## ⚠️ Risks Detected\n\n### 🔴 Must Fix Before Merge\n1. **Redis Connection Pool**\n - Issue: No connection pooling config\n - Risk: Connection exhaustion under load\n - Fix: Add `maxConnections` in `src/config/redis.ts`\n\n2. **Missing Tests**\n - Issue: `rate-limiter.ts` has no test file\n - Risk: Untested edge cases\n - Fix: Add `__tests__/rate-limiter.test.ts`\n\n### 🟡 Should Address\n3. **Hardcoded Limits**\n - Issue: Rate limits in code (line 45)\n - Risk: Can't adjust per environment\n - Fix: Move to `.env` config\n\n4. **API Contract**\n - Issue: New `X-RateLimit-*` headers not documented\n - Risk: Client compatibility\n - Fix: Update OpenAPI spec\n\n## ✅ What's Good\n- Clean module separation\n- Comprehensive logging\n- Redis fallback handling\n\n## 📋 Review Checklist\n\n### Before Approval\n- [ ] Redis pool configuration added\n- [ ] Integration tests for rate limiter\n- [ ] Config moved to environment variables\n- [ ] API docs updated with new headers\n\n### Security Review\n- [ ] Rate limit bypass logic for admins\n- [ ] Error messages don't leak sensitive data\n- [ ] Database migration rollback tested\n\n### Performance Review\n- [ ] Load test with concurrent requests\n- [ ] Redis failover scenario tested\n- [ ] Monitor rate limit metrics in dashboard\n\n## 🔗 Dependencies\n```diff\n+ redis@4.6.7\n+ ioredis@5.3.2\n express@4.18.2 → 4.19.0 (security patch)\n```\n\n## 💡 Action Items\n\n**For Author (@sarah-dev):**\n1. Add integration tests (high priority)\n2. Configure Redis connection pool\n3. Move rate limits to environment config\n4. Update API documentation\n\n**For Reviewers:**\n- @backend-lead: Security & auth flow review (30-45 min)\n- @devops: Redis infrastructure & migration (20 min)\n- @qa-team: Test coverage verification (15 min)\n\n**Estimated Review Time:** 45-60 minutes\n\n---\n**Analysis Method:**\n- GitHub extension fetched PR data, diffs, and commit metadata\n- Developer extension analyzed code structure, dependencies, and patterns\n- Cross-referenced changes against codebase architecture",
|
||||
"extensions": [
|
||||
{
|
||||
"name": "GitHub",
|
||||
"command": "docker",
|
||||
"args": [
|
||||
"run",
|
||||
"-i",
|
||||
"--rm",
|
||||
"-e",
|
||||
"GITHUB_PERSONAL_ACCESS_TOKEN",
|
||||
"ghcr.io/github/github-mcp-server"
|
||||
],
|
||||
"is_builtin": false,
|
||||
"environmentVariables": [
|
||||
{
|
||||
"name": "GITHUB_PERSONAL_ACCESS_TOKEN",
|
||||
"description": "<YOUR_TOKEN>",
|
||||
"required": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Developer",
|
||||
"command": "developer",
|
||||
"is_builtin": true,
|
||||
"environmentVariables": []
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user