Package ai.tabforge.workshop.model
Record Class ReviewScope
java.lang.Object
java.lang.Record
ai.tabforge.workshop.model.ReviewScope
- Record Components:
projectPath- absolute path to the Java project rootscopeType- CHANGED_FILES (git diff HEAD) or FULL_PROJECTfocus- which specialist agents to run (default: ALL)
public record ReviewScope(String projectPath, ReviewScope.ScopeType scopeType, ReviewScope.FocusFilter focus)
extends Record
Defines what to review: which files and which specialist agents to run.
Passed to OrchestratorAgent.startReview() by StartReviewTool
after the MCP tool call arrives from Claude Desktop.
Analogy: like a Maven build profile — the same project can be built
in different ways (-P security-only, -P full-review).
ReviewScope is the profile that tells the orchestrator how deep to go
and which specialists to involve.
CERTIFICATION NOTE — Tool Design & MCP Integration (18% of exam):
ReviewScope is constructed from the MCP tool input parameters.
StartReviewTool receives raw JSON from Claude, validates it,
and produces a ReviewScope. This is the boundary where untyped
MCP input becomes a typed domain object.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumWhich specialist sub-agents to run.static enumWhich files to include in the review. -
Constructor Summary
ConstructorsConstructorDescriptionReviewScope(String projectPath, ReviewScope.ScopeType scopeType, ReviewScope.FocusFilter focus) Creates an instance of aReviewScoperecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReviewScopechangedFiles(String projectPath) Convenience factory — only changed files (git diff HEAD), all agents.final booleanIndicates whether some other object is "equal to" this one.focus()Returns the value of thefocusrecord component.static ReviewScopeConvenience factory — full project scan with all agents.final inthashCode()Returns a hash code value for this object.Returns the value of theprojectPathrecord component.Returns the value of thescopeTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReviewScope
public ReviewScope(String projectPath, ReviewScope.ScopeType scopeType, ReviewScope.FocusFilter focus) Creates an instance of aReviewScoperecord class.- Parameters:
projectPath- the value for theprojectPathrecord componentscopeType- the value for thescopeTyperecord componentfocus- the value for thefocusrecord component
-
-
Method Details
-
fullScan
Convenience factory — full project scan with all agents. Used in tests and when the developer does not specify a scope. -
changedFiles
Convenience factory — only changed files (git diff HEAD), all agents. Default scope for pre-PR reviews — the most common use case. -
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. All components in this record class are compared withObjects::equals(Object,Object). -
projectPath
Returns the value of theprojectPathrecord component.- Returns:
- the value of the
projectPathrecord component
-
scopeType
Returns the value of thescopeTyperecord component.- Returns:
- the value of the
scopeTyperecord component
-
focus
Returns the value of thefocusrecord component.- Returns:
- the value of the
focusrecord component
-