Skip to main content

/fix — Fix-Review Loop

Resolve FIX-FIRST gaps from /review. Dispatch a fix subagent, re-review, repeat up to 2 loops, then escalate.

When to Use

  • /review returned a FIX-FIRST verdict with CRITICAL or HIGH gaps
  • Orchestrator hands off unresolved gaps after execution review

Flow

  1. Parse gaps — extract gap list from FIX-FIRST verdict (severity, files, failing checks).
  2. Dispatch fixer — send gaps + original wish criteria to fix subagent.
  3. Re-review — dispatch review subagent to validate the fix.
  4. Evaluate verdict:
VerdictConditionAction
SHIPDone. Return to orchestrator.
FIX-FIRSTloop < 2Increment loop, go to step 2.
FIX-FIRSTloop = 2Escalate — max loops reached.
BLOCKEDEscalate immediately.
  1. Escalate (if needed) — mark task BLOCKED, report remaining gaps.

Escalation Format

Fix loop exceeded (2/2). Escalating to human.
Remaining gaps:
- [CRITICAL] <gap description> — <file>
- [HIGH] <gap description> — <file>

Dispatch

Fix and re-review are separate dispatches — never combined in one subagent.
# Spawn a fixer subagent
genie spawn fixer

# Spawn a reviewer subagent (separate from fixer)
genie spawn reviewer

Task Lifecycle Integration

When a PG task exists for the work being fixed, each fix attempt is logged as a task comment:
EventCommand
Fix attempt startgenie task comment #<seq> "Fix loop 1/2: [gap summary]"
Fix attempt resultgenie task comment #<seq> "Fix loop 1/2: [changes made]"
Fix successgenie task comment #<seq> "Fix complete — [summary of all changes]"
Escalation (max loops)genie task block #<seq> --reason "Fix loop exceeded (2/2)"
Escalation (no progress)genie task block #<seq> --reason "No progress — identical gaps across loops"
Task integration is graceful — if no PG task exists, fix loop logging is skipped.

Rules

  • Never fix and review in the same session — always separate subagents
  • Never exceed 2 fix loops — escalate, don’t spin
  • Include original wish criteria in every fix dispatch
  • If identical gaps persist across loops, escalate immediately