From 86539bd522dc89fd5ea9f82505cc0a6b9abf710b Mon Sep 17 00:00:00 2001 From: "Rai (Michael Pokorny)" Date: Wed, 25 Jun 2025 01:34:30 -0700 Subject: [PATCH] wip --- agentydragon/README.md | 15 +++++++++++---- agentydragon/tasks/create-task-worktree.sh | 7 ++++++- .../tools/manager_utils/launch_ready_to_merge.sh | 14 ++++++++++++++ 3 files changed, 31 insertions(+), 5 deletions(-) create mode 100755 agentydragon/tools/manager_utils/launch_ready_to_merge.sh diff --git a/agentydragon/README.md b/agentydragon/README.md index f69d392782..9045458e0a 100644 --- a/agentydragon/README.md +++ b/agentydragon/README.md @@ -54,14 +54,21 @@ Tasks live under `agentydragon/tasks/` as individual Markdown files. Please upda - - ```sh - # Accept a full slug (NN-slug) or two-digit task ID (NN), optionally multiple; use --tmux to open each in a tmux window: -- create-task-worktree.sh [--agent] [--tmux] [...] +- agentydragon/tasks/create-task-worktree.sh [--agent] [--tmux] [...] - ``` - - Without `--agent`, this creates or reuses a worktree at - `agentydragon/tasks/.worktrees/-` off the `agentydragon` branch. - - With `--agent`, after setup it launches a Codex agent in that workspace, - - preloaded to work on the specified task from its Markdown file. -- After the Developer agent finishes and updates the task file, the Commit agent will emit the commit message on stdout. An external orchestrator will then stage files, run pre-commit hooks, and perform the actual `git commit`. You do not need to run `git commit` manually. + - With `--agent`, after setup it launches the Developer Codex agent in that workspace (using `prompts/developer.md` and the task file), + - and when the developer agent exits, it automatically runs the Commit agent helper to stage fixes and commit the work. +- **Commit agent helper**: in `agentydragon/tasks/`, run: +- +- ```sh +- # Generate and apply commit for completed task in its worktree: +- agentydragon/tasks/launch-commit-agent.sh +- ``` +- +-After the Developer agent finishes and updates the task file, the Commit agent will emit the commit message on stdout. An external orchestrator will then stage files, run pre-commit hooks, and perform the actual `git commit`. You do not need to run `git commit` manually. --- diff --git a/agentydragon/tasks/create-task-worktree.sh b/agentydragon/tasks/create-task-worktree.sh index ea8970ff44..a1211c93f4 100755 --- a/agentydragon/tasks/create-task-worktree.sh +++ b/agentydragon/tasks/create-task-worktree.sh @@ -125,7 +125,7 @@ fi echo "Done." if [ "$agent_mode" = true ]; then - echo "Launching Codex agent for task $task_slug in sandboxed worktree" + echo "Launching Developer Codex agent for task $task_slug in sandboxed worktree" prompt_file="$repo_root/agentydragon/prompts/developer.md" task_file="$repo_root/agentydragon/tasks/$task_slug.md" if [ ! -f "$prompt_file" ]; then @@ -140,5 +140,10 @@ if [ "$agent_mode" = true ]; then cmd+=(exec) fi echo "${cmd[@]}" + # Run Developer agent (non-interactive by default) to implement the task "${cmd[@]}" "$(<"$prompt_file")\n\n$(<"$task_file")" + + # After the Developer agent exits, stage and commit via the Commit agent helper + echo "Running Commit agent to finalize task $task_slug" + "$repo_root/agentydragon/tasks/launch-commit-agent.sh" "$task_slug" fi diff --git a/agentydragon/tools/manager_utils/launch_ready_to_merge.sh b/agentydragon/tools/manager_utils/launch_ready_to_merge.sh new file mode 100755 index 0000000000..7eb738090a --- /dev/null +++ b/agentydragon/tools/manager_utils/launch_ready_to_merge.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +# launch_ready_to_merge.sh: open tmux panes for all tasks marked Ready to merge +set -euo pipefail + +# Gather all tasks flagged Ready to merge by the status script +ready=$(agentydragon_task.py status \ + | sed -n -e '1,/^Ready to merge:/d' -e 's/^Ready to merge:[ ]*//') +if [ -z "$ready" ]; then + echo "No tasks are Ready to merge." + exit 0 +fi + +echo "Launching tasks: $ready" +agentydragon/tasks/create-task-worktree.sh --agent --tmux $ready