Skip to content

feat: review-mode workflow and fix review gate edge cases#26

Merged
danielkov merged 4 commits into
mainfrom
danielkov/feat/review-mode
Mar 7, 2026
Merged

feat: review-mode workflow and fix review gate edge cases#26
danielkov merged 4 commits into
mainfrom
danielkov/feat/review-mode

Conversation

@danielkov

@danielkov danielkov commented Mar 3, 2026

Copy link
Copy Markdown
Collaborator

Review mode workflow

Granary now supports an optional review gate in the task and project lifecycle. When enabled, completed work transitions to in_review instead of going straight to done/completed, giving a reviewer (human or agent) the chance to approve or reject it before it's finalized.

Two scopes:

  • task modegranary work done moves the task to in_review and emits a task.review event. A reviewer approves or rejects individual tasks.
  • project mode — Tasks still complete normally, but when all tasks are done, the project enters in_review instead of completed. Reviewers approve the project as a whole, or reject it by creating follow-up tasks and reopening the project.

New granary review command:

  • granary review <id> — displays reviewer context (task/project details, comments, suggested actions)
  • granary review <id> approve ["comment"] — approves and completes the entity
  • granary review <id> reject "feedback" — rejects with feedback; tasks return to todo, projects reopen to active with draft tasks promoted to todo

Review comments use a new review comment 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 (config table) under the key workflow.review_mode. Enable it with:

granary config set workflow.review_mode task    # or 'project'
granary config unset workflow.review_mode       # disable

Updated SQL triggers

The trg_project_auto_complete trigger is now config-aware — when workflow.review_mode is set to project, it transitions the project to in_review instead of completed. New triggers emit task.review and project.review events on status transitions.

✻ Clauded...

@danielkov danielkov changed the title Add review-mode workflow and fix review gate edge cases feat: review-mode workflow and fix review gate edge cases Mar 7, 2026
@danielkov danielkov merged commit 385dc74 into main Mar 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant