Package org.machanism.machai.gw.reviewer


package org.machanism.machai.gw.reviewer
Provides 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: