From 2ab6be6cdb35cbc4a7dc816c1f7d8da54d074282 Mon Sep 17 00:00:00 2001 From: "Rai (Michael Pokorny)" Date: Wed, 25 Jun 2025 01:20:36 -0700 Subject: [PATCH] wip --- agentydragon/WORKFLOW.md | 37 +++++++++++++++++++ agentydragon/prompts/commit.md | 2 + agentydragon/prompts/developer.md | 2 + agentydragon/prompts/manager.md | 4 +- .../22-message-rendering-layout-options.md | 17 ++++----- ...roval-dialog-transparent-background-fix.md | 33 +++++++++++++++++ .../39-patch-diff-left-indent-coloring-fix.md | 35 ++++++++++++++++++ .../tools/manager_utils/agentydragon_task.py | 6 +++ 8 files changed, 125 insertions(+), 11 deletions(-) create mode 100644 agentydragon/WORKFLOW.md create mode 100644 agentydragon/tasks/38-approval-dialog-transparent-background-fix.md create mode 100644 agentydragon/tasks/39-patch-diff-left-indent-coloring-fix.md diff --git a/agentydragon/WORKFLOW.md b/agentydragon/WORKFLOW.md new file mode 100644 index 0000000000..1fbdc94bd5 --- /dev/null +++ b/agentydragon/WORKFLOW.md @@ -0,0 +1,37 @@ + # Agent Handoff Workflow + + This document explains the multi-agent handoff pattern used for task development and commits + in the `agentydragon` workspace. It consolidates shared guidance so individual agent prompts + do not need to repeat these details. + + ## 1. Developer Agent + - **Scope**: Runs inside a sandboxed git worktree for a single task branch (`agentydragon--`). + - **Actions**: + 1. Update the task Markdown file’s **Status** to `Done` when implementation is complete. + 2. Implement the code changes for the task. + 3. Run `pre-commit run --files $(git diff --name-only)` to apply and stage any autofix changes. + 4. **Do not** run `git commit`. + + ## 2. Commit Agent + - **Scope**: Runs in the sandbox (read-only `.git`) or equivalent environment. + - **Actions**: + 1. Emit exactly one line to stdout: the commit message prefixed `agentydragon(tasks): ` + summarizing the task’s **Implementation** section. + 2. Stop immediately. + + ## 3. Orchestrator + - **Scope**: Outside the sandbox with full Git permissions. + - **Actions**: + 1. Stage all changes: `git add -u`. + 2. Run `pre-commit run --files $(git diff --name-only --cached)`. + 3. Read the commit message and run `git commit -m "$MSG"`. + + ## 4. Status & Launch + - Use `agentydragon_task.py status` to view tasks (including those in `.done/`). + - Summaries: + - **Merged:** tasks with no branch/worktree. + - **Ready to merge:** tasks marked Done with branch commits ahead. + - **Unblocked:** tasks with no outstanding dependencies. + - The script also prints a `create-task-worktree.sh --agent --tmux ` command for all unblocked tasks. + +This guide centralizes the handoff workflow for all agents. diff --git a/agentydragon/prompts/commit.md b/agentydragon/prompts/commit.md index ecb8c42558..118d94b0e2 100644 --- a/agentydragon/prompts/commit.md +++ b/agentydragon/prompts/commit.md @@ -1,5 +1,7 @@ ## Commit Agent Prompt +Refer to `agentydragon/WORKFLOW.md` for the overall Developer→Commit→Orchestrator handoff workflow. + You are the **Commit** Codex agent for the `codex` repository. Your job is to stage and commit the changes made by the Developer agent. Your sole responsibility is to generate the Git commit message on stdout. Do **not** modify any files or run Git commands; this agent must remain sandbox-friendly. diff --git a/agentydragon/prompts/developer.md b/agentydragon/prompts/developer.md index a62a7e546f..a3b3a51d47 100644 --- a/agentydragon/prompts/developer.md +++ b/agentydragon/prompts/developer.md @@ -1,5 +1,7 @@ ## Developer Agent Prompt +Refer to `agentydragon/WORKFLOW.md` for the overall Developer→Commit→Orchestrator handoff workflow. + You are the **Developer** Codex agent for the `codex` repository. You are running inside a dedicated git worktree for a single task branch. Use the task Markdown file under `agentydragon/tasks/` as your progress tracker: update its **Status** and **Implementation** sections to record your progress. diff --git a/agentydragon/prompts/manager.md b/agentydragon/prompts/manager.md index 4172ef30ac..749cc8ea0b 100644 --- a/agentydragon/prompts/manager.md +++ b/agentydragon/prompts/manager.md @@ -1,6 +1,8 @@ # Project Manager Agent Prompt -You are the **Project Manager** Codex agent for the `codex` repository. Your responsibilities include: +You are the **Project Manager** Codex agent for the `codex` repository. +Refer to `agentydragon/WORKFLOW.md` for the standard Developer→Commit→Orchestrator handoff workflow. +Your responsibilities include: - **Reading documentation**: Load and understand all relevant docs in this repo (especially those defining task, worktree, and branch conventions, as well as each task file and top‑level README files). - **Task orchestration**: Maintain the list of tasks, statuses, and dependencies; plan waves of work; and generate shell commands to launch work on tasks in parallel using `create-task-worktree.sh` with `--agent` and `--tmux`. diff --git a/agentydragon/tasks/22-message-rendering-layout-options.md b/agentydragon/tasks/22-message-rendering-layout-options.md index e7e716e16f..0ca84cbdfa 100644 --- a/agentydragon/tasks/22-message-rendering-layout-options.md +++ b/agentydragon/tasks/22-message-rendering-layout-options.md @@ -7,7 +7,8 @@ last_updated = "2025-06-25T01:40:09.600000" +++ ## Summary -Add configurable options for inter-message spacing and sender-content line breaks in chat rendering. +Add configurable options for inter-message spacing and sender-content line breaks in chat rendering +**in the codex-rs package** - **NOT** the codex-cli package. ## Goal Provide users with flexibility in how chat messages are visually separated and how sender labels are displayed relative to message content: @@ -16,22 +17,18 @@ Provide users with flexibility in how chat messages are visually separated and h ## Acceptance Criteria -- Introduce two new config flags under the UI section: +- Introduce one new config flags under the UI section: - `message_spacing: true|false` controls inserting a blank line between messages when true. - - `sender_break_line: true|false` controls breaking line after the sender label when true. -- Both flags default to `false` to preserve current compact layout. +- default to `false` to preserve current compact layout. - When `message_spacing` is enabled, render an empty line between each message bubble or block. -- When `sender_break_line` is enabled, render the sender label on its own line above the message content; otherwise render `Sender: Content` on a single line. -- Ensure both flags can be toggled independently and work together in any combination. -- Add unit tests to verify the four layout permutations produce the correct sequence of lines. +- Add unit tests to verify the layout produces the correct sequence of lines. ## Implementation **How it was implemented** -- Extend the chat UI renderer to read `message_spacing` and `sender_break_line` from config. +- Extend the chat UI renderer to read `message_spacing` from config. - In the message rendering routine, after emitting each message block, conditionally insert a blank line if `message_spacing` is true. -- When rendering a message header, split layout based on `sender_break_line`: emit sender label and content either together or in two lines. -- Write unit tests for all combinations of `(message_spacing, sender_break_line)` covering single-line messages, multi-line content, and boundaries. +- Write unit tests for values of `(message_spacing)` covering single-line messages, multi-line content, and boundaries. ## Notes diff --git a/agentydragon/tasks/38-approval-dialog-transparent-background-fix.md b/agentydragon/tasks/38-approval-dialog-transparent-background-fix.md new file mode 100644 index 0000000000..784452b2c7 --- /dev/null +++ b/agentydragon/tasks/38-approval-dialog-transparent-background-fix.md @@ -0,0 +1,33 @@ ++++ +id = "38" +title = "Fix Approval Dialog Transparent Background" +status = "Not started" +dependencies = "" +summary = "The approval dialog background is transparent, causing prompt text underneath to overlap and become unreadable." +last_updated = "2025-06-25T00:00:00Z" ++++ + +> *UI bug:* When the approval dialog appears, its background is transparent and any partially entered prompt text shows through, overlapping and confusing the dialog. + +## Status + +**General Status**: Not started +**Summary**: Identify the CSS/ANSI background settings for dialogs and enforce an opaque backdrop before text rendering. + +## Goal + +Ensure the approval dialog is drawn with a solid background color (matching the dialog border or theming) so that any underlying text does not bleed through. + +## Acceptance Criteria + +- Approval dialogs block underlying prompt text (solid background). +- Existing unit/integration tests validate dialog visual rendering. + +## Implementation + +- Update dialog background color in TUI rendering code (`.tui` component). +- Add a test to verify no transparent cells in dialog region. + +## Notes + + diff --git a/agentydragon/tasks/39-patch-diff-left-indent-coloring-fix.md b/agentydragon/tasks/39-patch-diff-left-indent-coloring-fix.md new file mode 100644 index 0000000000..09b9498112 --- /dev/null +++ b/agentydragon/tasks/39-patch-diff-left-indent-coloring-fix.md @@ -0,0 +1,35 @@ ++++ +id = "39" +title = "Fix Coloring of Left-Indented Patch Diffs" +status = "Not started" +dependencies = "" +summary = "Patch diffs rendered with left indentation mode are not colored correctly, losing syntax highlighting." +last_updated = "2025-06-25T00:00:00Z" ++++ + +# Task 39: Fix Coloring of Left-Indented Patch Diffs + +> *UI bug:* When patch diffs are rendered in left-indented mode, the ANSI color codes are misaligned, resulting in lost or incorrect coloring. + +## Status + +**General Status**: Not started +**Summary**: Diagnose offset logic in diff renderer and adjust color processing to account for indentation. + +## Goal + +Ensure diff lines maintain proper ANSI color highlighting even when indented on the left by a fixed margin. + +## Acceptance Criteria + +- Diff render tests pass for both default and indented modes. +- Visual manual check confirms colored diff alignment. + +## Implementation + +- Update diff renderer to strip indentation before applying color logic, then reapply indentation. +- Add unit tests for multiline indented diffs. + +## Notes + + diff --git a/agentydragon/tools/manager_utils/agentydragon_task.py b/agentydragon/tools/manager_utils/agentydragon_task.py index 38f92e69a5..d95307edc9 100644 --- a/agentydragon/tools/manager_utils/agentydragon_task.py +++ b/agentydragon/tools/manager_utils/agentydragon_task.py @@ -209,6 +209,12 @@ def status(): items = ' '.join(f"{tid} ({title})" for tid, title in ready_tasks) print(f"\n\033[33mReady to merge:\033[0m {items}") + # identify unblocked tasks (no remaining dependencies) + unblocked = [tid for tid in sorted_ids if tid not in merged_ids and not deps_map.get(tid)] + if unblocked: + print(f"\n\033[1mUnblocked:\033[0m {' '.join(unblocked)}") + print(f"\033[1mLaunch unblocked in tmux:\033[0m create-task-worktree.sh --agent --tmux {' '.join(unblocked)}") + @cli.command() @click.argument('task_id') @click.argument('status')