Record Class Finding
- Record Components:
severity- CRITICAL pauses the review and escalates to the human; WARNING is included in the report without interruption; INFO is advisory and never blocks the reviewagentName- which sub-agent discovered this (e.g. "SecurityAuditorAgent")filePath- source file path relative to project rootlineNumber- line in the file; -1 if the finding is file-levelmessage- human-readable description of the problemsuggestion- concrete fix recommendation the developer can act onconfidence- 0.0–1.0 confidence score; below 0.70 is auto-downgraded from WARNING to INFO byOrchestratorAgent#escalate()ruleId- machine-readable identifier, e.g. "SEC-001", "TXN-003". The identifier of the rule applied by the agent. These are internal values that are defined in the agent class. At the system prompt, we tell Claude which rule IDs he can use: "For SQL injection findings, always use ruleId: SEC-001. For hardcoded secrets, always use ruleId: SEC-002..."
Analogy: like a compiler diagnostic — a file path, a line number, a severity level, and a human-readable message. A Java compiler produces syntax errors; the Workshop produces architectural, security, and quality findings. Same structure, different domain.
Created by: each SubAgent implementation after parsing the
Claude API JSON response. Collected by AgentResultAggregator
into the final ReviewReport.
CERTIFICATION NOTE — Domain 1: Agentic Architecture & Orchestration (27%):
Finding is the atomic output unit of every sub-agent. Each specialist
(SecurityAuditorAgent, TransactionAnalystAgent, etc.) produces a list of these.
The AgentResultAggregator collects them from all agents and merges them
into the final ReviewReport. This is the data that flows between
the agentic loop stages.
CERTIFICATION NOTE — Domain 4: Prompt Engineering & Structured Output (20%):
This record IS the output contract for every sub-agent API call.
The JSON schema enforced via response_format in each Anthropic API
call is derived from the fields of this record. If Claude's response does
not match this structure, the retry loop fires. The schema is the contract;
this record is its Java representation.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theagentNamerecord component.doubleReturns the value of theconfidencerecord component.final booleanIndicates whether some other object is "equal to" this one.filePath()Returns the value of thefilePathrecord component.final inthashCode()Returns a hash code value for this object.booleanReturns true if this finding is confident enough to trigger escalation.intReturns the value of thelineNumberrecord component.message()Returns the value of themessagerecord component.ruleId()Returns the value of theruleIdrecord component.severity()Returns the value of theseverityrecord component.Returns the value of thesuggestionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Finding
public Finding(Severity severity, String agentName, String filePath, int lineNumber, String message, String suggestion, double confidence, String ruleId) Validates invariants at construction time.Confidence must be in [0.0, 1.0]. A value outside this range indicates a bug in the agent's JSON parsing logic.
-
-
Method Details
-
isBelowConfidenceThreshold
public boolean isBelowConfidenceThreshold()Returns true if this finding is confident enough to trigger escalation.CERTIFICATION NOTE — Context Management & Reliability (15% of exam): The 0.70 threshold is the confidence calibration boundary used by
OrchestratorAgent#escalate(). Findings below this threshold are downgraded to INFO — the agent signals uncertainty rather than asserting a risk it cannot substantiate. -
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 '=='. -
severity
Returns the value of theseverityrecord component.- Returns:
- the value of the
severityrecord component
-
agentName
Returns the value of theagentNamerecord component.- Returns:
- the value of the
agentNamerecord component
-
filePath
Returns the value of thefilePathrecord component.- Returns:
- the value of the
filePathrecord component
-
lineNumber
public int lineNumber()Returns the value of thelineNumberrecord component.- Returns:
- the value of the
lineNumberrecord component
-
message
Returns the value of themessagerecord component.- Returns:
- the value of the
messagerecord component
-
suggestion
Returns the value of thesuggestionrecord component.- Returns:
- the value of the
suggestionrecord component
-
confidence
public double confidence()Returns the value of theconfidencerecord component.- Returns:
- the value of the
confidencerecord component
-
ruleId
Returns the value of theruleIdrecord component.- Returns:
- the value of the
ruleIdrecord component
-