@@ -38,6 +38,39 @@ Downloaded artifacts include:
3838- agent-stdio.log: Agent standard output/error logs
3939- aw.patch: Git patch of changes made during execution
4040- workflow-logs/: GitHub Actions workflow run logs (job logs organized in subdirectory)
41+ - summary.json: Complete metrics and run data for all downloaded runs
42+
43+ Campaign Orchestrator Usage:
44+ In a campaign orchestrator workflow, use this command in a pre-step to download logs,
45+ then access the data in subsequent steps without needing GitHub CLI access:
46+
47+ steps:
48+ - name: Download logs from last 30 days
49+ env:
50+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
51+ run: |
52+ mkdir -p /tmp/portfolio-logs
53+ gh aw logs <worker> --start-date -1mo -o /tmp/portfolio-logs
54+
55+ In your analysis step, reference the pre-downloaded data:
56+
57+ **All workflow execution data has been pre-downloaded for you in the previous workflow step.**
58+
59+ - **JSON Summary**: /tmp/portfolio-logs/summary.json - Contains all metrics and run data you need
60+ - **Run Logs**: /tmp/portfolio-logs/run-{database-id}/ - Individual run logs (if needed for detailed analysis)
61+
62+ **DO NOT call 'gh aw logs' or any GitHub CLI commands** - they will not work in your environment.
63+ All data you need is in the summary.json file.
64+
65+ Live Tracking with Project Boards:
66+ Use the summary.json data to update your campaign project board, treating issues/PRs (workers)
67+ on the board as the real-time view of progress, ownership, and status. The orchestrator workflow
68+ can use the 'update-project' safe output to sync status fields without modifying worker workflow
69+ files. Workers remain unchanged while the campaign board reflects current execution state.
70+
71+ For incremental updates, pull data for each worker based on the last pull time using --start-date
72+ (e.g., --start-date -1d for daily updates) and align with existing board items. Compare run data
73+ from summary.json with board status to update only changed workers, preserving board state.
4174
4275` + WorkflowIDExplanation + `
4376
@@ -123,6 +156,7 @@ Examples:
123156 timeout , _ := cmd .Flags ().GetInt ("timeout" )
124157 repoOverride , _ := cmd .Flags ().GetString ("repo" )
125158 campaignOnly , _ := cmd .Flags ().GetBool ("campaign" )
159+ summaryFile , _ := cmd .Flags ().GetString ("summary-file" )
126160
127161 // Resolve relative dates to absolute dates for GitHub CLI
128162 now := time .Now ()
@@ -150,7 +184,7 @@ Examples:
150184 }
151185 }
152186
153- return DownloadWorkflowLogs (workflowName , count , startDate , endDate , outputDir , engine , ref , beforeRunID , afterRunID , repoOverride , verbose , toolGraph , noStaged , firewallOnly , noFirewall , parse , jsonOutput , timeout , campaignOnly )
187+ return DownloadWorkflowLogs (workflowName , count , startDate , endDate , outputDir , engine , ref , beforeRunID , afterRunID , repoOverride , verbose , toolGraph , noStaged , firewallOnly , noFirewall , parse , jsonOutput , timeout , campaignOnly , summaryFile )
154188 },
155189 }
156190
@@ -172,6 +206,7 @@ Examples:
172206 logsCmd .Flags ().Bool ("parse" , false , "Run JavaScript parsers on agent logs and firewall logs, writing Markdown to log.md and firewall.md" )
173207 addJSONFlag (logsCmd )
174208 logsCmd .Flags ().Int ("timeout" , 0 , "Download timeout in seconds (0 = no timeout)" )
209+ logsCmd .Flags ().String ("summary-file" , "summary.json" , "Path to write the summary JSON file relative to output directory (use empty string to disable)" )
175210 logsCmd .MarkFlagsMutuallyExclusive ("firewall" , "no-firewall" )
176211
177212 // Register completions for logs command
0 commit comments