summaryrefslogtreecommitdiff
path: root/Omni/Agent
diff options
context:
space:
mode:
authorBen Sima <ben@bensima.com>2025-12-02 14:04:41 -0500
committerBen Sima <ben@bensima.com>2025-12-02 14:04:41 -0500
commit32f1f3e863a4844ad29285425749405d91f34662 (patch)
treef743896ccdfdf49af8e8de9c54220e5bcd31b4b8 /Omni/Agent
parent9b3cd64d9e7581256294ceaf7fa08f547a88925e (diff)
Remove duplicate prompt content
The task was being added to the prompt twice, once in the base prompt and once in the user prompt.
Diffstat (limited to 'Omni/Agent')
-rw-r--r--Omni/Agent/Worker.hs13
1 files changed, 6 insertions, 7 deletions
diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs
index ed1e3be..0e4071d 100644
--- a/Omni/Agent/Worker.hs
+++ b/Omni/Agent/Worker.hs
@@ -252,7 +252,7 @@ runWithEngine worker repo task = do
-- Build the full prompt
let ns = fromMaybe "." (TaskCore.taskNamespace task)
- let basePrompt = buildBasePrompt task ns repo
+ let basePrompt = buildBasePrompt ns repo
-- Add progress context if present
let progressPrompt = buildProgressPrompt progressContent
@@ -371,12 +371,11 @@ runWithEngine worker repo task = do
pure (EngineSuccess output totalCost)
-- | Build the base prompt for the agent
-buildBasePrompt :: TaskCore.Task -> Text -> FilePath -> Text
-buildBasePrompt task ns repo =
+buildBasePrompt :: Text -> FilePath -> Text
+buildBasePrompt ns repo =
"You are `jr`, an autonomous Senior Software Engineer. You are rigorous, efficient, and safety-conscious.\n"
- <> "Your Goal: Complete the following task with **zero regressions**.\n\n"
- <> formatTask task
- <> "\n\n# The Workflow\n"
+ <> "Your Goal: Complete the assigned task with **zero regressions**.\n\n"
+ <> "# The Workflow\n"
<> "Follow this 4-phase loop. Do not skip phases.\n\n"
<> "## Phase 1: Exploration (MANDATORY)\n"
<> "- NEVER edit immediately. Explore first.\n"
@@ -608,7 +607,7 @@ buildFullPrompt :: TaskCore.Task -> IO Text
buildFullPrompt task = do
repo <- Directory.getCurrentDirectory
let ns = fromMaybe "." (TaskCore.taskNamespace task)
- let basePrompt = buildBasePrompt task ns repo
+ let basePrompt = buildBasePrompt ns repo
maybeRetry <- TaskCore.getRetryContext (TaskCore.taskId task)
progressContent <- TaskCore.getProgressSummary (TaskCore.taskId task)