Package org.machanism.machai.gw.reviewer
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 TypeMethodDescriptionString[]Returns the file extensions (without the dot) that this reviewer can process.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
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 contextfile- the file to analyze- Returns:
- a formatted prompt fragment, or
nullwhen 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
-