Skip to content

Commit 0fe4501

Browse files
rictusclaude
andcommitted
feat(done): add --review flag for human review workflow (gt-pz8fp)
When polecats complete work that needs human review, they can now use `gt done --review` to queue the issue for human oversight. This sets the source issue to status=review, assignee=overseer so humans can query: bd list --assignee overseer --status review The status change prevents the hooked bead from being auto-closed, allowing the human to review and close manually. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 15eeb74 commit 0fe4501

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

internal/cmd/done.go

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,20 @@ Phase handoff workflow:
4141
The Witness will recycle this polecat and dispatch a new one when the gate
4242
resolves.
4343
44+
Human review workflow:
45+
Use --review to queue completed work for human review instead of auto-closing.
46+
This sets the source issue to status=review, assignee=overseer so humans can
47+
query 'bd list --assignee overseer --status review' to find work needing review.
48+
The polecat's hook is cleared so it can accept new work.
49+
4450
Examples:
4551
gt done # Submit branch, notify COMPLETED
4652
gt done --exit # Submit and exit Claude session
4753
gt done --issue gt-abc # Explicit issue ID
4854
gt done --status ESCALATED # Signal blocker, skip MR
4955
gt done --status DEFERRED # Pause work, skip MR
50-
gt done --phase-complete --gate g-x # Phase done, waiting on gate g-x`,
56+
gt done --phase-complete --gate g-x # Phase done, waiting on gate g-x
57+
gt done --review # Queue for human review`,
5158
RunE: runDone,
5259
}
5360

@@ -58,6 +65,7 @@ var (
5865
doneExit bool
5966
donePhaseComplete bool
6067
doneGate string
68+
doneReview bool
6169
)
6270

6371
// Valid exit types for gt done
@@ -75,6 +83,7 @@ func init() {
7583
doneCmd.Flags().BoolVar(&doneExit, "exit", false, "Exit Claude session after MR submission (self-terminate)")
7684
doneCmd.Flags().BoolVar(&donePhaseComplete, "phase-complete", false, "Signal phase complete - await gate before continuing")
7785
doneCmd.Flags().StringVar(&doneGate, "gate", "", "Gate bead ID to wait on (with --phase-complete)")
86+
doneCmd.Flags().BoolVar(&doneReview, "review", false, "Queue work for human review (sets issue status=review, assignee=overseer)")
7887

7988
rootCmd.AddCommand(doneCmd)
8089
}
@@ -130,6 +139,24 @@ func runDone(cmd *cobra.Command, args []string) error {
130139
}
131140
worker := info.Worker
132141

142+
// Handle --review flag: queue work for human review instead of auto-closing
143+
// This sets the source issue to status=review, assignee=overseer so humans
144+
// can query 'bd list --assignee overseer --status review' to find work.
145+
// The status change prevents the hooked bead from being auto-closed.
146+
if doneReview && issueID != "" {
147+
bd := beads.New(beads.ResolveBeadsDir(cwd))
148+
reviewStatus := "review"
149+
overseer := "overseer"
150+
if err := bd.Update(issueID, beads.UpdateOptions{
151+
Status: &reviewStatus,
152+
Assignee: &overseer,
153+
}); err != nil {
154+
return fmt.Errorf("setting issue %s for human review: %w", issueID, err)
155+
}
156+
fmt.Printf("%s Queued %s for human review (status=review, assignee=overseer)\n",
157+
style.Bold.Render("✓"), issueID)
158+
}
159+
133160
// Determine polecat name from sender detection
134161
sender := detectSender()
135162
polecatName := ""

0 commit comments

Comments
 (0)