Interface Reviewer

All Known Implementing Classes:
HtmlReviewer, JavaReviewer, MarkdownReviewer, PumlReviewer, PythonReviewer, TextReviewer, TypeScriptReviewer

public interface Reviewer
Service-provider interface (SPI) for components that scan project files and extract @guidance instructions for downstream processing.

Implementations typically target a specific file format (for example, Java, Markdown, or HTML), understand that format's comment conventions, and produce a normalized prompt fragment that includes path context.

  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the file extensions (without the dot) that this reviewer can process.
    perform(File projectDir, File file)
    Reviews a file and returns a formatted fragment (often including file content and/or extracted guidance) for use by the Ghostwriter pipeline.
  • Method Details

    • perform

      String perform(File projectDir, File file) throws IOException
      Reviews a file and returns a formatted fragment (often including file content and/or extracted guidance) for use by the Ghostwriter pipeline.
      Parameters:
      projectDir - the project root directory used to compute related paths for context
      file - the file to analyze
      Returns:
      a formatted prompt fragment, or null when no relevant guidance is present
      Throws:
      IOException - if an error occurs reading the file
    • getSupportedFileExtensions

      String[] getSupportedFileExtensions()
      Returns the file extensions (without the dot) that this reviewer can process.
      Returns:
      supported file extensions