Record Class ReviewReport
- Record Components:
reviewId- unique UUID for this review sessionprojectPath- root path of the reviewed projectstartedAt- ISO-8601 timestamp when the review was initiatedcompletedAt- ISO-8601 timestamp when the review finished; null if still running or awaiting human inputstatus- current state of the reviewoverallRisk- worst severity found across all agentssafeToMerge- false if any unresolved CRITICAL findings remainfindings- all findings sorted by severity descendingagentSummaries- per-agent stats keyed by agent namehumanDecisions- all escalations and the developer's responses
Analogy: like a Maven build report that aggregates results from all plugins (Checkstyle, SpotBugs, Surefire) into one summary. Each plugin is a sub-agent; this class is the combined result that the developer actually reads in Claude Desktop.
Serialized as JSON by GetReportTool and returned to Claude,
which then presents it to the developer in natural language.
CERTIFICATION NOTE — Domain 2: Tool Design & MCP Integration (18%):
ReviewReport is the JSON payload returned by GetReportTool
to Claude Desktop. The field names, structure, and the explicit
safeToMerge boolean are deliberate MCP tool design decisions —
Claude must be able to reason about this JSON and present it to the
developer in natural language without ambiguity.
CERTIFICATION NOTE — Domain 4: Prompt Engineering & Structured Output (20%): The JSON produced from this record is what Claude receives from the MCP tool and then summarizes for the developer. Designing the output schema so that Claude can reason about it effectively (clear field names, sorted findings, explicit safeToMerge flag) is part of the "structured output" exam domain.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumCurrent lifecycle state of the review session. -
Constructor Summary
ConstructorsConstructorDescriptionReviewReport(String reviewId, String projectPath, String startedAt, String completedAt, ReviewReport.ReviewStatus status, Severity overallRisk, boolean safeToMerge, List<Finding> findings, Map<String, AgentSummary> agentSummaries, List<HumanDecision> humanDecisions) Creates an instance of aReviewReportrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentSummariesrecord component.Returns the value of thecompletedAtrecord component.Returns only CRITICAL findings — used byOrchestratorAgent#escalate().final booleanIndicates whether some other object is "equal to" this one.doubleEstimated total cost of this review in USD.findings()Returns the value of thefindingsrecord component.Returns findings sorted by severity (CRITICAL first) then by confidence descending.final inthashCode()Returns a hash code value for this object.Returns the value of thehumanDecisionsrecord component.Returns the value of theoverallRiskrecord component.Returns the value of theprojectPathrecord component.reviewId()Returns the value of thereviewIdrecord component.booleanReturns the value of thesafeToMergerecord component.Returns the value of thestartedAtrecord component.status()Returns the value of thestatusrecord component.final StringtoString()Returns a string representation of this record class.intTotal tokens consumed across all agents in this review.
-
Constructor Details
-
ReviewReport
public ReviewReport(String reviewId, String projectPath, String startedAt, String completedAt, ReviewReport.ReviewStatus status, Severity overallRisk, boolean safeToMerge, List<Finding> findings, Map<String, AgentSummary> agentSummaries, List<HumanDecision> humanDecisions) Creates an instance of aReviewReportrecord class.- Parameters:
reviewId- the value for thereviewIdrecord componentprojectPath- the value for theprojectPathrecord componentstartedAt- the value for thestartedAtrecord componentcompletedAt- the value for thecompletedAtrecord componentstatus- the value for thestatusrecord componentoverallRisk- the value for theoverallRiskrecord componentsafeToMerge- the value for thesafeToMergerecord componentfindings- the value for thefindingsrecord componentagentSummaries- the value for theagentSummariesrecord componenthumanDecisions- the value for thehumanDecisionsrecord component
-
-
Method Details
-
criticalFindings
Returns only CRITICAL findings — used byOrchestratorAgent#escalate(). -
findingsByPriority
Returns findings sorted by severity (CRITICAL first) then by confidence descending. -
totalTokensUsed
public int totalTokensUsed()Total tokens consumed across all agents in this review. -
estimatedTotalCostUsd
public double estimatedTotalCostUsd()Estimated total cost of this review in USD. -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
reviewId
Returns the value of thereviewIdrecord component.- Returns:
- the value of the
reviewIdrecord component
-
projectPath
Returns the value of theprojectPathrecord component.- Returns:
- the value of the
projectPathrecord component
-
startedAt
Returns the value of thestartedAtrecord component.- Returns:
- the value of the
startedAtrecord component
-
completedAt
Returns the value of thecompletedAtrecord component.- Returns:
- the value of the
completedAtrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
overallRisk
Returns the value of theoverallRiskrecord component.- Returns:
- the value of the
overallRiskrecord component
-
safeToMerge
public boolean safeToMerge()Returns the value of thesafeToMergerecord component.- Returns:
- the value of the
safeToMergerecord component
-
findings
Returns the value of thefindingsrecord component.- Returns:
- the value of the
findingsrecord component
-
agentSummaries
Returns the value of theagentSummariesrecord component.- Returns:
- the value of the
agentSummariesrecord component
-
humanDecisions
Returns the value of thehumanDecisionsrecord component.- Returns:
- the value of the
humanDecisionsrecord component
-