Package org.machanism.machai.gw.reviewer
package org.machanism.machai.gw.reviewer
File-format-aware components that locate embedded
@guidance directives in project files and convert
them into normalized prompt fragments for Ghostwriter.
The central extension point is the Reviewer service-provider
interface (SPI). Each Reviewer implementation targets one or more file types, understands the
comment/string literal conventions for that format, and produces a formatted fragment suitable for downstream
processing.
How reviewers are used
- Read a supported file (typically UTF-8) and detect whether it contains an
@guidancedirective. - Compute a project-relative path via
ProjectLayout.getRelativePath(java.io.File, java.io.File)to provide stable context independent of the local filesystem layout. - Format the final fragment using templates loaded from the
document-promptsresource bundle.
Provided reviewers
JavaReviewer– Java source (includingpackage-info.java)MarkdownReviewer– MarkdownHtmlReviewer– HTML/XMLTypeScriptReviewer– TypeScriptPythonReviewer– PythonPumlReviewer– PlantUMLTextReviewer– Plain@guidance.txtfiles
- 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).