-
Notifications
You must be signed in to change notification settings - Fork 79
Open
Labels
Description
Parent Issue
Part of #879 — Support Multi-Agent Execution Modes Per Task
Context
In the implementer-reviewer pattern, the reviewer agent outputs a verdict (approve or request changes). This verdict must be reliably parsed from the agent's response to decide whether to proceed or trigger a revision cycle. There is no existing verdict parsing or structured output extraction in the codebase.
Task
Implement verdict parsing for reviewer output and the revision feedback loop.
Key Changes
-
Create
ReviewVerdictParser:public class ReviewVerdictParser { ReviewVerdict parse(String reviewerOutput); } @Data public class ReviewVerdict { VerdictType type; // APPROVE, REQUEST_CHANGES List<String> comments; // specific feedback items String summary; // one-line summary double confidence; // 0.0-1.0 (optional) } enum VerdictType { APPROVE, REQUEST_CHANGES }
-
Parsing strategy:
- Instruct reviewer to output a structured block (e.g., JSON or markdown with
## Verdict: APPROVE|REQUEST_CHANGES) - Parser extracts verdict type and comments
- Fallback heuristics if structured format not followed (keyword detection: "approve", "reject", "changes needed")
- Instruct reviewer to output a structured block (e.g., JSON or markdown with
-
Revision cycle in
MultiAgentPhaseManager:reviewVerdict = parser.parse(reviewerOutput) if (APPROVE) → complete task if (REQUEST_CHANGES && revisionCount < maxRevisions): - Build revision prompt with review comments - Re-run implementer with revision context - Re-run reviewer on new diff - revisionCount++ if (REQUEST_CHANGES && revisionCount >= maxRevisions): - Mark task as "Needs Manual Review" - Append all review comments to task's implementationNotes - Skip task with reason -
Configurable max revision cycles: Default 2, configurable in Agent settings.
Files to Create / Modify
src/main/java/com/devoxx/genie/service/spec/ReviewVerdictParser.java(new)src/main/java/com/devoxx/genie/model/spec/ReviewVerdict.java(new)src/main/java/com/devoxx/genie/service/spec/MultiAgentPhaseManager.javasrc/main/java/com/devoxx/genie/ui/settings/agent/AgentSettingsComponent.java(max revisions setting)
Dependencies
- Requires: MultiAgentPhaseManager ([FEATURE] #879 - Implement MultiAgentPhaseManager for orchestrating agent sequences #904)
- Requires: AgentRole and context builders ([FEATURE] #879 - Create AgentRole model and role-specific context builders #903)
Acceptance Criteria
- Parser extracts APPROVE/REQUEST_CHANGES from structured reviewer output
- Fallback heuristic works when structured format not followed
- Revision cycle re-runs implementer with review feedback
- Max revision cycles enforced
- Exhausted revisions result in task marked for manual review
- Review comments persisted to task's implementationNotes
Reactions are currently unavailable