Record Class ReviewReport

java.lang.Object
java.lang.Record
ai.tabforge.workshop.model.ReviewReport
Record Components:
reviewId - unique UUID for this review session
projectPath - root path of the reviewed project
startedAt - ISO-8601 timestamp when the review was initiated
completedAt - ISO-8601 timestamp when the review finished; null if still running or awaiting human input
status - current state of the review
overallRisk - worst severity found across all agents
safeToMerge - false if any unresolved CRITICAL findings remain
findings - all findings sorted by severity descending
agentSummaries - per-agent stats keyed by agent name
humanDecisions - all escalations and the developer's responses

public record 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) extends Record
The final aggregated output of a complete Workshop review.

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.

  • Constructor Details

  • Method Details

    • criticalFindings

      public List<Finding> criticalFindings()
      Returns only CRITICAL findings — used by OrchestratorAgent#escalate().
    • findingsByPriority

      public List<Finding> 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • reviewId

      public String reviewId()
      Returns the value of the reviewId record component.
      Returns:
      the value of the reviewId record component
    • projectPath

      public String projectPath()
      Returns the value of the projectPath record component.
      Returns:
      the value of the projectPath record component
    • startedAt

      public String startedAt()
      Returns the value of the startedAt record component.
      Returns:
      the value of the startedAt record component
    • completedAt

      public String completedAt()
      Returns the value of the completedAt record component.
      Returns:
      the value of the completedAt record component
    • status

      public ReviewReport.ReviewStatus status()
      Returns the value of the status record component.
      Returns:
      the value of the status record component
    • overallRisk

      public Severity overallRisk()
      Returns the value of the overallRisk record component.
      Returns:
      the value of the overallRisk record component
    • safeToMerge

      public boolean safeToMerge()
      Returns the value of the safeToMerge record component.
      Returns:
      the value of the safeToMerge record component
    • findings

      public List<Finding> findings()
      Returns the value of the findings record component.
      Returns:
      the value of the findings record component
    • agentSummaries

      public Map<String,AgentSummary> agentSummaries()
      Returns the value of the agentSummaries record component.
      Returns:
      the value of the agentSummaries record component
    • humanDecisions

      public List<HumanDecision> humanDecisions()
      Returns the value of the humanDecisions record component.
      Returns:
      the value of the humanDecisions record component