diff options
| author | Omni Worker <bot@omni.agent> | 2025-11-22 06:36:53 -0500 |
|---|---|---|
| committer | Omni Worker <bot@omni.agent> | 2025-11-22 06:36:53 -0500 |
| commit | 7107e038ec661e5e121e226250f85771b0fd5ff4 (patch) | |
| tree | cca72309e80d04da484380e2436a7536a30aad21 | |
| parent | 63003a01dd9c17bf354f8468746aac6c7b7725cd (diff) | |
feat: include AGENTS.md in worker prompt
| -rw-r--r-- | .tasks/tasks.jsonl | 7 | ||||
| -rw-r--r-- | Omni/Agent/Worker.hs | 15 |
2 files changed, 18 insertions, 4 deletions
diff --git a/.tasks/tasks.jsonl b/.tasks/tasks.jsonl index 36955bd..a2caf04 100644 --- a/.tasks/tasks.jsonl +++ b/.tasks/tasks.jsonl @@ -181,6 +181,7 @@ {"taskCreatedAt":"2025-11-22T10:41:55.215833393Z","taskDependencies":[],"taskDescription":"The credits in usage-ledger logs are in cents, but we display them as dollars. We need to divide by 100.","taskId":"t-rWcmhyTvV","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Divide usage-ledger credits by 100 to get dollars","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:42:42.156523503Z"} {"taskCreatedAt":"2025-11-22T10:50:50.329217484Z","taskDependencies":[],"taskDescription":"Collection of tasks to improve the robustness of the codebase (builds), the usability of the 'task' tool, and the accuracy of the agent's status reporting.","taskId":"t-rWcmRMaWX","taskNamespace":"Omni.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Open","taskTitle":"Codebase Health and Tooling Improvements","taskType":"Epic","taskUpdatedAt":"2025-11-22T10:50:50.329217484Z"} {"taskCreatedAt":"2025-11-22T10:50:57.552875891Z","taskDependencies":[],"taskDescription":"Implement a 'task edit <id>' command (or 'task update' extension) that allows modifying a task's title, description, priority, and other fields in-place. Currently 'task update' only changes status.","taskId":"t-rWcmRMaWX.1","taskNamespace":"Omni/Task.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Done","taskTitle":"Add 'task edit' command","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:16:49.365516683Z"} -{"taskCreatedAt":"2025-11-22T10:51:01.309897479Z","taskDependencies":[],"taskDescription":"Update the Worker Agent status bar logic to round the displayed credit usage to 2 decimal places (nearest cent). Currently it may show long floating point numbers.","taskId":"t-rWcmRMaWX.2","taskNamespace":"Omni/Agent.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"InProgress","taskTitle":"Round credits to nearest cent in Agent status","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:59:21.517507738Z"} -{"taskCreatedAt":"2025-11-22T10:51:04.73629995Z","taskDependencies":[],"taskDescription":"Update Omni/Task/Core.hs to handle task IDs case-insensitively for lookups and normalize them to lowercase when storing/creating. This improves user experience when typing IDs manually.","taskId":"t-rWcmRMaWX.3","taskNamespace":"Omni/Task.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Open","taskTitle":"Case-insensitive task IDs","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:51:04.73629995Z"} -{"taskCreatedAt":"2025-11-22T10:51:08.813653444Z","taskDependencies":[],"taskDescription":"Create an agent or script that iterates through every namespace in the project and runs 'bild' (e.g. 'bild --time 0 **/*'). For every build failure encountered, it should automatically create a new task with the error details and link it to this epic (or the discovery context).","taskId":"t-rWcmRMaWX.4","taskNamespace":"Omni/Bild.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Open","taskTitle":"Audit codebase builds and file repair tasks","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T10:51:08.813653444Z"} +{"taskCreatedAt":"2025-11-22T10:51:01.309897479Z","taskDependencies":[],"taskDescription":"Update the Worker Agent status bar logic to round the displayed credit usage to 2 decimal places (nearest cent). Currently it may show long floating point numbers.","taskId":"t-rWcmRMaWX.2","taskNamespace":"Omni/Agent.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Review","taskTitle":"Round credits to nearest cent in Agent status","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:26:08.486852994Z"} +{"taskCreatedAt":"2025-11-22T10:51:04.73629995Z","taskDependencies":[],"taskDescription":"Update Omni/Task/Core.hs to handle task IDs case-insensitively for lookups and normalize them to lowercase when storing/creating. This improves user experience when typing IDs manually.","taskId":"t-rWcmRMaWX.3","taskNamespace":"Omni/Task.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"Review","taskTitle":"Case-insensitive task IDs","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:32:56.498756179Z"} +{"taskCreatedAt":"2025-11-22T10:51:08.813653444Z","taskDependencies":[],"taskDescription":"Create an agent or script that iterates through every namespace in the project and runs 'bild' (e.g. 'bild --time 0 **/*'). For every build failure encountered, it should automatically create a new task with the error details and link it to this epic (or the discovery context).","taskId":"t-rWcmRMaWX.4","taskNamespace":"Omni/Bild.hs","taskParent":"t-rWcmRMaWX","taskPriority":"P2","taskStatus":"InProgress","taskTitle":"Audit codebase builds and file repair tasks","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:33:01.061100866Z"} +{"taskCreatedAt":"2025-11-22T11:27:59.621730567Z","taskDependencies":[],"taskDescription":"Update Omni/Agent/Worker.hs to read the content of AGENTS.md and include a relevant summary or the full content in the initial system prompt provided to the Amp agent. This ensures the worker knows about repository conventions, testing standards, and tool usage.","taskId":"t-rWcpiE3LO","taskNamespace":"Omni/Agent.hs","taskParent":null,"taskPriority":"P2","taskStatus":"Done","taskTitle":"Include AGENTS.md context in Worker initial prompt","taskType":"WorkTask","taskUpdatedAt":"2025-11-22T11:36:14.542146518Z"} diff --git a/Omni/Agent/Worker.hs b/Omni/Agent/Worker.hs index 3504765..a861173 100644 --- a/Omni/Agent/Worker.hs +++ b/Omni/Agent/Worker.hs @@ -151,6 +151,19 @@ runAmp repo task = do Directory.createDirectoryIfMissing True (repo </> "_/llm") let logFile = repo </> "_/llm/amp.log" + -- Read AGENTS.md + agentsMd <- + fmap (fromMaybe "") <| do + exists <- Directory.doesFileExist (repo </> "AGENTS.md") + if exists + then Just </ readFile (repo </> "AGENTS.md") + else pure Nothing + + let fullPrompt = + prompt + <> "\n\nREPOSITORY GUIDELINES (AGENTS.md):\n" + <> agentsMd + -- Clean up previous log exists <- Directory.doesFileExist logFile when exists (Directory.removeFile logFile) @@ -160,7 +173,7 @@ runAmp repo task = do tidLog <- forkIO (monitorLog logFile) -- Assume amp is in PATH - let args = ["--log-level", "debug", "--log-file", "_/llm/amp.log", "--dangerously-allow-all", "-x", Text.unpack prompt] + let args = ["--log-level", "debug", "--log-file", "_/llm/amp.log", "--dangerously-allow-all", "-x", Text.unpack fullPrompt] let cp = (Process.proc "amp" args) {Process.cwd = Just repo} (_, _, _, ph) <- Process.createProcess cp |
