Convert pi-code.sh to Haskell

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

Description

Edit

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

Current Implementation

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

  • Claims task (task update <id> in-progress)
  • Gets task context (task show <id> --json)
  • Builds prompt with title, description, namespace, comments
  • Runs pi -p with the prompt

Haskell Version

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

  • Exposes a function: runCoder :: TaskId -> Maybe Text -> IO ExitCode
  • Uses Omni.Task.Core for task operations
  • Shells out to pi via System.Process
  • Returns exit code for orchestrator to handle

Benefits

  • Type safety
  • Direct integration with Ava (no shell parsing)
  • Can add structured logging, error handling
  • Reuse task types from Omni.Task.Core

Notes

  • Keep the simple subprocess-to-pi approach
  • Don't rebuild a custom agent loop
  • The bash script works, this is for integration convenience

Timeline (2)

🔄[human]Open → InProgress1 month ago
🔄[human]InProgress → Done1 month ago