Pipeline Dev.hs: agent spawning and prompt building

t-603.7·WorkTask·
·
·
·Omni/Pipeline.hs
Parent:t-603·Created4 days ago·Updated4 days ago

Description

Edit

Create Omni/Pipeline/Dev.hs - agent spawning and prompt building.

Depends on: Omni/Pipeline/Core.hs, Omni/Pipeline/State.hs

Two responsibilities: building the dev prompt, and managing agent lifecycle.

Prompt building (pure):

  • buildDevPrompt :: Text -> Task -> Int -> Maybe Text -> Text

-- (baseBranch, task, patchsetCount, maybeReviewFeedback) -> prompt text -- Simplified prompt: just task context + review feedback, no status management -- Agent's job: read task, write code, commit. Do NOT change status. -- Template per DESIGN.md

Agent lifecycle:

  • spawnDev :: PipelineConfig -> FilePath -> Text -> Task -> Maybe Text -> IO ActiveDev

-- (config, workspace, baseBranch, task, reviewFeedback) -- Builds prompt, writes to file, calls agentd run <file> -n <runId> ... -- Returns ActiveDev record

  • checkDevStatus :: ActiveDev -> IO DevResult

-- data DevResult = StillRunning | Finished ExitStatus (Maybe Text) -- Polls agentd status <runId> --json -- Checks if commit SHA changed vs beforeSha

  • getRunCost :: Text -> IO Double

-- Extract cost_cents from agentd status

Verify: typecheck.sh Omni/Pipeline/Dev.hs

Timeline (1)

🔄[human]Open → Done4 days ago