Record Class ReviewScope

java.lang.Object
java.lang.Record
ai.tabforge.workshop.model.ReviewScope
Record Components:
projectPath - absolute path to the Java project root
scopeType - CHANGED_FILES (git diff HEAD) or FULL_PROJECT
focus - 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.

  • Constructor Details

  • Method Details

    • fullScan

      public static ReviewScope fullScan(String projectPath)
      Convenience factory — full project scan with all agents. Used in tests and when the developer does not specify a scope.
    • changedFiles

      public static ReviewScope changedFiles(String projectPath)
      Convenience factory — only changed files (git diff HEAD), all agents. Default scope for pre-PR reviews — the most common use case.
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • projectPath

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

      public ReviewScope.ScopeType scopeType()
      Returns the value of the scopeType record component.
      Returns:
      the value of the scopeType record component
    • focus

      public ReviewScope.FocusFilter focus()
      Returns the value of the focus record component.
      Returns:
      the value of the focus record component