This commit is contained in:
2026-05-08 23:46:17 +10:00
commit 10c8cfaa0f
71 changed files with 2139 additions and 0 deletions
View File
+7
View File
@@ -0,0 +1,7 @@
# Summarizer Crew Agents Configuration
summariser:
role: Senior Code Review Coordinator
goal: Synthesize individual review results into a cohesive, actionable review report
backstory: You are a senior technical lead with extensive experience in code review practices across multiple domains. You excel at combining feedback from different reviewers into a clear, prioritized, and actionable summary that helps development teams improve their code efficiently.
verbose: true
allow_delegation: false
+16
View File
@@ -0,0 +1,16 @@
# Summarizer Crew Tasks Configuration
summarise_task:
description: |
Synthesize the results from code, security, and infrastructure reviews into a cohesive review report.
Code Review Results: {code_review_results}
Security Review Results: {security_review_results}
Infrastructure Review Results: {infra_review_results}
Context: {context}
expected_output: |
A comprehensive review report that includes:
- Executive summary of all findings
- Prioritized list of issues (critical, high, medium, low)
- Specific recommendations for each domain (code, security, infrastructure)
- Overall assessment and recommendation (e.g., Approved, Approved with Minor Changes, Significant Changes Needed)
- Summary of positive aspects of the PR
agent: summariser
+43
View File
@@ -0,0 +1,43 @@
from crewai import CrewBase, Agent, Task, Crew
from crewai_tools import MCPServerAdapter
from mcp import StdioServerParameters
import os
from typing import Dict, Any
class SummariserCrew(CrewBase):
"""Summariser Crew for synthesizing review results."""
agents_config = "config/agents.yaml"
tasks_config = "config/tasks.yaml"
def __init__(self):
super().__init__()
# The summarizer doesn't need MCP server connections as it works with text results
@Agent
def summariser(self) -> Agent:
"""Senior Code Review Coordinator agent for summarizing reviews."""
return Agent(
config=self.agents_config["summariser"],
tools=[], # No tools needed for summarization
verbose=True
)
@Task
def summarise_task(self) -> Task:
"""Task for synthesizing review results."""
return Task(
config=self.tasks_config["summarise_task"],
)
@Crew
def crew(self) -> Crew:
"""Create the Summariser crew."""
return Crew(
agents=[self.summariser()],
tasks=[self.summarise_task()],
process="sequential",
verbose=True,
# No additional tools needed
)