feat: review-mode workflow and fix review gate edge cases#26
Merged
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Review mode workflow
Granary now supports an optional review gate in the task and project lifecycle. When enabled, completed work transitions to
in_reviewinstead of going straight todone/completed, giving a reviewer (human or agent) the chance to approve or reject it before it's finalized.Two scopes:
taskmode —granary work donemoves the task toin_reviewand emits atask.reviewevent. A reviewer approves or rejects individual tasks.projectmode — Tasks still complete normally, but when all tasks are done, the project entersin_reviewinstead ofcompleted. Reviewers approve the project as a whole, or reject it by creating follow-up tasks and reopening the project.New
granary reviewcommand:granary review <id>— displays reviewer context (task/project details, comments, suggested actions)granary review <id> approve ["comment"]— approves and completes the entitygranary review <id> reject "feedback"— rejects with feedback; tasks return totodo, projects reopen toactivewith draft tasks promoted totodoReview comments use a new
reviewcomment kind, and review events (task.review,project.review) are emitted so downstream agents or integrations can react.Review mode configuration
Review mode is stored in the workspace database (
configtable) under the keyworkflow.review_mode. Enable it with:Updated SQL triggers
The
trg_project_auto_completetrigger is now config-aware — whenworkflow.review_modeis set toproject, it transitions the project toin_reviewinstead ofcompleted. New triggers emittask.reviewandproject.reviewevents on status transitions.✻ Clauded...