Package org.approvej.review
Class Reviewers
java.lang.Object
org.approvej.review.Reviewers
Collection of static methods to create
Reviewer instances.-
Method Summary
Modifier and TypeMethodDescriptionstatic ReviewerAReviewerthat calls an AI CLI tool to review the difference between the received and approved files.static ReviewerAReviewerthat accepts any given received value, ignoring the previously approved value.static Reviewernone()AReviewerthat does nothing and never triggers a reapproval.static ReviewerAReviewerthat executes the given script.
-
Method Details
-
none
AReviewerthat does nothing and never triggers a reapproval.- Returns:
- a
Reviewerthat does nothing
-
script
AReviewerthat executes the given script.- Parameters:
script- the script to be executed with placeholders"{receivedFile}"and"{approvedFile}"- Returns:
- the new
ScriptReviewer
-
ai
AReviewerthat calls an AI CLI tool to review the difference between the received and approved files.The AI CLI receives a prompt on stdin. For text files, this prompt includes a unified diff. For image files, the prompt mentions the relevant file paths (for example, a diff image path when available). File paths are only passed as CLI arguments if the command string includes placeholders that are expanded by the reviewer. If the AI responds with "YES", the received file is automatically approved.
- Parameters:
command- the AI CLI command to execute (e.g., "claude", "gemini")- Returns:
- the new
AiReviewer
-
automatic
AReviewerthat accepts any given received value, ignoring the previously approved value.This may be a good idea when you have a lot of tests with changed results, and you simply want to update them all at once. You probably want to review the changed approved files before committing them to version control!
- Returns:
- a
Reviewerthat accepts any received value automatically
-