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