Package org.machanism.machai.gw.reviewer
reviewer implementations that inspect
project artifacts for embedded @guidance directives and convert matching files into prompt
fragments for the Ghostwriter review pipeline.
The package defines a format-oriented review layer that supports Java source, Markdown,
HTML/XML, TypeScript, Python, PlantUML, and dedicated text guidance files. Each reviewer detects
guidance markers according to the syntax rules of its target format and, when guidance is present,
produces a normalized prompt using entries from the document-prompts resource bundle.
The central contract is Reviewer, a service-provider
interface that accepts a project root directory and a candidate file, then returns either a
formatted prompt fragment or null when the file does not contain actionable guidance.
Implementations typically read source content as UTF-8, resolve project-relative paths through
ProjectLayout.getRelativePath(java.io.File, java.io.File),
and tailor the generated prompt to the reviewed artifact type.
Notable special cases include package-level Java review in
JavaReviewer, where package-info.java yields a
dedicated package prompt, and standalone @guidance.txt handling in
TextReviewer, which treats the containing directory as
the contextual target of the guidance.
- See Also:
-
ClassDescription
Reviewerimplementation for Java source files (.java).Reviewerimplementation for Markdown files (.md).Reviewer implementation for PlantUML files (.puml).Reviewerimplementation for Python source files (.py).Service-provider interface (SPI) for components that scan project files and extract@guidanceinstructions for downstream processing.Reviewer implementation for generic guidance text files.Reviewerimplementation for TypeScript source files (.ts).