Fix Worker.hs prompt to use lint instead of hlint

t-199·WorkTask·
·
·
·Omni/Agent/Worker.hs
Created3 months ago·Updated3 months ago

Description

Edit

The buildBasePrompt in Worker.hs mentions hlint directly but AGENTS.md says 'DO NOT use hlint directly. Always use the lint command instead'. Update the prompt to reference lint tool instead of hlint.

Timeline (17)·62.8K tokens

💭Thought[engineer]3 months ago

"I'll start by examining the Worker.hs file to understand the current prompt and then make the necessary changes."

"read_file
{\"path\": \"Omni/Agent/Worker.hs\"}"
💭Thought[engineer]3 months ago

"Now I can see the exact lines that need to be changed. Looking at lines 320-328, I need to:\n1. Replace \"hlint suggestions\" with \"lint issues\" \n2. Replace \"if hlint finds issues\" with \"if lint finds issues\"\n3. Replace \"You must fix hlint suggestions like:\" with \"You must fix lint suggestions like:\"\n4. Remove the specific hlint suggestion examples (lines 326-328)\n\nLet me make these changes:"

"edit_file
{\"path\": \"Omni/Agent/Worker.hs\", \"old_str\": \"    <> \\\"4. Fix ALL errors from bild --test (including hlint suggestions).\\\\n\\\"\\n    <> \\\"5. Keep running bild --test until it passes with no errors.\\\\n\\\"\\n    <> \\\"6. Do NOT update task status or manage git.\\\\n\\\"\\n    <> \\\"7. Only exit after bild --test passes.\\\\n\\\\n\\\"\\n    <> \\\"IMPORTANT: The git commit will fail if hlint finds issues.\\\\n\\\"\\n    <> \\\"You must fix hlint suggestions like:\\\\n\\\"\\n    <> \\\"- 'Use list comprehension' -> use [x | cond] instead of if/else\\\\n\\\"\\n    <> \\\"- 'Avoid lambda' -> use function composition\\\\n\\\"\\n    <> \\\"- 'Redundant bracket' -> remove unnecessary parens\\\\n\\\\n\\\"\", \"new_str\": \"    <> \\\"4. Fix ALL errors from bild --test (including lint issues).\\\\n\\\"\\n    <> \\\"5. Keep running bild --test until it passes with no errors.\\\\n\\\"\\n    <> \\\"6. Do NOT update task status or manage git.\\\\n\\\"\\n    <> \\\"7. Only exit after bild --test passes.\\\\n\\\\n\\\"\\n    <> \\\"IMPORTANT: The git commit will fail if lint finds issues.\\\\n\\\"\\n    <> \\\"You must fix all lint suggestions.\\\\n\\\\n\\\"\"}"
💭Thought[engineer]3 months ago

"Good! Now let me verify the changes look correct:"

"read_file
{\"path\": \"Omni/Agent/Worker.hs\", \"start_line\": 315, \"end_line\": 335}"
💭Thought[engineer]3 months ago

"Perfect! The changes look good. Now I need to run bild --test Omni/Agent/Worker.hs to make sure there are no errors:"

"run_bash
{\"command\": \"bild --test Omni/Agent/Worker.hs\", \"timeout\": 120}"
💭Thought[engineer]3 months ago

"Excellent! The build passed successfully with no errors. Let me verify the final state of the changes one more time to confirm everything is correct:"

"read_file
{\"path\": \"Omni/Agent/Worker.hs\", \"start_line\": 308, \"end_line\": 336}"
💭Thought[engineer]3 months ago

"Perfect! The changes have been successfully implemented. Let me summarize what was done:\n\n## Summary\n\nI've successfully updated the buildBasePrompt function in Omni/Agent/Worker.hs to use \"lint\" instead of \"hlint\" throughout the prompt. The changes made were:\n\n### Changes:\n1. Line 320: Changed \"including hlint suggestions\" → \"including lint issues\"\n2. Line 324: Changed \"if hlint finds issues\" → \"if lint finds issues\" \n3. Line 325: Changed \"You must fix hlint suggestions like:\" → \"You must fix all lint suggestions.\"\n4. Removed lines 326-328: Deleted the specific hlint suggestion examples:\n - 'Use list comprehension' -> use [x | cond] instead of if/else\n - 'Avoid lambda' -> use function composition\n - 'Redundant bracket' -> remove unnecessary parens\n\n### Verification:\n- Ran bild --test Omni/Agent/Worker.hs ✓ PASSED with no errors\n\nThe prompt now correctly references the lint command instead of hlint directly, which aligns with the AGENTS.md guidelines and the knowledge base facts that state \"NEVER run hlint directly. Always use the lint command instead.\""

📝Complete[engineer]3 months ago
null