Convert pi-review.sh to Haskell

t-278.3·WorkTask·
·
·
·Omni/Ide.hs
Parent:t-278·Created1 month ago·Updated1 month ago

Description

Edit

Convert the pi-review.sh bash script to a Haskell module for better integration with Ava.

Current Implementation

Omni/Ide/pi-review.sh - bash script that:

  • Checks for uncommitted changes
  • Gets task context
  • Runs lint --fix, bild, bild --test
  • Builds review prompt with diff and verify output
  • Runs pi -p, parses VERDICT line
  • APPROVE: commits, marks done
  • REJECT: reverts, adds comment, marks needs-help
  • REQUEST_CHANGES: keeps changes, adds comment

Haskell Version

Create Omni/Ide/PiReview.hs (or similar) that:

  • Exposes: runReviewer :: TaskId -> IO ReviewResult
  • data ReviewResult = Approved | Rejected Text | ChangesRequested Text
  • Uses Omni.Task.Core for task operations
  • Runs verify commands via System.Process
  • Parses verdict from pi output

Benefits

  • Structured return type (not exit codes)
  • Direct integration with Ava orchestrator
  • Can report detailed status back to Telegram
  • Type-safe verdict handling

Notes

  • Keep subprocess-to-pi approach
  • Verdict parsing needs to be robust
  • Consider capturing pi stdout for logging

Timeline (1)

🔄[human]Open → Done1 month ago