Tighter pi + task integration

t-278·Epic·
·
·
·Omni/Bild.hs
Created1 month ago·Updated1 month ago

Execution Summary

3/3
Tasks Completed
$0.00
Total Cost
0s
Total Time

Design

Edit

Goal: Make pi automatically integrate with the task system so agents claim tasks, update status, and log work.

Current State

  • task tool exists (Omni/Task.hs) with create/update/show/ready commands
  • pi is a separate tool with no task awareness
  • Agent must manually run task commands

Desired State

pi --task t-123 # Claims task, loads context, updates status on completion

Design Options

Option A: pi wrapper script

Simple bash wrapper that: 1. Runs task show <id> --json to get context 2. Prepends task description to user prompt 3. Runs pi with augmented prompt 4. On exit, updates task status based on exit code

Pros: Simple, no pi modifications needed Cons: Can't update status mid-task, no task awareness in agent

Option B: pi skill/hook

Use pi's skill or hook system to: 1. Load task context on startup 2. Provide task-aware tools to agent 3. Update status during work

Pros: Deeper integration Cons: Need to understand pi extension points

Option C: Custom MCP server

task as an MCP server that pi connects to

Pros: Standard protocol Cons: More infrastructure

Recommendation

Start with Option A (wrapper), iterate to B if needed.

Files to examine

  • Omni/Task.hs, Omni/Task/Core.hs - task system
  • pi docs at ~/c/node_modules/@mariozechner/pi-coding-agent/

Success criteria

  • pi-task t-123 claims task, shows context, works on it
  • Task status updates to in-progress/done/needs-help
  • Agent session logs tied to task ID

Child Tasks

  • t-278.1 - Create pi-review.sh reviewer wrapper [Done]
  • t-278.2 - Convert pi-code.sh to Haskell [Done]
  • t-278.3 - Convert pi-review.sh to Haskell [Done]

Timeline (1)

🔄[human]Open → Done1 month ago