From 1f1f13d2eabbb230e1374828701ed4b0eeba01a2 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 08:37:18 +0000 Subject: [PATCH 1/2] Initial plan From 0915c05179272e53decc259eb9e1cada3b1aaebb Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Thu, 18 Dec 2025 08:54:18 +0000 Subject: [PATCH 2/2] Fix campaign orchestrator: Add detailed instructions for discovering worker-created issues Co-authored-by: mnkiefer <8320933+mnkiefer@users.noreply.github.com> --- ...ze-reduction-project64.campaign.g.lock.yml | 32 +++++++++++++++---- ...ile-size-reduction-project64.campaign.g.md | 32 +++++++++++++++---- ...go-file-size-reduction.campaign.g.lock.yml | 32 +++++++++++++++---- .../go-file-size-reduction.campaign.g.md | 32 +++++++++++++++---- .../prompts/orchestrator_instructions.md | 32 +++++++++++++++---- 5 files changed, 130 insertions(+), 30 deletions(-) diff --git a/.github/workflows/go-file-size-reduction-project64.campaign.g.lock.yml b/.github/workflows/go-file-size-reduction-project64.campaign.g.lock.yml index e91f3f3e43..d49db58b6f 100644 --- a/.github/workflows/go-file-size-reduction-project64.campaign.g.lock.yml +++ b/.github/workflows/go-file-size-reduction-project64.campaign.g.lock.yml @@ -2703,13 +2703,33 @@ jobs: **Tracking Worker Output**: The campaign has knowledge of its workers (listed in the `workflows` field) and monitors their output directly. For each worker workflow: - 1. Query GitHub Actions API for recent workflow runs using the worker's `tracker-id` (e.g., `daily-file-diet`) - 2. Examine workflow run outputs and artifacts to discover issues created by the worker - 3. Ensure all issues created by campaign workers are added to the project board (if not already present) - 4. Update project board item statuses and fields as needed to reflect current state - 5. Report on overall campaign progress based on worker outputs and issue counts + 1. **Query GitHub Actions API for recent workflow runs** using the GitHub MCP server: + - Use `github-list_workflow_runs` with the worker's workflow file (e.g., `daily-file-diet.lock.yml`) + - Filter for recent completed runs (last 24-48 hours) to find worker activity + + 2. **Extract issue URLs from workflow run artifacts**: + - Use `github-list_workflow_run_artifacts` to list artifacts from each workflow run + - Download the `agent-output` artifact which contains workflow outputs + - Parse the artifact to extract issue URLs created by safe-output actions + - Look for outputs like: `GH_AW_OUTPUT_CREATE_ISSUE_ISSUE_URL` in the run logs + + 3. **Alternative: Use GitHub Issues search** as a fallback: + - Search for recently created issues with labels matching the worker's output patterns + - Filter by creation date (within the worker's run time window) + - Cross-reference with workflow run timestamps to confirm correlation + + 4. **Add discovered issues to the project board**: + - Use `update-project` safe-output to add issue URLs to the project board + - Set appropriate status fields (e.g., "Todo", "In Progress", "Done") + - Preserve any existing project item metadata + + 5. **Report on campaign progress**: + - Count total issues discovered from worker runs + - Track open vs closed issues + - Calculate progress percentage + - Highlight any issues that need attention - Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs and outputs. + Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs, parsing artifacts, and extracting issue URLs from workflow outputs. **Understanding Empty Boards**: If you find zero items on the project board, this is normal when a campaign is just starting or when all work has been completed. This is not an error condition - simply report the current state. Worker workflows will create issues as they discover work to be done, and the orchestrator will add them to the board on subsequent runs. diff --git a/.github/workflows/go-file-size-reduction-project64.campaign.g.md b/.github/workflows/go-file-size-reduction-project64.campaign.g.md index aecb17e0e7..e3476b3839 100644 --- a/.github/workflows/go-file-size-reduction-project64.campaign.g.md +++ b/.github/workflows/go-file-size-reduction-project64.campaign.g.md @@ -35,13 +35,33 @@ Each time this orchestrator runs on its daily schedule (or when manually dispatc **Tracking Worker Output**: The campaign has knowledge of its workers (listed in the `workflows` field) and monitors their output directly. For each worker workflow: -1. Query GitHub Actions API for recent workflow runs using the worker's `tracker-id` (e.g., `daily-file-diet`) -2. Examine workflow run outputs and artifacts to discover issues created by the worker -3. Ensure all issues created by campaign workers are added to the project board (if not already present) -4. Update project board item statuses and fields as needed to reflect current state -5. Report on overall campaign progress based on worker outputs and issue counts +1. **Query GitHub Actions API for recent workflow runs** using the GitHub MCP server: + - Use `github-list_workflow_runs` with the worker's workflow file (e.g., `daily-file-diet.lock.yml`) + - Filter for recent completed runs (last 24-48 hours) to find worker activity + +2. **Extract issue URLs from workflow run artifacts**: + - Use `github-list_workflow_run_artifacts` to list artifacts from each workflow run + - Download the `agent-output` artifact which contains workflow outputs + - Parse the artifact to extract issue URLs created by safe-output actions + - Look for outputs like: `GH_AW_OUTPUT_CREATE_ISSUE_ISSUE_URL` in the run logs + +3. **Alternative: Use GitHub Issues search** as a fallback: + - Search for recently created issues with labels matching the worker's output patterns + - Filter by creation date (within the worker's run time window) + - Cross-reference with workflow run timestamps to confirm correlation + +4. **Add discovered issues to the project board**: + - Use `update-project` safe-output to add issue URLs to the project board + - Set appropriate status fields (e.g., "Todo", "In Progress", "Done") + - Preserve any existing project item metadata + +5. **Report on campaign progress**: + - Count total issues discovered from worker runs + - Track open vs closed issues + - Calculate progress percentage + - Highlight any issues that need attention -Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs and outputs. +Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs, parsing artifacts, and extracting issue URLs from workflow outputs. **Understanding Empty Boards**: If you find zero items on the project board, this is normal when a campaign is just starting or when all work has been completed. This is not an error condition - simply report the current state. Worker workflows will create issues as they discover work to be done, and the orchestrator will add them to the board on subsequent runs. diff --git a/.github/workflows/go-file-size-reduction.campaign.g.lock.yml b/.github/workflows/go-file-size-reduction.campaign.g.lock.yml index 30aef3476d..b016a2c5b6 100644 --- a/.github/workflows/go-file-size-reduction.campaign.g.lock.yml +++ b/.github/workflows/go-file-size-reduction.campaign.g.lock.yml @@ -2703,13 +2703,33 @@ jobs: **Tracking Worker Output**: The campaign has knowledge of its workers (listed in the `workflows` field) and monitors their output directly. For each worker workflow: - 1. Query GitHub Actions API for recent workflow runs using the worker's `tracker-id` (e.g., `daily-file-diet`) - 2. Examine workflow run outputs and artifacts to discover issues created by the worker - 3. Ensure all issues created by campaign workers are added to the project board (if not already present) - 4. Update project board item statuses and fields as needed to reflect current state - 5. Report on overall campaign progress based on worker outputs and issue counts + 1. **Query GitHub Actions API for recent workflow runs** using the GitHub MCP server: + - Use `github-list_workflow_runs` with the worker's workflow file (e.g., `daily-file-diet.lock.yml`) + - Filter for recent completed runs (last 24-48 hours) to find worker activity + + 2. **Extract issue URLs from workflow run artifacts**: + - Use `github-list_workflow_run_artifacts` to list artifacts from each workflow run + - Download the `agent-output` artifact which contains workflow outputs + - Parse the artifact to extract issue URLs created by safe-output actions + - Look for outputs like: `GH_AW_OUTPUT_CREATE_ISSUE_ISSUE_URL` in the run logs + + 3. **Alternative: Use GitHub Issues search** as a fallback: + - Search for recently created issues with labels matching the worker's output patterns + - Filter by creation date (within the worker's run time window) + - Cross-reference with workflow run timestamps to confirm correlation + + 4. **Add discovered issues to the project board**: + - Use `update-project` safe-output to add issue URLs to the project board + - Set appropriate status fields (e.g., "Todo", "In Progress", "Done") + - Preserve any existing project item metadata + + 5. **Report on campaign progress**: + - Count total issues discovered from worker runs + - Track open vs closed issues + - Calculate progress percentage + - Highlight any issues that need attention - Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs and outputs. + Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs, parsing artifacts, and extracting issue URLs from workflow outputs. **Understanding Empty Boards**: If you find zero items on the project board, this is normal when a campaign is just starting or when all work has been completed. This is not an error condition - simply report the current state. Worker workflows will create issues as they discover work to be done, and the orchestrator will add them to the board on subsequent runs. diff --git a/.github/workflows/go-file-size-reduction.campaign.g.md b/.github/workflows/go-file-size-reduction.campaign.g.md index 7959ea4d5c..255fef4a11 100644 --- a/.github/workflows/go-file-size-reduction.campaign.g.md +++ b/.github/workflows/go-file-size-reduction.campaign.g.md @@ -35,13 +35,33 @@ Each time this orchestrator runs on its daily schedule (or when manually dispatc **Tracking Worker Output**: The campaign has knowledge of its workers (listed in the `workflows` field) and monitors their output directly. For each worker workflow: -1. Query GitHub Actions API for recent workflow runs using the worker's `tracker-id` (e.g., `daily-file-diet`) -2. Examine workflow run outputs and artifacts to discover issues created by the worker -3. Ensure all issues created by campaign workers are added to the project board (if not already present) -4. Update project board item statuses and fields as needed to reflect current state -5. Report on overall campaign progress based on worker outputs and issue counts +1. **Query GitHub Actions API for recent workflow runs** using the GitHub MCP server: + - Use `github-list_workflow_runs` with the worker's workflow file (e.g., `daily-file-diet.lock.yml`) + - Filter for recent completed runs (last 24-48 hours) to find worker activity + +2. **Extract issue URLs from workflow run artifacts**: + - Use `github-list_workflow_run_artifacts` to list artifacts from each workflow run + - Download the `agent-output` artifact which contains workflow outputs + - Parse the artifact to extract issue URLs created by safe-output actions + - Look for outputs like: `GH_AW_OUTPUT_CREATE_ISSUE_ISSUE_URL` in the run logs + +3. **Alternative: Use GitHub Issues search** as a fallback: + - Search for recently created issues with labels matching the worker's output patterns + - Filter by creation date (within the worker's run time window) + - Cross-reference with workflow run timestamps to confirm correlation + +4. **Add discovered issues to the project board**: + - Use `update-project` safe-output to add issue URLs to the project board + - Set appropriate status fields (e.g., "Todo", "In Progress", "Done") + - Preserve any existing project item metadata + +5. **Report on campaign progress**: + - Count total issues discovered from worker runs + - Track open vs closed issues + - Calculate progress percentage + - Highlight any issues that need attention -Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs and outputs. +Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs, parsing artifacts, and extracting issue URLs from workflow outputs. **Understanding Empty Boards**: If you find zero items on the project board, this is normal when a campaign is just starting or when all work has been completed. This is not an error condition - simply report the current state. Worker workflows will create issues as they discover work to be done, and the orchestrator will add them to the board on subsequent runs. diff --git a/pkg/campaign/prompts/orchestrator_instructions.md b/pkg/campaign/prompts/orchestrator_instructions.md index 67339a2848..b6bdec7082 100644 --- a/pkg/campaign/prompts/orchestrator_instructions.md +++ b/pkg/campaign/prompts/orchestrator_instructions.md @@ -2,13 +2,33 @@ Each time this orchestrator runs on its daily schedule (or when manually dispatc **Tracking Worker Output**: The campaign has knowledge of its workers (listed in the `workflows` field) and monitors their output directly. For each worker workflow: -1. Query GitHub Actions API for recent workflow runs using the worker's `tracker-id` (e.g., `daily-file-diet`) -2. Examine workflow run outputs and artifacts to discover issues created by the worker -3. Ensure all issues created by campaign workers are added to the project board (if not already present) -4. Update project board item statuses and fields as needed to reflect current state -5. Report on overall campaign progress based on worker outputs and issue counts +1. **Query GitHub Actions API for recent workflow runs** using the GitHub MCP server: + - Use `github-list_workflow_runs` with the worker's workflow file (e.g., `daily-file-diet.lock.yml`) + - Filter for recent completed runs (last 24-48 hours) to find worker activity + +2. **Extract issue URLs from workflow run artifacts**: + - Use `github-list_workflow_run_artifacts` to list artifacts from each workflow run + - Download the `agent-output` artifact which contains workflow outputs + - Parse the artifact to extract issue URLs created by safe-output actions + - Look for outputs like: `GH_AW_OUTPUT_CREATE_ISSUE_ISSUE_URL` in the run logs + +3. **Alternative: Use GitHub Issues search** as a fallback: + - Search for recently created issues with labels matching the worker's output patterns + - Filter by creation date (within the worker's run time window) + - Cross-reference with workflow run timestamps to confirm correlation + +4. **Add discovered issues to the project board**: + - Use `update-project` safe-output to add issue URLs to the project board + - Set appropriate status fields (e.g., "Todo", "In Progress", "Done") + - Preserve any existing project item metadata + +5. **Report on campaign progress**: + - Count total issues discovered from worker runs + - Track open vs closed issues + - Calculate progress percentage + - Highlight any issues that need attention -Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs and outputs. +Workers operate independently without knowledge of the campaign. The orchestrator discovers their work by monitoring workflow runs, parsing artifacts, and extracting issue URLs from workflow outputs. **Understanding Empty Boards**: If you find zero items on the project board, this is normal when a campaign is just starting or when all work has been completed. This is not an error condition - simply report the current state. Worker workflows will create issues as they discover work to be done, and the orchestrator will add them to the board on subsequent runs.