Documentation
¶
Overview ¶
Package pr hosts reusable helpers for the pull request workflows that power the `magi pr` command. It includes prompt builders, AGENTS guideline loaders, and the AgenticReviewer used in cmd/pr.go so commands can share hardened logic without reimplementing multi-agent orchestration or sanitization steps.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectAgentGuidelines ¶
CollectAgentGuidelines aggregates every AGENTS.md file discovered under root.
func FormatFindingsComment ¶
func FormatFindingsComment(findings AgentFindings) string
FormatFindingsComment produces a markdown comment from analysis findings.
func LoadPullRequestTemplate ¶
LoadPullRequestTemplate returns the contents of the GitHub pull request template.
Types ¶
type AgentFindings ¶
type AgentFindings struct {
Summary string `json:"summary"`
CodeSmells []string `json:"code_smells"`
SecurityConcerns []string `json:"security_concerns"`
AgentsGuidelineAlerts []string `json:"agents_guideline_alerts"`
TestRecommendations []string `json:"test_recommendations"`
DocumentationUpdates []string `json:"documentation_updates"`
RiskCallouts []string `json:"risk_callouts"`
}
AgentFindings captures the structured response from the analysis agent.
type AgenticReviewer ¶
type AgenticReviewer struct {
// contains filtered or unexported fields
}
AgenticReviewer orchestrates the AgenticGoKit workflow for PR prep.
func NewAgenticReviewer ¶
func NewAgenticReviewer(runtime *shared.RuntimeContext) *AgenticReviewer
NewAgenticReviewer creates a reviewer bound to the shared runtime context.
func (*AgenticReviewer) Review ¶
func (r *AgenticReviewer) Review(ctx context.Context, input ReviewInput) (*ReviewArtifacts, error)
Review executes the multi-agent workflow and returns structured artifacts.
type PullRequestPlan ¶
PullRequestPlan stores the generated title and filled template.
type ReviewArtifacts ¶
type ReviewArtifacts struct {
Analysis AgentFindings
Plan PullRequestPlan
}
ReviewArtifacts groups the analysis findings with the final PR plan.