Skip to content

Feature: Implement DecisionHandoff — AI auto-fixes flagged issues before commit #81

Description

@tailorgunjan93

Feature: Implement DecisionHandoff (Agentic Fix Loop)

Discovery

While reading the source code, I found that internal/decisionflow/decisionflow.go
already defines DecisionHandoff (5) with the description "handoff to AI agent"
but it appears unimplemented in the current UI and workflow.

Proposed Behavior

When the user selects "Handoff to AI" after a review:

  1. AI receives the flagged issues + original diff
  2. AI generates fixes for each flagged line
  3. Fixes are applied to the working tree automatically
  4. Changes are re-staged
  5. A fresh review cycle runs automatically
  6. User approves the final result and commits

Why This Is the Killer Feature

Today's workflow: review → manually fix → re-review → commit (slow)
With Handoff: review → one click → AI fixes → approve → commit (fast)

This turns git-lrc from a passive reviewer into an active coding assistant
right at the commit boundary — the ideal moment since context is fresh.

Suggested UX

[R] Re-review   [C] Commit   [S] Skip   [V] Vouch   [H] Handoff to AI ← new

Implementation Notes

  • Handoff should only be allowed in PhaseReviewComplete (already enforced by ActionAllowedInPhase)
  • Fixes should be applied as a new staged amendment, not auto-committed
  • User must explicitly approve before the actual commit proceeds

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions